mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
7d6d4c8355
Fixed problems in test suite where some test failed Fixed access to not initialized memory in federated Fixed access to not initialized memory when using BIT fields in internal temporary tables BitKeeper/etc/ignore: added libmysqld/sql_cursor.h mysql-test/r/information_schema.result: Change view names to 'v#' to not cause massive conflict with other tests if test dies in the middlecd mysql-test/r/information_schema_inno.result: Remove used tables at start mysql-test/r/multi_statement.result: Remove used tables at start mysql-test/r/temp_table.result: Change view names to 'v#' to not cause massive conflict with other tests if test dies in the middle mysql-test/r/type_bit.result: More tests mysql-test/t/information_schema.test: Change view names to 'v#' to not cause massive conflict with other tests if test dies in the middle mysql-test/t/information_schema_inno.test: Remove used tables at start mysql-test/t/multi_statement.test: Remove used tables at start mysql-test/t/temp_table.test: Change view names to 'v#' to not cause massive conflict with other tests if test dies in the middle mysql-test/t/type_bit.test: More tests mysql-test/valgrind.supp: Removed some valgrind warnings that isn't errors sql/ha_federated.cc: Fixed errors discovered by valgrind: - Socket was not initialized - share->scheme was deleted while there was still pointer into it from the hash sql/item_func.h: Remove access to table object from cleanup() as the table object may have been dropped earlier (In case of temporary tables or of close_thread_tables() is run before cleanup()) This fixed a bug with access to already freed memory sql/sql_base.cc: Reset variables used by fulltext sql/sql_select.cc: Fixed various problems with bit fields when used in internal temporary tables. Calculate space needed for bit fields correctly (previously we allocated more space than needed for rows in heap/myisam tables)
27 lines
1.5 KiB
Text
27 lines
1.5 KiB
Text
DROP TABLE IF EXISTS t1,t2,t3;
|
|
CREATE TABLE t1 (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;
|
|
CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id, id),
|
|
FOREIGN KEY (t1_id) REFERENCES t1(id) ON DELETE CASCADE,
|
|
FOREIGN KEY (t1_id) REFERENCES t1(id) ON UPDATE CASCADE) ENGINE=INNODB;
|
|
CREATE TABLE t3 (id INT PRIMARY KEY, t2_id INT, INDEX par_ind (t2_id),
|
|
FOREIGN KEY (id, t2_id) REFERENCES t2(t1_id, id) ON DELETE CASCADE) ENGINE=INNODB;
|
|
select * from information_schema.TABLE_CONSTRAINTS where
|
|
TABLE_SCHEMA= "test";
|
|
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE
|
|
NULL test PRIMARY test t1 PRIMARY KEY
|
|
NULL test PRIMARY test t2 PRIMARY KEY
|
|
NULL test t2_ibfk_1 test t2 FOREIGN KEY
|
|
NULL test t2_ibfk_2 test t2 FOREIGN KEY
|
|
NULL test PRIMARY test t3 PRIMARY KEY
|
|
NULL test t3_ibfk_1 test t3 FOREIGN KEY
|
|
select * from information_schema.KEY_COLUMN_USAGE where
|
|
TABLE_SCHEMA= "test";
|
|
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION POSITION_IN_UNIQUE_CONSTRAINT REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME REFERENCED_COLUMN_NAME
|
|
NULL test PRIMARY NULL test t1 id 1 NULL NULL NULL NULL
|
|
NULL test PRIMARY NULL test t2 id 1 NULL NULL NULL NULL
|
|
NULL test t2_ibfk_1 NULL test t2 t1_id 1 1 test t1 id
|
|
NULL test t2_ibfk_2 NULL test t2 t1_id 1 1 test t1 id
|
|
NULL test PRIMARY NULL test t3 id 1 NULL NULL NULL NULL
|
|
NULL test t3_ibfk_1 NULL test t3 id 1 1 test t2 t1_id
|
|
NULL test t3_ibfk_1 NULL test t3 t2_id 2 2 test t2 id
|
|
drop table t3, t2, t1;
|