From db67a2ee6149b16c4976ddd510e62d35c6eb8a9f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 7 Jan 2003 18:59:08 -0800 Subject: [PATCH] Simple misc cases - warnings --- mysql-test/r/create.result | 2 +- mysql-test/r/warnings.result | 17 +++++++++++++++++ mysql-test/t/create.test | 2 +- mysql-test/t/warnings.test | 7 +++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index a32d32a4ab7..ea553b5ac58 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -1,4 +1,4 @@ -drop table if exists t1,t2; +drop table if exists t1,t2,t3; create table t1 (b char(0)); insert into t1 values (""),(null); select * from t1; diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result index 06be16aad48..f2a105827da 100644 --- a/mysql-test/r/warnings.result +++ b/mysql-test/r/warnings.result @@ -13,3 +13,20 @@ set SQL_WARNINGS=0; drop temporary table if exists not_exists; Warnings: Note 1051 Unknown table 'not_exists' +drop table if exists not_exists_table; +Warnings: +Note 1051 Unknown table 'not_exists_table' +show warnings limit 1; +Level Code Message +Note 1051 Unknown table 'not_exists_table' +drop database if exists not_exists_db; +Warnings: +Note 1008 Can't drop database 'not_exists_db'. Database doesn't exist +show count(*) warnings; +@@session.warning_count +1 +create table t1(id int); +create table if not exists t1(id int); +select @@warning_count; +@@warning_count +0 diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 0a3bd4e97a1..70a589c4be6 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -3,7 +3,7 @@ # --disable_warnings -drop table if exists t1,t2; +drop table if exists t1,t2,t3; --enable_warnings create table t1 (b char(0)); diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test index eeb45eaba56..8cff8706c43 100644 --- a/mysql-test/t/warnings.test +++ b/mysql-test/t/warnings.test @@ -19,3 +19,10 @@ set SQL_WARNINGS=0; # Test other warnings drop temporary table if exists not_exists; +drop table if exists not_exists_table; +show warnings limit 1; +drop database if exists not_exists_db; +show count(*) warnings; +create table t1(id int); +create table if not exists t1(id int); +select @@warning_count;