summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-01-30 10:46:30 +0100
committerunknown <monty@mysql.com>2004-01-30 10:46:30 +0100
commitf120273dd284ff4df9649191e8cc37b2d84dd033 (patch)
tree2a068ced93fee028dc48d93be3aa5b24618ebef8 /mysql-test
parent163dffb4d0057c41b518860bf1063c665ccebb4d (diff)
downloadmariadb-git-f120273dd284ff4df9649191e8cc37b2d84dd033.tar.gz
Fixed parsing of column names and foreign key constraints in Innobase to handle quoted identifiers and identifiers with space. (Bug #1725)
Fix optimizer tuning bug when first used key part was a constant. (Bug #1679) innobase/dict/dict0dict.c: Fixed parsing of column names and foreign key constraints to handle quoted identifiers and identifiers with space. (Bug #1725) mysql-test/r/innodb.result: Test of innodb internal parsing mysql-test/t/innodb.test: Test of innodb internal parsing sql/sql_class.cc: Safety fix for select into outfile and select into dumpfile. Before calling send_error() could cause end_io_cache() to be called several times. sql/sql_class.h: Add path to dumpfile so that we can delete the generated file if something goes wrong. sql/sql_select.cc: Fix optimizer tuning bug when first used key part was a constant. Previously all keys that had this key part first was regarded as equal, even if the query used more key parts for some of the keys. Now we use the range optimizer results to just limit the number of estimated rows if not all key parts where constants. (Bug #1679)
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/innodb.result3
-rw-r--r--mysql-test/t/innodb.test9
2 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index ce5491a718f..ca4a49fea4e 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -1243,3 +1243,6 @@ a
3
4
drop table t1;
+CREATE TABLE t1 (`id 1` INT NOT NULL, PRIMARY KEY (`id 1`)) TYPE=INNODB;
+CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (`t1_id`) REFERENCES `t1`(`id 1`) ON DELETE CASCADE ) TYPE=INNODB;
+drop table t1,t2;
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 7cc509caf74..51fadccdc1c 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -869,3 +869,12 @@ truncate table t1;
insert into t1 (a) values (NULL),(NULL);
SELECT * from t1;
drop table t1;
+
+#
+# Test dictionary handling with spaceand quoting
+#
+
+CREATE TABLE t1 (`id 1` INT NOT NULL, PRIMARY KEY (`id 1`)) TYPE=INNODB;
+CREATE TABLE t2 (id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id), FOREIGN KEY (`t1_id`) REFERENCES `t1`(`id 1`) ON DELETE CASCADE ) TYPE=INNODB;
+#show create table t2;
+drop table t1,t2;