title: Syntax error when trying to CREATE TABLE using session variables
body: <p>The following works in a new MySQL session:</p>
  
  <pre><code>CREATE DATABASE rand27818;
  USE rand27818;
  CREATE TABLE sessions (id INT NOT NULL AUTO_INCREMENT, session VARCHAR(128), PRIMARY KEY(id));
  DROP DATABASE rand27818;
  </code></pre>
  
  <p>However, this--</p>
  
  <pre><code>SET @sesslen = 128;
  CREATE DATABASE rand27818;
  USE rand27818;
  CREATE TABLE sessions (id INT NOT NULL AUTO_INCREMENT, session VARCHAR(@sesslen), PRIMARY KEY(id));
  DROP DATABASE rand27818;
  </code></pre>
  
  <p>--does not; it returns:</p>
  
  <blockquote>
    <p>"ERROR 1064 (42000): You have an error in your SQL syntax; check the
    manual that corresponds to your MySQL server version for the right
    syntax to use near '@sesslen), PRIMARY KEY(id))' at line 1"</p>
  </blockquote>
  
  <p>I've tried several combinations of with extra parentheses around the variable, removing the @ sign, assigning the variable after USEing the database etc. to no joy. (Not that I thought it would make any difference.) Using variables in INSERT statements and SELECTing variables seem to be fine, I'm only encountering a problem trying to CREATE.</p>
  
  <p>I'm thinking this is a curiosity of my installation (MySQL bundled with XAMPP, in case that helps) or me missing something due to a conceptual misunderstanding on my part of MySQL. If the latter, could someone explain what I'm missing?</p>