Re: CREATE DATABASE IF NOT EXISTS not working in 4.1.2-alpha?

Sinisa Milivojevic <[email protected]>
Newsgroups gmane.comp.db.mysql.bugs
Message-ID <[email protected]>
Steve Hay writes:
> Hi,
> 
> I'm just looking at 4.1.2-alpha for the first time and immediately ran 
> into a problem.  The IF NOT EXISTS part of CREATE DATABASE doesn't seem 
> to be working -- it causes an error if the database does already exist, 
> just as you would get without the IF NOT EXISTS bit:
> 
> =====
> C:\mysql\bin>mysql -u root
> Welcome to the MySQL monitor.  Commands end with ; or \g.
> Your MySQL connection id is 1 to server version: 4.1.2-alpha-nt-max
> 
> Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
> 
> mysql> create database if not exists foo;
> Query OK, 1 row affected (0.00 sec)
> 
> mysql> create database if not exists foo;
> ERROR 1006 (HY000): Can't create database 'foo' (errno: 17)
> =====
> 
> The above SQL commands worked fine in 4.0.18.  Has this been 
> deliberately changed (I couldn't see anything different in the manual), 
> or is it broken?
> 
> - Steve
> 
> 

Hi!

I just tested it with 4.1.3 and it worked like a charm:


mysql> create database if not exists xxx;
Query OK, 1 row affected (0.06 sec)

mysql> create database if not exists xxx;
Query OK, 0 rows affected (0.00 sec)


-- 

Sincerely,

-- 
For technical support contracts, go to https://order.mysql.com/?ref=msmi
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Mr. Sinisa Milivojevic <[email protected]>
 / /|_/ / // /\ \/ /_/ / /__   MySQL AB
/_/  /_/\_, /___/\___\_\___/   Full time Developer and Support Coordinator
       <___/   www.mysql.com   Larnaca, Cyprus



-- 
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.