diff options
author | unknown <pgalbraith/patg@govinda.patg.net> | 2006-08-10 15:31:44 -0700 |
---|---|---|
committer | unknown <pgalbraith/patg@govinda.patg.net> | 2006-08-10 15:31:44 -0700 |
commit | 2f48a59124c776c36ea6609f31543bf6c5f8ed86 (patch) | |
tree | 5987f5e501d310cf789abacf27d2a98227232630 /mysql-test/t | |
parent | eef51cd83d952b786def92fccde44b41a007c989 (diff) | |
parent | fab1b2f5be37d043ac21ccb679d527ed0595c4dc (diff) | |
download | mariadb-git-2f48a59124c776c36ea6609f31543bf6c5f8ed86.tar.gz |
Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into govinda.patg.net:/home/patg/mysql-build/mysql-5.1-engines-merge
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/alter_table.test | 54 | ||||
-rw-r--r-- | mysql-test/t/backup.test | 19 | ||||
-rw-r--r-- | mysql-test/t/federated_transactions-slave.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/federated_transactions.test | 4 | ||||
-rw-r--r-- | mysql-test/t/keywords.test | 24 | ||||
-rw-r--r-- | mysql-test/t/repair.test | 13 |
6 files changed, 113 insertions, 2 deletions
diff --git a/mysql-test/t/alter_table.test b/mysql-test/t/alter_table.test index efe58579785..168d011a2ac 100644 --- a/mysql-test/t/alter_table.test +++ b/mysql-test/t/alter_table.test @@ -482,3 +482,57 @@ SELECT * FROM t1; ALTER TABLE t1 MODIFY COLUMN v VARCHAR(4); SELECT * FROM t1; DROP TABLE t1; + +# End of 5.0 tests + +# +# Bug#18775 - Temporary table from alter table visible to other threads +# +# Check if special characters work and duplicates are detected. +--disable_warnings +DROP TABLE IF EXISTS `t+1`, `t+2`; +--enable_warnings +CREATE TABLE `t+1` (c1 INT); +ALTER TABLE `t+1` RENAME `t+2`; +CREATE TABLE `t+1` (c1 INT); +--error ER_TABLE_EXISTS_ERROR +ALTER TABLE `t+1` RENAME `t+2`; +DROP TABLE `t+1`, `t+2`; +# +# Same for temporary tables though these names do not become file names. +CREATE TEMPORARY TABLE `tt+1` (c1 INT); +ALTER TABLE `tt+1` RENAME `tt+2`; +CREATE TEMPORARY TABLE `tt+1` (c1 INT); +--error ER_TABLE_EXISTS_ERROR +ALTER TABLE `tt+1` RENAME `tt+2`; +SHOW CREATE TABLE `tt+1`; +SHOW CREATE TABLE `tt+2`; +DROP TABLE `tt+1`, `tt+2`; +# +# Check if special characters as in tmp_file_prefix work. +CREATE TABLE `#sql1` (c1 INT); +CREATE TABLE `@0023sql2` (c1 INT); +SHOW TABLES; +RENAME TABLE `#sql1` TO `@0023sql1`; +RENAME TABLE `@0023sql2` TO `#sql2`; +SHOW TABLES; +ALTER TABLE `@0023sql1` RENAME `#sql-1`; +ALTER TABLE `#sql2` RENAME `@0023sql-2`; +SHOW TABLES; +INSERT INTO `#sql-1` VALUES (1); +INSERT INTO `@0023sql-2` VALUES (2); +DROP TABLE `#sql-1`, `@0023sql-2`; +# +# Same for temporary tables though these names do not become file names. +CREATE TEMPORARY TABLE `#sql1` (c1 INT); +CREATE TEMPORARY TABLE `@0023sql2` (c1 INT); +SHOW TABLES; +ALTER TABLE `#sql1` RENAME `@0023sql1`; +ALTER TABLE `@0023sql2` RENAME `#sql2`; +SHOW TABLES; +INSERT INTO `#sql2` VALUES (1); +INSERT INTO `@0023sql1` VALUES (2); +SHOW CREATE TABLE `#sql2`; +SHOW CREATE TABLE `@0023sql1`; +DROP TABLE `#sql2`, `@0023sql1`; + diff --git a/mysql-test/t/backup.test b/mysql-test/t/backup.test index 917c3f98ebb..61bde0cecb0 100644 --- a/mysql-test/t/backup.test +++ b/mysql-test/t/backup.test @@ -58,3 +58,22 @@ drop table t5; --system rm $MYSQLTEST_VARDIR/tmp/t?.* # End of 4.1 tests +# End of 5.0 tests + +# +# Bug#18775 - Temporary table from alter table visible to other threads +# +# Backup did not encode table names. +--disable_warnings +DROP TABLE IF EXISTS `t+1`; +--enable_warnings +CREATE TABLE `t+1` (c1 INT); +INSERT INTO `t+1` VALUES (1), (2), (3); +BACKUP TABLE `t+1` TO '../tmp'; +DROP TABLE `t+1`; +# +# Same for restore. +RESTORE TABLE `t+1` FROM '../tmp'; +SELECT * FROM `t+1`; +DROP TABLE `t+1`; + diff --git a/mysql-test/t/federated_transactions-slave.opt b/mysql-test/t/federated_transactions-slave.opt new file mode 100644 index 00000000000..627becdbfb5 --- /dev/null +++ b/mysql-test/t/federated_transactions-slave.opt @@ -0,0 +1 @@ +--innodb diff --git a/mysql-test/t/federated_transactions.test b/mysql-test/t/federated_transactions.test index 5095c8ce9c3..9f3b030f462 100644 --- a/mysql-test/t/federated_transactions.test +++ b/mysql-test/t/federated_transactions.test @@ -1,6 +1,6 @@ # should work with embedded server after mysqltest is fixed -- source include/not_embedded.inc -source include/have_bdb.inc; +source include/have_innodb.inc; source include/federated.inc; connection slave; @@ -10,7 +10,7 @@ CREATE TABLE federated.t1 ( `id` int(20) NOT NULL, `name` varchar(32) NOT NULL default '' ) - DEFAULT CHARSET=latin1 ENGINE=BerkeleyDB; + DEFAULT CHARSET=latin1 ENGINE=InnoDB; connection master; DROP TABLE IF EXISTS federated.t1; diff --git a/mysql-test/t/keywords.test b/mysql-test/t/keywords.test index de0159a950e..1af4a1354be 100644 --- a/mysql-test/t/keywords.test +++ b/mysql-test/t/keywords.test @@ -19,3 +19,27 @@ select events.binlog from events; drop table events; # End of 4.1 tests + +# +# Bug#19939 "AUTHORS is not a keyword" +# +delimiter |; +create procedure p1() +begin + declare n int default 2; + authors: while n > 0 do + set n = n -1; + end while authors; +end| +create procedure p2() +begin + declare n int default 2; + contributors: while n > 0 do + set n = n -1; + end while contributors; +end| +delimiter ;| +drop procedure p1; +drop procedure p2; + +# End of 5.1 tests diff --git a/mysql-test/t/repair.test b/mysql-test/t/repair.test index 16e1d76d460..c79768dbb46 100644 --- a/mysql-test/t/repair.test +++ b/mysql-test/t/repair.test @@ -35,3 +35,16 @@ repair table t1 use_frm; drop table t1; # End of 4.1 tests +# End of 5.0 tests + +# +# Bug#18775 - Temporary table from alter table visible to other threads +# +# REPAIR TABLE ... USE_FRM on temporary table crashed the table or server. +--disable_warnings +DROP TABLE IF EXISTS tt1; +--enable_warnings +CREATE TEMPORARY TABLE tt1 (c1 INT); +REPAIR TABLE tt1 USE_FRM; +DROP TABLE tt1; + |