summaryrefslogtreecommitdiff
path: root/mysql-test/r/create.result
diff options
context:
space:
mode:
authorunknown <gluh@eagle.intranet.mysql.r18.ru>2005-09-12 17:09:19 +0500
committerunknown <gluh@eagle.intranet.mysql.r18.ru>2005-09-12 17:09:19 +0500
commit63080dc200d8b497500422aa484f72e712b04d5f (patch)
treea57b033bb2eff45734871677eb2e7d04cfea7c43 /mysql-test/r/create.result
parente98e15db9b05da3b4c1ad5d788f2c6e5a3b78a15 (diff)
downloadmariadb-git-63080dc200d8b497500422aa484f72e712b04d5f.tar.gz
Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
produce warning for 'create database if not exists' if database exists do not update database options in this case produce warning for 'create table if not exists' if table exists mysql-test/r/create.result: Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS updated test case result mysql-test/r/temp_table.result: Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS updated test case result mysql-test/r/warnings.result: Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS updated test case result mysql-test/t/create.test: Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS test case sql/sql_db.cc: Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS produce warning for 'create database if not exists' if database exists do not update database options in this case sql/sql_table.cc: Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS produce warning for 'create table if not exists' if table exists
Diffstat (limited to 'mysql-test/r/create.result')
-rw-r--r--mysql-test/r/create.result28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index 95757fbd7dc..6edd4cbc48f 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -9,6 +9,8 @@ NULL
drop table if exists t1;
create table t1 (b char(0) not null);
create table if not exists t1 (b char(0) not null);
+Warnings:
+Note 1050 Table 't1' already exists
insert into t1 values (""),(null);
Warnings:
Warning 1263 Data truncated; NULL supplied to NOT NULL column 'b' at row 2
@@ -232,9 +234,13 @@ create table t1 select x'4132';
drop table t1;
create table t1 select 1,2,3;
create table if not exists t1 select 1,2;
+Warnings:
+Note 1050 Table 't1' already exists
create table if not exists t1 select 1,2,3,4;
ERROR 21S01: Column count doesn't match value count at row 1
create table if not exists t1 select 1;
+Warnings:
+Note 1050 Table 't1' already exists
select * from t1;
1 2 3
1 2 3
@@ -243,9 +249,13 @@ select * from t1;
drop table t1;
create table t1 select 1,2,3;
create table if not exists t1 select 1,2;
+Warnings:
+Note 1050 Table 't1' already exists
create table if not exists t1 select 1,2,3,4;
ERROR 21S01: Column count doesn't match value count at row 1
create table if not exists t1 select 1;
+Warnings:
+Note 1050 Table 't1' already exists
select * from t1;
1 2 3
1 2 3
@@ -255,11 +265,15 @@ drop table t1;
create table t1 (a int not null, b int, primary key (a));
insert into t1 values (1,1);
create table if not exists t1 select 2;
+Warnings:
+Note 1050 Table 't1' already exists
select * from t1;
a b
1 1
0 2
create table if not exists t1 select 3 as 'a',4 as 'b';
+Warnings:
+Note 1050 Table 't1' already exists
create table if not exists t1 select 3 as 'a',3 as 'b';
ERROR 23000: Duplicate entry '3' for key 1
select * from t1;
@@ -593,3 +607,17 @@ drop database mysqltest;
create table test.t1 like x;
ERROR 42000: Incorrect database name 'NULL'
drop table if exists test.t1;
+create database mysqltest;
+create database if not exists mysqltest character set latin2;
+Warnings:
+Note 1007 Can't create database 'mysqltest'; database exists
+show create database mysqltest;
+Database Create Database
+mysqltest CREATE DATABASE `mysqltest` /*!40100 DEFAULT CHARACTER SET latin1 */
+drop database mysqltest;
+use test;
+create table t1 (a int);
+create table if not exists t1 (a int);
+Warnings:
+Note 1050 Table 't1' already exists
+drop table t1;