summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorserg@serg.mylan <>2004-02-17 17:07:14 +0100
committerserg@serg.mylan <>2004-02-17 17:07:14 +0100
commit6af8a9305213299f0150848c1686aaf49934ace7 (patch)
tree6ebf0969524ee8c2567a33c286ae057b66a556ae /mysql-test
parent0c68e806097842e96439824977349f5ee4ec74fa (diff)
parentb8e161be4b6758ed89c46a639c08e1dc5debd9f0 (diff)
downloadmariadb-git-6af8a9305213299f0150848c1686aaf49934ace7.tar.gz
Merge bk-internal:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/ctype_utf8.result2
-rw-r--r--mysql-test/r/fulltext_var.result31
-rw-r--r--mysql-test/r/myisam.result4
-rw-r--r--mysql-test/r/type_blob.result12
-rw-r--r--mysql-test/t/ctype_utf8.test2
-rw-r--r--mysql-test/t/fulltext_var.test22
-rw-r--r--mysql-test/t/type_blob.test6
7 files changed, 71 insertions, 8 deletions
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index b7498ab2bc7..ad1f7785527 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -168,4 +168,4 @@ hex(s1)
41
drop table t1;
create table t1 (a char(160) character set utf8, primary key(a));
-ERROR HY000: Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the storage engine doesn't support unique sub keys
+ERROR 42000: Specified key was too long; max key length is 255 bytes
diff --git a/mysql-test/r/fulltext_var.result b/mysql-test/r/fulltext_var.result
index 89d477c1a7c..cdbbfc3f5ea 100644
--- a/mysql-test/r/fulltext_var.result
+++ b/mysql-test/r/fulltext_var.result
@@ -1,3 +1,4 @@
+drop table if exists t1;
show variables like "ft\_%";
Variable_name Value
ft_boolean_syntax + -><()~*:""&|
@@ -5,3 +6,33 @@ ft_min_word_len 4
ft_max_word_len 84
ft_query_expansion_limit 20
ft_stopword_file (built-in)
+create table t1 (b text not null);
+insert t1 values ('aaaaaa bbbbbb cccccc');
+insert t1 values ('bbbbbb cccccc');
+insert t1 values ('aaaaaa cccccc');
+select * from t1 where match b against ('+aaaaaa bbbbbb' in boolean mode);
+b
+aaaaaa bbbbbb cccccc
+aaaaaa cccccc
+set ft_boolean_syntax=' +-><()~*:""&|';
+ERROR HY000: Variable 'ft_boolean_syntax' is a GLOBAL variable and should be set with SET GLOBAL
+set global ft_boolean_syntax=' +-><()~*:""&|';
+select * from t1 where match b against ('+aaaaaa bbbbbb' in boolean mode);
+b
+aaaaaa bbbbbb cccccc
+bbbbbb cccccc
+set global ft_boolean_syntax='@ -><()~*:""&|';
+select * from t1 where match b against ('+aaaaaa bbbbbb' in boolean mode);
+b
+aaaaaa bbbbbb cccccc
+bbbbbb cccccc
+aaaaaa cccccc
+select * from t1 where match b against ('+aaaaaa @bbbbbb' in boolean mode);
+b
+aaaaaa bbbbbb cccccc
+bbbbbb cccccc
+set global ft_boolean_syntax='@ -><()~*:""@|';
+ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of '@ -><()~*:""@|'
+set global ft_boolean_syntax='+ -><()~*:""@!|';
+ERROR 42000: Variable 'ft_boolean_syntax' can't be set to the value of '+ -><()~*:""@!|'
+drop table t1;
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 278b9f41480..1f3e12a33aa 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -323,10 +323,10 @@ Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255), KEY t1 (a, b, c));
-ERROR 42000: Specified key was too long. Max key length is 500
+ERROR 42000: Specified key was too long; max key length is 500 bytes
CREATE TABLE t1 (a varchar(255), b varchar(255), c varchar(255));
ALTER TABLE t1 ADD INDEX t1 (a, b, c);
-ERROR 42000: Specified key was too long. Max key length is 500
+ERROR 42000: Specified key was too long; max key length is 500 bytes
DROP TABLE t1;
CREATE TABLE t1 (a int not null, b int, c int, key(b), key(c), key(a,b), key(c,a));
INSERT into t1 values (0, null, 0), (0, null, 1), (0, null, 2), (0, null,3), (1,1,4);
diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result
index 330464fe669..a895325d1fc 100644
--- a/mysql-test/r/type_blob.result
+++ b/mysql-test/r/type_blob.result
@@ -346,9 +346,17 @@ HELLO MY 1
a 1
hello 1
drop table t1;
+create table t1 (a text, unique (a(300)));
+ERROR 42000: Specified key was too long; max key length is 255 bytes
create table t1 (a text, key (a(300)));
-ERROR HY000: Incorrect sub part key. The used key part isn't a string, the used length is longer than the key part or the storage engine doesn't support unique sub keys
-create table t1 (a text, key (a(255)));
+Warnings:
+Warning 1071 Specified key was too long; max key length is 255 bytes
+show create table t1;
+Table Create Table
+t1 CREATE TABLE `t1` (
+ `a` text,
+ KEY `a` (`a`(255))
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE t1 (
t1_id bigint(21) NOT NULL auto_increment,
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index 49b1ed94757..6361f49fe55 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -103,5 +103,5 @@ drop table t1;
# Bug 2699
# UTF8 breaks primary keys for cols > 85 characters
#
---error 1089
+--error 1071
create table t1 (a char(160) character set utf8, primary key(a));
diff --git a/mysql-test/t/fulltext_var.test b/mysql-test/t/fulltext_var.test
index 71213d1195a..8cc8acf60a6 100644
--- a/mysql-test/t/fulltext_var.test
+++ b/mysql-test/t/fulltext_var.test
@@ -1,5 +1,27 @@
#
# Fulltext configurable parameters
#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
show variables like "ft\_%";
+
+create table t1 (b text not null);
+insert t1 values ('aaaaaa bbbbbb cccccc');
+insert t1 values ('bbbbbb cccccc');
+insert t1 values ('aaaaaa cccccc');
+select * from t1 where match b against ('+aaaaaa bbbbbb' in boolean mode);
+-- error 1229
+set ft_boolean_syntax=' +-><()~*:""&|';
+set global ft_boolean_syntax=' +-><()~*:""&|';
+select * from t1 where match b against ('+aaaaaa bbbbbb' in boolean mode);
+set global ft_boolean_syntax='@ -><()~*:""&|';
+select * from t1 where match b against ('+aaaaaa bbbbbb' in boolean mode);
+select * from t1 where match b against ('+aaaaaa @bbbbbb' in boolean mode);
+-- error 1231
+set global ft_boolean_syntax='@ -><()~*:""@|';
+-- error 1231
+set global ft_boolean_syntax='+ -><()~*:""@!|';
+drop table t1;
+
diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test
index c826e59b29d..97c38057e72 100644
--- a/mysql-test/t/type_blob.test
+++ b/mysql-test/t/type_blob.test
@@ -121,8 +121,10 @@ select c,count(*) from t1 group by c;
select d,count(*) from t1 group by d;
drop table t1;
-!$1089 create table t1 (a text, key (a(300))); # should give an error
-create table t1 (a text, key (a(255)));
+-- error 1071
+create table t1 (a text, unique (a(300))); # should give an error
+create table t1 (a text, key (a(300))); # key is auto-truncated
+show create table t1;
drop table t1;
#