diff options
author | Sergei Golubchik <sergii@pisem.net> | 2014-02-27 12:00:16 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2014-02-27 12:00:16 +0100 |
commit | 05aba79e981cfeb7e7b68bb31739ab8d443c4aea (patch) | |
tree | 049beb1e97a6aaa3c755bb2f9f0bf155a1fb4642 /mysql-test/t/lowercase_table4.test | |
parent | 98c0659150e8d0bc17cfe05361d3c03c64f181c4 (diff) | |
download | mariadb-git-05aba79e981cfeb7e7b68bb31739ab8d443c4aea.tar.gz |
MDEV-4447 MariaDB sources should have unix-style line endings everywhere
Diffstat (limited to 'mysql-test/t/lowercase_table4.test')
-rw-r--r-- | mysql-test/t/lowercase_table4.test | 216 |
1 files changed, 108 insertions, 108 deletions
diff --git a/mysql-test/t/lowercase_table4.test b/mysql-test/t/lowercase_table4.test index d13b1a16be1..435ff0dae66 100644 --- a/mysql-test/t/lowercase_table4.test +++ b/mysql-test/t/lowercase_table4.test @@ -1,108 +1,108 @@ ---source include/have_case_insensitive_file_system.inc
---source include/have_innodb.inc
-
---echo #
---echo # Bug#46941 crash with lower_case_table_names=2 and
---echo # foreign data dictionary confusion
---echo #
-
-CREATE DATABASE XY;
-USE XY;
-
-#
-# Logs are disabled, since the number of creates tables
-# and subsequent select statements may vary between
-# versions
-#
---disable_query_log
---disable_result_log
-
-let $tcs = `SELECT @@table_open_cache + 1`;
-
-let $i = $tcs;
-
-while ($i)
-{
- eval CREATE TABLE XY.T_$i (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT,
- primary key(a, b), unique(b)) ENGINE=InnoDB;
- dec $i;
-}
-
-eval ALTER TABLE XY.T_$tcs ADD INDEX I1 (c, b),
- ADD CONSTRAINT C1 FOREIGN KEY (c, b) REFERENCES XY.T_1 (a, b);
-
-eval ALTER TABLE XY.T_$tcs ADD INDEX I2 (b),
- ADD CONSTRAINT C2 FOREIGN KEY (b) REFERENCES XY.T_1(a);
-
-let $i = $tcs;
-while ($i)
-{
- eval SELECT * FROM XY.T_$i LIMIT 1;
- dec $i;
-}
-
-DROP DATABASE XY;
-CREATE DATABASE XY;
-USE XY;
-eval CREATE TABLE XY.T_$tcs (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT,
- PRIMARY KEY(a, b), UNIQUE(b)) ENGINE=InnoDB;
-#
-# The bug causes this SELECT to err
-eval SELECT * FROM XY.T_$tcs LIMIT 1;
-
---enable_query_log
---enable_result_log
-DROP DATABASE XY;
-USE TEST;
-
---echo #
---echo # Bug55222 Mysqldump table names case bug in REFERENCES clause
---echo # InnoDB did not handle lower_case_table_names=2 for
---echo # foreign_table_names and referenced_table_names.
---echo #
-
-SHOW VARIABLES LIKE 'lower_case_table_names';
-
---disable_warnings
-DROP TABLE IF EXISTS `Table2`;
-DROP TABLE IF EXISTS `Table1`;
---disable_warnings
-
-CREATE TABLE `Table1`(c1 INT PRIMARY KEY) ENGINE=InnoDB;
-CREATE TABLE `Table2`(c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB;
-ALTER TABLE `Table2` ADD CONSTRAINT fk1 FOREIGN KEY(c2) REFERENCES `Table1`(c1);
-query_vertical SHOW CREATE TABLE `Table2`;
-query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test';
-DROP TABLE `Table2`;
-DROP TABLE `Table1`;
-
---disable_warnings
-DROP TABLE IF EXISTS Product_Order;
-DROP TABLE IF EXISTS Product;
-DROP TABLE IF EXISTS Customer;
---enable_warnings
-
-CREATE TABLE Product (Category INT NOT NULL, Id INT NOT NULL,
- Price DECIMAL, PRIMARY KEY(Category, Id)) ENGINE=InnoDB;
-CREATE TABLE Customer (Id INT NOT NULL, PRIMARY KEY (Id)) ENGINE=InnoDB;
-CREATE TABLE Product_Order (No INT NOT NULL AUTO_INCREMENT,
- Product_Category INT NOT NULL,
- Product_Id INT NOT NULL,
- Customer_Id INT NOT NULL,
- PRIMARY KEY(No),
- INDEX (Product_Category, Product_Id),
- FOREIGN KEY (Product_Category, Product_Id)
- REFERENCES Product(Category, Id) ON UPDATE CASCADE ON DELETE RESTRICT,
- INDEX (Customer_Id),
- FOREIGN KEY (Customer_Id)
- REFERENCES Customer(Id)
- ) ENGINE=INNODB;
-
-query_vertical SHOW CREATE TABLE Product_Order;
-query_vertical SHOW CREATE TABLE Product;
-query_vertical SHOW CREATE TABLE Customer;
-query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test';
-DROP TABLE Product_Order;
-DROP TABLE Product;
-DROP TABLE Customer;
-
+--source include/have_case_insensitive_file_system.inc +--source include/have_innodb.inc + +--echo # +--echo # Bug#46941 crash with lower_case_table_names=2 and +--echo # foreign data dictionary confusion +--echo # + +CREATE DATABASE XY; +USE XY; + +# +# Logs are disabled, since the number of creates tables +# and subsequent select statements may vary between +# versions +# +--disable_query_log +--disable_result_log + +let $tcs = `SELECT @@table_open_cache + 1`; + +let $i = $tcs; + +while ($i) +{ + eval CREATE TABLE XY.T_$i (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT, + primary key(a, b), unique(b)) ENGINE=InnoDB; + dec $i; +} + +eval ALTER TABLE XY.T_$tcs ADD INDEX I1 (c, b), + ADD CONSTRAINT C1 FOREIGN KEY (c, b) REFERENCES XY.T_1 (a, b); + +eval ALTER TABLE XY.T_$tcs ADD INDEX I2 (b), + ADD CONSTRAINT C2 FOREIGN KEY (b) REFERENCES XY.T_1(a); + +let $i = $tcs; +while ($i) +{ + eval SELECT * FROM XY.T_$i LIMIT 1; + dec $i; +} + +DROP DATABASE XY; +CREATE DATABASE XY; +USE XY; +eval CREATE TABLE XY.T_$tcs (a INT NOT NULL, b INT NOT NULL, c INT NOT NULL, d INT, + PRIMARY KEY(a, b), UNIQUE(b)) ENGINE=InnoDB; +# +# The bug causes this SELECT to err +eval SELECT * FROM XY.T_$tcs LIMIT 1; + +--enable_query_log +--enable_result_log +DROP DATABASE XY; +USE TEST; + +--echo # +--echo # Bug55222 Mysqldump table names case bug in REFERENCES clause +--echo # InnoDB did not handle lower_case_table_names=2 for +--echo # foreign_table_names and referenced_table_names. +--echo # + +SHOW VARIABLES LIKE 'lower_case_table_names'; + +--disable_warnings +DROP TABLE IF EXISTS `Table2`; +DROP TABLE IF EXISTS `Table1`; +--disable_warnings + +CREATE TABLE `Table1`(c1 INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE `Table2`(c1 INT PRIMARY KEY, c2 INT) ENGINE=InnoDB; +ALTER TABLE `Table2` ADD CONSTRAINT fk1 FOREIGN KEY(c2) REFERENCES `Table1`(c1); +query_vertical SHOW CREATE TABLE `Table2`; +query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test'; +DROP TABLE `Table2`; +DROP TABLE `Table1`; + +--disable_warnings +DROP TABLE IF EXISTS Product_Order; +DROP TABLE IF EXISTS Product; +DROP TABLE IF EXISTS Customer; +--enable_warnings + +CREATE TABLE Product (Category INT NOT NULL, Id INT NOT NULL, + Price DECIMAL, PRIMARY KEY(Category, Id)) ENGINE=InnoDB; +CREATE TABLE Customer (Id INT NOT NULL, PRIMARY KEY (Id)) ENGINE=InnoDB; +CREATE TABLE Product_Order (No INT NOT NULL AUTO_INCREMENT, + Product_Category INT NOT NULL, + Product_Id INT NOT NULL, + Customer_Id INT NOT NULL, + PRIMARY KEY(No), + INDEX (Product_Category, Product_Id), + FOREIGN KEY (Product_Category, Product_Id) + REFERENCES Product(Category, Id) ON UPDATE CASCADE ON DELETE RESTRICT, + INDEX (Customer_Id), + FOREIGN KEY (Customer_Id) + REFERENCES Customer(Id) + ) ENGINE=INNODB; + +query_vertical SHOW CREATE TABLE Product_Order; +query_vertical SHOW CREATE TABLE Product; +query_vertical SHOW CREATE TABLE Customer; +query_vertical SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS WHERE CONSTRAINT_SCHEMA='test'; +DROP TABLE Product_Order; +DROP TABLE Product; +DROP TABLE Customer; + |