summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <kent@mysql.com>2005-11-28 09:44:47 +0100
committerunknown <kent@mysql.com>2005-11-28 09:44:47 +0100
commitdc3e736bff2975e9c170acfdf39b717771cf1bd7 (patch)
treece3535e354d5dcf8ebc7d1b0f24bb3fb5dc2096c /mysql-test
parent384f3acc4a8c315cb1289e11a150ff13a44a2274 (diff)
parentb1dc9db137af4b99b1621f124962432659278765 (diff)
downloadmariadb-git-dc3e736bff2975e9c170acfdf39b717771cf1bd7.tar.gz
Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/Users/kent/mysql/bk/mysql-4.1
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/fulltext.result3
-rw-r--r--mysql-test/r/ndb_alter_table.result2
-rw-r--r--mysql-test/r/ps.result19
-rw-r--r--mysql-test/r/select.result8
-rw-r--r--mysql-test/t/fulltext.test1
-rw-r--r--mysql-test/t/ndb_alter_table.test2
-rw-r--r--mysql-test/t/ps.test29
-rw-r--r--mysql-test/t/select.test11
8 files changed, 73 insertions, 2 deletions
diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result
index 87551f96a13..ebd6880a10e 100644
--- a/mysql-test/r/fulltext.result
+++ b/mysql-test/r/fulltext.result
@@ -432,4 +432,7 @@ INSERT INTO t1 VALUES('testword\'\'');
SELECT a FROM t1 WHERE MATCH a AGAINST('testword' IN BOOLEAN MODE);
a
testword''
+SELECT a FROM t1 WHERE MATCH a AGAINST('testword\'\'' IN BOOLEAN MODE);
+a
+testword''
DROP TABLE t1;
diff --git a/mysql-test/r/ndb_alter_table.result b/mysql-test/r/ndb_alter_table.result
index 62e8455ae9f..b5fceba7cee 100644
--- a/mysql-test/r/ndb_alter_table.result
+++ b/mysql-test/r/ndb_alter_table.result
@@ -179,7 +179,7 @@ a b c
2 two two
alter table t1 drop index c;
select * from t1 where b = 'two';
-ERROR HY000: Table definition has changed, please retry transaction
+ERROR HY000: Can't lock file (errno: 241)
select * from t1 where b = 'two';
a b c
2 two two
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index f5bf3ffa96d..d46c2d5b3d5 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -699,3 +699,22 @@ execute stmt;
@@tx_isolation
REPEATABLE-READ
deallocate prepare stmt;
+prepare stmt from "create temporary table t1 (letter enum('','a','b','c')
+not null)";
+execute stmt;
+drop table t1;
+execute stmt;
+drop table t1;
+execute stmt;
+drop table t1;
+set names latin1;
+prepare stmt from "create table t1 (a enum('test') default 'test')
+ character set utf8";
+execute stmt;
+drop table t1;
+execute stmt;
+drop table t1;
+execute stmt;
+drop table t1;
+set names default;
+deallocate prepare stmt;
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 64c329ee104..b80ca2b195e 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -2706,3 +2706,11 @@ select distinct count(f2) >0 from t1 left join t2 on f1=f3 group by f1;
count(f2) >0
1
drop table t1,t2;
+create table t1 (f1 int,f2 int);
+insert into t1 values(1,1);
+create table t2 (f3 int, f4 int, primary key(f3,f4));
+insert into t2 values(1,1);
+select * from t1 where f1 in (select f3 from t2 where (f3,f4)= (select f3,f4 from t2));
+f1 f2
+1 1
+drop table t1,t2;
diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test
index 7c7927b638b..1399b9bfdff 100644
--- a/mysql-test/t/fulltext.test
+++ b/mysql-test/t/fulltext.test
@@ -354,6 +354,7 @@ SET myisam_repair_threads=@@global.myisam_repair_threads;
#
INSERT INTO t1 VALUES('testword\'\'');
SELECT a FROM t1 WHERE MATCH a AGAINST('testword' IN BOOLEAN MODE);
+SELECT a FROM t1 WHERE MATCH a AGAINST('testword\'\'' IN BOOLEAN MODE);
DROP TABLE t1;
# End of 4.1 tests
diff --git a/mysql-test/t/ndb_alter_table.test b/mysql-test/t/ndb_alter_table.test
index d89b81859e7..22383a82bca 100644
--- a/mysql-test/t/ndb_alter_table.test
+++ b/mysql-test/t/ndb_alter_table.test
@@ -149,7 +149,7 @@ connection server1;
alter table t1 drop index c;
connection server2;
# This should fail since index information is not automatically refreshed
---error 1105
+--error 1015
select * from t1 where b = 'two';
select * from t1 where b = 'two';
connection server1;
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test
index c4cb0056763..82dfc643801 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -718,4 +718,33 @@ set @@tx_isolation=default;
execute stmt;
deallocate prepare stmt;
+#
+# Bug#14410 "Crash in Enum or Set type in CREATE TABLE and PS/SP"
+#
+# Part I. Make sure the typelib for ENUM is created in the statement memory
+# root.
+prepare stmt from "create temporary table t1 (letter enum('','a','b','c')
+not null)";
+execute stmt;
+drop table t1;
+execute stmt;
+drop table t1;
+execute stmt;
+drop table t1;
+# Part II. Make sure that when the default value is converted to UTF-8,
+# the new item is # created in the statement memory root.
+set names latin1;
+prepare stmt from "create table t1 (a enum('test') default 'test')
+ character set utf8";
+execute stmt;
+drop table t1;
+execute stmt;
+drop table t1;
+execute stmt;
+drop table t1;
+# Cleanup
+set names default;
+deallocate prepare stmt;
+
# End of 4.1 tests
+
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 39c7cdfa8a9..996d5854854 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -2237,4 +2237,15 @@ insert into t1 values (1,1);
insert into t2 values (1,1),(1,2);
select distinct count(f2) >0 from t1 left join t2 on f1=f3 group by f1;
drop table t1,t2;
+
+#
+# Bug #14482 Server crash when subselecting from the same table
+#
+create table t1 (f1 int,f2 int);
+insert into t1 values(1,1);
+create table t2 (f3 int, f4 int, primary key(f3,f4));
+insert into t2 values(1,1);
+select * from t1 where f1 in (select f3 from t2 where (f3,f4)= (select f3,f4 from t2));
+drop table t1,t2;
+
# End of 4.1 tests