mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
78e828d32f
Ensure that ccache is also used for C programs mysql: Ensure that 'delimiter' works the same way in batch mode as in normal mode mysqldump: Change to use ;; (instead of //) as a stored procedure/trigger delimiter Fixed test cases by adding missing DROP's and rename views to be of type 'v#' Removed MY_UNIX_PATH from fn_format() Removed current_db_used from TABLE_LIST Removed usage of 'current_thd' in Item_splocal Removed some compiler warnings A bit faster longlong2str code
23 lines
774 B
Text
23 lines
774 B
Text
-- source include/have_innodb.inc
|
|
--disable_warnings
|
|
DROP TABLE IF EXISTS t1,t2,t3;
|
|
--enable_warnings
|
|
|
|
#
|
|
# Test for KEY_COLUMN_USAGE & TABLE_CONSTRAINTS tables
|
|
#
|
|
|
|
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";
|
|
select * from information_schema.KEY_COLUMN_USAGE where
|
|
TABLE_SCHEMA= "test";
|
|
|
|
drop table t3, t2, t1;
|