From 5454f676ff4cd8a2f6ec577e35746dd18b31478f Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 16 Dec 2003 17:55:34 -0400 Subject: fixed restoring of thd->count_cuted_fields in store_val_in_field (fixed #bug 2012) mysql-test/r/insert_select.result: added test case for bug #2012 mysql-test/t/insert_select.test: added test case for bug #2012 --- mysql-test/r/insert_select.result | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index c754085ccb3..2435e28d7fe 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -11,3 +11,15 @@ payoutID 19 20 22 +Month Type Field Count +2003-09-01 1 1 100 +2003-09-01 1 2 100 +2003-09-01 2 1 100 +2003-09-01 2 2 100 +2003-09-01 3 1 100 +NULL Field Count +NULL 1 100 +NULL 2 100 +No Field Count +0 1 100 +0 2 100 -- cgit v1.2.1 From d6be93aa27becf6864b15a699cf62c394620355e Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 17 Dec 2003 16:37:47 -0400 Subject: added error message for receiving variable with wrong GLOBAL|LOCAL type (bug #2086) include/mysqld_error.h: added error message for receiving variable with wrong GLOBAL|LOCAL type mysql-test/r/variables.result: added error message for receiving variable with wrong GLOBAL|LOCAL type mysql-test/t/variables.test: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/set_var.cc: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/czech/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/danish/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/dutch/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/english/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/estonian/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/french/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/german/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/greek/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/hungarian/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/italian/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/japanese/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/korean/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/norwegian-ny/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/norwegian/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/polish/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/portuguese/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/romanian/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/russian/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/slovak/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/spanish/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/swedish/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type sql/share/ukrainian/errmsg.txt: added error message for receiving variable with wrong GLOBAL|LOCAL type --- mysql-test/r/variables.result | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result index 8afdced206b..b4a607cb174 100644 --- a/mysql-test/r/variables.result +++ b/mysql-test/r/variables.result @@ -231,7 +231,7 @@ Wrong argument type to variable 'convert_character_set' set global autocommit=1; Variable 'autocommit' is a LOCAL variable and can't be used with SET GLOBAL select @@global.timestamp; -Variable 'timestamp' is a LOCAL variable and can't be used with SET GLOBAL +Variable 'timestamp' is a LOCAL variable set @@version=''; Unknown system variable 'version' set @@concurrent_insert=1; @@ -239,7 +239,7 @@ Variable 'concurrent_insert' is a GLOBAL variable and should be set with SET GLO set @@global.sql_auto_is_null=1; Variable 'sql_auto_is_null' is a LOCAL variable and can't be used with SET GLOBAL select @@global.sql_auto_is_null; -Variable 'sql_auto_is_null' is a LOCAL variable and can't be used with SET GLOBAL +Variable 'sql_auto_is_null' is a LOCAL variable set myisam_max_sort_file_size=100; Variable 'myisam_max_sort_file_size' is a GLOBAL variable and should be set with SET GLOBAL set myisam_max_extra_sort_file_size=100; @@ -375,3 +375,5 @@ Unknown system variable 'xxxxxxxxxx' select 1; 1 1 +select @@session.key_buffer_size; +Variable 'key_buffer_size' is a GLOBAL variable -- cgit v1.2.1 From 376fb08072e00c6be932b5c38ff6e23288e81e50 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 30 Dec 2003 13:14:21 +0200 Subject: Some small portability fixes. Added support for lower_case_table_names=2, which is to be used on case insensitive file systems. This tells MySQL to preserve the used case of filenames and database names to make it esier to move files between cases sensitive can case insensitive file systems (like Windows and Linux) client/mysqltest.c: Indentation cleanup include/myisam.h: Made some pointers 'const' mysql-test/mysql-test-run.sh: Portability fix for OSX sql/filesort.cc: Safety fix (not needed for current code but needed for 5.0) sql/ha_berkeley.cc: More debugging Changed 'create' to return error number sql/ha_berkeley.h: Added HA_FILE_BASED sql/ha_innodb.cc: Added missing DBUG_RETURN sql/ha_isam.cc: Changed create to return error number sql/ha_isam.h: Added HA_FILE_BASED sql/ha_isammrg.h: Added HA_FILE_BASED sql/ha_myisam.cc: Changed create to return error number sql/ha_myisam.h: Added HA_FILE_BASED sql/ha_myisammrg.cc: Changed create to return error number sql/ha_myisammrg.h: Added HA_FILE_BASED sql/handler.cc: Ensure that table engines gets table names in lower case even if we are using lower_case_table_names Removed test for DB_TYPE_INNODB by ensuring that create method returns error number. sql/handler.h: Added HA_FILE_BASED Made some struct entries 'const' Added 'alias' for create to be able to create tables in mixed case on case insensitive file systems sql/mysql_priv.h: Support for lower_case_table_names=2 sql/mysqld.cc: Support for lower_case_table_names=2 Moved test of case insenstive file system after all mutex are created sql/set_var.cc: Support for lower_case_table_names=2 sql/sql_class.h: Indentation change sql/sql_db.cc: Support for lower_case_table_names=2 sql/sql_insert.cc: Indentation change sql/sql_parse.cc: Support for lower_case_table_names=2 sql/sql_rename.cc: Support for lower_case_table_names=2 Added missing 'unpack_filename' to RENAME which may fix a bug in RENAME TABLE on windows sql/sql_show.cc: If lower_case_table_name=2 is given, show original case in SHOW CREATE TABLE sql/sql_table.cc: Support for lower_case_table_names=2 for DROP TABLE, RENAME TABLE, ALTER TABLE and CREATE TABLE --- mysql-test/r/lowercase2.require | 2 + mysql-test/r/lowercase_table2.result | 108 +++++++++++++++++++++++++++++++++++ 2 files changed, 110 insertions(+) create mode 100644 mysql-test/r/lowercase2.require create mode 100644 mysql-test/r/lowercase_table2.result (limited to 'mysql-test/r') diff --git a/mysql-test/r/lowercase2.require b/mysql-test/r/lowercase2.require new file mode 100644 index 00000000000..522eac63e81 --- /dev/null +++ b/mysql-test/r/lowercase2.require @@ -0,0 +1,2 @@ +Variable_name Value +lower_case_table_names 2 diff --git a/mysql-test/r/lowercase_table2.result b/mysql-test/r/lowercase_table2.result new file mode 100644 index 00000000000..e582978c126 --- /dev/null +++ b/mysql-test/r/lowercase_table2.result @@ -0,0 +1,108 @@ +DROP TABLE IF EXISTS t1,t2,T1,T2,t3,T3; +DROP DATABASE IF EXISTS `TEST_$1`; +DROP DATABASE IF EXISTS `test_$1`; +CREATE TABLE T1 (a int); +INSERT INTO T1 VALUES (1); +SHOW TABLES LIKE "T1"; +Tables_in_test (T1) +T1 +SHOW TABLES LIKE "t1"; +Tables_in_test (t1) +T1 +SHOW CREATE TABLE T1; +Table Create Table +T1 CREATE TABLE `T1` ( + `a` int(11) default NULL +) TYPE=MyISAM +RENAME TABLE T1 TO T2; +SHOW TABLES LIKE "T2"; +Tables_in_test (T2) +T2 +SELECT * FROM t2; +a +1 +RENAME TABLE T2 TO t3; +SHOW TABLES LIKE "T3"; +Tables_in_test (T3) +t3 +RENAME TABLE T3 TO T1; +SHOW TABLES LIKE "T1"; +Tables_in_test (T1) +T1 +ALTER TABLE T1 add b int; +SHOW TABLES LIKE "T1"; +Tables_in_test (T1) +t1 +ALTER TABLE T1 RENAME T2; +SHOW TABLES LIKE "T2"; +Tables_in_test (T2) +T2 +LOCK TABLE T2 WRITE; +ALTER TABLE T2 drop b; +SHOW TABLES LIKE "T2"; +Tables_in_test (T2) +t2 +UNLOCK TABLES; +RENAME TABLE T2 TO T1; +SHOW TABLES LIKE "T1"; +Tables_in_test (T1) +T1 +SELECT * from T1; +a +1 +DROP TABLE T1; +CREATE DATABASE `TEST_$1`; +SHOW DATABASES LIKE "TEST%"; +Database (TEST%) +TEST_$1 +DROP DATABASE `test_$1`; +CREATE TABLE T1 (a int) engine=innodb; +INSERT INTO T1 VALUES (1); +SHOW TABLES LIKE "T1"; +Tables_in_test (T1) +T1 +SHOW TABLES LIKE "t1"; +Tables_in_test (t1) +T1 +SHOW CREATE TABLE T1; +Table Create Table +T1 CREATE TABLE `T1` ( + `a` int(11) default NULL +) TYPE=InnoDB +RENAME TABLE T1 TO T2; +SHOW TABLES LIKE "T2"; +Tables_in_test (T2) +t2 +SELECT * FROM t2; +a +1 +RENAME TABLE T2 TO t3; +SHOW TABLES LIKE "T3"; +Tables_in_test (T3) +t3 +RENAME TABLE T3 TO T1; +SHOW TABLES LIKE "T1"; +Tables_in_test (T1) +t1 +ALTER TABLE T1 add b int; +SHOW TABLES LIKE "T1"; +Tables_in_test (T1) +t1 +ALTER TABLE T1 RENAME T2; +SHOW TABLES LIKE "T2"; +Tables_in_test (T2) +t2 +LOCK TABLE T2 WRITE; +ALTER TABLE T2 drop b; +SHOW TABLES LIKE "T2"; +Tables_in_test (T2) +t2 +UNLOCK TABLES; +RENAME TABLE T2 TO T1; +SHOW TABLES LIKE "T1"; +Tables_in_test (T1) +t1 +SELECT * from T1; +a +1 +DROP TABLE T1; -- cgit v1.2.1 From 824111e6c4583441719bd6fa431b6aedcab8fff6 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 30 Dec 2003 19:23:38 +0400 Subject: Fix for the bug #2231: string column, INDEX+LIKE, don't take the ESCAPE character. (acctually i don't like the fix, any suggestions?) --- mysql-test/r/func_like.result | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/func_like.result b/mysql-test/r/func_like.result index f923c16b2ac..0f94348a5f8 100644 --- a/mysql-test/r/func_like.result +++ b/mysql-test/r/func_like.result @@ -37,3 +37,9 @@ select * from t1 where a like "%abc\d%"; a abcd drop table t1; +create table t1 (a varchar(10), key(a)); +insert into t1 values ('a'), ('a\\b'); +select * from t1 where a like 'a\\%' escape '#'; +a +a\b +drop table t1; -- cgit v1.2.1 From aafca9f08dcf5252fc05eabf9be4f15fe4b65ac2 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 8 Jan 2004 12:24:36 +0400 Subject: An improvement of the fix for the bug #2231: string column, INDEX+LIKE, don't take the ESCAPE character. (ver. 2) --- mysql-test/r/func_like.result | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/func_like.result b/mysql-test/r/func_like.result index 0f94348a5f8..b196b50f53b 100644 --- a/mysql-test/r/func_like.result +++ b/mysql-test/r/func_like.result @@ -42,4 +42,7 @@ insert into t1 values ('a'), ('a\\b'); select * from t1 where a like 'a\\%' escape '#'; a a\b +select * from t1 where a like 'a\\%' escape '#' and a like 'a\\\\b'; +a +a\b drop table t1; -- cgit v1.2.1 From 9d8bf6980ab67940e91425d5bcb6968e630ac8a2 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 11 Jan 2004 14:12:46 +0400 Subject: A fix (bug #2335: Inconsistancy with handling of Years and NOW() function). The test might fail if one runs it at 23:59:59 Dec 31 mysql-test/r/type_year.result: a fix (bug #2335: Inconsistancy with handling of Years and NOW() function) mysql-test/t/type_year.test: a fix (bug #2335: Inconsistancy with handling of Years and NOW() function) sql/field.h: a fix (bug #2335: Inconsistancy with handling of Years and NOW() function) --- mysql-test/r/type_year.result | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/type_year.result b/mysql-test/r/type_year.result index 25ddda88f48..5ef3c1bba81 100644 --- a/mysql-test/r/type_year.result +++ b/mysql-test/r/type_year.result @@ -26,3 +26,9 @@ y y2 2001 01 2069 69 drop table t1; +create table t1 (y year); +insert into t1 values (now()); +select if(y = now(), 1, 0) from t1; +if(y = now(), 1, 0) +1 +drop table t1; -- cgit v1.2.1 From e2ab8558e899716d653d994af1a1e86c54e90bf9 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 12 Jan 2004 16:25:13 +0200 Subject: opt_sum.cc: A fix for a bug #3189, pertaining to crashing MySQL server when a query with MIN / MAX on the BLOB column is to be optimised sql/opt_sum.cc: A fix for a bug #3189, pertaining to crashing MySQL server when a query with MIN / MAX on the BLOB column is to be optimised --- mysql-test/r/type_blob.result | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result index 0bb9146fafc..685301f3639 100644 --- a/mysql-test/r/type_blob.result +++ b/mysql-test/r/type_blob.result @@ -601,3 +601,9 @@ id txt 2 Chevy 4 Ford drop table t1; +CREATE TABLE t1 ( i int(11) NOT NULL default '0', c text NOT NULL, PRIMARY KEY (i), KEY (c(1),c(1))); +INSERT t1 VALUES (1,''),(2,''),(3,'asdfh'),(4,''); +select max(i) from t1 where c = ''; +max(i) +4 +drop table t1; -- cgit v1.2.1 From e1d5f62041deaf97e139e660bc57a0de784f76e6 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 12 Jan 2004 22:47:26 -0400 Subject: Fixed Bug #2338 Trigonometric arithmetic problem by fixing optimizer bug with help of 'volatile' keyword mysql-test/r/func_math.result: added tests for BUG #2338 Trigonometric arithmetic problems mysql-test/t/func_math.test: added tests for BUG #2338 Trigonometric arithmetic problems sql/item_func.cc: added keyword volatile in Item_func_acos::val and Item_func_asin::val to calm optimizer down and to avoid it's bug --- mysql-test/r/func_math.result | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index e2723311682..5e774fe9886 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -20,3 +20,15 @@ PI() sin(pi()/2) cos(pi()/2) abs(tan(pi())) cot(1) asin(1) acos(0) atan(1) 3.141593 1.000000 0.000000 0.000000 0.64209262 1.570796 1.570796 0.785398 degrees(pi()) radians(360) 180 6.2831853071796 +ACOS(1.0) +0.000000 +ASIN(1.0) +1.570796 +ACOS(0.2*5.0) +0.000000 +ACOS(0.5*2.0) +0.000000 +ASIN(0.8+0.2) +1.570796 +ASIN(1.2-0.2) +1.570796 -- cgit v1.2.1 From febc79bb5d8a7cfe1f8e5eef50595f321786c467 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 13 Jan 2004 12:31:25 +0100 Subject: BUG#2304 - HANDLER and tables in non-current db --- mysql-test/r/handler.result | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/handler.result b/mysql-test/r/handler.result index 5467ea6dec2..1cfc3a9de8b 100644 --- a/mysql-test/r/handler.result +++ b/mysql-test/r/handler.result @@ -173,3 +173,21 @@ Unknown column 'W' in 'field list' handler t1 read a=(a); Wrong arguments to HANDLER ... READ drop table t1; +create table t1 (a char(5)); +insert into t1 values ("Ok"); +handler t1 open as t; +handler t read first; +a +Ok +use mysql; +handler t read first; +a +Ok +handler t close; +handler test.t1 open as t; +handler t read first; +a +Ok +handler t close; +use test; +drop table t1; -- cgit v1.2.1 From ae4b94598c08747fcb75480ebe7ab2681f38bde6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 15 Jan 2004 16:31:27 +0100 Subject: an obvious bug in _mi_key_cmp fixed (BUG#2295 - range on blobs) --- mysql-test/r/range.result | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index e87df9a6c24..45d20a8fced 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -300,3 +300,11 @@ SELECT COUNT(*) FROM t1 WHERE (c=0 and b=1) or (c=0 and a=1); COUNT(*) 6 DROP TABLE t1; +create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10))); +insert into t1 values('807780', '477', '165'); +insert into t1 values('807780', '477', '162'); +insert into t1 values('807780', '472', '162'); +select * from t1 where a='807780' and b='477' and c='165'; +a b c +807780 477 165 +drop table t1; -- cgit v1.2.1 From 130ae28ccac7c482861f85bc3009b52283364f2a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 15 Jan 2004 21:39:56 +0100 Subject: Fixed table crash bug when updating row > 16M (Bug #2159) myisam/mi_dynrec.c: Fixed table crash bug when updating row > 16M --- mysql-test/r/myisam-blob.result | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 mysql-test/r/myisam-blob.result (limited to 'mysql-test/r') diff --git a/mysql-test/r/myisam-blob.result b/mysql-test/r/myisam-blob.result new file mode 100644 index 00000000000..743d4dac254 --- /dev/null +++ b/mysql-test/r/myisam-blob.result @@ -0,0 +1,27 @@ +drop table if exists t1; +CREATE TABLE t1 (data LONGBLOB) ENGINE=myisam; +INSERT INTO t1 (data) VALUES (NULL); +UPDATE t1 set data=repeat('a',18*1024*1024); +select length(data) from t1; +length(data) +18874368 +delete from t1 where left(data,1)='a'; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +truncate table t1; +INSERT INTO t1 (data) VALUES (repeat('a',1*1024*1024)); +INSERT INTO t1 (data) VALUES (repeat('b',16*1024*1024-1024)); +delete from t1 where left(data,1)='b'; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +UPDATE t1 set data=repeat('c',17*1024*1024); +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +delete from t1 where left(data,1)='c'; +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK +drop table t1; -- cgit v1.2.1 From 24ca1e1edb1ddbd7609c88cf648447afb67f3098 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jan 2004 02:18:51 +0400 Subject: added test for bug #2290 "output truncated with ELT when using DISTINCT" sql/item_strfunc.cc: fixed bug #2290 "output truncated with ELT when using DISTINCT" --- mysql-test/r/func_str.result | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 35a5ba70e86..7d2668c8cf6 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -266,3 +266,10 @@ CONCAT("",RPAD("",(55 - LENGTH(title)),".")) NULL .......................... DROP TABLE t1; +CREATE TABLE t1 (i int, j int); +INSERT INTO t1 VALUES (1,1),(2,2); +SELECT DISTINCT i, ELT(j, '345', '34') FROM t1; +i ELT(j, '345', '34') +1 345 +2 34 +DROP TABLE t1; -- cgit v1.2.1 From 2c3fdcf749b57d4b168710606c84f42943a4ad24 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jan 2004 21:43:41 +0100 Subject: test case for MyISAM sort-repair bug --- mysql-test/r/myisam.result | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index e113a48f4da..11e8ef4fcd7 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -385,3 +385,9 @@ check table t1; Table Op Msg_type Msg_text test.t1 check status OK drop table t1; +create table t1 ( a text not null, key a (a(20))); +insert into t1 values ('aaa '),('aaa'); +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +drop table t1; -- cgit v1.2.1 From 0ef9acc9a9932ea63ff41d4528231632f3a3d31d Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jan 2004 23:29:17 +0100 Subject: two more bugfixes for "space stripping in MyISAM indexes" --- mysql-test/r/myisam.result | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 11e8ef4fcd7..fbb84a677cf 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -390,4 +390,8 @@ insert into t1 values ('aaa '),('aaa'); repair table t1; Table Op Msg_type Msg_text test.t1 repair status OK +select concat(a,'.') from t1 where a='aaa'; +concat(a,'.') +aaa. +aaa . drop table t1; -- cgit v1.2.1 From cdcf112af01e0365f5600b9de442f6640569a7a0 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Jan 2004 23:39:35 +0100 Subject: test moved to an appropriate file --- mysql-test/r/myisam.result | 8 ++++++++ mysql-test/r/range.result | 8 -------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index fbb84a677cf..68a667f6d95 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -395,3 +395,11 @@ concat(a,'.') aaa. aaa . drop table t1; +create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10))); +insert into t1 values('807780', '477', '165'); +insert into t1 values('807780', '477', '162'); +insert into t1 values('807780', '472', '162'); +select * from t1 where a='807780' and b='477' and c='165'; +a b c +807780 477 165 +drop table t1; diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index 45d20a8fced..e87df9a6c24 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -300,11 +300,3 @@ SELECT COUNT(*) FROM t1 WHERE (c=0 and b=1) or (c=0 and a=1); COUNT(*) 6 DROP TABLE t1; -create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10))); -insert into t1 values('807780', '477', '165'); -insert into t1 values('807780', '477', '162'); -insert into t1 values('807780', '472', '162'); -select * from t1 where a='807780' and b='477' and c='165'; -a b c -807780 477 165 -drop table t1; -- cgit v1.2.1 From 79f6e16d5e8b5edeb76d97b5d9886306e000ae87 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Jan 2004 18:05:47 +0400 Subject: a proper fix for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause. ramil, in MySQL/MyISAM we should only strip end space, not 'space-like' characters. This is according to SQL; When doing a comparision end space and only end space are ignored. myisam/mi_key.c: a proper fix for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause. myisam/mi_search.c: a proper fix for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause. mysql-test/r/select.result: test case for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause. mysql-test/t/select.test: test case for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause. sql/sql_string.cc: a proper fix for the bug #2298 Trailing whitespace inconsistently handled in WHERE clause. --- mysql-test/r/select.result | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result index 9cc5ad76ff0..206fa507615 100644 --- a/mysql-test/r/select.result +++ b/mysql-test/r/select.result @@ -2307,3 +2307,23 @@ left join t4 on id3 = id4 where id2 = 1 or id4 = 1; id1 id2 id3 id4 id44 1 1 NULL NULL NULL drop table t1,t2,t3,t4; +create table t1(s varchar(10) not null); +create table t2(s varchar(10) not null primary key); +create table t3(s varchar(10) not null primary key); +insert into t1 values ('one\t'), ('two\t'); +insert into t2 values ('one\r'), ('two\t'); +insert into t3 values ('one '), ('two\t'); +select * from t1 where s = 'one'; +s +select * from t2 where s = 'one'; +s +select * from t3 where s = 'one'; +s +one +select * from t1,t2 where t1.s = t2.s; +s s +two two +select * from t2,t3 where t2.s = t3.s; +s s +two two +drop table t1, t2, t3; -- cgit v1.2.1 From b9073593d0defc65472125b625e399e5ab22d1f6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Jan 2004 15:16:48 +0100 Subject: Mark that strings may change on index only reads (for BDB tables). This fixed problem with index reads on character fields with BDB tables. (Bug #2509) BitKeeper/etc/ignore: added man/*.1 mysql-test/r/bdb.result: New test mysql-test/r/myisam.result: More tests mysql-test/t/bdb.test: Test for idnex only read mysql-test/t/myisam.test: More test to verify pushed bug fix sql/ha_berkeley.h: Mark that strings may change on index only reads sql/item_strfunc.cc: Cleanup sql/table.cc: Allow index only reads on binary strings --- mysql-test/r/bdb.result | 25 +++++++++++++++++++++++++ mysql-test/r/myisam.result | 30 +++++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/bdb.result b/mysql-test/r/bdb.result index 05845df9dd3..2ccb5148d58 100644 --- a/mysql-test/r/bdb.result +++ b/mysql-test/r/bdb.result @@ -1165,3 +1165,28 @@ create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, pri insert into t2 select * from t1; delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b; drop table t1,t2; +create table t1 (a char(10), key(a), b int not null, key(b)) engine=bdb; +insert into t1 values ('a',1),('A',2); +explain select a from t1; +table type possible_keys key key_len ref rows Extra +t1 ALL NULL NULL NULL NULL 2 +select a from t1; +a +a +A +explain select b from t1; +table type possible_keys key key_len ref rows Extra +t1 index NULL b 4 NULL 2 Using index +select b from t1; +b +1 +2 +alter table t1 modify a char(10) binary; +explain select a from t1; +table type possible_keys key key_len ref rows Extra +t1 index NULL a 11 NULL 2 Using index +select a from t1; +a +A +a +drop table t1; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index 68a667f6d95..cc541388a5c 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -386,7 +386,10 @@ Table Op Msg_type Msg_text test.t1 check status OK drop table t1; create table t1 ( a text not null, key a (a(20))); -insert into t1 values ('aaa '),('aaa'); +insert into t1 values ('aaa '),('aaa'),('aa'); +check table t1; +Table Op Msg_type Msg_text +test.t1 check status OK repair table t1; Table Op Msg_type Msg_text test.t1 repair status OK @@ -394,6 +397,15 @@ select concat(a,'.') from t1 where a='aaa'; concat(a,'.') aaa. aaa . +select concat(a,'.') from t1 where binary a='aaa'; +concat(a,'.') +aaa. +update t1 set a='bbb' where a='aaa'; +select concat(a,'.') from t1; +concat(a,'.') +bbb. +bbb. +aa. drop table t1; create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10))); insert into t1 values('807780', '477', '165'); @@ -403,3 +415,19 @@ select * from t1 where a='807780' and b='477' and c='165'; a b c 807780 477 165 drop table t1; +create table t1 (a int not null auto_increment primary key, b text not null, unique b (b(20))); +insert into t1 (b) values ('a'),('a '),('a '); +select concat(b,'.') from t1; +concat(b,'.') +a. +a . +a . +update t1 set b='b ' where a=2; +update t1 set b='b ' where a > 1; +Duplicate entry 'b ' for key 2 +delete from t1 where b='b'; +select a,concat(b,'.') from t1; +a concat(b,'.') +1 a. +3 a . +drop table t1; -- cgit v1.2.1 From 8746a25554d18f03fc32ca5d338850f9308bee88 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Jan 2004 19:22:29 +0100 Subject: Fix for BUG#2527 "Multi-Table Delete - Not Replication use replicate-wild-do-table" (as long as replicate-*-table rules were defined, multi-table DELETE was never replicated by the slave). sql/sql_parse.cc: For a multi-table DELETE, there are two lists of tables: - 'tables' contains the tables in the FROM. They have 'updating==0'. - 'thd->lex.auxilliary_table_list.first' contains the tables between the DELETE and the FROM. They have 'updating==1'. So the bug was that the slave only tests 'tables' and as all its elements have updating==0, tables_ok() always returns 0. So for a multi DELETE the slave now tests the 2nd list too. I started with the other tip of the sausage: I thought of changing multi DELETE to use only one list (given that 'updating' can be used to separate it in two when needed) (with one list we wouldn't need to change the slave code), but finally hit the unicity check in add_table_to_list() which started to return ER_NONUNIQ_TABLE (logical). --- mysql-test/r/rpl_multi_delete.result | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 mysql-test/r/rpl_multi_delete.result (limited to 'mysql-test/r') diff --git a/mysql-test/r/rpl_multi_delete.result b/mysql-test/r/rpl_multi_delete.result new file mode 100644 index 00000000000..fa254d76393 --- /dev/null +++ b/mysql-test/r/rpl_multi_delete.result @@ -0,0 +1,22 @@ +slave stop; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +reset master; +reset slave; +drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; +slave start; +create table t1 (a int); +create table t2 (a int); +insert into t1 values (1); +insert into t2 values (1); +delete t1.* from t1, t2 where t1.a = t2.a; +select * from t1; +a +select * from t2; +a +1 +select * from t1; +a +select * from t2; +a +1 +drop table t1,t2; -- cgit v1.2.1 From bbd2adf4ba6ec2086a5e8eeaa89f56f1abee02f6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Jan 2004 00:05:34 +0100 Subject: Fix for BUG#2477 "Slave stop with error after master reboot if use HEAP tables": when we open the HEAP table for the first time since server restart, in hp_open(), we set a flag to propagate this info to the handler level which then writes a DELETE FROM this_heap_table to the binlog. It is not a perfect solution for the bug, because between the server start and the first open of the table, the slave still had old data in his table so a SELECT on the slave may show wrong content. But if there is a --init-file to populate the HEAP table on master as startup, then this is a safe fix (I'll put a note about init-file in the HEAP section of the manual). heap/hp_info.c: new info variable implicit_emptied heap/hp_open.c: If this is the first open of the HEAP table, it means it is empty, so we mark it. include/heap.h: new variables implicit_emptied (we need one in HEAPINFO for the hp_info() call). sql/ha_heap.cc: report info to upper level sql/handler.h: new info 'implicit_emptied' in the handler level; only HEAP uses it. sql/sql_base.cc: When a HEAP table is opened for the first time, write a DELETE FROM to the binlog, for replication and mysqlbinlog|mysql. Monty: I added the entry->file->implicit_emptied= 0; --- mysql-test/r/rpl_heap.result | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 mysql-test/r/rpl_heap.result (limited to 'mysql-test/r') diff --git a/mysql-test/r/rpl_heap.result b/mysql-test/r/rpl_heap.result new file mode 100644 index 00000000000..1556bcd5f25 --- /dev/null +++ b/mysql-test/r/rpl_heap.result @@ -0,0 +1,29 @@ +reset master; +drop table if exists t1; +create table t1 (a int) type=HEAP; +insert into t1 values(10); +show binlog events from 79; +Log_name Pos Event_type Server_id Orig_log_pos Info +master-bin.001 79 Query 1 79 use `test`; create table t1 (a int) type=HEAP +master-bin.001 147 Query 1 147 use `test`; DELETE FROM `test`.`t1` +master-bin.001 205 Query 1 205 use `test`; insert into t1 values(10) +reset slave; +start slave; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) default NULL +) TYPE=HEAP +select * from t1; +a +10 +select * from t1; +a +select * from t1 limit 10; +a +show binlog events in 'master-bin.002' from 79; +Log_name Pos Event_type Server_id Orig_log_pos Info +master-bin.002 79 Query 1 79 use `test`; DELETE FROM `test`.`t1` +select * from t1; +a +drop table t1; -- cgit v1.2.1 From f120273dd284ff4df9649191e8cc37b2d84dd033 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Jan 2004 10:46:30 +0100 Subject: 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) --- mysql-test/r/innodb.result | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mysql-test/r') 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; -- cgit v1.2.1 From a96ffb29258a80f8dfaa11f336d0edaa23ad6cf6 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Jan 2004 15:13:19 +0300 Subject: Fix for bugs #1885, #2464, #2539. Proper handling of default values for TIMESTAMP columns. The solution is not perfect since we just silently ignoring default value for first TIMESTAMP column and properly reflecting this fact in SHOW CREATE TABLE. We can't give a warning or simply support standard syntax (niladic functions as legal value for default) for first field since it is 4.0 tree. mysql-test/r/type_timestamp.result: Added test for bugs #1885, #2464, #2539 (proper support of default values for TIMESTAMP columns) mysql-test/t/type_timestamp.test: Added test for bugs #1885, #2464, #2539 (proper support of default values for TIMESTAMP columns) sql/field.cc: Enabled copying of defaults for TIMESTAMP fields when we are creating table with CREATE TABLE x (SELECT ...) sql/field.h: Set proper DEFAULT value for non-first TIMESTAMP column. sql/sql_parse.cc: Allowed default values for TIMESTAMP column. sql/sql_show.cc: Enabled printing of default values in SHOW CREATE TABLE and SHOW COLUMNS for all TIMESTAMP columns except first one. --- mysql-test/r/type_timestamp.result | 47 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 45 insertions(+), 2 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index b513f958787..cd45bcf911d 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -122,5 +122,48 @@ t2 t4 t6 t8 t10 t12 t14 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 0000-00-00 00:00:00 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 1997-12-31 23:47:59 drop table t1; -create table t1 (a timestamp default 1); -Invalid default value for 'a' +create table t1 (t1 timestamp default '2003-01-01 00:00:00', +t2 timestamp default '2003-01-01 00:00:00'); +set TIMESTAMP=1000000000; +insert into t1 values(); +select * from t1; +t1 t2 +2001-09-09 04:46:40 2003-01-01 00:00:00 +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `t1` timestamp(14) NOT NULL, + `t2` timestamp(14) NOT NULL default '2003-01-01 00:00:00' +) TYPE=MyISAM +show columns from t1; +Field Type Null Key Default Extra +t1 timestamp(14) YES NULL +t2 timestamp(14) YES 2003-01-01 00:00:00 +show columns from t1 like 't2'; +Field Type Null Key Default Extra +t2 timestamp(14) YES 2003-01-01 00:00:00 +create table t2 (select * from t1); +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `t1` timestamp(14) NOT NULL, + `t2` timestamp(14) NOT NULL default '2003-01-01 00:00:00' +) TYPE=MyISAM +alter table t1 add column t0 timestamp first; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `t0` timestamp(14) NOT NULL, + `t1` timestamp(14) NOT NULL default '2003-01-01 00:00:00', + `t2` timestamp(14) NOT NULL default '2003-01-01 00:00:00' +) TYPE=MyISAM +drop table t1,t2; +create table t1 (ts1 timestamp, ts2 timestamp); +set TIMESTAMP=1000000000; +insert into t1 values (); +insert into t1 values (DEFAULT, DEFAULT); +select * from t1; +ts1 ts2 +2001-09-09 04:46:40 0000-00-00 00:00:00 +2001-09-09 04:46:40 0000-00-00 00:00:00 +drop table t1; -- cgit v1.2.1 From ef55f2dcdbc79c78aa37e6646ac2aef62c23e7d3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Jan 2004 19:15:11 +0300 Subject: Fix for bug #2523 '"func_time" test fails on QNX'. Moved all range checks for TIMESTAMP value to my_gmt_sec(). Also fixed check of upper boundary of TIMESTAMP range (which also now will catch datetime values which are too small for TIMESTAMP in case if time_t is unsigned). mysql-test/r/timezone.result: Added test which checks if TIMESTAMP range is checked correctly (current time zone is honoured and both upper and lower bounds of TIMESTAMP range are checked). mysql-test/t/timezone.test: Added test which checks if TIMESTAMP range is checked correctly (current time zone is honoured and both upper and lower bounds of TIMESTAMP range are checked). sql/field.cc: Check if datetime value is in TIMESTAMP range has moved to my_gmt_sec() function. sql/mysql_priv.h: Added more constants for checking if datetime is in allowed range for TIMESTAMP. sql/time.cc: Check if datetime value is in TIMESTAMP range has moved to my_gmt_sec() function. Fixed check of its return value to catch overflows in both directions and also overflows in case of unsigned time_t. --- mysql-test/r/timezone.result | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/timezone.result b/mysql-test/r/timezone.result index 20706408075..15f0d4121c7 100644 --- a/mysql-test/r/timezone.result +++ b/mysql-test/r/timezone.result @@ -32,3 +32,9 @@ ts from_unixtime(ts) 1048989599 2003-03-30 03:59:59 1048989601 2003-03-30 04:00:01 DROP TABLE t1; +select unix_timestamp('1970-01-01 01:00:00'), +unix_timestamp('1970-01-01 01:00:01'), +unix_timestamp('2038-01-01 00:59:59'), +unix_timestamp('2038-01-01 01:00:00'); +unix_timestamp('1970-01-01 01:00:00') unix_timestamp('1970-01-01 01:00:01') unix_timestamp('2038-01-01 00:59:59') unix_timestamp('2038-01-01 01:00:00') +0 1 2145916799 0 -- cgit v1.2.1 From 2b9e17449932eed3458e098b23d8686538e21fa3 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Feb 2004 01:30:59 +0200 Subject: innodb.result, innodb.test: Change tests so that tables are dropped in an order respecting the FOREIGN KEY constraints mysql-test/t/innodb.test: Change tests so that tables are dropped in an order respecting the FOREIGN KEY constraints mysql-test/r/innodb.result: Change tests so that tables are dropped in an order respecting the FOREIGN KEY constraints --- mysql-test/r/innodb.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index ca4a49fea4e..416c583a8d7 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1004,7 +1004,7 @@ select * from t1; id select * from t2; id t1_id -drop table t1,t2; +drop table t2,t1; DROP TABLE IF EXISTS t1,t2; CREATE TABLE t1(id INT NOT NULL, PRIMARY KEY (id)) TYPE=INNODB; CREATE TABLE t2(id INT PRIMARY KEY, t1_id INT, INDEX par_ind (t1_id) ) TYPE=INNODB; @@ -1245,4 +1245,4 @@ a 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; +drop table t2,t1; -- cgit v1.2.1 From 0ba7ef007eb04fbe8e508878d02fb4a987f05250 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Feb 2004 01:41:35 +0200 Subject: rpl_insert_id.test, rpl_insert_id.result: Change tests so that tables are dropped in an order respecting the FOREIGN KEY constraints mysql-test/r/rpl_insert_id.result: Change tests so that tables are dropped in an order respecting the FOREIGN KEY constraints mysql-test/t/rpl_insert_id.test: Change tests so that tables are dropped in an order respecting the FOREIGN KEY constraints --- mysql-test/r/rpl_insert_id.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/rpl_insert_id.result b/mysql-test/r/rpl_insert_id.result index 889e7891770..d2dfbb05675 100644 --- a/mysql-test/r/rpl_insert_id.result +++ b/mysql-test/r/rpl_insert_id.result @@ -39,8 +39,8 @@ select * from t2; b c 5 0 6 11 -drop table t1; drop table t2; +drop table t1; create table t1(a int auto_increment, key(a)); create table t2(b int auto_increment, c int, key(b)); insert into t1 values (10); -- cgit v1.2.1 From 883f11b68c402b106dbff2542435782a8af3b55d Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Feb 2004 15:57:57 +0100 Subject: test added --- mysql-test/r/bigint.result | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index 308adc881f2..f96da579bce 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -81,3 +81,6 @@ quantity 10000000000000000000 10000000000000000000 drop table t1; +SELECT '0x8000000000000001'+0; +'0x8000000000000001'+0 +0 -- cgit v1.2.1 From 619eaee654d213c68f86981bf33dcccf15b52f02 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Feb 2004 09:46:48 +0100 Subject: Give error if locked table is used twice in query. This fixes strange error message when doing LOCK TABLES t1 WRITE; INSERT TABLE t1 SELECT * from t1 (Bug #2296) client/mysqldump.c: Better help for flush-logs mysql-test/r/lock.result: Test for LOCK TABLES ; INSERT ... SELECT mysql-test/t/lock.test: Test for LOCK TABLES ; INSERT ... SELECT --- mysql-test/r/lock.result | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result index ad5251b9110..31a18fe6cec 100644 --- a/mysql-test/r/lock.result +++ b/mysql-test/r/lock.result @@ -41,5 +41,9 @@ lock tables t1 write; check table t2; Table Op Msg_type Msg_text test.t2 check error Table 't2' was not locked with LOCK TABLES +insert into t1 select nr from t1; +Table 't1' was not locked with LOCK TABLES unlock tables; +lock tables t1 write, t1 as t1_alias read; +insert into t1 select index1,nr from t1 as t1_alias; drop table t1,t2; -- cgit v1.2.1 From 92bcbf9a43e2d74ee323f5e768923bfc289e83ce Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Feb 2004 14:03:01 +0400 Subject: Thai tis620 crash problem in text comparison routines was fixed. --- mysql-test/r/ctype_tis620.result | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 mysql-test/r/ctype_tis620.result (limited to 'mysql-test/r') diff --git a/mysql-test/r/ctype_tis620.result b/mysql-test/r/ctype_tis620.result new file mode 100644 index 00000000000..d939fd12e60 --- /dev/null +++ b/mysql-test/r/ctype_tis620.result @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS t620; +CREATE TABLE t620 ( +recid int(11) NOT NULL auto_increment, +dyninfo text, +PRIMARY KEY (recid) +) TYPE=MyISAM; +INSERT INTO t620 VALUES (1,'color=\"STB,NPG\"\r\nengine=\"J30A13\"\r\nframe=\"MRHCG1640YP4\"\r\ngrade=\"V6\"\r\nmodel=\"ACCORD\"\r\nmodelcode=\"CG164YEN\"\r\ntype=\"VT6\"\r\n'); +INSERT INTO t620 VALUES (2,'color=\"HTM,NPG,DEG,RGS\"\r\nengine=\"F23A5YP1\"\r\nframe=\"MRHCF8640YP3\"\r\ngrade=\"EXi AT\"\r\nmodel=\"ACCORD\"\r\nmodelcode=\"CF864YE\"\r\ntype=\"EXA\"\r\n'); +SELECT DISTINCT +(IF( LOCATE( 'year=\"', dyninfo ) = 1, +SUBSTRING( dyninfo, 6+1, LOCATE('\"\r',dyninfo) - 6 -1), +IF( LOCATE( '\nyear=\"', dyninfo ), +SUBSTRING( dyninfo, LOCATE( '\nyear=\"', dyninfo ) + 7, +LOCATE( '\"\r', SUBSTRING( dyninfo, LOCATE( '\nyear=\"', dyninfo ) +7 )) - 1), '' ))) AS year +FROM t620 +HAVING year != '' ORDER BY year; +year -- cgit v1.2.1 From 4b44b849ba7ba7e8c5e7de5de40726888f21f847 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Feb 2004 09:51:13 +0100 Subject: Fixed problem with range optimization over overlapping ranges (#2448) mysql-test/r/ctype_tis620.result: Cleanup test mysql-test/r/range.result: Test problem with range optimization over overlapping ranges (#2448) mysql-test/t/ctype_tis620.test: Cleanup test mysql-test/t/range.test: Test problem with range optimization over overlapping ranges (#2448) sql/mysqld.cc: Remove debug statement strings/ctype-tis620.c: est problem with range optimization over overlapping ranges (#2448) --- mysql-test/r/ctype_tis620.result | 13 +++++++------ mysql-test/r/range.result | 13 +++++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/ctype_tis620.result b/mysql-test/r/ctype_tis620.result index d939fd12e60..811609d4ba9 100644 --- a/mysql-test/r/ctype_tis620.result +++ b/mysql-test/r/ctype_tis620.result @@ -1,17 +1,18 @@ -DROP TABLE IF EXISTS t620; -CREATE TABLE t620 ( +drop table if exists t1; +CREATE TABLE t1 ( recid int(11) NOT NULL auto_increment, dyninfo text, PRIMARY KEY (recid) -) TYPE=MyISAM; -INSERT INTO t620 VALUES (1,'color=\"STB,NPG\"\r\nengine=\"J30A13\"\r\nframe=\"MRHCG1640YP4\"\r\ngrade=\"V6\"\r\nmodel=\"ACCORD\"\r\nmodelcode=\"CG164YEN\"\r\ntype=\"VT6\"\r\n'); -INSERT INTO t620 VALUES (2,'color=\"HTM,NPG,DEG,RGS\"\r\nengine=\"F23A5YP1\"\r\nframe=\"MRHCF8640YP3\"\r\ngrade=\"EXi AT\"\r\nmodel=\"ACCORD\"\r\nmodelcode=\"CF864YE\"\r\ntype=\"EXA\"\r\n'); +) ENGINE=MyISAM; +INSERT INTO t1 VALUES (1,'color=\"STB,NPG\"\r\nengine=\"J30A13\"\r\nframe=\"MRHCG1640YP4\"\r\ngrade=\"V6\"\r\nmodel=\"ACCORD\"\r\nmodelcode=\"CG164YEN\"\r\ntype=\"VT6\"\r\n'); +INSERT INTO t1 VALUES (2,'color=\"HTM,NPG,DEG,RGS\"\r\nengine=\"F23A5YP1\"\r\nframe=\"MRHCF8640YP3\"\r\ngrade=\"EXi AT\"\r\nmodel=\"ACCORD\"\r\nmodelcode=\"CF864YE\"\r\ntype=\"EXA\"\r\n'); SELECT DISTINCT (IF( LOCATE( 'year=\"', dyninfo ) = 1, SUBSTRING( dyninfo, 6+1, LOCATE('\"\r',dyninfo) - 6 -1), IF( LOCATE( '\nyear=\"', dyninfo ), SUBSTRING( dyninfo, LOCATE( '\nyear=\"', dyninfo ) + 7, LOCATE( '\"\r', SUBSTRING( dyninfo, LOCATE( '\nyear=\"', dyninfo ) +7 )) - 1), '' ))) AS year -FROM t620 +FROM t1 HAVING year != '' ORDER BY year; year +DROP TABLE t1; diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result index e87df9a6c24..ccfdbd62a42 100644 --- a/mysql-test/r/range.result +++ b/mysql-test/r/range.result @@ -300,3 +300,16 @@ SELECT COUNT(*) FROM t1 WHERE (c=0 and b=1) or (c=0 and a=1); COUNT(*) 6 DROP TABLE t1; +CREATE TABLE t1 ( a int not null, b int not null, INDEX ab(a,b) ); +INSERT INTO t1 VALUES (47,1), (70,1), (15,1), (15, 4); +SELECT * FROM t1 +WHERE +( +( b =1 AND a BETWEEN 14 AND 21 ) OR +( b =2 AND a BETWEEN 16 AND 18 ) OR +( b =3 AND a BETWEEN 15 AND 19 ) OR +(a BETWEEN 19 AND 47) +); +a b +15 1 +47 1 -- cgit v1.2.1 From 180fa5c2047e9162fd82993488257bb138f9d692 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Feb 2004 09:59:18 +0100 Subject: disabled atof() test as non-portable --- mysql-test/r/bigint.result | 3 --- 1 file changed, 3 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result index f96da579bce..308adc881f2 100644 --- a/mysql-test/r/bigint.result +++ b/mysql-test/r/bigint.result @@ -81,6 +81,3 @@ quantity 10000000000000000000 10000000000000000000 drop table t1; -SELECT '0x8000000000000001'+0; -'0x8000000000000001'+0 -0 -- cgit v1.2.1 From c8ff8ec18d96e0482b16a7b40182cfc34fea59db Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Feb 2004 17:42:18 +0100 Subject: beautify SHOW INDEX --- mysql-test/r/fulltext.result | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result index e8ae9d3063f..651baad266e 100644 --- a/mysql-test/r/fulltext.result +++ b/mysql-test/r/fulltext.result @@ -5,6 +5,10 @@ INSERT INTO t1 VALUES('MySQL has now support', 'for full-text search'), ('Only MyISAM tables','support collections'), ('Function MATCH ... AGAINST()','is used to do a search'), ('Full-text search in MySQL', 'implements vector space model'); +SHOW INDEX FROM t1; +Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment +t1 1 a 1 a A NULL NULL NULL YES FULLTEXT +t1 1 a 2 b A NULL NULL NULL YES FULLTEXT select * from t1 where MATCH(a,b) AGAINST ("collections"); a b Only MyISAM tables support collections @@ -183,7 +187,7 @@ id show keys from t2; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t2 1 tig 1 ticket A NULL NULL NULL YES BTREE -t2 1 tix 1 inhalt A NULL 1 NULL YES FULLTEXT +t2 1 tix 1 inhalt A NULL NULL NULL YES FULLTEXT show create table t2; Table Create Table t2 CREATE TABLE `t2` ( -- cgit v1.2.1 From d295f07c4281a45fc45aff95a151aeee117b2d8a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Feb 2004 09:12:23 +0100 Subject: Added testing of pthread_key_delete (to fix compile problem on SCO) (Bug #2461) DROP DATABASE now assumes RAID directories are in hex. (Bug #2627) Don't increment 'select_full_range' and similar statistics for EXPLAIN queries. (Bug #2506) Test in configure if pthread_key_delete() exists (to fix compile problem on SCO) (Bug #2461) BUILD/compile-pentium-max: Added --with-raid configure.in: Added testing of pthread_key_delete (to fix compile problem on SCO) (Bug #2461) include/my_pthread.h: Added testing of pthread_key_delete (to fix compile problem on SCO) (Bug #2461) innobase/include/data0data.ic: Added missing newline mysql-test/r/raid.result: Test of DROP DATABASE with RAID directories in hex mysql-test/t/raid.test: Test of DROP DATABASE with RAID directories in hex sql/sql_db.cc: DROP DATABASE could not drop databases with RAID tables that had more than 9 RAID_CHUNKS because DROP DATABASE assumed raid tables where in decimal while the RAID CREATE code assumed directories was in hex.(Bug #2627) sql/sql_select.cc: Don't increment 'select_full_range' and similar statistics for EXPLAIN queries. (Bug #2506) sql/sql_udf.cc: mysqld crashed if mysql.func table didn't exists (Bug #2577) --- mysql-test/r/raid.result | 1 + 1 file changed, 1 insertion(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/raid.result b/mysql-test/r/raid.result index fd47a9451f6..3d27a599cf3 100644 --- a/mysql-test/r/raid.result +++ b/mysql-test/r/raid.result @@ -1,5 +1,6 @@ create database test_raid; create table test_raid.r1 (i int) raid_type=1; +create table test_raid.r2 (i int) raid_type=1 raid_chunks=32; drop database test_raid; DROP TABLE IF EXISTS t1,t2; CREATE TABLE t1 ( -- cgit v1.2.1 From b5819094a70fa1c4f9c231424af6792da0b7b801 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Feb 2004 14:28:57 +0300 Subject: Fix for bug #2628 "ALTER TABLE destroys table and reports success" BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted mysql-test/r/alter_table.result: Fix for bug #2628: test result fixed mysql-test/t/alter_table.test: Fix for bug #2628: test case added sql/sql_table.cc: Fix for bug #2628: We need to take into account database name when checking if source and destination table names are equal. Note, that after merge to 4.0 we also need to check for lower_case_table_names. --- mysql-test/r/alter_table.result | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index dbdbb7f57a9..8b104225b9c 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -32,3 +32,11 @@ i 2 3 4 +name +current +name +mysqltest +name +current +name +mysqltest -- cgit v1.2.1 From 854076da62146f6cb4861e5c5f49fe245d3efe08 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Feb 2004 16:40:44 +0300 Subject: 3.23 -> 4.0 merge: after merge fixes --- mysql-test/r/alter_table.result | 13 +++++++++++++ mysql-test/r/func_math.result | 6 ++++++ mysql-test/r/insert_select.result | 19 +++++++++++++++++++ 3 files changed, 38 insertions(+) (limited to 'mysql-test/r') diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result index b32e100df55..037d3420f76 100644 --- a/mysql-test/r/alter_table.result +++ b/mysql-test/r/alter_table.result @@ -350,11 +350,24 @@ t1 0 PRIMARY 1 Host A NULL NULL NULL BTREE t1 0 PRIMARY 2 User A 0 NULL NULL BTREE t1 1 Host 1 Host A NULL NULL NULL BTREE disabled DROP TABLE t1; +create table t1 (name char(15)); +insert into t1 (name) values ("current"); +create database mysqltest; +create table mysqltest.t1 (name char(15)); +insert into mysqltest.t1 (name) values ("mysqltest"); +select * from t1; name current +select * from mysqltest.t1; name mysqltest +alter table t1 rename mysqltest.t1; +Table 't1' already exists +select * from t1; name current +select * from mysqltest.t1; name mysqltest +drop table t1; +drop database mysqltest; diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result index e37862d0176..46ad7a14e25 100644 --- a/mysql-test/r/func_math.result +++ b/mysql-test/r/func_math.result @@ -41,15 +41,21 @@ pi() sin(pi()/2) cos(pi()/2) abs(tan(pi())) cot(1) asin(1) acos(0) atan(1) select degrees(pi()),radians(360); degrees(pi()) radians(360) 180 6.2831853071796 +SELECT ACOS(1.0); ACOS(1.0) 0.000000 +SELECT ASIN(1.0); ASIN(1.0) 1.570796 +SELECT ACOS(0.2*5.0); ACOS(0.2*5.0) 0.000000 +SELECT ACOS(0.5*2.0); ACOS(0.5*2.0) 0.000000 +SELECT ASIN(0.8+0.2); ASIN(0.8+0.2) 1.570796 +SELECT ASIN(1.2-0.2); ASIN(1.2-0.2) 1.570796 diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result index c5b98976fd6..a10e7fc02bb 100644 --- a/mysql-test/r/insert_select.result +++ b/mysql-test/r/insert_select.result @@ -592,15 +592,34 @@ CREATE TABLE t2 ( USID INTEGER UNSIGNED AUTO_INCREMENT, ServerID TINYINT UNSIGNE INSERT INTO t1 VALUES (39,42,'Access-Granted','46','491721000045',2130706433,17690,NULL,NULL,'Localnet','491721000045','49172200000',754974766,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'2003-07-18 00:11:21',NULL,NULL,20030718001121); INSERT INTO t2 SELECT USID, ServerID, State, SessionID, User, NASAddr, NASPort, NASPortType, ConnectSpeed, CarrierType, CallingStationID, CalledStationID, AssignedAddr, SessionTime, PacketsIn, OctetsIn, PacketsOut, OctetsOut, TerminateCause, UnauthTime, AccessRequestTime, AcctStartTime, AcctLastTime, LastModification from t1 LIMIT 1; drop table t1,t2; +CREATE TABLE t1( +Month date NOT NULL, +Type tinyint(3) unsigned NOT NULL auto_increment, +Field int(10) unsigned NOT NULL, +Count int(10) unsigned NOT NULL, +UNIQUE KEY Month (Month,Type,Field) +); +insert into t1 Values +(20030901, 1, 1, 100), +(20030901, 1, 2, 100), +(20030901, 2, 1, 100), +(20030901, 2, 2, 100), +(20030901, 3, 1, 100); +select * from t1; Month Type Field Count 2003-09-01 1 1 100 2003-09-01 1 2 100 2003-09-01 2 1 100 2003-09-01 2 2 100 2003-09-01 3 1 100 +Select null, Field, Count From t1 Where Month=20030901 and Type=2; NULL Field Count NULL 1 100 NULL 2 100 +create table t2(No int not null, Field int not null, Count int not null); +insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2; +select * from t2; No Field Count 0 1 100 0 2 100 +drop table t1, t2; -- cgit v1.2.1 From 7db76e5a16796f4cf55bc95418807644d2dd6d17 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Feb 2004 20:57:11 +0400 Subject: fixed bug #1378 "mysqlbinlog for remote host is broken" client/mysqlbinlog.cc: fixed bug #1378 "mysqlbinlog for remote host is broken" by using shared part of code for local and remote variant (function process_event) mysql-test/r/mysqlbinlog.result: fixed results for remote variant (they are the same as for local now) mysql-test/t/mysqlbinlog.test: discarded note 'V. Vagin should ...' because V.Vagin done sql/log_event.cc: added special local_fname flag to Load_log_event for using in Load_log_event::check_fname_outside_temp_buf instead of ugly condition sql/log_event.h: added special local_fname flag to Load_log_event for using in Load_log_event::check_fname_outside_temp_buf instead of ugly condition --- mysql-test/r/mysqlbinlog.result | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'mysql-test/r') diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index eeac31ba40b..f604aa0589e 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -54,6 +54,12 @@ insert into t1 values ("abirvalg"); SET INSERT_ID=1; SET TIMESTAMP=1000000000; insert into t2 values (); +LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-1-1' INTO TABLE t1 FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); +LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-2-1' INTO TABLE t1 FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); +LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-3-1' INTO TABLE t1 FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); +LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-4-1' INTO TABLE t1 FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); +LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-5-1' INTO TABLE t1 FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); +LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/var/tmp/words.dat-6-1' INTO TABLE t1 FIELDS TERMINATED BY '\t' ENCLOSED BY '' ESCAPED BY '\\' LINES TERMINATED BY '\n' STARTING BY '' (word); SET TIMESTAMP=1000000000; insert into t1 values ("Alas"); @@ -63,18 +69,7 @@ SET TIMESTAMP=1000000000; insert into t1 values ("Alas"); --- --database -- -use test; -SET TIMESTAMP=1000000000; -create table t1 (word varchar(20)); -SET TIMESTAMP=1000000000; -create table t2 (id int auto_increment not null primary key); -SET TIMESTAMP=1000000000; -insert into t1 values ("abirvalg"); SET INSERT_ID=1; -SET TIMESTAMP=1000000000; -insert into t2 values (); -SET TIMESTAMP=1000000000; -insert into t1 values ("Alas"); --- --position -- use test; -- cgit v1.2.1