mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-community
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-forcollapseandmerge
This commit is contained in:
@@ -566,3 +566,35 @@ reap;
|
||||
connection default;
|
||||
drop table t2;
|
||||
disconnect flush;
|
||||
|
||||
#
|
||||
# Bug#30882 Dropping a temporary table inside a stored function may cause a server crash
|
||||
#
|
||||
# Test HANDLER statements in conjunction with temporary tables. While the temporary table
|
||||
# is open by a HANDLER, no other statement can access it.
|
||||
#
|
||||
|
||||
--disable_warnings
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
create temporary table t1 (a int, b char(1), key a(a), key b(a,b));
|
||||
insert into t1 values (0,"a"),(1,"b"),(2,"c"),(3,"d"),(4,"e"),
|
||||
(5,"f"),(6,"g"),(7,"h"),(8,"i"),(9,"j");
|
||||
select a,b from t1;
|
||||
handler t1 open as a1;
|
||||
handler a1 read a first;
|
||||
handler a1 read a next;
|
||||
handler a1 read a next;
|
||||
--error ER_CANT_REOPEN_TABLE
|
||||
select a,b from t1;
|
||||
handler a1 read a prev;
|
||||
handler a1 read a prev;
|
||||
handler a1 read a=(6) where b="g";
|
||||
handler a1 close;
|
||||
select a,b from t1;
|
||||
handler t1 open as a2;
|
||||
handler a2 read a first;
|
||||
handler a2 read a last;
|
||||
handler a2 read a prev;
|
||||
handler a2 close;
|
||||
drop table t1;
|
||||
|
@@ -1020,6 +1020,55 @@ SELECT * FROM t1 ORDER BY b DESC, a ASC;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
###########################################################################
|
||||
|
||||
--echo
|
||||
--echo #
|
||||
--echo # Bug#27610: ALTER TABLE ROW_FORMAT=... does not rebuild the table.
|
||||
--echo #
|
||||
|
||||
--echo
|
||||
--echo # - prepare;
|
||||
--echo
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
--echo
|
||||
|
||||
CREATE TABLE t1(c INT)
|
||||
ENGINE = InnoDB
|
||||
ROW_FORMAT = COMPACT;
|
||||
|
||||
--echo
|
||||
--echo # - initial check;
|
||||
--echo
|
||||
|
||||
SELECT table_schema, table_name, row_format
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE table_schema = DATABASE() AND table_name = 't1';
|
||||
|
||||
--echo
|
||||
--echo # - change ROW_FORMAT and check;
|
||||
--echo
|
||||
|
||||
ALTER TABLE t1 ROW_FORMAT = REDUNDANT;
|
||||
|
||||
--echo
|
||||
|
||||
SELECT table_schema, table_name, row_format
|
||||
FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE table_schema = DATABASE() AND table_name = 't1';
|
||||
|
||||
--echo
|
||||
--echo # - that's it, cleanup.
|
||||
--echo
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
###########################################################################
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
# Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY
|
||||
|
Reference in New Issue
Block a user