title: Create Table If Not Exists Hanging
body: <p>I am still new to using databases, but currently I am using a mysql database and attempting to make my bash script unbreakable because it might be used in several different environments (dev, qa, etc). I know it will run correctly without this one line. </p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS backupfiles (fileName VARCHAR(20), archiveId VARCHAR(500), checkSum VARCHAR(100), glacierVault VARCHAR(100), timeStamp date);
  </code></pre>
  
  <p>I also know that if I put that exact line into my database when that table does not exist then it runs perfectly and if it does exist already it gives me a warning, but does not break.</p>
  
  <pre><code>+-------+------+------------------------------------+
  | Level | Code | Message                            |
  +-------+------+------------------------------------+
  | Note  | 1050 | Table 'backupfiles' already exists |
  +-------+------+------------------------------------+
  </code></pre>
  
  <p>When I run the line above and there is no table named backupfiles it works perfectly, but when there is it hangs(when I say hangs it sits there and does nothing) 95% of the time and 5% of the time works. Has anyone run into a problem like this? I am using AWS RDS(Amazon Web serices Relational Database Service) and the mysql server is  5.5.27</p>
  
  <p>Here is all of my code that I relates to the mysql database </p>
  
  <pre><code>mysql -h portal-rds -u $user --password=$mysqlpw &lt;&lt;QUERY_INPUT
  CREATE DATABASE IF NOT EXISTS $DATABASE;
  use glacier;
  CREATE TABLE IF NOT EXISTS backupfiles (fileName VARCHAR(20), archiveId VARCHAR(500), checkSum VARCHAR(100), glacierVault VARCHAR(100), timeStamp date);
  INSERT INTO backupfiles VALUES ('$archive_file_name', '$archiveID', '$CURRENTVAULT', '$checkSum', CURDATE());
  COMMIT;
  QUERY_INPUT
  </code></pre>