diff options
author | unknown <acurtis@xiphis.org> | 2005-06-09 17:15:06 +0100 |
---|---|---|
committer | unknown <acurtis@xiphis.org> | 2005-06-09 17:15:06 +0100 |
commit | fec1c6ac67c1c1ed4cdbde97d066032f29650916 (patch) | |
tree | d9346272a66df32b694fc91151af4459d92c8e47 /mysql-test | |
parent | baae624cdbdec0cc1342f02a205d32b07f096011 (diff) | |
parent | c995109b699a56e94bbc82754b17622f271ebb39 (diff) | |
download | mariadb-git-fec1c6ac67c1c1ed4cdbde97d066032f29650916.tar.gz |
Merge
BitKeeper/etc/logging_ok:
auto-union
myisam/mi_check.c:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/innodb_handler.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/t/create.test:
Auto merged
sql/set_var.cc:
Auto merged
mysql-test/r/sql_mode.result:
SCCS merged
mysql-test/t/sql_mode.test:
SCCS merged
sql/sql_acl.cc:
SCCS merged
sql/sql_handler.cc:
SCCS merged
sql/sql_table.cc:
SCCS merged
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/analyze.result | 32 | ||||
-rw-r--r-- | mysql-test/r/create.result | 6 | ||||
-rw-r--r-- | mysql-test/r/innodb_handler.result | 16 | ||||
-rw-r--r-- | mysql-test/r/sql_mode.result | 2 | ||||
-rw-r--r-- | mysql-test/t/analyze.test | 39 | ||||
-rw-r--r-- | mysql-test/t/create.test | 11 | ||||
-rw-r--r-- | mysql-test/t/innodb_handler.test | 10 | ||||
-rw-r--r-- | mysql-test/t/sql_mode.test | 5 |
8 files changed, 121 insertions, 0 deletions
diff --git a/mysql-test/r/analyze.result b/mysql-test/r/analyze.result new file mode 100644 index 00000000000..0b44a502b13 --- /dev/null +++ b/mysql-test/r/analyze.result @@ -0,0 +1,32 @@ +create table t1 (a bigint); +lock tables t1 write; +insert into t1 values(0); +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +unlock tables; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +create table t1 (a bigint); +insert into t1 values(0); +lock tables t1 write; +delete from t1; +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +unlock tables; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; +create table t1 (a bigint); +insert into t1 values(0); +analyze table t1; +Table Op Msg_type Msg_text +test.t1 analyze status OK +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 9d96cef345f..d622127e8f0 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -596,3 +596,9 @@ ERROR 42000: Incorrect database name 'xyz' create table t1(t1.name int); create table t2(test.t2.name int); drop table t1,t2; +create database mysqltest; +use mysqltest; +drop database mysqltest; +create table test.t1 like x; +ERROR 42000: Incorrect database name 'NULL' +drop table if exists test.t1; diff --git a/mysql-test/r/innodb_handler.result b/mysql-test/r/innodb_handler.result index 7f4960ffa35..7e853a55e37 100644 --- a/mysql-test/r/innodb_handler.result +++ b/mysql-test/r/innodb_handler.result @@ -132,6 +132,22 @@ a b handler t2 read last; ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 handler t2 close; +handler t1 open; +handler t1 read a next; +a b +14 aaa +handler t1 read a next; +a b +15 bbb +handler t1 close; +handler t1 open; +handler t1 read a prev; +a b +22 iii +handler t1 read a prev; +a b +21 hhh +handler t1 close; handler t1 open as t2; handler t2 read first; a b diff --git a/mysql-test/r/sql_mode.result b/mysql-test/r/sql_mode.result index 09adc48259c..c5ba4d15a50 100644 --- a/mysql-test/r/sql_mode.result +++ b/mysql-test/r/sql_mode.result @@ -138,6 +138,8 @@ t1 CREATE TABLE `t1` ( `min_num` decimal(7,6) default '0.000001' ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1 ; +set @@SQL_MODE=NULL; +ERROR 42000: Variable 'sql_mode' can't be set to the value of 'NULL' SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=''; show local variables like 'SQL_MODE'; Variable_name Value diff --git a/mysql-test/t/analyze.test b/mysql-test/t/analyze.test new file mode 100644 index 00000000000..faf30279c68 --- /dev/null +++ b/mysql-test/t/analyze.test @@ -0,0 +1,39 @@ +# +# Bug #10901 Analyze Table on new table destroys table +# This is minimal test case to get error +# The problem was that analyze table wrote the shared state to the file and this +# didn't include the inserts while locked. A check was needed to ensure that +# state information was not updated when executing analyze table for a locked table. +# The analyze table had to be within locks and check table had to be after unlocking +# since then it brings the wrong state from disk rather than from the currently +# correct internal state. The insert is needed since it changes the file state, +# number of records. +# The fix is to synchronise the state of the shared state and the current state before +# calling mi_state_info_write +# +create table t1 (a bigint); +lock tables t1 write; +insert into t1 values(0); +analyze table t1; +unlock tables; +check table t1; + +drop table t1; + +create table t1 (a bigint); +insert into t1 values(0); +lock tables t1 write; +delete from t1; +analyze table t1; +unlock tables; +check table t1; + +drop table t1; + +create table t1 (a bigint); +insert into t1 values(0); +analyze table t1; +check table t1; + +drop table t1; + diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 487fa2ea76b..d870ff368d3 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -503,3 +503,14 @@ create table t1(t1.name int); create table t2(test.t2.name int); drop table t1,t2; +# +# Bug#11028: Crash on create table like +# +create database mysqltest; +use mysqltest; +drop database mysqltest; +--error 1102 +create table test.t1 like x; +--disable_warnings +drop table if exists test.t1; +--enable_warnings diff --git a/mysql-test/t/innodb_handler.test b/mysql-test/t/innodb_handler.test index e8c486caf66..65728519e7b 100644 --- a/mysql-test/t/innodb_handler.test +++ b/mysql-test/t/innodb_handler.test @@ -69,6 +69,16 @@ handler t2 read next; handler t2 read last; handler t2 close; +handler t1 open; +handler t1 read a next; # this used to crash as a bug#5373 +handler t1 read a next; +handler t1 close; + +handler t1 open; +handler t1 read a prev; # this used to crash as a bug#5373 +handler t1 read a prev; +handler t1 close; + handler t1 open as t2; handler t2 read first; alter table t1 engine=innodb; diff --git a/mysql-test/t/sql_mode.test b/mysql-test/t/sql_mode.test index e80752eb71b..6a0c4aecada 100644 --- a/mysql-test/t/sql_mode.test +++ b/mysql-test/t/sql_mode.test @@ -80,6 +80,11 @@ create table t1 ( min_num dec(6,6) default .000001); show create table t1; drop table t1 ; +# +# Bug #10732: Set SQL_MODE to NULL gives garbled error message +# +--error 1231 +set @@SQL_MODE=NULL; # # test for |