MySQL "CREATE TABLE IF NOT EXISTS" -> Error 1050

mysql, mysql-error-1050, sql

Solution

Works fine for me in 5.0.27

I just get a warning (not an error) that the table exists;

Problem

Using the command: ``` CREATE TABLE IF NOT EXISTS `test`.`t1` ( `col` VARCHAR(16) NOT NULL ) ENGINE=MEMORY; ``` Running this twice in the MySQL Query Browser results in: Table 't1' already exists Error 1050 I would have thought that creating the table "IF NOT EXISTS" would not throw errors. Am I missing something or is this a bug? I am running version 5.1. Thanks.

Original source

Related problems