summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorram@gw.mysql.r18.ru <>2004-09-06 13:58:22 +0500
committerram@gw.mysql.r18.ru <>2004-09-06 13:58:22 +0500
commitab9843e2176948ab70e12c78a44b50e9571c7da6 (patch)
treed0012c214c05b4ab904c8622497977966de32100 /mysql-test
parentc9d97272ed3c9b9d74b098b7d1b004def258154e (diff)
parentad6ad34b45ed8414eec08885334d540eafafb0fc (diff)
downloadmariadb-git-ab9843e2176948ab70e12c78a44b50e9571c7da6.tar.gz
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into gw.mysql.r18.ru:/usr/home/ram/work/4.1.b5291
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/fulltext2.result9
-rw-r--r--mysql-test/r/merge.result9
-rw-r--r--mysql-test/r/ps.result11
-rw-r--r--mysql-test/r/union.result8
-rw-r--r--mysql-test/t/fulltext2.test8
-rw-r--r--mysql-test/t/merge.test14
-rw-r--r--mysql-test/t/ps.test17
-rw-r--r--mysql-test/t/union.test8
8 files changed, 84 insertions, 0 deletions
diff --git a/mysql-test/r/fulltext2.result b/mysql-test/r/fulltext2.result
index 0fdb7d4dbd1..0b1d8eb9a15 100644
--- a/mysql-test/r/fulltext2.result
+++ b/mysql-test/r/fulltext2.result
@@ -7,6 +7,15 @@ FULLTEXT KEY (a)
repair table t1 quick;
Table Op Msg_type Msg_text
test.t1 repair status OK
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
+optimize table t1;
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+check table t1;
+Table Op Msg_type Msg_text
+test.t1 check status OK
select count(*) from t1 where match a against ('aaaxxx');
count(*)
260
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result
index 83f8230f11c..5755033190b 100644
--- a/mysql-test/r/merge.result
+++ b/mysql-test/r/merge.result
@@ -642,3 +642,12 @@ x y
1 3
1 2
drop table t1,t2,t3;
+create table t1 (a int);
+create table t2 (a int);
+insert into t1 values (0);
+insert into t2 values (1);
+create table t3 engine=merge union=(t1, t2) select * from t1;
+ERROR HY000: You can't specify target table 't1' for update in FROM clause
+create table t3 engine=merge union=(t1, t2) select * from t2;
+ERROR HY000: You can't specify target table 't2' for update in FROM clause
+drop table t1, t2;
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index e161904cd6f..321b8894796 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -259,3 +259,14 @@ execute `ü`;
1234
1234
set names default;
+create table t1 (a varchar(10)) charset=utf8;
+insert into t1 (a) values ('yahoo');
+set character_set_connection=latin1;
+prepare stmt from 'select a from t1 where a like ?';
+set @var='google';
+execute stmt using @var;
+a
+execute stmt using @var;
+a
+deallocate prepare stmt;
+drop table t1;
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index afee837b1a5..2f42bedf67a 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -436,6 +436,14 @@ select length(version()) > 1 as `*` UNION select 2;
*
1
2
+create table t1 (a int);
+insert into t1 values (0), (3), (1), (2);
+explain (select * from t1) union (select * from t1) order by a;
+id select_type table type possible_keys key key_len ref rows Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 4
+2 UNION t1 ALL NULL NULL NULL NULL 4
+NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL Using filesort
+drop table t1;
CREATE TABLE t1 ( id int(3) unsigned default '0') ENGINE=MyISAM;
INSERT INTO t1 (id) VALUES("1");
CREATE TABLE t2 ( id int(3) unsigned default '0', id_master int(5) default '0', text1 varchar(5) default NULL, text2 varchar(5) default NULL) ENGINE=MyISAM;
diff --git a/mysql-test/t/fulltext2.test b/mysql-test/t/fulltext2.test
index cab1d096fe7..1d3a5307412 100644
--- a/mysql-test/t/fulltext2.test
+++ b/mysql-test/t/fulltext2.test
@@ -44,6 +44,9 @@ while ($1)
# converting to two-level
repair table t1 quick;
+check table t1;
+optimize table t1; # BUG#5327 - mi_sort_index() of 2-level tree
+check table t1;
select count(*) from t1 where match a against ('aaaxxx');
select count(*) from t1 where match a against ('aaayyy');
@@ -102,6 +105,11 @@ CREATE TABLE t1 (
FULLTEXT KEY (a)
) ENGINE=MyISAM;
+#
+# now same as about but w/o repair table
+# 2-level tree created by mi_write
+#
+
# two-level entry, second-level tree with depth 2
--disable_query_log
let $1=260;
diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test
index cf55c26fb69..9580c1ab44c 100644
--- a/mysql-test/t/merge.test
+++ b/mysql-test/t/merge.test
@@ -271,3 +271,17 @@ select * from t3 where x = 1 and y < 5 order by y;
# Bug is that followng query returns empty set while it must be same as above
select * from t3 where x = 1 and y < 5 order by y desc;
drop table t1,t2,t3;
+
+#
+# Bug#5232: CREATE TABLE ... SELECT
+#
+
+create table t1 (a int);
+create table t2 (a int);
+insert into t1 values (0);
+insert into t2 values (1);
+--error 1093
+create table t3 engine=merge union=(t1, t2) select * from t1;
+--error 1093
+create table t3 engine=merge union=(t1, t2) select * from t2;
+drop table t1, t2;
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test
index e54bf8076e0..cbc76e02b42 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -261,3 +261,20 @@ execute `ü`;
set names default;
+#
+# BUG#4368 "select * from t1 where a like ?" crashes server if a is in utf8
+# and ? is in latin1
+# Check that Item converting latin1 to utf8 (for LIKE function) is created
+# in memory of prepared statement.
+#
+
+create table t1 (a varchar(10)) charset=utf8;
+insert into t1 (a) values ('yahoo');
+set character_set_connection=latin1;
+prepare stmt from 'select a from t1 where a like ?';
+set @var='google';
+execute stmt using @var;
+execute stmt using @var;
+deallocate prepare stmt;
+drop table t1;
+
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index 206b40f8ce7..263f631a65f 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -265,6 +265,14 @@ drop table t1,t2;
select length(version()) > 1 as `*` UNION select 2;
#
+# Bug #4980: problem with explain
+#
+
+create table t1 (a int);
+insert into t1 values (0), (3), (1), (2);
+explain (select * from t1) union (select * from t1) order by a;
+drop table t1;
+#
# Test for another bug with UNION and LEFT JOIN
#
CREATE TABLE t1 ( id int(3) unsigned default '0') ENGINE=MyISAM;