title: ERROR 1059 (42000) at line 3: Identifier is too long
body: <p>I am coming across the following error   </p>
  
  <pre><code>ERROR 1059 (42000) at line 3: Identifier name '#o_acc,o_pos,o_aa1,o_aa2,rsid,acc,pos,aa1,aa2,prediction,pph2_prob,pph2_FPR,pph2_TPR'
  </code></pre>
  
  <p>here is my code:</p>
  
  <pre><code>#!/bin/sh
  
  MYSQL_ARGS="some ARGS"
  DB="$3"
  DELIM=";"
  
  CSV="$1"
  TABLE="$2"
  
  [ "$CSV" = "" -o "$TABLE" = "" ] &amp;&amp; echo "Syntax: $0 csvfile tablename" &amp;&amp; exit 1
  
  FIELDS=$(head -1 "$CSV" | sed -e 's/'$DELIM'/` varchar(255),\n`/g' -e 's/\r//g')
  FIELDS='`'"$FIELDS"'` varchar(255)'
  
  #echo "$FIELDS" &amp;&amp; exit
  
  mysql $MYSQL_ARGS $DB -e "
  DROP TABLE IF EXISTS $TABLE;
  CREATE TABLE $TABLE ($FIELDS);
  
  LOAD DATA INFILE '$(pwd)/$CSV' INTO TABLE $TABLE
  FIELDS TERMINATED BY '$DELIM'
  IGNORE 1 LINES
  ;
  "
  </code></pre>
  
  <p>and a sample of my data file:</p>
  
  <pre><code>#o_acc,o_pos,o_aa1,o_aa2,rsid,acc,pos,aa1,aa2,prediction,pph2_prob,pph2_FPR,pph2_TPR
  ENSG00000145888,455,H,N,?,P23415,455,H,N,probablydamaging,0.997,0.0167,0.409
  ENSG00000145888,450,R,H,?,P23415,450,R,H,probablydamaging,1,0.00026,0.00018
  ENSG00000145888,440,M,I,?,P23415,440,M,I,benign,0,1,1
  ENSG00000145888,428,R,H,?,P23415,428,R,H,probablydamaging,1,0.00026,0.00018
  ENSG00000145888,428,R,C,?,P23415,428,R,C,probablydamaging,1,0.00026,0.00018
  ENSG00000145888,413,R,Q,?,P23415,413,R,Q,probablydamaging,0.993,0.0301,0.696
  ENSG00000145888,412,M,L,?,P23415,412,M,L,benign,0.143,0.136,0.923
  ENSG00000145888,406,S,C,?,P23415,406,S,C,possiblydamaging,0.658,0.0867,0.865
  ENSG00000145888,402,P,L,?,P23415,402,P,L,benign,0,1,1
  </code></pre>
  
  <p>The error message looks like it is telling me I am trying to create a column called:</p>
  
  <pre><code>#o_acc,o_pos,o_aa1,o_aa2,rsid,acc,pos,aa1,aa2,prediction,pph2_prob,pph2_FPR,pph2_TPR
  </code></pre>
  
  <p>however you will see, I am trying to create 13 columns.</p>
  
  <p>Can anyone spot anything wrong with either my data or code?</p>