From c872b005e2987ebc10db219c5ce8657441fe3533 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 22 Dec 2006 09:29:28 +0400 Subject: [PATCH 001/153] Fix for bug #21976: Unnecessary warning with count(decimal) We use val_int() calls (followed by null_value check) to determine nullness in some Item_sum_count' and Item_sum_count_distinct' methods, as a side effect we get extra warnings raised in the val_int(). Fix: use is_null() instead. mysql-test/r/func_group.result: Fix for bug #21976: Unnecessary warning with count(decimal) - test result. mysql-test/t/func_group.test: Fix for bug #21976: Unnecessary warning with count(decimal) - test case. sql/item.h: Fix for bug #21976: Unnecessary warning with count(decimal) - comment adjusted. sql/item_sum.cc: Fix for bug #21976: Unnecessary warning with count(decimal) - use is_null() to determine nullness. --- mysql-test/r/func_group.result | 10 ++++++++++ mysql-test/t/func_group.test | 11 +++++++++++ sql/item.h | 11 +++++------ sql/item_sum.cc | 32 +++++--------------------------- 4 files changed, 31 insertions(+), 33 deletions(-) diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result index c6117053a60..a15801f6960 100644 --- a/mysql-test/r/func_group.result +++ b/mysql-test/r/func_group.result @@ -1029,3 +1029,13 @@ t1 CREATE TABLE `t1` ( `stddev(0)` double(8,4) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; +create table t1 (a decimal(20)); +insert into t1 values (12345678901234567890); +select count(a) from t1; +count(a) +1 +select count(distinct a) from t1; +count(distinct a) +1 +drop table t1; +End of 5.0 tests diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test index 079d107fad8..a47fd028b92 100644 --- a/mysql-test/t/func_group.test +++ b/mysql-test/t/func_group.test @@ -700,3 +700,14 @@ create table t1 select stddev(0); show create table t1; drop table t1; +# +# Bug #21976: Unnecessary warning with count(decimal) +# + +create table t1 (a decimal(20)); +insert into t1 values (12345678901234567890); +select count(a) from t1; +select count(distinct a) from t1; +drop table t1; + +--echo End of 5.0 tests diff --git a/sql/item.h b/sql/item.h index 0cfb0b01fd8..eb98ecd6021 100644 --- a/sql/item.h +++ b/sql/item.h @@ -701,12 +701,11 @@ public: virtual bool get_date_result(TIME *ltime,uint fuzzydate) { return get_date(ltime,fuzzydate); } /* - This function is used only in Item_func_isnull/Item_func_isnotnull - (implementations of IS NULL/IS NOT NULL clauses). Item_func_is{not}null - calls this method instead of one of val/result*() methods, which - normally will set null_value. This allows to determine nullness of - a complex expression without fully evaluating it. - Any new item which can be NULL must implement this call. + The method allows to determine nullness of a complex expression + without fully evaluating it, instead of calling val/result*() then + checking null_value. Used in Item_func_isnull/Item_func_isnotnull + and Item_sum_count/Item_sum_count_distinct. + Any new item which can be NULL must implement this method. */ virtual bool is_null() { return 0; } diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 77c6e17607f..f7a92f16b29 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1034,14 +1034,8 @@ void Item_sum_count::clear() bool Item_sum_count::add() { - if (!args[0]->maybe_null) + if (!args[0]->maybe_null || !args[0]->is_null()) count++; - else - { - (void) args[0]->val_int(); - if (!args[0]->null_value) - count++; - } return 0; } @@ -1941,14 +1935,8 @@ void Item_sum_count::reset_field() char *res=result_field->ptr; longlong nr=0; - if (!args[0]->maybe_null) + if (!args[0]->maybe_null || !args[0]->is_null()) nr=1; - else - { - (void) args[0]->val_int(); - if (!args[0]->null_value) - nr=1; - } int8store(res,nr); } @@ -2051,14 +2039,8 @@ void Item_sum_count::update_field() char *res=result_field->ptr; nr=sint8korr(res); - if (!args[0]->maybe_null) + if (!args[0]->maybe_null || !args[0]->is_null()) nr++; - else - { - (void) args[0]->val_int(); - if (!args[0]->null_value) - nr++; - } int8store(res,nr); } @@ -2531,12 +2513,8 @@ bool Item_sum_count_distinct::setup(THD *thd) Item *item=args[i]; if (list.push_back(item)) return TRUE; // End of memory - if (item->const_item()) - { - (void) item->val_int(); - if (item->null_value) - always_null=1; - } + if (item->const_item() && item->is_null()) + always_null= 1; } if (always_null) return FALSE; From f106321eae6cc1529ad6c3bc25286ff7b1a8014b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 29 Jan 2007 15:17:40 +0000 Subject: [PATCH 002/153] Bug#23354 Add explaination when ndb_mgm do restart ndb/src/mgmclient/CommandInterpreter.cpp: Add printout to indicate the usage of "-n" --- ndb/src/mgmclient/CommandInterpreter.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ndb/src/mgmclient/CommandInterpreter.cpp b/ndb/src/mgmclient/CommandInterpreter.cpp index 420dbd121a1..d6952f0b0eb 100644 --- a/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/ndb/src/mgmclient/CommandInterpreter.cpp @@ -2029,6 +2029,9 @@ CommandInterpreter::executeRestart(Vector &command_list, return -1; } + if (!nostart) + ndbout_c("Shutting down nodes with \"-n, no start\" option, to subsequently start the nodes."); + result= ndb_mgm_restart3(m_mgmsrv, no_of_nodes, node_ids, initialstart, nostart, abort, &need_disconnect); From 34d20085f320334e7d6e561d8f85a90f31fa784a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 8 Feb 2007 11:56:18 +0400 Subject: [PATCH 003/153] Fix for bug #25301: Non-zero dates with year 0000 are invalid The 0000 year is valid. The ISO standard for "Representation of dates and times" says: "Calendar years are numbered in ascending order according to the Gregorian calendar by values in the range [0000] to [9999]." Reverted fix for 21789: DATETIME with 0000-00-00 11:22:33 should be invalid, but is accepted as it's not a bug. Fix for 19370: DateTime datatype in MySQL has two bugs in it will be reverted during 4.1 -> 5.0 merging as it was pushed to the 5.0 tree. mysql-test/r/date_formats.result: Fix for bug #25301: Non-zero dates with year 0000 are invalid - reverted fix for bug #21789: DATETIME with 0000-00-00 11:22:33 should be invalid, but is accepted sql-common/my_time.c: Fix for bug #25301: Non-zero dates with year 0000 are invalid - reverted fix for bug #21789: DATETIME with 0000-00-00 11:22:33 should be invalid, but is accepted --- mysql-test/r/date_formats.result | 57 ++++++++++---------------------- sql-common/my_time.c | 5 +-- 2 files changed, 19 insertions(+), 43 deletions(-) diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index d4f9a4f0c56..07cc37fe6bc 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -181,12 +181,12 @@ date format datetime 2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 2003-01-02 02:11:12.123450 2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 2003-01-02 00:11:12.123450 2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12 -10:20:10 %H:%i:%s 0000-00-00 00:00:00 -10:20:10 %h:%i:%s.%f 0000-00-00 00:00:00 -10:20:10 %T 0000-00-00 00:00:00 -10:20:10AM %h:%i:%s%p 0000-00-00 00:00:00 -10:20:10AM %r 0000-00-00 00:00:00 -10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 00:00:00 +10:20:10 %H:%i:%s 0000-00-00 10:20:10 +10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10 +10:20:10 %T 0000-00-00 10:20:10 +10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10 +10:20:10AM %r 0000-00-00 10:20:10 +10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.440000 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58 15 September 2001 %d %M %Y 2001-09-15 00:00:00 15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00 @@ -203,13 +203,6 @@ Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00 15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00 15-01-20 %d-%m-%y 2020-01-15 00:00:00 15-2001-1 %d-%Y-%c 2001-01-15 00:00:00 -Warnings: -Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect datetime value: '0000-00-00 10:20:10.440000' select date,format,DATE(str_to_date(date, format)) as date2 from t1; date format date2 2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02 @@ -250,12 +243,12 @@ date format time 2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 02:11:12.123450 2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 00:11:12.123450 2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 23:11:12 -10:20:10 %H:%i:%s NULL -10:20:10 %h:%i:%s.%f NULL -10:20:10 %T NULL -10:20:10AM %h:%i:%s%p NULL -10:20:10AM %r NULL -10:20:10.44AM %h:%i:%s.%f%p NULL +10:20:10 %H:%i:%s 10:20:10 +10:20:10 %h:%i:%s.%f 10:20:10 +10:20:10 %T 10:20:10 +10:20:10AM %h:%i:%s%p 10:20:10 +10:20:10AM %r 10:20:10 +10:20:10.44AM %h:%i:%s.%f%p 10:20:10.440000 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 12:59:58 15 September 2001 %d %M %Y 00:00:00 15 SEPTEMB 2001 %d %M %Y 00:00:00 @@ -272,13 +265,6 @@ Tuesday 52 2001 %W %V %X 00:00:00 15-01-2001 %d-%m-%Y %H:%i:%S 00:00:00 15-01-20 %d-%m-%y 00:00:00 15-2001-1 %d-%Y-%c 00:00:00 -Warnings: -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10.440000' select date,format,concat(TIME(str_to_date(date, format))) as time2 from t1; date format time2 2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 10:11:12 @@ -288,12 +274,12 @@ date format time2 2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 02:11:12.123450 2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 00:11:12.123450 2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 23:11:12 -10:20:10 %H:%i:%s NULL -10:20:10 %h:%i:%s.%f NULL -10:20:10 %T NULL -10:20:10AM %h:%i:%s%p NULL -10:20:10AM %r NULL -10:20:10.44AM %h:%i:%s.%f%p NULL +10:20:10 %H:%i:%s 10:20:10 +10:20:10 %h:%i:%s.%f 10:20:10 +10:20:10 %T 10:20:10 +10:20:10AM %h:%i:%s%p 10:20:10 +10:20:10AM %r 10:20:10 +10:20:10.44AM %h:%i:%s.%f%p 10:20:10.440000 15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 12:59:58 15 September 2001 %d %M %Y 00:00:00 15 SEPTEMB 2001 %d %M %Y 00:00:00 @@ -310,13 +296,6 @@ Tuesday 52 2001 %W %V %X 00:00:00 15-01-2001 %d-%m-%Y %H:%i:%S 00:00:00 15-01-20 %d-%m-%y 00:00:00 15-2001-1 %d-%Y-%c 00:00:00 -Warnings: -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10' -Warning 1292 Truncated incorrect time value: '0000-00-00 10:20:10.440000' select concat('',str_to_date('8:11:2.123456 03-01-02','%H:%i:%S.%f %y-%m-%d')); concat('',str_to_date('8:11:2.123456 03-01-02','%H:%i:%S.%f %y-%m-%d')) 2003-01-02 08:11:02.123456 diff --git a/sql-common/my_time.c b/sql-common/my_time.c index 2d3d71e646c..0d8ad167ff5 100644 --- a/sql-common/my_time.c +++ b/sql-common/my_time.c @@ -350,10 +350,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time, l_time->year > 9999 || l_time->month > 12 || l_time->day > 31 || l_time->hour > 23 || l_time->minute > 59 || l_time->second > 59 || - (!(flags & TIME_FUZZY_DATE) && - (l_time->month == 0 || l_time->day == 0)) || - (l_time->year == 0 && l_time->month == 0 && l_time->day == 0 && - (l_time->hour != 0 || l_time->minute != 0 || l_time->second != 0))) + (!(flags & TIME_FUZZY_DATE) && (l_time->month == 0 || l_time->day == 0))) { /* Only give warning for a zero date if there is some garbage after */ if (!not_zero_date) /* If zero date */ From cc2c4e265a721a7b4ff53907b57256b6c51f8df3 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 8 Feb 2007 12:53:18 +0400 Subject: [PATCH 004/153] After merge fix. Reverted fix for 19370 DateTime datatype in MySQL has two bugs in it as it's not a bug. --- mysql-test/r/date_formats.result | 4 +--- mysql-test/r/strict.result | 14 ++++---------- mysql-test/r/type_datetime.result | 4 +--- mysql-test/t/strict.test | 8 -------- 4 files changed, 6 insertions(+), 24 deletions(-) diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result index 0f7f23b7f2c..f4ec6830cd5 100644 --- a/mysql-test/r/date_formats.result +++ b/mysql-test/r/date_formats.result @@ -449,8 +449,6 @@ create table t1 select str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:% str_to_date("10:11:12.0012", "%H:%i:%S.%f") as f2, str_to_date("2003-01-02", "%Y-%m-%d") as f3, str_to_date("02", "%d") as f4, str_to_date("02 10", "%d %H") as f5; -Warnings: -Warning 1265 Data truncated for column 'f4' at row 1 describe t1; Field Type Null Key Default Extra f1 datetime YES NULL @@ -460,7 +458,7 @@ f4 date YES NULL f5 time YES NULL select * from t1; f1 f2 f3 f4 f5 -2003-01-02 10:11:12 10:11:12 2003-01-02 0000-00-00 58:00:00 +2003-01-02 10:11:12 10:11:12 2003-01-02 0000-00-02 58:00:00 drop table t1; create table t1 select "02 10" as a, "%d %H" as b; select str_to_date(a,b) from t1; diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 702fc68bb25..3ba9771f12d 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -7,7 +7,6 @@ DROP TABLE IF EXISTS t1; CREATE TABLE t1 (col1 date); INSERT INTO t1 VALUES('2004-01-01'),('2004-02-29'); INSERT INTO t1 VALUES('0000-10-31'); -ERROR 22007: Incorrect date value: '0000-10-31' for column 'col1' at row 1 INSERT INTO t1 VALUES('2004-0-31'); ERROR 22007: Incorrect date value: '2004-0-31' for column 'col1' at row 1 INSERT INTO t1 VALUES('2004-01-02'),('2004-0-31'); @@ -57,6 +56,7 @@ select * from t1; col1 2004-01-01 2004-02-29 +0000-10-31 2004-01-02 2004-01-03 2004-00-31 @@ -124,7 +124,6 @@ set @@sql_mode='ansi,traditional'; CREATE TABLE t1 (col1 datetime); INSERT INTO t1 VALUES('2004-10-31 15:30:00'),('2004-02-29 15:30:00'); INSERT INTO t1 VALUES('0000-10-31 15:30:00'); -ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col1' at row 1 INSERT INTO t1 VALUES('2004-0-31 15:30:00'); ERROR 22007: Incorrect datetime value: '2004-0-31 15:30:00' for column 'col1' at row 1 INSERT INTO t1 VALUES('2004-10-0 15:30:00'); @@ -145,6 +144,7 @@ select * from t1; col1 2004-10-31 15:30:00 2004-02-29 15:30:00 +0000-10-31 15:30:00 drop table t1; CREATE TABLE t1 (col1 timestamp); INSERT INTO t1 VALUES('2004-10-31 15:30:00'),('2004-02-29 15:30:00'); @@ -206,7 +206,6 @@ INSERT INTO t1 (col1) VALUES (STR_TO_DATE('15.10.2004','%d.%m.%Y')); INSERT INTO t1 (col2) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i')); INSERT INTO t1 (col3) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i')); INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); -ERROR 22007: Incorrect date value: '0000-10-31 15:30:00' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); ERROR 22007: Incorrect date value: '2004-00-31 15:30:00' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); @@ -222,7 +221,6 @@ ERROR HY000: Incorrect datetime value: '15.13.2004 15.30' for function str_to_ti INSERT INTO t1 (col1) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y')); ERROR 22007: Incorrect date value: '0000-00-00' for column 'col1' at row 1 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); -ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.0.2004 15.30','%d.%m.%Y %H.%i')); ERROR 22007: Incorrect datetime value: '2004-00-31 15:30:00' for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('0.10.2004 15.30','%d.%m.%Y %H.%i')); @@ -259,7 +257,6 @@ INSERT INTO t1 (col1) VALUES (CAST('2004-10-15' AS DATE)); INSERT INTO t1 (col2) VALUES (CAST('2004-10-15 10:15' AS DATETIME)); INSERT INTO t1 (col3) VALUES (CAST('2004-10-15 10:15' AS DATETIME)); INSERT INTO t1 (col1) VALUES(CAST('0000-10-31' AS DATE)); -ERROR 22007: Truncated incorrect datetime value: '0000-10-31' INSERT INTO t1 (col1) VALUES(CAST('2004-10-0' AS DATE)); ERROR 22007: Incorrect date value: '2004-10-00' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(CAST('2004-0-10' AS DATE)); @@ -267,7 +264,6 @@ ERROR 22007: Incorrect date value: '2004-00-10' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(CAST('0000-00-00' AS DATE)); ERROR 22007: Truncated incorrect datetime value: '0000-00-00' INSERT INTO t1 (col2) VALUES(CAST('0000-10-31 15:30' AS DATETIME)); -ERROR 22007: Truncated incorrect datetime value: '0000-10-31 15:30' INSERT INTO t1 (col2) VALUES(CAST('2004-10-0 15:30' AS DATETIME)); ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(CAST('2004-0-10 15:30' AS DATETIME)); @@ -275,7 +271,7 @@ ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col2' a INSERT INTO t1 (col2) VALUES(CAST('0000-00-00' AS DATETIME)); ERROR 22007: Truncated incorrect datetime value: '0000-00-00' INSERT INTO t1 (col3) VALUES(CAST('0000-10-31 15:30' AS DATETIME)); -ERROR 22007: Truncated incorrect datetime value: '0000-10-31 15:30' +ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1 INSERT INTO t1 (col3) VALUES(CAST('2004-10-0 15:30' AS DATETIME)); ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col3' at row 1 INSERT INTO t1 (col3) VALUES(CAST('2004-0-10 15:30' AS DATETIME)); @@ -288,7 +284,6 @@ INSERT INTO t1 (col1) VALUES (CONVERT('2004-10-15',DATE)); INSERT INTO t1 (col2) VALUES (CONVERT('2004-10-15 10:15',DATETIME)); INSERT INTO t1 (col3) VALUES (CONVERT('2004-10-15 10:15',DATETIME)); INSERT INTO t1 (col1) VALUES(CONVERT('0000-10-31' , DATE)); -ERROR 22007: Truncated incorrect datetime value: '0000-10-31' INSERT INTO t1 (col1) VALUES(CONVERT('2004-10-0' , DATE)); ERROR 22007: Incorrect date value: '2004-10-00' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(CONVERT('2004-0-10' , DATE)); @@ -296,7 +291,6 @@ ERROR 22007: Incorrect date value: '2004-00-10' for column 'col1' at row 1 INSERT INTO t1 (col1) VALUES(CONVERT('0000-00-00',DATE)); ERROR 22007: Truncated incorrect datetime value: '0000-00-00' INSERT INTO t1 (col2) VALUES(CONVERT('0000-10-31 15:30',DATETIME)); -ERROR 22007: Truncated incorrect datetime value: '0000-10-31 15:30' INSERT INTO t1 (col2) VALUES(CONVERT('2004-10-0 15:30',DATETIME)); ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col2' at row 1 INSERT INTO t1 (col2) VALUES(CONVERT('2004-0-10 15:30',DATETIME)); @@ -304,7 +298,7 @@ ERROR 22007: Incorrect datetime value: '2004-00-10 15:30:00' for column 'col2' a INSERT INTO t1 (col2) VALUES(CONVERT('0000-00-00',DATETIME)); ERROR 22007: Truncated incorrect datetime value: '0000-00-00' INSERT INTO t1 (col3) VALUES(CONVERT('0000-10-31 15:30',DATETIME)); -ERROR 22007: Truncated incorrect datetime value: '0000-10-31 15:30' +ERROR 22007: Incorrect datetime value: '0000-10-31 15:30:00' for column 'col3' at row 1 INSERT INTO t1 (col3) VALUES(CONVERT('2004-10-0 15:30',DATETIME)); ERROR 22007: Incorrect datetime value: '2004-10-00 15:30:00' for column 'col3' at row 1 INSERT INTO t1 (col3) VALUES(CONVERT('2004-0-10 15:30',DATETIME)); diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result index 7fc1c4f398d..63094fff896 100644 --- a/mysql-test/r/type_datetime.result +++ b/mysql-test/r/type_datetime.result @@ -26,8 +26,6 @@ Table Op Msg_type Msg_text test.t1 check status OK delete from t1; insert into t1 values("000101"),("691231"),("700101"),("991231"),("00000101"),("00010101"),("99991231"),("00101000000"),("691231000000"),("700101000000"),("991231235959"),("10000101000000"),("99991231235959"),("20030100000000"),("20030000000000"); -Warnings: -Warning 1264 Out of range value adjusted for column 't' at row 5 insert into t1 values ("2003-003-03"); insert into t1 values ("20030102T131415"),("2001-01-01T01:01:01"), ("2001-1-1T1:01:01"); select * from t1; @@ -36,7 +34,7 @@ t 2069-12-31 00:00:00 1970-01-01 00:00:00 1999-12-31 00:00:00 -0000-00-00 00:00:00 +0000-01-01 00:00:00 0001-01-01 00:00:00 9999-12-31 00:00:00 2000-10-10 00:00:00 diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index 224a7422de1..65744068711 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -14,7 +14,6 @@ DROP TABLE IF EXISTS t1; CREATE TABLE t1 (col1 date); INSERT INTO t1 VALUES('2004-01-01'),('2004-02-29'); ---error 1292 INSERT INTO t1 VALUES('0000-10-31'); # All test cases expected to fail should return @@ -100,7 +99,6 @@ set @@sql_mode='ansi,traditional'; CREATE TABLE t1 (col1 datetime); INSERT INTO t1 VALUES('2004-10-31 15:30:00'),('2004-02-29 15:30:00'); ---error 1292 INSERT INTO t1 VALUES('0000-10-31 15:30:00'); # All test cases expected to fail should return @@ -194,7 +192,6 @@ INSERT INTO t1 (col3) VALUES (STR_TO_DATE('15.10.2004 10.15','%d.%m.%Y %H.%i')); # All test cases expected to fail should return # SQLSTATE 22007 ---error 1292 INSERT INTO t1 (col1) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); --error 1292 @@ -216,7 +213,6 @@ INSERT INTO t1 (col1) VALUES(STR_TO_DATE('00.00.0000','%d.%m.%Y')); # All test cases expected to fail should return # SQLSTATE 22007 ---error 1292 INSERT INTO t1 (col2) VALUES(STR_TO_DATE('31.10.0000 15.30','%d.%m.%Y %H.%i')); --error 1292 @@ -271,7 +267,6 @@ INSERT INTO t1 (col3) VALUES (CAST('2004-10-15 10:15' AS DATETIME)); # All test cases expected to fail should return # SQLSTATE 22007 ---error 1292 INSERT INTO t1 (col1) VALUES(CAST('0000-10-31' AS DATE)); --error 1292 @@ -299,7 +294,6 @@ INSERT INTO t1 (col1) VALUES(CAST('0000-00-00' AS DATE)); # All test cases expected to fail should return # SQLSTATE 22007 ---error 1292 INSERT INTO t1 (col2) VALUES(CAST('0000-10-31 15:30' AS DATETIME)); --error 1292 @@ -367,7 +361,6 @@ INSERT INTO t1 (col3) VALUES (CONVERT('2004-10-15 10:15',DATETIME)); # All test cases expected to fail should return # SQLSTATE 22007 ---error 1292 INSERT INTO t1 (col1) VALUES(CONVERT('0000-10-31' , DATE)); --error 1292 @@ -394,7 +387,6 @@ INSERT INTO t1 (col1) VALUES(CONVERT('0000-00-00',DATE)); # All test cases expected to fail should return # SQLSTATE 22007 ---error 1292 INSERT INTO t1 (col2) VALUES(CONVERT('0000-10-31 15:30',DATETIME)); --error 1292 From 32a19db3804789a76c1981ec111af58908f1f1ec Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 11 Mar 2007 01:17:41 +0400 Subject: [PATCH 005/153] Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables" We have to ignore 'data directory' and 'index directory' parameters if NO_DIR_IN_CREATE set. mysql-test/r/partition.result: result fixed mysql-test/t/partition.test: testcase sql/partition_info.cc: clear data_field_name and index_field_name if NO_DIR_IN_CREATE set --- mysql-test/r/partition.result | 13 +++++++++++++ mysql-test/t/partition.test | 17 +++++++++++++++++ sql/partition_info.cc | 2 ++ 3 files changed, 32 insertions(+) diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index f7eda649dd2..35b760cfc9d 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1219,4 +1219,17 @@ SELECT t2.id FROM t2 WHERE t2.id IN (SELECT id FROM t1 WHERE status = 'Verified' id 22589 drop table t1, t2; +set @org_mode=@@sql_mode; +set @@sql_mode='NO_DIR_IN_CREATE'; +select @@sql_mode; +@@sql_mode +NO_DIR_IN_CREATE +create table t1 (i int ) +partition by range (i) +( +partition p01 values less than (1000) +data directory='/not/existing' + index directory='/not/existing' +); +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 7d7ef95626a..814d96d087d 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1463,4 +1463,21 @@ SELECT t2.id FROM t2 WHERE t2.id IN (SELECT id FROM t1 WHERE status = 'Verified' drop table t1, t2; +# +# Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables +# + +set @org_mode=@@sql_mode; +set @@sql_mode='NO_DIR_IN_CREATE'; +select @@sql_mode; +create table t1 (i int ) +partition by range (i) +( + partition p01 values less than (1000) + data directory='/not/existing' + index directory='/not/existing' +); + +DROP TABLE t1; + --echo End of 5.1 tests diff --git a/sql/partition_info.cc b/sql/partition_info.cc index a7f9bd413c6..d1a5edc2ac6 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -776,6 +776,8 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, partition_element *part_elem= part_it++; if (part_elem->engine_type == NULL) part_elem->engine_type= default_engine_type; + if (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE) + part_elem->data_file_name= part_elem->index_file_name= 0; if (!is_sub_partitioned()) { if (check_table_name(part_elem->partition_name, From ba234148927efb3b226e6814bb36a9e6139762c3 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 13 Mar 2007 18:13:10 +0800 Subject: [PATCH 006/153] Bug#25295, ALTER TABLE operations for NDB tables require inclusion of ENGINE=ndbcluster. this patch of bug25295 depends on the patches of bug25877 and bug25880 sql/ha_ndbcluster.cc: add check for storage media changes between old and new table when do 'alter table ...' --- sql/ha_ndbcluster.cc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 4aa6d4d3167..1580bfb8b6f 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -10641,6 +10641,36 @@ bool ha_ndbcluster::check_if_incompatible_data(HA_CREATE_INFO *create_info, if (field->flags & FIELD_IN_ADD_INDEX) ai=1; } + + char tablespace_name[FN_LEN]; + if (get_tablespace_name(current_thd, tablespace_name, FN_LEN)) + { + if (create_info->tablespace) + { + if (strcmp(create_info->tablespace, tablespace_name)) + { + DBUG_PRINT("info", ("storage media is changed, old tablespace=%s, new tablespace=%s", + tablespace_name, create_info->tablespace)); + DBUG_RETURN(COMPATIBLE_DATA_NO); + } + } + else + { + DBUG_PRINT("info", ("storage media is changed, old is DISK and tablespace=%s, new is MEM", + tablespace_name)); + DBUG_RETURN(COMPATIBLE_DATA_NO); + } + } + else + { + if (create_info->storage_media != HA_SM_MEMORY) + { + DBUG_PRINT("info", ("storage media is changed, old is MEM, new is DISK and tablespace=%s", + create_info->tablespace)); + DBUG_RETURN(COMPATIBLE_DATA_NO); + } + } + if (table_changes != IS_EQUAL_YES) DBUG_RETURN(COMPATIBLE_DATA_NO); From bb5b81769adc7b2535e0b7515e4921ee58350e11 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Mar 2007 08:51:29 +0100 Subject: [PATCH 007/153] bug #26591 Cluster handler does not set bits in null bytes correctly: Set filler bits and unmark the ones with values by calling field->set_notnull() --- sql/ha_ndbcluster.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index dfdcffc4e71..f3ab435beb7 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -3109,11 +3109,15 @@ void ndb_unpack_record(TABLE *table, NdbValue *value, my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set); DBUG_ENTER("ndb_unpack_record"); + // Set filler bits + if (table->s->null_bytes > 0) + buf[table->s->null_bytes - 1]|= 256U - (1U << + table->s->last_null_bit_pos); // Set null flag(s) - bzero(buf, table->s->null_bytes); for ( ; field; p_field++, value++, field= *p_field) { + field->set_notnull(row_offset); if ((*value).ptr) { if (!(field->flags & BLOB_FLAG)) @@ -3123,7 +3127,7 @@ void ndb_unpack_record(TABLE *table, NdbValue *value, { if (is_null > 0) { - DBUG_PRINT("info",("[%u] NULL", + DBUG_PRINT("info",("[%u] NULL", (*value).rec->getColumn()->getColumnNo())); field->set_null(row_offset); } From 189398b359c1eb512a417c10b99f10fb2614d098 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Mar 2007 11:52:30 +0100 Subject: [PATCH 008/153] Bug#27022 Install fails with Duplicate entry '%-test-' for key 'PRIMARY' - Bail out with error if MySQL System tables already exist scripts/mysql_install_db.sh: Bail out with error if the MySQL system tables already exist in the location where we want to install --- scripts/mysql_install_db.sh | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh index 5dd5d86c666..c1a27eb0bc8 100644 --- a/scripts/mysql_install_db.sh +++ b/scripts/mysql_install_db.sh @@ -135,6 +135,17 @@ else fi fi +# Check that no previous MySQL installation exist +if test -f "$ldata/mysql/db.frm" +then + echo "FATAL ERROR: Found already existing MySQL system tables" + echo "in $ldata." + echo "If you are upgrading from a previous MySQL version you" + echo "should run '$bindir/mysql_upgrade', " + echo "to upgrade all tables for this version of MySQL" + exit 1; +fi + # Find SQL scripts needed for bootstrap fill_help_tables="fill_help_tables.sql" create_system_tables="mysql_system_tables.sql" @@ -181,7 +192,6 @@ then fi # Find executables and paths -mdata=$ldata/mysql mysqld=$execdir/mysqld mysqld_opt="" scriptdir=$bindir @@ -264,12 +274,6 @@ if test -w / -a ! -z "$user"; then chown $user $ldata $ldata/mysql $ldata/test; fi -# Check is "db" table already exist -if test ! -f $mdata/db.frm -then - db_table_already_exist="yes" -fi - if test -n "$user"; then args="$args --user=$user" fi @@ -322,16 +326,6 @@ then echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'" echo "See the manual for more instructions." - # Print message about upgrading unless we have created a new db table. - if test -z "$db_table_already_exist" - then - echo - echo "NOTE: If you are upgrading from a previous MySQL verision you " - echo "should run '$bindir/mysql_upgrade', to make sure all tables have " - echo "been upgraded for this version of MySQL" - fi - echo - if test "$in_rpm" = "0" then echo "You can start the MySQL daemon with:" From ffc605aad563c7634ea6b5ac8cb480793fcb9258 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 16 Mar 2007 14:25:11 +0100 Subject: [PATCH 009/153] Bug#20777 Function w BIGINT UNSIGNED shows diff. behaviour with and without --ps-protocol - Stored procedures returning unsinged values returns signed values if text protocol is used. The reason is that the stored proceedure item Item_func_sp wasn't initializing the member variables properly based on the information contained in the associated result field. - The patch is to upon field-item association, ::fix_fields, initialize the member variables in appropriate order. - Field type of an Item_func_sp was hard coded to MYSQL_TYPE_VARCHAR. This is changed to return the type of the actual result field. - Member function name sp_result_field was refactored to the more appropriate init_result_field. - Member function name find_and_check_access was refactored to sp_check_access. mysql-test/r/sp.result: - Added test mysql-test/t/sp.test: - Added test sql/item_func.cc: Bug#20777 Function w BIGINT UNSIGNED shows diff. behaviour with and without --ps-protocol - Stored procedures returning unsinged values returns signed values if text protocol is used. The reason is that the stored proceedure item Item_func_sp wasn't initializing the member variables properly based on the information contained in the associated result field. - The patch is to upon field-item association, ::fix_fields, initialize the member variables in appropriate order. - Field type of an Item_func_sp was hard coded to MYSQL_TYPE_VARCHAR. This is changed to to return the type of the actual result field. - Member function name sp_result_field was refactored to the more appropriate init_result_field. - Member function name find_and_check_access was refactored to sp_check_access. sql/item_func.h: Bug#20777 Function w BIGINT UNSIGNED shows diff. behaviour with and without --ps-protocol - Stored procedures returning unsinged values returns signed values if text protocol is used. The reason is that the stored proceedure item Item_func_sp wasn't initializing the member variables properly based on the information contained in the associated result field. - The patch is to upon field-item association, ::fix_fields, initialize the member variables in appropriate order. - Field type of an Item_func_sp was hard coded to MYSQL_TYPE_VARCHAR. This is changed to to return the type of the actual result field. - Member function name sp_result_field was refactored to the more appropriate init_result_field. - Member function name find_and_check_access was refactored to sp_check_access. --- mysql-test/r/sp.result | 88 +++++++++++ mysql-test/t/sp.test | 60 +++++++- sql/item_func.cc | 325 ++++++++++++++++++++--------------------- sql/item_func.h | 31 ++-- 4 files changed, 319 insertions(+), 185 deletions(-) diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 8e3c057cc62..248df2c38d0 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -5741,4 +5741,92 @@ END| CALL bug24117()| DROP PROCEDURE bug24117| DROP TABLE t3| +drop function if exists bug20777| +drop table if exists examplebug20777| +create function bug20777(f1 bigint unsigned) returns bigint unsigned +begin +set f1 = (f1 - 10); set f1 = (f1 + 10); +return f1; +end| +select bug20777(9223372036854775803) as '9223372036854775803 2**63-5'; +9223372036854775803 2**63-5 +9223372036854775803 +select bug20777(9223372036854775804) as '9223372036854775804 2**63-4'; +9223372036854775804 2**63-4 +9223372036854775804 +select bug20777(9223372036854775805) as '9223372036854775805 2**63-3'; +9223372036854775805 2**63-3 +9223372036854775805 +select bug20777(9223372036854775806) as '9223372036854775806 2**63-2'; +9223372036854775806 2**63-2 +9223372036854775806 +select bug20777(9223372036854775807) as '9223372036854775807 2**63-1'; +9223372036854775807 2**63-1 +9223372036854775807 +select bug20777(9223372036854775808) as '9223372036854775808 2**63+0'; +9223372036854775808 2**63+0 +9223372036854775808 +select bug20777(9223372036854775809) as '9223372036854775809 2**63+1'; +9223372036854775809 2**63+1 +9223372036854775809 +select bug20777(9223372036854775810) as '9223372036854775810 2**63+2'; +9223372036854775810 2**63+2 +9223372036854775810 +select bug20777(-9223372036854775808) as 'lower bounds signed bigint'; +lower bounds signed bigint +0 +select bug20777(9223372036854775807) as 'upper bounds signed bigint'; +upper bounds signed bigint +9223372036854775807 +select bug20777(0) as 'lower bounds unsigned bigint'; +lower bounds unsigned bigint +0 +select bug20777(18446744073709551615) as 'upper bounds unsigned bigint'; +upper bounds unsigned bigint +18446744073709551615 +select bug20777(18446744073709551616) as 'upper bounds unsigned bigint + 1'; +upper bounds unsigned bigint + 1 +18446744073709551615 +select bug20777(-1) as 'lower bounds unsigned bigint - 1'; +lower bounds unsigned bigint - 1 +0 +select bug20777(1.84e+19) as 'submitter value, 1.84e19'; +submitter value, 1.84e19 +9223372036854775808 +create table examplebug20777 as select +0 as 'i', +bug20777(9223372036854775806) as '2**63-2', +bug20777(9223372036854775807) as '2**63-1', +bug20777(9223372036854775808) as '2**63', +bug20777(9223372036854775809) as '2**63+1', +bug20777(18446744073709551614) as '2**64-2', +bug20777(18446744073709551615) as '2**64-1', +bug20777(18446744073709551616) as '2**64', +bug20777(0) as '0', +bug20777(-1) as '-1'; +insert into examplebug20777 values (1, 9223372036854775806, 9223372036854775807, 223372036854775808, 9223372036854775809, 18446744073709551614, 18446744073709551615, 8446744073709551616, 0, -1); +show create table examplebug20777; +Table Create Table +examplebug20777 CREATE TABLE `examplebug20777` ( + `i` int(1) NOT NULL default '0', + `2**63-2` bigint(20) unsigned default NULL, + `2**63-1` bigint(20) unsigned default NULL, + `2**63` bigint(20) unsigned default NULL, + `2**63+1` bigint(20) unsigned default NULL, + `2**64-2` bigint(20) unsigned default NULL, + `2**64-1` bigint(20) unsigned default NULL, + `2**64` bigint(20) unsigned default NULL, + `0` bigint(20) unsigned default NULL, + `-1` bigint(20) unsigned default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +select * from examplebug20777 order by i; +i 2**63-2 2**63-1 2**63 2**63+1 2**64-2 2**64-1 2**64 0 -1 +0 9223372036854775806 9223372036854775807 9223372036854775808 9223372036854775809 18446744073709551614 18446744073709551615 18446744073709551615 0 0 +1 9223372036854775806 9223372036854775807 223372036854775808 9223372036854775809 18446744073709551614 18446744073709551615 8446744073709551616 0 0 +drop table examplebug20777; +select bug20777(18446744073709551613)+1; +bug20777(18446744073709551613)+1 +18446744073709551614 +drop function bug20777; +End of 5.0 tests. drop table t1,t2; diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index cfa4937e050..1945d5daf4d 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -6715,9 +6715,56 @@ DROP PROCEDURE bug24117| DROP TABLE t3| # -# NOTE: The delimiter is `|`, and not `;`. It is changed to `;` -# at the end of the file! +# Bug#20777: Function w BIGINT UNSIGNED shows diff. behaviour --ps-protocol # +--disable_warnings +drop function if exists bug20777| +drop table if exists examplebug20777| +--enabled_warnings +create function bug20777(f1 bigint unsigned) returns bigint unsigned +begin + set f1 = (f1 - 10); set f1 = (f1 + 10); +return f1; +end| +delimiter ;| +select bug20777(9223372036854775803) as '9223372036854775803 2**63-5'; +select bug20777(9223372036854775804) as '9223372036854775804 2**63-4'; +select bug20777(9223372036854775805) as '9223372036854775805 2**63-3'; +select bug20777(9223372036854775806) as '9223372036854775806 2**63-2'; +select bug20777(9223372036854775807) as '9223372036854775807 2**63-1'; +select bug20777(9223372036854775808) as '9223372036854775808 2**63+0'; +select bug20777(9223372036854775809) as '9223372036854775809 2**63+1'; +select bug20777(9223372036854775810) as '9223372036854775810 2**63+2'; +select bug20777(-9223372036854775808) as 'lower bounds signed bigint'; +select bug20777(9223372036854775807) as 'upper bounds signed bigint'; +select bug20777(0) as 'lower bounds unsigned bigint'; +select bug20777(18446744073709551615) as 'upper bounds unsigned bigint'; +select bug20777(18446744073709551616) as 'upper bounds unsigned bigint + 1'; +select bug20777(-1) as 'lower bounds unsigned bigint - 1'; +select bug20777(1.84e+19) as 'submitter value, 1.84e19'; + +create table examplebug20777 as select + 0 as 'i', + bug20777(9223372036854775806) as '2**63-2', + bug20777(9223372036854775807) as '2**63-1', + bug20777(9223372036854775808) as '2**63', + bug20777(9223372036854775809) as '2**63+1', + bug20777(18446744073709551614) as '2**64-2', + bug20777(18446744073709551615) as '2**64-1', + bug20777(18446744073709551616) as '2**64', + bug20777(0) as '0', + bug20777(-1) as '-1'; +insert into examplebug20777 values (1, 9223372036854775806, 9223372036854775807, 223372036854775808, 9223372036854775809, 18446744073709551614, 18446744073709551615, 8446744073709551616, 0, -1); +show create table examplebug20777; +select * from examplebug20777 order by i; + +drop table examplebug20777; +select bug20777(18446744073709551613)+1; +drop function bug20777; +delimiter |; + +### +--echo End of 5.0 tests. # # BUG#NNNN: New bug synopsis @@ -6726,8 +6773,13 @@ DROP TABLE t3| #drop procedure if exists bugNNNN| #--enable_warnings #create procedure bugNNNN... - +# # Add bugs above this line. Use existing tables t1 and t2 when -# practical, or create table t3, t4 etc temporarily (and drop them). +# practical, or create table t3,t4 etc temporarily (and drop them). +# NOTE: The delimiter is `|`, and not `;`. It is changed to `;` +# at the end of the file! +# + delimiter ;| drop table t1,t2; + diff --git a/sql/item_func.cc b/sql/item_func.cc index 32cc90b96d6..a27b7b6bcc2 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4979,8 +4979,7 @@ longlong Item_func_row_count::val_int() Item_func_sp::Item_func_sp(Name_resolution_context *context_arg, sp_name *name) - :Item_func(), context(context_arg), m_name(name), m_sp(NULL), - result_field(NULL) + :Item_func(), context(context_arg), m_name(name), m_sp(NULL), sp_result_field(NULL) { maybe_null= 1; m_name->init_qname(current_thd); @@ -4990,21 +4989,21 @@ Item_func_sp::Item_func_sp(Name_resolution_context *context_arg, sp_name *name) Item_func_sp::Item_func_sp(Name_resolution_context *context_arg, sp_name *name, List &list) - :Item_func(list), context(context_arg), m_name(name), m_sp(NULL), - result_field(NULL) + :Item_func(list), context(context_arg), m_name(name), m_sp(NULL),sp_result_field(NULL) { maybe_null= 1; m_name->init_qname(current_thd); dummy_table= (TABLE*) sql_calloc(sizeof(TABLE)); } + void Item_func_sp::cleanup() { - if (result_field) + if (sp_result_field) { - delete result_field; - result_field= NULL; + delete sp_result_field; + sp_result_field= NULL; } m_sp= NULL; dummy_table->s= NULL; @@ -5033,82 +5032,117 @@ Item_func_sp::func_name() const } -Field * -Item_func_sp::sp_result_field(void) const + +/** + @brief Initialize the result field by creating a temporary dummy table + and assign it to a newly created field object. Meta data used to + create the field is fetched from the sp_head belonging to the stored + proceedure found in the stored procedure functon cache. + + @note This function should be called from fix_fields to init the result + field. It is some what related to Item_field. + + @see Item_field + + @param thd A pointer to the session and thread context. + + @return Function return error status. + @retval TRUE is returned on an error + @retval FALSE is returned on success. +*/ +bool +Item_func_sp::init_result_field(THD *thd) { - Field *field; - DBUG_ENTER("Item_func_sp::sp_result_field"); - DBUG_PRINT("info", ("sp: %s, flags: %x, level: %lu", - (m_sp ? "YES" : "NO"), - (m_sp ? m_sp->m_flags : (uint)0), - (m_sp ? m_sp->m_recursion_level : (ulong)0))); + DBUG_ENTER("Item_func_sp::init_result_field"); + + char *empty_name= (char *) ""; + TABLE_SHARE *share; - if (!m_sp) - { - THD *thd= current_thd; - if (!(m_sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, m_name, - &thd->sp_func_cache, TRUE))) - { - my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", m_name->m_qname.str); - DBUG_RETURN(0); - } - } - if (!dummy_table->s) - { - char *empty_name= (char *) ""; - TABLE_SHARE *share; - dummy_table->s= share= &dummy_table->share_not_to_be_used; - dummy_table->alias = empty_name; - dummy_table->maybe_null = maybe_null; - dummy_table->in_use= current_thd; - dummy_table->copy_blobs= TRUE; - share->table_cache_key = empty_name; - share->table_name = empty_name; - } - if (!(field= m_sp->create_result_field(max_length, name, dummy_table))) - my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); + DBUG_ASSERT(m_sp == NULL); + DBUG_ASSERT(sp_result_field == NULL); + DBUG_ASSERT(dummy_table->s == NULL); - DBUG_RETURN(field); + if (!(m_sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, m_name, + &thd->sp_func_cache, TRUE))) + { + my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", m_name->m_qname.str); + context->process_error(thd); + DBUG_RETURN(TRUE); + } + + /* + A Field need to be attached to a Table. + Below we "create" a dummy table by initializing + the needed pointers. + */ + dummy_table->s= share= &dummy_table->share_not_to_be_used; + dummy_table->alias = empty_name; + dummy_table->maybe_null = maybe_null; + dummy_table->in_use= thd; + dummy_table->copy_blobs= TRUE; + share->table_cache_key = empty_name; + share->table_name = empty_name; + + if (!(sp_result_field= m_sp->create_result_field(max_length, name, dummy_table))) + { + DBUG_RETURN(TRUE); + } + + if (sp_result_field->pack_length() > sizeof(result_buf)) + { + sp_result_field->move_field(sql_alloc(sp_result_field->pack_length())); + } else { + sp_result_field->move_field(result_buf); + } + + sp_result_field->null_ptr= (uchar *) &null_value; + sp_result_field->null_bit= 1; + + + DBUG_RETURN(FALSE); } +/** + @brief Initialize local members with values from the Field interface. -/* - Execute function & store value in field + @note called from Item::fix_fields. +*/ +void Item_func_sp::fix_length_and_dec() +{ + DBUG_ENTER("Item_func_sp::fix_length_and_dec"); - RETURN - 0 value <> NULL - 1 value = NULL or error + DBUG_ASSERT(sp_result_field); + decimals= sp_result_field->decimals(); + max_length= sp_result_field->field_length; + collation.set(sp_result_field->charset()); + maybe_null= 1; + unsigned_flag= test(sp_result_field->flags & UNSIGNED_FLAG); + + DBUG_VOID_RETURN; +} + +/** + @brief Execute function & store value in field. + + @return Function returns error status. + @retval FALSE on success. + @retval TRUE if an error occurred. */ bool -Item_func_sp::execute(Field **flp) +Item_func_sp::execute() { THD *thd= current_thd; - Field *f; - + /* Get field in virtual tmp table to store result. Create the field if invoked first time. */ - - if (!(f= *flp)) - { - if (!(*flp= f= sp_result_field())) - { - /* Error set by sp_result_field() */ - null_value= 1; - return TRUE; - } - f->move_field((f->pack_length() > sizeof(result_buf)) ? - sql_alloc(f->pack_length()) : result_buf); - f->null_ptr= (uchar *)&null_value; - f->null_bit= 1; - } /* Execute function and store the return value in the field. */ - if (execute_impl(thd, f)) + if (execute_impl(thd)) { null_value= 1; context->process_error(thd); @@ -5117,14 +5151,24 @@ Item_func_sp::execute(Field **flp) /* Check that the field (the value) is not NULL. */ - null_value= f->is_null(); + null_value= sp_result_field->is_null(); return null_value; } +/** + @brief Execute function and store the return value in the field. + + @note This function was intended to be the concrete implementation of + the interface function execute. This was never realized. + + @return The error state. + @retval FALSE on success + @retval TRUE if an error occurred. +*/ bool -Item_func_sp::execute_impl(THD *thd, Field *return_value_fld) +Item_func_sp::execute_impl(THD *thd) { bool err_status= TRUE; Sub_statement_state statement_state; @@ -5141,7 +5185,7 @@ Item_func_sp::execute_impl(THD *thd, Field *return_value_fld) thd->security_ctx= context->security_ctx; } #endif - if (find_and_check_access(thd)) + if (sp_check_access(thd)) goto error; /* @@ -5150,7 +5194,7 @@ Item_func_sp::execute_impl(THD *thd, Field *return_value_fld) function call into binlog. */ thd->reset_sub_statement_state(&statement_state, SUB_STMT_FUNCTION); - err_status= m_sp->execute_function(thd, args, arg_count, return_value_fld); + err_status= m_sp->execute_function(thd, args, arg_count, sp_result_field); thd->restore_sub_statement_state(&statement_state); error: @@ -5165,15 +5209,9 @@ error: void Item_func_sp::make_field(Send_field *tmp_field) { - Field *field; DBUG_ENTER("Item_func_sp::make_field"); - if ((field= sp_result_field())) - { - field->make_field(tmp_field); - delete field; - DBUG_VOID_RETURN; - } - init_make_field(tmp_field, MYSQL_TYPE_VARCHAR); + DBUG_ASSERT(sp_result_field); + sp_result_field->make_field(tmp_field); DBUG_VOID_RETURN; } @@ -5181,67 +5219,20 @@ Item_func_sp::make_field(Send_field *tmp_field) enum enum_field_types Item_func_sp::field_type() const { - Field *field; DBUG_ENTER("Item_func_sp::field_type"); - - if (result_field) - DBUG_RETURN(result_field->type()); - if ((field= sp_result_field())) - { - enum_field_types result= field->type(); - delete field; - DBUG_RETURN(result); - } - DBUG_RETURN(MYSQL_TYPE_VARCHAR); + DBUG_ASSERT(sp_result_field); + DBUG_RETURN(sp_result_field->type()); } - Item_result Item_func_sp::result_type() const { - Field *field; DBUG_ENTER("Item_func_sp::result_type"); DBUG_PRINT("info", ("m_sp = %p", m_sp)); - - if (result_field) - DBUG_RETURN(result_field->result_type()); - if ((field= sp_result_field())) - { - Item_result result= field->result_type(); - delete field; - DBUG_RETURN(result); - } - DBUG_RETURN(STRING_RESULT); + DBUG_ASSERT(sp_result_field); + DBUG_RETURN(sp_result_field->result_type()); } -void -Item_func_sp::fix_length_and_dec() -{ - Field *field; - DBUG_ENTER("Item_func_sp::fix_length_and_dec"); - - if (result_field) - { - decimals= result_field->decimals(); - max_length= result_field->field_length; - collation.set(result_field->charset()); - DBUG_VOID_RETURN; - } - - if (!(field= sp_result_field())) - { - context->process_error(current_thd); - DBUG_VOID_RETURN; - } - decimals= field->decimals(); - max_length= field->field_length; - collation.set(field->charset()); - maybe_null= 1; - delete field; - DBUG_VOID_RETURN; -} - - longlong Item_func_found_rows::val_int() { DBUG_ASSERT(fixed == 1); @@ -5252,57 +5243,39 @@ longlong Item_func_found_rows::val_int() Field * Item_func_sp::tmp_table_field(TABLE *t_arg) { - Field *field= 0; DBUG_ENTER("Item_func_sp::tmp_table_field"); - if (m_sp) - field= m_sp->create_result_field(max_length, (const char*) name, t_arg); - - if (!field) - field= Item_func::tmp_table_field(t_arg); - - if (!field) - my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); - - DBUG_RETURN(field); + DBUG_ASSERT(sp_result_field); + DBUG_RETURN(sp_result_field); } -/* - Find the function and check access rights to the function - - SYNOPSIS - find_and_check_access() - thd thread handler - - RETURN - FALSE Access granted - TRUE Requested access can't be granted or function doesn't exists - - NOTES - Checks if requested access to function can be granted to user. +/** + @brief Checks if requested access to function can be granted to user. If function isn't found yet, it searches function first. If function can't be found or user don't have requested access error is raised. + + @param thd thread handler + + @return Indication if the access was granted or not. + @retval FALSE Access is granted. + @retval TRUE Requested access can't be granted or function doesn't exists. + */ bool -Item_func_sp::find_and_check_access(THD *thd) +Item_func_sp::sp_check_access(THD *thd) { - if (! m_sp && ! (m_sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, m_name, - &thd->sp_func_cache, TRUE))) - { - my_error(ER_SP_DOES_NOT_EXIST, MYF(0), "FUNCTION", m_name->m_qname.str); - return TRUE; - } - + DBUG_ENTER("Item_func_sp::sp_check_access"); + DBUG_ASSERT(m_sp); #ifndef NO_EMBEDDED_ACCESS_CHECKS if (check_routine_access(thd, EXECUTE_ACL, m_sp->m_db.str, m_sp->m_name.str, 0, FALSE)) - return TRUE; + DBUG_RETURN(TRUE); #endif - return FALSE; + DBUG_RETURN(FALSE); } @@ -5310,9 +5283,25 @@ bool Item_func_sp::fix_fields(THD *thd, Item **ref) { bool res; + DBUG_ENTER("Item_func_sp::fix_fields"); DBUG_ASSERT(fixed == 0); + + /* + We must call init_result_field before Item_func::fix_fields() + to make m_sp and result_field members available to fix_length_and_dec(), + which is called from Item_func::fix_fields(). + */ + res= init_result_field(thd); + + if (res) + DBUG_RETURN(res); + res= Item_func::fix_fields(thd, ref); - if (!res && thd->lex->view_prepare_mode) + + if (res) + DBUG_RETURN(res); + + if (thd->lex->view_prepare_mode) { /* Here we check privileges of the stored routine only during view @@ -5324,15 +5313,17 @@ Item_func_sp::fix_fields(THD *thd, Item **ref) good idea especially if the view has SQL SECURITY DEFINER and the used stored procedure has SQL SECURITY DEFINER. */ - res= find_and_check_access(thd); + res= sp_check_access(thd); #ifndef NO_EMBEDDED_ACCESS_CHECKS + /* + Try to set and restore the security context to see whether it's valid + */ Security_context *save_secutiry_ctx; - if (!res && !(res= set_routine_security_ctx(thd, m_sp, false, - &save_secutiry_ctx))) - { + res= set_routine_security_ctx(thd, m_sp, false, &save_secutiry_ctx); + if (!res) sp_restore_security_context(thd, save_secutiry_ctx); - } + #endif /* ! NO_EMBEDDED_ACCESS_CHECKS */ } - return res; + DBUG_RETURN(res); } diff --git a/sql/item_func.h b/sql/item_func.h index 68591f9c6f5..6a619327590 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1405,12 +1405,15 @@ private: sp_name *m_name; mutable sp_head *m_sp; TABLE *dummy_table; - Field *result_field; char result_buf[64]; + /* + The result field of the concrete stored function. + */ + Field *sp_result_field; - bool execute(Field **flp); - bool execute_impl(THD *thd, Field *return_value_fld); - Field *sp_result_field(void) const; + bool execute(); + bool execute_impl(THD *thd); + bool init_result_field(THD *thd); public: @@ -1436,23 +1439,23 @@ public: longlong val_int() { - if (execute(&result_field)) + if (execute()) return (longlong) 0; - return result_field->val_int(); + return sp_result_field->val_int(); } double val_real() { - if (execute(&result_field)) + if (execute()) return 0.0; - return result_field->val_real(); + return sp_result_field->val_real(); } my_decimal *val_decimal(my_decimal *dec_buf) { - if (execute(&result_field)) + if (execute()) return NULL; - return result_field->val_decimal(dec_buf); + return sp_result_field->val_decimal(dec_buf); } String *val_str(String *str) @@ -1461,7 +1464,7 @@ public: char buff[20]; buf.set(buff, 20, str->charset()); buf.length(0); - if (execute(&result_field)) + if (execute()) return NULL; /* result_field will set buf pointing to internal buffer @@ -1469,7 +1472,7 @@ public: when SP is executed. In order to prevent occasional corruption of returned value, we make here a copy. */ - result_field->val_str(&buf); + sp_result_field->val_str(&buf); str->copy(buf); return str; } @@ -1477,11 +1480,11 @@ public: virtual bool change_context_processor(byte *cntx) { context= (Name_resolution_context *)cntx; return FALSE; } - void fix_length_and_dec(); - bool find_and_check_access(THD * thd); + bool sp_check_access(THD * thd); virtual enum Functype functype() const { return FUNC_SP; } bool fix_fields(THD *thd, Item **ref); + void fix_length_and_dec(void); bool is_expensive() { return 1; } }; From dbf59fd4e0870d97ed9c08ce1580b69157d6b26d Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 19 Mar 2007 16:45:09 +0100 Subject: [PATCH 010/153] Manual merge mysql-test/r/sp.result: Manual merge. - lowercase 'default' changes to uppercase 'DEFAULT' sql/item_func.cc: Manual merge - shared tables is handled differently in 5.1. - Use of LEX_STRING instead of char*. - Dummy table allocated differently. --- mysql-test/r/sp.result | 20 ++++++++++---------- sql/item_func.cc | 11 ++++++----- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 033409f3d77..1c91c964cb9 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -5899,16 +5899,16 @@ insert into examplebug20777 values (1, 9223372036854775806, 9223372036854775807, show create table examplebug20777; Table Create Table examplebug20777 CREATE TABLE `examplebug20777` ( - `i` int(1) NOT NULL default '0', - `2**63-2` bigint(20) unsigned default NULL, - `2**63-1` bigint(20) unsigned default NULL, - `2**63` bigint(20) unsigned default NULL, - `2**63+1` bigint(20) unsigned default NULL, - `2**64-2` bigint(20) unsigned default NULL, - `2**64-1` bigint(20) unsigned default NULL, - `2**64` bigint(20) unsigned default NULL, - `0` bigint(20) unsigned default NULL, - `-1` bigint(20) unsigned default NULL + `i` int(1) NOT NULL DEFAULT '0', + `2**63-2` bigint(20) unsigned DEFAULT NULL, + `2**63-1` bigint(20) unsigned DEFAULT NULL, + `2**63` bigint(20) unsigned DEFAULT NULL, + `2**63+1` bigint(20) unsigned DEFAULT NULL, + `2**64-2` bigint(20) unsigned DEFAULT NULL, + `2**64-1` bigint(20) unsigned DEFAULT NULL, + `2**64` bigint(20) unsigned DEFAULT NULL, + `0` bigint(20) unsigned DEFAULT NULL, + `-1` bigint(20) unsigned DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 select * from examplebug20777 order by i; i 2**63-2 2**63-1 2**63 2**63+1 2**64-2 2**64-1 2**64 0 -1 diff --git a/sql/item_func.cc b/sql/item_func.cc index 2cb67cb28a4..601682e0313 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -5009,7 +5009,7 @@ Item_func_sp::cleanup() sp_result_field= NULL; } m_sp= NULL; - dummy_table->s= NULL; + dummy_table->alias= NULL; Item_func::cleanup(); } @@ -5057,13 +5057,13 @@ bool Item_func_sp::init_result_field(THD *thd) { DBUG_ENTER("Item_func_sp::init_result_field"); + + LEX_STRING empty_name= { STRING_WITH_LEN("") }; - char *empty_name= (char *) ""; TABLE_SHARE *share; DBUG_ASSERT(m_sp == NULL); DBUG_ASSERT(sp_result_field == NULL); - DBUG_ASSERT(dummy_table->s == NULL); if (!(m_sp= sp_find_routine(thd, TYPE_ENUM_FUNCTION, m_name, &thd->sp_func_cache, TRUE))) @@ -5078,8 +5078,9 @@ Item_func_sp::init_result_field(THD *thd) Below we "create" a dummy table by initializing the needed pointers. */ - dummy_table->s= share= &dummy_table->share_not_to_be_used; - dummy_table->alias = empty_name; + + share= dummy_table->s; + dummy_table->alias = ""; dummy_table->maybe_null = maybe_null; dummy_table->in_use= thd; dummy_table->copy_blobs= TRUE; From 4c07323096d5d45f49352e8e3b41701416246ff2 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 20 Mar 2007 10:36:20 +0800 Subject: [PATCH 011/153] BUG#21699 DROP last DATAFILE from TABLESPACE even though there are still table in it. And it gives the cofusing error message. mysql-test/r/ndb_dd_basic.result: adding some test result for increasing test codes. mysql-test/t/ndb_dd_basic.test: adding some test codes for nodatafile in tablespace. storage/ndb/include/kernel/signaldata/Extent.hpp: Add NoDatafile error code when allocating extent. storage/ndb/src/kernel/blocks/tsman.cpp: when there is no datafile in spacefile , it should return NoDatafile error code, rather than NoExtentAvailable. storage/ndb/src/ndbapi/ndberror.c: add no datafile error code and corresponding error message for NoDatafile --- mysql-test/r/ndb_dd_basic.result | 28 +++++++++++++ mysql-test/t/ndb_dd_basic.test | 40 +++++++++++++++++++ .../ndb/include/kernel/signaldata/Extent.hpp | 3 +- storage/ndb/src/kernel/blocks/tsman.cpp | 6 +++ storage/ndb/src/ndbapi/ndberror.c | 3 +- 5 files changed, 78 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/ndb_dd_basic.result b/mysql-test/r/ndb_dd_basic.result index 014858e6856..470c2cb9c0e 100644 --- a/mysql-test/r/ndb_dd_basic.result +++ b/mysql-test/r/ndb_dd_basic.result @@ -186,6 +186,34 @@ INITIAL_SIZE 1000000000000K ENGINE = NDB; ERROR HY000: The size number was correct but we don't allow the digit part to be more than 2 billion DROP TABLE t1; +create tablespace ts2 +add datafile 'datafile2_1.dat' +use logfile group lg1 +initial_size 12M +engine ndb; +CREATE TABLE City ( +ID int(11) NOT NULL AUTO_INCREMENT, +Name char(35) NOT NULL, +CountryCode char(3) NOT NULL, +District char(20) NOT NULL, +Population int(11) NOT NULL, +PRIMARY KEY (ID) +) ENGINE=ndbcluster +tablespace ts2 +storage disk; +alter tablespace ts2 +drop datafile 'datafile2_1.dat' +engine ndb; +insert +into City (Name,CountryCode,District,Population) +values ('BeiJing','CN','Beijing',2000); +ERROR HY000: Got error 1602 'No datafile in tablespace' from NDBCLUSTER +drop tablespace ts2 +engine ndb; +ERROR HY000: Failed to drop TABLESPACE +drop table City; +drop tablespace ts2 +engine ndb; CREATE TABLE t1 (a INT PRIMARY KEY, b CHAR(4) NOT NULL, c CHAR(4) NOT NULL, KEY(b)) TABLESPACE ts1 STORAGE DISK ENGINE = NDB; INSERT INTO t1 VALUES (1,'1','1'), (2,'2','2'), (3,'3','3'); BEGIN; diff --git a/mysql-test/t/ndb_dd_basic.test b/mysql-test/t/ndb_dd_basic.test index 5d43d7997b0..81286d3121f 100644 --- a/mysql-test/t/ndb_dd_basic.test +++ b/mysql-test/t/ndb_dd_basic.test @@ -7,6 +7,10 @@ # Change Date: 2006-01-11 # Change: Cleanup and test rename ################################# +# Change Author: Guangbao Ni +# Change Date: 2007-03-20 +# Change: Test insert data when no datafile in spacetable +################################# -- source include/have_ndb.inc @@ -216,6 +220,42 @@ ENGINE = NDB; DROP TABLE t1; +create tablespace ts2 +add datafile 'datafile2_1.dat' +use logfile group lg1 +initial_size 12M +engine ndb; + +CREATE TABLE City ( + ID int(11) NOT NULL AUTO_INCREMENT, + Name char(35) NOT NULL, + CountryCode char(3) NOT NULL, + District char(20) NOT NULL, + Population int(11) NOT NULL, + PRIMARY KEY (ID) +) ENGINE=ndbcluster +tablespace ts2 +storage disk; + +alter tablespace ts2 +drop datafile 'datafile2_1.dat' +engine ndb; + +#It will give error messages: NoDatafile in tablespace +--error ER_GET_ERRMSG +insert +into City (Name,CountryCode,District,Population) +values ('BeiJing','CN','Beijing',2000); + +--error ER_DROP_FILEGROUP_FAILED +drop tablespace ts2 +engine ndb; + +drop table City; + +drop tablespace ts2 +engine ndb; + ############################ # Test update of mm/dd part ############################ diff --git a/storage/ndb/include/kernel/signaldata/Extent.hpp b/storage/ndb/include/kernel/signaldata/Extent.hpp index 88f2e394233..283ea7ba85a 100644 --- a/storage/ndb/include/kernel/signaldata/Extent.hpp +++ b/storage/ndb/include/kernel/signaldata/Extent.hpp @@ -31,7 +31,8 @@ struct AllocExtentReq { enum ErrorCode { UnmappedExtentPageIsNotImplemented = 1, - NoExtentAvailable = 1601 + NoExtentAvailable = 1601, + NoDatafile = 1602 }; union diff --git a/storage/ndb/src/kernel/blocks/tsman.cpp b/storage/ndb/src/kernel/blocks/tsman.cpp index 99fbc683cee..62aa80a67fe 100644 --- a/storage/ndb/src/kernel/blocks/tsman.cpp +++ b/storage/ndb/src/kernel/blocks/tsman.cpp @@ -1483,6 +1483,12 @@ Tsman::execALLOC_EXTENT_REQ(Signal* signal) { jam(); err = AllocExtentReq::NoExtentAvailable; + Local_datafile_list full_tmp(m_file_pool, ts_ptr.p->m_full_files); + if (tmp.isEmpty() && full_tmp.isEmpty()) + { + jam(); + err = AllocExtentReq::NoDatafile; + } } /** diff --git a/storage/ndb/src/ndbapi/ndberror.c b/storage/ndb/src/ndbapi/ndberror.c index 7dd16f2d57f..b21b64156c8 100644 --- a/storage/ndb/src/ndbapi/ndberror.c +++ b/storage/ndb/src/ndbapi/ndberror.c @@ -201,7 +201,8 @@ ErrorBundle ErrorCodes[] = { { 904, HA_ERR_INDEX_FILE_FULL, IS, "Out of fragment records (increase MaxNoOfOrderedIndexes)" }, { 905, DMEC, IS, "Out of attribute records (increase MaxNoOfAttributes)" }, { 1601, HA_ERR_RECORD_FILE_FULL, IS, "Out extents, tablespace full" }, - + { 1602, DMEC, IS,"No datafile in tablespace" }, + /** * TimeoutExpired */ From e320fd786922e4c9045c34575b2a1f0f133e3bdf Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 21 Mar 2007 15:36:22 +0800 Subject: [PATCH 012/153] Bug#24568, NdbScanFilter NAND/NOR operations sometimes do not works as expected this patch is an absolutely necessary supplement of the previous patch, the previous patch doesnot cover isnull() and isnotnull() methods' effect. ndb/src/ndbapi/NdbScanFilter.cpp: correct isnull() and isnotnull() when these two methods called in a NAND/NOR operation --- ndb/src/ndbapi/NdbScanFilter.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ndb/src/ndbapi/NdbScanFilter.cpp b/ndb/src/ndbapi/NdbScanFilter.cpp index 89abba2eddc..eb0ef4ba391 100644 --- a/ndb/src/ndbapi/NdbScanFilter.cpp +++ b/ndb/src/ndbapi/NdbScanFilter.cpp @@ -328,12 +328,18 @@ NdbScanFilterImpl::cond_col(Interpreter::UnaryCondition op, Uint32 AttrId){ int NdbScanFilter::isnull(int AttrId){ - return m_impl.cond_col(Interpreter::IS_NULL, AttrId); + if(m_impl.m_negative == 1) + return m_impl.cond_col(Interpreter::IS_NOT_NULL, AttrId); + else + return m_impl.cond_col(Interpreter::IS_NULL, AttrId); } int NdbScanFilter::isnotnull(int AttrId){ - return m_impl.cond_col(Interpreter::IS_NOT_NULL, AttrId); + if(m_impl.m_negative == 1) + return m_impl.cond_col(Interpreter::IS_NULL, AttrId); + else + return m_impl.cond_col(Interpreter::IS_NOT_NULL, AttrId); } struct tab3 { From 774a19554b10c03adcfc6e7202252c6075ef6c62 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Mar 2007 12:16:52 +0800 Subject: [PATCH 013/153] Bug#27127, Incorrect behaviour of timestamp column with DEFAULT CURRENT_TIMESTAMP correct the bitmap_set_bit when a field is timestamp and described with default CURRENT_TIMESTAMP or on update CURRENT_TIMESTAMP, then it will reduce a little time cost when the field doesnot need to write. sql/sql_update.cc: here table->timestamp_field represent only the timestamp field related to CURRENT_TIMESTAMP, when the timestamp_field_type is 0 or 1, it need not to write the field data further. --- sql/sql_update.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 5aea05a9d39..bae1f8e9210 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -201,8 +201,10 @@ int mysql_update(THD *thd, table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET; else { - bitmap_set_bit(table->write_set, - table->timestamp_field->field_index); + if (table->timestamp_field_type == TIMESTAMP_AUTO_SET_ON_UPDATE || + table->timestamp_field_type == TIMESTAMP_AUTO_SET_ON_BOTH) + bitmap_set_bit(table->write_set, + table->timestamp_field->field_index); } } From 744de3ccabbae1a4c2d94cacb7a50c00c9de8b44 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Mar 2007 15:54:41 +0800 Subject: [PATCH 014/153] Bug#25446, START BACKUP NOWAIT Reports error and then continues storage/ndb/src/mgmclient/CommandInterpreter.cpp: add a goto to avoid a repeated ndb_mgm_start_backup() call --- storage/ndb/src/mgmclient/CommandInterpreter.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/storage/ndb/src/mgmclient/CommandInterpreter.cpp b/storage/ndb/src/mgmclient/CommandInterpreter.cpp index fdcea63640c..c3dd5c340ce 100644 --- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp +++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp @@ -2489,6 +2489,7 @@ CommandInterpreter::executeStartBackup(char* parameters, bool interactive) { flags = 0; result = ndb_mgm_start_backup(m_mgmsrv, 0, &backupId, &reply); + goto END_BACKUP; } else if (sz == 1 || (sz == 3 && args[1] == "WAIT" && args[2] == "COMPLETED")) { @@ -2522,6 +2523,7 @@ CommandInterpreter::executeStartBackup(char* parameters, bool interactive) } result = ndb_mgm_start_backup(m_mgmsrv, flags, &backupId, &reply); +END_BACKUP: if (result != 0) { ndbout << "Backup failed" << endl; printError(); From 1a52767fcad94766e13322fc552c508c89dcb91a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Mar 2007 13:35:29 -0400 Subject: [PATCH 015/153] Bug#26346: stack + buffer overrun in mysqldump Fixes to buffer overlows from long command line args, and unchecked dyn_str return codes. Also light refactoring. client/mysqldump.c: Bug#26346 stack + buffer overrun in mysqldump mysql-test/r/mysqldump.result: Bug#26346 stack + buffer overrun in mysqldump mysql-test/t/mysqldump.test: Bug#26346 stack + buffer overrun in mysqldump --- client/mysqldump.c | 552 ++++++++++++++++++++-------------- mysql-test/r/mysqldump.result | 19 +- mysql-test/t/mysqldump.test | 24 ++ 3 files changed, 354 insertions(+), 241 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index 94ab9dac5ac..333bfbff1e6 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -76,13 +76,13 @@ #define IGNORE_DATA 0x01 /* don't dump data for this table */ #define IGNORE_INSERT_DELAYED 0x02 /* table doesn't support INSERT DELAYED */ -static char *add_load_option(char *ptr, const char *object, - const char *statement); +static void add_load_option(DYNAMIC_STRING *str, const char *option, + const char *option_value); static ulong find_set(TYPELIB *lib, const char *x, uint length, char **err_pos, uint *err_len); static char *alloc_query_str(ulong size); -static char *field_escape(char *to,const char *from,uint length); +static void field_escape(DYNAMIC_STRING* in, const char *from); static my_bool verbose= 0, opt_no_create_info= 0, opt_no_data= 0, quick= 1, extended_insert= 1, lock_tables=1,ignore_errors=0,flush_logs=0,flush_privileges=0, @@ -121,6 +121,19 @@ FILE *md_result_file= 0; static char *shared_memory_base_name=0; #endif static uint opt_protocol= 0; + +/* +Dynamic_string wrapper functions. In this file use these +wrappers, they will terminate the process if there is +an allocation failure. +*/ +static void init_dynamic_string_checked(DYNAMIC_STRING *str, const char *init_str, + uint init_alloc, uint alloc_increment); +static void dynstr_append_checked(DYNAMIC_STRING* dest, const char* src); +static void dynstr_set_checked(DYNAMIC_STRING *str, const char *init_str); +static void dynstr_append_mem_checked(DYNAMIC_STRING *str, const char *append, + uint length); +static void dynstr_realloc_checked(DYNAMIC_STRING *str, ulong additional_size); /* Constant for detection of default value of default_charset. If default_charset is equal to mysql_universal_client_charset, then @@ -419,7 +432,9 @@ static struct my_option my_long_options[] = static const char *load_default_groups[]= { "mysqldump","client",0 }; -static void safe_exit(int error); +static void maybe_exit(int error); +static void die(int error, const char* reason, ...); +static void maybe_die(int error, const char* reason, ...); static void write_header(FILE *sql_file, char *db_name); static void print_value(FILE *file, MYSQL_RES *result, MYSQL_ROW row, const char *prefix,const char *name, @@ -474,11 +489,7 @@ static void verbose_msg(const char *fmt, ...) void check_io(FILE *file) { if (ferror(file)) - { - fprintf(stderr, "%s: Got errno %d on write\n", my_progname, errno); - ignore_errors= 0; /* We can't ignore this error */ - safe_exit(EX_EOF); - } + die(EX_EOF, "Got errno %d on write", errno); } static void print_version(void) @@ -864,12 +875,74 @@ static int get_options(int *argc, char ***argv) static void DB_error(MYSQL *mysql_arg, const char *when) { DBUG_ENTER("DB_error"); - fprintf(stderr, "%s: Got error: %d: %s %s\n", my_progname, + maybe_die(EX_MYSQLERR, "Got error: %d: %s %s", mysql_errno(mysql_arg), mysql_error(mysql_arg), when); - fflush(stderr); - safe_exit(EX_MYSQLERR); DBUG_VOID_RETURN; -} /* DB_error */ +} + + + +/* + Prints out an error message and kills the process. + + SYNOPSIS + die() + error_num - process return value + fmt_reason - a format string for use by my_vsnprintf. + ... - variable arguments for above fmt_reason string + + DESCRIPTION + This call prints out the formatted error message to stderr and then + terminates the process. +*/ +static void die(int error_num, const char* fmt_reason, ...) +{ + char buffer[1000]; + va_list args; + va_start(args,fmt_reason); + my_vsnprintf(buffer, sizeof(buffer), fmt_reason, args); + va_end(args); + + fprintf(stderr, "%s: %s\n", my_progname, buffer); + fflush(stderr); + + ignore_errors= 0; /* force the exit */ + maybe_exit(error_num); +} + + +/* + Prints out an error message and maybe kills the process. + + SYNOPSIS + maybe_die() + error_num - process return value + fmt_reason - a format string for use by my_vsnprintf. + ... - variable arguments for above fmt_reason string + + DESCRIPTION + This call prints out the formatted error message to stderr and then + terminates the process, unless the --force command line option is used. + + This call should be used for non-fatal errors (such as database + errors) that the code may still be able to continue to the next unit + of work. + +*/ +static void maybe_die(int error_num, const char* fmt_reason, ...) +{ + char buffer[1000]; + va_list args; + va_start(args,fmt_reason); + my_vsnprintf(buffer, sizeof(buffer), fmt_reason, args); + va_end(args); + + fprintf(stderr, "%s: %s\n", my_progname, buffer); + fflush(stderr); + + maybe_exit(error_num); +} + /* @@ -894,10 +967,8 @@ static int mysql_query_with_error_report(MYSQL *mysql_con, MYSQL_RES **res, if (mysql_query(mysql_con, query) || (res && !((*res)= mysql_store_result(mysql_con)))) { - fprintf(stderr, "%s: Couldn't execute '%s': %s (%d)\n", - my_progname, query, - mysql_error(mysql_con), mysql_errno(mysql_con)); - safe_exit(EX_MYSQLERR); + maybe_die(EX_MYSQLERR, "Couldn't execute '%s': %s (%d)", + query, mysql_error(mysql_con), mysql_errno(mysql_con)); return 1; } return 0; @@ -942,7 +1013,7 @@ static void free_resources() } -static void safe_exit(int error) +static void maybe_exit(int error) { if (!first_error) first_error= error; @@ -1002,10 +1073,7 @@ static int connect_to_db(char *host, char *user,char *passwd) my_snprintf(buff, sizeof(buff), "/*!40100 SET @@SQL_MODE='%s' */", compatible_mode_normal_str); if (mysql_query_with_error_report(mysql, 0, buff)) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(1); - } /* set time_zone to UTC to allow dumping date types between servers with different time zone settings @@ -1014,10 +1082,7 @@ static int connect_to_db(char *host, char *user,char *passwd) { my_snprintf(buff, sizeof(buff), "/*!40103 SET TIME_ZONE='+00:00' */"); if (mysql_query_with_error_report(mysql, 0, buff)) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(1); - } } DBUG_RETURN(0); } /* connect_to_db */ @@ -1038,10 +1103,8 @@ static void unescape(FILE *file,char *pos,uint length) char *tmp; DBUG_ENTER("unescape"); if (!(tmp=(char*) my_malloc(length*2+1, MYF(MY_WME)))) - { - ignore_errors=0; /* Fatal error */ - safe_exit(EX_MYSQLERR); /* Force exit */ - } + die(EX_MYSQLERR, "Couldn't allocate memory"); + mysql_real_escape_string(&mysql_connection, tmp, pos, length); fputc('\'', file); fputs(tmp, file); @@ -1350,7 +1413,7 @@ static void print_blob_as_hex(FILE *output_file, const char *str, ulong len) /* dump_routines_for_db - -- retrievs list of routines for a given db, and prints out + -- retrieves list of routines for a given db, and prints out the CREATE PROCEDURE definition into the output (the dump). This function has logic to print the appropriate syntax depending on whether @@ -1545,11 +1608,10 @@ static uint get_table_structure(char *table, char *db, char *table_type, if (!insert_pat_inited) { insert_pat_inited= 1; - if (init_dynamic_string(&insert_pat, "", 1024, 1024)) - safe_exit(EX_MYSQLERR); + init_dynamic_string_checked(&insert_pat, "", 1024, 1024); } else - dynstr_set(&insert_pat, ""); + dynstr_set_checked(&insert_pat, ""); } insert_option= ((delayed && opt_ignore) ? " DELAYED IGNORE " : @@ -1581,18 +1643,13 @@ static uint get_table_structure(char *table, char *db, char *table_type, my_snprintf(buff, sizeof(buff), "show create table %s", result_table); if (mysql_query_with_error_report(mysql, 0, buff)) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); - } if (path) { if (!(sql_file= open_sql_file_for_table(table))) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); - } + write_header(sql_file, db); } if (!opt_xml && opt_comments) @@ -1656,7 +1713,6 @@ static uint get_table_structure(char *table, char *db, char *table_type, my_free(scv_buff, MYF(MY_ALLOW_ZERO_PTR)); - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); } else @@ -1719,7 +1775,6 @@ static uint get_table_structure(char *table, char *db, char *table_type, { if (path) my_fclose(sql_file, MYF(MY_WME)); - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); } @@ -1731,19 +1786,19 @@ static uint get_table_structure(char *table, char *db, char *table_type, */ if (write_data) { - dynstr_append_mem(&insert_pat, "INSERT ", 7); - dynstr_append(&insert_pat, insert_option); - dynstr_append_mem(&insert_pat, "INTO ", 5); - dynstr_append(&insert_pat, opt_quoted_table); + dynstr_append_checked(&insert_pat, "INSERT "); + dynstr_append_checked(&insert_pat, insert_option); + dynstr_append_checked(&insert_pat, "INTO "); + dynstr_append_checked(&insert_pat, opt_quoted_table); if (complete_insert) { - dynstr_append_mem(&insert_pat, " (", 2); + dynstr_append_checked(&insert_pat, " ("); } else { - dynstr_append_mem(&insert_pat, " VALUES ", 8); + dynstr_append_checked(&insert_pat, " VALUES "); if (!extended_insert) - dynstr_append_mem(&insert_pat, "(", 1); + dynstr_append_checked(&insert_pat, "("); } } @@ -1753,10 +1808,10 @@ static uint get_table_structure(char *table, char *db, char *table_type, { if (init) { - dynstr_append_mem(&insert_pat, ", ", 2); + dynstr_append_checked(&insert_pat, ", "); } init=1; - dynstr_append(&insert_pat, + dynstr_append_checked(&insert_pat, quote_name(row[SHOW_FIELDNAME], name_buff, 0)); } } @@ -1771,10 +1826,7 @@ static uint get_table_structure(char *table, char *db, char *table_type, my_snprintf(query_buff, sizeof(query_buff), "show fields from %s", result_table); if (mysql_query_with_error_report(mysql, &result, query_buff)) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); - } /* Make an sql-file, if path was given iow. option -T was given */ if (!opt_no_create_info) @@ -1782,10 +1834,7 @@ static uint get_table_structure(char *table, char *db, char *table_type, if (path) { if (!(sql_file= open_sql_file_for_table(table))) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); - } write_header(sql_file, db); } if (!opt_xml && opt_comments) @@ -1803,17 +1852,17 @@ static uint get_table_structure(char *table, char *db, char *table_type, if (write_data) { - dynstr_append_mem(&insert_pat, "INSERT ", 7); - dynstr_append(&insert_pat, insert_option); - dynstr_append_mem(&insert_pat, "INTO ", 5); - dynstr_append(&insert_pat, result_table); + dynstr_append_checked(&insert_pat, "INSERT "); + dynstr_append_checked(&insert_pat, insert_option); + dynstr_append_checked(&insert_pat, "INTO "); + dynstr_append_checked(&insert_pat, result_table); if (opt_complete_insert) - dynstr_append_mem(&insert_pat, " (", 2); + dynstr_append_checked(&insert_pat, " ("); else { - dynstr_append_mem(&insert_pat, " VALUES ", 8); + dynstr_append_checked(&insert_pat, " VALUES "); if (!extended_insert) - dynstr_append_mem(&insert_pat, "(", 1); + dynstr_append_checked(&insert_pat, "("); } } @@ -1828,11 +1877,11 @@ static uint get_table_structure(char *table, char *db, char *table_type, check_io(sql_file); } if (complete_insert) - dynstr_append_mem(&insert_pat, ", ", 2); + dynstr_append_checked(&insert_pat, ", "); } init=1; if (opt_complete_insert) - dynstr_append(&insert_pat, + dynstr_append_checked(&insert_pat, quote_name(row[SHOW_FIELDNAME], name_buff, 0)); if (!opt_no_create_info) { @@ -1882,7 +1931,6 @@ static uint get_table_structure(char *table, char *db, char *table_type, my_progname, result_table, mysql_error(mysql)); if (path) my_fclose(sql_file, MYF(MY_WME)); - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); } @@ -1992,9 +2040,9 @@ continue_xml: } if (opt_complete_insert) { - dynstr_append_mem(&insert_pat, ") VALUES ", 9); + dynstr_append_checked(&insert_pat, ") VALUES "); if (!extended_insert) - dynstr_append_mem(&insert_pat, "(", 1); + dynstr_append_checked(&insert_pat, "("); } if (sql_file != md_result_file) { @@ -2041,7 +2089,6 @@ static void dump_triggers_for_table(char *table, { if (path) my_fclose(sql_file, MYF(MY_WME)); - safe_exit(EX_MYSQLERR); DBUG_VOID_RETURN; } if (mysql_num_rows(result)) @@ -2100,24 +2147,28 @@ DELIMITER ;;\n"); DBUG_VOID_RETURN; } -static char *add_load_option(char *ptr,const char *object, - const char *statement) +static void add_load_option(DYNAMIC_STRING *str, const char *option, + const char *option_value) { - if (object) + if (!option_value) { - /* Don't escape hex constants */ - if (object[0] == '0' && (object[1] == 'x' || object[1] == 'X')) - ptr= strxmov(ptr," ",statement," ",object,NullS); - else - { - /* char constant; escape */ - ptr= strxmov(ptr," ",statement," '",NullS); - ptr= field_escape(ptr,object,(uint) strlen(object)); - *ptr++= '\''; - } + /* Null value means we don't add this option. */ + return; } - return ptr; -} /* add_load_option */ + + dynstr_append_checked(str, option); + + if (strncmp(option_value, "0x", sizeof("0x")-1) == 0) + { + /* It's a hex constant, don't escape */ + dynstr_append_checked(str, option_value); + } + else + { + /* char constant; escape */ + field_escape(str, option_value); + } +} /* @@ -2127,28 +2178,36 @@ static char *add_load_option(char *ptr,const char *object, syntax errors from the SQL parser. */ -static char *field_escape(char *to,const char *from,uint length) +static void field_escape(DYNAMIC_STRING* in, const char *from) { - const char *end; - uint end_backslashes=0; + uint end_backslashes= 0; - for (end= from+length; from != end; from++) + dynstr_append_checked(in, "'"); + + while (*from) { - *to++= *from; + dynstr_append_mem_checked(in, from, 1); + if (*from == '\\') end_backslashes^=1; /* find odd number of backslashes */ else { if (*from == '\'' && !end_backslashes) - *to++= *from; /* We want a duplicate of "'" for MySQL */ + { + /* We want a duplicate of "'" for MySQL */ + dynstr_append_checked(in, "\'"); + } end_backslashes=0; } + from++; } /* Add missing backslashes if user has specified odd number of backs.*/ if (end_backslashes) - *to++= '\\'; - return to; -} /* field_escape */ + dynstr_append_checked(in, "\\"); + + dynstr_append_checked(in, "'"); +} + static char *alloc_query_str(ulong size) @@ -2156,10 +2215,8 @@ static char *alloc_query_str(ulong size) char *query; if (!(query= (char*) my_malloc(size, MYF(MY_WME)))) - { - ignore_errors= 0; /* Fatal error */ - safe_exit(EX_MYSQLERR); /* Force exit */ - } + die(EX_MYSQLERR, "Couldn't allocate a query string."); + return query; } @@ -2179,13 +2236,14 @@ static char *alloc_query_str(ulong size) void */ + static void dump_table(char *table, char *db) { char ignore_flag; - char query_buf[QUERY_LENGTH], *end, buff[256],table_buff[NAME_LEN+3]; + char buf[200], table_buff[NAME_LEN+3]; + DYNAMIC_STRING query_string; char table_type[NAME_LEN]; char *result_table, table_buff2[NAME_LEN*2+3], *opt_quoted_table; - char *query= query_buf; int error= 0; ulong rownr, row_break, total_length, init_length; uint num_fields; @@ -2239,44 +2297,69 @@ static void dump_table(char *table, char *db) opt_quoted_table= quote_name(table, table_buff2, 0); verbose_msg("-- Sending SELECT query...\n"); + + init_dynamic_string_checked(&query_string, "", 1024, 1024); + if (path) { char filename[FN_REFLEN], tmp_path[FN_REFLEN]; - convert_dirname(tmp_path,path,NullS); + + if (strlen(path) >= FN_REFLEN) + { + /* + This check is made because the some the file functions below + have FN_REFLEN sized stack allocated buffers and will cause + a crash even if the input destination buffer is large enough + to hold the output. + */ + die(EX_USAGE, "Input filename or options too long: %s", path); + } + + /* + Convert the path to native os format + and resolve to the full filepath. + */ + convert_dirname(tmp_path,path,NullS); my_load_path(tmp_path, tmp_path, NULL); - fn_format(filename, table, tmp_path, ".txt", 4); - my_delete(filename, MYF(0)); /* 'INTO OUTFILE' doesn't work, if - filename wasn't deleted */ + fn_format(filename, table, tmp_path, ".txt", MYF(MY_UNPACK_FILENAME)); + + /* Must delete the file that 'INTO OUTFILE' will write to */ + my_delete(filename, MYF(0)); + + /* convert to a unix path name to stick into the query */ to_unix_path(filename); - my_snprintf(query, QUERY_LENGTH, - "SELECT /*!40001 SQL_NO_CACHE */ * INTO OUTFILE '%s'", - filename); - end= strend(query); + + /* now build the query string */ + + dynstr_append_checked(&query_string, "SELECT /*!40001 SQL_NO_CACHE */ * INTO OUTFILE '"); + dynstr_append_checked(&query_string, filename); + dynstr_append_checked(&query_string, "'"); if (fields_terminated || enclosed || opt_enclosed || escaped) - end= strmov(end, " FIELDS"); - end= add_load_option(end, fields_terminated, " TERMINATED BY"); - end= add_load_option(end, enclosed, " ENCLOSED BY"); - end= add_load_option(end, opt_enclosed, " OPTIONALLY ENCLOSED BY"); - end= add_load_option(end, escaped, " ESCAPED BY"); - end= add_load_option(end, lines_terminated, " LINES TERMINATED BY"); - *end= '\0'; + dynstr_append_checked(&query_string, " FIELDS"); + + add_load_option(&query_string, " TERMINATED BY ", fields_terminated); + add_load_option(&query_string, " ENCLOSED BY ", enclosed); + add_load_option(&query_string, " OPTIONALLY ENCLOSED BY ", opt_enclosed); + add_load_option(&query_string, " ESCAPED BY ", escaped); + add_load_option(&query_string, " LINES TERMINATED BY ", lines_terminated); - my_snprintf(buff, sizeof(buff), " FROM %s", result_table); - end= strmov(end,buff); - if (where || order_by) + dynstr_append_checked(&query_string, " FROM "); + dynstr_append_checked(&query_string, result_table); + + if (where) { - query= alloc_query_str((ulong) ((end - query) + 1 + - (where ? strlen(where) + 7 : 0) + - (order_by ? strlen(order_by) + 10 : 0))); - end= strmov(query, query_buf); - - if (where) - end= strxmov(end, " WHERE ", where, NullS); - if (order_by) - end= strxmov(end, " ORDER BY ", order_by, NullS); + dynstr_append_checked(&query_string, " WHERE "); + dynstr_append_checked(&query_string, where); } - if (mysql_real_query(mysql, query, (uint) (end - query))) + + if (order_by) + { + dynstr_append_checked(&query_string, " ORDER BY "); + dynstr_append_checked(&query_string, order_by); + } + + if (mysql_real_query(mysql, query_string.str, query_string.length)) { DB_error(mysql, "when executing 'SELECT INTO OUTFILE'"); DBUG_VOID_RETURN; @@ -2290,41 +2373,38 @@ static void dump_table(char *table, char *db) result_table); check_io(md_result_file); } - my_snprintf(query, QUERY_LENGTH, - "SELECT /*!40001 SQL_NO_CACHE */ * FROM %s", - result_table); - if (where || order_by) - { - query= alloc_query_str((ulong) (strlen(query) + 1 + - (where ? strlen(where) + 7 : 0) + - (order_by ? strlen(order_by) + 10 : 0))); - end= strmov(query, query_buf); + + dynstr_append_checked(&query_string, "SELECT /*!40001 SQL_NO_CACHE */ * FROM "); + dynstr_append_checked(&query_string, result_table); - if (where) + if (where) + { + if (!opt_xml && opt_comments) { - if (!opt_xml && opt_comments) - { - fprintf(md_result_file, "-- WHERE: %s\n", where); - check_io(md_result_file); - } - end= strxmov(end, " WHERE ", where, NullS); - } - if (order_by) - { - if (!opt_xml && opt_comments) - { - fprintf(md_result_file, "-- ORDER BY: %s\n", order_by); - check_io(md_result_file); - } - end= strxmov(end, " ORDER BY ", order_by, NullS); + fprintf(md_result_file, "-- WHERE: %s\n", where); + check_io(md_result_file); } + + dynstr_append_checked(&query_string, " WHERE "); + dynstr_append_checked(&query_string, where); } + if (order_by) + { + if (!opt_xml && opt_comments) + { + fprintf(md_result_file, "-- ORDER BY: %s\n", order_by); + check_io(md_result_file); + } + dynstr_append_checked(&query_string, " ORDER BY "); + dynstr_append_checked(&query_string, order_by); + } + if (!opt_xml && !opt_compact) { fputs("\n", md_result_file); check_io(md_result_file); } - if (mysql_query_with_error_report(mysql, 0, query)) + if (mysql_query_with_error_report(mysql, 0, query_string.str)) { DB_error(mysql, "when retrieving data from server"); goto err; @@ -2398,14 +2478,9 @@ static void dump_table(char *table, char *db) ulong length= lengths[i]; if (!(field= mysql_fetch_field(res))) - { - my_snprintf(query, QUERY_LENGTH, - "%s: Not enough fields from table %s! Aborting.\n", - my_progname, result_table); - fputs(query,stderr); - error= EX_CONSCHECK; - goto err; - } + die(EX_CONSCHECK, + "Not enough fields from table %s! Aborting.\n", + result_table); /* 63 is my_charset_bin. If charsetnr is not 63, @@ -2424,9 +2499,9 @@ static void dump_table(char *table, char *db) if (extended_insert && !opt_xml) { if (i == 0) - dynstr_set(&extended_row,"("); + dynstr_set_checked(&extended_row,"("); else - dynstr_append(&extended_row,","); + dynstr_append_checked(&extended_row,","); if (row[i]) { @@ -2441,15 +2516,10 @@ static void dump_table(char *table, char *db) - In non-HEX mode we need up to 2 bytes per character, plus 2 bytes for leading and trailing '\'' characters. */ - if (dynstr_realloc(&extended_row,length * 2+2)) - { - fputs("Aborting dump (out of memory)",stderr); - error= EX_EOM; - goto err; - } + dynstr_realloc_checked(&extended_row,length * 2+2); if (opt_hex_blob && is_blob) { - dynstr_append(&extended_row, "0x"); + dynstr_append_checked(&extended_row, "0x"); extended_row.length+= mysql_hex_string(extended_row.str + extended_row.length, row[i], length); @@ -2457,13 +2527,13 @@ static void dump_table(char *table, char *db) } else { - dynstr_append(&extended_row,"'"); + dynstr_append_checked(&extended_row,"'"); extended_row.length += mysql_real_escape_string(&mysql_connection, &extended_row.str[extended_row.length], row[i],length); extended_row.str[extended_row.length]='\0'; - dynstr_append(&extended_row,"'"); + dynstr_append_checked(&extended_row,"'"); } } else @@ -2472,30 +2542,26 @@ static void dump_table(char *table, char *db) char *ptr= row[i]; if (my_isalpha(charset_info, *ptr) || (*ptr == '-' && my_isalpha(charset_info, ptr[1]))) - dynstr_append(&extended_row, "NULL"); + dynstr_append_checked(&extended_row, "NULL"); else { if (field->type == FIELD_TYPE_DECIMAL) { /* add " signs around */ - dynstr_append(&extended_row, "'"); - dynstr_append(&extended_row, ptr); - dynstr_append(&extended_row, "'"); + dynstr_append_checked(&extended_row, "'"); + dynstr_append_checked(&extended_row, ptr); + dynstr_append_checked(&extended_row, "'"); } else - dynstr_append(&extended_row, ptr); + dynstr_append_checked(&extended_row, ptr); } } } else - dynstr_append(&extended_row,"''"); - } - else if (dynstr_append(&extended_row,"NULL")) - { - fputs("Aborting dump (out of memory)",stderr); - error= EX_EOM; - goto err; + dynstr_append_checked(&extended_row,"''"); } + else + dynstr_append_checked(&extended_row,"NULL"); } else { @@ -2512,16 +2578,16 @@ static void dump_table(char *table, char *db) { if (opt_hex_blob && is_blob && length) { - /* Define xsi:type="xs:hexBinary" for hex encoded data */ - print_xml_tag(md_result_file, "\t\t", "", "field", "name=", - field->name, "xsi:type=", "xs:hexBinary", NullS); - print_blob_as_hex(md_result_file, row[i], length); + /* Define xsi:type="xs:hexBinary" for hex encoded data */ + print_xml_tag(md_result_file, "\t\t", "", "field", "name=", + field->name, "xsi:type=", "xs:hexBinary", NullS); + print_blob_as_hex(md_result_file, row[i], length); } else { - print_xml_tag(md_result_file, "\t\t", "", "field", "name=", - field->name, NullS); - print_quoted_xml(md_result_file, row[i], length); + print_xml_tag(md_result_file, "\t\t", "", "field", "name=", + field->name, NullS); + print_quoted_xml(md_result_file, row[i], length); } fputs("\n", md_result_file); } @@ -2581,7 +2647,7 @@ static void dump_table(char *table, char *db) if (extended_insert) { ulong row_length; - dynstr_append(&extended_row,")"); + dynstr_append_checked(&extended_row,")"); row_length= 2 + extended_row.length; if (total_length + row_length < opt_net_buffer_length) { @@ -2617,14 +2683,14 @@ static void dump_table(char *table, char *db) check_io(md_result_file); if (mysql_errno(mysql)) { - my_snprintf(query, QUERY_LENGTH, + my_snprintf(buf, sizeof(buf), "%s: Error %d: %s when dumping table %s at row: %ld\n", my_progname, mysql_errno(mysql), mysql_error(mysql), result_table, rownr); - fputs(query,stderr); + fputs(buf,stderr); error= EX_CONSCHECK; goto err; } @@ -2647,15 +2713,13 @@ static void dump_table(char *table, char *db) check_io(md_result_file); } mysql_free_result(res); - if (query != query_buf) - my_free(query, MYF(MY_ALLOW_ZERO_PTR)); + dynstr_free(&query_string); } DBUG_VOID_RETURN; err: - if (query != query_buf) - my_free(query, MYF(MY_ALLOW_ZERO_PTR)); - safe_exit(error); + dynstr_free(&query_string); + maybe_exit(error); DBUG_VOID_RETURN; } /* dump_table */ @@ -2842,8 +2906,8 @@ static int init_dumping(char *database, int init_func(char*)) check_io(md_result_file); } } - if (extended_insert && init_dynamic_string(&extended_row, "", 1024, 1024)) - exit(EX_EOM); + if (extended_insert) + init_dynamic_string_checked(&extended_row, "", 1024, 1024); return 0; } /* init_dumping */ @@ -2876,11 +2940,11 @@ static int dump_all_tables_in_db(char *database) if (lock_tables) { DYNAMIC_STRING query; - init_dynamic_string(&query, "LOCK TABLES ", 256, 1024); + init_dynamic_string_checked(&query, "LOCK TABLES ", 256, 1024); for (numrows= 0 ; (table= getTableName(1)) ; numrows++) { - dynstr_append(&query, quote_name(table, table_buff, 1)); - dynstr_append(&query, " READ /*!32311 LOCAL */,"); + dynstr_append_checked(&query, quote_name(table, table_buff, 1)); + dynstr_append_checked(&query, " READ /*!32311 LOCAL */,"); } if (numrows && mysql_real_query(mysql, query.str, query.length-1)) DB_error(mysql, "when using LOCK TABLES"); @@ -2953,11 +3017,11 @@ static my_bool dump_all_views_in_db(char *database) if (lock_tables) { DYNAMIC_STRING query; - init_dynamic_string(&query, "LOCK TABLES ", 256, 1024); + init_dynamic_string_checked(&query, "LOCK TABLES ", 256, 1024); for (numrows= 0 ; (table= getTableName(1)); numrows++) { - dynstr_append(&query, quote_name(table, table_buff, 1)); - dynstr_append(&query, " READ /*!32311 LOCAL */,"); + dynstr_append_checked(&query, quote_name(table, table_buff, 1)); + dynstr_append_checked(&query, " READ /*!32311 LOCAL */,"); } if (numrows && mysql_real_query(mysql, query.str, query.length-1)) DB_error(mysql, "when using LOCK TABLES"); @@ -3009,9 +3073,7 @@ static char *get_actual_table_name(const char *old_table_name, MEM_ROOT *root) quote_for_like(old_table_name, show_name_buff)); if (mysql_query_with_error_report(mysql, 0, query)) - { - safe_exit(EX_MYSQLERR); - } + return NullS; if ((table_res= mysql_store_result(mysql))) { @@ -3047,9 +3109,9 @@ static int dump_selected_tables(char *db, char **table_names, int tables) init_alloc_root(&root, 8192, 0); if (!(dump_tables= pos= (char**) alloc_root(&root, tables * sizeof(char *)))) - exit(EX_EOM); + die(EX_EOM, "alloc_root failure."); - init_dynamic_string(&lock_tables_query, "LOCK TABLES ", 256, 1024); + init_dynamic_string_checked(&lock_tables_query, "LOCK TABLES ", 256, 1024); for (; tables > 0 ; tables-- , table_names++) { /* the table name passed on commandline may be wrong case */ @@ -3058,16 +3120,14 @@ static int dump_selected_tables(char *db, char **table_names, int tables) /* Add found table name to lock_tables_query */ if (lock_tables) { - dynstr_append(&lock_tables_query, quote_name(*pos, table_buff, 1)); - dynstr_append(&lock_tables_query, " READ /*!32311 LOCAL */,"); + dynstr_append_checked(&lock_tables_query, quote_name(*pos, table_buff, 1)); + dynstr_append_checked(&lock_tables_query, " READ /*!32311 LOCAL */,"); } pos++; } else { - my_printf_error(0,"Couldn't find table: \"%s\"\n", MYF(0), - *table_names); - safe_exit(EX_ILLEGAL_TABLE); + maybe_die(EX_ILLEGAL_TABLE, "Couldn't find table: \"%s\"", *table_names); /* We shall countinue here, if --force was given */ } } @@ -3482,12 +3542,12 @@ static int replace(DYNAMIC_STRING *ds_str, const char *start= strstr(ds_str->str, search_str); if (!start) return 1; - init_dynamic_string(&ds_tmp, "", + init_dynamic_string_checked(&ds_tmp, "", ds_str->length + replace_len, 256); - dynstr_append_mem(&ds_tmp, ds_str->str, start - ds_str->str); - dynstr_append_mem(&ds_tmp, replace_str, replace_len); - dynstr_append(&ds_tmp, start + search_len); - dynstr_set(ds_str, ds_tmp.str); + dynstr_append_mem_checked(&ds_tmp, ds_str->str, start - ds_str->str); + dynstr_append_mem_checked(&ds_tmp, replace_str, replace_len); + dynstr_append_checked(&ds_tmp, start + search_len); + dynstr_set_checked(ds_str, ds_tmp.str); dynstr_free(&ds_tmp); return 0; } @@ -3533,10 +3593,7 @@ static my_bool get_view_structure(char *table, char* db) my_snprintf(query, sizeof(query), "SHOW CREATE TABLE %s", result_table); if (mysql_query_with_error_report(mysql, &table_res, query)) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); - } /* Check if this is a view */ field= mysql_fetch_field_direct(table_res, 0); @@ -3550,10 +3607,8 @@ static my_bool get_view_structure(char *table, char* db) if (path) { if (!(sql_file= open_sql_file_for_table(table))) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(1); - } + write_header(sql_file, db); } @@ -3599,14 +3654,14 @@ static my_bool get_view_structure(char *table, char* db) /* Save the result of SHOW CREATE TABLE in ds_view */ row= mysql_fetch_row(table_res); lengths= mysql_fetch_lengths(table_res); - init_dynamic_string(&ds_view, row[1], lengths[1] + 1, 1024); + init_dynamic_string_checked(&ds_view, row[1], lengths[1] + 1, 1024); mysql_free_result(table_res); /* Get the result from "select ... information_schema" */ if (!(table_res= mysql_store_result(mysql)) || !(row= mysql_fetch_row(table_res))) { - safe_exit(EX_MYSQLERR); + DB_error(mysql, "when trying to save the result of SHOW CREATE TABLE in ds_view."); DBUG_RETURN(1); } @@ -3678,6 +3733,45 @@ static my_bool get_view_structure(char *table, char* db) DBUG_RETURN(0); } +/* + The following functions are wrappers for the dynamic string functions + and if they fail, the wrappers will terminate the current process. +*/ + +#define DYNAMIC_STR_ERROR_MSG "Couldn't perform DYNAMIC_STRING operation" + +static void init_dynamic_string_checked(DYNAMIC_STRING *str, const char *init_str, + uint init_alloc, uint alloc_increment) +{ + if (init_dynamic_string(str, init_str, init_alloc, alloc_increment)) + die(EX_MYSQLERR, DYNAMIC_STR_ERROR_MSG); +} + +static void dynstr_append_checked(DYNAMIC_STRING* dest, const char* src) +{ + if (dynstr_append(dest, src)) + die(EX_MYSQLERR, DYNAMIC_STR_ERROR_MSG); +} + +static void dynstr_set_checked(DYNAMIC_STRING *str, const char *init_str) +{ + if (dynstr_set(str, init_str)) + die(EX_MYSQLERR, DYNAMIC_STR_ERROR_MSG); +} + +static void dynstr_append_mem_checked(DYNAMIC_STRING *str, const char *append, + uint length) +{ + if (dynstr_append_mem(str, append, length)) + die(EX_MYSQLERR, DYNAMIC_STR_ERROR_MSG); +} + +static void dynstr_realloc_checked(DYNAMIC_STRING *str, ulong additional_size) +{ + if (dynstr_realloc(str, additional_size)) + die(EX_MYSQLERR, DYNAMIC_STR_ERROR_MSG); +} + int main(int argc, char **argv) { diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 2d32984e4ef..df2effb2a72 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -1567,29 +1567,17 @@ create table t3(a varchar(30) primary key, b int not null); test_sequence ------ Testing with illegal table names ------ mysqldump: Couldn't find table: "\d-2-1.sql" - mysqldump: Couldn't find table: "\t1" - mysqldump: Couldn't find table: "\t1" - mysqldump: Couldn't find table: "\\t1" - mysqldump: Couldn't find table: "t\1" - mysqldump: Couldn't find table: "t\1" - mysqldump: Couldn't find table: "t/1" - mysqldump: Couldn't find table: "T_1" - mysqldump: Couldn't find table: "T%1" - mysqldump: Couldn't find table: "T'1" - mysqldump: Couldn't find table: "T_1" - mysqldump: Couldn't find table: "T_" - test_sequence ------ Testing with illegal database names ------ mysqldump: Got error: 1049: Unknown database 'mysqldump_test_d' when selecting the database @@ -3218,5 +3206,12 @@ INSERT INTO t1 VALUES(1,0xff00fef0); DROP TABLE t1; # +# Bug#26346: stack + buffer overrun in mysqldump +# +CREATE TABLE t1(a int); +INSERT INTO t1 VALUES (1), (2); +mysqldump: Input filename or options too long: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +DROP TABLE t1; +# # End of 5.0 tests # diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 31741cdba9f..0b943e31fdb 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1429,6 +1429,30 @@ INSERT INTO t1 VALUES(1,0xff00fef0); DROP TABLE t1; + + +--echo # +--echo # Bug#26346: stack + buffer overrun in mysqldump +--echo # + +CREATE TABLE t1(a int); +INSERT INTO t1 VALUES (1), (2); + +# too long a file path causes an error +--error 1 +--exec $MYSQL_DUMP --tab=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test 2>&1 + +--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-terminated-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test +--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-enclosed-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test +--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-optionally-enclosed-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test +--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-escaped-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test +--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --lines-terminated-by=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa test + +--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql +--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt + +DROP TABLE t1; + --echo # --echo # End of 5.0 tests --echo # From 805c2d52cd4a6cca64605ead2ddc0e43a65b819c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Mar 2007 14:40:52 -0600 Subject: [PATCH 016/153] NULL MERGE this to 5.1 Apply the following InnoDB snapshots: innodb-5.0-ss1319 innodb-5.0-ss1331 innodb-5.0-ss1333 innodb-5.0-ss1341 Fixes: - Bug #21409: Incorrect result returned when in READ-COMMITTED with query_cache ON At low transaction isolation levels we let each consistent read set its own snapshot. - Bug #23666: strange Innodb_row_lock_time_% values in show status; also millisecs wrong On Windows ut_usectime returns secs and usecs relative to the UNIX epoch (which is Jan, 1 1970). - Bug #25494: LATEST DEADLOCK INFORMATION is not always cleared lock_deadlock_recursive(): When the search depth or length is exceeded, rewind lock_latest_err_file and display the two transactions at the point of aborting the search. - Bug #25927: Foreign key with ON DELETE SET NULL on NOT NULL can crash server Prevent ALTER TABLE ... MODIFY ... NOT NULL on columns for which there is a foreign key constraint ON ... SET NULL. - Bug #26835: Repeatable corruption of utf8-enabled tables inside InnoDB The bug could be reproduced as follows: Define a table so that the first column of the clustered index is a VARCHAR or a UTF-8 CHAR in a collation where sequences of bytes of differing length are considered equivalent. Insert and delete a record. Before the delete-marked record is purged, insert another record whose first column is of different length but equivalent to the first record. Under certain conditions, the insertion can be incorrectly performed as update-in-place. Likewise, an operation that could be done as update-in-place can unnecessarily be performed as delete and insert, but that would not cause corruption but merely degraded performance. innobase/dict/dict0dict.c: NULL MERGE this to 5.1 Apply the following InnoDB snapshots: innodb-5.0-ss1319 innodb-5.0-ss1331 innodb-5.0-ss1333 innodb-5.0-ss1341 Revision r1317: branches/5.0: Port r1316 from trunk: Prevent ALTER TABLE ... MODIFY ... NOT NULL on columns for which there is a foreign key constraint ON ... SET NULL. (Bug #25927) dict_foreign_find_index(): Add paramettter check_null. dict_foreign_add_to_cache(): Do not allow ON DELETE SET NULL or ON UPDATE SET NULL if any of the referencing columns are declared NOT NULL. innobase/include/rem0rec.ic: NULL MERGE this to 5.1 Apply the following InnoDB snapshots: innodb-5.0-ss1319 innodb-5.0-ss1331 innodb-5.0-ss1333 innodb-5.0-ss1341 Revision r1339: branches/5.0: Merge r1338 from trunk: rec_offs_nth_size(): Treat n==0 as a special case. (Bug #26835) innobase/include/sync0sync.ic: NULL MERGE this to 5.1 Apply the following InnoDB snapshots: innodb-5.0-ss1319 innodb-5.0-ss1331 innodb-5.0-ss1333 innodb-5.0-ss1341 Revision r1293: branches/5.0: Fixed inline asm code, it didn't work with GCC > ver 3.x. innobase/lock/lock0lock.c: NULL MERGE this to 5.1 Apply the following InnoDB snapshots: innodb-5.0-ss1319 innodb-5.0-ss1331 innodb-5.0-ss1333 innodb-5.0-ss1341 Revision r1331: branches/5.0: Merge r1330 from trunk: lock_deadlock_recursive(): When the search depth or length is exceeded, rewind lock_latest_err_file and display the two transactions at the point of aborting the search. (Bug #25494) Revision r1333: branches/5.0: Merge r1332 from trunk: lock_deadlock_recursive(): When aborting the search, display a note regardless of start->undo_no. Otherwise, aborted searches may show up as genuine deadlocks. This mistake was made in r1330. innobase/srv/srv0srv.c: NULL MERGE this to 5.1 Apply the following InnoDB snapshots: innodb-5.0-ss1319 innodb-5.0-ss1331 innodb-5.0-ss1333 innodb-5.0-ss1341 Revision r1261: branches/5.0: Fix for Bug# 23666. On Windows ut_usectime returns secs and usecs relative to the UNIX epoch (which is Jan, 1 1970). innobase/ut/ut0ut.c: NULL MERGE this to 5.1 Apply the following InnoDB snapshots: innodb-5.0-ss1319 innodb-5.0-ss1331 innodb-5.0-ss1333 innodb-5.0-ss1341 Revision r1261: branches/5.0: Fix for Bug# 23666. On Windows ut_usectime returns secs and usecs relative to the UNIX epoch (which is Jan, 1 1970). mysql-test/r/innodb.result: NULL MERGE this to 5.1 Apply the following InnoDB snapshots: innodb-5.0-ss1319 innodb-5.0-ss1331 innodb-5.0-ss1333 innodb-5.0-ss1341 Revision r1319: branches/5.0: Port r1318 from trunk: Add a test case for r1316 (Bug #25927). Revision r1328: branches/5.0: mysql-test: Merge changes from MySQL AB. Revision r1341: branches/5.0: Merge r1340 from trunk: innodb.test, innodb.result: Add test case for Bug #26835. The bug could be reproduced as follows: Define a table so that the first column of the clustered index is a VARCHAR or a UTF-8 CHAR in a collation where sequences of bytes of differing length are considered equivalent. Insert and delete a record. Before the delete-marked record is purged, insert another record whose first column is of different length but equivalent to the first record. Under certain conditions, the insertion can be incorrectly performed as update-in-place. Likewise, an operation that could be done as update-in-place can unnecessarily be performed as delete and insert, but that would not cause corruption but merely degraded performance. Revision r1284: Merge changes from MySQL AB: ChangeSet 2007/01/24 14:49:36+04:00 holyfoot@mysql.com bug #22682 Test fails --without-geometry geometry dependent parts moved to proper .test files mysql-test/r/innodb.result 2007/01/24 14:49:34+04:00 holyfoot@mysql.com +0 -2 result fixed mysql-test/r/innodb_gis.result 2007/01/24 14:49:34+04:00 holyfoot@mysql.com +2 -0 result fixed mysql-test/t/innodb.test 2007/01/24 14:49:34+04:00 holyfoot@mysql.com +0 -6 HAVE_GEOMETRY dependent part moved to innodb_gis.test mysql-test/t/innodb_gis.test 2007/01/24 14:49:35+04:00 holyfoot@mysql.com +6 -0 HAVE_GEOMETRY dependent part moved here from innodb.test Revision r1186: dict_load_foreign(): Use a local variable instead of the 10-bit field foreign->n_fields in order to preserve ON UPDATE CASCADE and ON DELETE CASCADE flags. For some reason, gcc does not warn about shifting a 10-bit field to right by 24 bits. (Bug #24741) This bug was introduced while reducing the memory footprint of the InnoDB data dictionary (Bug #20877). innodb.test, innodb.result: Add a test case. Revision r1318: Add a test case for r1316 (Bug #25927). Revision r1340: innodb.test, innodb.result: Add test case for Bug #26835. The bug could be reproduced as follows: Define a table so that the first column of the clustered index is a VARCHAR or a UTF-8 CHAR in a collation where sequences of bytes of differing length are considered equivalent. Insert and delete a record. Before the delete-marked record is purged, insert another record whose first column is of different length but equivalent to the first record. Under certain conditions, the insertion can be incorrectly performed as update-in-place. Likewise, an operation that could be done as update-in-place can unnecessarily be performed as delete and insert, but that would not cause corruption but merely degraded performance. mysql-test/t/innodb.test: NULL MERGE this to 5.1 Apply the following InnoDB snapshots: innodb-5.0-ss1319 innodb-5.0-ss1331 innodb-5.0-ss1333 innodb-5.0-ss1341 Revision r1279: branches/5.0: Merge changes from MySQL AB: ChangeSet 2006/11/20 22:42:06+02:00 monty@mysql.com Remove compiler warnings (Mostly in DBUG_PRINT() and unused arguments) Fixed bug in query cache when used with traceing (--with-debug) Fixed memory leak in mysqldump Removed warnings from mysqltest scripts (replaced -- with #) mysql-test/t/innodb.test 2006/11/20 22:41:41+02:00 monty@mysql.com +1 -1 Remove mysqltest warnings sql/ha_innodb.cc 2006/11/20 22:41:51+02:00 monty@mysql.com +2 -2 Fixed compiler warning Revision r1319: branches/5.0: Port r1318 from trunk: Add a test case for r1316 (Bug #25927). Revision r1328: branches/5.0: mysql-test: Merge changes from MySQL AB. Revision r1341: branches/5.0: Merge r1340 from trunk: innodb.test, innodb.result: Add test case for Bug #26835. The bug could be reproduced as follows: Define a table so that the first column of the clustered index is a VARCHAR or a UTF-8 CHAR in a collation where sequences of bytes of differing length are considered equivalent. Insert and delete a record. Before the delete-marked record is purged, insert another record whose first column is of different length but equivalent to the first record. Under certain conditions, the insertion can be incorrectly performed as update-in-place. Likewise, an operation that could be done as update-in-place can unnecessarily be performed as delete and insert, but that would not cause corruption but merely degraded performance. Revision r1284: Merge changes from MySQL AB: ChangeSet 2007/01/24 14:49:36+04:00 holyfoot@mysql.com bug #22682 Test fails --without-geometry geometry dependent parts moved to proper .test files mysql-test/r/innodb.result 2007/01/24 14:49:34+04:00 holyfoot@mysql.com +0 -2 result fixed mysql-test/r/innodb_gis.result 2007/01/24 14:49:34+04:00 holyfoot@mysql.com +2 -0 result fixed mysql-test/t/innodb.test 2007/01/24 14:49:34+04:00 holyfoot@mysql.com +0 -6 HAVE_GEOMETRY dependent part moved to innodb_gis.test mysql-test/t/innodb_gis.test 2007/01/24 14:49:35+04:00 holyfoot@mysql.com +6 -0 HAVE_GEOMETRY dependent part moved here from innodb.test Revision r1283: Merge changes from MySQL AB: ChangeSet 2007/01/22 18:42:52+02:00 monty@mysql.com Give warnings for unused objects Changed error message to be compatible with old error file Added new error message for new DUP_ENTRY syntax mysql-test/t/innodb.test 2007/01/22 18:42:49+02:00 monty@mysql.com +14 -14 Changed to use new error message Revision r1186: dict_load_foreign(): Use a local variable instead of the 10-bit field foreign->n_fields in order to preserve ON UPDATE CASCADE and ON DELETE CASCADE flags. For some reason, gcc does not warn about shifting a 10-bit field to right by 24 bits. (Bug #24741) This bug was introduced while reducing the memory footprint of the InnoDB data dictionary (Bug #20877). innodb.test, innodb.result: Add a test case. Revision r1318: Add a test case for r1316 (Bug #25927). Revision r1329: Merge changes from MySQL AB to mysql-test directives. The results are not affected. Revision r1340: innodb.test, innodb.result: Add test case for Bug #26835. The bug could be reproduced as follows: Define a table so that the first column of the clustered index is a VARCHAR or a UTF-8 CHAR in a collation where sequences of bytes of differing length are considered equivalent. Insert and delete a record. Before the delete-marked record is purged, insert another record whose first column is of different length but equivalent to the first record. Under certain conditions, the insertion can be incorrectly performed as update-in-place. Likewise, an operation that could be done as update-in-place can unnecessarily be performed as delete and insert, but that would not cause corruption but merely degraded performance. sql/ha_innodb.cc: NULL MERGE this to 5.1 Apply the following InnoDB snapshots: innodb-5.0-ss1319 innodb-5.0-ss1331 innodb-5.0-ss1333 innodb-5.0-ss1341 Revision r1279: branches/5.0: Merge changes from MySQL AB: ChangeSet 2006/11/20 22:42:06+02:00 monty@mysql.com Remove compiler warnings (Mostly in DBUG_PRINT() and unused arguments) Fixed bug in query cache when used with traceing (--with-debug) Fixed memory leak in mysqldump Removed warnings from mysqltest scripts (replaced -- with #) mysql-test/t/innodb.test 2006/11/20 22:41:41+02:00 monty@mysql.com +1 -1 Remove mysqltest warnings sql/ha_innodb.cc 2006/11/20 22:41:51+02:00 monty@mysql.com +2 -2 Fixed compiler warning Revision r1280: branches/5.0: Merge a change from MySQL AB: ChangeSet 2006/11/30 18:25:05+02:00 monty@mysql.com Fixed portability issue in my_thr_init.c (was added in my last push) Fixed compiler warnings (detected by VC++): - Removed not used variables - Added casts - Fixed wrong assignments to bool - Fixed wrong calls with bool arguments - Added missing argument to store(longlong), which caused wrong store method to be called. sql/ha_innodb.cc 2006/11/30 18:24:53+02:00 monty@mysql.com +0 -1 Removed not used variable Revision r1260: branches/5.0: Fix for Bug# 21409. At low transaction isolation levels we let each consistent read set its own snapshot. Revision r1326: branches/5.0: Merge code from MySQL AB: ChangeSet@1.2417.3.1 2007-02-22 16:59:57+02:00 monty@mysql.fi Fixed compiler warnings (for linux and win32 and win64) --- innobase/dict/dict0dict.c | 36 +++++++++++++++------ innobase/include/rem0rec.ic | 3 ++ innobase/include/sync0sync.ic | 37 ++++++++-------------- innobase/lock/lock0lock.c | 30 ++++++++++++------ innobase/srv/srv0srv.c | 6 ++-- innobase/ut/ut0ut.c | 59 ++++++++++++++++++++++++++++++----- mysql-test/r/innodb.result | 18 +++++++++++ mysql-test/t/innodb.test | 28 +++++++++++++++++ sql/ha_innodb.cc | 9 ++++++ 9 files changed, 172 insertions(+), 54 deletions(-) diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index df48a8a4b5a..33aebb25071 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -2139,9 +2139,12 @@ dict_foreign_find_index( ulint n_cols, /* in: number of columns */ dict_index_t* types_idx, /* in: NULL or an index to whose types the column types must match */ - ibool check_charsets) /* in: whether to check charsets. + ibool check_charsets, /* in: whether to check charsets. only has an effect if types_idx != NULL. */ + ulint check_null) + /* in: nonzero if none of the columns must + be declared NOT NULL */ { #ifndef UNIV_HOTBACKUP dict_index_t* index; @@ -2154,10 +2157,11 @@ dict_foreign_find_index( if (dict_index_get_n_fields(index) >= n_cols) { for (i = 0; i < n_cols; i++) { - col_name = dict_index_get_nth_field(index, i) - ->col->name; - if (dict_index_get_nth_field(index, i) - ->prefix_len != 0) { + dict_field_t* field + = dict_index_get_nth_field(index, i); + + col_name = field->col->name; + if (field->prefix_len != 0) { /* We do not accept column prefix indexes here */ @@ -2169,6 +2173,13 @@ dict_foreign_find_index( break; } + if (check_null + && (field->col->type.prtype + & DATA_NOT_NULL)) { + + return(NULL); + } + if (types_idx && !cmp_types_are_equal( dict_index_get_nth_type(index, i), dict_index_get_nth_type(types_idx, i), @@ -2290,7 +2301,7 @@ dict_foreign_add_to_cache( index = dict_foreign_find_index(ref_table, (const char**) for_in_cache->referenced_col_names, for_in_cache->n_fields, - for_in_cache->foreign_index, check_charsets); + for_in_cache->foreign_index, check_charsets, FALSE); if (index == NULL) { dict_foreign_error_report(ef, for_in_cache, @@ -2317,13 +2328,17 @@ dict_foreign_add_to_cache( index = dict_foreign_find_index(for_table, (const char**) for_in_cache->foreign_col_names, for_in_cache->n_fields, - for_in_cache->referenced_index, check_charsets); + for_in_cache->referenced_index, check_charsets, + for_in_cache->type + & (DICT_FOREIGN_ON_DELETE_SET_NULL + | DICT_FOREIGN_ON_UPDATE_SET_NULL)); if (index == NULL) { dict_foreign_error_report(ef, for_in_cache, "there is no index in the table which would contain\n" "the columns as the first columns, or the data types in the\n" -"table do not match to the ones in the referenced table."); +"table do not match to the ones in the referenced table\n" +"or one of the ON ... SET NULL columns is declared NOT NULL."); if (for_in_cache == foreign) { if (added_to_referenced_list) { @@ -3125,7 +3140,8 @@ col_loop1: /* Try to find an index which contains the columns as the first fields and in the right order */ - index = dict_foreign_find_index(table, column_names, i, NULL, TRUE); + index = dict_foreign_find_index(table, column_names, i, + NULL, TRUE, FALSE); if (!index) { mutex_enter(&dict_foreign_err_mutex); @@ -3390,7 +3406,7 @@ try_find_index: if (referenced_table) { index = dict_foreign_find_index(referenced_table, - column_names, i, foreign->foreign_index, TRUE); + column_names, i, foreign->foreign_index, TRUE, FALSE); if (!index) { dict_foreign_free(foreign); mutex_enter(&dict_foreign_err_mutex); diff --git a/innobase/include/rem0rec.ic b/innobase/include/rem0rec.ic index 9c24f385f4f..1abbb503bab 100644 --- a/innobase/include/rem0rec.ic +++ b/innobase/include/rem0rec.ic @@ -982,6 +982,9 @@ rec_offs_nth_size( { ut_ad(rec_offs_validate(NULL, NULL, offsets)); ut_ad(n < rec_offs_n_fields(offsets)); + if (!n) { + return(rec_offs_base(offsets)[1 + n] & REC_OFFS_MASK); + } return((rec_offs_base(offsets)[1 + n] - rec_offs_base(offsets)[n]) & REC_OFFS_MASK); } diff --git a/innobase/include/sync0sync.ic b/innobase/include/sync0sync.ic index a32a82d6e8b..e5c6f56d8ba 100644 --- a/innobase/include/sync0sync.ic +++ b/innobase/include/sync0sync.ic @@ -6,6 +6,16 @@ Mutex, the basic synchronization primitive Created 9/5/1995 Heikki Tuuri *******************************************************/ +#if defined(not_defined) && defined(__GNUC__) && defined(UNIV_INTEL_X86) +/* %z0: Use the size of operand %0 which in our case is *m to determine +instruction size, it should end up as xchgl. "1" in the input constraint, +says that "in" has to go in the same place as "out".*/ +#define TAS(m, in, out) \ + asm volatile ("xchg%z0 %2, %0" \ + : "=g" (*(m)), "=r" (out) \ + : "1" (in)) /* Note: "1" here refers to "=r" (out) */ +#endif + /********************************************************************** Sets the waiters field in a mutex. */ @@ -85,20 +95,10 @@ mutex_test_and_set( return(res); #elif defined(not_defined) && defined(__GNUC__) && defined(UNIV_INTEL_X86) - ulint* lw; ulint res; - lw = &(mutex->lock_word); + TAS(&mutex->lock_word, 1, res); - /* In assembly we use the so-called AT & T syntax where - the order of operands is inverted compared to the ordinary Intel - syntax. The 'l' after the mnemonics denotes a 32-bit operation. - The line after the code tells which values come out of the asm - code, and the second line tells the input to the asm code. */ - - asm volatile("movl $1, %%eax; xchgl (%%ecx), %%eax" : - "=eax" (res), "=m" (*lw) : - "ecx" (lw)); return(res); #else ibool ret; @@ -137,20 +137,9 @@ mutex_reset_lock_word( __asm MOV ECX, lw __asm XCHG EDX, DWORD PTR [ECX] #elif defined(not_defined) && defined(__GNUC__) && defined(UNIV_INTEL_X86) - ulint* lw; + ulint res; - lw = &(mutex->lock_word); - - /* In assembly we use the so-called AT & T syntax where - the order of operands is inverted compared to the ordinary Intel - syntax. The 'l' after the mnemonics denotes a 32-bit operation. */ - - asm volatile("movl $0, %%eax; xchgl (%%ecx), %%eax" : - "=m" (*lw) : - "ecx" (lw) : - "eax"); /* gcc does not seem to understand - that our asm code resets eax: tell it - explicitly that after the third ':' */ + TAS(&mutex->lock_word, 0, res); #else mutex->lock_word = 0; diff --git a/innobase/lock/lock0lock.c b/innobase/lock/lock0lock.c index 06475c8ef7e..77dfca5fdf4 100644 --- a/innobase/lock/lock0lock.c +++ b/innobase/lock/lock0lock.c @@ -3259,12 +3259,6 @@ lock_deadlock_recursive( *cost = *cost + 1; - if ((depth > LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK) - || (*cost > LOCK_MAX_N_STEPS_IN_DEADLOCK_CHECK)) { - - return(LOCK_VICTIM_IS_START); - } - lock = wait_lock; if (lock_get_type(wait_lock) == LOCK_REC) { @@ -3296,11 +3290,18 @@ lock_deadlock_recursive( if (lock_has_to_wait(wait_lock, lock)) { + ibool too_far + = depth > LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK + || *cost > LOCK_MAX_N_STEPS_IN_DEADLOCK_CHECK; + lock_trx = lock->trx; - if (lock_trx == start) { + if (lock_trx == start || too_far) { + /* We came back to the recursion starting - point: a deadlock detected */ + point: a deadlock detected; or we have + searched the waits-for graph too long */ + FILE* ef = lock_latest_err_file; rewind(ef); @@ -3342,9 +3343,20 @@ lock_deadlock_recursive( } #ifdef UNIV_DEBUG if (lock_print_waits) { - fputs("Deadlock detected\n", stderr); + fputs("Deadlock detected" + " or too long search\n", + stderr); } #endif /* UNIV_DEBUG */ + if (too_far) { + + fputs("TOO DEEP OR LONG SEARCH" + " IN THE LOCK TABLE" + " WAITS-FOR GRAPH\n", ef); + + return(LOCK_VICTIM_IS_START); + } + if (ut_dulint_cmp(wait_lock->trx->undo_no, start->undo_no) >= 0) { /* Our recursion starting point diff --git a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c index fe9e08d65be..96c0f05111b 100644 --- a/innobase/srv/srv0srv.c +++ b/innobase/srv/srv0srv.c @@ -1822,14 +1822,14 @@ srv_export_innodb_status(void) export_vars.innodb_pages_written= buf_pool->n_pages_written; export_vars.innodb_row_lock_waits= srv_n_lock_wait_count; export_vars.innodb_row_lock_current_waits= srv_n_lock_wait_current_count; - export_vars.innodb_row_lock_time= srv_n_lock_wait_time / 10000; + export_vars.innodb_row_lock_time= srv_n_lock_wait_time / 1000; if (srv_n_lock_wait_count > 0) { export_vars.innodb_row_lock_time_avg = (ulint) - (srv_n_lock_wait_time / 10000 / srv_n_lock_wait_count); + (srv_n_lock_wait_time / 1000 / srv_n_lock_wait_count); } else { export_vars.innodb_row_lock_time_avg = 0; } - export_vars.innodb_row_lock_time_max= srv_n_lock_max_wait_time / 10000; + export_vars.innodb_row_lock_time_max= srv_n_lock_max_wait_time / 1000; export_vars.innodb_rows_read= srv_n_rows_read; export_vars.innodb_rows_inserted= srv_n_rows_inserted; export_vars.innodb_rows_updated= srv_n_rows_updated; diff --git a/innobase/ut/ut0ut.c b/innobase/ut/ut0ut.c index 1be5939303a..feb03269d91 100644 --- a/innobase/ut/ut0ut.c +++ b/innobase/ut/ut0ut.c @@ -20,6 +20,55 @@ Created 5/11/1994 Heikki Tuuri ibool ut_always_false = FALSE; +#ifdef __WIN__ +/********************************************************************* +NOTE: The Windows epoch starts from 1601/01/01 whereas the Unix +epoch starts from 1970/1/1. For selection of constant see: +http://support.microsoft.com/kb/167296/ */ +#define WIN_TO_UNIX_DELTA_USEC ((ib_longlong) 11644473600000000ULL) + + +/********************************************************************* +This is the Windows version of gettimeofday(2).*/ +static +int +ut_gettimeofday( +/*============*/ + /* out: 0 if all OK else -1 */ + struct timeval* tv, /* out: Values are relative to Unix epoch */ + void* tz) /* in: not used */ +{ + FILETIME ft; + ib_longlong tm; + + if (!tv) { + errno = EINVAL; + return(-1); + } + + GetSystemTimeAsFileTime(&ft); + + tm = (ib_longlong) ft.dwHighDateTime << 32; + tm |= ft.dwLowDateTime; + + ut_a(tm >= 0); /* If tm wraps over to negative, the quotient / 10 + does not work */ + + tm /= 10; /* Convert from 100 nsec periods to usec */ + + /* If we don't convert to the Unix epoch the value for + struct timeval::tv_sec will overflow.*/ + tm -= WIN_TO_UNIX_DELTA_USEC; + + tv->tv_sec = (long) (tm / 1000000L); + tv->tv_usec = (long) (tm % 1000000L); + + return(0); +} +#else +#define ut_gettimeofday gettimeofday +#endif + /********************************************************************* Get the quote character to be used in SQL identifiers. This definition must match the one in sql/ha_innodb.cc! */ @@ -82,17 +131,11 @@ ut_usectime( ulint* sec, /* out: seconds since the Epoch */ ulint* ms) /* out: microseconds since the Epoch+*sec */ { -#ifdef __WIN__ - SYSTEMTIME st; - GetLocalTime(&st); - *sec = (ulint) st.wSecond; - *ms = (ulint) st.wMilliseconds; -#else struct timeval tv; - gettimeofday(&tv,NULL); + + ut_gettimeofday(&tv, NULL); *sec = (ulint) tv.tv_sec; *ms = (ulint) tv.tv_usec; -#endif } /************************************************************** diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 99f0d4100ee..0638152ba42 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -2968,3 +2968,21 @@ a drop table t2, t1; create table t1 (g geometry not null, spatial gk(g)) engine=innodb; ERROR HY000: The used table type doesn't support SPATIAL indexes +CREATE TABLE t1 (a INT, INDEX(a)) ENGINE=InnoDB; +CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t2 VALUES (1); +ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL; +ALTER TABLE t2 MODIFY a INT NOT NULL; +ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150) +DELETE FROM t1; +DROP TABLE t2,t1; +CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY) +ENGINE=InnoDB; +INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4); +DELETE FROM t1; +INSERT INTO t1 VALUES ('DDD'); +SELECT * FROM t1; +a +DDD +DROP TABLE t1; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index aa25677bd99..e762d740d66 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1976,6 +1976,34 @@ drop table t2, t1; --error ER_TABLE_CANT_HANDLE_SPKEYS create table t1 (g geometry not null, spatial gk(g)) engine=innodb; +# +# Bug #25927: Prevent ALTER TABLE ... MODIFY ... NOT NULL on columns +# for which there is a foreign key constraint ON ... SET NULL. +# + +CREATE TABLE t1 (a INT, INDEX(a)) ENGINE=InnoDB; +CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t2 VALUES (1); +ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL; +--replace_regex /'\.\/test\/#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error 1025 +ALTER TABLE t2 MODIFY a INT NOT NULL; +DELETE FROM t1; +DROP TABLE t2,t1; + +# +# Bug #26835: table corruption after delete+insert +# + +CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY) +ENGINE=InnoDB; +INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4); +DELETE FROM t1; +INSERT INTO t1 VALUES ('DDD'); +SELECT * FROM t1; +DROP TABLE t1; + ####################################################################### # # # Please, DO NOT TOUCH this file as well as the innodb.result file. # diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index cbefa9d3949..217f59d4b7e 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -6066,6 +6066,15 @@ ha_innobase::external_lock( trx->isolation_level = innobase_map_isolation_level( (enum_tx_isolation) thd->variables.tx_isolation); + + if (trx->isolation_level <= TRX_ISO_READ_COMMITTED + && trx->global_read_view) { + + /* At low transaction isolation levels we let + each consistent read set its own snapshot */ + + read_view_close_for_mysql(trx); + } } if (trx->isolation_level == TRX_ISO_SERIALIZABLE From 76de7d788cf82f5901ea722f4031177907156f59 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Mar 2007 15:59:35 -0600 Subject: [PATCH 017/153] Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Fixes: - Bug #21409: Incorrect result returned when in READ-COMMITTED with query_cache ON At low transaction isolation levels we let each consistent read set its own snapshot. - Bug #23666: strange Innodb_row_lock_time_% values in show status; also millisecs wrong On Windows ut_usectime returns secs and usecs relative to the UNIX epoch (which is Jan, 1 1970). - Bug #25494: LATEST DEADLOCK INFORMATION is not always cleared lock_deadlock_recursive(): When the search depth or length is exceeded, rewind lock_latest_err_file and display the two transactions at the point of aborting the search. - Bug #25927: Foreign key with ON DELETE SET NULL on NOT NULL can crash server Prevent ALTER TABLE ... MODIFY ... NOT NULL on columns for which there is a foreign key constraint ON ... SET NULL. - Bug #26835: Repeatable corruption of utf8-enabled tables inside InnoDB The bug could be reproduced as follows: Define a table so that the first column of the clustered index is a VARCHAR or a UTF-8 CHAR in a collation where sequences of bytes of differing length are considered equivalent. Insert and delete a record. Before the delete-marked record is purged, insert another record whose first column is of different length but equivalent to the first record. Under certain conditions, the insertion can be incorrectly performed as update-in-place. Likewise, an operation that could be done as update-in-place can unnecessarily be performed as delete and insert, but that would not cause corruption but merely degraded performance. mysql-test/r/innodb.result: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1284: Merge changes from MySQL AB: ChangeSet 2007/01/24 14:49:36+04:00 holyfoot@mysql.com bug 22682 Test fails --without-geometry geometry dependent parts moved to proper .test files mysql-test/r/innodb.result 2007/01/24 14:49:34+04:00 holyfoot@mysql.com +0 -2 result fixed mysql-test/r/innodb_gis.result 2007/01/24 14:49:34+04:00 holyfoot@mysql.com +2 -0 result fixed mysql-test/t/innodb.test 2007/01/24 14:49:34+04:00 holyfoot@mysql.com +0 -6 HAVE_GEOMETRY dependent part moved to innodb_gis.test mysql-test/t/innodb_gis.test 2007/01/24 14:49:35+04:00 holyfoot@mysql.com +6 -0 HAVE_GEOMETRY dependent part moved here from innodb.test Revision r1186: dict_load_foreign(): Use a local variable instead of the 10-bit field foreign->n_fields in order to preserve ON UPDATE CASCADE and ON DELETE CASCADE flags. For some reason, gcc does not warn about shifting a 10-bit field to right by 24 bits. (Bug 24741) This bug was introduced while reducing the memory footprint of the InnoDB data dictionary (Bug 20877). innodb.test, innodb.result: Add a test case. Revision r1318: Add a test case for r1316 (Bug #25927). Revision r1340: innodb.test, innodb.result: Add test case for Bug #26835. The bug could be reproduced as follows: Define a table so that the first column of the clustered index is a VARCHAR or a UTF-8 CHAR in a collation where sequences of bytes of differing length are considered equivalent. Insert and delete a record. Before the delete-marked record is purged, insert another record whose first column is of different length but equivalent to the first record. Under certain conditions, the insertion can be incorrectly performed as update-in-place. Likewise, an operation that could be done as update-in-place can unnecessarily be performed as delete and insert, but that would not cause corruption but merely degraded performance. mysql-test/t/innodb.test: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1284: Merge changes from MySQL AB: ChangeSet 2007/01/24 14:49:36+04:00 holyfoot@mysql.com bug 22682 Test fails --without-geometry geometry dependent parts moved to proper .test files mysql-test/r/innodb.result 2007/01/24 14:49:34+04:00 holyfoot@mysql.com +0 -2 result fixed mysql-test/r/innodb_gis.result 2007/01/24 14:49:34+04:00 holyfoot@mysql.com +2 -0 result fixed mysql-test/t/innodb.test 2007/01/24 14:49:34+04:00 holyfoot@mysql.com +0 -6 HAVE_GEOMETRY dependent part moved to innodb_gis.test mysql-test/t/innodb_gis.test 2007/01/24 14:49:35+04:00 holyfoot@mysql.com +6 -0 HAVE_GEOMETRY dependent part moved here from innodb.test Revision r1283: Merge changes from MySQL AB: ChangeSet 2007/01/22 18:42:52+02:00 monty@mysql.com Give warnings for unused objects Changed error message to be compatible with old error file Added new error message for new DUP_ENTRY syntax mysql-test/t/innodb.test 2007/01/22 18:42:49+02:00 monty@mysql.com +14 -14 Changed to use new error message Revision r1186: dict_load_foreign(): Use a local variable instead of the 10-bit field foreign->n_fields in order to preserve ON UPDATE CASCADE and ON DELETE CASCADE flags. For some reason, gcc does not warn about shifting a 10-bit field to right by 24 bits. (Bug 24741) This bug was introduced while reducing the memory footprint of the InnoDB data dictionary (Bug 20877). innodb.test, innodb.result: Add a test case. Revision r1318: Add a test case for r1316 (Bug #25927). Revision r1329: Merge changes from MySQL AB to mysql-test directives. The results are not affected. Revision r1340: innodb.test, innodb.result: Add test case for Bug #26835. The bug could be reproduced as follows: Define a table so that the first column of the clustered index is a VARCHAR or a UTF-8 CHAR in a collation where sequences of bytes of differing length are considered equivalent. Insert and delete a record. Before the delete-marked record is purged, insert another record whose first column is of different length but equivalent to the first record. Under certain conditions, the insertion can be incorrectly performed as update-in-place. Likewise, an operation that could be done as update-in-place can unnecessarily be performed as delete and insert, but that would not cause corruption but merely degraded performance. storage/innobase/buf/buf0buf.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/buf/buf0flu.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/buf/buf0lru.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/dict/dict0boot.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/dict/dict0crea.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. Revision r1324: Merge changes from MySQL AB: ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0 Fixed compiler warnings ... Fixed compiler warnings detected on windows64 storage/innobase/dict/dict0dict.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. Revision r1316: Prevent ALTER TABLE ... MODIFY ... NOT NULL on columns for which there is a foreign key constraint ON ... SET NULL. (Bug #25927) dict_foreign_find_index(): Add paramettter check_null. dict_foreign_add_to_cache(): Do not allow ON DELETE SET NULL or ON UPDATE SET NULL if any of the referencing columns are declared NOT NULL. Revision r1324: Merge changes from MySQL AB: ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0 Fixed compiler warnings ... Fixed compiler warnings detected on windows64 storage/innobase/dict/dict0load.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1186: dict_load_foreign(): Use a local variable instead of the 10-bit field foreign->n_fields in order to preserve ON UPDATE CASCADE and ON DELETE CASCADE flags. For some reason, gcc does not warn about shifting a 10-bit field to right by 24 bits. (Bug 24741) This bug was introduced while reducing the memory footprint of the InnoDB data dictionary (Bug 20877). innodb.test, innodb.result: Add a test case. Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. Revision r1324: Merge changes from MySQL AB: ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0 Fixed compiler warnings ... Fixed compiler warnings detected on windows64 storage/innobase/fil/fil0fil.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/fsp/fsp0fsp.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/ha/ha0ha.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/handler/ha_innodb.cc: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1204: Change this in ha_innobase: void* innobase_prebuilt; to this: row_prebuilt_t* prebuilt; by introducing the typedef in ha_innodb.h, and remove all the now needless local variables and casts in ha_innodb.cc. Revision r1298: ha_innodb.cc: Remove all references to thd->ha_data[hton->slot]. thd_to_trx(thd, hton): Accessor for getting the InnoDB trx object of a MySQL thread object and an InnoDB handlerton. Revision r1292: Remove the declarations of some global functions in ha_innodb.h and declare them static in ha_innodb.cc. These functions are invoked via function pointers in handlerton. Revision r1300: ha_innodb.cc: Replace thd->tablespace_op with thd_tablespace_op(thd). Plugins must treat class THD as an opaque type. Revision r1198: Merge a change from MySQL AB: ChangeSet@1.2372, 2006-12-31 02:29:11+01:00, kent@mysql.com +79 -0 Many files: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header Added GPL copyright text Revision r1271: Merge changes from MySQL AB: Rename some FIELD_TYPE_ constants to MYSQL_TYPE_. Change the scope of a type cast of two dividends. Revision r1299: ha_innodb.cc: Replace thd->in_lock_tables with thd_in_lock_tables(thd). Plugins must treat class THD as an opaque type. Revision r1201: Apply patch from MySQL: ChangeSet@1.2353, 2006-12-19 16:57:51-07:00, tsmith@siva.hindu.god +13 -0 Added innodb_rollback_on_timeout option to restore the 4.1 InnoDB timeout behavior (Bug 24200) Revision r1322: ha_innodb.cc: Remove the unused innobase_repl_ variables. Revision r1324: Merge changes from MySQL AB: ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0 Fixed compiler warnings ... Fixed compiler warnings detected on windows64 Revision r1334: Fix for Bug# 21409. At low transaction isolation levels we let each consistent read set its own snapshot storage/innobase/handler/ha_innodb.h: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1204: Change this in ha_innobase: void* innobase_prebuilt; to this: row_prebuilt_t* prebuilt; by introducing the typedef in ha_innodb.h, and remove all the now needless local variables and casts in ha_innodb.cc. Revision r1292: Remove the declarations of some global functions in ha_innodb.h and declare them static in ha_innodb.cc. These functions are invoked via function pointers in handlerton. Revision r1198: Merge a change from MySQL AB: ChangeSet@1.2372, 2006-12-31 02:29:11+01:00, kent@mysql.com +79 -0 Many files: Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header Adjusted year(s) in copyright header Added GPL copyright text Revision r1201: Apply patch from MySQL: ChangeSet@1.2353, 2006-12-19 16:57:51-07:00, tsmith@siva.hindu.god +13 -0 Added innodb_rollback_on_timeout option to restore the 4.1 InnoDB timeout behavior (Bug 24200) storage/innobase/ibuf/ibuf0ibuf.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/include/buf0buf.ic: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/include/buf0flu.ic: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/include/dict0dict.ic: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/include/ha0ha.ic: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/include/lock0lock.ic: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/include/log0log.ic: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/include/mem0mem.h: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1241: Remove the unused function mem_strdupq(). storage/innobase/include/mem0mem.ic: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1241: Remove the unused function mem_strdupq(). storage/innobase/include/rem0rec.ic: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1338: rec_offs_nth_size(): Treat n==0 as a special case. (Bug #26835) storage/innobase/include/sync0rw.ic: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/include/sync0sync.h: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. Revision r1247: Rename mutex_enter_nowait to mutex_enter_nowait_func and add macro mutex_enter_nowait that supplies the default __FILE__ and __LINE__ arguments. Adjust callers. storage/innobase/include/sync0sync.ic: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1294: Fixed inline asm code, it didn't work with GCC > ver 3.x. Revision r1244: Add ut_ad() debug assertions. UT_LIST_ADD_FIRST(), UT_LIST_ADD_LAST(), UT_LIST_INSERT_AFTER(): Assert against some trivial cases of cyclic lists. mutex_enter_func(): Assert that the current thread is not holding the mutex. Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/include/trx0sys.ic: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/include/univ.i: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1285: Merge a change from MySQL AB: ChangeSet 2006/10/26 15:41:47-04:00 iggy@amd64. Post Merge Cleanup storage/innobase/include/univ.i 2006/10/26 15:38:50-04:00 iggy@amd64. +9 -0 Post Merge Cleanup storage/innobase/include/ut0lst.h: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1244: Add ut_ad() debug assertions. UT_LIST_ADD_FIRST(), UT_LIST_ADD_LAST(), UT_LIST_INSERT_AFTER(): Assert against some trivial cases of cyclic lists. mutex_enter_func(): Assert that the current thread is not holding the mutex. storage/innobase/lock/lock0lock.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. Revision r1330: lock_deadlock_recursive(): When the search depth or length is exceeded, rewind lock_latest_err_file and display the two transactions at the point of aborting the search. (Bug #25494) Revision r1332: lock_deadlock_recursive(): When aborting the search, display a note regardless of start->undo_no. Otherwise, aborted searches may show up as genuine deadlocks. This mistake was made in r1330. storage/innobase/log/log0log.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. Revision r1247: Rename mutex_enter_nowait to mutex_enter_nowait_func and add macro mutex_enter_nowait that supplies the default __FILE__ and __LINE__ arguments. Adjust callers. storage/innobase/log/log0recv.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/mem/mem0pool.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/pars/pars0pars.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/que/que0que.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/read/read0read.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/row/row0mysql.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. Revision r1201: Apply patch from MySQL: ChangeSet@1.2353, 2006-12-19 16:57:51-07:00, tsmith@siva.hindu.god +13 -0 Added innodb_rollback_on_timeout option to restore the 4.1 InnoDB timeout behavior (Bug 24200) Revision r1324: Merge changes from MySQL AB: ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0 Fixed compiler warnings ... Fixed compiler warnings detected on windows64 storage/innobase/row/row0vers.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/srv/srv0que.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/srv/srv0srv.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1262: Fix for Bug# 23666. On Windows ut_usectime returns secs and usecs relative to the UNIX epoch (which is Jan, 1 1970). Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/sync/sync0rw.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. Revision r1247: Rename mutex_enter_nowait to mutex_enter_nowait_func and add macro mutex_enter_nowait that supplies the default __FILE__ and __LINE__ arguments. Adjust callers. Revision r1324: Merge changes from MySQL AB: ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0 Fixed compiler warnings ... Fixed compiler warnings detected on windows64 storage/innobase/sync/sync0sync.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. Revision r1247: Rename mutex_enter_nowait to mutex_enter_nowait_func and add macro mutex_enter_nowait that supplies the default __FILE__ and __LINE__ arguments. Adjust callers. storage/innobase/thr/thr0loc.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/trx/trx0purge.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/trx/trx0roll.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/trx/trx0rseg.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/trx/trx0sys.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/trx/trx0trx.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. Revision r1324: Merge changes from MySQL AB: ChangeSet@1.2452, 2007-02-23 13:13:55+02:00, monty@mysql.com +177 -0 Fixed compiler warnings ... Fixed compiler warnings detected on windows64 storage/innobase/trx/trx0undo.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/usr/usr0sess.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1242: Merge r1239 from branches/zip: Make mutex_own() work with UNIV_DEBUG, without UNIV_SYNC_DEBUG. storage/innobase/ut/ut0ut.c: Apply the following InnoDB snapshots: innodb-5.1-ss1318 innodb-5.1-ss1330 innodb-5.1-ss1332 innodb-5.1-ss1340 Revision r1262: Fix for Bug# 23666. On Windows ut_usectime returns secs and usecs relative to the UNIX epoch (which is Jan, 1 1970). --- mysql-test/r/innodb.result | 18 ++ mysql-test/t/innodb.test | 28 ++ storage/innobase/buf/buf0buf.c | 7 +- storage/innobase/buf/buf0flu.c | 9 - storage/innobase/buf/buf0lru.c | 17 +- storage/innobase/dict/dict0boot.c | 2 - storage/innobase/dict/dict0crea.c | 20 -- storage/innobase/dict/dict0dict.c | 69 ++--- storage/innobase/dict/dict0load.c | 22 -- storage/innobase/fil/fil0fil.c | 17 +- storage/innobase/fsp/fsp0fsp.c | 21 +- storage/innobase/ha/ha0ha.c | 11 +- storage/innobase/handler/ha_innodb.cc | 429 ++++++++++++++------------ storage/innobase/handler/ha_innodb.h | 101 +----- storage/innobase/ibuf/ibuf0ibuf.c | 15 +- storage/innobase/include/buf0buf.ic | 11 +- storage/innobase/include/buf0flu.ic | 2 +- storage/innobase/include/dict0dict.ic | 6 - storage/innobase/include/ha0ha.ic | 8 - storage/innobase/include/lock0lock.ic | 2 - storage/innobase/include/log0log.ic | 4 - storage/innobase/include/mem0mem.h | 11 - storage/innobase/include/mem0mem.ic | 35 --- storage/innobase/include/rem0rec.ic | 3 + storage/innobase/include/sync0rw.ic | 3 +- storage/innobase/include/sync0sync.h | 43 +-- storage/innobase/include/sync0sync.ic | 51 ++- storage/innobase/include/trx0sys.ic | 20 -- storage/innobase/include/univ.i | 12 +- storage/innobase/include/ut0lst.h | 3 + storage/innobase/lock/lock0lock.c | 121 ++------ storage/innobase/log/log0log.c | 56 +--- storage/innobase/log/log0recv.c | 11 +- storage/innobase/mem/mem0pool.c | 2 - storage/innobase/pars/pars0pars.c | 3 +- storage/innobase/que/que0que.c | 15 - storage/innobase/read/read0read.c | 10 +- storage/innobase/row/row0mysql.c | 12 +- storage/innobase/row/row0vers.c | 2 +- storage/innobase/srv/srv0que.c | 3 - storage/innobase/srv/srv0srv.c | 16 +- storage/innobase/sync/sync0rw.c | 9 +- storage/innobase/sync/sync0sync.c | 56 ++-- storage/innobase/thr/thr0loc.c | 2 - storage/innobase/trx/trx0purge.c | 19 +- storage/innobase/trx/trx0roll.c | 14 - storage/innobase/trx/trx0rseg.c | 4 - storage/innobase/trx/trx0sys.c | 6 - storage/innobase/trx/trx0trx.c | 38 --- storage/innobase/trx/trx0undo.c | 34 +- storage/innobase/usr/usr0sess.c | 8 +- storage/innobase/ut/ut0ut.c | 59 +++- 52 files changed, 518 insertions(+), 982 deletions(-) diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index f2d504f555f..4d104c64fa9 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -3159,3 +3159,21 @@ t2 CREATE TABLE `t2` ( CONSTRAINT `t2_t1` FOREIGN KEY (`id`) REFERENCES `t1` (`id`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DROP TABLE t2, t1; +CREATE TABLE t1 (a INT, INDEX(a)) ENGINE=InnoDB; +CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t2 VALUES (1); +ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL; +ALTER TABLE t2 MODIFY a INT NOT NULL; +ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150) +DELETE FROM t1; +DROP TABLE t2,t1; +CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY) +ENGINE=InnoDB; +INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4); +DELETE FROM t1; +INSERT INTO t1 VALUES ('DDD'); +SELECT * FROM t1; +a +DDD +DROP TABLE t1; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 0937b4fd30d..c4b8491b39d 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -2293,6 +2293,34 @@ DELETE CASCADE ON UPDATE CASCADE; SHOW CREATE TABLE t2; DROP TABLE t2, t1; +# +# Bug #25927: Prevent ALTER TABLE ... MODIFY ... NOT NULL on columns +# for which there is a foreign key constraint ON ... SET NULL. +# + +CREATE TABLE t1 (a INT, INDEX(a)) ENGINE=InnoDB; +CREATE TABLE t2 (a INT, INDEX(a)) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +INSERT INTO t2 VALUES (1); +ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1 (a) ON DELETE SET NULL; +--replace_regex /'\.\/test\/#sql-[0-9a-f_]*'/'#sql-temporary'/ +--error 1025 +ALTER TABLE t2 MODIFY a INT NOT NULL; +DELETE FROM t1; +DROP TABLE t2,t1; + +# +# Bug #26835: table corruption after delete+insert +# + +CREATE TABLE t1 (a VARCHAR(5) COLLATE utf8_unicode_ci PRIMARY KEY) +ENGINE=InnoDB; +INSERT INTO t1 VALUES (0xEFBCA4EFBCA4EFBCA4); +DELETE FROM t1; +INSERT INTO t1 VALUES ('DDD'); +SELECT * FROM t1; +DROP TABLE t1; + ####################################################################### # # # Please, DO NOT TOUCH this file as well as the innodb.result file. # diff --git a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c index ad775fbd6d5..c847b8db9e2 100644 --- a/storage/innobase/buf/buf0buf.c +++ b/storage/innobase/buf/buf0buf.c @@ -802,9 +802,7 @@ buf_awe_map_page_to_frame( { buf_block_t* bck; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(block); if (block->frame) { @@ -900,9 +898,7 @@ buf_block_make_young( /*=================*/ buf_block_t* block) /* in: block to make younger */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* Note that we read freed_page_clock's without holding any mutex: this is allowed since the result is used only in heuristics */ @@ -1635,10 +1631,9 @@ buf_page_init( in units of a page */ buf_block_t* block) /* in: block to init */ { -#ifdef UNIV_SYNC_DEBUG + ut_ad(mutex_own(&(buf_pool->mutex))); ut_ad(mutex_own(&(block->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(block->state != BUF_BLOCK_FILE_PAGE); /* Set the state of the block */ diff --git a/storage/innobase/buf/buf0flu.c b/storage/innobase/buf/buf0flu.c index 650c9d5d707..423c08c0569 100644 --- a/storage/innobase/buf/buf0flu.c +++ b/storage/innobase/buf/buf0flu.c @@ -48,10 +48,7 @@ buf_flush_insert_into_flush_list( /*=============================*/ buf_block_t* block) /* in: block which is modified */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ - ut_a(block->state == BUF_BLOCK_FILE_PAGE); ut_ad((UT_LIST_GET_FIRST(buf_pool->flush_list) == NULL) @@ -77,9 +74,7 @@ buf_flush_insert_sorted_into_flush_list( buf_block_t* prev_b; buf_block_t* b; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ prev_b = NULL; b = UT_LIST_GET_FIRST(buf_pool->flush_list); @@ -111,10 +106,8 @@ buf_flush_ready_for_replace( buf_block_t* block) /* in: buffer control block, must be in state BUF_BLOCK_FILE_PAGE and in the LRU list */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); ut_ad(mutex_own(&block->mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (block->state != BUF_BLOCK_FILE_PAGE) { ut_print_timestamp(stderr); fprintf(stderr, @@ -147,10 +140,8 @@ buf_flush_ready_for_flush( BUF_BLOCK_FILE_PAGE */ ulint flush_type)/* in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); ut_ad(mutex_own(&(block->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(block->state == BUF_BLOCK_FILE_PAGE); if ((ut_dulint_cmp(block->oldest_modification, ut_dulint_zero) > 0) diff --git a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c index 377552ece6c..1e27144bdbf 100644 --- a/storage/innobase/buf/buf0lru.c +++ b/storage/innobase/buf/buf0lru.c @@ -549,9 +549,7 @@ buf_LRU_old_adjust_len(void) ulint new_len; ut_a(buf_pool->LRU_old); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(3 * (BUF_LRU_OLD_MIN_LEN / 8) > BUF_LRU_OLD_TOLERANCE + 5); for (;;) { @@ -593,6 +591,7 @@ buf_LRU_old_init(void) { buf_block_t* block; + ut_ad(mutex_own(&(buf_pool->mutex))); ut_a(UT_LIST_GET_LEN(buf_pool->LRU) == BUF_LRU_OLD_MIN_LEN); /* We first initialize all blocks in the LRU list as old and then use @@ -624,9 +623,7 @@ buf_LRU_remove_block( { ut_ad(buf_pool); ut_ad(block); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(block->state == BUF_BLOCK_FILE_PAGE); ut_a(block->in_LRU_list); @@ -690,9 +687,7 @@ buf_LRU_add_block_to_end_low( ut_ad(buf_pool); ut_ad(block); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(block->state == BUF_BLOCK_FILE_PAGE); @@ -755,9 +750,7 @@ buf_LRU_add_block_low( ut_ad(buf_pool); ut_ad(block); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(block->state == BUF_BLOCK_FILE_PAGE); ut_a(!block->in_LRU_list); @@ -858,10 +851,9 @@ buf_LRU_block_free_non_file_page( /*=============================*/ buf_block_t* block) /* in: block, must not contain a file page */ { -#ifdef UNIV_SYNC_DEBUG + ut_ad(mutex_own(&(buf_pool->mutex))); ut_ad(mutex_own(&block->mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(block); ut_a((block->state == BUF_BLOCK_MEMORY) @@ -898,10 +890,8 @@ buf_LRU_block_remove_hashed_page( be in a state where it can be freed; there may or may not be a hash index to the page */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); ut_ad(mutex_own(&block->mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(block); ut_a(block->state == BUF_BLOCK_FILE_PAGE); @@ -961,10 +951,9 @@ buf_LRU_block_free_hashed_page( buf_block_t* block) /* in: block, must contain a file page and be in a state where it can be freed */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); ut_ad(mutex_own(&block->mutex)); -#endif /* UNIV_SYNC_DEBUG */ + ut_a(block->state == BUF_BLOCK_REMOVE_HASH); block->state = BUF_BLOCK_MEMORY; diff --git a/storage/innobase/dict/dict0boot.c b/storage/innobase/dict/dict0boot.c index 08515d8fb13..f8849008854 100644 --- a/storage/innobase/dict/dict0boot.c +++ b/storage/innobase/dict/dict0boot.c @@ -86,9 +86,7 @@ dict_hdr_flush_row_id(void) dulint id; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ id = dict_sys->row_id; diff --git a/storage/innobase/dict/dict0crea.c b/storage/innobase/dict/dict0crea.c index 76474c72c43..e060d45768e 100644 --- a/storage/innobase/dict/dict0crea.c +++ b/storage/innobase/dict/dict0crea.c @@ -212,9 +212,7 @@ dict_build_table_def_step( ulint i; ulint row_len; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ table = node->table; @@ -312,9 +310,7 @@ dict_create_sys_indexes_tuple( dfield_t* dfield; byte* ptr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(index && heap); sys_indexes = dict_sys->sys_indexes; @@ -512,9 +508,7 @@ dict_build_index_def_step( dtuple_t* row; trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx = thr_get_trx(thr); @@ -585,9 +579,7 @@ dict_create_index_tree_step( btr_pcur_t pcur; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ index = node->index; table = node->table; @@ -642,10 +634,7 @@ dict_drop_index_tree( byte* ptr; ulint len; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ - ut_a(!dict_table_is_comp(dict_sys->sys_indexes)); ptr = rec_get_nth_field_old(rec, DICT_SYS_INDEXES_PAGE_NO_FIELD, &len); @@ -718,10 +707,7 @@ dict_truncate_index_tree( ulint comp; dict_index_t* index; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ - ut_a(!dict_table_is_comp(dict_sys->sys_indexes)); rec = btr_pcur_get_rec(pcur); ptr = rec_get_nth_field_old(rec, DICT_SYS_INDEXES_PAGE_NO_FIELD, &len); @@ -907,9 +893,7 @@ dict_create_table_step( trx_t* trx; ut_ad(thr); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx = thr_get_trx(thr); @@ -1016,9 +1000,7 @@ dict_create_index_step( trx_t* trx; ut_ad(thr); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx = thr_get_trx(thr); @@ -1440,9 +1422,7 @@ dict_create_add_foreigns_to_dictionary( ulint number = start_id + 1; ulint error; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (NULL == dict_table_get_low("SYS_FOREIGN")) { fprintf(stderr, diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c index 6ae02c0b81a..e07d84a1ee0 100644 --- a/storage/innobase/dict/dict0dict.c +++ b/storage/innobase/dict/dict0dict.c @@ -689,9 +689,7 @@ dict_table_get_on_id( if we are doing a rollback to handle an error in TABLE CREATE, for example, we already have the mutex! */ -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ return(dict_table_get_on_id_low(table_id)); } @@ -854,9 +852,7 @@ dict_table_add_to_cache( ulint row_len; ut_ad(table); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(table->n_def == table->n_cols - DATA_N_SYS_COLS); ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); ut_ad(table->cached == FALSE); @@ -1003,9 +999,7 @@ dict_table_rename_in_cache( ibool success; ut_ad(table); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ old_size = mem_heap_get_size(table->heap); @@ -1209,9 +1203,7 @@ dict_table_change_id_in_cache( dulint new_id) /* in: new id to set */ { ut_ad(table); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); /* Remove the table from the hash table of id's */ @@ -1238,9 +1230,7 @@ dict_table_remove_from_cache( ulint size; ut_ad(table); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); #if 0 @@ -1354,9 +1344,7 @@ dict_index_add_to_cache( ulint i; ut_ad(index); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(index->n_def == index->n_fields); ut_ad(index->magic_n == DICT_INDEX_MAGIC_N); @@ -1452,9 +1440,7 @@ dict_index_remove_from_cache( ut_ad(table && index); ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); ut_ad(index->magic_n == DICT_INDEX_MAGIC_N); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ rw_lock_free(&index->lock); @@ -1484,9 +1470,7 @@ dict_index_find_cols( ut_ad(table && index); ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ for (i = 0; i < index->n_fields; i++) { ulint j; @@ -1648,9 +1632,7 @@ dict_index_build_internal_clust( ut_ad(table && index); ut_ad(index->type & DICT_CLUSTERED); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); /* Create a new index object with certainly enough fields */ @@ -1803,9 +1785,7 @@ dict_index_build_internal_non_clust( ut_ad(table && index); ut_ad(0 == (index->type & DICT_CLUSTERED)); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(table->magic_n == DICT_TABLE_MAGIC_N); /* The clustered index should be the first in the list of indexes */ @@ -1918,9 +1898,7 @@ dict_foreign_remove_from_cache( /*===========================*/ dict_foreign_t* foreign) /* in, own: foreign constraint */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(foreign); if (foreign->referenced_table) { @@ -1951,9 +1929,7 @@ dict_foreign_find( { dict_foreign_t* foreign; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ foreign = UT_LIST_GET_FIRST(table->foreign_list); @@ -1994,9 +1970,12 @@ dict_foreign_find_index( ulint n_cols, /* in: number of columns */ dict_index_t* types_idx, /* in: NULL or an index to whose types the column types must match */ - ibool check_charsets) + ibool check_charsets, /* in: whether to check charsets. only has an effect if types_idx != NULL */ + ulint check_null) + /* in: nonzero if none of the columns must + be declared NOT NULL */ { dict_index_t* index; dict_field_t* field; @@ -2026,6 +2005,12 @@ dict_foreign_find_index( break; } + if (check_null + && (field->col->prtype & DATA_NOT_NULL)) { + + return(NULL); + } + if (types_idx && !cmp_cols_are_equal( dict_index_get_nth_col(index, i), dict_index_get_nth_col(types_idx, @@ -2113,9 +2098,7 @@ dict_foreign_add_to_cache( ibool added_to_referenced_list= FALSE; FILE* ef = dict_foreign_err_file; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ for_table = dict_table_check_if_in_cache_low( foreign->foreign_table_name); @@ -2144,7 +2127,7 @@ dict_foreign_add_to_cache( ref_table, (const char**) for_in_cache->referenced_col_names, for_in_cache->n_fields, for_in_cache->foreign_index, - check_charsets); + check_charsets, FALSE); if (index == NULL) { dict_foreign_error_report( @@ -2176,7 +2159,10 @@ dict_foreign_add_to_cache( for_table, (const char**) for_in_cache->foreign_col_names, for_in_cache->n_fields, - for_in_cache->referenced_index, check_charsets); + for_in_cache->referenced_index, check_charsets, + for_in_cache->type + & (DICT_FOREIGN_ON_DELETE_SET_NULL + | DICT_FOREIGN_ON_UPDATE_SET_NULL)); if (index == NULL) { dict_foreign_error_report( @@ -2186,7 +2172,9 @@ dict_foreign_add_to_cache( "the columns as the first columns," " or the data types in the\n" "table do not match" - " the ones in the referenced table."); + " the ones in the referenced table\n" + "or one of the ON ... SET NULL columns" + " is declared NOT NULL."); if (for_in_cache == foreign) { if (added_to_referenced_list) { @@ -2794,9 +2782,7 @@ dict_create_foreign_constraints_low( const char* column_names[500]; const char* referenced_table_name; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ table = dict_table_get_low(name); @@ -2994,7 +2980,8 @@ col_loop1: /* Try to find an index which contains the columns as the first fields and in the right order */ - index = dict_foreign_find_index(table, column_names, i, NULL, TRUE); + index = dict_foreign_find_index(table, column_names, i, + NULL, TRUE, FALSE); if (!index) { mutex_enter(&dict_foreign_err_mutex); @@ -3265,7 +3252,8 @@ try_find_index: if (referenced_table) { index = dict_foreign_find_index(referenced_table, column_names, i, - foreign->foreign_index, TRUE); + foreign->foreign_index, + TRUE, FALSE); if (!index) { dict_foreign_free(foreign); mutex_enter(&dict_foreign_err_mutex); @@ -3425,9 +3413,7 @@ dict_foreign_parse_drop_constraints( str = dict_strip_comments(*(trx->mysql_query_str)); ptr = str; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ loop: ptr = dict_scan_to(ptr, "DROP"); @@ -3864,9 +3850,7 @@ dict_foreign_print_low( { ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ fprintf(stderr, " FOREIGN KEY CONSTRAINT %s: %s (", foreign->id, foreign->foreign_table_name); @@ -3931,9 +3915,7 @@ dict_table_print_low( dict_foreign_t* foreign; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ dict_update_statistics_low(table, TRUE); @@ -3989,9 +3971,7 @@ dict_col_print_low( { dtype_t type; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ dict_col_copy_type(col, &type); fprintf(stderr, "%s: ", dict_table_get_col_name(table, @@ -4011,9 +3991,7 @@ dict_index_print_low( ib_longlong n_vals; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (index->n_user_defined_cols > 0) { n_vals = index->stat_n_diff_key_vals[ @@ -4061,9 +4039,8 @@ dict_field_print_low( /*=================*/ dict_field_t* field) /* in: field */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ + fprintf(stderr, " %s", field->name); if (field->prefix_len != 0) { diff --git a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.c index e23795f9898..ba2e25cf031 100644 --- a/storage/innobase/dict/dict0load.c +++ b/storage/innobase/dict/dict0load.c @@ -67,9 +67,7 @@ dict_get_first_table_name_in_db( ulint len; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ heap = mem_heap_create(1000); @@ -353,9 +351,7 @@ dict_load_columns( ulint i; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ mtr_start(&mtr); @@ -478,11 +474,7 @@ dict_load_fields( ulint i; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ - - UT_NOT_USED(table); mtr_start(&mtr); @@ -586,9 +578,7 @@ dict_load_indexes( dulint id; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if ((ut_dulint_get_high(table->id) == 0) && (ut_dulint_get_low(table->id) < DICT_HDR_FIRST_ID)) { @@ -754,9 +744,7 @@ dict_load_table( ulint err; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ heap = mem_heap_create(1000); @@ -920,9 +908,7 @@ dict_load_table_on_id( dict_table_t* table; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* NOTE that the operation of this function is protected by the dictionary mutex, and therefore no deadlocks can occur @@ -1003,9 +989,7 @@ dict_load_sys_table( { mem_heap_t* heap; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ heap = mem_heap_create(1000); @@ -1035,9 +1019,7 @@ dict_load_foreign_cols( ulint i; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ foreign->foreign_col_names = mem_heap_alloc( foreign->heap, foreign->n_fields * sizeof(void*)); @@ -1113,9 +1095,7 @@ dict_load_foreign( ulint n_fields_and_type; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ heap2 = mem_heap_create(1000); @@ -1243,9 +1223,7 @@ dict_load_foreigns( ulint err; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ sys_foreign = dict_table_get_low("SYS_FOREIGN"); diff --git a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c index 883fbd09ee4..c63d67cae60 100644 --- a/storage/innobase/fil/fil0fil.c +++ b/storage/innobase/fil/fil0fil.c @@ -409,9 +409,7 @@ fil_space_is_flushed( { fil_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(fil_system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ node = UT_LIST_GET_FIRST(space->chain); @@ -514,9 +512,7 @@ fil_node_open_file( ulint space_id; #endif /* !UNIV_HOTBACKUP */ -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(node->n_pending == 0); ut_a(node->open == FALSE); @@ -660,9 +656,7 @@ fil_node_close_file( ibool ret; ut_ad(node && system); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(node->open); ut_a(node->n_pending == 0); ut_a(node->n_pending_flushes == 0); @@ -705,9 +699,8 @@ fil_try_to_close_file_in_LRU( fil_system_t* system = fil_system; fil_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ + node = UT_LIST_GET_LAST(system->LRU); if (print_info) { @@ -765,9 +758,7 @@ fil_mutex_enter_and_prepare_for_io( ulint count = 0; ulint count2 = 0; -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&(system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ retry: mutex_enter(&(system->mutex)); @@ -881,9 +872,7 @@ fil_node_free( fil_space_t* space) /* in: space where the file node is chained */ { ut_ad(node && system && space); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(node->magic_n == FIL_NODE_MAGIC_N); ut_a(node->n_pending == 0); @@ -3870,9 +3859,7 @@ fil_node_prepare_for_io( fil_space_t* space) /* in: space */ { ut_ad(node && system && space); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (system->n_open > system->max_n_open + 5) { ut_print_timestamp(stderr); @@ -3917,9 +3904,7 @@ fil_node_complete_io( { ut_ad(node); ut_ad(system); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(system->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(node->n_pending > 0); diff --git a/storage/innobase/fsp/fsp0fsp.c b/storage/innobase/fsp/fsp0fsp.c index 00c5e582b3e..b5662fd24a4 100644 --- a/storage/innobase/fsp/fsp0fsp.c +++ b/storage/innobase/fsp/fsp0fsp.c @@ -2045,11 +2045,9 @@ fseg_create_general( mtr); } -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex) || mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); -#endif /* UNIV_SYNC_DEBUG */ latch = fil_space_get_latch(space); mtr_x_lock(latch, mtr); @@ -2205,11 +2203,10 @@ fseg_n_reserved_pages( space = buf_frame_get_space_id(header); -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex) || mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); -#endif /* UNIV_SYNC_DEBUG */ + mtr_x_lock(fil_space_get_latch(space), mtr); inode = fseg_inode_get(header, mtr); @@ -2601,11 +2598,9 @@ fseg_alloc_free_page_general( space = buf_frame_get_space_id(seg_header); -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex) || mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); -#endif /* UNIV_SYNC_DEBUG */ latch = fil_space_get_latch(space); mtr_x_lock(latch, mtr); @@ -2751,11 +2746,9 @@ fsp_reserve_free_extents( ulint n_pages_added; ut_ad(mtr); -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex) || mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); -#endif /* UNIV_SYNC_DEBUG */ *n_reserved = n_ext; latch = fil_space_get_latch(space); @@ -2853,9 +2846,8 @@ fsp_get_available_space_in_free_extents( rw_lock_t* latch; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + mtr_start(&mtr); latch = fil_space_get_latch(space); @@ -3113,11 +3105,10 @@ fseg_free_page( { fseg_inode_t* seg_inode; -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex) || mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); -#endif /* UNIV_SYNC_DEBUG */ + mtr_x_lock(fil_space_get_latch(space), mtr); seg_inode = fseg_inode_get(seg_header, mtr); @@ -3222,11 +3213,10 @@ fseg_free_step( space = buf_frame_get_space_id(header); -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex) || mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); -#endif /* UNIV_SYNC_DEBUG */ + mtr_x_lock(fil_space_get_latch(space), mtr); descr = xdes_get_descriptor(space, buf_frame_get_page_no(header), mtr); @@ -3297,11 +3287,10 @@ fseg_free_step_not_header( space = buf_frame_get_space_id(header); -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex) || mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); -#endif /* UNIV_SYNC_DEBUG */ + mtr_x_lock(fil_space_get_latch(space), mtr); inode = fseg_inode_get(header, mtr); diff --git a/storage/innobase/ha/ha0ha.c b/storage/innobase/ha/ha0ha.c index 07dfb66afa8..7f241140050 100644 --- a/storage/innobase/ha/ha0ha.c +++ b/storage/innobase/ha/ha0ha.c @@ -96,9 +96,8 @@ ha_insert_for_fold( ulint hash; ut_ad(table && data); -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ + hash = hash_calc_hash(fold, table); cell = hash_get_nth_cell(table, hash); @@ -194,9 +193,8 @@ ha_delete( { ha_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ + node = ha_search_with_data(table, fold, data); ut_a(node); @@ -218,9 +216,7 @@ ha_search_and_update_if_found( { ha_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ node = ha_search_with_data(table, fold, data); @@ -248,9 +244,8 @@ ha_remove_all_nodes_to_page( { ha_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ + node = ha_chain_get_first(table, fold); while (node) { diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index e9309f4f8b8..2d8f3eb0ef9 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -56,53 +56,6 @@ bool innodb_inited= 0; */ static handlerton *legacy_innodb_hton; -/*-----------------------------------------------------------------*/ -/* These variables are used to implement (semi-)synchronous MySQL binlog -replication for InnoDB tables. */ - -pthread_cond_t innobase_repl_cond; /* Posix cond variable; - this variable is signaled - when enough binlog has been - sent to slave, so that a - waiting trx can return the - 'ok' message to the client - for a commit */ -pthread_mutex_t innobase_repl_cond_mutex; /* Posix cond variable mutex - that also protects the next - innobase_repl_... variables */ -uint innobase_repl_state; /* 1 if synchronous replication - is switched on and is working - ok; else 0 */ -uint innobase_repl_file_name_inited = 0; /* This is set to 1 when - innobase_repl_file_name - contains meaningful data */ -char* innobase_repl_file_name; /* The binlog name up to which - we have sent some binlog to - the slave */ -my_off_t innobase_repl_pos; /* The position in that file - up to which we have sent the - binlog to the slave */ -uint innobase_repl_n_wait_threads = 0; /* This tells how many - transactions currently are - waiting for the binlog to be - sent to the client */ -uint innobase_repl_wait_file_name_inited = 0; /* This is set to 1 - when we know the 'smallest' - wait position */ -char* innobase_repl_wait_file_name; /* NULL, or the 'smallest' - innobase_repl_file_name that - a transaction is waiting for */ -my_off_t innobase_repl_wait_pos; /* The smallest position in - that file that a trx is - waiting for: the trx can - proceed and send an 'ok' to - the client when MySQL has sent - the binlog up to this position - to the slave */ -/*-----------------------------------------------------------------*/ - - - /* Store MySQL definition of 'byte': in Linux it is char while InnoDB uses unsigned char; the header univ.i which we include next defines 'byte' as a macro which expands to 'unsigned char' */ @@ -222,6 +175,139 @@ static handler *innobase_create_handler(handlerton *hton, return new (mem_root) ha_innobase(hton, table); } +/*********************************************************************** +This function is used to prepare X/Open XA distributed transaction */ +static +int +innobase_xa_prepare( +/*================*/ + /* out: 0 or error number */ + handlerton* hton, + THD* thd, /* in: handle to the MySQL thread of the user + whose XA transaction should be prepared */ + bool all); /* in: TRUE - commit transaction + FALSE - the current SQL statement ended */ +/*********************************************************************** +This function is used to recover X/Open XA distributed transactions */ +static +int +innobase_xa_recover( +/*================*/ + /* out: number of prepared transactions + stored in xid_list */ + handlerton* hton, + XID* xid_list, /* in/out: prepared transactions */ + uint len); /* in: number of slots in xid_list */ +/*********************************************************************** +This function is used to commit one X/Open XA distributed transaction +which is in the prepared state */ +static +int +innobase_commit_by_xid( +/*===================*/ + /* out: 0 or error number */ + handlerton* hton, + XID* xid); /* in: X/Open XA transaction identification */ +/*********************************************************************** +This function is used to rollback one X/Open XA distributed transaction +which is in the prepared state */ +static +int +innobase_rollback_by_xid( +/*=====================*/ + /* out: 0 or error number */ + handlerton* hton, + XID *xid); /* in: X/Open XA transaction identification */ +/*********************************************************************** +Create a consistent view for a cursor based on current transaction +which is created if the corresponding MySQL thread still lacks one. +This consistent view is then used inside of MySQL when accessing records +using a cursor. */ +static +void* +innobase_create_cursor_view( +/*========================*/ + /* out: pointer to cursor view or NULL */ + handlerton* hton, /* in: innobase hton */ + THD* thd); /* in: user thread handle */ +/*********************************************************************** +Set the given consistent cursor view to a transaction which is created +if the corresponding MySQL thread still lacks one. If the given +consistent cursor view is NULL global read view of a transaction is +restored to a transaction read view. */ +static +void +innobase_set_cursor_view( +/*=====================*/ + handlerton* hton, + THD* thd, /* in: user thread handle */ + void* curview);/* in: Consistent cursor view to be set */ +/*********************************************************************** +Close the given consistent cursor view of a transaction and restore +global read view to a transaction read view. Transaction is created if the +corresponding MySQL thread still lacks one. */ +static +void +innobase_close_cursor_view( +/*=======================*/ + handlerton* hton, + THD* thd, /* in: user thread handle */ + void* curview);/* in: Consistent read view to be closed */ +/********************************************************************* +Removes all tables in the named database inside InnoDB. */ +static +void +innobase_drop_database( +/*===================*/ + /* out: error number */ + handlerton* hton, /* in: handlerton of Innodb */ + char* path); /* in: database path; inside InnoDB the name + of the last directory in the path is used as + the database name: for example, in 'mysql/data/test' + the database name is 'test' */ +/*********************************************************************** +Closes an InnoDB database. */ +static +int +innobase_end(handlerton *hton, ha_panic_function type); + +/********************************************************************* +Creates an InnoDB transaction struct for the thd if it does not yet have one. +Starts a new InnoDB transaction if a transaction is not yet started. And +assigns a new snapshot for a consistent read if the transaction does not yet +have one. */ +static +int +innobase_start_trx_and_assign_read_view( +/*====================================*/ + /* out: 0 */ + handlerton* hton, /* in: Innodb handlerton */ + THD* thd); /* in: MySQL thread handle of the user for whom + the transaction should be committed */ +/******************************************************************** +Flushes InnoDB logs to disk and makes a checkpoint. Really, a commit flushes +the logs, and the name of this function should be innobase_checkpoint. */ +static +bool +innobase_flush_logs( +/*================*/ + /* out: TRUE if error */ + handlerton* hton); /* in: InnoDB handlerton */ + +/**************************************************************************** +Implements the SHOW INNODB STATUS command. Sends the output of the InnoDB +Monitor to the client. */ +static +bool +innodb_show_status( +/*===============*/ + handlerton* hton, /* in: the innodb handlerton */ + THD* thd, /* in: the MySQL query thread of the caller */ + stat_print_fn *stat_print); +static +bool innobase_show_status(handlerton *hton, THD* thd, + stat_print_fn* stat_print, + enum ha_stat_type stat_type); /********************************************************************* Commits a transaction in an InnoDB database. */ @@ -379,11 +465,24 @@ innobase_release_stat_resources( } } +/************************************************************************ +Obtain the InnoDB transaction of a MySQL thread. */ +inline +trx_t*& +thd_to_trx( +/*=======*/ + /* out: reference to transaction pointer */ + THD* thd, /* in: MySQL thread */ + handlerton* hton) /* in: InnoDB handlerton */ +{ + return(*(trx_t**) thd_ha_data(thd, hton)); +} + /************************************************************************ Call this function when mysqld passes control to the client. That is to avoid deadlocks on the adaptive hash S-latch possibly held by thd. For more documentation, see handler.cc. */ - +static int innobase_release_temporary_latches( /*===============================*/ @@ -397,7 +496,7 @@ innobase_release_temporary_latches( return 0; } - trx = (trx_t*) thd->ha_data[hton->slot]; + trx = thd_to_trx(thd, hton); if (trx) { innobase_release_stat_resources(trx); @@ -857,12 +956,10 @@ check_trx_exists( handlerton* hton, /* in: handlerton for innodb */ THD* thd) /* in: user thread handle */ { - trx_t* trx; + trx_t*& trx = thd_to_trx(thd, hton); ut_ad(thd == current_thd); - trx = (trx_t*) thd->ha_data[hton->slot]; - if (trx == NULL) { DBUG_ASSERT(thd != NULL); trx = trx_allocate_for_mysql(); @@ -874,8 +971,6 @@ check_trx_exists( /* Update the info whether we should skip XA steps that eat CPU time */ trx->support_xa = (ibool)(thd->variables.innodb_support_xa); - - thd->ha_data[hton->slot] = trx; } else { if (trx->magic_n != TRX_MAGIC_N) { mem_analyze_corruption(trx); @@ -928,7 +1023,6 @@ ha_innobase::update_thd( /* out: 0 or error code */ THD* thd) /* in: thd to use the handle */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; trx_t* trx; trx = check_trx_exists(ht, thd); @@ -1271,8 +1365,6 @@ void ha_innobase::init_table_handle_for_HANDLER(void) /*============================================*/ { - row_prebuilt_t* prebuilt; - /* If current thd does not yet have a trx struct, create one. If the current handle does not yet have a prebuilt struct, create one. Update the trx pointers in the prebuilt struct. Normally @@ -1283,8 +1375,6 @@ ha_innobase::init_table_handle_for_HANDLER(void) /* Initialize the prebuilt struct much like it would be inited in external_lock */ - prebuilt = (row_prebuilt_t*)innobase_prebuilt; - innobase_release_stat_resources(prebuilt->trx); /* If the transaction is not started yet, start it */ @@ -1331,7 +1421,7 @@ ha_innobase::init_table_handle_for_HANDLER(void) /************************************************************************* Opens an InnoDB database. */ - +static int innobase_init(void *p) /*===============*/ @@ -1620,7 +1710,7 @@ error: /*********************************************************************** Closes an InnoDB database. */ - +static int innobase_end(handlerton *hton, ha_panic_function type) /*==============*/ @@ -1658,7 +1748,7 @@ innobase_end(handlerton *hton, ha_panic_function type) /******************************************************************** Flushes InnoDB logs to disk and makes a checkpoint. Really, a commit flushes the logs, and the name of this function should be innobase_checkpoint. */ - +static bool innobase_flush_logs(handlerton *hton) /*=====================*/ @@ -1694,7 +1784,7 @@ Creates an InnoDB transaction struct for the thd if it does not yet have one. Starts a new InnoDB transaction if a transaction is not yet started. And assigns a new snapshot for a consistent read if the transaction does not yet have one. */ - +static int innobase_start_trx_and_assign_read_view( /*====================================*/ @@ -1908,7 +1998,7 @@ innobase_report_binlog_offset_and_commit( #if 0 /*********************************************************************** This function stores the binlog offset and flushes logs. */ - +static void innobase_store_binlog_offset_and_flush_log( /*=======================================*/ @@ -1951,7 +2041,7 @@ innobase_commit_complete( { trx_t* trx; - trx = (trx_t*) thd->ha_data[hton->slot]; + trx = thd_to_trx(thd, hton); if (trx && trx->active_trans) { @@ -2175,7 +2265,7 @@ innobase_close_connection( { trx_t* trx; - trx = (trx_t*)thd->ha_data[hton->slot]; + trx = thd_to_trx(thd, hton); ut_a(trx); @@ -2216,8 +2306,6 @@ ha_innobase::get_row_type() const /*=============================*/ /* out: ROW_TYPE_REDUNDANT or ROW_TYPE_COMPACT */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - if (prebuilt && prebuilt->table) { if (dict_table_is_comp_noninline(prebuilt->table)) { return(ROW_TYPE_COMPACT); @@ -2364,7 +2452,7 @@ ha_innobase::open( DBUG_RETURN(HA_ERR_NO_SUCH_TABLE); } - if (ib_table->ibd_file_missing && !thd->tablespace_op) { + if (ib_table->ibd_file_missing && !thd_tablespace_op(thd)) { ut_print_timestamp(stderr); sql_print_error("MySQL is trying to open a table handle but " "the .ibd file for\ntable %s does not exist.\n" @@ -2382,10 +2470,9 @@ ha_innobase::open( DBUG_RETURN(HA_ERR_NO_SUCH_TABLE); } - innobase_prebuilt = row_create_prebuilt(ib_table); + prebuilt = row_create_prebuilt(ib_table); - ((row_prebuilt_t*)innobase_prebuilt)->mysql_row_len = - table->s->reclength; + prebuilt->mysql_row_len = table->s->reclength; /* Looks like MySQL-3.23 sometimes has primary key number != 0 */ @@ -2404,8 +2491,8 @@ ha_innobase::open( "dictionary, but not in MySQL!", name); } - ((row_prebuilt_t*)innobase_prebuilt) - ->clust_index_was_generated = FALSE; + prebuilt->clust_index_was_generated = FALSE; + /* MySQL allocates the buffer for ref. key_info->key_length includes space for all key columns + one byte for each column that may be NULL. ref_length must be as exact as possible to @@ -2426,8 +2513,7 @@ ha_innobase::open( "of the table.", name); } - ((row_prebuilt_t*)innobase_prebuilt) - ->clust_index_was_generated = TRUE; + prebuilt->clust_index_was_generated = TRUE; ref_length = DATA_ROW_ID_LEN; @@ -2474,7 +2560,7 @@ ha_innobase::close(void) { DBUG_ENTER("ha_innobase::close"); - row_prebuilt_free((row_prebuilt_t*) innobase_prebuilt); + row_prebuilt_free(prebuilt); my_free((gptr) upd_buff, MYF(0)); free_share(share); @@ -3264,34 +3350,31 @@ ha_innobase::write_row( /* out: error code */ mysql_byte* record) /* in: a row in MySQL format */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*)innobase_prebuilt; int error; longlong auto_inc; longlong dummy; ibool auto_inc_used= FALSE; + THD* thd = current_thd; + trx_t* trx = thd_to_trx(thd, ht); DBUG_ENTER("ha_innobase::write_row"); - if (prebuilt->trx != - (trx_t*) current_thd->ha_data[ht->slot]) { + if (prebuilt->trx != trx) { sql_print_error("The transaction object for the table handle is at " "%p, but for the current thread it is at %p", - prebuilt->trx, - (trx_t*) current_thd->ha_data[ht->slot]); + prebuilt->trx, trx); fputs("InnoDB: Dump of 200 bytes around prebuilt: ", stderr); ut_print_buf(stderr, ((const byte*)prebuilt) - 100, 200); fputs("\n" - "InnoDB: Dump of 200 bytes around transaction.all: ", + "InnoDB: Dump of 200 bytes around ha_data: ", stderr); - ut_print_buf(stderr, - ((byte*)(&(current_thd->ha_data[ht->slot]))) - 100, - 200); + ut_print_buf(stderr, ((const byte*) trx) - 100, 200); putc('\n', stderr); ut_error; } - statistic_increment(current_thd->status_var.ha_write_count, + statistic_increment(thd->status_var.ha_write_count, &LOCK_status); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT) @@ -3655,14 +3738,13 @@ ha_innobase::update_row( const mysql_byte* old_row,/* in: old row in MySQL format */ mysql_byte* new_row)/* in: new row in MySQL format */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; upd_t* uvect; int error = 0; + trx_t* trx = thd_to_trx(current_thd, ht); DBUG_ENTER("ha_innobase::update_row"); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == trx); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE) table->timestamp_field->set_time(); @@ -3671,7 +3753,7 @@ ha_innobase::update_row( prebuilt->sql_stat_start = TRUE; last_query_id = user_thd->query_id; - innobase_release_stat_resources(prebuilt->trx); + innobase_release_stat_resources(trx); } if (prebuilt->upd_node) { @@ -3692,11 +3774,11 @@ ha_innobase::update_row( assert(prebuilt->template_type == ROW_MYSQL_WHOLE_ROW); - innodb_srv_conc_enter_innodb(prebuilt->trx); + innodb_srv_conc_enter_innodb(trx); error = row_update_for_mysql((byte*) old_row, prebuilt); - innodb_srv_conc_exit_innodb(prebuilt->trx); + innodb_srv_conc_exit_innodb(trx); error = convert_error_code_to_mysql(error, user_thd); @@ -3717,19 +3799,18 @@ ha_innobase::delete_row( /* out: error number or 0 */ const mysql_byte* record) /* in: a row in MySQL format */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; int error = 0; + trx_t* trx = thd_to_trx(current_thd, ht); DBUG_ENTER("ha_innobase::delete_row"); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == trx); if (last_query_id != user_thd->query_id) { prebuilt->sql_stat_start = TRUE; last_query_id = user_thd->query_id; - innobase_release_stat_resources(prebuilt->trx); + innobase_release_stat_resources(trx); } if (!prebuilt->upd_node) { @@ -3740,11 +3821,11 @@ ha_innobase::delete_row( prebuilt->upd_node->is_delete = TRUE; - innodb_srv_conc_enter_innodb(prebuilt->trx); + innodb_srv_conc_enter_innodb(trx); error = row_update_for_mysql((byte*) record, prebuilt); - innodb_srv_conc_exit_innodb(prebuilt->trx); + innodb_srv_conc_exit_innodb(trx); error = convert_error_code_to_mysql(error, user_thd); @@ -3765,8 +3846,6 @@ void ha_innobase::unlock_row(void) /*=========================*/ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - DBUG_ENTER("ha_innobase::unlock_row"); if (UNIV_UNLIKELY(last_query_id != user_thd->query_id)) { @@ -3774,7 +3853,7 @@ ha_innobase::unlock_row(void) sql_print_error("last_query_id is %lu != user_thd_query_id is " "%lu", (ulong) last_query_id, (ulong) user_thd->query_id); - mem_analyze_corruption((byte *) prebuilt->trx); + mem_analyze_corruption(prebuilt->trx); ut_error; } @@ -3808,8 +3887,6 @@ bool ha_innobase::was_semi_consistent_read(void) /*=======================================*/ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - return(prebuilt->row_read_type == ROW_READ_DID_SEMI_CONSISTENT); } @@ -3818,10 +3895,7 @@ void ha_innobase::try_semi_consistent_read(bool yes) /*===========================================*/ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); /* Row read type is set to semi consistent read if this was requested by the MySQL and either innodb_locks_unsafe_for_binlog @@ -3978,7 +4052,6 @@ ha_innobase::index_read( uint key_len,/* in: key value length */ enum ha_rkey_function find_flag)/* in: search flags from my_base.h */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; ulint mode; dict_index_t* index; ulint match_mode = 0; @@ -3987,8 +4060,7 @@ ha_innobase::index_read( DBUG_ENTER("index_read"); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); statistic_increment(current_thd->status_var.ha_read_key_count, &LOCK_status); @@ -4095,15 +4167,13 @@ ha_innobase::change_active_index( index, even if it was internally generated by InnoDB */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; KEY* key=0; - statistic_increment(current_thd->status_var.ha_read_key_count, - &LOCK_status); + THD* thd = current_thd; + statistic_increment(thd->status_var.ha_read_key_count, &LOCK_status); DBUG_ENTER("change_active_index"); - ut_ad(user_thd == current_thd); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_ad(user_thd == thd); + ut_a(prebuilt->trx == thd_to_trx(thd, ht)); active_index = keynr; @@ -4186,14 +4256,12 @@ ha_innobase::general_fetch( uint match_mode) /* in: 0, ROW_SEL_EXACT, or ROW_SEL_EXACT_PREFIX */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; ulint ret; int error = 0; DBUG_ENTER("general_fetch"); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); innodb_srv_conc_enter_innodb(prebuilt->trx); @@ -4340,8 +4408,6 @@ ha_innobase::rnd_init( { int err; - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - /* Store the active index value so that we can restore the original value after a scan */ @@ -4419,7 +4485,6 @@ ha_innobase::rnd_pos( the length of data in pos has to be ref_length */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; int error; uint keynr = active_index; DBUG_ENTER("rnd_pos"); @@ -4428,8 +4493,7 @@ ha_innobase::rnd_pos( statistic_increment(current_thd->status_var.ha_read_rnd_count, &LOCK_status); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); if (prebuilt->clust_index_was_generated) { /* No primary key was defined for the table and we @@ -4475,11 +4539,9 @@ ha_innobase::position( /*==================*/ const mysql_byte* record) /* in: row in MySQL format */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; uint len; - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); if (prebuilt->clust_index_was_generated) { /* No primary key was defined for the table and we @@ -4970,16 +5032,15 @@ ha_innobase::discard_or_import_tablespace( /* out: 0 == success, -1 == error */ my_bool discard) /* in: TRUE if discard, else import */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; dict_table_t* dict_table; trx_t* trx; int err; DBUG_ENTER("ha_innobase::discard_or_import_tablespace"); - ut_a(prebuilt->trx && prebuilt->trx->magic_n == TRX_MAGIC_N); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx); + ut_a(prebuilt->trx->magic_n == TRX_MAGIC_N); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); dict_table = prebuilt->table; trx = prebuilt->trx; @@ -5003,7 +5064,6 @@ ha_innobase::delete_all_rows(void) /*==============================*/ /* out: error number */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*)innobase_prebuilt; int error; THD* thd = current_thd; @@ -5121,7 +5181,7 @@ ha_innobase::delete_table( /********************************************************************* Removes all tables in the named database inside InnoDB. */ - +static void innobase_drop_database( /*===================*/ @@ -5288,7 +5348,6 @@ ha_innobase::records_in_range( key_range *max_key) /* in: range end key val, may also be 0 */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; KEY* key; dict_index_t* index; mysql_byte* key_val_buff2 = (mysql_byte*) my_malloc( @@ -5307,8 +5366,7 @@ ha_innobase::records_in_range( DBUG_ENTER("records_in_range"); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); prebuilt->trx->op_info = (char*)"estimating records in index range"; @@ -5382,7 +5440,6 @@ ha_innobase::estimate_rows_upper_bound(void) /*======================================*/ /* out: upper bound of rows */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; dict_index_t* index; ulonglong estimate; ulonglong local_data_file_length; @@ -5431,8 +5488,6 @@ ha_innobase::scan_time() /*====================*/ /* out: estimated time measured in disk seeks */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - /* Since MySQL seems to favor table scans too much over index searches, we pretend that a sequential read takes the same time as a random disk read, that is, we do not divide the following @@ -5488,7 +5543,6 @@ ha_innobase::info( /*==============*/ uint flag) /* in: what information MySQL requests */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; dict_table_t* ib_table; dict_index_t* index; ha_rows rec_per_key; @@ -5741,12 +5795,10 @@ ha_innobase::check( HA_CHECK_OPT* check_opt) /* in: check options, currently ignored */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; ulint ret; ut_a(prebuilt->trx && prebuilt->trx->magic_n == TRX_MAGIC_N); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); if (prebuilt->mysql_template == NULL) { /* Build the template; we will use a dummy template @@ -5776,9 +5828,8 @@ ha_innobase::update_table_comment( info on foreign keys */ const char* comment)/* in: table comment defined by user */ { - uint length = (uint) strlen(comment); - char* str; - row_prebuilt_t* prebuilt = (row_prebuilt_t*)innobase_prebuilt; + uint length = (uint) strlen(comment); + char* str; long flen; /* We do not know if MySQL can call this function before calling @@ -5851,7 +5902,6 @@ ha_innobase::get_foreign_key_create_info(void) can be inserted to the CREATE TABLE statement, MUST be freed with ::free_foreign_key_create_info */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*)innobase_prebuilt; char* str = 0; long flen; @@ -5909,7 +5959,6 @@ ha_innobase::get_foreign_key_list(THD *thd, List *f_key_list) dict_foreign_t* foreign; DBUG_ENTER("get_foreign_key_list"); - row_prebuilt_t* prebuilt = (row_prebuilt_t*)innobase_prebuilt; ut_a(prebuilt != NULL); update_thd(current_thd); prebuilt->trx->op_info = (char*)"getting list of foreign keys"; @@ -6042,13 +6091,11 @@ bool ha_innobase::can_switch_engines(void) /*=================================*/ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; bool can_switch; DBUG_ENTER("ha_innobase::can_switch_engines"); - ut_a(prebuilt->trx == - (trx_t*) current_thd->ha_data[ht->slot]); + ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); prebuilt->trx->op_info = "determining if there are foreign key constraints"; @@ -6074,8 +6121,6 @@ ha_innobase::referenced_by_foreign_key(void) /*========================================*/ /* out: > 0 if referenced by a FOREIGN KEY */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*)innobase_prebuilt; - if (dict_table_referenced_by_foreign_key(prebuilt->table)) { return(1); @@ -6108,8 +6153,6 @@ ha_innobase::extra( enum ha_extra_function operation) /* in: HA_EXTRA_FLUSH or some other flag */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - /* Warning: since it is not sure that MySQL calls external_lock before calling this function, the trx field in prebuilt can be obsolete! */ @@ -6142,7 +6185,6 @@ ha_innobase::extra( int ha_innobase::reset() { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; if (prebuilt->blob_heap) { row_mysql_prebuilt_free_blob_heap(prebuilt); } @@ -6161,7 +6203,7 @@ on that table. MySQL-5.0 also calls this before each statement in an execution of a stored procedure. To make the execution more deterministic for binlogging, MySQL-5.0 locks all tables involved in a stored procedure with full explicit table -locks (thd->in_lock_tables is true in ::store_lock()) before executing the +locks (thd_in_lock_tables(thd) holds in store_lock()) before executing the procedure. */ int @@ -6171,7 +6213,6 @@ ha_innobase::start_stmt( THD* thd, /* in: handle to the user thread */ thr_lock_type lock_type) { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; trx_t* trx; update_thd(thd); @@ -6270,7 +6311,6 @@ ha_innobase::external_lock( THD* thd, /* in: handle to the user thread */ int lock_type) /* in: lock type */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; trx_t* trx; DBUG_ENTER("ha_innobase::external_lock"); @@ -6336,16 +6376,16 @@ ha_innobase::external_lock( VERY easily deadlocks. We do not set InnoDB table locks if user has not explicitly - requested a table lock. Note that thd->in_lock_tables - can be TRUE on some cases e.g. at the start of a stored + requested a table lock. Note that thd_in_lock_tables(thd) + can hold in some cases, e.g., at the start of a stored procedure call (SQLCOM_CALL). */ if (prebuilt->select_lock_type != LOCK_NONE) { - if (thd->in_lock_tables && - thd->lex->sql_command == SQLCOM_LOCK_TABLES && - thd->variables.innodb_table_locks && - (thd->options & OPTION_NOT_AUTOCOMMIT)) { + if (thd->lex->sql_command == SQLCOM_LOCK_TABLES + && thd->variables.innodb_table_locks + && (thd->options & OPTION_NOT_AUTOCOMMIT) + && thd_in_lock_tables(thd)) { ulint error = row_lock_table_for_mysql( prebuilt, NULL, 0); @@ -6412,7 +6452,6 @@ ha_innobase::transactional_table_lock( THD* thd, /* in: handle to the user thread */ int lock_type) /* in: lock type */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; trx_t* trx; DBUG_ENTER("ha_innobase::transactional_table_lock"); @@ -6424,7 +6463,8 @@ ha_innobase::transactional_table_lock( update_thd(thd); - if (prebuilt->table->ibd_file_missing && !current_thd->tablespace_op) { + if (prebuilt->table->ibd_file_missing + && !thd_tablespace_op(current_thd)) { ut_print_timestamp(stderr); fprintf(stderr, " InnoDB error:\n" "MySQL is trying to use a table handle but the .ibd file for\n" @@ -6469,7 +6509,7 @@ ha_innobase::transactional_table_lock( trx->active_trans = 1; } - if (thd->in_lock_tables && thd->variables.innodb_table_locks) { + if (thd->variables.innodb_table_locks && thd_in_lock_tables(thd)) { ulint error = DB_SUCCESS; error = row_lock_table_for_mysql(prebuilt, NULL, 0); @@ -6509,7 +6549,7 @@ innodb_export_status() /**************************************************************************** Implements the SHOW INNODB STATUS command. Sends the output of the InnoDB Monitor to the client. */ - +static bool innodb_show_status( /*===============*/ @@ -6699,6 +6739,7 @@ innodb_mutex_show_status( DBUG_RETURN(FALSE); } +static bool innobase_show_status(handlerton *hton, THD* thd, stat_print_fn* stat_print, enum ha_stat_type stat_type) @@ -6800,7 +6841,6 @@ ha_innobase::store_lock( 'lock'; this may also be TL_IGNORE */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; trx_t* trx; /* Note that trx in this function is NOT necessarily prebuilt->trx @@ -6821,16 +6861,28 @@ ha_innobase::store_lock( trx->isolation_level = innobase_map_isolation_level( (enum_tx_isolation) thd->variables.tx_isolation); + + if (trx->isolation_level <= TRX_ISO_READ_COMMITTED + && trx->global_read_view) { + + /* At low transaction isolation levels we let + each consistent read set its own snapshot */ + + read_view_close_for_mysql(trx); + } + } + const bool in_lock_tables = thd_in_lock_tables(thd); + if (thd->lex->sql_command == SQLCOM_DROP_TABLE) { /* MySQL calls this function in DROP TABLE though this table handle may belong to another thd that is running a query. Let us in that case skip any changes to the prebuilt struct. */ - } else if ((lock_type == TL_READ && thd->in_lock_tables) || - (lock_type == TL_READ_HIGH_PRIORITY && thd->in_lock_tables) || + } else if ((lock_type == TL_READ && in_lock_tables) || + (lock_type == TL_READ_HIGH_PRIORITY && in_lock_tables) || lock_type == TL_READ_WITH_SHARED_LOCKS || lock_type == TL_READ_NO_INSERT || (thd->lex->sql_command != SQLCOM_SELECT @@ -6901,7 +6953,7 @@ ha_innobase::store_lock( /* Starting from 5.0.7, we weaken also the table locks set at the start of a MySQL stored procedure call, just like we weaken the locks set at the start of an SQL statement. - MySQL does set thd->in_lock_tables TRUE there, but in reality + MySQL does set in_lock_tables TRUE there, but in reality we do not need table locks to make the execution of a single transaction stored procedure call deterministic (if it does not use a consistent read). */ @@ -6929,14 +6981,14 @@ ha_innobase::store_lock( We especially allow multiple writers if MySQL is at the start of a stored procedure call (SQLCOM_CALL) or a - stored function call (MySQL does have thd->in_lock_tables + stored function call (MySQL does have in_lock_tables TRUE there). */ if ((lock_type >= TL_WRITE_CONCURRENT_INSERT && lock_type <= TL_WRITE) - && !(thd->in_lock_tables + && !(in_lock_tables && thd->lex->sql_command == SQLCOM_LOCK_TABLES) - && !thd->tablespace_op + && !thd_tablespace_op(thd) && thd->lex->sql_command != SQLCOM_TRUNCATE && thd->lex->sql_command != SQLCOM_OPTIMIZE @@ -6963,7 +7015,7 @@ ha_innobase::store_lock( We especially allow concurrent inserts if MySQL is at the start of a stored procedure call (SQLCOM_CALL) - (MySQL does have thd->in_lock_tables TRUE there). */ + (MySQL does have in_lock_tables TRUE there). */ if (lock_type == TL_READ_NO_INSERT && thd->lex->sql_command != SQLCOM_LOCK_TABLES) { @@ -6992,7 +7044,6 @@ ha_innobase::innobase_read_and_init_auto_inc( timeout */ longlong* ret) /* out: auto-inc value */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; longlong auto_inc; ulint old_select_lock_type; ibool trx_was_not_started = FALSE; @@ -7172,8 +7223,7 @@ ha_innobase::reset_auto_increment(ulonglong value) { DBUG_ENTER("ha_innobase::reset_auto_increment"); - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; - int error; + int error; update_thd(current_thd); @@ -7217,7 +7267,6 @@ ha_innobase::cmp_ref( const mysql_byte* ref2) /* in: an (internal) primary key value in the MySQL key value format */ { - row_prebuilt_t* prebuilt = (row_prebuilt_t*) innobase_prebuilt; enum_field_types mysql_type; Field* field; KEY_PART_INFO* key_part; @@ -7408,7 +7457,7 @@ innobase_query_is_update(void) /*********************************************************************** This function is used to prepare X/Open XA distributed transaction */ - +static int innobase_xa_prepare( /*================*/ @@ -7504,7 +7553,7 @@ innobase_xa_prepare( /*********************************************************************** This function is used to recover X/Open XA distributed transactions */ - +static int innobase_xa_recover( /*================*/ @@ -7525,7 +7574,7 @@ innobase_xa_recover( /*********************************************************************** This function is used to commit one X/Open XA distributed transaction which is in the prepared state */ - +static int innobase_commit_by_xid( /*===================*/ @@ -7549,7 +7598,7 @@ innobase_commit_by_xid( /*********************************************************************** This function is used to rollback one X/Open XA distributed transaction which is in the prepared state */ - +static int innobase_rollback_by_xid( /*=====================*/ @@ -7573,9 +7622,10 @@ Create a consistent view for a cursor based on current transaction which is created if the corresponding MySQL thread still lacks one. This consistent view is then used inside of MySQL when accessing records using a cursor. */ - +static void* innobase_create_cursor_view( +/*========================*/ /* out: pointer to cursor view or NULL */ handlerton *hton, /* in: innobase hton */ THD* thd) /* in: user thread handle */ @@ -7588,9 +7638,10 @@ innobase_create_cursor_view( Close the given consistent cursor view of a transaction and restore global read view to a transaction read view. Transaction is created if the corresponding MySQL thread still lacks one. */ - +static void innobase_close_cursor_view( +/*=======================*/ handlerton *hton, THD* thd, /* in: user thread handle */ void* curview)/* in: Consistent read view to be closed */ @@ -7604,7 +7655,7 @@ Set the given consistent cursor view to a transaction which is created if the corresponding MySQL thread still lacks one. If the given consistent cursor view is NULL global read view of a transaction is restored to a transaction read view. */ - +static void innobase_set_cursor_view( /*=====================*/ diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index 339238a584e..eb977ed6bd5 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -33,6 +33,7 @@ typedef struct st_innobase_share { struct row_prebuilt_struct; +typedef struct row_prebuilt_struct row_prebuilt_t; my_bool innobase_query_caching_of_table_permitted(THD* thd, char* full_name, uint full_name_len, @@ -41,9 +42,8 @@ my_bool innobase_query_caching_of_table_permitted(THD* thd, char* full_name, /* The class defining a handle to an Innodb table */ class ha_innobase: public handler { - void* innobase_prebuilt;/* (row_prebuilt_t*) prebuilt - struct in InnoDB, used to save - CPU time with prebuilt data + row_prebuilt_t* prebuilt; /* prebuilt struct in InnoDB, used + to save CPU time with prebuilt data structures*/ THD* user_thd; /* the thread handle of the user currently using the handle; this is @@ -238,11 +238,6 @@ extern ulong srv_commit_concurrency; extern ulong srv_flush_log_at_trx_commit; } -int innobase_init(void); -int innobase_end(handlerton *hton, ha_panic_function type); -bool innobase_flush_logs(handlerton *hton); -uint innobase_get_free_space(void); - /* don't delete it - it may be re-enabled later as an optimization for the most common case InnoDB+binlog @@ -256,93 +251,3 @@ int innobase_report_binlog_offset_and_commit( int innobase_commit_complete(void* trx_handle); void innobase_store_binlog_offset_and_flush_log(char *binlog_name,longlong offset); #endif - -void innobase_drop_database(handlerton *hton, char *path); -bool innobase_show_status(handlerton *hton, THD* thd, stat_print_fn*, enum ha_stat_type); - -int innobase_release_temporary_latches(handlerton *hton, THD *thd); - -void innobase_store_binlog_offset_and_flush_log(handlerton *hton, char *binlog_name,longlong offset); - -int innobase_start_trx_and_assign_read_view(handlerton *hton, THD* thd); - -/*********************************************************************** -This function is used to prepare X/Open XA distributed transaction */ - -int innobase_xa_prepare( -/*====================*/ - /* out: 0 or error number */ - handlerton *hton, /* in: innobase hton */ - THD* thd, /* in: handle to the MySQL thread of the user - whose XA transaction should be prepared */ - bool all); /* in: TRUE - commit transaction - FALSE - the current SQL statement ended */ - -/*********************************************************************** -This function is used to recover X/Open XA distributed transactions */ - -int innobase_xa_recover( -/*====================*/ - /* out: number of prepared transactions - stored in xid_list */ - handlerton *hton, /* in: innobase hton */ - XID* xid_list, /* in/out: prepared transactions */ - uint len); /* in: number of slots in xid_list */ - -/*********************************************************************** -This function is used to commit one X/Open XA distributed transaction -which is in the prepared state */ - -int innobase_commit_by_xid( -/*=======================*/ - /* out: 0 or error number */ - handlerton *hton, /* in: innobase hton */ - XID* xid); /* in : X/Open XA Transaction Identification */ - -/*********************************************************************** -This function is used to rollback one X/Open XA distributed transaction -which is in the prepared state */ - -int innobase_rollback_by_xid( - /* out: 0 or error number */ - handlerton *hton, /* in: innobase hton */ - XID *xid); /* in : X/Open XA Transaction Identification */ - - -/*********************************************************************** -Create a consistent view for a cursor based on current transaction -which is created if the corresponding MySQL thread still lacks one. -This consistent view is then used inside of MySQL when accessing records -using a cursor. */ - -void* -innobase_create_cursor_view( - /* out: Pointer to cursor view or NULL */ - handlerton *hton, /* in: innobase hton */ - THD* thd); /* in: user thread handle */ - -/*********************************************************************** -Close the given consistent cursor view of a transaction and restore -global read view to a transaction read view. Transaction is created if the -corresponding MySQL thread still lacks one. */ - -void -innobase_close_cursor_view( -/*=======================*/ - handlerton *hton, /* in: innobase hton */ - THD* thd, /* in: user thread handle */ - void* curview); /* in: Consistent read view to be closed */ - - -/*********************************************************************** -Set the given consistent cursor view to a transaction which is created -if the corresponding MySQL thread still lacks one. If the given -consistent cursor view is NULL global read view of a transaction is -restored to a transaction read view. */ - -void -innobase_set_cursor_view( -/*=====================*/ - handlerton *hton, /* in: innobase hton */ - THD* thd, /* in: user thread handle */ - void* curview); /* in: Consistent read view to be set */ diff --git a/storage/innobase/ibuf/ibuf0ibuf.c b/storage/innobase/ibuf/ibuf0ibuf.c index 96ab928a436..1cbb6003cfc 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.c +++ b/storage/innobase/ibuf/ibuf0ibuf.c @@ -417,9 +417,7 @@ ibuf_data_sizes_update( { ulint old_size; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&ibuf_mutex)); -#endif /* UNIV_SYNC_DEBUG */ old_size = data->size; @@ -1576,9 +1574,7 @@ ibuf_data_enough_free_for_insert( /* out: TRUE if enough free pages in list */ ibuf_data_t* data) /* in: ibuf data for the space */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&ibuf_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* We want a big margin of free pages, because a B-tree can sometimes grow in size also if records are deleted from it, as the node pointers @@ -1604,16 +1600,9 @@ ibuf_data_too_much_free( /* out: TRUE if enough free pages in list */ ibuf_data_t* data) /* in: ibuf data for the space */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&ibuf_mutex)); -#endif /* UNIV_SYNC_DEBUG */ - if (data->free_list_len >= 3 + data->size / 2 + 3 * data->height) { - - return(TRUE); - } - - return(FALSE); + return(data->free_list_len >= 3 + data->size / 2 + 3 * data->height); } /************************************************************************* @@ -3451,9 +3440,7 @@ ibuf_validate_low(void) ibuf_data_t* data; ulint sum_sizes; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&ibuf_mutex)); -#endif /* UNIV_SYNC_DEBUG */ sum_sizes = 0; diff --git a/storage/innobase/include/buf0buf.ic b/storage/innobase/include/buf0buf.ic index c448c28933a..031bf6c51b4 100644 --- a/storage/innobase/include/buf0buf.ic +++ b/storage/innobase/include/buf0buf.ic @@ -128,9 +128,7 @@ buf_pool_clock_tic(void) /*====================*/ /* out: new clock value */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ buf_pool->ulint_clock++; @@ -456,7 +454,7 @@ buf_frame_modify_clock_inc( #ifdef UNIV_SYNC_DEBUG ut_ad((mutex_own(&(buf_pool->mutex)) && (block->buf_fix_count == 0)) || rw_lock_own(&(block->lock), RW_LOCK_EXCLUSIVE)); -#endif /*UNIV_SYNC_DEBUG */ +#endif /* UNIV_SYNC_DEBUG */ UT_DULINT_INC(block->modify_clock); @@ -513,14 +511,12 @@ buf_block_buf_fix_inc_debug( const char* file __attribute__ ((unused)), /* in: file name */ ulint line __attribute__ ((unused))) /* in: line */ { -#ifdef UNIV_SYNC_DEBUG ibool ret; ret = rw_lock_s_lock_func_nowait(&(block->debug_latch), file, line); ut_ad(ret == TRUE); ut_ad(mutex_own(&block->mutex)); -#endif block->buf_fix_count++; } #else /* UNIV_SYNC_DEBUG */ @@ -532,9 +528,8 @@ buf_block_buf_fix_inc( /*==================*/ buf_block_t* block) /* in: block to bufferfix */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&block->mutex)); -#endif + block->buf_fix_count++; } #endif /* UNIV_SYNC_DEBUG */ @@ -552,9 +547,7 @@ buf_page_hash_get( ulint fold; ut_ad(buf_pool); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* Look for the page in the hash table */ diff --git a/storage/innobase/include/buf0flu.ic b/storage/innobase/include/buf0flu.ic index b304673f8be..ae873c42088 100644 --- a/storage/innobase/include/buf0flu.ic +++ b/storage/innobase/include/buf0flu.ic @@ -42,8 +42,8 @@ buf_flush_note_modification( ut_ad(block->buf_fix_count > 0); #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&(block->lock), RW_LOCK_EX)); - ut_ad(mutex_own(&(buf_pool->mutex))); #endif /* UNIV_SYNC_DEBUG */ + ut_ad(mutex_own(&(buf_pool->mutex))); ut_ad(ut_dulint_cmp(mtr->start_lsn, ut_dulint_zero) != 0); ut_ad(mtr->modifications); diff --git a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dict0dict.ic index d59e99277da..4a9afd2f3f5 100644 --- a/storage/innobase/include/dict0dict.ic +++ b/storage/innobase/include/dict0dict.ic @@ -551,9 +551,7 @@ dict_table_check_if_in_cache_low( ulint table_fold; ut_ad(table_name); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* Look for the table name in the hash table */ table_fold = ut_fold_string(table_name); @@ -576,9 +574,7 @@ dict_table_get_low( dict_table_t* table; ut_ad(table_name); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ table = dict_table_check_if_in_cache_low(table_name); @@ -601,9 +597,7 @@ dict_table_get_on_id_low( dict_table_t* table; ulint fold; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* Look for the table name in the hash table */ fold = ut_fold_dulint(table_id); diff --git a/storage/innobase/include/ha0ha.ic b/storage/innobase/include/ha0ha.ic index 1584e1ff4bf..fb264377f28 100644 --- a/storage/innobase/include/ha0ha.ic +++ b/storage/innobase/include/ha0ha.ic @@ -81,9 +81,7 @@ ha_search( { ha_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ node = ha_chain_get_first(table, fold); @@ -113,9 +111,7 @@ ha_search_and_get_data( { ha_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ node = ha_chain_get_first(table, fold); @@ -145,9 +141,7 @@ ha_search_with_data( { ha_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ node = ha_chain_get_first(table, fold); @@ -177,9 +171,7 @@ ha_search_and_delete_if_found( { ha_node_t* node; -#ifdef UNIV_SYNC_DEBUG ut_ad(!table->mutexes || mutex_own(hash_get_mutex(table, fold))); -#endif /* UNIV_SYNC_DEBUG */ node = ha_search_with_data(table, fold, data); diff --git a/storage/innobase/include/lock0lock.ic b/storage/innobase/include/lock0lock.ic index feec460bec8..311623b190b 100644 --- a/storage/innobase/include/lock0lock.ic +++ b/storage/innobase/include/lock0lock.ic @@ -65,9 +65,7 @@ lock_clust_rec_some_has_impl( { dulint trx_id; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(index->type & DICT_CLUSTERED); ut_ad(page_rec_is_user_rec(rec)); diff --git a/storage/innobase/include/log0log.ic b/storage/innobase/include/log0log.ic index 06deff196bc..df0a8baf2d5 100644 --- a/storage/innobase/include/log0log.ic +++ b/storage/innobase/include/log0log.ic @@ -255,9 +255,7 @@ log_block_init( { ulint no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ no = log_block_convert_lsn_to_no(lsn); @@ -279,9 +277,7 @@ log_block_init_in_old_format( { ulint no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ no = log_block_convert_lsn_to_no(lsn); diff --git a/storage/innobase/include/mem0mem.h b/storage/innobase/include/mem0mem.h index f68d45d83df..2d5fd1db6c3 100644 --- a/storage/innobase/include/mem0mem.h +++ b/storage/innobase/include/mem0mem.h @@ -279,17 +279,6 @@ mem_strdupl( const char* str, /* in: string to be copied */ ulint len); /* in: length of str, in bytes */ -/************************************************************************** -Makes a NUL-terminated quoted copy of a NUL-terminated string. */ -UNIV_INLINE -char* -mem_strdupq( -/*========*/ - /* out, own: a quoted copy of the string, - must be deallocated with mem_free */ - const char* str, /* in: string to be copied */ - char q); /* in: quote character */ - /************************************************************************** Duplicates a NUL-terminated string, allocated from a memory heap. */ diff --git a/storage/innobase/include/mem0mem.ic b/storage/innobase/include/mem0mem.ic index 069f8de36cb..cb8fbe92cf0 100644 --- a/storage/innobase/include/mem0mem.ic +++ b/storage/innobase/include/mem0mem.ic @@ -589,41 +589,6 @@ mem_strdupl( return(memcpy(s, str, len)); } -/************************************************************************** -Makes a NUL-terminated quoted copy of a NUL-terminated string. */ -UNIV_INLINE -char* -mem_strdupq( -/*========*/ - /* out, own: a quoted copy of the string, - must be deallocated with mem_free */ - const char* str, /* in: string to be copied */ - char q) /* in: quote character */ -{ - char* dst; - char* d; - const char* s = str; - size_t len = strlen(str) + 3; - /* calculate the number of quote characters in the string */ - while((s = strchr(s, q)) != NULL) { - s++; - len++; - } - /* allocate the quoted string, and copy it */ - d = dst = mem_alloc(len); - *d++ = q; - s = str; - while(*s) { - if ((*d++ = *s++) == q) { - *d++ = q; - } - } - *d++ = q; - *d++ = '\0'; - ut_ad((ssize_t) len == d - dst); - return(dst); -} - /************************************************************************** Makes a NUL-terminated copy of a nonterminated string, allocated from a memory heap. */ diff --git a/storage/innobase/include/rem0rec.ic b/storage/innobase/include/rem0rec.ic index ace90247b80..90a35af74dc 100644 --- a/storage/innobase/include/rem0rec.ic +++ b/storage/innobase/include/rem0rec.ic @@ -995,6 +995,9 @@ rec_offs_nth_size( { ut_ad(rec_offs_validate(NULL, NULL, offsets)); ut_ad(n < rec_offs_n_fields(offsets)); + if (!n) { + return(rec_offs_base(offsets)[1 + n] & REC_OFFS_MASK); + } return((rec_offs_base(offsets)[1 + n] - rec_offs_base(offsets)[n]) & REC_OFFS_MASK); } diff --git a/storage/innobase/include/sync0rw.ic b/storage/innobase/include/sync0rw.ic index defe0692aa8..f8b5367739a 100644 --- a/storage/innobase/include/sync0rw.ic +++ b/storage/innobase/include/sync0rw.ic @@ -133,9 +133,8 @@ rw_lock_s_lock_low( const char* file_name, /* in: file name where lock requested */ ulint line) /* in: line where requested */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(rw_lock_get_mutex(lock))); -#endif /* UNIV_SYNC_DEBUG */ + /* Check if the writer field is free */ if (UNIV_LIKELY(lock->writer == RW_LOCK_NOT_LOCKED)) { diff --git a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h index e7e135c0c7e..69c0cd9e39b 100644 --- a/storage/innobase/include/sync0sync.h +++ b/storage/innobase/include/sync0sync.h @@ -114,13 +114,20 @@ mutex_enter_func( mutex_t* mutex, /* in: pointer to mutex */ const char* file_name, /* in: file name where locked */ ulint line); /* in: line where locked */ +/****************************************************************** +NOTE! The following macro should be used in mutex locking, not the +corresponding function. */ + +#define mutex_enter_nowait(M) \ + mutex_enter_nowait_func((M), __FILE__, __LINE__) /************************************************************************ -Tries to lock the mutex for the current thread. If the lock is not acquired -immediately, returns with return value 1. */ +NOTE! Use the corresponding macro in the header file, not this function +directly. Tries to lock the mutex for the current thread. If the lock is not +acquired immediately, returns with return value 1. */ ulint -mutex_enter_nowait( -/*===============*/ +mutex_enter_nowait_func( +/*====================*/ /* out: 0 if succeed, 1 if not */ mutex_t* mutex, /* in: pointer to mutex */ const char* file_name, /* in: file name where mutex @@ -170,7 +177,16 @@ Checks that the mutex has been initialized. */ ibool mutex_validate( /*===========*/ - mutex_t* mutex); + const mutex_t* mutex); +/********************************************************************** +Checks that the current thread owns the mutex. Works only +in the debug version. */ + +ibool +mutex_own( +/*======*/ + /* out: TRUE if owns */ + const mutex_t* mutex); /* in: mutex */ #endif /* UNIV_DEBUG */ #ifdef UNIV_SYNC_DEBUG /********************************************************************** @@ -215,15 +231,6 @@ sync_thread_levels_empty_gen( also purge_is_running mutex is allowed */ /********************************************************************** -Checks that the current thread owns the mutex. Works only -in the debug version. */ - -ibool -mutex_own( -/*======*/ - /* out: TRUE if owns */ - mutex_t* mutex); /* in: mutex */ -/********************************************************************** Gets the debug information for a reserved mutex. */ void @@ -248,7 +255,7 @@ UNIV_INLINE ulint mutex_get_lock_word( /*================*/ - mutex_t* mutex); /* in: mutex */ + const mutex_t* mutex); /* in: mutex */ #ifdef UNIV_SYNC_DEBUG /********************************************************************** NOT to be used outside this module except in debugging! Gets the waiters @@ -258,7 +265,7 @@ ulint mutex_get_waiters( /*==============*/ /* out: value to set */ - mutex_t* mutex); /* in: mutex */ + const mutex_t* mutex); /* in: mutex */ #endif /* UNIV_SYNC_DEBUG */ /* @@ -479,13 +486,13 @@ struct mutex_struct { #ifdef UNIV_SYNC_DEBUG const char* file_name; /* File where the mutex was locked */ ulint line; /* Line where the mutex was locked */ - os_thread_id_t thread_id; /* Debug version: The thread id of the - thread which locked the mutex. */ ulint level; /* Level in the global latching order */ #endif /* UNIV_SYNC_DEBUG */ const char* cfile_name;/* File name where mutex created */ ulint cline; /* Line where created */ #ifdef UNIV_DEBUG + os_thread_id_t thread_id; /* The thread id of the thread + which locked the mutex. */ ulint magic_n; # define MUTEX_MAGIC_N (ulint)979585 #endif /* UNIV_DEBUG */ diff --git a/storage/innobase/include/sync0sync.ic b/storage/innobase/include/sync0sync.ic index 4b48a1469ff..9bd5ac2a518 100644 --- a/storage/innobase/include/sync0sync.ic +++ b/storage/innobase/include/sync0sync.ic @@ -6,6 +6,16 @@ Mutex, the basic synchronization primitive Created 9/5/1995 Heikki Tuuri *******************************************************/ +#if defined(not_defined) && defined(__GNUC__) && defined(UNIV_INTEL_X86) +/* %z0: Use the size of operand %0 which in our case is *m to determine +instruction size, it should end up as xchgl. "1" in the input constraint, +says that "in" has to go in the same place as "out".*/ +#define TAS(m, in, out) \ + asm volatile ("xchg%z0 %2, %0" \ + : "=g" (*(m)), "=r" (out) \ + : "1" (in)) /* Note: "1" here refers to "=r" (out) */ +#endif + /********************************************************************** Sets the waiters field in a mutex. */ @@ -89,20 +99,10 @@ mutex_test_and_set( return(res); #elif defined(not_defined) && defined(__GNUC__) && defined(UNIV_INTEL_X86) - ulint* lw; ulint res; - lw = &(mutex->lock_word); + TAS(&mutex->lock_word, 1, res); - /* In assembly we use the so-called AT & T syntax where - the order of operands is inverted compared to the ordinary Intel - syntax. The 'l' after the mnemonics denotes a 32-bit operation. - The line after the code tells which values come out of the asm - code, and the second line tells the input to the asm code. */ - - asm volatile("movl $1, %%eax; xchgl (%%ecx), %%eax" : - "=eax" (res), "=m" (*lw) : - "ecx" (lw)); return(res); #else ibool ret; @@ -141,20 +141,9 @@ mutex_reset_lock_word( __asm MOV ECX, lw __asm XCHG EDX, DWORD PTR [ECX] #elif defined(not_defined) && defined(__GNUC__) && defined(UNIV_INTEL_X86) - ulint* lw; + ulint res; - lw = &(mutex->lock_word); - - /* In assembly we use the so-called AT & T syntax where - the order of operands is inverted compared to the ordinary Intel - syntax. The 'l' after the mnemonics denotes a 32-bit operation. */ - - asm volatile("movl $0, %%eax; xchgl (%%ecx), %%eax" : - "=m" (*lw) : - "ecx" (lw) : - "eax"); /* gcc does not seem to understand - that our asm code resets eax: tell it - explicitly that after the third ':' */ + TAS(&mutex->lock_word, 0, res); #else mutex->lock_word = 0; @@ -168,9 +157,9 @@ UNIV_INLINE ulint mutex_get_lock_word( /*================*/ - mutex_t* mutex) /* in: mutex */ + const mutex_t* mutex) /* in: mutex */ { - volatile ulint* ptr; /* declared volatile to ensure that + const volatile ulint* ptr; /* declared volatile to ensure that lock_word is loaded from memory */ ut_ad(mutex); @@ -186,9 +175,9 @@ ulint mutex_get_waiters( /*==============*/ /* out: value to set */ - mutex_t* mutex) /* in: mutex */ + const mutex_t* mutex) /* in: mutex */ { - volatile ulint* ptr; /* declared volatile to ensure that + const volatile ulint* ptr; /* declared volatile to ensure that the value is read from memory */ ut_ad(mutex); @@ -206,11 +195,11 @@ mutex_exit( /*=======*/ mutex_t* mutex) /* in: pointer to mutex */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(mutex)); - mutex->thread_id = ULINT_UNDEFINED; + ut_d(mutex->thread_id = ULINT_UNDEFINED); +#ifdef UNIV_SYNC_DEBUG sync_thread_reset_level(mutex); #endif mutex_reset_lock_word(mutex); @@ -250,6 +239,7 @@ mutex_enter_func( ulint line) /* in: line where locked */ { ut_ad(mutex_validate(mutex)); + ut_ad(!mutex_own(mutex)); /* Note that we do not peek at the value of lock_word before trying the atomic test_and_set; we could peek, and possibly save time. */ @@ -259,6 +249,7 @@ mutex_enter_func( #endif /* UNIV_DEBUG && !UNIV_HOTBACKUP */ if (!mutex_test_and_set(mutex)) { + ut_d(mutex->thread_id = os_thread_get_curr_id()); #ifdef UNIV_SYNC_DEBUG mutex_set_debug_info(mutex, file_name, line); #endif diff --git a/storage/innobase/include/trx0sys.ic b/storage/innobase/include/trx0sys.ic index 9c950be09f0..86b71df08d6 100644 --- a/storage/innobase/include/trx0sys.ic +++ b/storage/innobase/include/trx0sys.ic @@ -62,9 +62,7 @@ trx_sys_get_nth_rseg( trx_sys_t* sys, /* in: trx system */ ulint n) /* in: index of slot */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(n < TRX_SYS_N_RSEGS); return(sys->rseg_array[n]); @@ -121,9 +119,7 @@ trx_sysf_rseg_get_space( ulint i, /* in: slot index == rseg id */ mtr_t* mtr) /* in: mtr */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(sys_header); ut_ad(i < TRX_SYS_N_RSEGS); @@ -146,9 +142,7 @@ trx_sysf_rseg_get_page_no( mtr_t* mtr) /* in: mtr */ { ut_ad(sys_header); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(i < TRX_SYS_N_RSEGS); return(mtr_read_ulint(sys_header + TRX_SYS_RSEGS @@ -168,9 +162,7 @@ trx_sysf_rseg_set_space( ulint space, /* in: space id */ mtr_t* mtr) /* in: mtr */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(sys_header); ut_ad(i < TRX_SYS_N_RSEGS); @@ -194,9 +186,7 @@ trx_sysf_rseg_set_page_no( slot is reset to unused */ mtr_t* mtr) /* in: mtr */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(sys_header); ut_ad(i < TRX_SYS_N_RSEGS); @@ -250,9 +240,7 @@ trx_get_on_id( { trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx = UT_LIST_GET_FIRST(trx_sys->trx_list); @@ -282,9 +270,7 @@ trx_list_get_min_trx_id(void) { trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx = UT_LIST_GET_LAST(trx_sys->trx_list); @@ -307,9 +293,7 @@ trx_is_active( { trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (ut_dulint_cmp(trx_id, trx_list_get_min_trx_id()) < 0) { @@ -346,9 +330,7 @@ trx_sys_get_new_trx_id(void) { dulint id; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* VERY important: after the database is started, max_trx_id value is divisible by TRX_SYS_TRX_ID_WRITE_MARGIN, and the following if @@ -378,9 +360,7 @@ trx_sys_get_new_trx_no(void) /*========================*/ /* out: new, allocated trx number */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ return(trx_sys_get_new_trx_id()); } diff --git a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i index 7a5cb21f07a..957baa0391f 100644 --- a/storage/innobase/include/univ.i +++ b/storage/innobase/include/univ.i @@ -40,9 +40,9 @@ if we are compiling on Windows. */ # undef VERSION /* Include the header file generated by GNU autoconf */ -#ifndef __WIN__ -# include "config.h" -#endif +# ifndef __WIN__ +# include "config.h" +# endif # ifdef HAVE_SCHED_H # include @@ -51,9 +51,9 @@ if we are compiling on Windows. */ /* When compiling for Itanium IA64, undefine the flag below to prevent use of the 32-bit x86 assembler in mutex operations. */ -#if defined(__WIN__) && !defined(WIN64) && !defined(_WIN64) -#define UNIV_CAN_USE_X86_ASSEMBLER -#endif +# if defined(__WIN__) && !defined(WIN64) && !defined(_WIN64) +# define UNIV_CAN_USE_X86_ASSEMBLER +# endif /* We only try to do explicit inlining of functions with gcc and Microsoft Visual C++ */ diff --git a/storage/innobase/include/ut0lst.h b/storage/innobase/include/ut0lst.h index 9735bf315c6..ebe2803fe23 100644 --- a/storage/innobase/include/ut0lst.h +++ b/storage/innobase/include/ut0lst.h @@ -74,6 +74,7 @@ the pointer to the node to be added to the list. NAME is the list name. */ ((N)->NAME).next = (BASE).start;\ ((N)->NAME).prev = NULL;\ if ((BASE).start != NULL) {\ + ut_ad((BASE).start != (N));\ (((BASE).start)->NAME).prev = (N);\ }\ (BASE).start = (N);\ @@ -94,6 +95,7 @@ the pointer to the node to be added to the list. NAME is the list name. */ ((N)->NAME).prev = (BASE).end;\ ((N)->NAME).next = NULL;\ if ((BASE).end != NULL) {\ + ut_ad((BASE).end != (N));\ (((BASE).end)->NAME).next = (N);\ }\ (BASE).end = (N);\ @@ -111,6 +113,7 @@ name, NODE1 and NODE2 are pointers to nodes. */ {\ ut_ad(NODE1);\ ut_ad(NODE2);\ + ut_ad((NODE1) != (NODE2));\ ((BASE).count)++;\ ((NODE2)->NAME).prev = (NODE1);\ ((NODE2)->NAME).next = ((NODE1)->NAME).next;\ diff --git a/storage/innobase/lock/lock0lock.c b/storage/innobase/lock/lock0lock.c index 84b64b146dc..93a43d9a30f 100644 --- a/storage/innobase/lock/lock0lock.c +++ b/storage/innobase/lock/lock0lock.c @@ -1162,9 +1162,7 @@ lock_rec_get_next_on_page( ulint space; ulint page_no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(lock_get_type(lock) == LOCK_REC); space = lock->un_member.rec_lock.space; @@ -1201,9 +1199,7 @@ lock_rec_get_first_on_page_addr( { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = HASH_GET_FIRST(lock_sys->rec_hash, lock_rec_hash(space, page_no)); @@ -1261,9 +1257,7 @@ lock_rec_get_first_on_page( ulint space; ulint page_no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ hash = buf_frame_get_lock_hash_val(ptr); @@ -1295,9 +1289,7 @@ lock_rec_get_next( rec_t* rec, /* in: record on a page */ lock_t* lock) /* in: lock */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(lock_get_type(lock) == LOCK_REC); if (page_rec_is_comp(rec)) { @@ -1326,9 +1318,7 @@ lock_rec_get_first( { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = lock_rec_get_first_on_page(rec); if (UNIV_LIKELY_NULL(lock)) { @@ -1414,9 +1404,7 @@ lock_rec_get_prev( ulint page_no; lock_t* found_lock = NULL; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(lock_get_type(in_lock) == LOCK_REC); space = in_lock->un_member.rec_lock.space; @@ -1456,9 +1444,7 @@ lock_table_has( { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* Look for stronger locks the same trx already has on the table */ @@ -1502,9 +1488,7 @@ lock_rec_has_expl( { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad((precise_mode & LOCK_MODE_MASK) == LOCK_S || (precise_mode & LOCK_MODE_MASK) == LOCK_X); ut_ad(!(precise_mode & LOCK_INSERT_INTENTION)); @@ -1552,9 +1536,7 @@ lock_rec_other_has_expl_req( { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(mode == LOCK_X || mode == LOCK_S); ut_ad(gap == 0 || gap == LOCK_GAP); ut_ad(wait == 0 || wait == LOCK_WAIT); @@ -1594,9 +1576,8 @@ lock_rec_other_has_conflicting( trx_t* trx) /* in: our transaction */ { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG + ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = lock_rec_get_first(rec); @@ -1629,9 +1610,7 @@ lock_rec_find_similar_on_page( lock_t* lock; ulint heap_no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ heap_no = rec_get_heap_no(rec, page_rec_is_comp(rec)); lock = lock_rec_get_first_on_page(rec); @@ -1665,9 +1644,7 @@ lock_sec_rec_some_has_impl_off_kernel( { page_t* page; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(!(index->type & DICT_CLUSTERED)); ut_ad(page_rec_is_user_rec(rec)); ut_ad(rec_offs_validate(rec, index, offsets)); @@ -1760,9 +1737,7 @@ lock_rec_create( ulint n_bits; ulint n_bytes; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ page = buf_frame_align(rec); space = buf_frame_get_space_id(page); @@ -1842,9 +1817,7 @@ lock_rec_enqueue_waiting( lock_t* lock; trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* Test if there already is some other reason to suspend thread: we do not enqueue a lock request if the query thread should be @@ -1934,9 +1907,7 @@ lock_rec_add_to_queue( ulint heap_no; ibool somebody_waits = FALSE; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad((type_mode & (LOCK_WAIT | LOCK_GAP)) || ((type_mode & LOCK_MODE_MASK) != LOCK_S) || !lock_rec_other_has_expl_req(LOCK_X, 0, LOCK_WAIT, @@ -2017,9 +1988,7 @@ lock_rec_lock_fast( ulint heap_no; trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad((LOCK_MODE_MASK & mode) != LOCK_S || lock_table_has(thr_get_trx(thr), index->table, LOCK_IS)); ut_ad((LOCK_MODE_MASK & mode) != LOCK_X @@ -2102,9 +2071,7 @@ lock_rec_lock_slow( trx_t* trx; ulint err; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad((LOCK_MODE_MASK & mode) != LOCK_S || lock_table_has(thr_get_trx(thr), index->table, LOCK_IS)); ut_ad((LOCK_MODE_MASK & mode) != LOCK_X @@ -2176,9 +2143,7 @@ lock_rec_lock( { ulint err; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad((LOCK_MODE_MASK & mode) != LOCK_S || lock_table_has(thr_get_trx(thr), index->table, LOCK_IS)); ut_ad((LOCK_MODE_MASK & mode) != LOCK_X @@ -2216,9 +2181,7 @@ lock_rec_has_to_wait_in_queue( ulint page_no; ulint heap_no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(lock_get_wait(wait_lock)); ut_ad(lock_get_type(wait_lock) == LOCK_REC); @@ -2251,9 +2214,7 @@ lock_grant( /*=======*/ lock_t* lock) /* in: waiting lock request */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock_reset_lock_and_trx_wait(lock); @@ -2298,9 +2259,7 @@ lock_rec_cancel( /*============*/ lock_t* lock) /* in: waiting record lock request */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(lock_get_type(lock) == LOCK_REC); /* Reset the bit (there can be only one set bit) in the lock bitmap */ @@ -2333,9 +2292,7 @@ lock_rec_dequeue_from_page( lock_t* lock; trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(lock_get_type(in_lock) == LOCK_REC); trx = in_lock->trx; @@ -2378,9 +2335,7 @@ lock_rec_discard( ulint page_no; trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(lock_get_type(in_lock) == LOCK_REC); trx = in_lock->trx; @@ -2409,9 +2364,7 @@ lock_rec_free_all_from_discard_page( lock_t* lock; lock_t* next_lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ space = buf_frame_get_space_id(page); page_no = buf_frame_get_page_no(page); @@ -2444,9 +2397,7 @@ lock_rec_reset_and_release_wait( lock_t* lock; ulint heap_no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ heap_no = rec_get_heap_no(rec, page_rec_is_comp(rec)); @@ -2477,9 +2428,8 @@ lock_rec_inherit_to_gap( the locks on this record */ { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG + ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = lock_rec_get_first(rec); @@ -2518,9 +2468,8 @@ lock_rec_inherit_to_gap_if_gap_lock( the locks on this record */ { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG + ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = lock_rec_get_first(rec); @@ -2554,9 +2503,7 @@ lock_rec_move( ulint heap_no; ulint type_mode; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ heap_no = rec_get_heap_no(donator, comp); @@ -3228,9 +3175,7 @@ lock_deadlock_occurs( ulint cost = 0; ut_ad(trx && lock); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ retry: /* We check that adding this trx to the waits-for graph does not produce a cycle. First mark all active transactions @@ -3302,9 +3247,7 @@ lock_deadlock_recursive( ulint ret; ut_a(trx && start && wait_lock); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (trx->deadlock_mark == 1) { /* We have already exhaustively searched the subtree starting @@ -3315,12 +3258,6 @@ lock_deadlock_recursive( *cost = *cost + 1; - if ((depth > LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK) - || (*cost > LOCK_MAX_N_STEPS_IN_DEADLOCK_CHECK)) { - - return(LOCK_VICTIM_IS_START); - } - lock = wait_lock; if (lock_get_type(wait_lock) == LOCK_REC) { @@ -3353,11 +3290,18 @@ lock_deadlock_recursive( if (lock_has_to_wait(wait_lock, lock)) { + ibool too_far + = depth > LOCK_MAX_DEPTH_IN_DEADLOCK_CHECK + || *cost > LOCK_MAX_N_STEPS_IN_DEADLOCK_CHECK; + lock_trx = lock->trx; - if (lock_trx == start) { + if (lock_trx == start || too_far) { + /* We came back to the recursion starting - point: a deadlock detected */ + point: a deadlock detected; or we have + searched the waits-for graph too long */ + FILE* ef = lock_latest_err_file; rewind(ef); @@ -3399,9 +3343,20 @@ lock_deadlock_recursive( } #ifdef UNIV_DEBUG if (lock_print_waits) { - fputs("Deadlock detected\n", stderr); + fputs("Deadlock detected" + " or too long search\n", + stderr); } #endif /* UNIV_DEBUG */ + if (too_far) { + + fputs("TOO DEEP OR LONG SEARCH" + " IN THE LOCK TABLE" + " WAITS-FOR GRAPH\n", ef); + + return(LOCK_VICTIM_IS_START); + } + if (ut_dulint_cmp(wait_lock->trx->undo_no, start->undo_no) >= 0) { /* Our recursion starting point @@ -3472,9 +3427,7 @@ lock_table_create( lock_t* lock; ut_ad(table && trx); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (type_mode == LOCK_AUTO_INC) { /* Only one trx can have the lock on the table @@ -3519,9 +3472,7 @@ lock_table_remove_low( dict_table_t* table; trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ table = lock->un_member.tab_lock.table; trx = lock->trx; @@ -3555,9 +3506,7 @@ lock_table_enqueue_waiting( lock_t* lock; trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* Test if there already is some other reason to suspend thread: we do not enqueue a lock request if the query thread should be @@ -3630,9 +3579,7 @@ lock_table_other_has_incompatible( { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = UT_LIST_GET_LAST(table->locks); @@ -3786,9 +3733,7 @@ lock_table_dequeue( { lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_a(lock_get_type(in_lock) == LOCK_TABLE); lock = UT_LIST_GET_NEXT(un_member.tab_lock.locks, in_lock); @@ -3930,9 +3875,7 @@ lock_release_off_kernel( ulint count; lock_t* lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = UT_LIST_GET_LAST(trx->trx_locks); @@ -3993,9 +3936,7 @@ lock_cancel_waiting_and_release( /*============================*/ lock_t* lock) /* in: waiting lock request */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (lock_get_type(lock) == LOCK_REC) { @@ -4028,9 +3969,7 @@ lock_reset_all_on_table_for_trx( lock_t* lock; lock_t* prev_lock; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ lock = UT_LIST_GET_LAST(trx->trx_locks); @@ -4091,9 +4030,7 @@ lock_table_print( FILE* file, /* in: file where to print */ lock_t* lock) /* in: table type lock */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_a(lock_get_type(lock) == LOCK_TABLE); fputs("TABLE LOCK table ", file); @@ -4143,9 +4080,7 @@ lock_rec_print( ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_a(lock_get_type(lock) == LOCK_REC); space = lock->un_member.rec_lock.space; @@ -4250,9 +4185,7 @@ lock_get_n_rec_locks(void) ulint n_locks = 0; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ for (i = 0; i < hash_get_n_cells(lock_sys->rec_hash); i++) { @@ -4492,9 +4425,7 @@ lock_table_queue_validate( lock_t* lock; ibool is_waiting; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ is_waiting = FALSE; @@ -4665,9 +4596,7 @@ lock_rec_validate_page( ulint* offsets = offsets_; *offsets_ = (sizeof offsets_) / sizeof *offsets_; -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ mtr_start(&mtr); @@ -4943,9 +4872,7 @@ lock_rec_convert_impl_to_expl( { trx_t* impl_trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(page_rec_is_user_rec(rec)); ut_ad(rec_offs_validate(rec, index, offsets)); ut_ad(!page_rec_is_comp(rec) == !rec_offs_comp(offsets)); diff --git a/storage/innobase/log/log0log.c b/storage/innobase/log/log0log.c index 5d8875f1bd0..e9dedf6aac4 100644 --- a/storage/innobase/log/log0log.c +++ b/storage/innobase/log/log0log.c @@ -165,9 +165,7 @@ log_buf_pool_get_oldest_modification(void) { dulint lsn; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ lsn = buf_pool_get_oldest_modification(); @@ -269,9 +267,7 @@ log_write_low( ulint data_len; byte* log_block; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log->mutex))); -#endif /* UNIV_SYNC_DEBUG */ part_loop: /* Calculate a part length */ @@ -340,9 +336,7 @@ log_close(void) log_t* log = log_sys; ulint checkpoint_age; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log->mutex))); -#endif /* UNIV_SYNC_DEBUG */ lsn = log->lsn; @@ -464,9 +458,7 @@ log_group_get_capacity( /* out: capacity in bytes */ log_group_t* group) /* in: log group */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ return((group->file_size - LOG_FILE_HDR_SIZE) * group->n_files); } @@ -482,9 +474,7 @@ log_group_calc_size_offset( ulint offset, /* in: real offset within the log group */ log_group_t* group) /* in: log group */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ return(offset - LOG_FILE_HDR_SIZE * (1 + offset / group->file_size)); } @@ -500,9 +490,7 @@ log_group_calc_real_offset( ulint offset, /* in: size offset within the log group */ log_group_t* group) /* in: log group */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ return(offset + LOG_FILE_HDR_SIZE * (1 + offset / (group->file_size - LOG_FILE_HDR_SIZE))); @@ -525,9 +513,7 @@ log_group_calc_lsn_offset( ib_longlong group_size; ib_longlong offset; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* If total log file size is > 2 GB we can easily get overflows with 32-bit integers. Use 64-bit integers instead. */ @@ -642,9 +628,7 @@ log_calc_max_ages(void) ulint archive_margin; ulint smallest_archive_margin; -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ mutex_enter(&(log_sys->mutex)); @@ -942,9 +926,7 @@ log_flush_do_unlocks( ulint code) /* in: any ORed combination of LOG_UNLOCK_FLUSH_LOCK and LOG_UNLOCK_NONE_FLUSHED_LOCK */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* NOTE that we must own the log mutex when doing the setting of the events: this is because transactions will wait for these events to @@ -976,9 +958,7 @@ log_group_check_flush_completion( /* out: LOG_UNLOCK_NONE_FLUSHED_LOCK or 0 */ log_group_t* group) /* in: log group */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (!log_sys->one_flushed && group->n_pending_writes == 0) { #ifdef UNIV_DEBUG @@ -1015,9 +995,7 @@ log_sys_check_flush_completion(void) ulint move_start; ulint move_end; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (log_sys->n_pending_writes == 0) { @@ -1129,10 +1107,8 @@ log_group_file_header_flush( { byte* buf; ulint dest_offset; -#ifdef UNIV_SYNC_DEBUG - ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ + ut_ad(mutex_own(&(log_sys->mutex))); ut_a(nth_file < group->n_files); buf = *(group->file_header_bufs + nth_file); @@ -1203,9 +1179,7 @@ log_group_write_buf( ulint next_offset; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(len % OS_FILE_LOG_BLOCK_SIZE == 0); ut_a(ut_dulint_get_low(start_lsn) % OS_FILE_LOG_BLOCK_SIZE == 0); @@ -1626,9 +1600,7 @@ void log_complete_checkpoint(void) /*=========================*/ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(log_sys->n_pending_checkpoint_writes == 0); log_sys->next_checkpoint_no @@ -1715,9 +1687,7 @@ log_group_checkpoint( byte* buf; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ #if LOG_CHECKPOINT_SIZE > OS_FILE_LOG_BLOCK_SIZE # error "LOG_CHECKPOINT_SIZE > OS_FILE_LOG_BLOCK_SIZE" #endif @@ -1882,9 +1852,7 @@ log_group_read_checkpoint_info( log_group_t* group, /* in: log group */ ulint field) /* in: LOG_CHECKPOINT_1 or LOG_CHECKPOINT_2 */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ log_sys->n_log_ios++; @@ -1902,9 +1870,7 @@ log_groups_write_checkpoint_info(void) { log_group_t* group; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ group = UT_LIST_GET_FIRST(log_sys->log_groups); @@ -2162,9 +2128,7 @@ log_group_read_log_seg( ulint source_offset; ibool sync; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ sync = FALSE; @@ -2237,9 +2201,7 @@ log_group_archive_file_header_write( byte* buf; ulint dest_offset; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(nth_file < group->n_files); @@ -2276,9 +2238,7 @@ log_group_archive_completed_header_write( byte* buf; ulint dest_offset; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_a(nth_file < group->n_files); buf = *(group->archive_file_header_bufs + nth_file); @@ -2317,9 +2277,7 @@ log_group_archive( ulint n_files; ulint open_mode; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ start_lsn = log_sys->archived_lsn; @@ -2452,9 +2410,7 @@ log_archive_groups(void) { log_group_t* group; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ group = UT_LIST_GET_FIRST(log_sys->log_groups); @@ -2477,9 +2433,7 @@ log_archive_write_complete_groups(void) dulint end_lsn; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ group = UT_LIST_GET_FIRST(log_sys->log_groups); @@ -2546,9 +2500,7 @@ void log_archive_check_completion_low(void) /*==================================*/ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (log_sys->n_pending_archive_ios == 0 && log_sys->archiving_phase == LOG_ARCHIVE_READ) { @@ -2784,9 +2736,7 @@ log_archive_close_groups( log_group_t* group; ulint trunc_len; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (log_sys->archiving_state == LOG_ARCH_OFF) { @@ -3278,9 +3228,7 @@ log_check_log_recs( byte* buf1; byte* scan_buf; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (len == 0) { @@ -3322,7 +3270,7 @@ log_peek_lsn( log system mutex */ dulint* lsn) /* out: if returns TRUE, current lsn is here */ { - if (0 == mutex_enter_nowait(&(log_sys->mutex), __FILE__, __LINE__)) { + if (0 == mutex_enter_nowait(&(log_sys->mutex))) { *lsn = log_sys->lsn; mutex_exit(&(log_sys->mutex)); diff --git a/storage/innobase/log/log0recv.c b/storage/innobase/log/log0recv.c index 41e2b921664..ab5f42e3a13 100644 --- a/storage/innobase/log/log0recv.c +++ b/storage/innobase/log/log0recv.c @@ -171,9 +171,8 @@ void recv_sys_empty_hash(void) /*=====================*/ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(recv_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ + if (recv_sys->n_addrs != 0) { fprintf(stderr, "InnoDB: Error: %lu pages with log records" @@ -1396,9 +1395,8 @@ loop: goto loop; } -#ifdef UNIV_SYNC_DEBUG ut_ad(!allow_ibuf == mutex_own(&log_sys->mutex)); -#endif /* UNIV_SYNC_DEBUG */ + if (!allow_ibuf) { recv_no_ibuf_operations = TRUE; } @@ -1842,9 +1840,7 @@ recv_parse_log_recs( byte* body; ulint n_recs; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(!ut_dulint_is_zero(recv_sys->parse_start_lsn)); loop: ptr = recv_sys->buf + recv_sys->recovered_offset; @@ -2894,9 +2890,8 @@ recv_reset_logs( { log_group_t* group; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(log_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ + log_sys->lsn = ut_dulint_align_up(lsn, OS_FILE_LOG_BLOCK_SIZE); group = UT_LIST_GET_FIRST(log_sys->log_groups); diff --git a/storage/innobase/mem/mem0pool.c b/storage/innobase/mem/mem0pool.c index a7acd331e16..c010ae61160 100644 --- a/storage/innobase/mem/mem0pool.c +++ b/storage/innobase/mem/mem0pool.c @@ -257,9 +257,7 @@ mem_pool_fill_free_list( mem_area_t* area2; ibool ret; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(pool->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (i >= 63) { /* We come here when we have run out of space in the diff --git a/storage/innobase/pars/pars0pars.c b/storage/innobase/pars/pars0pars.c index 6861844870c..16530494a96 100644 --- a/storage/innobase/pars/pars0pars.c +++ b/storage/innobase/pars/pars0pars.c @@ -1859,10 +1859,9 @@ pars_sql( heap = mem_heap_create(256); -#ifdef UNIV_SYNC_DEBUG /* Currently, the parser is not reentrant: */ ut_ad(mutex_own(&(dict_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ + pars_sym_tab_global = sym_tab_create(heap); pars_sym_tab_global->string_len = strlen(str); diff --git a/storage/innobase/que/que0que.c b/storage/innobase/que/que0que.c index f5a63ae6ffa..bf83f28f04e 100644 --- a/storage/innobase/que/que0que.c +++ b/storage/innobase/que/que0que.c @@ -127,9 +127,7 @@ que_graph_publish( que_t* graph, /* in: graph */ sess_t* sess) /* in: session */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ UT_LIST_ADD_LAST(graphs, sess->graphs, graph); } @@ -238,9 +236,7 @@ que_thr_end_wait( { ibool was_active; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(thr); ut_ad((thr->state == QUE_THR_LOCK_WAIT) || (thr->state == QUE_THR_PROCEDURE_WAIT) @@ -280,9 +276,7 @@ que_thr_end_wait_no_next_thr( ut_a(thr->state == QUE_THR_LOCK_WAIT); /* In MySQL this is the only possible state here */ -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(thr); ut_ad((thr->state == QUE_THR_LOCK_WAIT) || (thr->state == QUE_THR_PROCEDURE_WAIT) @@ -419,9 +413,7 @@ que_fork_error_handle( { que_thr_t* thr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(trx->sess->state == SESS_ERROR); ut_ad(UT_LIST_GET_LEN(trx->reply_signals) == 0); ut_ad(UT_LIST_GET_LEN(trx->wait_thrs) == 0); @@ -698,9 +690,7 @@ que_graph_try_free( { sess_t* sess; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ sess = (graph->trx)->sess; @@ -931,9 +921,7 @@ que_thr_stop( que_t* graph; ibool ret = TRUE; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ graph = thr->graph; trx = graph->trx; @@ -1309,10 +1297,7 @@ que_run_threads_low( ut_ad(thr->state == QUE_THR_RUNNING); ut_a(thr_get_trx(thr)->error_state == DB_SUCCESS); - -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* cumul_resource counts how much resources the OS thread (NOT the query thread) has spent in this function */ diff --git a/storage/innobase/read/read0read.c b/storage/innobase/read/read0read.c index 2375c35190a..10a6e07e96a 100644 --- a/storage/innobase/read/read0read.c +++ b/storage/innobase/read/read0read.c @@ -162,9 +162,8 @@ read_view_oldest_copy_or_open_new( ulint n; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + old_view = UT_LIST_GET_LAST(trx_sys->view_list); if (old_view == NULL) { @@ -245,9 +244,9 @@ read_view_open_now( read_view_t* view; trx_t* trx; ulint n; -#ifdef UNIV_SYNC_DEBUG + ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + view = read_view_create_low(UT_LIST_GET_LEN(trx_sys->trx_list), heap); view->creator_trx_id = cr_trx_id; @@ -313,9 +312,8 @@ read_view_close( /*============*/ read_view_t* view) /* in: read view */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + UT_LIST_REMOVE(view_list, trx_sys->view_list, view); } diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c index 78851c7b4f9..7c9427db0d2 100644 --- a/storage/innobase/row/row0mysql.c +++ b/storage/innobase/row/row0mysql.c @@ -1748,8 +1748,8 @@ row_create_table_for_mysql( ut_ad(trx->mysql_thread_id == os_thread_get_curr_id()); #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); - ut_ad(mutex_own(&(dict_sys->mutex))); #endif /* UNIV_SYNC_DEBUG */ + ut_ad(mutex_own(&(dict_sys->mutex))); ut_ad(trx->dict_operation_lock_mode == RW_X_LATCH); if (srv_created_new_raw) { @@ -1964,8 +1964,8 @@ row_create_index_for_mysql( #ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); - ut_ad(mutex_own(&(dict_sys->mutex))); #endif /* UNIV_SYNC_DEBUG */ + ut_ad(mutex_own(&(dict_sys->mutex))); ut_ad(trx->mysql_thread_id == os_thread_get_curr_id()); trx->op_info = "creating index"; @@ -2080,8 +2080,8 @@ row_table_add_foreign_constraints( { ulint err; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ ut_a(sql_string); @@ -2246,9 +2246,7 @@ row_get_background_drop_list_len_low(void) /*======================================*/ /* out: how many tables in list */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (!row_mysql_drop_list_inited) { @@ -2726,8 +2724,8 @@ row_truncate_table_for_mysql( row_mysql_lock_data_dictionary(trx); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ @@ -3001,8 +2999,8 @@ row_drop_table_for_mysql( locked_dictionary = TRUE; } -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(dict_sys->mutex))); +#ifdef UNIV_SYNC_DEBUG ut_ad(rw_lock_own(&dict_operation_lock, RW_LOCK_EX)); #endif /* UNIV_SYNC_DEBUG */ diff --git a/storage/innobase/row/row0vers.c b/storage/innobase/row/row0vers.c index c8b71965f75..03d9a2f1203 100644 --- a/storage/innobase/row/row0vers.c +++ b/storage/innobase/row/row0vers.c @@ -63,8 +63,8 @@ row_vers_impl_x_locked_off_kernel( mtr_t mtr; ulint comp; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); +#ifdef UNIV_SYNC_DEBUG ut_ad(!rw_lock_own(&(purge_sys->latch), RW_LOCK_SHARED)); #endif /* UNIV_SYNC_DEBUG */ diff --git a/storage/innobase/srv/srv0que.c b/storage/innobase/srv/srv0que.c index 9c261cbb00e..e2b4e217980 100644 --- a/storage/innobase/srv/srv0que.c +++ b/storage/innobase/srv/srv0que.c @@ -82,10 +82,7 @@ srv_que_task_enqueue_low( que_thr_t* thr) /* in: query thread */ { ut_ad(thr); - -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ UT_LIST_ADD_LAST(queue, srv_sys->tasks, thr); diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c index 2a177ed26cd..72e8fe751d0 100644 --- a/storage/innobase/srv/srv0srv.c +++ b/storage/innobase/srv/srv0srv.c @@ -726,9 +726,7 @@ srv_suspend_thread(void) ulint slot_no; ulint type; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ slot_no = thr_local_get_slot_no(os_thread_get_curr_id()); @@ -780,9 +778,7 @@ srv_release_threads( ut_ad(type >= SRV_WORKER); ut_ad(type <= SRV_MASTER); ut_ad(n > 0); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ for (i = 0; i < OS_THREAD_MAX_N; i++) { @@ -1305,9 +1301,7 @@ srv_table_reserve_slot_for_mysql(void) srv_slot_t* slot; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ i = 0; slot = srv_mysql_table + i; @@ -1387,9 +1381,7 @@ srv_suspend_mysql_thread( ulint sec; ulint ms; -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ trx = thr_get_trx(thr); @@ -1535,9 +1527,7 @@ srv_release_mysql_thread_if_suspended( srv_slot_t* slot; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ for (i = 0; i < OS_THREAD_MAX_N; i++) { @@ -1830,15 +1820,15 @@ srv_export_innodb_status(void) export_vars.innodb_row_lock_waits = srv_n_lock_wait_count; export_vars.innodb_row_lock_current_waits = srv_n_lock_wait_current_count; - export_vars.innodb_row_lock_time = srv_n_lock_wait_time / 10000; + export_vars.innodb_row_lock_time = srv_n_lock_wait_time / 1000; if (srv_n_lock_wait_count > 0) { export_vars.innodb_row_lock_time_avg = (ulint) - (srv_n_lock_wait_time / 10000 / srv_n_lock_wait_count); + (srv_n_lock_wait_time / 1000 / srv_n_lock_wait_count); } else { export_vars.innodb_row_lock_time_avg = 0; } export_vars.innodb_row_lock_time_max - = srv_n_lock_max_wait_time / 10000; + = srv_n_lock_max_wait_time / 1000; export_vars.innodb_rows_read = srv_n_rows_read; export_vars.innodb_rows_inserted = srv_n_rows_inserted; export_vars.innodb_rows_updated = srv_n_rows_updated; diff --git a/storage/innobase/sync/sync0rw.c b/storage/innobase/sync/sync0rw.c index f06db577bad..34b45e2c1c3 100644 --- a/storage/innobase/sync/sync0rw.c +++ b/storage/innobase/sync/sync0rw.c @@ -339,9 +339,8 @@ rw_lock_x_lock_low( const char* file_name,/* in: file name where lock requested */ ulint line) /* in: line where requested */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(rw_lock_get_mutex(lock))); -#endif /* UNIV_SYNC_DEBUG */ + if (rw_lock_get_writer(lock) == RW_LOCK_NOT_LOCKED) { if (rw_lock_get_reader_count(lock) == 0) { @@ -564,8 +563,7 @@ rw_lock_debug_mutex_enter(void) /*==========================*/ { loop: - if (0 == mutex_enter_nowait(&rw_lock_debug_mutex, - __FILE__, __LINE__)) { + if (0 == mutex_enter_nowait(&rw_lock_debug_mutex)) { return; } @@ -573,8 +571,7 @@ loop: rw_lock_debug_waiters = TRUE; - if (0 == mutex_enter_nowait(&rw_lock_debug_mutex, - __FILE__, __LINE__)) { + if (0 == mutex_enter_nowait(&rw_lock_debug_mutex)) { return; } diff --git a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c index c0198469491..672e1f93aad 100644 --- a/storage/innobase/sync/sync0sync.c +++ b/storage/innobase/sync/sync0sync.c @@ -311,12 +311,13 @@ mutex_free( } /************************************************************************ -Tries to lock the mutex for the current thread. If the lock is not acquired -immediately, returns with return value 1. */ +NOTE! Use the corresponding macro in the header file, not this function +directly. Tries to lock the mutex for the current thread. If the lock is not +acquired immediately, returns with return value 1. */ ulint -mutex_enter_nowait( -/*===============*/ +mutex_enter_nowait_func( +/*====================*/ /* out: 0 if succeed, 1 if not */ mutex_t* mutex, /* in: pointer to mutex */ const char* file_name __attribute__((unused)), @@ -329,6 +330,7 @@ mutex_enter_nowait( if (!mutex_test_and_set(mutex)) { + ut_d(mutex->thread_id = os_thread_get_curr_id()); #ifdef UNIV_SYNC_DEBUG mutex_set_debug_info(mutex, file_name, line); #endif @@ -346,13 +348,29 @@ Checks that the mutex has been initialized. */ ibool mutex_validate( /*===========*/ - mutex_t* mutex) + const mutex_t* mutex) { ut_a(mutex); ut_a(mutex->magic_n == MUTEX_MAGIC_N); return(TRUE); } + +/********************************************************************** +Checks that the current thread owns the mutex. Works only in the debug +version. */ + +ibool +mutex_own( +/*======*/ + /* out: TRUE if owns */ + const mutex_t* mutex) /* in: mutex */ +{ + ut_ad(mutex_validate(mutex)); + + return(mutex_get_lock_word(mutex) == 1 + && os_thread_eq(mutex->thread_id, os_thread_get_curr_id())); +} #endif /* UNIV_DEBUG */ /********************************************************************** @@ -451,6 +469,7 @@ spin_loop: if (mutex_test_and_set(mutex) == 0) { /* Succeeded! */ + ut_d(mutex->thread_id = os_thread_get_curr_id()); #ifdef UNIV_SYNC_DEBUG mutex_set_debug_info(mutex, file_name, line); #endif @@ -492,6 +511,7 @@ spin_loop: sync_array_free_cell_protected(sync_primary_wait_array, index); + ut_d(mutex->thread_id = os_thread_get_curr_id()); #ifdef UNIV_SYNC_DEBUG mutex_set_debug_info(mutex, file_name, line); #endif @@ -592,7 +612,6 @@ mutex_set_debug_info( mutex->file_name = file_name; mutex->line = line; - mutex->thread_id = os_thread_get_curr_id(); } /********************************************************************** @@ -614,31 +633,6 @@ mutex_get_debug_info( *thread_id = mutex->thread_id; } -/********************************************************************** -Checks that the current thread owns the mutex. Works only in the debug -version. */ - -ibool -mutex_own( -/*======*/ - /* out: TRUE if owns */ - mutex_t* mutex) /* in: mutex */ -{ - ut_ad(mutex_validate(mutex)); - - if (mutex_get_lock_word(mutex) != 1) { - - return(FALSE); - } - - if (!os_thread_eq(mutex->thread_id, os_thread_get_curr_id())) { - - return(FALSE); - } - - return(TRUE); -} - /********************************************************************** Prints debug info of currently reserved mutexes. */ static diff --git a/storage/innobase/thr/thr0loc.c b/storage/innobase/thr/thr0loc.c index f22e909f392..b803bd53101 100644 --- a/storage/innobase/thr/thr0loc.c +++ b/storage/innobase/thr/thr0loc.c @@ -64,9 +64,7 @@ thr_local_get( try_again: ut_ad(thr_local_hash); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&thr_local_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* Look for the local struct in the hash table */ diff --git a/storage/innobase/trx/trx0purge.c b/storage/innobase/trx/trx0purge.c index 11e089ac90e..25519a09a1d 100644 --- a/storage/innobase/trx/trx0purge.c +++ b/storage/innobase/trx/trx0purge.c @@ -197,9 +197,7 @@ void trx_purge_sys_create(void) /*======================*/ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ purge_sys = mem_alloc(sizeof(trx_purge_t)); @@ -260,9 +258,8 @@ trx_purge_add_update_undo_to_history( ut_ad(undo); rseg = undo->rseg; -#ifdef UNIV_SYNC_DEBUG + ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ rseg_header = trx_rsegf_get(rseg->space, rseg->page_no, mtr); @@ -341,9 +338,7 @@ trx_purge_free_segment( /* fputs("Freeing an update undo log segment\n", stderr); */ -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(purge_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ loop: mtr_start(&mtr); mutex_enter(&(rseg->mutex)); @@ -445,9 +440,7 @@ trx_purge_truncate_rseg_history( ulint n_removed_logs = 0; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(purge_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ mtr_start(&mtr); mutex_enter(&(rseg->mutex)); @@ -537,9 +530,7 @@ trx_purge_truncate_history(void) dulint limit_trx_no; dulint limit_undo_no; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(purge_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx_purge_arr_get_biggest(purge_sys->arr, &limit_trx_no, &limit_undo_no); @@ -579,9 +570,7 @@ trx_purge_truncate_if_arr_empty(void) /*=================================*/ /* out: TRUE if array empty */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(purge_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (purge_sys->arr->n_used == 0) { @@ -610,9 +599,7 @@ trx_purge_rseg_get_next_history_log( ibool del_marks; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(purge_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ mutex_enter(&(rseg->mutex)); @@ -715,9 +702,7 @@ trx_purge_choose_next_log(void) ulint offset = 0; /* remove warning (??? bug ???) */ mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(purge_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(purge_sys->next_stored == FALSE); rseg = UT_LIST_GET_FIRST(trx_sys->rseg_list); @@ -818,9 +803,7 @@ trx_purge_get_next_rec( ulint cmpl_info; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(purge_sys->mutex))); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(purge_sys->next_stored); space = purge_sys->rseg->space; diff --git a/storage/innobase/trx/trx0roll.c b/storage/innobase/trx/trx0roll.c index 201d1be3656..91dcf035f96 100644 --- a/storage/innobase/trx/trx0roll.c +++ b/storage/innobase/trx/trx0roll.c @@ -785,10 +785,8 @@ trx_roll_try_truncate( dulint limit; dulint biggest; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(trx->undo_mutex))); ut_ad(mutex_own(&((trx->rseg)->mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx->pages_undone = 0; @@ -831,9 +829,7 @@ trx_roll_pop_top_rec( trx_undo_rec_t* prev_rec; page_t* prev_rec_page; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(trx->undo_mutex))); -#endif /* UNIV_SYNC_DEBUG */ undo_page = trx_undo_page_get_s_latched(undo->space, undo->top_page_no, mtr); @@ -1060,9 +1056,7 @@ trx_rollback( que_thr_t* thr; /* que_thr_t* thr2; */ -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad((trx->undo_no_arr == NULL) || ((trx->undo_no_arr)->n_used == 0)); /* Initialize the rollback field in the transaction */ @@ -1131,9 +1125,7 @@ trx_roll_graph_build( que_thr_t* thr; /* que_thr_t* thr2; */ -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ heap = mem_heap_create(512); fork = que_fork_create(NULL, NULL, QUE_FORK_ROLLBACK, heap); @@ -1160,9 +1152,7 @@ trx_finish_error_processing( trx_sig_t* sig; trx_sig_t* next_sig; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ sig = UT_LIST_GET_FIRST(trx->signals); @@ -1195,9 +1185,7 @@ trx_finish_partial_rollback_off_kernel( { trx_sig_t* sig; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ sig = UT_LIST_GET_FIRST(trx->signals); @@ -1228,9 +1216,7 @@ trx_finish_rollback_off_kernel( trx_sig_t* sig; trx_sig_t* next_sig; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_a(trx->undo_no_arr == NULL || trx->undo_no_arr->n_used == 0); diff --git a/storage/innobase/trx/trx0rseg.c b/storage/innobase/trx/trx0rseg.c index 7a6989c7b4f..020f217c90b 100644 --- a/storage/innobase/trx/trx0rseg.c +++ b/storage/innobase/trx/trx0rseg.c @@ -60,9 +60,7 @@ trx_rseg_header_create( page_t* page; ut_ad(mtr); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(mtr_memo_contains(mtr, fil_space_get_latch(space), MTR_MEMO_X_LOCK)); sys_header = trx_sysf_get(mtr); @@ -138,9 +136,7 @@ trx_rseg_mem_create( ulint sum_of_undo_sizes; ulint len; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ rseg = mem_alloc(sizeof(trx_rseg_t)); diff --git a/storage/innobase/trx/trx0sys.c b/storage/innobase/trx/trx0sys.c index b87f3d5e090..307a03bfbc3 100644 --- a/storage/innobase/trx/trx0sys.c +++ b/storage/innobase/trx/trx0sys.c @@ -547,9 +547,7 @@ trx_in_trx_list( { trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ trx = UT_LIST_GET_FIRST(trx_sys->trx_list); @@ -576,9 +574,7 @@ trx_sys_flush_max_trx_id(void) trx_sysf_t* sys_header; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ mtr_start(&mtr); @@ -799,9 +795,7 @@ trx_sysf_rseg_find_free( ulint page_no; ulint i; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(kernel_mutex))); -#endif /* UNIV_SYNC_DEBUG */ sys_header = trx_sysf_get(mtr); diff --git a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c index 6f59d2659ec..2f0c25c323a 100644 --- a/storage/innobase/trx/trx0trx.c +++ b/storage/innobase/trx/trx0trx.c @@ -101,9 +101,7 @@ trx_create( { trx_t* trx; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ trx = mem_alloc(sizeof(trx_t)); @@ -280,9 +278,7 @@ trx_free( /*=====*/ trx_t* trx) /* in, own: trx object */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (trx->declared_to_be_inside_innodb) { ut_print_timestamp(stderr); @@ -406,9 +402,7 @@ trx_list_insert_ordered( { trx_t* trx2; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ trx2 = UT_LIST_GET_FIRST(trx_sys->trx_list); @@ -633,9 +627,7 @@ trx_assign_rseg(void) { trx_rseg_t* rseg = trx_sys->latest_rseg; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ loop: /* Get next rseg in a round-robin fashion */ @@ -672,9 +664,7 @@ trx_start_low( { trx_rseg_t* rseg; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(trx->rseg == NULL); if (trx->type == TRX_PURGE) { @@ -749,9 +739,7 @@ trx_commit_off_kernel( ibool must_flush_log = FALSE; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ trx->must_flush_log_later = FALSE; @@ -851,9 +839,7 @@ trx_commit_off_kernel( ut_ad(trx->conc_state == TRX_ACTIVE || trx->conc_state == TRX_PREPARED); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /* The following assignment makes the transaction committed in memory and makes its changes to data visible to other transactions. @@ -1036,9 +1022,7 @@ trx_handle_commit_sig_off_kernel( trx_sig_t* sig; trx_sig_t* next_sig; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ trx->que_state = TRX_QUE_COMMITTING; @@ -1078,9 +1062,7 @@ trx_end_lock_wait( { que_thr_t* thr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(trx->que_state == TRX_QUE_LOCK_WAIT); thr = UT_LIST_GET_FIRST(trx->wait_thrs); @@ -1107,9 +1089,7 @@ trx_lock_wait_to_suspended( { que_thr_t* thr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(trx->que_state == TRX_QUE_LOCK_WAIT); thr = UT_LIST_GET_FIRST(trx->wait_thrs); @@ -1137,9 +1117,7 @@ trx_sig_reply_wait_to_suspended( trx_sig_t* sig; que_thr_t* thr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ sig = UT_LIST_GET_FIRST(trx->reply_signals); @@ -1172,9 +1150,7 @@ trx_sig_is_compatible( { trx_sig_t* sig; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (UT_LIST_GET_LEN(trx->signals) == 0) { @@ -1260,9 +1236,7 @@ trx_sig_send( trx_t* receiver_trx; ut_ad(trx); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (!trx_sig_is_compatible(trx, type, sender)) { /* The signal is not compatible with the other signals in @@ -1332,9 +1306,7 @@ trx_end_signal_handling( /*====================*/ trx_t* trx) /* in: trx */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(trx->handling_signals == TRUE); trx->handling_signals = FALSE; @@ -1368,9 +1340,7 @@ loop: we can process immediately */ ut_ad(trx); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (trx->handling_signals && (UT_LIST_GET_LEN(trx->signals) == 0)) { @@ -1471,9 +1441,7 @@ trx_sig_reply( trx_t* receiver_trx; ut_ad(sig); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ if (sig->receiver != NULL) { ut_ad((sig->receiver)->state == QUE_THR_SIG_REPLY_WAIT); @@ -1501,9 +1469,7 @@ trx_sig_remove( trx_sig_t* sig) /* in, own: signal */ { ut_ad(trx && sig); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(sig->receiver == NULL); @@ -1820,9 +1786,7 @@ trx_prepare_off_kernel( dulint lsn; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ rseg = trx->rseg; @@ -1868,9 +1832,7 @@ trx_prepare_off_kernel( mutex_enter(&kernel_mutex); } -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ /*--------------------------------------*/ trx->conc_state = TRX_PREPARED; diff --git a/storage/innobase/trx/trx0undo.c b/storage/innobase/trx/trx0undo.c index fbcfab38f01..831e337f513 100644 --- a/storage/innobase/trx/trx0undo.c +++ b/storage/innobase/trx/trx0undo.c @@ -395,9 +395,7 @@ trx_undo_seg_create( ibool success; ut_ad(mtr && id && rseg_hdr); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ /* fputs(type == TRX_UNDO_INSERT ? "Creating insert undo log segment\n" @@ -836,11 +834,9 @@ trx_undo_add_page( ulint n_reserved; ibool success; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(trx->undo_mutex))); ut_ad(!mutex_own(&kernel_mutex)); ut_ad(mutex_own(&(trx->rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ rseg = trx->rseg; @@ -911,10 +907,8 @@ trx_undo_free_page( ulint hist_size; ut_a(hdr_page_no != page_no); -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ undo_page = trx_undo_page_get(space, page_no, mtr); @@ -961,9 +955,7 @@ trx_undo_free_page_in_rollback( ulint last_page_no; ut_ad(undo->hdr_page_no != page_no); -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(trx->undo_mutex))); -#endif /* UNIV_SYNC_DEBUG */ last_page_no = trx_undo_free_page(undo->rseg, FALSE, undo->space, undo->hdr_page_no, page_no, mtr); @@ -1016,10 +1008,8 @@ trx_undo_truncate_end( trx_rseg_t* rseg; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(trx->undo_mutex))); ut_ad(mutex_own(&(trx->rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ rseg = trx->rseg; @@ -1096,9 +1086,7 @@ trx_undo_truncate_start( ulint page_no; mtr_t mtr; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (0 == ut_dulint_cmp(limit, ut_dulint_zero)) { @@ -1164,9 +1152,9 @@ trx_undo_seg_free( while (!finished) { mtr_start(&mtr); -#ifdef UNIV_SYNC_DEBUG + ut_ad(!mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + mutex_enter(&(rseg->mutex)); seg_header = trx_undo_page_get(undo->space, undo->hdr_page_no, @@ -1389,9 +1377,7 @@ trx_undo_mem_create( { trx_undo_t* undo; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (id >= TRX_RSEG_N_SLOTS) { fprintf(stderr, @@ -1437,11 +1423,9 @@ trx_undo_mem_init_for_reuse( XID* xid, /* in: X/Open XA transaction identification*/ ulint offset) /* in: undo log header byte offset on page */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&((undo->rseg)->mutex))); -#endif /* UNIV_SYNC_DEBUG */ - if (undo->id >= TRX_RSEG_N_SLOTS) { + if (UNIV_UNLIKELY(undo->id >= TRX_RSEG_N_SLOTS)) { fprintf(stderr, "InnoDB: Error: undo->id is %lu\n", (ulong) undo->id); @@ -1501,9 +1485,7 @@ trx_undo_create( trx_undo_t* undo; page_t* undo_page; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (rseg->curr_size == rseg->max_size) { @@ -1561,9 +1543,7 @@ trx_undo_reuse_cached( page_t* undo_page; ulint offset; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ if (type == TRX_UNDO_INSERT) { @@ -1671,15 +1651,12 @@ trx_undo_assign_undo( rseg = trx->rseg; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(trx->undo_mutex))); -#endif /* UNIV_SYNC_DEBUG */ mtr_start(&mtr); -#ifdef UNIV_SYNC_DEBUG ut_ad(!mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + mutex_enter(&(rseg->mutex)); undo = trx_undo_reuse_cached(trx, rseg, type, trx->id, &trx->xid, @@ -1836,9 +1813,8 @@ trx_undo_update_cleanup( undo = trx->update_undo; rseg = trx->rseg; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(rseg->mutex))); -#endif /* UNIV_SYNC_DEBUG */ + trx_purge_add_update_undo_to_history(trx, undo_page, mtr); UT_LIST_REMOVE(undo_list, rseg->update_undo_list, undo); diff --git a/storage/innobase/usr/usr0sess.c b/storage/innobase/usr/usr0sess.c index ca97ea23e95..3740c05eaab 100644 --- a/storage/innobase/usr/usr0sess.c +++ b/storage/innobase/usr/usr0sess.c @@ -32,9 +32,8 @@ sess_open(void) { sess_t* sess; -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + sess = mem_alloc(sizeof(sess_t)); sess->state = SESS_ACTIVE; @@ -54,9 +53,7 @@ sess_close( /*=======*/ sess_t* sess) /* in, own: session object */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ ut_ad(sess->trx == NULL); mem_free(sess); @@ -72,9 +69,8 @@ sess_try_close( /* out: TRUE if closed */ sess_t* sess) /* in, own: session object */ { -#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&kernel_mutex)); -#endif /* UNIV_SYNC_DEBUG */ + if (UT_LIST_GET_LEN(sess->graphs) == 0) { sess_close(sess); diff --git a/storage/innobase/ut/ut0ut.c b/storage/innobase/ut/ut0ut.c index d805cc3b4b2..bc6778f4c2f 100644 --- a/storage/innobase/ut/ut0ut.c +++ b/storage/innobase/ut/ut0ut.c @@ -20,6 +20,55 @@ Created 5/11/1994 Heikki Tuuri ibool ut_always_false = FALSE; +#ifdef __WIN__ +/********************************************************************* +NOTE: The Windows epoch starts from 1601/01/01 whereas the Unix +epoch starts from 1970/1/1. For selection of constant see: +http://support.microsoft.com/kb/167296/ */ +#define WIN_TO_UNIX_DELTA_USEC ((ib_longlong) 11644473600000000ULL) + + +/********************************************************************* +This is the Windows version of gettimeofday(2).*/ +static +int +ut_gettimeofday( +/*============*/ + /* out: 0 if all OK else -1 */ + struct timeval* tv, /* out: Values are relative to Unix epoch */ + void* tz) /* in: not used */ +{ + FILETIME ft; + ib_longlong tm; + + if (!tv) { + errno = EINVAL; + return(-1); + } + + GetSystemTimeAsFileTime(&ft); + + tm = (ib_longlong) ft.dwHighDateTime << 32; + tm |= ft.dwLowDateTime; + + ut_a(tm >= 0); /* If tm wraps over to negative, the quotient / 10 + does not work */ + + tm /= 10; /* Convert from 100 nsec periods to usec */ + + /* If we don't convert to the Unix epoch the value for + struct timeval::tv_sec will overflow.*/ + tm -= WIN_TO_UNIX_DELTA_USEC; + + tv->tv_sec = (long) (tm / 1000000L); + tv->tv_usec = (long) (tm % 1000000L); + + return(0); +} +#else +#define ut_gettimeofday gettimeofday +#endif + #ifndef UNIV_HOTBACKUP /********************************************************************* Display an SQL identifier. @@ -85,17 +134,11 @@ ut_usectime( ulint* sec, /* out: seconds since the Epoch */ ulint* ms) /* out: microseconds since the Epoch+*sec */ { -#ifdef __WIN__ - SYSTEMTIME st; - GetLocalTime(&st); - *sec = (ulint) st.wSecond; - *ms = (ulint) st.wMilliseconds; -#else struct timeval tv; - gettimeofday(&tv,NULL); + + ut_gettimeofday(&tv, NULL); *sec = (ulint) tv.tv_sec; *ms = (ulint) tv.tv_usec; -#endif } /************************************************************** From 46914b213b433fa1fc5d9eba95ec93c54909ff71 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 22 Mar 2007 20:36:58 -0400 Subject: [PATCH 018/153] additional changes to merge fix for bug 26346 --- client/mysqldump.c | 43 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index 6fcb143d2c9..4b358296759 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1486,10 +1486,7 @@ static uint dump_events_for_db(char *db) mysql_query(mysql, "LOCK TABLES mysql.event READ"); if (mysql_query_with_error_report(mysql, &event_list_res, "show events")) - { - safe_exit(EX_MYSQLERR); DBUG_RETURN(0); - } strcpy(delimiter, ";"); if (mysql_num_rows(event_list_res) > 0) @@ -2928,25 +2925,25 @@ static int dump_tablespaces_for_tables(char *db, char **table_names, int tables) mysql_real_escape_string(mysql, name_buff, db, strlen(db)); - init_dynamic_string(&where, " AND TABLESPACE_NAME IN (" + init_dynamic_string_checked(&where, " AND TABLESPACE_NAME IN (" "SELECT DISTINCT TABLESPACE_NAME FROM" " INFORMATION_SCHEMA.PARTITIONS" " WHERE" " TABLE_SCHEMA='", 256, 1024); - dynstr_append(&where, name_buff); - dynstr_append(&where, "' AND TABLE_NAME IN ("); + dynstr_append_checked(&where, name_buff); + dynstr_append_checked(&where, "' AND TABLE_NAME IN ("); for (i=0 ; i Date: Fri, 23 Mar 2007 11:01:47 +0100 Subject: [PATCH 019/153] Bug#26233 very suspect code in mf_tempfile.c, in function create_temp_file() - Rework the windows implementation in 'create_temp_file' to be thread safe by using GetTempFileName instad of fiddling with "environ" mysys/mf_tempfile.c: - Update windows implementation of 'create_temp_file' to use GetTempFileName in favor of fiddeling with "environ" in an unsafe way - Remove the implementation that is supposed to be used if not windows, not mkstemp or tmpnam exists as it not longer compiles it can't be used anywhere. - Update function comment for 'create_temp_file' mysys/my_static.c: Remove unused variable mysys/my_static.h: Remove unused variable --- mysys/mf_tempfile.c | 145 +++++++++++++++++++------------------------- mysys/my_static.c | 5 -- mysys/my_static.h | 4 -- 3 files changed, 61 insertions(+), 93 deletions(-) diff --git a/mysys/mf_tempfile.c b/mysys/mf_tempfile.c index 431674c5d61..c1108f85054 100644 --- a/mysys/mf_tempfile.c +++ b/mysys/mf_tempfile.c @@ -22,15 +22,36 @@ #include #endif -#ifdef HAVE_TEMPNAM -#if !defined(MSDOS) && !defined(OS2) && !defined(__NETWARE__) -extern char **environ; -#endif -#endif + /* - Create a temporary file in a given directory - This function should be used instead of my_tempnam() ! + @brief + Create a temporary file with unique name in a given directory + + @details + create_temp_file + to pointer to buffer where temporary filename will be stored + dir directory where to create the file + prefix prefix the filename with this + mode Flags to use for my_create/my_open + MyFlags Magic flags + + @return + File descriptor of opened file if success + -1 and sets errno if fails. + + @note + The behaviour of this function differs a lot between + implementation, it's main use is to generate a file with + a name that does not already exist. + + When passing O_TEMPORARY flag in "mode" the file should + be automatically deleted + + The implementation using mkstemp should be considered the + reference implementation when adding a new or modifying an + existing one + */ File create_temp_file(char *to, const char *dir, const char *prefix, @@ -38,41 +59,33 @@ File create_temp_file(char *to, const char *dir, const char *prefix, myf MyFlags __attribute__((unused))) { File file= -1; + DBUG_ENTER("create_temp_file"); -#if defined(_MSC_VER) + DBUG_PRINT("enter", ("dir: %s, prefix: %s", dir, prefix)); +#if defined (__WIN__) + + /* + Use GetTempFileName to generate a unique filename, create + the file and release it's handle + - uses up to the first three letters from prefix + */ + if (GetTempFileName(dir, prefix, 0, to) == 0) + DBUG_RETURN(-1); + + DBUG_PRINT("info", ("name: %s", to)); + + /* + Open the file without the "open only if file doesn't already exist" + since the file has already been created by GetTempFileName + */ + if ((file= my_open(to, (mode & ~O_EXCL), MyFlags)) < 0) { - char temp[FN_REFLEN],*end,*res,**old_env,*temp_env[1]; - old_env=environ; - if (dir) - { - end=strend(dir)-1; - if (!dir[0]) - { /* Change empty string to current dir */ - to[0]= FN_CURLIB; - to[1]= 0; - dir=to; - } - else if (*end == FN_DEVCHAR) - { /* Get current dir for drive */ - _fullpath(temp,dir,FN_REFLEN); - dir=to; - } - else if (*end == FN_LIBCHAR && dir < end && end[-1] != FN_DEVCHAR) - { - strmake(to,dir,(uint) (end-dir)); /* Copy and remove last '\' */ - dir=to; - } - environ=temp_env; /* Force use of dir (dir not checked) */ - temp_env[0]=0; - } - if ((res=tempnam((char*) dir,(char *) prefix))) - { - strmake(to,res,FN_REFLEN-1); - (*free)(res); - file=my_create(to,0, mode | O_EXCL | O_NOFOLLOW, MyFlags); - } - environ=old_env; + /* Open failed, remove the file created by GetTempFileName */ + int tmp= my_errno; + (void) my_delete(to, MYF(0)); + my_errno= tmp; } + #elif defined(_ZTC__) if (!dir) dir=getenv("TMPDIR"); @@ -101,6 +114,8 @@ File create_temp_file(char *to, const char *dir, const char *prefix, } strmov(convert_dirname(to,dir,NullS),prefix_buff); org_file=mkstemp(to); + if (mode & O_TEMPORARY) + (void) my_delete(to, MYF(MY_WME | ME_NOINPUT)); file=my_register_filename(org_file, to, FILE_BY_MKSTEMP, EE_CANTCREATEFILE, MyFlags); /* If we didn't manage to register the name, remove the temp file */ @@ -113,6 +128,10 @@ File create_temp_file(char *to, const char *dir, const char *prefix, } #elif defined(HAVE_TEMPNAM) { +#if !defined(__NETWARE__) + extern char **environ; +#endif + char *res,**old_env,*temp_env[1]; if (dir && !dir[0]) { /* Change empty string to current dir */ @@ -120,16 +139,7 @@ File create_temp_file(char *to, const char *dir, const char *prefix, to[1]= 0; dir=to; } -#ifdef OS2 - /* changing environ variable doesn't work with VACPP */ - char buffer[256], *end; - buffer[sizeof(buffer)-1]= 0; - end= strxnmov(buffer, sizeof(buffer)-1, (char*) "TMP=", dir, NullS); - /* remove ending backslash */ - if (end[-1] == '\\') - end[-1]= 0; - putenv(buffer); -#elif !defined(__NETWARE__) +#if !defined(__NETWARE__) old_env= (char**) environ; if (dir) { /* Don't use TMPDIR if dir is given */ @@ -151,45 +161,12 @@ File create_temp_file(char *to, const char *dir, const char *prefix, { DBUG_PRINT("error",("Got error: %d from tempnam",errno)); } -#if !defined(OS2) && !defined(__NETWARE__) +#if !defined(__NETWARE__) environ=(const char**) old_env; #endif } #else - { - register long uniq; - register int length; - my_string pos,end_pos; - /* Make an unique number */ - pthread_mutex_lock(&THR_LOCK_open); - uniq= ((long) getpid() << 20) + (long) _my_tempnam_used++ ; - pthread_mutex_unlock(&THR_LOCK_open); - if (!dir && !(dir=getenv("TMPDIR"))) /* Use this if possibly */ - dir=P_tmpdir; /* Use system default */ - length=strlen(dir)+strlen(pfx)+1; - - DBUG_PRINT("test",("mallocing %d byte",length+8+sizeof(TMP_EXT)+1)); - if (length+8+sizeof(TMP_EXT)+1 > FN_REFLENGTH) - errno=my_errno= ENAMETOOLONG; - else - { - end_pos=strmov(to,dir); - if (end_pos != to && end_pos[-1] != FN_LIBCHAR) - *end_pos++=FN_LIBCHAR; - end_pos=strmov(end_pos,pfx); - - for (length=0 ; length < 8 && uniq ; length++) - { - *end_pos++= _dig_vec_upper[(int) (uniq & 31)]; - uniq >>= 5; - } - (void) strmov(end_pos,TMP_EXT); - file=my_create(to,0, - (int) (O_RDWR | O_BINARY | O_TRUNC | O_EXCL | O_NOFOLLOW | - O_TEMPORARY | O_SHORT_LIVED), - MYF(MY_WME)); - } - } +#error No implementation found for create_temp_file #endif if (file >= 0) thread_safe_increment(my_tmp_file_created,&THR_LOCK_open); diff --git a/mysys/my_static.c b/mysys/my_static.c index 694e5058bb0..77dbffb911e 100644 --- a/mysys/my_static.c +++ b/mysys/my_static.c @@ -67,11 +67,6 @@ uint my_once_extra=ONCE_ALLOC_INIT; /* Memory to alloc / block */ #ifdef HAVE_LARGE_PAGES my_bool my_use_large_pages= 0; uint my_large_page_size= 0; -#endif - - /* from my_tempnam */ -#if !defined(HAVE_TEMPNAM) || defined(HPUX11) -int _my_tempnam_used=0; #endif /* from safe_malloc */ diff --git a/mysys/my_static.h b/mysys/my_static.h index cbd293a0431..b438c936225 100644 --- a/mysys/my_static.h +++ b/mysys/my_static.h @@ -60,10 +60,6 @@ extern const char *soundex_map; extern USED_MEM* my_once_root_block; extern uint my_once_extra; -#if !defined(HAVE_TEMPNAM) || defined(HPUX11) -extern int _my_tempnam_used; -#endif - extern byte *sf_min_adress,*sf_max_adress; extern uint sf_malloc_count; extern struct st_irem *sf_malloc_root; From 1708aab339ad9e470e6c451d8aa7b50b0f0da707 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 11:18:59 +0100 Subject: [PATCH 020/153] Bug#27070 server logs are created unrequested and in wrong directory - Add output path for slow queries as well mysql-test/mysql-test-run.pl: Send queries to var/log/$type.log and slow queries to var/log/$type-slow.log --- mysql-test/mysql-test-run.pl | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index fbe5a643fe7..69103334252 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1064,7 +1064,6 @@ sub command_line_setup () { idx => 0, path_myddir => "$opt_vardir/master-data", path_myerr => "$opt_vardir/log/master.err", - path_mylog => "$opt_vardir/log/master.log", path_pid => "$opt_vardir/run/master.pid", path_sock => "$sockdir/master.sock", port => $opt_master_myport, @@ -1080,7 +1079,6 @@ sub command_line_setup () { idx => 1, path_myddir => "$opt_vardir/master1-data", path_myerr => "$opt_vardir/log/master1.err", - path_mylog => "$opt_vardir/log/master1.log", path_pid => "$opt_vardir/run/master1.pid", path_sock => "$sockdir/master1.sock", port => $opt_master_myport + 1, @@ -1096,7 +1094,6 @@ sub command_line_setup () { idx => 0, path_myddir => "$opt_vardir/slave-data", path_myerr => "$opt_vardir/log/slave.err", - path_mylog => "$opt_vardir/log/slave.log", path_pid => "$opt_vardir/run/slave.pid", path_sock => "$sockdir/slave.sock", port => $opt_slave_myport, @@ -1113,7 +1110,6 @@ sub command_line_setup () { idx => 1, path_myddir => "$opt_vardir/slave1-data", path_myerr => "$opt_vardir/log/slave1.err", - path_mylog => "$opt_vardir/log/slave1.log", path_pid => "$opt_vardir/run/slave1.pid", path_sock => "$sockdir/slave1.sock", port => $opt_slave_myport + 1, @@ -1129,7 +1125,6 @@ sub command_line_setup () { idx => 2, path_myddir => "$opt_vardir/slave2-data", path_myerr => "$opt_vardir/log/slave2.err", - path_mylog => "$opt_vardir/log/slave2.log", path_pid => "$opt_vardir/run/slave2.pid", path_sock => "$sockdir/slave2.sock", port => $opt_slave_myport + 2, @@ -3683,8 +3678,10 @@ sub mysqld_arguments ($$$$) { mtr_add_arg($args, "%s--log-output=table,file", $prefix); } - mtr_add_arg($args, "%s--log=%s", $prefix, $mysqld->{'path_mylog'}); - + my $log_base_path= "$opt_vardir/log/$mysqld->{'type'}$sidx"; + mtr_add_arg($args, "%s--log=%s.log", $prefix, $log_base_path); + mtr_add_arg($args, + "%s--log-slow-queries=%s-slow.log", $prefix, $log_base_path); # Check if "extra_opt" contains --skip-log-bin my $skip_binlog= grep(/^--skip-log-bin/, @$extra_opt); From 45f2f76457a39977cbe0026f3ae281aa726c6c67 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 11:52:25 +0100 Subject: [PATCH 021/153] Import yassl 1.6.0 extra/yassl/README: Import patch yassl.diff extra/yassl/include/buffer.hpp: Import patch yassl.diff extra/yassl/include/crypto_wrapper.hpp: Import patch yassl.diff extra/yassl/include/openssl/ssl.h: Import patch yassl.diff extra/yassl/include/socket_wrapper.hpp: Import patch yassl.diff extra/yassl/include/yassl_imp.hpp: Import patch yassl.diff extra/yassl/include/yassl_int.hpp: Import patch yassl.diff extra/yassl/src/crypto_wrapper.cpp: Import patch yassl.diff extra/yassl/src/ssl.cpp: Import patch yassl.diff extra/yassl/taocrypt/README: Import patch yassl.diff extra/yassl/taocrypt/benchmark/benchmark.cpp: Import patch yassl.diff extra/yassl/taocrypt/include/algebra.hpp: Import patch yassl.diff extra/yassl/taocrypt/include/des.hpp: Import patch yassl.diff extra/yassl/taocrypt/include/hash.hpp: Import patch yassl.diff extra/yassl/taocrypt/include/hmac.hpp: Import patch yassl.diff extra/yassl/taocrypt/include/misc.hpp: Import patch yassl.diff extra/yassl/taocrypt/include/modarith.hpp: Import patch yassl.diff extra/yassl/taocrypt/include/modes.hpp: Import patch yassl.diff extra/yassl/taocrypt/include/rsa.hpp: Import patch yassl.diff extra/yassl/taocrypt/include/sha.hpp: Import patch yassl.diff extra/yassl/taocrypt/include/type_traits.hpp: Import patch yassl.diff extra/yassl/taocrypt/include/types.hpp: Import patch yassl.diff extra/yassl/taocrypt/mySTL/list.hpp: Import patch yassl.diff extra/yassl/taocrypt/src/aes.cpp: Import patch yassl.diff extra/yassl/taocrypt/src/algebra.cpp: Import patch yassl.diff extra/yassl/taocrypt/src/asn.cpp: Import patch yassl.diff extra/yassl/taocrypt/src/hash.cpp: Import patch yassl.diff extra/yassl/taocrypt/src/integer.cpp: Import patch yassl.diff extra/yassl/taocrypt/src/sha.cpp: Import patch yassl.diff extra/yassl/taocrypt/test/test.cpp: Import patch yassl.diff extra/yassl/testsuite/testsuite.cpp: Import patch yassl.diff --- extra/yassl/README | 8 + extra/yassl/include/buffer.hpp | 3 - extra/yassl/include/crypto_wrapper.hpp | 6 - extra/yassl/include/openssl/ssl.h | 10 +- extra/yassl/include/socket_wrapper.hpp | 6 +- extra/yassl/include/yassl_imp.hpp | 17 +- extra/yassl/include/yassl_int.hpp | 1 - extra/yassl/src/crypto_wrapper.cpp | 2 - extra/yassl/src/ssl.cpp | 4 +- extra/yassl/taocrypt/README | 13 +- extra/yassl/taocrypt/benchmark/benchmark.cpp | 32 +- extra/yassl/taocrypt/include/algebra.hpp | 3 - extra/yassl/taocrypt/include/des.hpp | 1 - extra/yassl/taocrypt/include/hash.hpp | 36 +- extra/yassl/taocrypt/include/hmac.hpp | 4 +- extra/yassl/taocrypt/include/misc.hpp | 19 + extra/yassl/taocrypt/include/modarith.hpp | 4 +- extra/yassl/taocrypt/include/modes.hpp | 4 +- extra/yassl/taocrypt/include/rsa.hpp | 34 +- extra/yassl/taocrypt/include/sha.hpp | 97 +++++ extra/yassl/taocrypt/include/type_traits.hpp | 6 +- extra/yassl/taocrypt/include/types.hpp | 3 + extra/yassl/taocrypt/mySTL/list.hpp | 16 +- extra/yassl/taocrypt/src/aes.cpp | 11 +- extra/yassl/taocrypt/src/algebra.cpp | 6 +- extra/yassl/taocrypt/src/asn.cpp | 8 +- extra/yassl/taocrypt/src/hash.cpp | 85 ++++ extra/yassl/taocrypt/src/integer.cpp | 2 +- extra/yassl/taocrypt/src/sha.cpp | 410 +++++++++++++++++++ extra/yassl/taocrypt/test/test.cpp | 258 +++++++++--- extra/yassl/testsuite/testsuite.cpp | 17 +- 31 files changed, 953 insertions(+), 173 deletions(-) diff --git a/extra/yassl/README b/extra/yassl/README index 32d97a1e873..6c4d101efc0 100644 --- a/extra/yassl/README +++ b/extra/yassl/README @@ -1,3 +1,11 @@ +*****************yaSSL Release notes, version 1.6.0 (2/22/07) + + This release of yaSSL contains bug fixes, portability enhancements, and + better X509 support. + +See normal build instructions below under 1.0.6. +See libcurl build instructions below under 1.3.0 and note in 1.5.8. + *****************yaSSL Release notes, version 1.5.8 (1/10/07) This release of yaSSL contains bug fixes, portability enhancements, and diff --git a/extra/yassl/include/buffer.hpp b/extra/yassl/include/buffer.hpp index 3fe12f38f57..a51bca9a630 100644 --- a/extra/yassl/include/buffer.hpp +++ b/extra/yassl/include/buffer.hpp @@ -49,13 +49,11 @@ const uint AUTO = 0xFEEDBEEF; // Checking Policy should implement a check function that tests whether the // index is within the size limit of the array struct Check { - Check() {} void check(uint i, uint limit); }; struct NoCheck { - NoCheck() {} void check(uint, uint); }; @@ -193,7 +191,6 @@ inline void checked_delete(T* p) // sets pointer to zero so safe for std conatiners struct del_ptr_zero { - del_ptr_zero() {} template void operator()(T*& p) const { diff --git a/extra/yassl/include/crypto_wrapper.hpp b/extra/yassl/include/crypto_wrapper.hpp index 9e4eb582368..07b5925265a 100644 --- a/extra/yassl/include/crypto_wrapper.hpp +++ b/extra/yassl/include/crypto_wrapper.hpp @@ -42,7 +42,6 @@ namespace yaSSL { // Digest policy should implement a get_digest, update, and get sizes for pad // and digest struct Digest : public virtual_base { - Digest() {} virtual void get_digest(byte*) = 0; virtual void get_digest(byte*, const byte*, unsigned int) = 0; virtual void update(const byte*, unsigned int) = 0; @@ -54,7 +53,6 @@ struct Digest : public virtual_base { // For use with NULL Digests struct NO_MAC : public Digest { - NO_MAC() {} void get_digest(byte*); void get_digest(byte*, const byte*, unsigned int); void update(const byte*, unsigned int); @@ -179,7 +177,6 @@ private: // BulkCipher policy should implement encrypt, decrypt, get block size, // and set keys for encrypt and decrypt struct BulkCipher : public virtual_base { - BulkCipher() {} virtual void encrypt(byte*, const byte*, unsigned int) = 0; virtual void decrypt(byte*, const byte*, unsigned int) = 0; virtual void set_encryptKey(const byte*, const byte* = 0) = 0; @@ -193,7 +190,6 @@ struct BulkCipher : public virtual_base { // For use with NULL Ciphers struct NO_Cipher : public BulkCipher { - NO_Cipher() {} void encrypt(byte*, const byte*, unsigned int) {} void decrypt(byte*, const byte*, unsigned int) {} void set_encryptKey(const byte*, const byte*) {} @@ -315,14 +311,12 @@ struct Auth : public virtual_base { virtual bool verify(const byte*, unsigned int, const byte*, unsigned int) = 0; virtual uint get_signatureLength() const = 0; - Auth() {} virtual ~Auth() {} }; // For use with NULL Authentication schemes struct NO_Auth : public Auth { - NO_Auth() {} void sign(byte*, const byte*, unsigned int, const RandomPool&) {} bool verify(const byte*, unsigned int, const byte*, unsigned int) { return true; } diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h index d0c49d6816c..29add5ca37d 100644 --- a/extra/yassl/include/openssl/ssl.h +++ b/extra/yassl/include/openssl/ssl.h @@ -33,7 +33,8 @@ #include "opensslv.h" /* for version number */ #include "rsa.h" -#define YASSL_VERSION "1.5.8" + +#define YASSL_VERSION "1.6.5" #if defined(__cplusplus) @@ -189,16 +190,11 @@ enum { /* ERR Constants */ EVP_R_BAD_DECRYPT = 2 }; -#ifdef WIN - typedef SOCKET socket_t; -#else - typedef int socket_t; -#endif SSL_CTX* SSL_CTX_new(SSL_METHOD*); SSL* SSL_new(SSL_CTX*); -int SSL_set_fd (SSL*, socket_t); +int SSL_set_fd (SSL*, int); int SSL_connect(SSL*); int SSL_write(SSL*, const void*, int); int SSL_read(SSL*, void*, int); diff --git a/extra/yassl/include/socket_wrapper.hpp b/extra/yassl/include/socket_wrapper.hpp index de28778ead9..308704c2af0 100644 --- a/extra/yassl/include/socket_wrapper.hpp +++ b/extra/yassl/include/socket_wrapper.hpp @@ -38,14 +38,16 @@ #include #include #endif -#include "openssl/ssl.h" /* for socket_t */ namespace yaSSL { typedef unsigned int uint; -#ifndef _WIN32 +#ifdef _WIN32 + typedef SOCKET socket_t; +#else + typedef int socket_t; const socket_t INVALID_SOCKET = -1; const int SD_RECEIVE = 0; const int SD_SEND = 1; diff --git a/extra/yassl/include/yassl_imp.hpp b/extra/yassl/include/yassl_imp.hpp index a94b03bacbf..f6434443cb0 100644 --- a/extra/yassl/include/yassl_imp.hpp +++ b/extra/yassl/include/yassl_imp.hpp @@ -64,7 +64,6 @@ struct RecordLayerHeader { // base for all messages struct Message : public virtual_base { - Message() {} virtual input_buffer& set(input_buffer&) =0; virtual output_buffer& get(output_buffer&) const =0; @@ -178,7 +177,6 @@ private: class HandShakeBase : public virtual_base { int length_; public: - HandShakeBase() {} int get_length() const; void set_length(int); @@ -196,7 +194,6 @@ public: struct HelloRequest : public HandShakeBase { - HelloRequest() {} input_buffer& set(input_buffer& in); output_buffer& get(output_buffer& out) const; @@ -330,7 +327,6 @@ private: struct ServerKeyBase : public virtual_base { - ServerKeyBase() {} virtual ~ServerKeyBase() {} virtual void build(SSL&) {} virtual void read(SSL&, input_buffer&) {} @@ -341,21 +337,15 @@ struct ServerKeyBase : public virtual_base { // Server random number for FORTEZZA KEA struct Fortezza_Server : public ServerKeyBase { - Fortezza_Server() {} opaque r_s_[FORTEZZA_MAX]; }; struct SignatureBase : public virtual_base { - SignatureBase() {} virtual ~SignatureBase() {} }; -struct anonymous_sa : public SignatureBase -{ -public: - anonymous_sa() {} -}; +struct anonymous_sa : public SignatureBase {}; struct Hashes { @@ -365,13 +355,11 @@ struct Hashes { struct rsa_sa : public SignatureBase { - rsa_sa() {} Hashes hashes_; }; struct dsa_sa : public SignatureBase { - dsa_sa() {} uint8 sha_[SHA_LEN]; }; @@ -399,7 +387,6 @@ private: // Server's RSA exchange struct RSA_Server : public ServerKeyBase { - RSA_Server() {} ServerRSAParams params_; opaque* signature_; // signed rsa_sa hashes }; @@ -474,7 +461,6 @@ struct PreMasterSecret { struct ClientKeyBase : public virtual_base { - ClientKeyBase() {} virtual ~ClientKeyBase() {} virtual void build(SSL&) {} virtual void read(SSL&, input_buffer&) {} @@ -505,7 +491,6 @@ private: // Fortezza Key Parameters from page 29 // hard code lengths cause only used here struct FortezzaKeys : public ClientKeyBase { - FortezzaKeys() {} opaque y_c_ [128]; // client's Yc, public value opaque r_c_ [128]; // client's Rc opaque y_signature_ [40]; // DSS signed public key diff --git a/extra/yassl/include/yassl_int.hpp b/extra/yassl/include/yassl_int.hpp index d75d2200b3c..94cb85c3300 100644 --- a/extra/yassl/include/yassl_int.hpp +++ b/extra/yassl/include/yassl_int.hpp @@ -228,7 +228,6 @@ struct BIGNUM { TaoCrypt::Integer), we need to explicitly state the namespace here to let gcc 2.96 deduce the correct type. */ - BIGNUM() {} yaSSL::Integer int_; void assign(const byte* b, uint s) { int_.assign(b,s); } }; diff --git a/extra/yassl/src/crypto_wrapper.cpp b/extra/yassl/src/crypto_wrapper.cpp index 0291faab301..28d7f1b5693 100644 --- a/extra/yassl/src/crypto_wrapper.cpp +++ b/extra/yassl/src/crypto_wrapper.cpp @@ -550,7 +550,6 @@ void RandomPool::Fill(opaque* dst, uint sz) const // Implementation of DSS Authentication struct DSS::DSSImpl { - DSSImpl() {} void SetPublic (const byte*, unsigned int); void SetPrivate(const byte*, unsigned int); TaoCrypt::DSA_PublicKey publicKey_; @@ -623,7 +622,6 @@ bool DSS::verify(const byte* sha_digest, unsigned int /* shaSz */, // Implementation of RSA key interface struct RSA::RSAImpl { - RSAImpl() {} void SetPublic (const byte*, unsigned int); void SetPrivate(const byte*, unsigned int); TaoCrypt::RSA_PublicKey publicKey_; diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index 1f9d0dd4020..70198af79b4 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -229,7 +229,7 @@ void SSL_free(SSL* ssl) } -int SSL_set_fd(SSL* ssl, socket_t fd) +int SSL_set_fd(SSL* ssl, int fd) { ssl->useSocket().set_fd(fd); return SSL_SUCCESS; @@ -950,7 +950,7 @@ void ERR_print_errors_fp(FILE* /*fp*/) char* ERR_error_string(unsigned long errNumber, char* buffer) { - static char* msg = (char*) "Please supply a buffer for error string"; + static char* msg = "Please supply a buffer for error string"; if (buffer) { SetErrorString(YasslError(errNumber), buffer); diff --git a/extra/yassl/taocrypt/README b/extra/yassl/taocrypt/README index 34e1744492e..0a7ff301786 100644 --- a/extra/yassl/taocrypt/README +++ b/extra/yassl/taocrypt/README @@ -1,4 +1,15 @@ -TaoCrypt release 0.9.0 09/18/2006 +TaoCrypt release 0.9.2 02/5/2007 + + +This release includes bug fixes, portability enhancements, and some +optimiations. + +See 0.9.0 for build instructions. + + + + +******************TaoCrypt release 0.9.0 09/18/2006 This is the first release of TaoCrypt, it was previously only included with yaSSL. TaoCrypt is highly portable and fast, its features include: diff --git a/extra/yassl/taocrypt/benchmark/benchmark.cpp b/extra/yassl/taocrypt/benchmark/benchmark.cpp index dd9d1b1ff0d..bb725a90187 100644 --- a/extra/yassl/taocrypt/benchmark/benchmark.cpp +++ b/extra/yassl/taocrypt/benchmark/benchmark.cpp @@ -65,7 +65,7 @@ int main(int argc, char** argv) const int megs = 5; // how much to test -const byte global_key[] = +const byte key[] = { 0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef, 0xfe,0xde,0xba,0x98,0x76,0x54,0x32,0x10, @@ -81,19 +81,19 @@ const byte iv[] = }; -byte global_plain [1024*1024]; -byte global_cipher[1024*1024]; +byte plain [1024*1024]; +byte cipher[1024*1024]; void bench_des() { DES_EDE3_CBC_Encryption enc; - enc.SetKey(global_key, 16, iv); + enc.SetKey(key, 16, iv); double start = current_time(); for(int i = 0; i < megs; i++) - enc.Process(global_plain, global_cipher, sizeof(global_plain)); + enc.Process(plain, cipher, sizeof(plain)); double total = current_time() - start; @@ -107,12 +107,12 @@ void bench_des() void bench_aes(bool show) { AES_CBC_Encryption enc; - enc.SetKey(global_key, 16, iv); + enc.SetKey(key, 16, iv); double start = current_time(); for(int i = 0; i < megs; i++) - enc.Process(global_plain, global_cipher, sizeof(global_plain)); + enc.Process(plain, cipher, sizeof(plain)); double total = current_time() - start; @@ -127,12 +127,12 @@ void bench_aes(bool show) void bench_twofish() { Twofish_CBC_Encryption enc; - enc.SetKey(global_key, 16, iv); + enc.SetKey(key, 16, iv); double start = current_time(); for(int i = 0; i < megs; i++) - enc.Process(global_plain, global_cipher, sizeof(global_plain)); + enc.Process(plain, cipher, sizeof(plain)); double total = current_time() - start; @@ -147,12 +147,12 @@ void bench_twofish() void bench_blowfish() { Blowfish_CBC_Encryption enc; - enc.SetKey(global_key, 16, iv); + enc.SetKey(key, 16, iv); double start = current_time(); for(int i = 0; i < megs; i++) - enc.Process(global_plain, global_cipher, sizeof(global_plain)); + enc.Process(plain, cipher, sizeof(plain)); double total = current_time() - start; @@ -166,12 +166,12 @@ void bench_blowfish() void bench_arc4() { ARC4 enc; - enc.SetKey(global_key, 16); + enc.SetKey(key, 16); double start = current_time(); for(int i = 0; i < megs; i++) - enc.Process(global_cipher, global_plain, sizeof(global_plain)); + enc.Process(cipher, plain, sizeof(plain)); double total = current_time() - start; @@ -191,7 +191,7 @@ void bench_md5() for(int i = 0; i < megs; i++) - hash.Update(global_plain, sizeof(global_plain)); + hash.Update(plain, sizeof(plain)); hash.Final(digest); @@ -213,7 +213,7 @@ void bench_sha() for(int i = 0; i < megs; i++) - hash.Update(global_plain, sizeof(global_plain)); + hash.Update(plain, sizeof(plain)); hash.Final(digest); @@ -241,7 +241,7 @@ void bench_ripemd() for(int i = 0; i < megs; i++) - hash.Update(global_plain, sizeof(global_plain)); + hash.Update(plain, sizeof(plain)); hash.Final(digest); diff --git a/extra/yassl/taocrypt/include/algebra.hpp b/extra/yassl/taocrypt/include/algebra.hpp index 9a6b5344c0d..298ef115a4a 100644 --- a/extra/yassl/taocrypt/include/algebra.hpp +++ b/extra/yassl/taocrypt/include/algebra.hpp @@ -40,7 +40,6 @@ class TAOCRYPT_NO_VTABLE AbstractGroup : public virtual_base public: typedef Integer Element; - AbstractGroup() {} virtual ~AbstractGroup() {} virtual bool Equal(const Element &a, const Element &b) const =0; @@ -95,7 +94,6 @@ private: class MultiplicativeGroupT : public AbstractGroup { public: - MultiplicativeGroupT() {} const AbstractRing& GetRing() const {return *m_pRing;} @@ -147,7 +145,6 @@ class TAOCRYPT_NO_VTABLE AbstractEuclideanDomain : public AbstractRing { public: - AbstractEuclideanDomain() {} typedef Integer Element; virtual void DivisionAlgorithm(Element &r, Element &q, const Element &a, diff --git a/extra/yassl/taocrypt/include/des.hpp b/extra/yassl/taocrypt/include/des.hpp index 9082f8ab57d..f99a289392f 100644 --- a/extra/yassl/taocrypt/include/des.hpp +++ b/extra/yassl/taocrypt/include/des.hpp @@ -41,7 +41,6 @@ enum { DES_BLOCK_SIZE = 8, DES_KEY_SIZE = 32 }; class BasicDES { public: - BasicDES() {} void SetKey(const byte*, word32, CipherDir dir); void RawProcessBlock(word32&, word32&) const; protected: diff --git a/extra/yassl/taocrypt/include/hash.hpp b/extra/yassl/taocrypt/include/hash.hpp index 71072bd3e74..fa5f6c04720 100644 --- a/extra/yassl/taocrypt/include/hash.hpp +++ b/extra/yassl/taocrypt/include/hash.hpp @@ -31,7 +31,6 @@ namespace TaoCrypt { // HASH class HASH : public virtual_base { public: - HASH() {} virtual ~HASH() {} virtual void Update(const byte*, word32) = 0; @@ -58,8 +57,7 @@ public: word32 GetBitCountLo() const { return loLen_ << 3; } word32 GetBitCountHi() const { return (loLen_ >> (8*sizeof(loLen_) - 3)) + (hiLen_ << 3); } - - enum { MaxDigestSz = 5, MaxBufferSz = 64 }; + enum { MaxDigestSz = 8, MaxBufferSz = 64 }; protected: typedef word32 HashLengthType; word32 buffLen_; // in bytes @@ -74,6 +72,38 @@ protected: }; +#ifdef WORD64_AVAILABLE + +// 64-bit HASH with Transform +class HASH64withTransform : public HASH { +public: + HASH64withTransform(word32 digSz, word32 buffSz); + virtual ~HASH64withTransform() {} + virtual ByteOrder getByteOrder() const = 0; + virtual word32 getPadSize() const = 0; + + virtual void Update(const byte*, word32); + virtual void Final(byte*); + + word32 GetBitCountLo() const { return loLen_ << 3; } + word32 GetBitCountHi() const { return (loLen_ >> (8*sizeof(loLen_) - 3)) + + (hiLen_ << 3); } + enum { MaxDigestSz = 8, MaxBufferSz = 128 }; +protected: + typedef word32 HashLengthType; + word32 buffLen_; // in bytes + HashLengthType loLen_; // length in bytes + HashLengthType hiLen_; // length in bytes + word64 digest_[MaxDigestSz]; + word64 buffer_[MaxBufferSz / sizeof(word64)]; + + virtual void Transform() = 0; + + void AddLength(word32); +}; + +#endif // WORD64_AVAILABLE + } // namespace diff --git a/extra/yassl/taocrypt/include/hmac.hpp b/extra/yassl/taocrypt/include/hmac.hpp index ccd54c05cb1..1d486514e06 100644 --- a/extra/yassl/taocrypt/include/hmac.hpp +++ b/extra/yassl/taocrypt/include/hmac.hpp @@ -109,11 +109,11 @@ void HMAC::KeyInnerHash() // Update template -void HMAC::Update(const byte* msg_arg, word32 length) +void HMAC::Update(const byte* msg, word32 length) { if (!innerHashKeyed_) KeyInnerHash(); - mac_.Update(msg_arg, length); + mac_.Update(msg, length); } diff --git a/extra/yassl/taocrypt/include/misc.hpp b/extra/yassl/taocrypt/include/misc.hpp index 224589e0640..96648a39aa1 100644 --- a/extra/yassl/taocrypt/include/misc.hpp +++ b/extra/yassl/taocrypt/include/misc.hpp @@ -464,6 +464,25 @@ inline word32 ByteReverse(word32 value) } +#ifdef WORD64_AVAILABLE + +inline word64 ByteReverse(word64 value) +{ +#ifdef TAOCRYPT_SLOW_WORD64 + return (word64(ByteReverse(word32(value))) << 32) | + ByteReverse(word32(value>>32)); +#else + value = ((value & W64LIT(0xFF00FF00FF00FF00)) >> 8) | + ((value & W64LIT(0x00FF00FF00FF00FF)) << 8); + value = ((value & W64LIT(0xFFFF0000FFFF0000)) >> 16) | + ((value & W64LIT(0x0000FFFF0000FFFF)) << 16); + return rotlFixed(value, 32U); +#endif +} + +#endif // WORD64_AVAILABLE + + template inline void ByteReverse(T* out, const T* in, word32 byteCount) { diff --git a/extra/yassl/taocrypt/include/modarith.hpp b/extra/yassl/taocrypt/include/modarith.hpp index f42a4397d48..501a8129b90 100644 --- a/extra/yassl/taocrypt/include/modarith.hpp +++ b/extra/yassl/taocrypt/include/modarith.hpp @@ -37,8 +37,8 @@ public: typedef int RandomizationParameter; typedef Integer Element; - ModularArithmetic(const Integer &modulus_arg = Integer::One()) - : modulus(modulus_arg), result((word)0, modulus_arg.reg_.size()) {} + ModularArithmetic(const Integer &modulus = Integer::One()) + : modulus(modulus), result((word)0, modulus.reg_.size()) {} ModularArithmetic(const ModularArithmetic &ma) : AbstractRing(), diff --git a/extra/yassl/taocrypt/include/modes.hpp b/extra/yassl/taocrypt/include/modes.hpp index 36618a8f5ed..d1ebce7568b 100644 --- a/extra/yassl/taocrypt/include/modes.hpp +++ b/extra/yassl/taocrypt/include/modes.hpp @@ -42,8 +42,8 @@ public: { cipher_.Process(c, p, sz); } void SetKey(const byte* k, word32 sz) { cipher_.SetKey(k, sz, DIR); } - void SetKey(const byte* k, word32 sz, const byte* iv_arg) - { cipher_.SetKey(k, sz, DIR); cipher_.SetIV(iv_arg); } + void SetKey(const byte* k, word32 sz, const byte* iv) + { cipher_.SetKey(k, sz, DIR); cipher_.SetIV(iv); } private: T cipher_; diff --git a/extra/yassl/taocrypt/include/rsa.hpp b/extra/yassl/taocrypt/include/rsa.hpp index 454b0ef33a7..c895ab6fd34 100644 --- a/extra/yassl/taocrypt/include/rsa.hpp +++ b/extra/yassl/taocrypt/include/rsa.hpp @@ -131,7 +131,6 @@ private: // block type 2 padding class RSA_BlockType2 { public: - RSA_BlockType2() {} void Pad(const byte*, word32, byte*, word32, RandomNumberGenerator&) const; word32 UnPad(const byte*, word32, byte*) const; @@ -141,7 +140,6 @@ public: // block type 1 padding class RSA_BlockType1 { public: - RSA_BlockType1() {} void Pad(const byte*, word32, byte*, word32, RandomNumberGenerator&) const; word32 UnPad(const byte*, word32, byte*) const; @@ -176,27 +174,25 @@ public: // Public Encrypt template -void RSA_Encryptor::Encrypt(const byte* plain_arg, word32 sz, - byte* cipher_arg, - RandomNumberGenerator& rng_arg) +void RSA_Encryptor::Encrypt(const byte* plain, word32 sz, byte* cipher, + RandomNumberGenerator& rng) { PK_Lengths lengths(key_.GetModulus()); assert(sz <= lengths.FixedMaxPlaintextLength()); ByteBlock paddedBlock(lengths.PaddedBlockByteLength()); - padding_.Pad(plain_arg, sz, paddedBlock.get_buffer(), - lengths.PaddedBlockBitLength(), rng_arg); + padding_.Pad(plain, sz, paddedBlock.get_buffer(), + lengths.PaddedBlockBitLength(), rng); key_.ApplyFunction(Integer(paddedBlock.get_buffer(), paddedBlock.size())). - Encode(cipher_arg, lengths.FixedCiphertextLength()); + Encode(cipher, lengths.FixedCiphertextLength()); } // Private Decrypt template -word32 RSA_Decryptor::Decrypt(const byte* cipher_arg, word32 sz, - byte* plain_arg, - RandomNumberGenerator& rng_arg) +word32 RSA_Decryptor::Decrypt(const byte* cipher, word32 sz, byte* plain, + RandomNumberGenerator& rng) { PK_Lengths lengths(key_.GetModulus()); assert(sz == lengths.FixedCiphertextLength()); @@ -205,29 +201,29 @@ word32 RSA_Decryptor::Decrypt(const byte* cipher_arg, word32 sz, return 0; ByteBlock paddedBlock(lengths.PaddedBlockByteLength()); - Integer x = key_.CalculateInverse(rng_arg, Integer(cipher_arg, + Integer x = key_.CalculateInverse(rng, Integer(cipher, lengths.FixedCiphertextLength()).Ref()); if (x.ByteCount() > paddedBlock.size()) x = Integer::Zero(); // don't return false, prevents timing attack x.Encode(paddedBlock.get_buffer(), paddedBlock.size()); return padding_.UnPad(paddedBlock.get_buffer(), - lengths.PaddedBlockBitLength(), plain_arg); + lengths.PaddedBlockBitLength(), plain); } // Private SSL type (block 1) Encrypt template void RSA_Decryptor::SSL_Sign(const byte* message, word32 sz, byte* sig, - RandomNumberGenerator& rng_arg) + RandomNumberGenerator& rng) { RSA_PublicKey inverse; inverse.Initialize(key_.GetModulus(), key_.GetPrivateExponent()); RSA_Encryptor enc(inverse); // SSL Type - enc.Encrypt(message, sz, sig, rng_arg); + enc.Encrypt(message, sz, sig, rng); } -word32 SSL_Decrypt(const RSA_PublicKey& key, const byte* sig, byte* plain_arg); +word32 SSL_Decrypt(const RSA_PublicKey& key, const byte* sig, byte* plain); // Public SSL type (block 1) Decrypt @@ -235,11 +231,11 @@ template bool RSA_Encryptor::SSL_Verify(const byte* message, word32 sz, const byte* sig) { - ByteBlock local_plain(PK_Lengths(key_.GetModulus()).FixedMaxPlaintextLength()); - if (SSL_Decrypt(key_, sig, local_plain.get_buffer()) != sz) + ByteBlock plain(PK_Lengths(key_.GetModulus()).FixedMaxPlaintextLength()); + if (SSL_Decrypt(key_, sig, plain.get_buffer()) != sz) return false; // not right justified or bad padding - if ( (memcmp(local_plain.get_buffer(), message, sz)) == 0) + if ( (memcmp(plain.get_buffer(), message, sz)) == 0) return true; return false; } diff --git a/extra/yassl/taocrypt/include/sha.hpp b/extra/yassl/taocrypt/include/sha.hpp index c501d3ad306..c0b4368121b 100644 --- a/extra/yassl/taocrypt/include/sha.hpp +++ b/extra/yassl/taocrypt/include/sha.hpp @@ -64,6 +64,103 @@ inline void swap(SHA& a, SHA& b) a.Swap(b); } +// SHA-256 digest +class SHA256 : public HASHwithTransform { +public: + enum { BLOCK_SIZE = 64, DIGEST_SIZE = 32, PAD_SIZE = 56, + TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes + SHA256() : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE) + { Init(); } + ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } + word32 getBlockSize() const { return BLOCK_SIZE; } + word32 getDigestSize() const { return DIGEST_SIZE; } + word32 getPadSize() const { return PAD_SIZE; } + + void Init(); + + SHA256(const SHA256&); + SHA256& operator= (const SHA256&); + + void Swap(SHA256&); +private: + void Transform(); +}; + + +// SHA-224 digest +class SHA224 : public HASHwithTransform { +public: + enum { BLOCK_SIZE = 64, DIGEST_SIZE = 28, PAD_SIZE = 56, + TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes + SHA224() : HASHwithTransform(SHA256::DIGEST_SIZE /sizeof(word32),BLOCK_SIZE) + { Init(); } + ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } + word32 getBlockSize() const { return BLOCK_SIZE; } + word32 getDigestSize() const { return DIGEST_SIZE; } + word32 getPadSize() const { return PAD_SIZE; } + + void Init(); + + SHA224(const SHA224&); + SHA224& operator= (const SHA224&); + + void Swap(SHA224&); +private: + void Transform(); +}; + + +#ifdef WORD64_AVAILABLE + +// SHA-512 digest +class SHA512 : public HASH64withTransform { +public: + enum { BLOCK_SIZE = 128, DIGEST_SIZE = 64, PAD_SIZE = 112, + TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes + SHA512() : HASH64withTransform(DIGEST_SIZE / sizeof(word64), BLOCK_SIZE) + { Init(); } + ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } + word32 getBlockSize() const { return BLOCK_SIZE; } + word32 getDigestSize() const { return DIGEST_SIZE; } + word32 getPadSize() const { return PAD_SIZE; } + + void Init(); + + SHA512(const SHA512&); + SHA512& operator= (const SHA512&); + + void Swap(SHA512&); +private: + void Transform(); +}; + + +// SHA-384 digest +class SHA384 : public HASH64withTransform { +public: + enum { BLOCK_SIZE = 128, DIGEST_SIZE = 48, PAD_SIZE = 112, + TAO_BYTE_ORDER = BigEndianOrder}; // in Bytes + SHA384() : HASH64withTransform(SHA512::DIGEST_SIZE/ sizeof(word64), + BLOCK_SIZE) + { Init(); } + ByteOrder getByteOrder() const { return ByteOrder(TAO_BYTE_ORDER); } + word32 getBlockSize() const { return BLOCK_SIZE; } + word32 getDigestSize() const { return DIGEST_SIZE; } + word32 getPadSize() const { return PAD_SIZE; } + + void Init(); + + SHA384(const SHA384&); + SHA384& operator= (const SHA384&); + + void Swap(SHA384&); +private: + void Transform(); +}; + +#endif // WORD64_AVAILABLE + + } // namespace diff --git a/extra/yassl/taocrypt/include/type_traits.hpp b/extra/yassl/taocrypt/include/type_traits.hpp index ce21a2eaa63..0dd5e4e5c50 100644 --- a/extra/yassl/taocrypt/include/type_traits.hpp +++ b/extra/yassl/taocrypt/include/type_traits.hpp @@ -62,11 +62,7 @@ MK_FUNDAMENTAL_TYPE(unsigned long) MK_FUNDAMENTAL_TYPE(float) MK_FUNDAMENTAL_TYPE( double) - -#ifdef LONG_DOUBLE_IS_DISTINCT_TYPE -// Don't define by default as this gives warnings on power mac - MK_FUNDAMENTAL_TYPE(long double) -#endif +MK_FUNDAMENTAL_TYPE(long double) #if defined(WORD64_AVAILABLE) && defined(WORD64_IS_DISTINCT_TYPE) MK_FUNDAMENTAL_TYPE(word64) diff --git a/extra/yassl/taocrypt/include/types.hpp b/extra/yassl/taocrypt/include/types.hpp index c817572d265..3efdcdfbccb 100644 --- a/extra/yassl/taocrypt/include/types.hpp +++ b/extra/yassl/taocrypt/include/types.hpp @@ -46,13 +46,16 @@ typedef unsigned int word32; #define WORD64_AVAILABLE #define WORD64_IS_DISTINCT_TYPE typedef unsigned __int64 word64; + #define W64LIT(x) x##ui64 #elif SIZEOF_LONG == 8 #define WORD64_AVAILABLE typedef unsigned long word64; + #define W64LIT(x) x##LL #elif SIZEOF_LONG_LONG == 8 #define WORD64_AVAILABLE #define WORD64_IS_DISTINCT_TYPE typedef unsigned long long word64; + #define W64LIT(x) x##LL #endif diff --git a/extra/yassl/taocrypt/mySTL/list.hpp b/extra/yassl/taocrypt/mySTL/list.hpp index 98a4589a354..6a081cba5ad 100644 --- a/extra/yassl/taocrypt/mySTL/list.hpp +++ b/extra/yassl/taocrypt/mySTL/list.hpp @@ -231,7 +231,7 @@ void list::push_front(T t) template void list::pop_front() { - node* local_front = head_; + node* front = head_; if (head_ == 0) return; @@ -241,8 +241,8 @@ void list::pop_front() head_ = head_->next_; head_->prev_ = 0; } - destroy(local_front); - FreeMemory(local_front); + destroy(front); + FreeMemory(front); --sz_; } @@ -303,13 +303,13 @@ T list::back() const template typename list::node* list::look_up(T t) { - node* local_list = head_; + node* list = head_; - if (local_list == 0) return 0; + if (list == 0) return 0; - for (; local_list; local_list = local_list->next_) - if (local_list->value_ == t) - return local_list; + for (; list; list = list->next_) + if (list->value_ == t) + return list; return 0; } diff --git a/extra/yassl/taocrypt/src/aes.cpp b/extra/yassl/taocrypt/src/aes.cpp index 4f87bf3778a..b2b42d3dcf0 100644 --- a/extra/yassl/taocrypt/src/aes.cpp +++ b/extra/yassl/taocrypt/src/aes.cpp @@ -90,14 +90,13 @@ void AES::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/) rounds_ = keylen/4 + 6; word32 temp, *rk = key_; + unsigned int i=0; GetUserKey(BigEndianOrder, rk, keylen/4, userKey, keylen); switch(keylen) { case 16: - { - unsigned int i=0; while (true) { temp = rk[3]; @@ -115,10 +114,8 @@ void AES::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/) rk += 4; } break; - } + case 24: - { - unsigned int i=0; while (true) // for (;;) here triggers a bug in VC60 SP4 w/ Pro Pack { temp = rk[ 5]; @@ -139,10 +136,7 @@ void AES::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/) } break; - } case 32: - { - unsigned int i=0; while (true) { temp = rk[ 7]; @@ -171,7 +165,6 @@ void AES::SetKey(const byte* userKey, word32 keylen, CipherDir /*dummy*/) } break; } - } if (dir_ == DECRYPTION) { diff --git a/extra/yassl/taocrypt/src/algebra.cpp b/extra/yassl/taocrypt/src/algebra.cpp index d797d0d4108..cb597c41552 100644 --- a/extra/yassl/taocrypt/src/algebra.cpp +++ b/extra/yassl/taocrypt/src/algebra.cpp @@ -186,10 +186,10 @@ Integer AbstractGroup::CascadeScalarMultiply(const Element &x, struct WindowSlider { - WindowSlider(const Integer &exp_arg, bool fastNegate_arg, + WindowSlider(const Integer &exp, bool fastNegate, unsigned int windowSizeIn=0) - : exp(exp_arg), windowModulus(Integer::One()), windowSize(windowSizeIn), - windowBegin(0), fastNegate(fastNegate_arg), firstTime(true), + : exp(exp), windowModulus(Integer::One()), windowSize(windowSizeIn), + windowBegin(0), fastNegate(fastNegate), firstTime(true), finished(false) { if (windowSize == 0) diff --git a/extra/yassl/taocrypt/src/asn.cpp b/extra/yassl/taocrypt/src/asn.cpp index 5bc865a4ba7..a06ab658c7b 100644 --- a/extra/yassl/taocrypt/src/asn.cpp +++ b/extra/yassl/taocrypt/src/asn.cpp @@ -737,17 +737,17 @@ void CertDecoder::GetName(NameType nt) email = true; source_.advance(oidSz + 1); - word32 length2 = GetLength(source_); + word32 length = GetLength(source_); if (email) { memcpy(&ptr[idx], "/emailAddress=", 14); idx += 14; - memcpy(&ptr[idx], source_.get_current(), length2); - idx += length2; + memcpy(&ptr[idx], source_.get_current(), length); + idx += length; } - source_.advance(length2); + source_.advance(length); } } ptr[idx++] = 0; diff --git a/extra/yassl/taocrypt/src/hash.cpp b/extra/yassl/taocrypt/src/hash.cpp index 66598177631..c51dc42a909 100644 --- a/extra/yassl/taocrypt/src/hash.cpp +++ b/extra/yassl/taocrypt/src/hash.cpp @@ -108,4 +108,89 @@ void HASHwithTransform::Final(byte* hash) Init(); // reset state } + +#ifdef WORD64_AVAILABLE + +HASH64withTransform::HASH64withTransform(word32 digSz, word32 buffSz) +{ + assert(digSz <= MaxDigestSz); + assert(buffSz <= MaxBufferSz); +} + + +void HASH64withTransform::AddLength(word32 len) +{ + HashLengthType tmp = loLen_; + if ( (loLen_ += len) < tmp) + hiLen_++; // carry low to high + hiLen_ += SafeRightShift<8*sizeof(HashLengthType)>(len); +} + + +// Update digest with data of size len, do in blocks +void HASH64withTransform::Update(const byte* data, word32 len) +{ + // do block size increments + word32 blockSz = getBlockSize(); + byte* local = reinterpret_cast(buffer_); + + while (len) { + word32 add = min(len, blockSz - buffLen_); + memcpy(&local[buffLen_], data, add); + + buffLen_ += add; + data += add; + len -= add; + + if (buffLen_ == blockSz) { + ByteReverseIf(buffer_, buffer_, blockSz, getByteOrder()); + Transform(); + AddLength(blockSz); + buffLen_ = 0; + } + } +} + + +// Final process, place digest in hash +void HASH64withTransform::Final(byte* hash) +{ + word32 blockSz = getBlockSize(); + word32 digestSz = getDigestSize(); + word32 padSz = getPadSize(); + ByteOrder order = getByteOrder(); + + AddLength(buffLen_); // before adding pads + HashLengthType preLoLen = GetBitCountLo(); + HashLengthType preHiLen = GetBitCountHi(); + byte* local = reinterpret_cast(buffer_); + + local[buffLen_++] = 0x80; // add 1 + + // pad with zeros + if (buffLen_ > padSz) { + memset(&local[buffLen_], 0, blockSz - buffLen_); + buffLen_ += blockSz - buffLen_; + + ByteReverseIf(buffer_, buffer_, blockSz, order); + Transform(); + buffLen_ = 0; + } + memset(&local[buffLen_], 0, padSz - buffLen_); + + ByteReverseIf(buffer_, buffer_, padSz, order); + + buffer_[blockSz / sizeof(word64) - 2] = order ? preHiLen : preLoLen; + buffer_[blockSz / sizeof(word64) - 1] = order ? preLoLen : preHiLen; + + Transform(); + ByteReverseIf(digest_, digest_, digestSz, order); + memcpy(hash, digest_, digestSz); + + Init(); // reset state +} + +#endif // WORD64_AVAILABLE + + } // namespace diff --git a/extra/yassl/taocrypt/src/integer.cpp b/extra/yassl/taocrypt/src/integer.cpp index 84255aa8544..419783403ea 100644 --- a/extra/yassl/taocrypt/src/integer.cpp +++ b/extra/yassl/taocrypt/src/integer.cpp @@ -3390,7 +3390,7 @@ void Integer::DivideByPowerOf2(Integer &r, Integer &q, const Integer &a, CopyWords(r.reg_.get_buffer(), a.reg_.get_buffer(), wordCount); SetWords(r.reg_+wordCount, 0, r.reg_.size()-wordCount); if (n % WORD_BITS != 0) - r.reg_[wordCount-1] %= ((word) 1 << (n % WORD_BITS)); + r.reg_[wordCount-1] %= (1 << (n % WORD_BITS)); } else { diff --git a/extra/yassl/taocrypt/src/sha.cpp b/extra/yassl/taocrypt/src/sha.cpp index 9713940529a..ef165a342ad 100644 --- a/extra/yassl/taocrypt/src/sha.cpp +++ b/extra/yassl/taocrypt/src/sha.cpp @@ -69,6 +69,77 @@ void SHA::Init() hiLen_ = 0; } +void SHA256::Init() +{ + digest_[0] = 0x6A09E667L; + digest_[1] = 0xBB67AE85L; + digest_[2] = 0x3C6EF372L; + digest_[3] = 0xA54FF53AL; + digest_[4] = 0x510E527FL; + digest_[5] = 0x9B05688CL; + digest_[6] = 0x1F83D9ABL; + digest_[7] = 0x5BE0CD19L; + + buffLen_ = 0; + loLen_ = 0; + hiLen_ = 0; +} + + +void SHA224::Init() +{ + digest_[0] = 0xc1059ed8; + digest_[1] = 0x367cd507; + digest_[2] = 0x3070dd17; + digest_[3] = 0xf70e5939; + digest_[4] = 0xffc00b31; + digest_[5] = 0x68581511; + digest_[6] = 0x64f98fa7; + digest_[7] = 0xbefa4fa4; + + buffLen_ = 0; + loLen_ = 0; + hiLen_ = 0; +} + + +#ifdef WORD64_AVAILABLE + +void SHA512::Init() +{ + digest_[0] = W64LIT(0x6a09e667f3bcc908); + digest_[1] = W64LIT(0xbb67ae8584caa73b); + digest_[2] = W64LIT(0x3c6ef372fe94f82b); + digest_[3] = W64LIT(0xa54ff53a5f1d36f1); + digest_[4] = W64LIT(0x510e527fade682d1); + digest_[5] = W64LIT(0x9b05688c2b3e6c1f); + digest_[6] = W64LIT(0x1f83d9abfb41bd6b); + digest_[7] = W64LIT(0x5be0cd19137e2179); + + buffLen_ = 0; + loLen_ = 0; + hiLen_ = 0; +} + + +void SHA384::Init() +{ + digest_[0] = W64LIT(0xcbbb9d5dc1059ed8); + digest_[1] = W64LIT(0x629a292a367cd507); + digest_[2] = W64LIT(0x9159015a3070dd17); + digest_[3] = W64LIT(0x152fecd8f70e5939); + digest_[4] = W64LIT(0x67332667ffc00b31); + digest_[5] = W64LIT(0x8eb44a8768581511); + digest_[6] = W64LIT(0xdb0c2e0d64f98fa7); + digest_[7] = W64LIT(0x47b5481dbefa4fa4); + + buffLen_ = 0; + loLen_ = 0; + hiLen_ = 0; +} + +#endif // WORD64_AVAILABLE + SHA::SHA(const SHA& that) : HASHwithTransform(DIGEST_SIZE / sizeof(word32), BLOCK_SIZE) @@ -81,6 +152,59 @@ SHA::SHA(const SHA& that) : HASHwithTransform(DIGEST_SIZE / sizeof(word32), memcpy(buffer_, that.buffer_, BLOCK_SIZE); } + +SHA256::SHA256(const SHA256& that) : HASHwithTransform(DIGEST_SIZE / + sizeof(word32), BLOCK_SIZE) +{ + buffLen_ = that.buffLen_; + loLen_ = that.loLen_; + hiLen_ = that.hiLen_; + + memcpy(digest_, that.digest_, DIGEST_SIZE); + memcpy(buffer_, that.buffer_, BLOCK_SIZE); +} + + +SHA224::SHA224(const SHA224& that) : HASHwithTransform(SHA256::DIGEST_SIZE / + sizeof(word32), BLOCK_SIZE) +{ + buffLen_ = that.buffLen_; + loLen_ = that.loLen_; + hiLen_ = that.hiLen_; + + memcpy(digest_, that.digest_, DIGEST_SIZE); + memcpy(buffer_, that.buffer_, BLOCK_SIZE); +} + + +#ifdef WORD64_AVAILABLE + +SHA512::SHA512(const SHA512& that) : HASH64withTransform(DIGEST_SIZE / + sizeof(word64), BLOCK_SIZE) +{ + buffLen_ = that.buffLen_; + loLen_ = that.loLen_; + hiLen_ = that.hiLen_; + + memcpy(digest_, that.digest_, DIGEST_SIZE); + memcpy(buffer_, that.buffer_, BLOCK_SIZE); +} + + +SHA384::SHA384(const SHA384& that) : HASH64withTransform(SHA512::DIGEST_SIZE / + sizeof(word64), BLOCK_SIZE) +{ + buffLen_ = that.buffLen_; + loLen_ = that.loLen_; + hiLen_ = that.hiLen_; + + memcpy(digest_, that.digest_, DIGEST_SIZE); + memcpy(buffer_, that.buffer_, BLOCK_SIZE); +} + +#endif // WORD64_AVAILABLE + + SHA& SHA::operator= (const SHA& that) { SHA tmp(that); @@ -90,6 +214,46 @@ SHA& SHA::operator= (const SHA& that) } +SHA256& SHA256::operator= (const SHA256& that) +{ + SHA256 tmp(that); + Swap(tmp); + + return *this; +} + + +SHA224& SHA224::operator= (const SHA224& that) +{ + SHA224 tmp(that); + Swap(tmp); + + return *this; +} + + +#ifdef WORD64_AVAILABLE + +SHA512& SHA512::operator= (const SHA512& that) +{ + SHA512 tmp(that); + Swap(tmp); + + return *this; +} + + +SHA384& SHA384::operator= (const SHA384& that) +{ + SHA384 tmp(that); + Swap(tmp); + + return *this; +} + +#endif // WORD64_AVAILABLE + + void SHA::Swap(SHA& other) { STL::swap(loLen_, other.loLen_); @@ -101,6 +265,53 @@ void SHA::Swap(SHA& other) } +void SHA256::Swap(SHA256& other) +{ + STL::swap(loLen_, other.loLen_); + STL::swap(hiLen_, other.hiLen_); + STL::swap(buffLen_, other.buffLen_); + + memcpy(digest_, other.digest_, DIGEST_SIZE); + memcpy(buffer_, other.buffer_, BLOCK_SIZE); +} + + +void SHA224::Swap(SHA224& other) +{ + STL::swap(loLen_, other.loLen_); + STL::swap(hiLen_, other.hiLen_); + STL::swap(buffLen_, other.buffLen_); + + memcpy(digest_, other.digest_, DIGEST_SIZE); + memcpy(buffer_, other.buffer_, BLOCK_SIZE); +} + + +#ifdef WORD64_AVAILABLE + +void SHA512::Swap(SHA512& other) +{ + STL::swap(loLen_, other.loLen_); + STL::swap(hiLen_, other.hiLen_); + STL::swap(buffLen_, other.buffLen_); + + memcpy(digest_, other.digest_, DIGEST_SIZE); + memcpy(buffer_, other.buffer_, BLOCK_SIZE); +} + + +void SHA384::Swap(SHA384& other) +{ + STL::swap(loLen_, other.loLen_); + STL::swap(hiLen_, other.hiLen_); + STL::swap(buffLen_, other.buffLen_); + + memcpy(digest_, other.digest_, DIGEST_SIZE); + memcpy(buffer_, other.buffer_, BLOCK_SIZE); +} + +#endif // WORD64_AVIALABLE + #ifdef DO_SHA_ASM @@ -203,6 +414,205 @@ void SHA::Transform() } +#define blk2(i) (W[i&15]+=s1(W[(i-2)&15])+W[(i-7)&15]+s0(W[(i-15)&15])) + +#define Ch(x,y,z) (z^(x&(y^z))) +#define Maj(x,y,z) ((x&y)|(z&(x|y))) + +#define a(i) T[(0-i)&7] +#define b(i) T[(1-i)&7] +#define c(i) T[(2-i)&7] +#define d(i) T[(3-i)&7] +#define e(i) T[(4-i)&7] +#define f(i) T[(5-i)&7] +#define g(i) T[(6-i)&7] +#define h(i) T[(7-i)&7] + +#define R(i) h(i)+=S1(e(i))+Ch(e(i),f(i),g(i))+K[i+j]+(j?blk2(i):blk0(i));\ + d(i)+=h(i);h(i)+=S0(a(i))+Maj(a(i),b(i),c(i)) + +// for SHA256 +#define S0(x) (rotrFixed(x,2)^rotrFixed(x,13)^rotrFixed(x,22)) +#define S1(x) (rotrFixed(x,6)^rotrFixed(x,11)^rotrFixed(x,25)) +#define s0(x) (rotrFixed(x,7)^rotrFixed(x,18)^(x>>3)) +#define s1(x) (rotrFixed(x,17)^rotrFixed(x,19)^(x>>10)) + + +static const word32 K256[64] = { + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +}; + + +static void Transform256(word32* digest_, word32* buffer_) +{ + const word32* K = K256; + + word32 W[16]; + word32 T[8]; + + // Copy digest to working vars + memcpy(T, digest_, sizeof(T)); + + // 64 operations, partially loop unrolled + for (unsigned int j = 0; j < 64; j += 16) { + R( 0); R( 1); R( 2); R( 3); + R( 4); R( 5); R( 6); R( 7); + R( 8); R( 9); R(10); R(11); + R(12); R(13); R(14); R(15); + } + + // Add the working vars back into digest + digest_[0] += a(0); + digest_[1] += b(0); + digest_[2] += c(0); + digest_[3] += d(0); + digest_[4] += e(0); + digest_[5] += f(0); + digest_[6] += g(0); + digest_[7] += h(0); + + // Wipe variables + memset(W, 0, sizeof(W)); + memset(T, 0, sizeof(T)); +} + + +// undef for 256 +#undef S0 +#undef S1 +#undef s0 +#undef s1 + + +void SHA256::Transform() +{ + Transform256(digest_, buffer_); +} + + +void SHA224::Transform() +{ + Transform256(digest_, buffer_); +} + + +#ifdef WORD64_AVAILABLE + +static const word64 K512[80] = { + W64LIT(0x428a2f98d728ae22), W64LIT(0x7137449123ef65cd), + W64LIT(0xb5c0fbcfec4d3b2f), W64LIT(0xe9b5dba58189dbbc), + W64LIT(0x3956c25bf348b538), W64LIT(0x59f111f1b605d019), + W64LIT(0x923f82a4af194f9b), W64LIT(0xab1c5ed5da6d8118), + W64LIT(0xd807aa98a3030242), W64LIT(0x12835b0145706fbe), + W64LIT(0x243185be4ee4b28c), W64LIT(0x550c7dc3d5ffb4e2), + W64LIT(0x72be5d74f27b896f), W64LIT(0x80deb1fe3b1696b1), + W64LIT(0x9bdc06a725c71235), W64LIT(0xc19bf174cf692694), + W64LIT(0xe49b69c19ef14ad2), W64LIT(0xefbe4786384f25e3), + W64LIT(0x0fc19dc68b8cd5b5), W64LIT(0x240ca1cc77ac9c65), + W64LIT(0x2de92c6f592b0275), W64LIT(0x4a7484aa6ea6e483), + W64LIT(0x5cb0a9dcbd41fbd4), W64LIT(0x76f988da831153b5), + W64LIT(0x983e5152ee66dfab), W64LIT(0xa831c66d2db43210), + W64LIT(0xb00327c898fb213f), W64LIT(0xbf597fc7beef0ee4), + W64LIT(0xc6e00bf33da88fc2), W64LIT(0xd5a79147930aa725), + W64LIT(0x06ca6351e003826f), W64LIT(0x142929670a0e6e70), + W64LIT(0x27b70a8546d22ffc), W64LIT(0x2e1b21385c26c926), + W64LIT(0x4d2c6dfc5ac42aed), W64LIT(0x53380d139d95b3df), + W64LIT(0x650a73548baf63de), W64LIT(0x766a0abb3c77b2a8), + W64LIT(0x81c2c92e47edaee6), W64LIT(0x92722c851482353b), + W64LIT(0xa2bfe8a14cf10364), W64LIT(0xa81a664bbc423001), + W64LIT(0xc24b8b70d0f89791), W64LIT(0xc76c51a30654be30), + W64LIT(0xd192e819d6ef5218), W64LIT(0xd69906245565a910), + W64LIT(0xf40e35855771202a), W64LIT(0x106aa07032bbd1b8), + W64LIT(0x19a4c116b8d2d0c8), W64LIT(0x1e376c085141ab53), + W64LIT(0x2748774cdf8eeb99), W64LIT(0x34b0bcb5e19b48a8), + W64LIT(0x391c0cb3c5c95a63), W64LIT(0x4ed8aa4ae3418acb), + W64LIT(0x5b9cca4f7763e373), W64LIT(0x682e6ff3d6b2b8a3), + W64LIT(0x748f82ee5defb2fc), W64LIT(0x78a5636f43172f60), + W64LIT(0x84c87814a1f0ab72), W64LIT(0x8cc702081a6439ec), + W64LIT(0x90befffa23631e28), W64LIT(0xa4506cebde82bde9), + W64LIT(0xbef9a3f7b2c67915), W64LIT(0xc67178f2e372532b), + W64LIT(0xca273eceea26619c), W64LIT(0xd186b8c721c0c207), + W64LIT(0xeada7dd6cde0eb1e), W64LIT(0xf57d4f7fee6ed178), + W64LIT(0x06f067aa72176fba), W64LIT(0x0a637dc5a2c898a6), + W64LIT(0x113f9804bef90dae), W64LIT(0x1b710b35131c471b), + W64LIT(0x28db77f523047d84), W64LIT(0x32caab7b40c72493), + W64LIT(0x3c9ebe0a15c9bebc), W64LIT(0x431d67c49c100d4c), + W64LIT(0x4cc5d4becb3e42b6), W64LIT(0x597f299cfc657e2a), + W64LIT(0x5fcb6fab3ad6faec), W64LIT(0x6c44198c4a475817) +}; + + +// for SHA512 +#define S0(x) (rotrFixed(x,28)^rotrFixed(x,34)^rotrFixed(x,39)) +#define S1(x) (rotrFixed(x,14)^rotrFixed(x,18)^rotrFixed(x,41)) +#define s0(x) (rotrFixed(x,1)^rotrFixed(x,8)^(x>>7)) +#define s1(x) (rotrFixed(x,19)^rotrFixed(x,61)^(x>>6)) + + +static void Transform512(word64* digest_, word64* buffer_) +{ + const word64* K = K512; + + word64 W[16]; + word64 T[8]; + + // Copy digest to working vars + memcpy(T, digest_, sizeof(T)); + + // 64 operations, partially loop unrolled + for (unsigned int j = 0; j < 80; j += 16) { + R( 0); R( 1); R( 2); R( 3); + R( 4); R( 5); R( 6); R( 7); + R( 8); R( 9); R(10); R(11); + R(12); R(13); R(14); R(15); + } + + // Add the working vars back into digest + + digest_[0] += a(0); + digest_[1] += b(0); + digest_[2] += c(0); + digest_[3] += d(0); + digest_[4] += e(0); + digest_[5] += f(0); + digest_[6] += g(0); + digest_[7] += h(0); + + // Wipe variables + memset(W, 0, sizeof(W)); + memset(T, 0, sizeof(T)); +} + + +void SHA512::Transform() +{ + Transform512(digest_, buffer_); +} + + +void SHA384::Transform() +{ + Transform512(digest_, buffer_); +} + +#endif // WORD64_AVIALABLE + + #ifdef DO_SHA_ASM // f1(x,y,z) (z^(x &(y^z))) diff --git a/extra/yassl/taocrypt/test/test.cpp b/extra/yassl/taocrypt/test/test.cpp index c0d7aa50f18..9cf9c52b2c7 100644 --- a/extra/yassl/taocrypt/test/test.cpp +++ b/extra/yassl/taocrypt/test/test.cpp @@ -29,6 +29,12 @@ using TaoCrypt::byte; using TaoCrypt::word32; using TaoCrypt::SHA; +using TaoCrypt::SHA256; +using TaoCrypt::SHA224; +#ifdef WORD64_AVAILABLE + using TaoCrypt::SHA512; + using TaoCrypt::SHA384; +#endif using TaoCrypt::MD5; using TaoCrypt::MD2; using TaoCrypt::MD4; @@ -90,6 +96,12 @@ struct testVector { void file_test(int, char**); int sha_test(); +int sha256_test(); +#ifdef WORD64_AVAILABLE + int sha512_test(); + int sha384_test(); +#endif +int sha224_test(); int md5_test(); int md2_test(); int md4_test(); @@ -139,20 +151,20 @@ const byte msgTmp[] = { // "now is the time for all " w/o trailing 0 0x66,0x6f,0x72,0x20,0x61,0x6c,0x6c,0x20 }; -byte* global_msg = 0; // for block cipher input -byte* global_plain = 0; // for cipher decrypt comparison -byte* global_cipher = 0; // block output +byte* msg = 0; // for block cipher input +byte* plain = 0; // for cipher decrypt comparison +byte* cipher = 0; // block output void taocrypt_test(void* args) { ((func_args*)args)->return_code = -1; // error state - global_msg = NEW_TC byte[24]; - global_plain = NEW_TC byte[24]; - global_cipher = NEW_TC byte[24]; + msg = NEW_TC byte[24]; + plain = NEW_TC byte[24]; + cipher = NEW_TC byte[24]; - memcpy(global_msg, msgTmp, 24); + memcpy(msg, msgTmp, 24); int ret = 0; if ( (ret = sha_test()) ) @@ -160,6 +172,30 @@ void taocrypt_test(void* args) else printf( "SHA test passed!\n"); + if ( (ret = sha256_test()) ) + err_sys("SHA-256 test failed!\n", ret); + else + printf( "SHA-256 test passed!\n"); + + if ( (ret = sha224_test()) ) + err_sys("SHA-224 test failed!\n", ret); + else + printf( "SHA-224 test passed!\n"); + +#ifdef WORD64_AVAILABLE + + if ( (ret = sha512_test()) ) + err_sys("SHA-512 test failed!\n", ret); + else + printf( "SHA-512 test passed!\n"); + + if ( (ret = sha384_test()) ) + err_sys("SHA-384 test failed!\n", ret); + else + printf( "SHA-384 test passed!\n"); + +#endif + if ( (ret = md5_test()) ) err_sys("MD5 test failed!\n", ret); else @@ -237,9 +273,9 @@ void taocrypt_test(void* args) printf( "PKCS12 test passed!\n"); */ - tcArrayDelete(global_cipher); - tcArrayDelete(global_plain); - tcArrayDelete(global_msg); + tcArrayDelete(cipher); + tcArrayDelete(plain); + tcArrayDelete(msg); ((func_args*)args)->return_code = ret; } @@ -328,6 +364,136 @@ int sha_test() } +int sha256_test() +{ + SHA256 sha; + byte hash[SHA256::DIGEST_SIZE]; + + testVector test_sha[] = + { + testVector("abc", + "\xBA\x78\x16\xBF\x8F\x01\xCF\xEA\x41\x41\x40\xDE\x5D\xAE\x22" + "\x23\xB0\x03\x61\xA3\x96\x17\x7A\x9C\xB4\x10\xFF\x61\xF2\x00" + "\x15\xAD"), + testVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", + "\x24\x8D\x6A\x61\xD2\x06\x38\xB8\xE5\xC0\x26\x93\x0C\x3E\x60" + "\x39\xA3\x3C\xE4\x59\x64\xFF\x21\x67\xF6\xEC\xED\xD4\x19\xDB" + "\x06\xC1") + }; + + int times( sizeof(test_sha) / sizeof(testVector) ); + for (int i = 0; i < times; ++i) { + sha.Update(test_sha[i].input_, test_sha[i].inLen_); + sha.Final(hash); + + if (memcmp(hash, test_sha[i].output_, SHA256::DIGEST_SIZE) != 0) + return -1 - i; + } + + return 0; +} + + +#ifdef WORD64_AVAILABLE + +int sha512_test() +{ + SHA512 sha; + byte hash[SHA512::DIGEST_SIZE]; + + testVector test_sha[] = + { + testVector("abc", + "\xdd\xaf\x35\xa1\x93\x61\x7a\xba\xcc\x41\x73\x49\xae\x20\x41" + "\x31\x12\xe6\xfa\x4e\x89\xa9\x7e\xa2\x0a\x9e\xee\xe6\x4b\x55" + "\xd3\x9a\x21\x92\x99\x2a\x27\x4f\xc1\xa8\x36\xba\x3c\x23\xa3" + "\xfe\xeb\xbd\x45\x4d\x44\x23\x64\x3c\xe8\x0e\x2a\x9a\xc9\x4f" + "\xa5\x4c\xa4\x9f"), + testVector("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" + "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", + "\x8e\x95\x9b\x75\xda\xe3\x13\xda\x8c\xf4\xf7\x28\x14\xfc\x14" + "\x3f\x8f\x77\x79\xc6\xeb\x9f\x7f\xa1\x72\x99\xae\xad\xb6\x88" + "\x90\x18\x50\x1d\x28\x9e\x49\x00\xf7\xe4\x33\x1b\x99\xde\xc4" + "\xb5\x43\x3a\xc7\xd3\x29\xee\xb6\xdd\x26\x54\x5e\x96\xe5\x5b" + "\x87\x4b\xe9\x09") + }; + + int times( sizeof(test_sha) / sizeof(testVector) ); + for (int i = 0; i < times; ++i) { + sha.Update(test_sha[i].input_, test_sha[i].inLen_); + sha.Final(hash); + + if (memcmp(hash, test_sha[i].output_, SHA512::DIGEST_SIZE) != 0) + return -1 - i; + } + + return 0; +} + + +int sha384_test() +{ + SHA384 sha; + byte hash[SHA384::DIGEST_SIZE]; + + testVector test_sha[] = + { + testVector("abc", + "\xcb\x00\x75\x3f\x45\xa3\x5e\x8b\xb5\xa0\x3d\x69\x9a\xc6\x50" + "\x07\x27\x2c\x32\xab\x0e\xde\xd1\x63\x1a\x8b\x60\x5a\x43\xff" + "\x5b\xed\x80\x86\x07\x2b\xa1\xe7\xcc\x23\x58\xba\xec\xa1\x34" + "\xc8\x25\xa7"), + testVector("abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmnhi" + "jklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", + "\x09\x33\x0c\x33\xf7\x11\x47\xe8\x3d\x19\x2f\xc7\x82\xcd\x1b" + "\x47\x53\x11\x1b\x17\x3b\x3b\x05\xd2\x2f\xa0\x80\x86\xe3\xb0" + "\xf7\x12\xfc\xc7\xc7\x1a\x55\x7e\x2d\xb9\x66\xc3\xe9\xfa\x91" + "\x74\x60\x39") + }; + + int times( sizeof(test_sha) / sizeof(testVector) ); + for (int i = 0; i < times; ++i) { + sha.Update(test_sha[i].input_, test_sha[i].inLen_); + sha.Final(hash); + + if (memcmp(hash, test_sha[i].output_, SHA384::DIGEST_SIZE) != 0) + return -1 - i; + } + + return 0; +} + +#endif // WORD64_AVAILABLE + + +int sha224_test() +{ + SHA224 sha; + byte hash[SHA224::DIGEST_SIZE]; + + testVector test_sha[] = + { + testVector("abc", + "\x23\x09\x7d\x22\x34\x05\xd8\x22\x86\x42\xa4\x77\xbd\xa2\x55" + "\xb3\x2a\xad\xbc\xe4\xbd\xa0\xb3\xf7\xe3\x6c\x9d\xa7"), + testVector("abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", + "\x75\x38\x8b\x16\x51\x27\x76\xcc\x5d\xba\x5d\xa1\xfd\x89\x01" + "\x50\xb0\xc6\x45\x5c\xb4\xf5\x8b\x19\x52\x52\x25\x25") + }; + + int times( sizeof(test_sha) / sizeof(testVector) ); + for (int i = 0; i < times; ++i) { + sha.Update(test_sha[i].input_, test_sha[i].inLen_); + sha.Final(hash); + + if (memcmp(hash, test_sha[i].output_, SHA224::DIGEST_SIZE) != 0) + return -1 - i; + } + + return 0; +} + + int md5_test() { MD5 md5; @@ -606,11 +772,11 @@ int des_test() const byte iv[] = { 0x12,0x34,0x56,0x78,0x90,0xab,0xcd,0xef }; enc.SetKey(key, sizeof(key)); - enc.Process(global_cipher, global_msg, sz); + enc.Process(cipher, msg, sz); dec.SetKey(key, sizeof(key)); - dec.Process(global_plain, global_cipher, sz); + dec.Process(plain, cipher, sz); - if (memcmp(global_plain, global_msg, sz)) + if (memcmp(plain, msg, sz)) return -50; const byte verify1[] = @@ -620,7 +786,7 @@ int des_test() 0x89,0x3d,0x51,0xec,0x4b,0x56,0x3b,0x53 }; - if (memcmp(global_cipher, verify1, sz)) + if (memcmp(cipher, verify1, sz)) return -51; // CBC mode @@ -628,11 +794,11 @@ int des_test() DES_CBC_Decryption dec2; enc2.SetKey(key, sizeof(key), iv); - enc2.Process(global_cipher, global_msg, sz); + enc2.Process(cipher, msg, sz); dec2.SetKey(key, sizeof(key), iv); - dec2.Process(global_plain, global_cipher, sz); + dec2.Process(plain, cipher, sz); - if (memcmp(global_plain, global_msg, sz)) + if (memcmp(plain, msg, sz)) return -52; const byte verify2[] = @@ -642,7 +808,7 @@ int des_test() 0x15,0x85,0xb3,0x22,0x4b,0x86,0x2b,0x4b }; - if (memcmp(global_cipher, verify2, sz)) + if (memcmp(cipher, verify2, sz)) return -53; // EDE3 CBC mode @@ -664,11 +830,11 @@ int des_test() }; enc3.SetKey(key3, sizeof(key3), iv3); - enc3.Process(global_cipher, global_msg, sz); + enc3.Process(cipher, msg, sz); dec3.SetKey(key3, sizeof(key3), iv3); - dec3.Process(global_plain, global_cipher, sz); + dec3.Process(plain, cipher, sz); - if (memcmp(global_plain, global_msg, sz)) + if (memcmp(plain, msg, sz)) return -54; const byte verify3[] = @@ -678,7 +844,7 @@ int des_test() 0x18,0xbc,0xbb,0x6d,0xd2,0xb1,0x16,0xda }; - if (memcmp(global_cipher, verify3, sz)) + if (memcmp(cipher, verify3, sz)) return -55; return 0; @@ -697,10 +863,10 @@ int aes_test() enc.SetKey(key, bs, iv); dec.SetKey(key, bs, iv); - enc.Process(global_cipher, global_msg, bs); - dec.Process(global_plain, global_cipher, bs); + enc.Process(cipher, msg, bs); + dec.Process(plain, cipher, bs); - if (memcmp(global_plain, global_msg, bs)) + if (memcmp(plain, msg, bs)) return -60; const byte verify[] = @@ -709,7 +875,7 @@ int aes_test() 0x2c,0xcc,0x9d,0x46,0x77,0xa2,0x33,0xcb }; - if (memcmp(global_cipher, verify, bs)) + if (memcmp(cipher, verify, bs)) return -61; AES_ECB_Encryption enc2; @@ -718,10 +884,10 @@ int aes_test() enc2.SetKey(key, bs, iv); dec2.SetKey(key, bs, iv); - enc2.Process(global_cipher, global_msg, bs); - dec2.Process(global_plain, global_cipher, bs); + enc2.Process(cipher, msg, bs); + dec2.Process(plain, cipher, bs); - if (memcmp(global_plain, global_msg, bs)) + if (memcmp(plain, msg, bs)) return -62; const byte verify2[] = @@ -730,7 +896,7 @@ int aes_test() 0xc8,0x8c,0x33,0x3b,0xb5,0x8f,0x85,0xd1 }; - if (memcmp(global_cipher, verify2, bs)) + if (memcmp(cipher, verify2, bs)) return -63; return 0; @@ -749,10 +915,10 @@ int twofish_test() enc.SetKey(key, bs, iv); dec.SetKey(key, bs, iv); - enc.Process(global_cipher, global_msg, bs); - dec.Process(global_plain, global_cipher, bs); + enc.Process(cipher, msg, bs); + dec.Process(plain, cipher, bs); - if (memcmp(global_plain, global_msg, bs)) + if (memcmp(plain, msg, bs)) return -60; const byte verify[] = @@ -761,7 +927,7 @@ int twofish_test() 0x21,0x03,0x58,0x79,0x5F,0x02,0x27,0x2C }; - if (memcmp(global_cipher, verify, bs)) + if (memcmp(cipher, verify, bs)) return -61; Twofish_ECB_Encryption enc2; @@ -770,10 +936,10 @@ int twofish_test() enc2.SetKey(key, bs, iv); dec2.SetKey(key, bs, iv); - enc2.Process(global_cipher, global_msg, bs); - dec2.Process(global_plain, global_cipher, bs); + enc2.Process(cipher, msg, bs); + dec2.Process(plain, cipher, bs); - if (memcmp(global_plain, global_msg, bs)) + if (memcmp(plain, msg, bs)) return -62; const byte verify2[] = @@ -782,7 +948,7 @@ int twofish_test() 0xC4,0xCD,0x6B,0x91,0x14,0xC5,0x3A,0x09 }; - if (memcmp(global_cipher, verify2, bs)) + if (memcmp(cipher, verify2, bs)) return -63; return 0; @@ -801,10 +967,10 @@ int blowfish_test() enc.SetKey(key, 16, iv); dec.SetKey(key, 16, iv); - enc.Process(global_cipher, global_msg, bs * 2); - dec.Process(global_plain, global_cipher, bs * 2); + enc.Process(cipher, msg, bs * 2); + dec.Process(plain, cipher, bs * 2); - if (memcmp(global_plain, global_msg, bs)) + if (memcmp(plain, msg, bs)) return -60; const byte verify[] = @@ -813,7 +979,7 @@ int blowfish_test() 0xBC,0xD9,0x08,0xC4,0x94,0x6C,0x89,0xA3 }; - if (memcmp(global_cipher, verify, bs)) + if (memcmp(cipher, verify, bs)) return -61; Blowfish_ECB_Encryption enc2; @@ -822,10 +988,10 @@ int blowfish_test() enc2.SetKey(key, 16, iv); dec2.SetKey(key, 16, iv); - enc2.Process(global_cipher, global_msg, bs * 2); - dec2.Process(global_plain, global_cipher, bs * 2); + enc2.Process(cipher, msg, bs * 2); + dec2.Process(plain, cipher, bs * 2); - if (memcmp(global_plain, global_msg, bs)) + if (memcmp(plain, msg, bs)) return -62; const byte verify2[] = @@ -834,7 +1000,7 @@ int blowfish_test() 0x8F,0xCE,0x39,0x32,0xDE,0xD7,0xBC,0x5B }; - if (memcmp(global_cipher, verify2, bs)) + if (memcmp(cipher, verify2, bs)) return -63; return 0; diff --git a/extra/yassl/testsuite/testsuite.cpp b/extra/yassl/testsuite/testsuite.cpp index 06e75153341..1cf6a78ebe7 100644 --- a/extra/yassl/testsuite/testsuite.cpp +++ b/extra/yassl/testsuite/testsuite.cpp @@ -86,8 +86,8 @@ int main(int argc, char** argv) // input output compare byte input[TaoCrypt::MD5::DIGEST_SIZE]; byte output[TaoCrypt::MD5::DIGEST_SIZE]; - file_test((char*) "input", input); - file_test((char*) "output", output); + file_test("input", input); + file_test("output", output); assert(memcmp(input, output, sizeof(input)) == 0); printf("\nAll tests passed!\n"); @@ -141,17 +141,16 @@ int test_openSSL_des() /* test des encrypt/decrypt */ char data[] = "this is my data "; int dataSz = strlen(data); - DES_key_schedule local_key[3]; + DES_key_schedule key[3]; byte iv[8]; EVP_BytesToKey(EVP_des_ede3_cbc(), EVP_md5(), NULL, (byte*)data, dataSz, 1, - (byte*)local_key, iv); + (byte*)key, iv); byte cipher[16]; - DES_ede3_cbc_encrypt((byte*)data, cipher, dataSz, - &local_key[0], &local_key[1], - &local_key[2], &iv, true); + DES_ede3_cbc_encrypt((byte*)data, cipher, dataSz, &key[0], &key[1], + &key[2], &iv, true); byte plain[16]; - DES_ede3_cbc_encrypt(cipher, plain, 16, &local_key[0], &local_key[1], - &local_key[2], &iv, false); + DES_ede3_cbc_encrypt(cipher, plain, 16, &key[0], &key[1], &key[2], + &iv, false); return 0; } From 81a701cb9c6128482a8e4d94eeb42f375fb83a2d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 12:35:30 +0100 Subject: [PATCH 022/153] Backport from 5.1, limit SHOW VARIABLES to "log_bin%" --- mysql-test/r/flush2.result | 16 ++-------------- mysql-test/t/flush2.test | 4 ++-- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/mysql-test/r/flush2.result b/mysql-test/r/flush2.result index 7c94219fd71..13bcc371ef6 100644 --- a/mysql-test/r/flush2.result +++ b/mysql-test/r/flush2.result @@ -1,24 +1,12 @@ flush logs; set global expire_logs_days = 3; -show variables like 'log%'; +show variables like 'log_bin%'; Variable_name Value -log ON log_bin OFF log_bin_trust_function_creators ON -log_error -log_queries_not_using_indexes OFF -log_slave_updates OFF -log_slow_queries OFF -log_warnings 1 flush logs; -show variables like 'log%'; +show variables like 'log_bin%'; Variable_name Value -log ON log_bin OFF log_bin_trust_function_creators ON -log_error -log_queries_not_using_indexes OFF -log_slave_updates OFF -log_slow_queries OFF -log_warnings 1 set global expire_logs_days = 0; diff --git a/mysql-test/t/flush2.test b/mysql-test/t/flush2.test index fc9e88e3141..7582ab8426b 100644 --- a/mysql-test/t/flush2.test +++ b/mysql-test/t/flush2.test @@ -3,7 +3,7 @@ # flush logs; set global expire_logs_days = 3; -show variables like 'log%'; +show variables like 'log_bin%'; flush logs; -show variables like 'log%'; +show variables like 'log_bin%'; set global expire_logs_days = 0; From 5f62ccb46d764a68e56254bcff5c713d696d89c3 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 13:39:16 +0100 Subject: [PATCH 023/153] Bug #27070 server logs are created unrequested and in wrong directory mysql-test/t/log_state.test: Remove the "remove_file" for slow.log file, that file will now end up in var/log --- mysql-test/t/log_state.test | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/t/log_state.test b/mysql-test/t/log_state.test index e772089ce7a..16f466e9b54 100644 --- a/mysql-test/t/log_state.test +++ b/mysql-test/t/log_state.test @@ -136,4 +136,3 @@ disconnect con1; # Remove the log files that was created in the "default location" # i.e var/run --remove_file $MYSQLTEST_VARDIR/run/master.log ---remove_file $MYSQLTEST_VARDIR/run/master-slow.log From 57dc12563f099c7802ea8eaeb0c52ac4082de67a Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 18:14:03 +0300 Subject: [PATCH 024/153] Trivial cleanups and whitespace change in Event Scheduler code. A larger patch is to come, this is to exclude rudimentary changes from it. sql/event_data_objects.cc: Whitespace change. sql/event_data_objects.h: Remove debug allocators - we have safemalloc. sql/event_db_repository.cc: Whitespace change. sql/event_db_repository.h: Whitespace change. sql/event_queue.cc: Remove an unused structure. Whitespace change. sql/event_queue.h: Whitespace. sql/event_scheduler.cc: Whitespace change. sql/event_scheduler.h: Add comments. Whitespace change. sql/events.cc: Whitespace change. sql/events.h: Trivial cleanups. --- sql/event_data_objects.cc | 23 +++++++++++------------ sql/event_data_objects.h | 20 +------------------- sql/event_db_repository.cc | 24 ++++++++++++------------ sql/event_db_repository.h | 4 ++-- sql/event_queue.cc | 24 +++++++----------------- sql/event_queue.h | 2 +- sql/event_scheduler.cc | 16 ++++++++-------- sql/event_scheduler.h | 12 +++++++++--- sql/events.cc | 21 ++++++++++----------- sql/events.h | 5 ++++- 10 files changed, 65 insertions(+), 86 deletions(-) diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index 67ba371772a..5196cae22e3 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -81,7 +81,7 @@ Event_queue_element_for_exec::~Event_queue_element_for_exec() RETURN VALUE Address or NULL in case of error - + NOTE Created on THD's mem_root */ @@ -174,7 +174,7 @@ Event_parse_data::init_body(THD *thd) while (body_begin < body_end) { - if ((*body_end == '\0') || + if ((*body_end == '\0') || (my_isspace(thd->variables.character_set_client, *body_end))) { /* consume NULs and meaningless whitespace */ --body.length; @@ -186,7 +186,7 @@ Event_parse_data::init_body(THD *thd) consume closing comments This is arguably wrong, but it's the best we have until the parser is - changed to be smarter. FIXME PARSER + changed to be smarter. FIXME PARSER See also the sp_head code, where something like this is done also. @@ -296,7 +296,7 @@ Event_parse_data::init_execute_at(THD *thd) if (item_execute_at->fix_fields(thd, &item_execute_at)) goto wrong_value; - + /* no starts and/or ends in case of execute_at */ DBUG_PRINT("info", ("starts_null && ends_null should be 1 is %d", (starts_null && ends_null))); @@ -702,7 +702,7 @@ Event_basic::load_string_fields(Field **fields, ...) ret= TRUE; break; } - field_value->length= strlen(field_value->str); + field_value->length= strlen(field_value->str); field_name= (enum enum_events_table_field) va_arg(args, int); } @@ -778,7 +778,7 @@ Event_timed::Event_timed(): */ Event_timed::~Event_timed() -{ +{ } @@ -1382,7 +1382,6 @@ Event_queue_element::compute_next_execution_time() DBUG_PRINT("info", ("Dropped: %d", dropped)); status= Event_queue_element::DISABLED; status_changed= TRUE; - dropped= TRUE; goto ret; } @@ -1574,7 +1573,7 @@ Event_queue_element::mark_last_executed(THD *thd) last_executed= (my_time_t) thd->query_start(); last_executed_changed= TRUE; - + execution_count++; } @@ -1762,7 +1761,7 @@ Event_timed::get_create_event(THD *thd, String *buf) */ int -Event_job_data::get_fake_create_event(THD *thd, String *buf) +Event_job_data::get_fake_create_event(String *buf) { DBUG_ENTER("Event_job_data::get_create_event"); /* FIXME: "EVERY 3337 HOUR" is asking for trouble. */ @@ -1853,7 +1852,7 @@ done: RETURN VALUE 0 success EVEX_COMPILE_ERROR error during compilation - EVEX_MICROSECOND_UNSUP mysql.event was tampered + EVEX_MICROSECOND_UNSUP mysql.event was tampered */ int @@ -1878,7 +1877,7 @@ Event_job_data::compile(THD *thd, MEM_ROOT *mem_root) show_create.length(0); - switch (get_fake_create_event(thd, &show_create)) { + switch (get_fake_create_event(&show_create)) { case EVEX_MICROSECOND_UNSUP: DBUG_RETURN(EVEX_MICROSECOND_UNSUP); case 0: @@ -2043,7 +2042,7 @@ event_change_security_context(THD *thd, LEX_STRING user, LEX_STRING host, thd->security_ctx= &thd->main_security_ctx; #endif DBUG_RETURN(FALSE); -} +} /* diff --git a/sql/event_data_objects.h b/sql/event_data_objects.h index 8e013e40400..513f60df657 100644 --- a/sql/event_data_objects.h +++ b/sql/event_data_objects.h @@ -127,24 +127,6 @@ public: bool update_timing_fields(THD *thd); - - static void *operator new(size_t size) - { - void *p; - DBUG_ENTER("Event_queue_element::new(size)"); - p= my_malloc(size, MYF(0)); - DBUG_PRINT("info", ("alloc_ptr: 0x%lx", (long) p)); - DBUG_RETURN(p); - } - - static void operator delete(void *ptr, size_t size) - { - DBUG_ENTER("Event_queue_element::delete(ptr,size)"); - DBUG_PRINT("enter", ("free_ptr: 0x%lx", (long) ptr)); - TRASH(ptr, size); - my_free((gptr) ptr, MYF(0)); - DBUG_VOID_RETURN; - } }; @@ -206,7 +188,7 @@ public: compile(THD *thd, MEM_ROOT *mem_root); private: int - get_fake_create_event(THD *thd, String *buf); + get_fake_create_event(String *buf); Event_job_data(const Event_job_data &); /* Prevent use of these */ void operator=(Event_job_data &); diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc index 0c59d3e92f8..9e1ce1b4594 100644 --- a/sql/event_db_repository.cc +++ b/sql/event_db_repository.cc @@ -142,7 +142,7 @@ const TABLE_FIELD_W_TYPE event_table_fields[ET_FIELD_COUNT] = EVEX_GENERAL_ERROR Bad data EVEX_GET_FIELD_FAILED Field count does not match. table corrupted? - DESCRIPTION + DESCRIPTION Used both when an event is created and when it is altered. */ @@ -178,7 +178,7 @@ mysql_event_fill_row(THD *thd, TABLE *table, Event_parse_data *et, /* Change the SQL_MODE only if body was present in an ALTER EVENT and of course always during CREATE EVENT. - */ + */ if (et->body.str) { fields[ET_FIELD_SQL_MODE]->store((longlong)thd->variables.sql_mode, TRUE); @@ -237,7 +237,7 @@ mysql_event_fill_row(THD *thd, TABLE *table, Event_parse_data *et, fields[ET_FIELD_TRANSIENT_INTERVAL]->set_null(); fields[ET_FIELD_STARTS]->set_null(); fields[ET_FIELD_ENDS]->set_null(); - + TIME time; my_tz_UTC->gmt_sec_to_TIME(&time, et->execute_at); @@ -253,7 +253,7 @@ mysql_event_fill_row(THD *thd, TABLE *table, Event_parse_data *et, this is an error if the action is create. something is borked */ } - + ((Field_timestamp *)fields[ET_FIELD_MODIFIED])->set_time(); if (et->comment.str) @@ -323,12 +323,12 @@ Event_db_repository::index_read_for_db_for_i_s(THD *thd, TABLE *schema_table, ret= copy_event_to_schema_table(thd, schema_table, event_table); if (ret == 0) ret= event_table->file->index_next_same(event_table->record[0], - key_buf, key_len); + key_buf, key_len); } while (ret == 0); } DBUG_PRINT("info", ("Scan finished. ret=%d", ret)); } - event_table->file->ha_index_end(); + event_table->file->ha_index_end(); /* ret is guaranteed to be != 0 */ if (ret == HA_ERR_END_OF_FILE || ret == HA_ERR_KEY_NOT_FOUND) DBUG_RETURN(FALSE); @@ -489,7 +489,7 @@ Event_db_repository::open_event_table(THD *thd, enum thr_lock_type lock_type, check_parse_params() thd Thread context parse_data Event's data - + RETURN VALUE FALSE OK TRUE Error (reported) @@ -535,7 +535,7 @@ check_parse_params(THD *thd, Event_parse_data *parse_data) 0 OK EVEX_GENERAL_ERROR Failure - DESCRIPTION + DESCRIPTION Creates an event. Relies on mysql_event_fill_row which is shared with ::update_event. The name of the event is inside "et". */ @@ -630,7 +630,7 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data, handle it here */ if ((ret= mysql_event_fill_row(thd, table, parse_data, FALSE))) - goto err; + goto err; /* Close active transaction only if We are going to modify disk */ if (end_active_trans(thd)) @@ -647,7 +647,7 @@ ok: (void) mysql_change_db(thd, old_db.str, 1); /* This statement may cause a spooky valgrind warning at startup - inside init_key_cache on my system (ahristov, 2006/08/10) + inside init_key_cache on my system (ahristov, 2006/08/10) */ close_thread_tables(thd); DBUG_RETURN(FALSE); @@ -914,14 +914,14 @@ Event_db_repository::drop_schema_events(THD *thd, LEX_STRING schema) */ void -Event_db_repository::drop_events_by_field(THD *thd, +Event_db_repository::drop_events_by_field(THD *thd, enum enum_events_table_field field, LEX_STRING field_value) { int ret= 0; TABLE *table= NULL; READ_RECORD read_record_info; - DBUG_ENTER("Event_db_repository::drop_events_by_field"); + DBUG_ENTER("Event_db_repository::drop_events_by_field"); DBUG_PRINT("enter", ("field=%d field_value=%s", field, field_value.str)); if (open_event_table(thd, TL_WRITE, &table)) diff --git a/sql/event_db_repository.h b/sql/event_db_repository.h index 4991e2d0aa2..7d609dba860 100644 --- a/sql/event_db_repository.h +++ b/sql/event_db_repository.h @@ -62,7 +62,7 @@ public: update_event(THD *thd, Event_parse_data *parse_data, LEX_STRING *new_dbname, LEX_STRING *new_name); - bool + bool drop_event(THD *thd, LEX_STRING db, LEX_STRING name, bool drop_if_exists); void @@ -98,5 +98,5 @@ private: Event_db_repository(const Event_db_repository &); void operator=(Event_db_repository &); }; - + #endif /* _EVENT_DB_REPOSITORY_H_ */ diff --git a/sql/event_queue.cc b/sql/event_queue.cc index ef9dddf9195..7832a0337e7 100644 --- a/sql/event_queue.cc +++ b/sql/event_queue.cc @@ -32,16 +32,6 @@ #define LOCK_QUEUE_DATA() lock_data(SCHED_FUNC, __LINE__) #define UNLOCK_QUEUE_DATA() unlock_data(SCHED_FUNC, __LINE__) -struct event_queue_param -{ - THD *thd; - Event_queue *queue; - pthread_mutex_t LOCK_loaded; - pthread_cond_t COND_loaded; - bool loading_finished; -}; - - /* Compares the execute_at members of two Event_queue_element instances. Used as callback for the prioritized queue when shifting @@ -62,7 +52,7 @@ struct event_queue_param execute_at.second_part is not considered during comparison */ -static int +static int event_queue_element_compare_q(void *vptr, byte* a, byte *b) { my_time_t lhs = ((Event_queue_element *)a)->execute_at; @@ -183,7 +173,7 @@ Event_queue::deinit_queue() } -/* +/** Adds an event to the queue. SYNOPSIS @@ -209,7 +199,7 @@ Event_queue::create_event(THD *thd, Event_queue_element *new_element) LOCK_QUEUE_DATA(); queue_insert_safe(&queue, (byte *) new_element); dbug_dump_queue(thd->query_start()); - pthread_cond_broadcast(&COND_queue_state); + pthread_cond_broadcast(&COND_queue_state); UNLOCK_QUEUE_DATA(); } DBUG_VOID_RETURN; @@ -256,7 +246,7 @@ Event_queue::update_event(THD *thd, LEX_STRING dbname, LEX_STRING name, { DBUG_PRINT("info", ("new event in the queue: 0x%lx", (long) new_element)); queue_insert_safe(&queue, (byte *) new_element); - pthread_cond_broadcast(&COND_queue_state); + pthread_cond_broadcast(&COND_queue_state); } dbug_dump_queue(thd->query_start()); @@ -287,7 +277,7 @@ Event_queue::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name) find_n_remove_event(dbname, name); dbug_dump_queue(thd->query_start()); UNLOCK_QUEUE_DATA(); - + /* We don't signal here because the scheduler will catch the change next time it wakes up. @@ -309,7 +299,7 @@ Event_queue::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name) RETURN VALUE >=0 Number of dropped events - + NOTE Expected is the caller to acquire lock on LOCK_event_queue */ @@ -341,7 +331,7 @@ Event_queue::drop_matching_events(THD *thd, LEX_STRING pattern, i++; } /* - We don't call pthread_cond_broadcast(&COND_queue_state); + We don't call pthread_cond_broadcast(&COND_queue_state); If we remove the top event: 1. The queue is empty. The scheduler will wake up at some time and realize that the queue is empty. If create_event() comes inbetween diff --git a/sql/event_queue.h b/sql/event_queue.h index 338a6c8f903..95f52b7b588 100644 --- a/sql/event_queue.h +++ b/sql/event_queue.h @@ -34,7 +34,7 @@ public: bool init_queue(THD *thd); - + void deinit_queue(); diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc index 3c8ecf6ca3a..287bed27bd6 100644 --- a/sql/event_scheduler.cc +++ b/sql/event_scheduler.cc @@ -240,7 +240,7 @@ event_scheduler_thread(void *arg) /* - Function that executes an event in a child thread. Setups the + Function that executes an event in a child thread. Setups the environment for the event execution and cleans after that. SYNOPSIS @@ -254,7 +254,7 @@ event_scheduler_thread(void *arg) pthread_handler_t event_worker_thread(void *arg) { - THD *thd; + THD *thd; Event_queue_element_for_exec *event= (Event_queue_element_for_exec *)arg; thd= event->thd; @@ -267,7 +267,7 @@ event_worker_thread(void *arg) /* - Function that executes an event in a child thread. Setups the + Function that executes an event in a child thread. Setups the environment for the event execution and cleans after that. SYNOPSIS @@ -458,7 +458,7 @@ Event_scheduler::start() scheduler_thd= new_thd; DBUG_PRINT("info", ("Setting state go RUNNING")); state= RUNNING; - DBUG_PRINT("info", ("Forking new thread for scheduduler. THD: 0x%lx", (long) new_thd)); + DBUG_PRINT("info", ("Forking new thread for scheduler. THD: 0x%lx", (long) new_thd)); if (pthread_create(&th, &connection_attrib, event_scheduler_thread, (void*)scheduler_param_value)) { @@ -525,7 +525,7 @@ Event_scheduler::run(THD *thd) "event_name=0x%lx", (long) event_name)); if (event_name) { - if ((res= execute_top(thd, event_name))) + if ((res= execute_top(event_name))) break; } else @@ -559,7 +559,7 @@ Event_scheduler::run(THD *thd) */ bool -Event_scheduler::execute_top(THD *thd, Event_queue_element_for_exec *event_name) +Event_scheduler::execute_top(Event_queue_element_for_exec *event_name) { THD *new_thd; pthread_t th; @@ -631,7 +631,7 @@ Event_scheduler::is_running() } -/* +/** Stops the scheduler (again). Waits for acknowledgement from the scheduler that it has stopped - synchronous stopping. @@ -715,7 +715,7 @@ Event_scheduler::workers_count() { THD *tmp; uint count= 0; - + DBUG_ENTER("Event_scheduler::workers_count"); pthread_mutex_lock(&LOCK_thread_count); // For unlink from list I_List_iterator it(threads); diff --git a/sql/event_scheduler.h b/sql/event_scheduler.h index 2ab21464057..74d53c4f63d 100644 --- a/sql/event_scheduler.h +++ b/sql/event_scheduler.h @@ -15,6 +15,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +/* + This file is internal to Events module. Please do not include it directly. + All public declarations of Events module are in events.h and + event_data_objects.h. +*/ + class Event_queue; class Event_job_data; @@ -31,7 +37,7 @@ void deinit_event_thread(THD *thd); -class Event_worker_thread +class Event_worker_thread { public: static void @@ -74,7 +80,7 @@ public: bool run(THD *thd); - void + void init_scheduler(Event_queue *queue); void @@ -99,7 +105,7 @@ private: /* helper functions */ bool - execute_top(THD *thd, Event_queue_element_for_exec *event_name); + execute_top(Event_queue_element_for_exec *event_name); /* helper functions for working with mutexes & conditionals */ void diff --git a/sql/events.cc b/sql/events.cc index 88014ee34af..02e5a292e16 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -49,7 +49,7 @@ counterpart. 1. CREATE EVENT the_name ON SCHEDULE EVERY 1 SECOND DISABLE DO SELECT 1; 2. DROP EVENT the_name - + In other words, the first one will create a row in mysql.event . In the second step because there will be a line, disk based drop will pass and the scheduler will remove the memory counterpart. The reason is that @@ -309,7 +309,7 @@ Events::Events() TRUE Error (Reported) NOTES - In case there is an event with the same name (db) and + In case there is an event with the same name (db) and IF NOT EXISTS is specified, an warning is put into the stack. */ @@ -346,7 +346,6 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, bool if_not_exists) pthread_mutex_unlock(&LOCK_event_metadata); DBUG_RETURN(ret); - } @@ -364,7 +363,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, bool if_not_exists) TRUE Error NOTES - et contains data about dbname and event name. + et contains data about dbname and event name. new_name is the new name of the event, if not null this means that RENAME TO was specified in the query */ @@ -396,7 +395,7 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to) new_element))) { DBUG_ASSERT(ret == OP_LOAD_ERROR); - delete new_element; + delete new_element; } else event_queue->update_event(thd, parse_data->dbname, parse_data->name, @@ -444,7 +443,7 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) } -/* +/** Drops all events from a schema SYNOPSIS @@ -457,8 +456,8 @@ void Events::drop_schema_events(THD *thd, char *db) { LEX_STRING const db_lex= { db, strlen(db) }; - - DBUG_ENTER("Events::drop_schema_events"); + + DBUG_ENTER("Events::drop_schema_events"); DBUG_PRINT("enter", ("dropping events from %s", db)); if (unlikely(check_system_tables_error)) { @@ -697,7 +696,7 @@ Events::deinit() } -/* +/** Inits Events mutexes SYNOPSIS @@ -755,7 +754,7 @@ Events::dump_internal_status() } -/* +/** Starts execution of events by the scheduler SYNOPSIS @@ -912,7 +911,7 @@ Events::check_system_tables(THD *thd) RETURN VALUE 0 OK - !0 Error (EVEX_OPEN_TABLE_FAILED, EVEX_MICROSECOND_UNSUP, + !0 Error (EVEX_OPEN_TABLE_FAILED, EVEX_MICROSECOND_UNSUP, EVEX_COMPILE_ERROR) - in all these cases mysql.event was tampered. diff --git a/sql/events.h b/sql/events.h index 35ee3c569d0..f97a0c5f57e 100644 --- a/sql/events.h +++ b/sql/events.h @@ -19,7 +19,6 @@ class sp_name; class Event_parse_data; class Event_db_repository; class Event_queue; -class Event_queue_element; class Event_scheduler; /* Return codes */ @@ -38,6 +37,10 @@ enum enum_events_error_code int sortcmp_lex_string(LEX_STRING s, LEX_STRING t, CHARSET_INFO *cs); +/** + @class Events -- a facade to the functionality of the Event Scheduler. + +*/ class Events { From 4e778fe994f691849112607d99913e22f21b8b4f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 18:19:53 +0300 Subject: [PATCH 025/153] Update an imperfect error message. sql/sql_servers.cc: It's not a fatal error if we can not open mysql.servers table (the start up process continues). --- sql/sql_servers.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_servers.cc b/sql/sql_servers.cc index 7b3b71cdd9a..60ca08fb555 100644 --- a/sql/sql_servers.cc +++ b/sql/sql_servers.cc @@ -208,7 +208,7 @@ my_bool servers_reload(THD *thd) if (simple_open_n_lock_tables(thd, tables)) { - sql_print_error("Fatal error: Can't open and lock privilege tables: %s", + sql_print_error("Can't open and lock privilege tables: %s", thd->net.last_error); goto end; } From 37ef840f776153ca04d06ba8e1527001aebd07ba Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 16:41:17 +0100 Subject: [PATCH 026/153] Import patch from yaSSL after fixing warnings upstream extra/yassl/src/ssl.cpp: Import patch yassl.diff extra/yassl/taocrypt/src/integer.cpp: Import patch yassl.diff extra/yassl/taocrypt/test/test.cpp: Import patch yassl.diff extra/yassl/testsuite/testsuite.cpp: Import patch yassl.diff --- extra/yassl/src/ssl.cpp | 2 +- extra/yassl/taocrypt/src/integer.cpp | 2 +- extra/yassl/taocrypt/test/test.cpp | 3 +-- extra/yassl/testsuite/testsuite.cpp | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index 70198af79b4..5bbde13a652 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -950,7 +950,7 @@ void ERR_print_errors_fp(FILE* /*fp*/) char* ERR_error_string(unsigned long errNumber, char* buffer) { - static char* msg = "Please supply a buffer for error string"; + static char* msg = (char*)"Please supply a buffer for error string"; if (buffer) { SetErrorString(YasslError(errNumber), buffer); diff --git a/extra/yassl/taocrypt/src/integer.cpp b/extra/yassl/taocrypt/src/integer.cpp index 419783403ea..85733b88aa9 100644 --- a/extra/yassl/taocrypt/src/integer.cpp +++ b/extra/yassl/taocrypt/src/integer.cpp @@ -3390,7 +3390,7 @@ void Integer::DivideByPowerOf2(Integer &r, Integer &q, const Integer &a, CopyWords(r.reg_.get_buffer(), a.reg_.get_buffer(), wordCount); SetWords(r.reg_+wordCount, 0, r.reg_.size()-wordCount); if (n % WORD_BITS != 0) - r.reg_[wordCount-1] %= (1 << (n % WORD_BITS)); + r.reg_[wordCount-1] %= (word(1) << (n % WORD_BITS)); } else { diff --git a/extra/yassl/taocrypt/test/test.cpp b/extra/yassl/taocrypt/test/test.cpp index 9cf9c52b2c7..0af278404ab 100644 --- a/extra/yassl/taocrypt/test/test.cpp +++ b/extra/yassl/taocrypt/test/test.cpp @@ -94,7 +94,6 @@ struct testVector { output_((byte*)out), inLen_(strlen(in)), outLen_(strlen(out)) {} }; -void file_test(int, char**); int sha_test(); int sha256_test(); #ifdef WORD64_AVAILABLE @@ -300,7 +299,7 @@ void taocrypt_test(void* args) #endif // NO_MAIN_DRIVER -void file_test(char* file, byte* check) +void file_test(const char* file, byte* check) { FILE* f; int i(0); diff --git a/extra/yassl/testsuite/testsuite.cpp b/extra/yassl/testsuite/testsuite.cpp index 1cf6a78ebe7..3cd832ebb03 100644 --- a/extra/yassl/testsuite/testsuite.cpp +++ b/extra/yassl/testsuite/testsuite.cpp @@ -7,7 +7,7 @@ typedef unsigned char byte; void taocrypt_test(void*); -void file_test(char*, byte*); +void file_test(const char*, byte*); void client_test(void*); void echoclient_test(void*); From b2d3dddef527ba6b3b0d77d1cc04d53da54b15cb Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 19:14:08 +0300 Subject: [PATCH 027/153] Change module prefix in error messages: SCHEDULER -> Event Scheduler, to not collide with the recently introduced thread scheduler module. mysql-test/r/events.result: Update test results with new error texts (SCHEDULER -> Event Scheduler, grammar). sql/event_data_objects.cc: SCHEDULER -> Event Scheduler. sql/event_queue.cc: SCHEDULER -> Event Scheduler. sql/event_scheduler.cc: SCHEDULER -> Event Scheduler. sql/events.cc: SCHEDULER -> Event Scheduler. sql/share/errmsg.txt: SCHEDULER -> Event Scheduler. Fix English grammar. --- mysql-test/r/events.result | 14 ++++++------- sql/event_data_objects.cc | 7 ++++--- sql/event_queue.cc | 7 ++++--- sql/event_scheduler.cc | 41 ++++++++++++++++++++++---------------- sql/events.cc | 25 ++++++++++++----------- sql/share/errmsg.txt | 6 +++--- 6 files changed, 55 insertions(+), 45 deletions(-) diff --git a/mysql-test/r/events.result b/mysql-test/r/events.result index cab5762012c..641de1571c3 100644 --- a/mysql-test/r/events.result +++ b/mysql-test/r/events.result @@ -229,10 +229,10 @@ Db Name Definer Time zone Type Execute at Interval value Interval field Starts E events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED ALTER TABLE mysql.event ADD dummy INT FIRST; SHOW EVENTS; -ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 18. Table probably corrupted +ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 18. The table is probably corrupted ALTER TABLE mysql.event DROP dummy, ADD dummy2 VARCHAR(64) FIRST; SHOW EVENTS; -ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 18. Table probably corrupted +ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 18. The table is probably corrupted ALTER TABLE mysql.event DROP dummy2; SHOW EVENTS; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status @@ -241,7 +241,7 @@ CREATE TABLE event_like LIKE mysql.event; INSERT INTO event_like SELECT * FROM mysql.event; ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default ''; SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log. +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details ALTER TABLE mysql.event MODIFY db char(20) character set utf8 collate utf8_bin default ''; SHOW CREATE TABLE mysql.event; Table Create Table @@ -266,7 +266,7 @@ event CREATE TABLE `event` ( PRIMARY KEY (`db`,`name`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log. +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details ALTER TABLE mysql.event MODIFY db char(64) character set utf8 collate utf8_bin default ''; "This should work" SHOW EVENTS; @@ -274,13 +274,13 @@ Db Name Definer Time zone Type Execute at Interval value Interval field Starts E events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default ''; SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log. +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details ALTER TABLE mysql.event MODIFY db varchar(64) character set utf8 collate utf8_bin default ''; SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. Table probably corrupted. See error log. +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details ALTER TABLE mysql.event DROP comment, DROP starts; SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 15. Table probably corrupted +ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 15. The table is probably corrupted DROP TABLE mysql.event; CREATE TABLE mysql.event like event_like; INSERT INTO mysql.event SELECT * FROM event_like; diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index 5196cae22e3..c3ac488fb14 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -1926,9 +1926,10 @@ Event_job_data::compile(THD *thd, MEM_ROOT *mem_root) thd->is_fatal_error)); lex.unit.cleanup(); - sql_print_error("SCHEDULER: Error during compilation of %s.%s or " - "thd->is_fatal_error: %d", - dbname.str, name.str, thd->is_fatal_error); + sql_print_error("Event Scheduler: " + "%serror during compilation of %s.%s", + thd->is_fatal_error ? "fatal " : "", + dbname.str, name.str); ret= EVEX_COMPILE_ERROR; goto done; diff --git a/sql/event_queue.cc b/sql/event_queue.cc index 7832a0337e7..f110bfdd1bf 100644 --- a/sql/event_queue.cc +++ b/sql/event_queue.cc @@ -138,7 +138,7 @@ Event_queue::init_queue(THD *thd) 0 /*max_on_top*/, event_queue_element_compare_q, NULL, EVENT_QUEUE_EXTENT)) { - sql_print_error("SCHEDULER: Can't initialize the execution queue"); + sql_print_error("Event Scheduler: Can't initialize the execution queue"); goto err; } @@ -453,7 +453,8 @@ Event_queue::empty_queue() uint i; DBUG_ENTER("Event_queue::empty_queue"); DBUG_PRINT("enter", ("Purging the queue. %u element(s)", queue.elements)); - sql_print_information("SCHEDULER: Purging queue. %u events", queue.elements); + sql_print_information("Event Scheduler: Purging the queue. %u events", + queue.elements); /* empty the queue */ for (i= 0; i < queue.elements; ++i) { @@ -586,7 +587,7 @@ Event_queue::get_top_for_execution_if_time(THD *thd, if (top->status == Event_queue_element::DISABLED) { DBUG_PRINT("info", ("removing from the queue")); - sql_print_information("SCHEDULER: Last execution of %s.%s. %s", + sql_print_information("Event Scheduler: Last execution of %s.%s. %s", top->dbname.str, top->name.str, top->dropped? "Dropping.":""); delete top; diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc index 287bed27bd6..d50ea932596 100644 --- a/sql/event_scheduler.cc +++ b/sql/event_scheduler.cc @@ -78,7 +78,7 @@ Event_worker_thread::print_warnings(THD *thd, Event_job_data *et) char prefix_buf[5 * STRING_BUFFER_USUAL_SIZE]; String prefix(prefix_buf, sizeof(prefix_buf), system_charset_info); prefix.length(0); - prefix.append("SCHEDULER: ["); + prefix.append("Event Scheduler: ["); append_identifier(thd, &prefix, et->definer.str, et->definer.length); prefix.append("][", 2); @@ -304,7 +304,8 @@ Event_worker_thread::run(THD *thd, Event_queue_element_for_exec *event) goto end; } - sql_print_information("SCHEDULER: [%s.%s of %s] executing in thread %lu. ", + sql_print_information("Event Scheduler: " + "[%s.%s of %s] executing in thread %lu. ", job_data->dbname.str, job_data->name.str, job_data->definer.str, thd->thread_id); @@ -314,23 +315,25 @@ Event_worker_thread::run(THD *thd, Event_queue_element_for_exec *event) print_warnings(thd, job_data); - sql_print_information("SCHEDULER: [%s.%s of %s] executed in thread %lu. " + sql_print_information("Event Scheduler: " + "[%s.%s of %s] executed in thread %lu. " "RetCode=%d", job_data->dbname.str, job_data->name.str, job_data->definer.str, thd->thread_id, ret); if (ret == EVEX_COMPILE_ERROR) - sql_print_information("SCHEDULER: COMPILE ERROR for event %s.%s of %s", + sql_print_information("Event Scheduler: " + "COMPILE ERROR for event %s.%s of %s", job_data->dbname.str, job_data->name.str, job_data->definer.str); else if (ret == EVEX_MICROSECOND_UNSUP) - sql_print_information("SCHEDULER: MICROSECOND is not supported"); + sql_print_information("Event Scheduler: MICROSECOND is not supported"); end: delete job_data; if (event->dropped) { - sql_print_information("SCHEDULER: Dropping %s.%s", event->dbname.str, - event->name.str); + sql_print_information("Event Scheduler: Dropping %s.%s", + event->dbname.str, event->name.str); /* Using db_repository can lead to a race condition because we access the table without holding LOCK_metadata. @@ -442,7 +445,7 @@ Event_scheduler::start() if (!(new_thd= new THD)) { - sql_print_error("SCHEDULER: Cannot init manager event thread"); + sql_print_error("Event Scheduler: Cannot initialize the scheduler thread"); ret= TRUE; goto end; } @@ -501,7 +504,7 @@ Event_scheduler::run(THD *thd) int res= FALSE; DBUG_ENTER("Event_scheduler::run"); - sql_print_information("SCHEDULER: Manager thread started with id %lu", + sql_print_information("Event Scheduler: scheduler thread started with id %lu", thd->thread_id); /* Recalculate the values in the queue because there could have been stops @@ -516,7 +519,8 @@ Event_scheduler::run(THD *thd) /* Gets a minimized version */ if (queue->get_top_for_execution_if_time(thd, &event_name)) { - sql_print_information("SCHEDULER: Serious error during getting next " + sql_print_information("Event Scheduler: " + "Serious error during getting next " "event to execute. Stopping"); break; } @@ -540,7 +544,7 @@ Event_scheduler::run(THD *thd) state= INITIALIZED; pthread_cond_signal(&COND_state); UNLOCK_DATA(); - sql_print_information("SCHEDULER: Stopped"); + sql_print_information("Event Scheduler: Stopped"); DBUG_RETURN(res); } @@ -657,8 +661,8 @@ Event_scheduler::stop() /* Guarantee we don't catch spurious signals */ do { - DBUG_PRINT("info", ("Waiting for COND_started_or_stopped from the manager " - "thread. Current value of state is %s . " + DBUG_PRINT("info", ("Waiting for COND_started_or_stopped from " + "the scheduler thread. Current value of state is %s . " "workers count=%d", scheduler_states_names[state].str, workers_count())); /* @@ -672,20 +676,23 @@ Event_scheduler::stop() */ state= STOPPING; - DBUG_PRINT("info", ("Manager thread has id %lu", scheduler_thd->thread_id)); + DBUG_PRINT("info", ("Scheduler thread has id %lu", + scheduler_thd->thread_id)); /* Lock from delete */ pthread_mutex_lock(&scheduler_thd->LOCK_delete); /* This will wake up the thread if it waits on Queue's conditional */ - sql_print_information("SCHEDULER: Killing manager thread %lu", + sql_print_information("Event Scheduler: Killing the scheduler thread, " + "thread id %lu", scheduler_thd->thread_id); scheduler_thd->awake(THD::KILL_CONNECTION); pthread_mutex_unlock(&scheduler_thd->LOCK_delete); /* thd could be 0x0, when shutting down */ - sql_print_information("SCHEDULER: Waiting the manager thread to reply"); + sql_print_information("Event Scheduler: " + "Waiting for the scheduler thread to reply"); COND_STATE_WAIT(thd, NULL, "Waiting scheduler to stop"); } while (state == STOPPING); - DBUG_PRINT("info", ("Manager thread has cleaned up. Set state to INIT")); + DBUG_PRINT("info", ("Scheduler thread has cleaned up. Set state to INIT")); /* The rationale behind setting it to NULL here but not destructing it beforehand is because the THD will be deinited in event_scheduler_thread(). diff --git a/sql/events.cc b/sql/events.cc index 02e5a292e16..fd8160e103c 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -641,7 +641,7 @@ Events::init() if (check_system_tables(thd)) { check_system_tables_error= TRUE; - sql_print_error("SCHEDULER: The system tables are damaged. " + sql_print_error("Event Scheduler: The system tables are damaged. " "The scheduler subsystem will be unusable during this run."); goto end; } @@ -649,7 +649,7 @@ Events::init() if (event_queue->init_queue(thd) || load_events_from_db(thd)) { - sql_print_error("SCHEDULER: Error while loading from disk."); + sql_print_error("Event Scheduler: Error while loading from disk."); goto end; } @@ -862,7 +862,7 @@ Events::check_system_tables(THD *thd) if ((ret= simple_open_n_lock_tables(thd, &tables))) { - sql_print_error("SCHEDULER: Cannot open mysql.db"); + sql_print_error("Event Scheduler: Cannot open mysql.db"); ret= TRUE; } ret= table_check_intact(tables.table, MYSQL_DB_FIELD_COUNT, @@ -877,7 +877,7 @@ Events::check_system_tables(THD *thd) if (simple_open_n_lock_tables(thd, &tables)) { - sql_print_error("SCHEDULER: Cannot open mysql.user"); + sql_print_error("Event Scheduler: Cannot open mysql.user"); ret= TRUE; } else @@ -933,7 +933,7 @@ Events::load_events_from_db(THD *thd) if ((ret= db_repository->open_event_table(thd, TL_READ, &table))) { - sql_print_error("SCHEDULER: Table mysql.event is damaged. Can not open"); + sql_print_error("Event Scheduler: Table mysql.event is damaged. Can not open"); DBUG_RETURN(EVEX_OPEN_TABLE_FAILED); } @@ -950,8 +950,9 @@ Events::load_events_from_db(THD *thd) if ((ret= et->load_from_row(thd, table))) { - sql_print_error("SCHEDULER: Error while loading from mysql.event. " - "Table probably corrupted"); + sql_print_error("Event Scheduler: " + "Error while reading from mysql.event. " + "The table is probably corrupted"); break; } if (et->status != Event_queue_element::ENABLED) @@ -964,7 +965,7 @@ Events::load_events_from_db(THD *thd) /* let's find when to be executed */ if (et->compute_next_execution_time()) { - sql_print_error("SCHEDULER: Error while computing execution time of %s.%s." + sql_print_error("Event Scheduler: Error while computing execution time of %s.%s." " Skipping", et->dbname.str, et->name.str); continue; } @@ -981,11 +982,11 @@ Events::load_events_from_db(THD *thd) */ switch (ret= temp_job_data.compile(thd, thd->mem_root)) { case EVEX_MICROSECOND_UNSUP: - sql_print_error("SCHEDULER: mysql.event is tampered. MICROSECOND is not " + sql_print_error("Event Scheduler: mysql.event is tampered. MICROSECOND is not " "supported but found in mysql.event"); break; case EVEX_COMPILE_ERROR: - sql_print_error("SCHEDULER: Error while compiling %s.%s. Aborting load", + sql_print_error("Event Scheduler: Error while compiling %s.%s. Aborting load", et->dbname.str, et->name.str); break; default: @@ -1017,8 +1018,8 @@ end: else { ret= 0; - sql_print_information("SCHEDULER: Loaded %d event%s", count, - (count == 1)?"":"s"); + sql_print_information("Event Scheduler: Loaded %d event%s", + count, (count == 1)?"":"s"); } close_thread_tables(thd); diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 8159f014e93..c0da7053ac2 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5881,10 +5881,10 @@ ER_EVENT_NEITHER_M_EXPR_NOR_M_AT eng "No datetime expression provided" ger "Kein DATETIME-Ausdruck angegeben" ER_COL_COUNT_DOESNT_MATCH_CORRUPTED - eng "Column count of mysql.%s is wrong. Expected %d, found %d. Table probably corrupted" + eng "Column count of mysql.%s is wrong. Expected %d, found %d. The table is probably corrupted" ger "Spaltenanzahl von mysql.%s falsch. %d erwartet, aber %d gefunden. Tabelle ist wahrscheinlich beschädigt" ER_CANNOT_LOAD_FROM_TABLE - eng "Cannot load from mysql.%s. Table probably corrupted. See error log." + eng "Cannot load from mysql.%s. The table is probably corrupted. Please see the error log for details" ger "Kann mysql.%s nicht einlesen. Tabelle ist wahrscheinlich beschädigt, siehe Fehlerlog" ER_EVENT_CANNOT_DELETE eng "Failed to delete the event from mysql.event" @@ -5982,7 +5982,7 @@ ER_EVENT_RECURSIVITY_FORBIDDEN eng "Recursivity of EVENT DDL statements is forbidden when body is present" ger "Rekursivität von EVENT-DDL-Anweisungen ist unzulässig wenn ein Hauptteil (Body) existiert" ER_EVENTS_DB_ERROR - eng "Cannot proceed because the tables used by events were found damaged at server start" + eng "Cannot proceed because system tables used by Event Scheduler were found damaged at server start" ger "Kann nicht weitermachen, weil die Tabellen, die von Events verwendet werden, beim Serverstart als beschädigt markiert wurden" ER_ONLY_INTEGERS_ALLOWED eng "Only integers allowed as number here" From 24ce495a518d6d2756e5b1c0cb50f9c7526d0191 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 19:00:34 +0100 Subject: [PATCH 028/153] Bug#26837 Return value ignored for packet->append() call within Log_event::read_log_event - Improve error handling for "out of memory" problems when master is sending logs to slave. If memory allocation fails the log should now report error "memory allocation failed reading log event" sql/log_event.cc: Return LOG_READ_MEM from "Log_event::read_log_event" if memory allocation fails. --- sql/log_event.cc | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/sql/log_event.cc b/sql/log_event.cc index e272140c080..8bb63e72bde 100644 --- a/sql/log_event.cc +++ b/sql/log_event.cc @@ -669,19 +669,34 @@ int Log_event::read_log_event(IO_CACHE* file, String* packet, LOG_READ_TOO_LARGE); goto end; } - packet->append(buf, sizeof(buf)); + + /* Append the log event header to packet */ + if (packet->append(buf, sizeof(buf))) + { + /* Failed to allocate packet */ + result= LOG_READ_MEM; + goto end; + } data_len-= LOG_EVENT_MINIMAL_HEADER_LEN; if (data_len) { + /* Append rest of event, read directly from file into packet */ if (packet->append(file, data_len)) { /* - Here if we hit EOF it's really an error: as data_len is >=0 - there's supposed to be more bytes available. - EOF means we are reading the event partially, which should - never happen: either we read badly or the binlog is truncated. + Fatal error occured when appending rest of the event + to packet, possible failures: + 1. EOF occured when reading from file, it's really an error + as data_len is >=0 there's supposed to be more bytes available. + file->error will have been set to number of bytes left to read + 2. Read was interrupted, file->error would normally be set to -1 + 3. Failed to allocate memory for packet, my_errno + will be ENOMEM(file->error shuold be 0, but since the + memory allocation occurs before the call to read it might + be uninitialized) */ - result= file->error >= 0 ? LOG_READ_TRUNC: LOG_READ_IO; + result= (my_errno == ENOMEM ? LOG_READ_MEM : + (file->error >= 0 ? LOG_READ_TRUNC: LOG_READ_IO)); /* Implicit goto end; */ } } From 139c950f11c437230129243bd66d4b7dd9f73c79 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 18:15:11 -0400 Subject: [PATCH 029/153] bug#26346 Added some fixes for an existing memory leak and unitilialized variables, both caught by gcc. --- client/mysqldump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index 333bfbff1e6..effeaf68597 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1546,8 +1546,9 @@ static uint dump_routines_for_db(char *db) my_free(query_str, MYF(MY_ALLOW_ZERO_PTR)); } } /* end of routine printing */ + mysql_free_result(routine_res); + } /* end of list of routines */ - mysql_free_result(routine_res); } mysql_free_result(routine_list_res); } /* end of for i (0 .. 1) */ @@ -3373,7 +3374,7 @@ char check_if_ignore_table(const char *table_name, char *table_type) { char result= IGNORE_NONE; char buff[FN_REFLEN+80], show_name_buff[FN_REFLEN]; - MYSQL_RES *res; + MYSQL_RES *res= NULL; MYSQL_ROW row; DBUG_ENTER("check_if_ignore_table"); From eee28a267d658376f349bb54c7481e05f10c0eda Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 16:28:07 -0600 Subject: [PATCH 030/153] Bug #24563: MBROverlaps does not seem to function propertly. Fix is to rewrite the MBR::overlaps() function, to compute the dimension of both arguments, and the dimension of the intersection; test that all three dimensions are the same (e.g., all are Polygons). Add tests for all MBR* functions for various combinations of shapes, lines and points. mysql-test/include/gis_generic.inc: Add tests & checks for bug #24563 and bug #24588 - some GIS functions missing in 5.1; many GIS functions not tested; Overlaps() function was incorrect when MBR shifted only along one axis; Overlaps() needs to take dimension of shape into account. mysql-test/r/archive_gis.result: Update test results. mysql-test/r/bdb_gis.result: Update test results. mysql-test/r/gis.result: Update test results. mysql-test/r/innodb_gis.result: Update test results. mysql-test/r/ndb_gis.result: Update test results. mysql-test/t/gis.test: Add tests & checks for bug #24563 and bug #24588 - some GIS functions missing in 5.1; many GIS functions not tested; Overlaps() function was incorrect when MBR shifted only along one axis; Overlaps() needs to take dimension of shape into account. sql/spatial.h: Add MBR::dimension() (map MBR to integral dimension: point -> 0, line -> 1, polygon -> 2, invalid -> -1) Fix MBR::overlaps() to handle MBRs which are shifted on one dimension only, and to take MBR dimension into account. Also, test both within() and contains() predicates (so that overlaps(a, b) == overlaps(b, a)). --- mysql-test/include/gis_generic.inc | 71 +++++++++++- mysql-test/r/archive_gis.result | 88 ++++++++++++++- mysql-test/r/bdb_gis.result | 63 ++++++++++- mysql-test/r/gis.result | 87 +++++++++++++- mysql-test/r/innodb_gis.result | 88 ++++++++++++++- mysql-test/r/ndb_gis.result | 176 ++++++++++++++++++++++++++++- mysql-test/t/gis.test | 68 +++++++++++ sql/spatial.h | 43 ++++++- 8 files changed, 671 insertions(+), 13 deletions(-) diff --git a/mysql-test/include/gis_generic.inc b/mysql-test/include/gis_generic.inc index dc5d95baad9..1b4303da1f8 100644 --- a/mysql-test/include/gis_generic.inc +++ b/mysql-test/include/gis_generic.inc @@ -177,4 +177,73 @@ insert into t1 values (pointfromtext('point(1,1)')); drop table t1; -# End of 5.0 tests +--echo End of 4.1 tests + + +# +# Bug#24563: MBROverlaps does not seem to function propertly +# Bug#54888: MBROverlaps missing in 5.1? +# + +# Test all MBR* functions and their non-MBR-prefixed aliases, +# using shifted squares to verify the spatial relations. + +create table t1 (name VARCHAR(100), square GEOMETRY); + +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); + +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); + +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); + +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); + +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); + +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); + +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; + +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; + +# Overlaps needs a few more tests, with point and line dimensions + +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); + +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +SELECT Overlaps(@horiz1, @point2) FROM DUAL; + +DROP TABLE t1; + +--echo End of 5.0 tests diff --git a/mysql-test/r/archive_gis.result b/mysql-test/r/archive_gis.result index 7fb69e54a4c..97be26178ee 100644 --- a/mysql-test/r/archive_gis.result +++ b/mysql-test/r/archive_gis.result @@ -392,7 +392,7 @@ Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; first second w c o e d t i r 120 120 1 1 0 1 0 0 1 0 -120 121 0 0 0 0 0 0 1 0 +120 121 0 0 1 0 0 0 1 0 121 120 0 0 1 0 0 0 1 0 121 121 1 1 0 1 0 0 1 0 explain extended SELECT g1.fid as first, g2.fid as second, @@ -456,3 +456,89 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; +End of 4.1 tests +create table t1 (name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrcontains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrdisjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrequal +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrintersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbroverlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrtouches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrwithin +big,center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +contains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +disjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +equals +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +intersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +overlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +touches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +within +big,center +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +overlaps +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +overlaps +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +Overlaps(@horiz1, @vert1) +0 +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +Overlaps(@horiz1, @horiz2) +1 +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +Overlaps(@horiz1, @horiz3) +0 +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +Overlaps(@horiz1, @point1) +0 +SELECT Overlaps(@horiz1, @point2) FROM DUAL; +Overlaps(@horiz1, @point2) +0 +DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/r/bdb_gis.result b/mysql-test/r/bdb_gis.result index 512d681ff32..bb446badfff 100644 --- a/mysql-test/r/bdb_gis.result +++ b/mysql-test/r/bdb_gis.result @@ -392,7 +392,7 @@ Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; first second w c o e d t i r 120 120 1 1 0 1 0 0 1 0 -120 121 0 0 0 0 0 0 1 0 +120 121 0 0 1 0 0 0 1 0 121 120 0 0 1 0 0 0 1 0 121 121 1 1 0 1 0 0 1 0 explain extended SELECT g1.fid as first, g2.fid as second, @@ -456,3 +456,64 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; +End of 4.1 tests +create table t1 (name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrcontains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrdisjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrequal +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrintersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbroverlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrtouches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrwithin +big,center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +contains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +disjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +equals +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +intersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +overlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +touches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +within +big,center +DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result index de034d93dc5..d0e2979a367 100644 --- a/mysql-test/r/gis.result +++ b/mysql-test/r/gis.result @@ -385,7 +385,7 @@ Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; first second w c o e d t i r 120 120 1 1 0 1 0 0 1 0 -120 121 0 0 0 0 0 0 1 0 +120 121 0 0 1 0 0 0 1 0 121 120 0 0 1 0 0 0 1 0 121 121 1 1 0 1 0 0 1 0 explain extended SELECT g1.fid as first, g2.fid as second, @@ -763,3 +763,88 @@ create table t1 (g geometry not null); insert into t1 values(default); ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field drop table t1; +create table t1 (name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrcontains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrdisjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrequal +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrintersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbroverlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrtouches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrwithin +big,center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +contains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +disjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +equals +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +intersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +overlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +touches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +within +big,center +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +overlaps +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +overlaps +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +Overlaps(@horiz1, @vert1) +0 +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +Overlaps(@horiz1, @horiz2) +1 +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +Overlaps(@horiz1, @horiz3) +0 +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +Overlaps(@horiz1, @point1) +0 +SELECT Overlaps(@horiz1, @point2) FROM DUAL; +Overlaps(@horiz1, @point2) +0 +DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/r/innodb_gis.result b/mysql-test/r/innodb_gis.result index 41a227a2850..727cf7dbc66 100644 --- a/mysql-test/r/innodb_gis.result +++ b/mysql-test/r/innodb_gis.result @@ -392,7 +392,7 @@ Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; first second w c o e d t i r 120 120 1 1 0 1 0 0 1 0 -120 121 0 0 0 0 0 0 1 0 +120 121 0 0 1 0 0 0 1 0 121 120 0 0 1 0 0 0 1 0 121 121 1 1 0 1 0 0 1 0 explain extended SELECT g1.fid as first, g2.fid as second, @@ -456,3 +456,89 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; +End of 4.1 tests +create table t1 (name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrcontains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrdisjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrequal +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrintersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbroverlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrtouches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrwithin +big,center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +contains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +disjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +equals +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +intersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +overlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +touches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +within +big,center +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +overlaps +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +overlaps +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +Overlaps(@horiz1, @vert1) +0 +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +Overlaps(@horiz1, @horiz2) +1 +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +Overlaps(@horiz1, @horiz3) +0 +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +Overlaps(@horiz1, @point1) +0 +SELECT Overlaps(@horiz1, @point2) FROM DUAL; +Overlaps(@horiz1, @point2) +0 +DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/r/ndb_gis.result b/mysql-test/r/ndb_gis.result index bdbbc65dd85..5851df9ea6e 100644 --- a/mysql-test/r/ndb_gis.result +++ b/mysql-test/r/ndb_gis.result @@ -392,7 +392,7 @@ Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; first second w c o e d t i r 120 120 1 1 0 1 0 0 1 0 -120 121 0 0 0 0 0 0 1 0 +120 121 0 0 1 0 0 0 1 0 121 120 0 0 1 0 0 0 1 0 121 121 1 1 0 1 0 0 1 0 explain extended SELECT g1.fid as first, g2.fid as second, @@ -456,6 +456,92 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; +End of 4.1 tests +create table t1 (name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrcontains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrdisjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrequal +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrintersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbroverlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrtouches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrwithin +big,center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +contains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +disjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +equals +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +intersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +overlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +touches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +within +big,center +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +overlaps +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +overlaps +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +Overlaps(@horiz1, @vert1) +0 +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +Overlaps(@horiz1, @horiz2) +1 +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +Overlaps(@horiz1, @horiz3) +0 +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +Overlaps(@horiz1, @point1) +0 +SELECT Overlaps(@horiz1, @point2) FROM DUAL; +Overlaps(@horiz1, @point2) +0 +DROP TABLE t1; +End of 5.0 tests set engine_condition_pushdown = on; DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry; CREATE TABLE gis_point (fid INTEGER, g POINT); @@ -850,7 +936,7 @@ Intersects(g1.g, g2.g) as i, Crosses(g1.g, g2.g) as r FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second; first second w c o e d t i r 120 120 1 1 0 1 0 0 1 0 -120 121 0 0 0 0 0 0 1 0 +120 121 0 0 1 0 0 0 1 0 121 120 0 0 1 0 0 0 1 0 121 121 1 1 0 1 0 0 1 0 explain extended SELECT g1.fid as first, g2.fid as second, @@ -914,3 +1000,89 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; +End of 4.1 tests +create table t1 (name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrcontains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrdisjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrequal +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrintersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbroverlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrtouches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +mbrwithin +big,center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +contains +center,small +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +disjoint +down3,left3,right3,up3 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +equals +center +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +intersect +big,center,down,down2,left,left2,right,right2,small,up,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +overlaps +down,left,right,up +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +touches +down2,left2,right2,up2 +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +within +big,center +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +overlaps +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +overlaps +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +Overlaps(@horiz1, @vert1) +0 +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +Overlaps(@horiz1, @horiz2) +1 +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +Overlaps(@horiz1, @horiz3) +0 +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +Overlaps(@horiz1, @point1) +0 +SELECT Overlaps(@horiz1, @point2) FROM DUAL; +Overlaps(@horiz1, @point2) +0 +DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test index b32764f1f62..72ed4a2dd37 100644 --- a/mysql-test/t/gis.test +++ b/mysql-test/t/gis.test @@ -471,3 +471,71 @@ create table t1 (g geometry not null); insert into t1 values(default); drop table t1; + +# +# Bug#24563: MBROverlaps does not seem to function propertly +# Bug#54888: MBROverlaps missing in 5.1? +# + +# Test all MBR* functions and their non-MBR-prefixed aliases, +# using shifted squares to verify the spatial relations. + +create table t1 (name VARCHAR(100), square GEOMETRY); + +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); + +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); + +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); + +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); + +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); + +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); + +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrequal FROM t1 a1 JOIN t1 a2 ON MBREqual( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrintersect FROM t1 a1 JOIN t1 a2 ON MBRIntersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbroverlaps FROM t1 a1 JOIN t1 a2 ON MBROverlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrtouches FROM t1 a1 JOIN t1 a2 ON MBRTouches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrwithin FROM t1 a1 JOIN t1 a2 ON MBRWithin( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; + +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS contains FROM t1 a1 JOIN t1 a2 ON Contains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS disjoint FROM t1 a1 JOIN t1 a2 ON Disjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS equals FROM t1 a1 JOIN t1 a2 ON Equals( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS intersect FROM t1 a1 JOIN t1 a2 ON Intersects( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS overlaps FROM t1 a1 JOIN t1 a2 ON Overlaps( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS touches FROM t1 a1 JOIN t1 a2 ON Touches( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; +SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; + +# Overlaps needs a few more tests, with point and line dimensions + +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); + +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +SELECT Overlaps(@horiz1, @point2) FROM DUAL; + +DROP TABLE t1; + +--echo End of 5.0 tests diff --git a/sql/spatial.h b/sql/spatial.h index 86232fcd524..837ae153310 100644 --- a/sql/spatial.h +++ b/sql/spatial.h @@ -144,15 +144,46 @@ struct MBR return (xminx) && (yminy); } + /** + The dimension maps to an integer as: + - Polygon -> 2 + - Horizontal or vertical line -> 1 + - Point -> 0 + - Invalid MBR -> -1 + */ + int dimension() const + { + int d= 0; + + if (xmin > xmax) + return -1; + else if (xmin < xmax) + d++; + + if (ymin > ymax) + return -1; + else if (ymin < ymax) + d++; + + return d; + } + int overlaps(const MBR *mbr) { - int lb= mbr->inner_point(xmin, ymin); - int rb= mbr->inner_point(xmax, ymin); - int rt= mbr->inner_point(xmax, ymax); - int lt= mbr->inner_point(xmin, ymax); + /* + overlaps() requires that some point inside *this is also inside + *mbr, and that both geometries and their intersection are of the + same dimension. + */ + int d = dimension(); - int a = lb+rb+rt+lt; - return (a>0) && (a<4) && (!within(mbr)); + if (d != mbr->dimension() || d <= 0 || contains(mbr) || within(mbr)) + return 0; + + MBR intersection(max(xmin, mbr->xmin), max(ymin, mbr->ymin), + min(xmax, mbr->xmax), min(ymax, mbr->ymax)); + + return (d == intersection.dimension()); } }; From 7cf2e15dc515e75585b616ee89293ac492ee8b54 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 19:30:25 -0400 Subject: [PATCH 031/153] bug#26346 Fix to a memory leak found by a complier warning. --- client/mysqldump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index c1bb81341ce..f4d56ecc0b0 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1528,11 +1528,11 @@ static uint dump_events_for_db(char *db) fprintf(sql_file, "/*!50106 %s */ %s\n", row[3], delimiter); } } /* end of event printing */ + mysql_free_result(event_res); + } /* end of list of events */ fprintf(sql_file, "DELIMITER ;\n"); fprintf(sql_file, "/*!50106 SET TIME_ZONE= @save_time_zone */ ;\n"); - - mysql_free_result(event_res); } mysql_free_result(event_list_res); From 1801bff37e57afe7e0eb2fa4015862d8e4fc58ef Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 23 Mar 2007 18:02:37 -0600 Subject: [PATCH 032/153] Bug #24588: "MBROverlaps missing in 5.1?" The MBR-prefixed function aliases (e.g., MBROVERLAPS()) were missing in 5.1, after some code refactoring left them out. This simply adds them into the func_array list. sql/item_create.cc: Add MBR* functions to func_array[]; the non-MBR-prefixed aliases were already there --- sql/item_create.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql/item_create.cc b/sql/item_create.cc index 6a1e87a3aae..0c3870883c2 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -4792,6 +4792,12 @@ static Native_func_registry func_array[] = { C_STRING_WITH_LEN("MAKE_SET"), BUILDER(Create_func_make_set)}, { C_STRING_WITH_LEN("MASTER_POS_WAIT"), BUILDER(Create_func_master_pos_wait)}, { C_STRING_WITH_LEN("MBRCONTAINS"), GEOM_BUILDER(Create_func_contains)}, + { C_STRING_WITH_LEN("MBRDISJOINT"), GEOM_BUILDER(Create_func_disjoint)}, + { C_STRING_WITH_LEN("MBREQUAL"), GEOM_BUILDER(Create_func_equals)}, + { C_STRING_WITH_LEN("MBRINTERSECTS"), GEOM_BUILDER(Create_func_intersects)}, + { C_STRING_WITH_LEN("MBROVERLAPS"), GEOM_BUILDER(Create_func_overlaps)}, + { C_STRING_WITH_LEN("MBRTOUCHES"), GEOM_BUILDER(Create_func_touches)}, + { C_STRING_WITH_LEN("MBRWITHIN"), GEOM_BUILDER(Create_func_within)}, { C_STRING_WITH_LEN("MD5"), BUILDER(Create_func_md5)}, { C_STRING_WITH_LEN("MLINEFROMTEXT"), GEOM_BUILDER(Create_func_geometry_from_text)}, { C_STRING_WITH_LEN("MLINEFROMWKB"), GEOM_BUILDER(Create_func_geometry_from_wkb)}, From d9b8e466bf8258f94ed69a7771d9098d3185fa11 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 24 Mar 2007 13:13:54 +0300 Subject: [PATCH 033/153] Remove files that were checked in by mistake. BitKeeper/deleted/.del-events_restart_phase0.log: Delete: mysql-test/t/events_restart_phase0.log BitKeeper/deleted/.del-events_restart_phase0.result: Delete: mysql-test/t/events_restart_phase0.result BitKeeper/deleted/.del-events_restart_phase0.result~7954c29cea87c6f7: Delete: mysql-test/r/events_restart_phase0.result --- mysql-test/r/events_restart_phase0.result | 22 ---------------------- mysql-test/t/events_restart_phase0.log | 22 ---------------------- mysql-test/t/events_restart_phase0.result | 22 ---------------------- 3 files changed, 66 deletions(-) delete mode 100644 mysql-test/r/events_restart_phase0.result delete mode 100644 mysql-test/t/events_restart_phase0.log delete mode 100644 mysql-test/t/events_restart_phase0.result diff --git a/mysql-test/r/events_restart_phase0.result b/mysql-test/r/events_restart_phase0.result deleted file mode 100644 index 218b804a302..00000000000 --- a/mysql-test/r/events_restart_phase0.result +++ /dev/null @@ -1,22 +0,0 @@ -SHOW VARIABLES LIKE 'event%'; -Variable_name Value -event_scheduler DISABLED -SELECT @@global.event_scheduler; -@@global.event_scheduler -DISABLED -SET GLOBAL event_scheduler=on; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=off; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=0; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=1; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=2; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of '2' -SET GLOBAL event_scheduler=SUSPEND; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPEND' -SET GLOBAL event_scheduler=SUSPENDED; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPENDED' -SET GLOBAL event_scheduler=disabled; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled' diff --git a/mysql-test/t/events_restart_phase0.log b/mysql-test/t/events_restart_phase0.log deleted file mode 100644 index 218b804a302..00000000000 --- a/mysql-test/t/events_restart_phase0.log +++ /dev/null @@ -1,22 +0,0 @@ -SHOW VARIABLES LIKE 'event%'; -Variable_name Value -event_scheduler DISABLED -SELECT @@global.event_scheduler; -@@global.event_scheduler -DISABLED -SET GLOBAL event_scheduler=on; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=off; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=0; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=1; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=2; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of '2' -SET GLOBAL event_scheduler=SUSPEND; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPEND' -SET GLOBAL event_scheduler=SUSPENDED; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPENDED' -SET GLOBAL event_scheduler=disabled; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled' diff --git a/mysql-test/t/events_restart_phase0.result b/mysql-test/t/events_restart_phase0.result deleted file mode 100644 index 218b804a302..00000000000 --- a/mysql-test/t/events_restart_phase0.result +++ /dev/null @@ -1,22 +0,0 @@ -SHOW VARIABLES LIKE 'event%'; -Variable_name Value -event_scheduler DISABLED -SELECT @@global.event_scheduler; -@@global.event_scheduler -DISABLED -SET GLOBAL event_scheduler=on; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=off; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=0; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=1; -ERROR HY000: The MySQL server is running with the --event-scheduler=DISABLED option so it cannot execute this statement -SET GLOBAL event_scheduler=2; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of '2' -SET GLOBAL event_scheduler=SUSPEND; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPEND' -SET GLOBAL event_scheduler=SUSPENDED; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'SUSPENDED' -SET GLOBAL event_scheduler=disabled; -ERROR 42000: Variable 'event_scheduler' can't be set to the value of 'disabled' From 9b2e0127f02209a6e93fb3dcf2755b7abaf1d097 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 26 Mar 2007 12:56:41 +0500 Subject: [PATCH 034/153] Fix for bug #25993: mysqldump crashes with merge table and -c option opt_complete_insert was improperly used by accident. Use complete_insert flag instead. client/mysqldump.c: Fix for bug #25993: mysqldump crashes with merge table and -c option - use complete_insert instead of opt_complete_insert. mysql-test/r/mysqldump.result: Fix for bug #25993: mysqldump crashes with merge table and -c option - test result. mysql-test/t/mysqldump.test: Fix for bug #25993: mysqldump crashes with merge table and -c option - test case. --- client/mysqldump.c | 6 ++--- mysql-test/r/mysqldump.result | 47 +++++++++++++++++++++++++++++++++++ mysql-test/t/mysqldump.test | 10 ++++++++ 3 files changed, 60 insertions(+), 3 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index effeaf68597..1db6a6b4e2b 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -1857,7 +1857,7 @@ static uint get_table_structure(char *table, char *db, char *table_type, dynstr_append_checked(&insert_pat, insert_option); dynstr_append_checked(&insert_pat, "INTO "); dynstr_append_checked(&insert_pat, result_table); - if (opt_complete_insert) + if (complete_insert) dynstr_append_checked(&insert_pat, " ("); else { @@ -1881,7 +1881,7 @@ static uint get_table_structure(char *table, char *db, char *table_type, dynstr_append_checked(&insert_pat, ", "); } init=1; - if (opt_complete_insert) + if (complete_insert) dynstr_append_checked(&insert_pat, quote_name(row[SHOW_FIELDNAME], name_buff, 0)); if (!opt_no_create_info) @@ -2039,7 +2039,7 @@ continue_xml: check_io(sql_file); } } - if (opt_complete_insert) + if (complete_insert) { dynstr_append_checked(&insert_pat, ") VALUES "); if (!extended_insert) diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index df2effb2a72..6b915d88df5 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -3212,6 +3212,53 @@ CREATE TABLE t1(a int); INSERT INTO t1 VALUES (1), (2); mysqldump: Input filename or options too long: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa DROP TABLE t1; +CREATE TABLE t2 (a int); +CREATE TABLE t3 (a int); +CREATE TABLE t1 (a int) ENGINE=merge UNION=(t2, t3); + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `t1`; +CREATE TABLE `t1` ( + `a` int(11) default NULL +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t2`,`t3`); +DROP TABLE IF EXISTS `t2`; +CREATE TABLE `t2` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +LOCK TABLES `t2` WRITE; +/*!40000 ALTER TABLE `t2` DISABLE KEYS */; +/*!40000 ALTER TABLE `t2` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `t3`; +CREATE TABLE `t3` ( + `a` int(11) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +LOCK TABLES `t3` WRITE; +/*!40000 ALTER TABLE `t3` DISABLE KEYS */; +/*!40000 ALTER TABLE `t3` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +DROP TABLE t1, t2, t3; # # End of 5.0 tests # diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 0b943e31fdb..5247bbee59c 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1453,6 +1453,16 @@ INSERT INTO t1 VALUES (1), (2); DROP TABLE t1; +# +# Bug #25993: crashe with a merge table and -c +# + +CREATE TABLE t2 (a int); +CREATE TABLE t3 (a int); +CREATE TABLE t1 (a int) ENGINE=merge UNION=(t2, t3); +--exec $MYSQL_DUMP --skip-comments -c test +DROP TABLE t1, t2, t3; + --echo # --echo # End of 5.0 tests --echo # From 27c1d3e76d8d628120b7678a2e054d71a3721961 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 26 Mar 2007 13:20:34 +0500 Subject: [PATCH 035/153] after-merge fix: result adjusted. --- mysql-test/r/mysqldump.result | 47 +++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 57fa2e71bc7..c274b1073e7 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -3211,6 +3211,53 @@ CREATE TABLE t1(a int); INSERT INTO t1 VALUES (1), (2); mysqldump: Input filename or options too long: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa DROP TABLE t1; +CREATE TABLE t2 (a int); +CREATE TABLE t3 (a int); +CREATE TABLE t1 (a int) ENGINE=merge UNION=(t2, t3); + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; +DROP TABLE IF EXISTS `t1`; +CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL +) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t2`,`t3`); +DROP TABLE IF EXISTS `t2`; +CREATE TABLE `t2` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +LOCK TABLES `t2` WRITE; +/*!40000 ALTER TABLE `t2` DISABLE KEYS */; +/*!40000 ALTER TABLE `t2` ENABLE KEYS */; +UNLOCK TABLES; +DROP TABLE IF EXISTS `t3`; +CREATE TABLE `t3` ( + `a` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1; + +LOCK TABLES `t3` WRITE; +/*!40000 ALTER TABLE `t3` DISABLE KEYS */; +/*!40000 ALTER TABLE `t3` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +DROP TABLE t1, t2, t3; # # End of 5.0 tests # From 3d90a07a0666877448c5662aa5dc8b2561d2d4fb Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 26 Mar 2007 13:31:23 +0400 Subject: [PATCH 036/153] Fix for bug #26844 "Memory allocation failures ignored by slave IO thread". Pass ME_NOREFRESH flag to an error handler in my_malloc() and _mymalloc() in case of memory allocation failure, so that it gets logged to the error log. mysys/my_malloc.c: Pass ME_NOREFRESH flag to an error handler in my_malloc() in case of memory allocation failure, so that it gets logged to the error log. mysys/safemalloc.c: Pass ME_NOREFRESH flag to an error handler in _mymalloc() in case of memory allocation failure, so that it gets logged to the error log. --- mysys/my_malloc.c | 2 +- mysys/safemalloc.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c index 3baf55d4c57..38d0263b495 100644 --- a/mysys/my_malloc.c +++ b/mysys/my_malloc.c @@ -37,7 +37,7 @@ gptr my_malloc(unsigned int size, myf my_flags) if (my_flags & MY_FAE) error_handler_hook=fatal_error_handler_hook; if (my_flags & (MY_FAE+MY_WME)) - my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_WAITTANG),size); + my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_WAITTANG+ME_NOREFRESH),size); if (my_flags & MY_FAE) exit(1); } diff --git a/mysys/safemalloc.c b/mysys/safemalloc.c index f43c860adb0..a7d8f372151 100644 --- a/mysys/safemalloc.c +++ b/mysys/safemalloc.c @@ -150,11 +150,11 @@ gptr _mymalloc(uint size, const char *filename, uint lineno, myf MyFlags) char buff[SC_MAXWIDTH]; my_errno=errno; sprintf(buff,"Out of memory at line %d, '%s'", lineno, filename); - my_message(EE_OUTOFMEMORY,buff,MYF(ME_BELL+ME_WAITTANG)); + my_message(EE_OUTOFMEMORY, buff, MYF(ME_BELL+ME_WAITTANG+ME_NOREFRESH)); sprintf(buff,"needed %d byte (%ldk), memory in use: %ld bytes (%ldk)", size, (size + 1023L) / 1024L, sf_malloc_max_memory, (sf_malloc_max_memory + 1023L) / 1024L); - my_message(EE_OUTOFMEMORY,buff,MYF(ME_BELL+ME_WAITTANG)); + my_message(EE_OUTOFMEMORY, buff, MYF(ME_BELL+ME_WAITTANG+ME_NOREFRESH)); } DBUG_PRINT("error",("Out of memory, in use: %ld at line %d, '%s'", sf_malloc_max_memory,lineno, filename)); From ceb74b353e8ce6bac759c81c8076a3888392d465 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 18:39:11 +0500 Subject: [PATCH 037/153] Bug #27359 Partition: memory allocation error message if ndbcluster's nodes aren't set, the handlerton can return zero partitions in the partitioned table. So we should check for that. sql/partition_info.cc: check for zero return added mysql-test/r/ndb_partition_error2.result: New BitKeeper file ``mysql-test/r/ndb_partition_error2.result'' mysql-test/t/ndb_partition_error2-master.opt: New BitKeeper file ``mysql-test/t/ndb_partition_error2-master.opt'' mysql-test/t/ndb_partition_error2.test: New BitKeeper file ``mysql-test/t/ndb_partition_error2.test'' --- mysql-test/r/ndb_partition_error2.result | 3 +++ mysql-test/t/ndb_partition_error2-master.opt | 1 + mysql-test/t/ndb_partition_error2.test | 14 ++++++++++++++ sql/partition_info.cc | 6 +++++- 4 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 mysql-test/r/ndb_partition_error2.result create mode 100644 mysql-test/t/ndb_partition_error2-master.opt create mode 100644 mysql-test/t/ndb_partition_error2.test diff --git a/mysql-test/r/ndb_partition_error2.result b/mysql-test/r/ndb_partition_error2.result new file mode 100644 index 00000000000..fd477306858 --- /dev/null +++ b/mysql-test/r/ndb_partition_error2.result @@ -0,0 +1,3 @@ +drop table if exists t1; +create table t1 (s1 int) engine=ndbcluster; +ERROR HY000: For the partitioned engine it is necessary to define all partition diff --git a/mysql-test/t/ndb_partition_error2-master.opt b/mysql-test/t/ndb_partition_error2-master.opt new file mode 100644 index 00000000000..955f7692c8b --- /dev/null +++ b/mysql-test/t/ndb_partition_error2-master.opt @@ -0,0 +1 @@ +--ndbcluster diff --git a/mysql-test/t/ndb_partition_error2.test b/mysql-test/t/ndb_partition_error2.test new file mode 100644 index 00000000000..afedd0e3c5c --- /dev/null +++ b/mysql-test/t/ndb_partition_error2.test @@ -0,0 +1,14 @@ +disable_query_log; +--require r/true.require +select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster'; +enable_query_log; + +--disable_warnings +drop table if exists t1; +--enable_warnings +# +# Bug #27359 Partitions: memory allocation error message +# +--error ER_PARTITION_NOT_DEFINED_ERROR +create table t1 (s1 int) engine=ndbcluster; + diff --git a/sql/partition_info.cc b/sql/partition_info.cc index a7f9bd413c6..39aa3a6db92 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -753,7 +753,11 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, } if (unlikely(set_up_defaults_for_partitioning(file, info, (uint)0))) goto end; - tot_partitions= get_tot_partitions(); + if (!(tot_partitions= get_tot_partitions())) + { + my_error(ER_PARTITION_NOT_DEFINED_ERROR, MYF(0), "partitions"); + goto end; + } if (unlikely(tot_partitions > MAX_PARTITIONS)) { my_error(ER_TOO_MANY_PARTITIONS_ERROR, MYF(0)); From 60fb9a03a4e94e651ba459e60bebf38e1de86344 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 11:30:53 -0400 Subject: [PATCH 038/153] Bug#26600: table PROFILING in INFORMATION SCHEMA has wrong data type Bug#27047[partial]: INFORMATION_SCHEMA table cannot have BIGINT \ fields No Information_schema table has ever needed floating-point data before. Transforming all floating point to a string and back to a number causes a real data problem on Windows, where the libc may pad the exponent with more leading zeroes than we expect and the significant digits are truncated away. This also makes interpreting an unimplemented type as a string into a fatal error in debug builds. Thus, we will catch problems when we try to use those types in new I_S tables. sql/sql_show.cc: Add floating-point types to information_schema output. --- sql/sql_show.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 659dd49d537..d9984552048 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3592,7 +3592,16 @@ TABLE *create_schema_table(THD *thd, TABLE_LIST *table_list) DBUG_RETURN(0); } break; + case MYSQL_TYPE_FLOAT: + case MYSQL_TYPE_DOUBLE: + if ((item= new Item_float(fields_info->field_name, 0.0, NOT_FIXED_DEC, + fields_info->field_length)) == NULL) + DBUG_RETURN(NULL); + break; default: + /* Don't let unimplemented types pass through. Could be a grave error. */ + DBUG_ASSERT(fields_info->field_type == MYSQL_TYPE_STRING); + /* this should be changed when Item_empty_string is fixed(in 4.1) */ if (!(item= new Item_empty_string("", 0, cs))) { From e4dcf4e39c51d9045564163b6bc442bd7307a9f6 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 18:05:17 +0200 Subject: [PATCH 039/153] Corrected error in test case: - 1.84e+15 converted to unsigned bigint should be 18400000000000000000 < 18446744073709551615. - The test will still fail on windows, and is extracted into a new bug report. --- mysql-test/r/sp.result | 3 --- mysql-test/t/sp.test | 1 - 2 files changed, 4 deletions(-) diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index a30584b3ef2..c75697b93a2 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -6018,9 +6018,6 @@ upper bounds unsigned bigint + 1 select bug20777(-1) as 'lower bounds unsigned bigint - 1'; lower bounds unsigned bigint - 1 0 -select bug20777(1.84e+19) as 'submitter value, 1.84e19'; -submitter value, 1.84e19 -9223372036854775808 create table examplebug20777 as select 0 as 'i', bug20777(9223372036854775806) as '2**63-2', diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index ca506104ab7..8403c8589ef 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -6955,7 +6955,6 @@ select bug20777(0) as 'lower bounds unsigned bigint'; select bug20777(18446744073709551615) as 'upper bounds unsigned bigint'; select bug20777(18446744073709551616) as 'upper bounds unsigned bigint + 1'; select bug20777(-1) as 'lower bounds unsigned bigint - 1'; -select bug20777(1.84e+19) as 'submitter value, 1.84e19'; create table examplebug20777 as select 0 as 'i', From 66fcdd5403ba20a9f9f760c545fe49a297188f96 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 20:27:58 +0400 Subject: [PATCH 040/153] Change find_type family to accept const TYPELIB*. include/mysql_h.ic: Change find_type family to accept const TYPELIB*. This sort of change can not break the ABI. --- include/mysql_h.ic | 2 +- include/typelib.h | 3 ++- mysys/typelib.c | 2 +- sql/mysql_priv.h | 6 ++++-- sql/strfunc.cc | 6 ++++-- 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/include/mysql_h.ic b/include/mysql_h.ic index 44c51b34c1d..7d16a886fd8 100644 --- a/include/mysql_h.ic +++ b/include/mysql_h.ic @@ -638,7 +638,7 @@ extern TYPELIB * copy_typelib(MEM_ROOT * root, TYPELIB * from); # 415 "mysql_com.h" extern void create_random_string(char * to, unsigned int, struct rand_struct * rand_st); # 30 "typelib.h" -extern int find_type(char * x, TYPELIB * typelib, unsigned int); +extern int find_type(char * x, const TYPELIB * typelib, unsigned int); # 429 "mysql_com.h" extern void get_salt_from_password(unsigned char * res, char const * password); # 422 "mysql_com.h" diff --git a/include/typelib.h b/include/typelib.h index 75d170e59d3..79d3acd2d64 100644 --- a/include/typelib.h +++ b/include/typelib.h @@ -26,7 +26,8 @@ typedef struct st_typelib { /* Different types saved here */ unsigned int *type_lengths; } TYPELIB; -extern int find_type(char *x,TYPELIB *typelib,unsigned int full_name); +extern int find_type(const char *x, const TYPELIB *typelib, + unsigned int full_name); extern void make_type(char *to,unsigned int nr,TYPELIB *typelib); extern const char *get_type(TYPELIB *typelib,unsigned int nr); extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from); diff --git a/mysys/typelib.c b/mysys/typelib.c index 4fab6f20493..97b03b72b24 100644 --- a/mysys/typelib.c +++ b/mysys/typelib.c @@ -42,7 +42,7 @@ >0 Offset+1 in typelib for matched string */ -int find_type(my_string x, TYPELIB *typelib, uint full_name) +int find_type(const char *x, const TYPELIB *typelib, uint full_name) { int find,pos,findpos; reg1 my_string i; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 608fb697d4f..81c82cf3ac8 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -1561,8 +1561,10 @@ extern bool check_reserved_words(LEX_STRING *name); /* strfunc.cc */ ulonglong find_set(TYPELIB *lib, const char *x, uint length, CHARSET_INFO *cs, char **err_pos, uint *err_len, bool *set_warning); -uint find_type(TYPELIB *lib, const char *find, uint length, bool part_match); -uint find_type2(TYPELIB *lib, const char *find, uint length, CHARSET_INFO *cs); +uint find_type(const TYPELIB *lib, const char *find, uint length, + bool part_match); +uint find_type2(const TYPELIB *lib, const char *find, uint length, + CHARSET_INFO *cs); void unhex_type2(TYPELIB *lib); uint check_word(TYPELIB *lib, const char *val, const char *end, const char **end_of_word); diff --git a/sql/strfunc.cc b/sql/strfunc.cc index 71b52a5145d..9ffc5fd127f 100644 --- a/sql/strfunc.cc +++ b/sql/strfunc.cc @@ -104,7 +104,8 @@ ulonglong find_set(TYPELIB *lib, const char *str, uint length, CHARSET_INFO *cs, > 0 position in TYPELIB->type_names +1 */ -uint find_type(TYPELIB *lib, const char *find, uint length, bool part_match) +uint find_type(const TYPELIB *lib, const char *find, uint length, + bool part_match) { uint found_count=0, found_pos=0; const char *end= find+length; @@ -144,7 +145,8 @@ uint find_type(TYPELIB *lib, const char *find, uint length, bool part_match) >0 Offset+1 in typelib for matched string */ -uint find_type2(TYPELIB *typelib, const char *x, uint length, CHARSET_INFO *cs) +uint find_type2(const TYPELIB *typelib, const char *x, uint length, + CHARSET_INFO *cs) { int pos; const char *j; From 609277f942e5479976d5a1f31da55fd2cf646109 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 12:31:44 -0400 Subject: [PATCH 041/153] Bug#23491 MySQLDump prefix function call in a view by database name - mysqldump executes a SHOW CREATE VIEW statement to generate the text that it outputs. When the function name is retrieved it's database name is unconditionally prepended. This change causes the function's database name to be prepended only when it was used to define the function. mysql-test/r/information_schema.result: Bug#23491 MySQLDump prefix function call in a view by database name - Updated Results. mysql-test/r/mysqldump.result: Bug#23491 MySQLDump prefix function call in a view by database name - Added new results. mysql-test/r/sp-code.result: Bug#23491 MySQLDump prefix function call in a view by database name - Updated Results. mysql-test/r/udf.result: Bug#23491 MySQLDump prefix function call in a view by database name - Updated Results. mysql-test/t/mysqldump.test: Bug#23491 MySQLDump prefix function call in a view by database name - Added new testcase. sql/item_func.cc: Bug#23491 MySQLDump prefix function call in a view by database name - Use new m_explicit_name member when deciding whether or not to prepend the db name while building the function name. sql/sp.cc: Bug#23491 MySQLDump prefix function call in a view by database name - Use new sp_name constructor. sql/sp_head.h: Bug#23491 MySQLDump prefix function call in a view by database name - Add m_explicit_name member to sp_name object. - Redefined sp_name constructor to include new member. sql/sql_yacc.yy: Bug#23491 MySQLDump prefix function call in a view by database name - Use new sp_name constructors. --- mysql-test/r/information_schema.result | 2 +- mysql-test/r/mysqldump.result | 23 ++++++++++++++++++ mysql-test/r/sp-code.result | 2 +- mysql-test/r/udf.result | 2 +- mysql-test/t/mysqldump.test | 32 ++++++++++++++++++++++++++ sql/item_func.cc | 9 +++++--- sql/sp.cc | 2 +- sql/sp_head.h | 6 +++-- sql/sql_yacc.yy | 8 +++---- 9 files changed, 73 insertions(+), 13 deletions(-) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 436bb70d0e7..db703df1f52 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -687,7 +687,7 @@ Warnings: Warning 1356 View 'test.v2' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them show create table v3; View Create View -v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `test`.`sub1`(1) AS `c` +v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `sub1`(1) AS `c` Warnings: Warning 1356 View 'test.v3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them drop view v2; diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 2d32984e4ef..fd0ddae538a 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -3218,5 +3218,28 @@ INSERT INTO t1 VALUES(1,0xff00fef0); DROP TABLE t1; # +# Bug #23491: MySQLDump prefix function call in a view by database name +# +create database bug23491_original; +create database bug23491_restore; +use bug23491_original; +create table t1 (c1 int); +create view v1 as select * from t1; +create procedure p1() select 1; +create function f1() returns int return 1; +create view v2 as select f1(); +create function f2() returns int return f1(); +create view v3 as select bug23491_original.f1(); +use bug23491_restore; +show create view bug23491_restore.v2; +View Create View +v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `f1`() AS `f1()` +show create view bug23491_restore.v3; +View Create View +v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `bug23491_original`.`f1`() AS `bug23491_original.f1()` +drop database bug23491_original; +drop database bug23491_restore; +use test; +# # End of 5.0 tests # diff --git a/mysql-test/r/sp-code.result b/mysql-test/r/sp-code.result index 67b030f87a4..9d86a6bc08d 100644 --- a/mysql-test/r/sp-code.result +++ b/mysql-test/r/sp-code.result @@ -187,7 +187,7 @@ Pos Instruction 32 set v_dig@4 (v_dig@4 + 1) 33 stmt 4 "update sudoku_work set dig = v_dig wh..." 34 set v_tcounter@6 (v_tcounter@6 + 1) -35 jump_if_not 37(37) (not(`test`.`sudoku_digit_ok`(v_row@7,v_col@8,v_dig@4))) +35 jump_if_not 37(37) (not(`sudoku_digit_ok`(v_row@7,v_col@8,v_dig@4))) 36 jump 15 37 set v_i@3 (v_i@3 + 1) 38 jump 15 diff --git a/mysql-test/r/udf.result b/mysql-test/r/udf.result index d5f59247084..7c52e7da496 100644 --- a/mysql-test/r/udf.result +++ b/mysql-test/r/udf.result @@ -159,7 +159,7 @@ EXPLAIN EXTENDED SELECT myfunc_int(fn(MIN(b))) as c FROM t1 GROUP BY a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort Warnings: -Note 1003 select myfunc_int(`test`.`fn`(min(`test`.`t1`.`b`)) AS `fn(MIN(b))`) AS `c` from `test`.`t1` group by `test`.`t1`.`a` +Note 1003 select myfunc_int(`fn`(min(`test`.`t1`.`b`)) AS `fn(MIN(b))`) AS `c` from `test`.`t1` group by `test`.`t1`.`a` EXPLAIN EXTENDED SELECT myfunc_int(test.fn(MIN(b))) as c FROM t1 GROUP BY a; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using temporary; Using filesort diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 31741cdba9f..d1d3aae5eb7 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -1429,6 +1429,38 @@ INSERT INTO t1 VALUES(1,0xff00fef0); DROP TABLE t1; +--echo # +--echo # Bug #23491: MySQLDump prefix function call in a view by database name +--echo # + +# Setup +create database bug23491_original; +create database bug23491_restore; +use bug23491_original; +create table t1 (c1 int); +create view v1 as select * from t1; +create procedure p1() select 1; +create function f1() returns int return 1; +create view v2 as select f1(); +create function f2() returns int return f1(); +create view v3 as select bug23491_original.f1(); + +# Backup. +--exec $MYSQL_DUMP --skip-comments -uroot --opt --routines bug23491_original > $MYSQLTEST_VARDIR/tmp/bug23491_backup.sql; + +# Restore. +--exec $MYSQL bug23491_restore < $MYSQLTEST_VARDIR/tmp/bug23491_backup.sql; + +# Verify +use bug23491_restore; +show create view bug23491_restore.v2; +show create view bug23491_restore.v3; + +# Cleanup +drop database bug23491_original; +drop database bug23491_restore; +use test; + --echo # --echo # End of 5.0 tests --echo # diff --git a/sql/item_func.cc b/sql/item_func.cc index e8ecd6b8f1c..44daab91244 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -5034,7 +5034,7 @@ Item_func_sp::func_name() const { THD *thd= current_thd; /* Calculate length to avoid reallocation of string for sure */ - uint len= ((m_name->m_db.length + + uint len= ((m_name->m_explicit_name ? m_name->m_db.length : 0 + m_name->m_name.length)*2 + //characters*quoting 2 + // ` and ` 1 + // . @@ -5044,8 +5044,11 @@ Item_func_sp::func_name() const system_charset_info); qname.length(0); - append_identifier(thd, &qname, m_name->m_db.str, m_name->m_db.length); - qname.append('.'); + if (m_name->m_explicit_name) + { + append_identifier(thd, &qname, m_name->m_db.str, m_name->m_db.length); + qname.append('.'); + } append_identifier(thd, &qname, m_name->m_name.str, m_name->m_name.length); return qname.ptr(); } diff --git a/sql/sp.cc b/sql/sp.cc index 2bb13b02e14..c8701aa2c87 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -1068,7 +1068,7 @@ sp_exist_routines(THD *thd, TABLE_LIST *routines, bool any, bool no_error) lex_name.length= strlen(routine->table_name); lex_db.str= thd->strmake(routine->db, lex_db.length); lex_name.str= thd->strmake(routine->table_name, lex_name.length); - name= new sp_name(lex_db, lex_name); + name= new sp_name(lex_db, lex_name, true); name->init_qname(thd); sp_object_found= sp_find_routine(thd, TYPE_ENUM_PROCEDURE, name, &thd->sp_proc_cache, FALSE) != NULL || diff --git a/sql/sp_head.h b/sql/sp_head.h index 10eada43721..e0622e0b776 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -59,9 +59,10 @@ public: calling set_routine_type(). */ LEX_STRING m_sroutines_key; + bool m_explicit_name; /**< Prepend the db name? */ - sp_name(LEX_STRING db, LEX_STRING name) - : m_db(db), m_name(name) + sp_name(LEX_STRING db, LEX_STRING name, bool use_explicit_name) + : m_db(db), m_name(name), m_explicit_name(use_explicit_name) { m_qname.str= m_sroutines_key.str= 0; m_qname.length= m_sroutines_key.length= 0; @@ -79,6 +80,7 @@ public: m_name.length= m_qname.length= key_len - 1; m_db.str= 0; m_db.length= 0; + m_explicit_name= false; } // Init. the qualified name from the db and name. diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 258283d113e..ac5adb0d832 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1577,7 +1577,7 @@ sp_name: my_error(ER_SP_WRONG_NAME, MYF(0), $3.str); MYSQL_YYABORT; } - $$= new sp_name($1, $3); + $$= new sp_name($1, $3, true); $$->init_qname(YYTHD); } | ident @@ -1591,7 +1591,7 @@ sp_name: } if (thd->copy_db_to(&db.str, &db.length)) MYSQL_YYABORT; - $$= new sp_name(db, $1); + $$= new sp_name(db, $1, false); if ($$) $$->init_qname(YYTHD); } @@ -5052,7 +5052,7 @@ simple_expr: | ident '.' ident '(' opt_expr_list ')' { LEX *lex= Lex; - sp_name *name= new sp_name($1, $3); + sp_name *name= new sp_name($1, $3, true); name->init_qname(YYTHD); sp_add_used_routine(lex, YYTHD, name, TYPE_ENUM_FUNCTION); @@ -5167,7 +5167,7 @@ simple_expr: LEX_STRING db; if (thd->copy_db_to(&db.str, &db.length)) MYSQL_YYABORT; - sp_name *name= new sp_name(db, $1); + sp_name *name= new sp_name(db, $1, false); if (name) name->init_qname(thd); From afac8bcce1ebcaa780b33bcdf3917c839cda348c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 18:46:53 +0200 Subject: [PATCH 042/153] manual merge mysql-test/r/sp.result: Corrected error in test case: - 1.84e+19 converted to unsigned bigint should be converted to 1840000000000000000 < 18446744073709551615. - This fails on windows and the failing test is extracted to a new bugreport. --- mysql-test/r/sp.result | 3 --- 1 file changed, 3 deletions(-) diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 954249a99ce..04e1be9f9f7 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -6110,9 +6110,6 @@ upper bounds unsigned bigint + 1 select bug20777(-1) as 'lower bounds unsigned bigint - 1'; lower bounds unsigned bigint - 1 0 -select bug20777(1.84e+19) as 'submitter value, 1.84e19'; -submitter value, 1.84e19 -9223372036854775808 create table examplebug20777 as select 0 as 'i', bug20777(9223372036854775806) as '2**63-2', From f5940fe904186aa196ffc0084d9c81db7492d222 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 21:09:56 +0400 Subject: [PATCH 043/153] Remove unnecessary casts to uchar. The casts are stemming from the lexer API which internally uses unsigned char variables to address its state map. The implementation of the lexer should be internal to the lexer, and not influence the rest of the code. sql/event_data_objects.cc: Clean up unnecessary type casts. sql/event_data_objects.h: Clean up unnecessary type casts. sql/ha_ndbcluster.cc: Clean up unnecessary type casts. sql/mysql_priv.h: Clean up unnecessary type casts. sql/partition_info.h: Clean up unnecessary type casts. sql/sp.cc: Clean up unnecessary type casts. sql/sp_head.cc: Clean up unnecessary type casts. sql/sp_head.h: Clean up unnecessary type casts. sql/sql_lex.cc: Clean up unnecessary type casts. sql/sql_lex.h: Clean up unnecessary type casts. sql/sql_parse.cc: Clean up unnecessary type casts. sql/sql_partition.cc: Clean up unnecessary type casts. sql/sql_partition.h: Clean up unnecessary type casts. sql/sql_prepare.cc: Clean up unnecessary type casts. sql/sql_trigger.cc: Clean up unnecessary type casts. sql/sql_view.cc: Clean up unnecessary type casts. sql/sql_yacc.yy: Clean up unnecessary type casts. sql/table.cc: Clean up unnecessary type casts. sql/table.h: Clean up unnecessary type casts. --- sql/event_data_objects.cc | 4 +-- sql/event_data_objects.h | 2 +- sql/ha_ndbcluster.cc | 2 +- sql/mysql_priv.h | 2 +- sql/partition_info.h | 2 +- sql/sp.cc | 2 +- sql/sp_head.cc | 9 +++---- sql/sp_head.h | 4 +-- sql/sql_lex.cc | 56 ++++++++++++++++----------------------- sql/sql_lex.h | 18 ++++++------- sql/sql_parse.cc | 8 +++--- sql/sql_partition.cc | 6 ++--- sql/sql_partition.h | 4 +-- sql/sql_prepare.cc | 2 +- sql/sql_trigger.cc | 2 +- sql/sql_view.cc | 10 +++---- sql/sql_yacc.yy | 16 +++++------ sql/table.cc | 6 ++--- sql/table.h | 4 +-- 19 files changed, 73 insertions(+), 86 deletions(-) diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index c3ac488fb14..e87a78a5e37 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -168,7 +168,7 @@ Event_parse_data::init_body(THD *thd) (long) body_begin, (long) thd->lex->ptr)); body.length= thd->lex->ptr - body_begin; - const uchar *body_end= body_begin + body.length - 1; + const char *body_end= body_begin + body.length - 1; /* Trim nuls or close-comments ('*'+'/') or spaces at the end */ while (body_begin < body_end) @@ -1919,7 +1919,7 @@ Event_job_data::compile(THD *thd, MEM_ROOT *mem_root) event_change_security_context(thd, definer_user, definer_host, dbname, &save_ctx); thd->lex= &lex; - mysql_init_query(thd, (uchar*) thd->query, thd->query_length); + mysql_init_query(thd, thd->query, thd->query_length); if (MYSQLparse((void *)thd) || thd->is_fatal_error) { DBUG_PRINT("error", ("error during compile or thd->is_fatal_error: %d", diff --git a/sql/event_data_objects.h b/sql/event_data_objects.h index 513f60df657..358373889e5 100644 --- a/sql/event_data_objects.h +++ b/sql/event_data_objects.h @@ -217,7 +217,7 @@ public: */ bool do_not_create; - const uchar *body_begin; + const char *body_begin; LEX_STRING dbname; LEX_STRING name; diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index bc1c3c8e324..bef58339e5b 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -6339,7 +6339,7 @@ int ndb_create_table_from_engine(THD *thd, const char *db, LEX *old_lex= thd->lex, newlex; thd->lex= &newlex; newlex.current_select= NULL; - lex_start(thd, (const uchar*) "", 0); + lex_start(thd, "", 0); int res= ha_create_table_from_engine(thd, db, table_name); thd->lex= old_lex; return res; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 81c82cf3ac8..f807dcdf21a 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -841,7 +841,7 @@ bool is_update_query(enum enum_sql_command command); bool alloc_query(THD *thd, const char *packet, uint packet_length); void mysql_init_select(LEX *lex); void mysql_reset_thd_for_next_command(THD *thd); -void mysql_init_query(THD *thd, uchar *buf, uint length); +void mysql_init_query(THD *thd, const char *buf, uint length); bool mysql_new_select(LEX *lex, bool move_down); void create_select_for_variable(const char *var_name); void mysql_init_multi_delete(LEX *lex); diff --git a/sql/partition_info.h b/sql/partition_info.h index 8bcc769054f..6c21002c184 100644 --- a/sql/partition_info.h +++ b/sql/partition_info.h @@ -156,7 +156,7 @@ public: char *part_func_string; char *subpart_func_string; - uchar *part_state; + const char *part_state; partition_element *curr_part_elem; partition_element *current_partition; diff --git a/sql/sp.cc b/sql/sp.cc index c1a9aac0c24..d8dd9b3d67e 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -384,7 +384,7 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp, if ((ret= sp_use_new_db(thd, name->m_db, &old_db, 1, &dbchanged))) goto end; - lex_start(thd, (uchar*)defstr.c_ptr(), defstr.length()); + lex_start(thd, defstr.c_ptr(), defstr.length()); thd->spcont= 0; if (MYSQLparse(thd) || thd->is_fatal_error || newlex.sphead == NULL) diff --git a/sql/sp_head.cc b/sql/sp_head.cc index f5e32847fb0..8eeec741dcf 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -541,15 +541,14 @@ void sp_head::init_strings(THD *thd, LEX *lex) { DBUG_ENTER("sp_head::init_strings"); - const uchar *endp; /* Used to trim the end */ + const char *endp; /* Used to trim the end */ /* During parsing, we must use thd->mem_root */ MEM_ROOT *root= thd->mem_root; if (m_param_begin && m_param_end) { m_params.length= m_param_end - m_param_begin; - m_params.str= strmake_root(root, - (char *)m_param_begin, m_params.length); + m_params.str= strmake_root(root, m_param_begin, m_params.length); } /* If ptr has overrun end_of_query then end_of_query is the end */ @@ -561,9 +560,9 @@ sp_head::init_strings(THD *thd, LEX *lex) endp= skip_rear_comments(m_body_begin, endp); m_body.length= endp - m_body_begin; - m_body.str= strmake_root(root, (char *)m_body_begin, m_body.length); + m_body.str= strmake_root(root, m_body_begin, m_body.length); m_defstr.length= endp - lex->buf; - m_defstr.str= strmake_root(root, (char *)lex->buf, m_defstr.length); + m_defstr.str= strmake_root(root, lex->buf, m_defstr.length); DBUG_VOID_RETURN; } diff --git a/sql/sp_head.h b/sql/sp_head.h index 19dc2dac476..9aee9e9389e 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -126,7 +126,7 @@ public: create_field m_return_field_def; /* This is used for FUNCTIONs only. */ - const uchar *m_tmp_query; // Temporary pointer to sub query string + const char *m_tmp_query; // Temporary pointer to sub query string st_sp_chistics *m_chistics; ulong m_sql_mode; // For SHOW CREATE and execution LEX_STRING m_qname; // db.name @@ -174,7 +174,7 @@ public: */ HASH m_sroutines; // Pointers set during parsing - const uchar *m_param_begin, *m_param_end, *m_body_begin; + const char *m_param_begin, *m_param_end, *m_body_begin; /* Security context for stored routine which should be run under diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index ad54289a9cc..26955c18342 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -33,10 +33,10 @@ sys_var *trg_new_row_fake_var= (sys_var*) 0x01; /* Macros to look like lex */ -#define yyGet() *(lex->ptr++) -#define yyGetLast() lex->ptr[-1] -#define yyPeek() lex->ptr[0] -#define yyPeek2() lex->ptr[1] +#define yyGet() ((uchar) *(lex->ptr++)) +#define yyGetLast() ((uchar) lex->ptr[-1]) +#define yyPeek() ((uchar) lex->ptr[0]) +#define yyPeek2() ((uchar) lex->ptr[1]) #define yyUnget() lex->ptr-- #define yySkip() lex->ptr++ #define yyLength() ((uint) (lex->ptr - lex->tok_start)-1) @@ -127,7 +127,7 @@ st_parsing_options::reset() (We already do too much here) */ -void lex_start(THD *thd, const uchar *buf, uint length) +void lex_start(THD *thd, const char *buf, uint length) { LEX *lex= thd->lex; DBUG_ENTER("lex_start"); @@ -238,9 +238,9 @@ void lex_end(LEX *lex) static int find_keyword(LEX *lex, uint len, bool function) { - const uchar *tok=lex->tok_start; + const char *tok= lex->tok_start; - SYMBOL *symbol= get_hash_symbol((const char *)tok,len,function); + SYMBOL *symbol= get_hash_symbol(tok, len, function); if (symbol) { lex->yylval->symbol.symbol=symbol; @@ -305,16 +305,16 @@ static LEX_STRING get_token(LEX *lex,uint length) static LEX_STRING get_quoted_token(LEX *lex,uint length, char quote) { LEX_STRING tmp; - const uchar *from, *end; - uchar *to; + const char *from, *end; + char *to; yyUnget(); // ptr points now after last token char tmp.length=lex->yytoklen=length; tmp.str=(char*) lex->thd->alloc(tmp.length+1); - for (from= lex->tok_start, to= (uchar*) tmp.str, end= to+length ; + for (from= lex->tok_start, to= tmp.str, end= to+length ; to != end ; ) { - if ((*to++= *from++) == (uchar) quote) + if ((*to++= *from++) == quote) from++; // Skip double quotes } *to= 0; // End null for safety @@ -341,9 +341,7 @@ static char *get_text(LEX *lex) { int l; if (use_mb(cs) && - (l = my_ismbchar(cs, - (const char *)lex->ptr-1, - (const char *)lex->end_of_query))) { + (l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query))) { lex->ptr += l-1; continue; } @@ -368,12 +366,12 @@ static char *get_text(LEX *lex) yyUnget(); /* Found end. Unescape and return string */ - const uchar *str, *end; - uchar *start; + const char *str, *end; + char *start; str=lex->tok_start+1; end=lex->ptr-1; - if (!(start=(uchar*) lex->thd->alloc((uint) (end-str)+1))) + if (!(start= (char*) lex->thd->alloc((uint) (end-str)+1))) return (char*) ""; // Sql_alloc has set error flag if (!found_escape) { @@ -383,15 +381,14 @@ static char *get_text(LEX *lex) } else { - uchar *to; + char *to; for (to=start ; str != end ; str++) { #ifdef USE_MB int l; if (use_mb(cs) && - (l = my_ismbchar(cs, - (const char *)str, (const char *)end))) { + (l = my_ismbchar(cs, str, end))) { while (l--) *to++ = *str++; str--; @@ -437,7 +434,7 @@ static char *get_text(LEX *lex) *to=0; lex->yytoklen=(uint) (to-start); } - return (char*) start; + return start; } } return 0; // unexpected end of query @@ -556,7 +553,6 @@ int MYSQLlex(void *arg, void *yythd) lex->yylval=yylval; // The global state - lex->tok_end_prev= lex->tok_end; lex->tok_start_prev= lex->tok_start; lex->tok_start=lex->tok_end=lex->ptr; @@ -640,16 +636,14 @@ int MYSQLlex(void *arg, void *yythd) break; } case MY_LEX_IDENT: - const uchar *start; + const char *start; #if defined(USE_MB) && defined(USE_MB_IDENT) if (use_mb(cs)) { result_state= IDENT_QUOTED; if (my_mbcharlen(cs, yyGetLast()) > 1) { - int l = my_ismbchar(cs, - (const char *)lex->ptr-1, - (const char *)lex->end_of_query); + int l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query); if (l == 0) { state = MY_LEX_CHAR; continue; @@ -661,9 +655,7 @@ int MYSQLlex(void *arg, void *yythd) if (my_mbcharlen(cs, c) > 1) { int l; - if ((l = my_ismbchar(cs, - (const char *)lex->ptr-1, - (const char *)lex->end_of_query)) == 0) + if ((l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query)) == 0) break; lex->ptr += l-1; } @@ -786,9 +778,7 @@ int MYSQLlex(void *arg, void *yythd) if (my_mbcharlen(cs, c) > 1) { int l; - if ((l = my_ismbchar(cs, - (const char *)lex->ptr-1, - (const char *)lex->end_of_query)) == 0) + if ((l = my_ismbchar(cs, lex->ptr-1, lex->end_of_query)) == 0) break; lex->ptr += l-1; } @@ -1122,7 +1112,7 @@ int MYSQLlex(void *arg, void *yythd) Pointer to the last non-comment symbol of the statement. */ -const uchar *skip_rear_comments(const uchar *begin, const uchar *end) +const char *skip_rear_comments(const char *begin, const char *end) { while (begin < end && (end[-1] <= ' ' || end[-1] == '*' || end[-1] == '/' || end[-1] == ';')) diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 13786606412..d8a5a0b04f0 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -542,7 +542,7 @@ public: void set_limit(st_select_lex *values); void set_thd(THD *thd_arg) { thd= thd_arg; } - friend void lex_start(THD *thd, const uchar *buf, uint length); + friend void lex_start(THD *thd, const char *buf, uint length); friend int subselect_union_engine::exec(); List *get_unit_column_types(); @@ -743,7 +743,7 @@ public: void cut_subtree() { slave= 0; } bool test_limit(); - friend void lex_start(THD *thd, const uchar *buf, uint length); + friend void lex_start(THD *thd, const char *buf, uint length); st_select_lex() : n_sum_items(0), n_child_sum_items(0) {} void make_empty_select() { @@ -996,11 +996,11 @@ typedef struct st_lex : public Query_tables_list SELECT_LEX *current_select; /* list of all SELECT_LEX */ SELECT_LEX *all_selects_list; - const uchar *buf; /* The beginning of string, used by SPs */ - const uchar *ptr,*tok_start,*tok_end,*end_of_query; + const char *buf; /* The beginning of string, used by SPs */ + const char *ptr,*tok_start,*tok_end,*end_of_query; - /* The values of tok_start/tok_end as they were one call of MYSQLlex before */ - const uchar *tok_start_prev, *tok_end_prev; + /* The value of tok_start as they were one call of MYSQLlex before */ + const char *tok_start_prev; char *length,*dec,*change; LEX_STRING name; @@ -1202,7 +1202,7 @@ typedef struct st_lex : public Query_tables_list Pointers to part of LOAD DATA statement that should be rewritten during replication ("LOCAL 'filename' REPLACE INTO" part). */ - const uchar *fname_start, *fname_end; + const char *fname_start, *fname_end; /* Reference to a struct that contains information in various commands @@ -1319,10 +1319,10 @@ struct st_lex_local: public st_lex extern void lex_init(void); extern void lex_free(void); -extern void lex_start(THD *thd, const uchar *buf, uint length); +extern void lex_start(THD *thd, const char *buf, uint length); extern void lex_end(LEX *lex); extern int MYSQLlex(void *arg, void *yythd); -extern const uchar *skip_rear_comments(const uchar *ubegin, const uchar *uend); +extern const char *skip_rear_comments(const char *ubegin, const char *uend); extern bool is_lex_native_function(const LEX_STRING *name); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 4c85ba252e5..7720f293b10 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -983,7 +983,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd, break; /* init structures for VIEW processing */ table_list.select_lex= &(thd->lex->select_lex); - mysql_init_query(thd, (uchar*)"", 0); + mysql_init_query(thd, "", 0); thd->lex-> select_lex.table_list.link_in_list((byte*) &table_list, (byte**) &table_list.next_local); @@ -4970,7 +4970,7 @@ bool my_yyoverflow(short **yyss, YYSTYPE **yyvs, ulong *yystacksize) ****************************************************************************/ void -mysql_init_query(THD *thd, uchar *buf, uint length) +mysql_init_query(THD *thd, const char *buf, uint length) { DBUG_ENTER("mysql_init_query"); lex_start(thd, buf, length); @@ -5193,7 +5193,7 @@ void mysql_parse(THD *thd, char *inBuf, uint length) DBUG_EXECUTE_IF("parser_debug", turn_parser_debug_on();); - mysql_init_query(thd, (uchar*) inBuf, length); + mysql_init_query(thd, inBuf, length); if (query_cache_send_result_to_client(thd, inBuf, length) <= 0) { LEX *lex= thd->lex; @@ -5272,7 +5272,7 @@ bool mysql_test_parse_for_slave(THD *thd, char *inBuf, uint length) bool error= 0; DBUG_ENTER("mysql_test_parse_for_slave"); - mysql_init_query(thd, (uchar*) inBuf, length); + mysql_init_query(thd, inBuf, length); if (!MYSQLparse((void*) thd) && ! thd->is_fatal_error && all_tables_not_ok(thd,(TABLE_LIST*) lex->select_lex.table_list.first)) error= 1; /* Ignore question */ diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index dbac53ed5f6..65a10a2120c 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -3700,9 +3700,9 @@ void get_partition_set(const TABLE *table, byte *buf, const uint index, possible to retrace this given an item tree. */ -bool mysql_unpack_partition(THD *thd, const uchar *part_buf, - uint part_info_len, - uchar *part_state, uint part_state_len, +bool mysql_unpack_partition(THD *thd, + const char *part_buf, uint part_info_len, + const char *part_state, uint part_state_len, TABLE* table, bool is_create_table_ind, handlerton *default_db_type) { diff --git a/sql/sql_partition.h b/sql/sql_partition.h index 7ed43527688..e0c0f1c5bd3 100644 --- a/sql/sql_partition.h +++ b/sql/sql_partition.h @@ -77,9 +77,9 @@ void get_full_part_id_from_key(const TABLE *table, byte *buf, KEY *key_info, const key_range *key_spec, part_id_range *part_spec); -bool mysql_unpack_partition(THD *thd, const uchar *part_buf, +bool mysql_unpack_partition(THD *thd, const char *part_buf, uint part_info_len, - uchar *part_state, uint part_state_len, + const char *part_state, uint part_state_len, TABLE *table, bool is_create_table_ind, handlerton *default_db_type); void make_used_partitions_str(partition_info *part_info, String *parts_str); diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc index 37a6f68cfe8..e97670ab2b1 100644 --- a/sql/sql_prepare.cc +++ b/sql/sql_prepare.cc @@ -2850,7 +2850,7 @@ bool Prepared_statement::prepare(const char *packet, uint packet_len) old_stmt_arena= thd->stmt_arena; thd->stmt_arena= this; - lex_start(thd, (uchar*) thd->query, thd->query_length); + lex_start(thd, thd->query, thd->query_length); lex->stmt_prepare_mode= TRUE; error= MYSQLparse((void *)thd) || thd->is_fatal_error || diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 311bd089c64..66132efb8e4 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -976,7 +976,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db, LEX_STRING *trg_definer= it_definer++; thd->variables.sql_mode= (ulong)*trg_sql_mode; - lex_start(thd, (uchar*)trg_create_str->str, trg_create_str->length); + lex_start(thd, trg_create_str->str, trg_create_str->length); thd->spcont= 0; if (MYSQLparse((void *)thd) || thd->is_fatal_error) diff --git a/sql/sql_view.cc b/sql/sql_view.cc index b619e451b22..b0c9de1453c 100644 --- a/sql/sql_view.cc +++ b/sql/sql_view.cc @@ -675,7 +675,7 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view, char md5[MD5_BUFF_LENGTH]; bool can_be_merged; char dir_buff[FN_REFLEN], path_buff[FN_REFLEN]; - const uchar *endp; + const char *endp; LEX_STRING dir, file, path; DBUG_ENTER("mysql_register_view"); @@ -759,9 +759,9 @@ static int mysql_register_view(THD *thd, TABLE_LIST *view, view->query.str= (char*)str.ptr(); view->query.length= str.length()-1; // we do not need last \0 view->source.str= thd->query + thd->lex->create_view_select_start; - endp= (uchar*) view->source.str; - endp= skip_rear_comments(endp, (uchar*) (thd->query + thd->query_length)); - view->source.length= endp - (uchar*) view->source.str; + endp= view->source.str; + endp= skip_rear_comments(endp, thd->query + thd->query_length); + view->source.length= endp - view->source.str; view->file_version= 1; view->calc_md5(md5); view->md5.str= md5; @@ -970,7 +970,7 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table, now Lex placed in statement memory */ table->view= lex= thd->lex= (LEX*) new(thd->mem_root) st_lex_local; - lex_start(thd, (uchar*)table->query.str, table->query.length); + lex_start(thd, table->query.str, table->query.length); view_select= &lex->select_lex; view_select->select_number= ++thd->select_number; { diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 963146f3cb4..9d4c62052dd 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -2695,7 +2695,7 @@ sp_proc_stmt_statement: else i->m_query.length= lex->tok_end - sp->m_tmp_query; i->m_query.str= strmake_root(YYTHD->mem_root, - (char *)sp->m_tmp_query, + sp->m_tmp_query, i->m_query.length); sp->add_instr(i); } @@ -9299,7 +9299,7 @@ param_marker: my_error(ER_VIEW_SELECT_VARIABLE, MYF(0)); MYSQL_YYABORT; } - item= new Item_param((uint) (lex->tok_start - (uchar *) thd->query)); + item= new Item_param((uint) (lex->tok_start - thd->query)); if (!($$= item) || lex->param_list.push_back(item)) { my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); @@ -10135,7 +10135,7 @@ option_type_value: if (!(qbuff.str= alloc_root(YYTHD->mem_root, qbuff.length + 5))) MYSQL_YYABORT; - strmake(strmake(qbuff.str, "SET ", 4), (char *)sp->m_tmp_query, + strmake(strmake(qbuff.str, "SET ", 4), sp->m_tmp_query, qbuff.length); qbuff.length+= 4; i->m_query= qbuff; @@ -11354,18 +11354,16 @@ view_select_aux: { THD *thd= YYTHD; LEX *lex= thd->lex; - char *stmt_beg= (lex->sphead ? - (char *)lex->sphead->m_tmp_query : - thd->query); + const char *stmt_beg= (lex->sphead ? + lex->sphead->m_tmp_query : thd->query); lex->create_view_select_start= $2 - stmt_beg; } | '(' remember_name select_paren ')' union_opt { THD *thd= YYTHD; LEX *lex= thd->lex; - char *stmt_beg= (lex->sphead ? - (char *)lex->sphead->m_tmp_query : - thd->query); + const char *stmt_beg= (lex->sphead ? + lex->sphead->m_tmp_query : thd->query); lex->create_view_select_start= $2 - stmt_beg; } ; diff --git a/sql/table.cc b/sql/table.cc index 4123473cf1e..71e510bf0ac 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -682,8 +682,8 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head, if ((share->partition_info_len= partition_info_len)) { if (!(share->partition_info= - (uchar*) memdup_root(&share->mem_root, next_chunk + 4, - partition_info_len + 1))) + memdup_root(&share->mem_root, next_chunk + 4, + partition_info_len + 1))) { my_free(buff, MYF(0)); goto err; @@ -1528,7 +1528,7 @@ int open_table_from_share(THD *thd, TABLE_SHARE *share, const char *alias, tmp= mysql_unpack_partition(thd, share->partition_info, share->partition_info_len, - (uchar*)share->part_state, + share->part_state, share->part_state_len, outparam, is_create_table, share->default_part_db_type); diff --git a/sql/table.h b/sql/table.h index aa053f207b3..0eb372e9cca 100644 --- a/sql/table.h +++ b/sql/table.h @@ -236,9 +236,9 @@ typedef struct st_table_share bool log_table; #ifdef WITH_PARTITION_STORAGE_ENGINE bool auto_partitioned; - const uchar *partition_info; + const char *partition_info; uint partition_info_len; - const uchar *part_state; + const char *part_state; uint part_state_len; handlerton *default_part_db_type; #endif From f7acb850c29dc06219da2a51d2da0a55d389df60 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 19:26:01 +0200 Subject: [PATCH 044/153] Bug#24121 Incorrect test for SSL_VERIFY_SERVER_CERT - Interpret the pointer passed to 'mysql_options' for MYSQL_OPT_SSL_VERIFY_SERVER_CERT as a my_bool - In 5.1 the mysql_options signature will be chanegd to take a 'void*' in order to further emphasize the need for a pointer to correct type client/mysqltest.c: Turn on ssl_verify_server_cert for all connections to "localhost" in mysqltest sql-common/client.c: The pointer passed to 'mysql_options' for MYSQL_OPT_SSL_VERIFY_SERVER_CERT should be interpreted as a my_bool pointer (aka char*). --- client/mysqltest.c | 8 +++----- sql-common/client.c | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/client/mysqltest.c b/client/mysqltest.c index 30f95dd4340..568d33f7385 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -3534,7 +3534,7 @@ void do_connect(struct st_command *command) opt_ssl_capath, opt_ssl_cipher); #if MYSQL_VERSION_ID >= 50000 /* Turn on ssl_verify_server_cert only if host is "localhost" */ - opt_ssl_verify_server_cert= !strcmp(ds_connection_name.str, "localhost"); + opt_ssl_verify_server_cert= !strcmp(ds_host.str, "localhost"); mysql_options(&next_con->mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &opt_ssl_verify_server_cert); #endif @@ -6002,15 +6002,13 @@ int main(int argc, char **argv) #ifdef HAVE_OPENSSL -#if MYSQL_VERSION_ID >= 50000 - opt_ssl_verify_server_cert= TRUE; /* Always on in mysqltest */ -#endif - if (opt_use_ssl) { mysql_ssl_set(&cur_con->mysql, opt_ssl_key, opt_ssl_cert, opt_ssl_ca, opt_ssl_capath, opt_ssl_cipher); #if MYSQL_VERSION_ID >= 50000 + /* Turn on ssl_verify_server_cert only if host is "localhost" */ + opt_ssl_verify_server_cert= opt_host && !strcmp(opt_host, "localhost"); mysql_options(&cur_con->mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, &opt_ssl_verify_server_cert); #endif diff --git a/sql-common/client.c b/sql-common/client.c index 1acaaea9a79..3342db4bcfe 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -3022,7 +3022,7 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg) mysql->reconnect= *(my_bool *) arg; break; case MYSQL_OPT_SSL_VERIFY_SERVER_CERT: - if (!arg || test(*(uint*) arg)) + if (*(my_bool*) arg) mysql->options.client_flag|= CLIENT_SSL_VERIFY_SERVER_CERT; else mysql->options.client_flag&= ~CLIENT_SSL_VERIFY_SERVER_CERT; From 587942a792f5c31d0c5fc900dcacb454a0000e13 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 21:57:33 +0400 Subject: [PATCH 045/153] Fix warnings. include/typelib.h: Fix a compile warning. char *x is actually updated if it's found in the typelib (a peculiar way to return canonical value in case of a partial match) mysys/typelib.c: Fix a warning. sql/item_func.cc: Fix a compile-time warning. --- include/typelib.h | 2 +- mysys/typelib.c | 2 +- sql/item_func.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/typelib.h b/include/typelib.h index 79d3acd2d64..e04ec20f2bc 100644 --- a/include/typelib.h +++ b/include/typelib.h @@ -26,7 +26,7 @@ typedef struct st_typelib { /* Different types saved here */ unsigned int *type_lengths; } TYPELIB; -extern int find_type(const char *x, const TYPELIB *typelib, +extern int find_type(char *x, const TYPELIB *typelib, unsigned int full_name); extern void make_type(char *to,unsigned int nr,TYPELIB *typelib); extern const char *get_type(TYPELIB *typelib,unsigned int nr); diff --git a/mysys/typelib.c b/mysys/typelib.c index 97b03b72b24..dc9f0850bbc 100644 --- a/mysys/typelib.c +++ b/mysys/typelib.c @@ -42,7 +42,7 @@ >0 Offset+1 in typelib for matched string */ -int find_type(const char *x, const TYPELIB *typelib, uint full_name) +int find_type(char *x, const TYPELIB *typelib, uint full_name) { int find,pos,findpos; reg1 my_string i; diff --git a/sql/item_func.cc b/sql/item_func.cc index cf3a4d3d758..59894c981af 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -5069,7 +5069,7 @@ Item_func_sp::init_result_field(THD *thd) { DBUG_ENTER("Item_func_sp::init_result_field"); - LEX_STRING empty_name= { STRING_WITH_LEN("") }; + LEX_STRING empty_name= { C_STRING_WITH_LEN("") }; TABLE_SHARE *share; From fce728059116b131eebed402635210d4fe82ef1c Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 22:15:51 +0400 Subject: [PATCH 046/153] Fix spelling (recursivity -> recursion) mysql-test/r/events.result: Fix spelling. mysql-test/r/events_bugs.result: Fix spelling. mysql-test/r/ps.result: Fix spelling. mysql-test/t/events.test: Fix spelling. mysql-test/t/events_bugs.test: Fix spelling. mysql-test/t/ps.test: Fix spelling. sql/sql_yacc.yy: Fix spelling. sql/share/errmsg.txt: Fix spelling. --- mysql-test/r/events.result | 4 ++-- mysql-test/r/events_bugs.result | 2 +- mysql-test/r/ps.result | 2 +- mysql-test/t/events.test | 4 ++-- mysql-test/t/events_bugs.test | 2 +- mysql-test/t/ps.test | 2 +- sql/share/errmsg.txt | 4 ++-- sql/sql_yacc.yy | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/mysql-test/r/events.result b/mysql-test/r/events.result index 641de1571c3..b0640af0b13 100644 --- a/mysql-test/r/events.result +++ b/mysql-test/r/events.result @@ -73,7 +73,7 @@ DROP EVENT event_starts_test; create table test_nested(a int); create event e_43 on schedule every 1 second do set @a = 5; alter event e_43 do alter event e_43 do set @a = 4; -ERROR HY000: Recursivity of EVENT DDL statements is forbidden when body is present +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present alter event e_43 do begin alter event e_43 on schedule every 5 minute; @@ -367,7 +367,7 @@ root localhost events_test Connect User lock select get_lock("test_lock2_1", 20) drop event закачка21; create table t_16 (s1 int); create trigger t_16_bi before insert on t_16 for each row create event e_16 on schedule every 1 second do set @a=5; -ERROR HY000: Recursivity of EVENT DDL statements is forbidden when body is present +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present drop table t_16; create event white_space on schedule every 10 hour diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result index 1a34f098b12..6835ecd7fde 100644 --- a/mysql-test/r/events_bugs.result +++ b/mysql-test/r/events_bugs.result @@ -17,7 +17,7 @@ DROP EVENT ДОЛЕÐ_региÑтър_утф8; SET NAMES latin1; set @a=3; CREATE PROCEDURE p_16 () CREATE EVENT e_16 ON SCHEDULE EVERY @a SECOND DO SET @a=5; -ERROR HY000: Recursivity of EVENT DDL statements is forbidden when body is present +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present create event e_55 on schedule at 99990101000000 do drop table t; ERROR HY000: Incorrect AT value: '99990101000000' create event e_55 on schedule every 10 hour starts 99990101000000 do drop table t; diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result index c4e44945ec4..12608c48bf5 100644 --- a/mysql-test/r/ps.result +++ b/mysql-test/r/ps.result @@ -2285,7 +2285,7 @@ drop user pstest_xyz@localhost; deallocate prepare abc; drop event if exists xyz; create function func_1() returns int begin create event xyz on schedule at now() do select 123; return 1; end| -ERROR HY000: Recursivity of EVENT DDL statements is forbidden when body is present +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present select func_1(), func_1(), func_1() from dual; ERROR 42000: FUNCTION test.func_1 does not exist drop function func_1; diff --git a/mysql-test/t/events.test b/mysql-test/t/events.test index 24f4b4eccab..39bc1063ace 100644 --- a/mysql-test/t/events.test +++ b/mysql-test/t/events.test @@ -74,7 +74,7 @@ DROP EVENT event_starts_test; # create table test_nested(a int); create event e_43 on schedule every 1 second do set @a = 5; ---error ER_EVENT_RECURSIVITY_FORBIDDEN +--error ER_EVENT_RECURSION_FORBIDDEN alter event e_43 do alter event e_43 do set @a = 4; delimiter |; alter event e_43 do @@ -351,7 +351,7 @@ drop event закачка21; # Bug #16410 Events: CREATE EVENT is legal in a CREATE TRIGGER statement # create table t_16 (s1 int); ---error ER_EVENT_RECURSIVITY_FORBIDDEN +--error ER_EVENT_RECURSION_FORBIDDEN create trigger t_16_bi before insert on t_16 for each row create event e_16 on schedule every 1 second do set @a=5; drop table t_16; # diff --git a/mysql-test/t/events_bugs.test b/mysql-test/t/events_bugs.test index c1016f1752b..56c44dc3a9f 100644 --- a/mysql-test/t/events_bugs.test +++ b/mysql-test/t/events_bugs.test @@ -30,7 +30,7 @@ SET NAMES latin1; # START - BUG#16408: Events: crash for an event in a procedure # set @a=3; ---error ER_EVENT_RECURSIVITY_FORBIDDEN +--error ER_EVENT_RECURSION_FORBIDDEN CREATE PROCEDURE p_16 () CREATE EVENT e_16 ON SCHEDULE EVERY @a SECOND DO SET @a=5; # # END - BUG#16408: Events: crash for an event in a procedure diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test index 9f670f9973f..44f9bf350b2 100644 --- a/mysql-test/t/ps.test +++ b/mysql-test/t/ps.test @@ -2324,7 +2324,7 @@ drop event if exists xyz; #drop event xyz; #drop procedure proc_1; delimiter |; ---error ER_EVENT_RECURSIVITY_FORBIDDEN +--error ER_EVENT_RECURSION_FORBIDDEN create function func_1() returns int begin create event xyz on schedule at now() do select 123; return 1; end| delimiter ;| --error ER_SP_DOES_NOT_EXIST diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index c0da7053ac2..0a40f2b9ed1 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5978,8 +5978,8 @@ ER_BASE64_DECODE_ERROR ER_NO_TRIGGERS_ON_SYSTEM_SCHEMA eng "Triggers can not be created on system tables" ger "Trigger können nicht auf Systemtabellen erzeugt werden" -ER_EVENT_RECURSIVITY_FORBIDDEN - eng "Recursivity of EVENT DDL statements is forbidden when body is present" +ER_EVENT_RECURSION_FORBIDDEN + eng "Recursion of EVENT DDL statements is forbidden when body is present" ger "Rekursivität von EVENT-DDL-Anweisungen ist unzulässig wenn ein Hauptteil (Body) existiert" ER_EVENTS_DB_ERROR eng "Cannot proceed because system tables used by Event Scheduler were found damaged at server start" diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 9d4c62052dd..b8dc377bb82 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1847,7 +1847,7 @@ ev_sql_stmt: */ if (lex->sphead) { - my_error(ER_EVENT_RECURSIVITY_FORBIDDEN, MYF(0)); + my_error(ER_EVENT_RECURSION_FORBIDDEN, MYF(0)); MYSQL_YYABORT; } From 3556deebd5e26ad5b48bdc52ac97af2e306c2bac Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 21:04:05 +0200 Subject: [PATCH 047/153] Bug #24121 Incorrect test for SSL_VERIFY_SERVER_CERT - Change 'mysql_options' third argment "arg" to "const void*" include/mysql.h: Change 'mysql_options' third argment "arg" to "const void*" sql-common/client.c: Change 'mysql_options' third argment "arg" to "const void*" --- include/mysql.h | 2 +- sql-common/client.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mysql.h b/include/mysql.h index f76ae10ca16..33bdf80ef73 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -525,7 +525,7 @@ MYSQL_RES * STDCALL mysql_list_dbs(MYSQL *mysql,const char *wild); MYSQL_RES * STDCALL mysql_list_tables(MYSQL *mysql,const char *wild); MYSQL_RES * STDCALL mysql_list_processes(MYSQL *mysql); int STDCALL mysql_options(MYSQL *mysql,enum mysql_option option, - const char *arg); + const void *arg); void STDCALL mysql_free_result(MYSQL_RES *result); void STDCALL mysql_data_seek(MYSQL_RES *result, my_ulonglong offset); diff --git a/sql-common/client.c b/sql-common/client.c index 16fd20209b2..89d69b4bd1f 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -2948,7 +2948,7 @@ mysql_fetch_lengths(MYSQL_RES *res) int STDCALL -mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg) +mysql_options(MYSQL *mysql,enum mysql_option option, const void *arg) { DBUG_ENTER("mysql_option"); DBUG_PRINT("enter",("option: %d",(int) option)); From 563a50770e5a079c8415d587eb8a0ecbc21246c4 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 27 Mar 2007 21:29:45 +0200 Subject: [PATCH 048/153] Remove remnants of ssl_des.test BitKeeper/deleted/.del-ssl_des-master.opt: Delete: mysql-test/t/ssl_des-master.opt --- mysql-test/t/ssl_des-master.opt | 1 - 1 file changed, 1 deletion(-) delete mode 100644 mysql-test/t/ssl_des-master.opt diff --git a/mysql-test/t/ssl_des-master.opt b/mysql-test/t/ssl_des-master.opt deleted file mode 100644 index 0b2b8cb85ac..00000000000 --- a/mysql-test/t/ssl_des-master.opt +++ /dev/null @@ -1 +0,0 @@ ---loose_ssl-cert=std_data/server-cert-des.pem --loose_ssl-key=std_data/server-key-des.pem From c36e06dd90fa60c6a81264863291a088acb08be2 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 10:32:06 +0800 Subject: [PATCH 049/153] Bug#26898, Alter table to empty merge from ndb causes mysqld to crash sql/ha_ndbcluster.cc: remove the assertion, when trans is NULL, return 0 directly since the transaction is possibly released in ha_ndbcluster::external_lock(...) function --- sql/ha_ndbcluster.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 1def6f221f7..8e38f2eb128 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -4366,7 +4366,9 @@ static int ndbcluster_commit(handlerton *hton, THD *thd, bool all) DBUG_PRINT("transaction",("%s", trans == thd_ndb->stmt ? "stmt" : "all")); - DBUG_ASSERT(ndb && trans); + DBUG_ASSERT(ndb); + if (trans == NULL) + DBUG_RETURN(0); if (execute_commit(thd,trans) != 0) { From e9b606bf3e0ccc9d9ff27541371cc5faf72dd813 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 09:32:49 +0200 Subject: [PATCH 050/153] Bug#25197 repeat function returns null when using table field directly as count - Add extra test case from bug#27073 - Change "if" to be optimized for count > 0 mysql-test/r/func_str.result: Add test case from bug#27073 mysql-test/t/func_str.test: Add test case from bug#27073 sql/item_strfunc.cc: Change the if statemnet to be optimized for the normal case where count > 0 --- mysql-test/r/func_str.result | 9 +++++++++ mysql-test/t/func_str.test | 4 ++++ sql/item_strfunc.cc | 2 +- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index e716a89132c..6abd3a61a4b 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -1953,5 +1953,14 @@ A B tire 0 # # 1 ## ## 2 +SELECT REPEAT('0', CAST(0 AS UNSIGNED)); +REPEAT('0', CAST(0 AS UNSIGNED)) + +SELECT REPEAT('0', -2); +REPEAT('0', -2) + +SELECT REPEAT('0', 2); +REPEAT('0', 2) +00 DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 7cf7ef2cab6..80e4b9fe40c 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -1028,6 +1028,10 @@ INSERT INTO `t1` (`id`, `tire`) VALUES ('A', 0), ('B', 1),('C', 2); SELECT REPEAT( '#', tire ) AS A, REPEAT( '#', tire % 999 ) AS B, tire FROM `t1`; +SELECT REPEAT('0', CAST(0 AS UNSIGNED)); +SELECT REPEAT('0', -2); +SELECT REPEAT('0', 2); + DROP TABLE t1; --echo End of 5.0 tests diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index 627751a1106..0ffda000e60 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -2252,7 +2252,7 @@ String *Item_func_repeat::val_str(String *str) goto err; // string and/or delim are null null_value= 0; - if (count == 0 || count < 0 && !args[1]->unsigned_flag) + if (count <= 0 && (count == 0 || !args[1]->unsigned_flag)) return &my_empty_string; /* Assumes that the maximum length of a String is < INT_MAX32. */ From e0f5f280a756d14adb57e9ace0cf913dc0c7b483 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 10:08:26 +0200 Subject: [PATCH 051/153] Use mtr_verbose instead of "if ($opt_verbose)" --- mysql-test/mysql-test-run.pl | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 95457b7bd66..97889e53b89 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2798,10 +2798,7 @@ sub initialize_servers () { } else { - if ($opt_verbose) - { - mtr_report("No need to create '$opt_vardir' it already exists"); - } + mtr_verbose("No need to create '$opt_vardir' it already exists"); } } else From 1747a6b60c7fd9d7c5ddd6559821c35690553c64 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 10:12:33 +0200 Subject: [PATCH 052/153] Bug#27490 Function to log to NT event log could allocate memory - Change 'print_buffer_to_nt_event_log' to overwrite the string if the buffer is not long enough to hold the ending CR/LF's - Make functions static - Remove the "hack" intended to force 'print_buffer_to_nt_event_log' never to use "new" sql/log.cc: -Change 'print_buffer_to_nt_event_log' to overwrite the string if the buffer is not long enough to hold the ending CR/LF's - Make functions static - Remove the "hack" intended to force 'print_buffer_to_nt_event_log' never to use "new" --- sql/log.cc | 34 +++++++++++----------------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/sql/log.cc b/sql/log.cc index 1961a5b6f88..5979b688ccf 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -283,7 +283,7 @@ err: #ifdef __NT__ static int eventSource = 0; -void setup_windows_event_source() +static void setup_windows_event_source() { HKEY hRegKey= NULL; DWORD dwError= 0; @@ -2228,7 +2228,7 @@ static bool test_if_number(register const char *str, } /* test_if_number */ -void print_buffer_to_file(enum loglevel level, const char *buffer) +static void print_buffer_to_file(enum loglevel level, const char *buffer) { time_t skr; struct tm tm_tmp; @@ -2325,23 +2325,15 @@ void MYSQL_LOG::signal_update() } #ifdef __NT__ -void print_buffer_to_nt_eventlog(enum loglevel level, char *buff, - uint length, int buffLen) +static void print_buffer_to_nt_eventlog(enum loglevel level, char *buff, + uint length, int buffLen) { HANDLE event; - char *buffptr; - LPCSTR *buffmsgptr; + char *buffptr= buff; DBUG_ENTER("print_buffer_to_nt_eventlog"); - buffptr= buff; - if (length > (uint)(buffLen-5)) - { - char *newBuff= new char[length + 5]; - strcpy(newBuff, buff); - buffptr= newBuff; - } - strmov(buffptr+length, "\r\n\r\n"); - buffmsgptr= (LPCSTR*) &buffptr; // Keep windows happy + /* Add ending CR/LF's to string, overwrite last chars if necessary */ + strmov(buffptr+min(length, buffLen-5), "\r\n\r\n"); setup_windows_event_source(); if ((event= RegisterEventSource(NULL,"MySQL"))) @@ -2349,24 +2341,20 @@ void print_buffer_to_nt_eventlog(enum loglevel level, char *buff, switch (level) { case ERROR_LEVEL: ReportEvent(event, EVENTLOG_ERROR_TYPE, 0, MSG_DEFAULT, NULL, 1, 0, - buffmsgptr, NULL); + (LPCSTR*)&buffptr, NULL); break; case WARNING_LEVEL: ReportEvent(event, EVENTLOG_WARNING_TYPE, 0, MSG_DEFAULT, NULL, 1, 0, - buffmsgptr, NULL); + (LPCSTR*) &buffptr, NULL); break; case INFORMATION_LEVEL: ReportEvent(event, EVENTLOG_INFORMATION_TYPE, 0, MSG_DEFAULT, NULL, 1, - 0, buffmsgptr, NULL); + 0, (LPCSTR*) &buffptr, NULL); break; } DeregisterEventSource(event); } - /* if we created a string buffer, then delete it */ - if (buffptr != buff) - delete[] buffptr; - DBUG_VOID_RETURN; } #endif /* __NT__ */ @@ -2404,7 +2392,7 @@ void vprint_msg_to_log(enum loglevel level, const char *format, va_list args) uint length; DBUG_ENTER("vprint_msg_to_log"); - length= my_vsnprintf(buff, sizeof(buff)-5, format, args); + length= my_vsnprintf(buff, sizeof(buff), format, args); print_buffer_to_file(level, buff); #ifdef __NT__ From 2bc57a692c228141a86d382019fad33a4a6ae9ea Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 10:24:33 +0200 Subject: [PATCH 053/153] Dont' redirect stderr in ActiveState perl Improve comments --- mysql-test/lib/mtr_process.pl | 45 +++++++++++++++-------------------- 1 file changed, 19 insertions(+), 26 deletions(-) diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index 690ca8313dd..53bf37bcc83 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -38,8 +38,8 @@ sub mtr_kill_processes ($); sub mtr_ping_with_timeout($); sub mtr_ping_port ($); -# static in C -sub spawn_impl ($$$$$$$$); +# Local function +sub spawn_impl ($$$$$$$); ############################################################################## # @@ -47,18 +47,16 @@ sub spawn_impl ($$$$$$$$); # ############################################################################## -# This function try to mimic the C version used in "netware/mysql_test_run.c" - sub mtr_run ($$$$$$;$) { my $path= shift; my $arg_list_t= shift; my $input= shift; my $output= shift; my $error= shift; - my $pid_file= shift; + my $pid_file= shift; # Not used my $spawn_opts= shift; - return spawn_impl($path,$arg_list_t,'run',$input,$output,$error,$pid_file, + return spawn_impl($path,$arg_list_t,'run',$input,$output,$error, $spawn_opts); } @@ -68,10 +66,10 @@ sub mtr_run_test ($$$$$$;$) { my $input= shift; my $output= shift; my $error= shift; - my $pid_file= shift; + my $pid_file= shift; # Not used my $spawn_opts= shift; - return spawn_impl($path,$arg_list_t,'test',$input,$output,$error,$pid_file, + return spawn_impl($path,$arg_list_t,'test',$input,$output,$error, $spawn_opts); } @@ -81,28 +79,22 @@ sub mtr_spawn ($$$$$$;$) { my $input= shift; my $output= shift; my $error= shift; - my $pid_file= shift; + my $pid_file= shift; # Not used my $spawn_opts= shift; - return spawn_impl($path,$arg_list_t,'spawn',$input,$output,$error,$pid_file, + return spawn_impl($path,$arg_list_t,'spawn',$input,$output,$error, $spawn_opts); } -############################################################################## -# -# If $join is set, we return the error code, else we return the PID -# -############################################################################## -sub spawn_impl ($$$$$$$$) { +sub spawn_impl ($$$$$$$) { my $path= shift; my $arg_list_t= shift; my $mode= shift; my $input= shift; my $output= shift; my $error= shift; - my $pid_file= shift; # FIXME my $spawn_opts= shift; if ( $::opt_script_debug ) @@ -155,10 +147,6 @@ sub spawn_impl ($$$$$$$$) { else { # Child, redirect output and exec - # FIXME I tried POSIX::setsid() here to detach and, I hoped, - # avoid zombies. But everything went wild, somehow the parent - # became a deamon as well, and was hard to kill ;-) - # Need to catch SIGCHLD and do waitpid or something instead...... $SIG{INT}= 'DEFAULT'; # Parent do some stuff, we don't @@ -196,7 +184,15 @@ sub spawn_impl ($$$$$$$$) { } else { - if ( ! open(STDERR,$log_file_open_mode,$error) ) + if ( $::glob_win32_perl ) + { + # Don't redirect stdout on ActiveState perl since this is + # just another thread in the same process. + # Should be fixed so that the thread that is created with fork + # executes the exe in another process and wait's for it to return. + # In the meanwhile, we get all the output from mysqld's to screen + } + elsif ( ! open(STDERR,$log_file_open_mode,$error) ) { mtr_child_error("can't redirect STDERR to \"$error\": $!"); } @@ -259,9 +255,7 @@ sub spawn_parent_impl { # We do blocking waitpid() until we get the return from the # "mysqltest" call. But if a mysqld process dies that we # started, we take this as an error, and kill mysqltest. - # - # FIXME is this as it should be? Can't mysqld terminate - # normally from running a test case? + my $exit_value= -1; my $saved_exit_value; @@ -450,7 +444,6 @@ sub mtr_kill_leftovers () { # We scan the "var/run/" directory for other process id's to kill - # FIXME $path_run_dir or something my $rundir= "$::opt_vardir/run"; mtr_debug("Processing PID files in directory '$rundir'..."); From 230a116ed201ace7d9b4b703cfc2b65d9076cf36 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 11:16:50 +0200 Subject: [PATCH 054/153] Turn off im if extern Remove strange comment Add run_query function --- mysql-test/mysql-test-run.pl | 65 +++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 16 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 69103334252..b97c3917285 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -848,20 +848,22 @@ sub command_line_setup () { # -------------------------------------------------------------------------- # Check im suport # -------------------------------------------------------------------------- - if (!$opt_extern) + if ($opt_extern) { - if ( $mysql_version_id < 50000 ) { - # Instance manager is not supported until 5.0 - $opt_skip_im= 1; - - } - - if ( $glob_win32 ) { - mtr_report("Disable Instance manager - not supported on Windows"); - $opt_skip_im= 1; - } - + mtr_report("Disable instance manager when running with extern mysqld"); + $opt_skip_im= 1; } + elsif ( $mysql_version_id < 50000 ) + { + # Instance manager is not supported until 5.0 + $opt_skip_im= 1; + } + elsif ( $glob_win32 ) + { + mtr_report("Disable Instance manager - testing not supported on Windows"); + $opt_skip_im= 1; + } + # -------------------------------------------------------------------------- # Record flag # -------------------------------------------------------------------------- @@ -1055,8 +1057,6 @@ sub command_line_setup () { # socket path names. $sockdir = tempdir(CLEANUP => 0) if ( length($sockdir) > 80 ); - # Put this into a hash, will be a C struct - $master->[0]= { pid => 0, @@ -1328,7 +1328,7 @@ sub collect_mysqld_features () { # # Execute "mysqld --no-defaults --help --verbose" to get a - # of all features and settings + # list of all features and settings # my $list= `$exe_mysqld --no-defaults --verbose --help`; @@ -1392,6 +1392,40 @@ sub collect_mysqld_features () { } +sub run_query($$) { + my ($mysqld, $query)= @_; + + my $args; + mtr_init_args(\$args); + + mtr_add_arg($args, "--no-defaults"); + mtr_add_arg($args, "--user=%s", $opt_user); + mtr_add_arg($args, "--port=%d", $mysqld->{'port'}); + mtr_add_arg($args, "--socket=%s", $mysqld->{'path_sock'}); + mtr_add_arg($args, "--silent"); # Tab separated output + mtr_add_arg($args, "-e '%s'", $query); + + my $cmd= "$exe_mysql " . join(' ', @$args); + mtr_verbose("cmd: $cmd"); + return `$cmd`; +} + + +sub collect_mysqld_features_from_running_server () +{ + my $list= run_query($master->[0], "use mysql; SHOW VARIABLES"); + + foreach my $line (split('\n', $list)) + { + # Put variables into hash + if ( $line =~ /^([\S]+)[ \t]+(.*?)\r?$/ ) + { + print "$1=\"$2\"\n"; + $mysqld_variables{$1}= $2; + } + } +} + sub executable_setup_im () { # Look for instance manager binary - mysqlmanager @@ -1485,7 +1519,6 @@ sub executable_setup () { $exe_mysqlshow= mtr_exe_exists("$path_client_bindir/mysqlshow"); $exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog"); $exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin"); - $exe_mysql= mtr_exe_exists("$path_client_bindir/mysql"); if (!$opt_extern) { From 40df5f68b53b67514cf45c4b7d241b8f31d5f368 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 12:23:55 +0200 Subject: [PATCH 055/153] Bug#25309 SSL connections without CA certificate broken since MySQL 5.0.23 - Turn off verification of peer if both ca_path and ca_file is null i.e from only passing --ssl-key= and --ssl-cert= to the mysql utility programs. The server will authenticate the client accoring to GRANT tables but the client won't authenticate the server mysql-test/r/openssl_1.result: Update result file mysql-test/t/openssl_1.test: Test that it's possible to connect with --ssl-ca set to /dev/null vio/viosslfactories.c: Turn off verification of peer if both ca_file and ca_path is NULL --- mysql-test/r/openssl_1.result | 2 ++ mysql-test/t/openssl_1.test | 9 ++++++++- vio/viosslfactories.c | 8 ++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result index 34d8e3ab768..92900ac1a83 100644 --- a/mysql-test/r/openssl_1.result +++ b/mysql-test/r/openssl_1.result @@ -51,3 +51,5 @@ SSL error: Unable to get private key from '' mysqltest: Could not open connection 'default': 2026 SSL connection error SSL error: Unable to get certificate from '' mysqltest: Could not open connection 'default': 2026 SSL connection error +Variable_name Value +Ssl_cipher DHE-RSA-AES256-SHA diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test index 3d614514de3..2eb3251c862 100644 --- a/mysql-test/t/openssl_1.test +++ b/mysql-test/t/openssl_1.test @@ -95,4 +95,11 @@ drop table t1; --error 1 --exec $MYSQL_TEST --ssl-cert= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1 - +# +# Bug#25309 SSL connections without CA certificate broken since MySQL 5.0.23 +# +# Test that we can open encrypted connection to server without +# verification of servers certificate by setting both ca certificate +# and ca path to NULL +# +--exec $MYSQL --ssl --ssl-key=$MYSQL_TEST_DIR/std_data/client-key.pem --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem -e "SHOW STATUS LIKE 'ssl_Cipher'" 2>&1 diff --git a/vio/viosslfactories.c b/vio/viosslfactories.c index 55d3792365f..a12a45df648 100644 --- a/vio/viosslfactories.c +++ b/vio/viosslfactories.c @@ -301,6 +301,14 @@ new_VioSSLConnectorFd(const char *key_file, const char *cert_file, { struct st_VioSSLFd *ssl_fd; int verify= SSL_VERIFY_PEER; + + /* + Turn off verification of servers certificate if both + ca_file and ca_path is set to NULL + */ + if (ca_file == 0 && ca_path == 0) + verify= SSL_VERIFY_NONE; + if (!(ssl_fd= new_VioSSLFd(key_file, cert_file, ca_file, ca_path, cipher, TLSv1_client_method()))) { From ff7db598a270ba3342ec0f2fc290e43003699241 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 15:34:52 +0200 Subject: [PATCH 056/153] Set yaSSL to use same type as MySQL do for socket handles extra/yassl/include/openssl/ssl.h: Import patch yassl.diff extra/yassl/src/ssl.cpp: Import patch yassl.diff --- extra/yassl/include/openssl/ssl.h | 10 ++++++++-- extra/yassl/src/ssl.cpp | 2 +- include/violite.h | 3 +++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h index 29add5ca37d..7dd33e3fcad 100644 --- a/extra/yassl/include/openssl/ssl.h +++ b/extra/yassl/include/openssl/ssl.h @@ -190,11 +190,17 @@ enum { /* ERR Constants */ EVP_R_BAD_DECRYPT = 2 }; - +/* + Allow type used by SSL_set_fd to be changed, default to int + in order to be compatible with OpenSSL + */ +#ifndef YASSL_SOCKET_T_DEFINED +typedef int YASSL_SOCKET_T; +#endif SSL_CTX* SSL_CTX_new(SSL_METHOD*); SSL* SSL_new(SSL_CTX*); -int SSL_set_fd (SSL*, int); +int SSL_set_fd (SSL*, YASSL_SOCKET_T); int SSL_connect(SSL*); int SSL_write(SSL*, const void*, int); int SSL_read(SSL*, void*, int); diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index 5bbde13a652..5ccc45ded2a 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -229,7 +229,7 @@ void SSL_free(SSL* ssl) } -int SSL_set_fd(SSL* ssl, int fd) +int SSL_set_fd(SSL* ssl, YASSL_SOCKET_T fd) { ssl->useSocket().set_fd(fd); return SSL_SUCCESS; diff --git a/include/violite.h b/include/violite.h index 4122e581a0f..63388c170c9 100644 --- a/include/violite.h +++ b/include/violite.h @@ -102,6 +102,9 @@ void vio_timeout(Vio *vio,uint which, uint timeout); #define HEADER_DES_LOCL_H dummy_something #define YASSL_MYSQL_COMPATIBLE #define YASSL_PREFIX +/* Set yaSSL to use same type as MySQL do for socket handles */ +typedef my_socket YASSL_SOCKET_T; +#define YASSL_SOCKET_T_DEFINED #include #include From 1778d177be6363c88c58cb8eafaa0f530a97d593 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 15:56:57 +0200 Subject: [PATCH 057/153] Add back the look for exe_mysql --- mysql-test/mysql-test-run.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index b97c3917285..9187e3d23ec 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1519,6 +1519,7 @@ sub executable_setup () { $exe_mysqlshow= mtr_exe_exists("$path_client_bindir/mysqlshow"); $exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog"); $exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin"); + $exe_mysql= mtr_exe_exists("$path_client_bindir/mysql"); if (!$opt_extern) { From f7c4ed0abe5cb7578fa9be6b8b8da25053e5840c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 10:19:10 -0600 Subject: [PATCH 058/153] Bug #26262: Add option to skip binary logging for mysqlcheck Add the --skip-write-binlog option, which adds NO_WRITE_TO_BINLOG to REPAIR, ANALYZE, and OPTIMIZE commands. Use this option when these SQL commands should not be sent to replication slaves, nor run when using the binary logs for recovery from backup client/client_priv.h: Add OPT_WRITE_BINLOG client option client/mysqlcheck.c: Add --skip-write-binlog option, which adds NO_WRITE_TO_BINLOG to REPAIR, ANALYZE, and OPTIMIZE commands. --- client/client_priv.h | 2 +- client/mysqlcheck.c | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/client/client_priv.h b/client/client_priv.h index 646619f62b1..5b3b3890603 100644 --- a/client/client_priv.h +++ b/client/client_priv.h @@ -60,5 +60,5 @@ enum options_client OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE, OPT_SLAP_AUTO_GENERATE_WRITE_NUM, OPT_MYSQL_REPLACE_INTO, OPT_BASE64_OUTPUT, OPT_SERVER_ID, OPT_FIX_TABLE_NAMES, OPT_FIX_DB_NAMES, OPT_SSL_VERIFY_SERVER_CERT, - OPT_DEBUG_INFO, OPT_COLUMN_TYPES + OPT_DEBUG_INFO, OPT_COLUMN_TYPES, OPT_WRITE_BINLOG }; diff --git a/client/mysqlcheck.c b/client/mysqlcheck.c index 1a9d07804b4..2f5d435d0a5 100644 --- a/client/mysqlcheck.c +++ b/client/mysqlcheck.c @@ -34,7 +34,8 @@ static my_bool opt_alldbs = 0, opt_check_only_changed = 0, opt_extended = 0, opt_medium_check = 0, opt_quick = 0, opt_all_in_1 = 0, opt_silent = 0, opt_auto_repair = 0, ignore_errors = 0, tty_password= 0, opt_frm= 0, info_flag= 0, - opt_fix_table_names= 0, opt_fix_db_names= 0, opt_upgrade= 0; + opt_fix_table_names= 0, opt_fix_db_names= 0, opt_upgrade= 0, + opt_write_binlog= 1; static uint verbose = 0, opt_mysql_port=0; static my_string opt_mysql_unix_port = 0; static char *opt_password = 0, *current_user = 0, @@ -123,6 +124,10 @@ static struct my_option my_long_options[] = {"medium-check", 'm', "Faster than extended-check, but only finds 99.99 percent of all errors. Should be good enough for most cases.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, + {"write-binlog", OPT_WRITE_BINLOG, + "Log ANALYZE, OPTIMIZE and REPAIR TABLE commands. Enabled by default; use --skip-write-binlog when commands should not be sent to replication slaves.", + (gptr*) &opt_write_binlog, (gptr*) &opt_write_binlog, 0, GET_BOOL, NO_ARG, + 1, 0, 0, 0, 0, 0}, {"optimize", 'o', "Optimize table.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"password", 'p', @@ -598,16 +603,16 @@ static int handle_request_for_tables(char *tables, uint length) if (opt_upgrade) end = strmov(end, " FOR UPGRADE"); break; case DO_REPAIR: - op = "REPAIR"; + op= (opt_write_binlog) ? "REPAIR" : "REPAIR NO_WRITE_TO_BINLOG"; if (opt_quick) end = strmov(end, " QUICK"); if (opt_extended) end = strmov(end, " EXTENDED"); if (opt_frm) end = strmov(end, " USE_FRM"); break; case DO_ANALYZE: - op = "ANALYZE"; + op= (opt_write_binlog) ? "ANALYZE" : "ANALYZE NO_WRITE_TO_BINLOG"; break; case DO_OPTIMIZE: - op = "OPTIMIZE"; + op= (opt_write_binlog) ? "OPTIMIZE" : "OPTIMIZE NO_WRITE_TO_BINLOG"; break; case DO_UPGRADE: return fix_object_name("TABLE", tables); From 94b6ec6b1e6894b751913b72fe066ec2890353c7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 18:47:51 +0200 Subject: [PATCH 059/153] Import yaSSL extra/yassl/include/lock.hpp: Import patch yassl.diff extra/yassl/include/openssl/ssl.h: Import patch yassl.diff extra/yassl/include/socket_wrapper.hpp: Import patch yassl.diff extra/yassl/include/yassl.hpp: Import patch yassl.diff extra/yassl/src/ssl.cpp: Import patch yassl.diff extra/yassl/taocrypt/mySTL/algorithm.hpp: Import patch yassl.diff --- extra/yassl/include/lock.hpp | 2 +- extra/yassl/include/openssl/ssl.h | 1 + extra/yassl/include/socket_wrapper.hpp | 5 +++-- extra/yassl/include/yassl.hpp | 2 +- extra/yassl/src/ssl.cpp | 1 - extra/yassl/taocrypt/mySTL/algorithm.hpp | 2 -- 6 files changed, 6 insertions(+), 7 deletions(-) diff --git a/extra/yassl/include/lock.hpp b/extra/yassl/include/lock.hpp index b961ec3e478..0525943e45d 100644 --- a/extra/yassl/include/lock.hpp +++ b/extra/yassl/include/lock.hpp @@ -28,7 +28,7 @@ namespace yaSSL { #ifdef MULTI_THREADED - #if defined(_WIN32) || defined(_WIN64) + #ifdef _WIN32 #include class Mutex { diff --git a/extra/yassl/include/openssl/ssl.h b/extra/yassl/include/openssl/ssl.h index c7cd103841c..7dd33e3fcad 100644 --- a/extra/yassl/include/openssl/ssl.h +++ b/extra/yassl/include/openssl/ssl.h @@ -189,6 +189,7 @@ enum { /* ERR Constants */ ERR_TXT_STRING = 1, EVP_R_BAD_DECRYPT = 2 }; + /* Allow type used by SSL_set_fd to be changed, default to int in order to be compatible with OpenSSL diff --git a/extra/yassl/include/socket_wrapper.hpp b/extra/yassl/include/socket_wrapper.hpp index ba52dbab3ec..308704c2af0 100644 --- a/extra/yassl/include/socket_wrapper.hpp +++ b/extra/yassl/include/socket_wrapper.hpp @@ -28,8 +28,9 @@ #include -#include "openssl/ssl.h" /* for socket_t */ -#if !defined(_WIN32) && !defined(_WIN64) +#ifdef _WIN32 + #include +#else #include #include #include diff --git a/extra/yassl/include/yassl.hpp b/extra/yassl/include/yassl.hpp index b8190c484f7..29e0a5d94ec 100644 --- a/extra/yassl/include/yassl.hpp +++ b/extra/yassl/include/yassl.hpp @@ -28,7 +28,7 @@ namespace yaSSL { -#if defined(_WIN32) || defined(_WIN64) +#ifdef _WIN32 typedef unsigned int SOCKET_T; #else typedef int SOCKET_T; diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index cbd84efcdba..86dfa1c6ebd 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -39,7 +39,6 @@ #include "coding.hpp" // HexDecoder #include "helpers.hpp" // for placement new hack #include -#include #ifdef _WIN32 #include // FindFirstFile etc.. diff --git a/extra/yassl/taocrypt/mySTL/algorithm.hpp b/extra/yassl/taocrypt/mySTL/algorithm.hpp index f6a29cf4bdb..d8bc29a0bb9 100644 --- a/extra/yassl/taocrypt/mySTL/algorithm.hpp +++ b/extra/yassl/taocrypt/mySTL/algorithm.hpp @@ -27,8 +27,6 @@ namespace mySTL { -#undef max -#undef min template inline const T& max(const T& a, const T&b) From 05853ab055d629c6cc7e1860a5275754133756fa Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 19:10:18 +0200 Subject: [PATCH 060/153] Import yaSSL extra/yassl/src/ssl.cpp: Import patch yassl.diff --- extra/yassl/src/ssl.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp index 5ccc45ded2a..86dfa1c6ebd 100644 --- a/extra/yassl/src/ssl.cpp +++ b/extra/yassl/src/ssl.cpp @@ -58,6 +58,9 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type) if (format != SSL_FILETYPE_ASN1 && format != SSL_FILETYPE_PEM) return SSL_BAD_FILETYPE; + if (file == NULL || !file[0]) + return SSL_BAD_FILE; + FILE* input = fopen(file, "rb"); if (!input) return SSL_BAD_FILE; From 0b72b7f0a4c98f202b078e39afacacb442df3585 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 15:25:13 -0600 Subject: [PATCH 061/153] Bug #26642: create index corrupts table definition in .frm Thanks to Martin Friebe for finding and submitting a fix for this bug! A table with maximum number of key segments and maximum length key name would have a corrupted .frm file, due to an incorrect calculation of the complete key length. Now the key length is computed correctly (I hope) :-) MyISAM would reject a table with the maximum number of keys and the maximum number of key segments in all keys. It would allow one less than this total maximum. Now MyISAM accepts a table defined with the maximum. (This is a very minor issue.) myisam/mi_open.c: change >= to > in a comparison (i.e., error only if key_parts_in_table really is greater than MAX_KEY * MAX_KEY_SEG) mysql-test/r/create.result: Add test results for bug #26642 (create index corrupts table definition in .frm) mysql-test/t/create.test: Add test case for bug #26642 (create index corrupts table definition in .frm) sql/table.cc: In create_frm(), fix formula for key_length; it was too small by (keys * 2) bytes --- myisam/mi_open.c | 2 +- mysql-test/r/create.result | 517 +++++++++++++++++++++++++++++++++++++ mysql-test/t/create.test | 212 ++++++++++++++- sql/table.cc | 13 +- 4 files changed, 741 insertions(+), 3 deletions(-) diff --git a/myisam/mi_open.c b/myisam/mi_open.c index b007eb63e63..12d31616128 100644 --- a/myisam/mi_open.c +++ b/myisam/mi_open.c @@ -219,7 +219,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) key_parts+=fulltext_keys*FT_SEGS; if (share->base.max_key_length > MI_MAX_KEY_BUFF || keys > MI_MAX_KEY || - key_parts >= MI_MAX_KEY * MI_MAX_KEY_SEG) + key_parts > MI_MAX_KEY * MI_MAX_KEY_SEG) { DBUG_PRINT("error",("Wrong key info: Max_key_length: %d keys: %d key_parts: %d", share->base.max_key_length, keys, key_parts)); my_errno=HA_ERR_UNSUPPORTED; diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index aa25c55f394..a8a5b62bc81 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -701,3 +701,520 @@ t2 CREATE TABLE `t2` ( drop table t1, t2; create table t1(a set("a,b","c,d") not null); ERROR HY000: Illegal set 'a,b' value found during parsing +create table t1 ( +c1 char(10), c2 char(10), c3 char(10), c4 char(10), +c5 char(10), c6 char(10), c7 char(10), c8 char(10), +c9 char(10), c10 char(10), c11 char(10), c12 char(10), +c13 char(10), c14 char(10), c15 char(10), c16 char(10), +key a001_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a002_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a003_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a004_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a005_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a006_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a007_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a008_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a009_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a010_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a011_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a012_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a013_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a014_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a015_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a016_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a017_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a018_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a019_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a020_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a021_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a022_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a023_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a024_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a025_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a026_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a027_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a028_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a029_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a030_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a031_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a032_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a033_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a034_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a035_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a036_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a037_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a038_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a039_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a040_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a041_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a042_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a043_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a044_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a045_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a046_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a047_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a048_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a049_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a050_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a051_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a052_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a053_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a054_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a055_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a056_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a057_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a058_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a059_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a060_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a061_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a062_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a063_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a064_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`) +); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` char(10) default NULL, + `c2` char(10) default NULL, + `c3` char(10) default NULL, + `c4` char(10) default NULL, + `c5` char(10) default NULL, + `c6` char(10) default NULL, + `c7` char(10) default NULL, + `c8` char(10) default NULL, + `c9` char(10) default NULL, + `c10` char(10) default NULL, + `c11` char(10) default NULL, + `c12` char(10) default NULL, + `c13` char(10) default NULL, + `c14` char(10) default NULL, + `c15` char(10) default NULL, + `c16` char(10) default NULL, + KEY `a001_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a002_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a003_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a004_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a005_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a006_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a007_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a008_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a009_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a010_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a011_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a012_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a013_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a014_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a015_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a016_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a017_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a018_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a019_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a020_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a021_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a022_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a023_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a024_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a025_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a026_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a027_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a028_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a029_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a030_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a031_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a032_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a033_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a034_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a035_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a036_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a037_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a038_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a039_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a040_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a041_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a042_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a043_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a044_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a045_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a046_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a047_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a048_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a049_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a050_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a051_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a052_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a053_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a054_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a055_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a056_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a057_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a058_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a059_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a060_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a061_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a062_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a063_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a064_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +flush tables; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` char(10) default NULL, + `c2` char(10) default NULL, + `c3` char(10) default NULL, + `c4` char(10) default NULL, + `c5` char(10) default NULL, + `c6` char(10) default NULL, + `c7` char(10) default NULL, + `c8` char(10) default NULL, + `c9` char(10) default NULL, + `c10` char(10) default NULL, + `c11` char(10) default NULL, + `c12` char(10) default NULL, + `c13` char(10) default NULL, + `c14` char(10) default NULL, + `c15` char(10) default NULL, + `c16` char(10) default NULL, + KEY `a001_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a002_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a003_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a004_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a005_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a006_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a007_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a008_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a009_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a010_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a011_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a012_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a013_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a014_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a015_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a016_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a017_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a018_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a019_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a020_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a021_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a022_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a023_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a024_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a025_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a026_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a027_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a028_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a029_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a030_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a031_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a032_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a033_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a034_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a035_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a036_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a037_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a038_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a039_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a040_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a041_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a042_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a043_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a044_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a045_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a046_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a047_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a048_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a049_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a050_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a051_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a052_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a053_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a054_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a055_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a056_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a057_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a058_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a059_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a060_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a061_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a062_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a063_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a064_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +create table t1 ( +c1 char(10), c2 char(10), c3 char(10), c4 char(10), +c5 char(10), c6 char(10), c7 char(10), c8 char(10), +c9 char(10), c10 char(10), c11 char(10), c12 char(10), +c13 char(10), c14 char(10), c15 char(10), c16 char(10) +); +alter table t1 +add key a001_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a002_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a003_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a004_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a005_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a006_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a007_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a008_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a009_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a010_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a011_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a012_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a013_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a014_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a015_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a016_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a017_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a018_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a019_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a020_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a021_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a022_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a023_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a024_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a025_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a026_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a027_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a028_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a029_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a030_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a031_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a032_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a033_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a034_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a035_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a036_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a037_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a038_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a039_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a040_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a041_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a042_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a043_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a044_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a045_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a046_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a047_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a048_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a049_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a050_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a051_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a052_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a053_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a054_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a055_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a056_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a057_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a058_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a059_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a060_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a061_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a062_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a063_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a064_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` char(10) default NULL, + `c2` char(10) default NULL, + `c3` char(10) default NULL, + `c4` char(10) default NULL, + `c5` char(10) default NULL, + `c6` char(10) default NULL, + `c7` char(10) default NULL, + `c8` char(10) default NULL, + `c9` char(10) default NULL, + `c10` char(10) default NULL, + `c11` char(10) default NULL, + `c12` char(10) default NULL, + `c13` char(10) default NULL, + `c14` char(10) default NULL, + `c15` char(10) default NULL, + `c16` char(10) default NULL, + KEY `a001_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a002_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a003_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a004_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a005_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a006_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a007_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a008_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a009_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a010_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a011_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a012_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a013_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a014_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a015_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a016_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a017_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a018_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a019_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a020_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a021_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a022_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a023_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a024_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a025_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a026_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a027_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a028_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a029_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a030_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a031_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a032_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a033_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a034_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a035_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a036_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a037_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a038_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a039_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a040_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a041_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a042_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a043_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a044_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a045_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a046_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a047_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a048_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a049_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a050_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a051_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a052_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a053_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a054_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a055_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a056_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a057_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a058_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a059_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a060_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a061_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a062_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a063_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a064_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +flush tables; +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` char(10) default NULL, + `c2` char(10) default NULL, + `c3` char(10) default NULL, + `c4` char(10) default NULL, + `c5` char(10) default NULL, + `c6` char(10) default NULL, + `c7` char(10) default NULL, + `c8` char(10) default NULL, + `c9` char(10) default NULL, + `c10` char(10) default NULL, + `c11` char(10) default NULL, + `c12` char(10) default NULL, + `c13` char(10) default NULL, + `c14` char(10) default NULL, + `c15` char(10) default NULL, + `c16` char(10) default NULL, + KEY `a001_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a002_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a003_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a004_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a005_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a006_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a007_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a008_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a009_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a010_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a011_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a012_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a013_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a014_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a015_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a016_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a017_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a018_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a019_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a020_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a021_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a022_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a023_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a024_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a025_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a026_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a027_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a028_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a029_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a030_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a031_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a032_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a033_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a034_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a035_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a036_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a037_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a038_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a039_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a040_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a041_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a042_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a043_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a044_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a045_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a046_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a047_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a048_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a049_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a050_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a051_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a052_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a053_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a054_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a055_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a056_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a057_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a058_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a059_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a060_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a061_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a062_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a063_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + KEY `a064_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +alter table t1 add key a065_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`); +ERROR 42000: Too many keys specified; max 64 keys allowed +drop table t1; +create table t1 ( +c1 char(10), c2 char(10), c3 char(10), c4 char(10), +c5 char(10), c6 char(10), c7 char(10), c8 char(10), +c9 char(10), c10 char(10), c11 char(10), c12 char(10), +c13 char(10), c14 char(10), c15 char(10), c16 char(10), +c17 char(10) +); +alter table t1 add key i1 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`, `c17`); +ERROR 42000: Too many key parts specified; max 16 parts allowed +alter table t1 add key a001_long_123456789_123456789_123456789_123456789_123456789_12345 (`c1`); +ERROR 42000: Identifier name 'a001_long_123456789_123456789_123456789_123456789_123456789_12345' is too long +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `c1` char(10) default NULL, + `c2` char(10) default NULL, + `c3` char(10) default NULL, + `c4` char(10) default NULL, + `c5` char(10) default NULL, + `c6` char(10) default NULL, + `c7` char(10) default NULL, + `c8` char(10) default NULL, + `c9` char(10) default NULL, + `c10` char(10) default NULL, + `c11` char(10) default NULL, + `c12` char(10) default NULL, + `c13` char(10) default NULL, + `c14` char(10) default NULL, + `c15` char(10) default NULL, + `c16` char(10) default NULL, + `c17` char(10) default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; +End of 4.1 tests diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 57b16a13c01..a3458298ff9 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -609,4 +609,214 @@ drop table t1, t2; --error 1105 create table t1(a set("a,b","c,d") not null); -# End of 4.1 tests + +# +# Bug #26642: create index corrupts table definition in .frm +# +# Problem with creating keys with maximum key-parts and maximum name length +# This test is made for a mysql server supporting names up to 64 bytes +# and a maximum of 16 key segements per Key +# + +create table t1 ( +c1 char(10), c2 char(10), c3 char(10), c4 char(10), +c5 char(10), c6 char(10), c7 char(10), c8 char(10), +c9 char(10), c10 char(10), c11 char(10), c12 char(10), +c13 char(10), c14 char(10), c15 char(10), c16 char(10), + +key a001_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a002_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a003_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a004_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a005_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a006_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a007_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a008_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a009_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + +key a010_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a011_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a012_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a013_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a014_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a015_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a016_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a017_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a018_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a019_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + +key a020_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a021_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a022_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a023_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a024_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a025_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a026_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a027_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a028_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a029_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + +key a030_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a031_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a032_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a033_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a034_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a035_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a036_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a037_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a038_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a039_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + +key a040_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a041_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a042_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a043_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a044_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a045_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a046_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a047_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a048_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a049_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + +key a050_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a051_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a052_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a053_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a054_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a055_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a056_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a057_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a058_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a059_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + +key a060_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a061_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a062_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a063_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +key a064_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`) +); + +# Check that the table is not corrupted +show create table t1; +flush tables; +show create table t1; + +# Repeat test using ALTER to add indexes + +drop table t1; +create table t1 ( +c1 char(10), c2 char(10), c3 char(10), c4 char(10), +c5 char(10), c6 char(10), c7 char(10), c8 char(10), +c9 char(10), c10 char(10), c11 char(10), c12 char(10), +c13 char(10), c14 char(10), c15 char(10), c16 char(10) +); + +alter table t1 + +add key a001_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a002_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a003_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a004_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a005_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a006_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a007_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a008_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a009_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + +add key a010_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a011_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a012_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a013_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a014_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a015_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a016_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a017_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a018_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a019_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + +add key a020_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a021_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a022_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a023_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a024_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a025_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a026_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a027_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a028_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a029_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + +add key a030_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a031_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a032_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a033_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a034_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a035_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a036_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a037_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a038_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a039_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + +add key a040_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a041_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a042_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a043_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a044_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a045_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a046_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a047_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a048_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a049_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + +add key a050_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a051_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a052_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a053_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a054_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a055_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a056_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a057_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a058_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a059_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), + +add key a060_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a061_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a062_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a063_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), +add key a064_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`); + +show create table t1; +flush tables; +show create table t1; + +# Test the server limits; if any of these pass, all above tests need +# to be rewritten to hit the limit +# +# Ensure limit is really 64 keys +--error 1069 +alter table t1 add key a065_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`); + +drop table t1; + +# Ensure limit is really 16 key parts per key + +create table t1 ( +c1 char(10), c2 char(10), c3 char(10), c4 char(10), +c5 char(10), c6 char(10), c7 char(10), c8 char(10), +c9 char(10), c10 char(10), c11 char(10), c12 char(10), +c13 char(10), c14 char(10), c15 char(10), c16 char(10), +c17 char(10) +); + +# Get error for max key parts +--error 1070 +alter table t1 add key i1 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`, `c17`); + +# Get error for max key-name length +--error 1059 +alter table t1 add key a001_long_123456789_123456789_123456789_123456789_123456789_12345 (`c1`); + +show create table t1; + +drop table t1; + +--echo End of 4.1 tests diff --git a/sql/table.cc b/sql/table.cc index a85da8395e7..f4f3fcf81dc 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1283,7 +1283,18 @@ File create_frm(register my_string name, const char *db, const char *table, fileinfo[3]= (uchar) ha_checktype(create_info->db_type); fileinfo[4]=1; int2store(fileinfo+6,IO_SIZE); /* Next block starts here */ - key_length=keys*(7+NAME_LEN+MAX_REF_PARTS*9)+16; + /* + For each key (see unireg.cc::pack_keys()): + 8 bytes for the key header + 9 bytes for each key-part (MAX_REF_PARTS) + NAME_LEN bytes for the name + 1 byte for the NAMES_SEP_CHAR (before the name) + For all keys: + 6 bytes for the header + 1 byte for the NAMES_SEP_CHAR (after the last name) + 9 extra bytes (padding for safety? alignment?) + */ + key_length= keys * (8 + MAX_REF_PARTS * 9 + NAME_LEN + 1) + 16; length=(ulong) next_io_size((ulong) (IO_SIZE+key_length+reclength)); int4store(fileinfo+10,length); if (key_length > 0xffff) key_length=0xffff; From 942bb0dfd9fcd30c035b0cf572f9dc6c78231951 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 17:40:42 -0600 Subject: [PATCH 062/153] Update test for bug #24563 (MBROverlaps does not seem to function propertly.): - Add primary key to test table, so NDB with binlog doesn't complain - Add extra results for bdb_gis.result mysql-test/include/gis_generic.inc: Update test for bug #24563 (MBROverlaps does not seem to function propertly.): - Add primary key to test table, so NDB with binlog doesn't complain mysql-test/r/archive_gis.result: update test results mysql-test/r/bdb_gis.result: update test results mysql-test/r/innodb_gis.result: update test results mysql-test/r/ndb_gis.result: update test results --- mysql-test/include/gis_generic.inc | 33 +++++++-------- mysql-test/r/archive_gis.result | 32 +++++++-------- mysql-test/r/bdb_gis.result | 57 ++++++++++++++++++-------- mysql-test/r/innodb_gis.result | 32 +++++++-------- mysql-test/r/ndb_gis.result | 64 +++++++++++++++--------------- 5 files changed, 122 insertions(+), 96 deletions(-) diff --git a/mysql-test/include/gis_generic.inc b/mysql-test/include/gis_generic.inc index 1b4303da1f8..9eb555a5401 100644 --- a/mysql-test/include/gis_generic.inc +++ b/mysql-test/include/gis_generic.inc @@ -188,28 +188,29 @@ drop table t1; # Test all MBR* functions and their non-MBR-prefixed aliases, # using shifted squares to verify the spatial relations. -create table t1 (name VARCHAR(100), square GEOMETRY); +# Primary key is needed for NDB with binlog +CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; diff --git a/mysql-test/r/archive_gis.result b/mysql-test/r/archive_gis.result index 97be26178ee..72641ce979d 100644 --- a/mysql-test/r/archive_gis.result +++ b/mysql-test/r/archive_gis.result @@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; End of 4.1 tests -create table t1 (name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; mbrcontains center,small diff --git a/mysql-test/r/bdb_gis.result b/mysql-test/r/bdb_gis.result index bb446badfff..7835dfbb9b8 100644 --- a/mysql-test/r/bdb_gis.result +++ b/mysql-test/r/bdb_gis.result @@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; End of 4.1 tests -create table t1 (name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; mbrcontains center,small @@ -515,5 +515,30 @@ down2,left2,right2,up2 SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS within FROM t1 a1 JOIN t1 a2 ON Within( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; within big,center +SET @vert1 = GeomFromText('POLYGON ((0 -2, 0 2, 0 -2))'); +SET @horiz1 = GeomFromText('POLYGON ((-2 0, 2 0, -2 0))'); +SET @horiz2 = GeomFromText('POLYGON ((-1 0, 3 0, -1 0))'); +SET @horiz3 = GeomFromText('POLYGON ((2 0, 3 0, 2 0))'); +SET @point1 = GeomFromText('POLYGON ((0 0))'); +SET @point2 = GeomFromText('POLYGON ((-2 0))'); +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @vert1) GROUP BY a1.name; +overlaps +SELECT GROUP_CONCAT(a1.name ORDER BY a1.name) AS overlaps FROM t1 a1 WHERE Overlaps(a1.square, @horiz1) GROUP BY a1.name; +overlaps +SELECT Overlaps(@horiz1, @vert1) FROM DUAL; +Overlaps(@horiz1, @vert1) +0 +SELECT Overlaps(@horiz1, @horiz2) FROM DUAL; +Overlaps(@horiz1, @horiz2) +1 +SELECT Overlaps(@horiz1, @horiz3) FROM DUAL; +Overlaps(@horiz1, @horiz3) +0 +SELECT Overlaps(@horiz1, @point1) FROM DUAL; +Overlaps(@horiz1, @point1) +0 +SELECT Overlaps(@horiz1, @point2) FROM DUAL; +Overlaps(@horiz1, @point2) +0 DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/r/innodb_gis.result b/mysql-test/r/innodb_gis.result index 727cf7dbc66..8fb939e29fa 100644 --- a/mysql-test/r/innodb_gis.result +++ b/mysql-test/r/innodb_gis.result @@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; End of 4.1 tests -create table t1 (name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; mbrcontains center,small diff --git a/mysql-test/r/ndb_gis.result b/mysql-test/r/ndb_gis.result index 5851df9ea6e..7e5e23b0eb6 100644 --- a/mysql-test/r/ndb_gis.result +++ b/mysql-test/r/ndb_gis.result @@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; End of 4.1 tests -create table t1 (name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; mbrcontains center,small @@ -1001,22 +1001,22 @@ insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; End of 4.1 tests -create table t1 (name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; mbrcontains center,small From 465cf7380aad2f370d97ec38a1c72d6acb174b16 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 17:50:06 -0600 Subject: [PATCH 063/153] Remove warning when compiling libmysqld/log.cc sql/log.cc: define print_buffer_to_file only ifdef EMBEDDED_LIBRARY, to avoid "defined but not used" warning --- sql/log.cc | 62 +++++++++++++++++++++++++++--------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/sql/log.cc b/sql/log.cc index ea82648b553..e0378f74f00 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2229,37 +2229,6 @@ static bool test_if_number(register const char *str, } /* test_if_number */ -static void print_buffer_to_file(enum loglevel level, const char *buffer) -{ - time_t skr; - struct tm tm_tmp; - struct tm *start; - DBUG_ENTER("print_buffer_to_file"); - DBUG_PRINT("enter",("buffer: %s", buffer)); - - VOID(pthread_mutex_lock(&LOCK_error_log)); - - skr=time(NULL); - localtime_r(&skr, &tm_tmp); - start=&tm_tmp; - fprintf(stderr, "%02d%02d%02d %2d:%02d:%02d [%s] %s\n", - start->tm_year % 100, - start->tm_mon+1, - start->tm_mday, - start->tm_hour, - start->tm_min, - start->tm_sec, - (level == ERROR_LEVEL ? "ERROR" : level == WARNING_LEVEL ? - "Warning" : "Note"), - buffer); - - fflush(stderr); - - VOID(pthread_mutex_unlock(&LOCK_error_log)); - DBUG_VOID_RETURN; -} - - void sql_perror(const char *message) { #ifdef HAVE_STRERROR @@ -2387,6 +2356,37 @@ void vprint_msg_to_log(enum loglevel level __attribute__((unused)), va_list argsi __attribute__((unused))) {} #else /*!EMBEDDED_LIBRARY*/ +static void print_buffer_to_file(enum loglevel level, const char *buffer) +{ + time_t skr; + struct tm tm_tmp; + struct tm *start; + DBUG_ENTER("print_buffer_to_file"); + DBUG_PRINT("enter",("buffer: %s", buffer)); + + VOID(pthread_mutex_lock(&LOCK_error_log)); + + skr=time(NULL); + localtime_r(&skr, &tm_tmp); + start=&tm_tmp; + fprintf(stderr, "%02d%02d%02d %2d:%02d:%02d [%s] %s\n", + start->tm_year % 100, + start->tm_mon+1, + start->tm_mday, + start->tm_hour, + start->tm_min, + start->tm_sec, + (level == ERROR_LEVEL ? "ERROR" : level == WARNING_LEVEL ? + "Warning" : "Note"), + buffer); + + fflush(stderr); + + VOID(pthread_mutex_unlock(&LOCK_error_log)); + DBUG_VOID_RETURN; +} + + void vprint_msg_to_log(enum loglevel level, const char *format, va_list args) { char buff[1024]; From b9fd97f5506376d64d470de2e9ac7ced02e33873 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 19:39:43 -0600 Subject: [PATCH 064/153] Update test for bug #24563 (MBROverlaps does not seem to function propertly.); ARCHIVE doesn't support AUTO_INCREMENT, so specify PK values explicitly mysql-test/r/archive_gis.result: update test result mysql-test/r/bdb_gis.result: update test result mysql-test/r/innodb_gis.result: update test result mysql-test/r/ndb_gis.result: update test result --- mysql-test/include/gis_generic.inc | 35 ++++++++-------- mysql-test/r/archive_gis.result | 32 +++++++-------- mysql-test/r/bdb_gis.result | 32 +++++++-------- mysql-test/r/innodb_gis.result | 32 +++++++-------- mysql-test/r/ndb_gis.result | 64 +++++++++++++++--------------- 5 files changed, 98 insertions(+), 97 deletions(-) diff --git a/mysql-test/include/gis_generic.inc b/mysql-test/include/gis_generic.inc index 9eb555a5401..d83db08ad6b 100644 --- a/mysql-test/include/gis_generic.inc +++ b/mysql-test/include/gis_generic.inc @@ -188,29 +188,30 @@ drop table t1; # Test all MBR* functions and their non-MBR-prefixed aliases, # using shifted squares to verify the spatial relations. -# Primary key is needed for NDB with binlog -CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), square GEOMETRY); +# Primary key is needed for NDB with binlog; bug ARCHIVE doesn't +# support AUTO_INCREMENT, so specify id values explicitly +CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; diff --git a/mysql-test/r/archive_gis.result b/mysql-test/r/archive_gis.result index 72641ce979d..4301befb18d 100644 --- a/mysql-test/r/archive_gis.result +++ b/mysql-test/r/archive_gis.result @@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; End of 4.1 tests -CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; mbrcontains center,small diff --git a/mysql-test/r/bdb_gis.result b/mysql-test/r/bdb_gis.result index 7835dfbb9b8..108e2cc7a94 100644 --- a/mysql-test/r/bdb_gis.result +++ b/mysql-test/r/bdb_gis.result @@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; End of 4.1 tests -CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; mbrcontains center,small diff --git a/mysql-test/r/innodb_gis.result b/mysql-test/r/innodb_gis.result index 8fb939e29fa..399ff697416 100644 --- a/mysql-test/r/innodb_gis.result +++ b/mysql-test/r/innodb_gis.result @@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; End of 4.1 tests -CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; mbrcontains center,small diff --git a/mysql-test/r/ndb_gis.result b/mysql-test/r/ndb_gis.result index 7e5e23b0eb6..df0ff8e972e 100644 --- a/mysql-test/r/ndb_gis.result +++ b/mysql-test/r/ndb_gis.result @@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; End of 4.1 tests -CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; mbrcontains center,small @@ -1001,22 +1001,22 @@ insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; End of 4.1 tests -CREATE TABLE t1 (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 (name, square) VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 (name, square) VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 (name, square) VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 (name, square) VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 (name, square) VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 (name, square) VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 (name, square) VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 (name, square) VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 (name, square) VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 (name, square) VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 (name, square) VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 (name, square) VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 (name, square) VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; mbrcontains center,small From db9af0d82239e2ff016d565e54f2f541f05bb9a3 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 19:49:30 -0600 Subject: [PATCH 065/153] Fix warning on Windows sql/log.cc: Change print_buffer_to_nt_eventlog() to take size_t instead of int/uint for buffer sizes --- sql/log.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/log.cc b/sql/log.cc index e0378f74f00..c2b4eb1a441 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -2296,7 +2296,7 @@ void MYSQL_LOG::signal_update() #ifdef __NT__ static void print_buffer_to_nt_eventlog(enum loglevel level, char *buff, - uint length, int buffLen) + size_t length, size_t buffLen) { HANDLE event; char *buffptr= buff; @@ -2390,7 +2390,7 @@ static void print_buffer_to_file(enum loglevel level, const char *buffer) void vprint_msg_to_log(enum loglevel level, const char *format, va_list args) { char buff[1024]; - uint length; + size_t length; DBUG_ENTER("vprint_msg_to_log"); length= my_vsnprintf(buff, sizeof(buff), format, args); From 18f10e353093a192d2465794c2273d598d939ac0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 10:59:05 +0800 Subject: [PATCH 066/153] Bug#24521, ndbd node crashes if try to create many datafiles for tablespace storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp: change MaxNoOfOpenFiles's default value to 0, that means no max openning files limitation in ndbfs when user doesnot set explicitly the value in config.ini; Meanwhile, if user set a specific value of MaxNoOfOpenFile and hit the max limiation, he deserves the result. storage/ndb/src/mgmsrv/ConfigInfo.cpp: change default to 0 storage/ndb/src/mgmsrv/ParamInfo.cpp: change default to 0 --- storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp | 6 +++--- storage/ndb/src/mgmsrv/ConfigInfo.cpp | 2 +- storage/ndb/src/mgmsrv/ParamInfo.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp index 6fb9ef774d0..aa124770d23 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp @@ -105,11 +105,11 @@ Ndbfs::execREAD_CONFIG_REQ(Signal* signal) theRequestPool = new Pool; - m_maxFiles = 40; + m_maxFiles = 0; ndb_mgm_get_int_parameter(p, CFG_DB_MAX_OPEN_FILES, &m_maxFiles); Uint32 noIdleFiles = 27; ndb_mgm_get_int_parameter(p, CFG_DB_INITIAL_OPEN_FILES, &noIdleFiles); - if (noIdleFiles > m_maxFiles) + if (noIdleFiles > m_maxFiles && m_maxFiles != 0) m_maxFiles = noIdleFiles; // Create idle AsyncFiles for (Uint32 i = 0; i < noIdleFiles; i++){ @@ -650,7 +650,7 @@ AsyncFile* Ndbfs::createAsyncFile(){ // Check limit of open files - if (theFiles.size()+1 == m_maxFiles) { + if (m_maxFiles !=0 && theFiles.size()+1 == m_maxFiles) { // Print info about all open files for (unsigned i = 0; i < theFiles.size(); i++){ AsyncFile* file = theFiles[i]; diff --git a/storage/ndb/src/mgmsrv/ConfigInfo.cpp b/storage/ndb/src/mgmsrv/ConfigInfo.cpp index 6351af7246e..224758f8c5f 100644 --- a/storage/ndb/src/mgmsrv/ConfigInfo.cpp +++ b/storage/ndb/src/mgmsrv/ConfigInfo.cpp @@ -879,7 +879,7 @@ const ConfigInfo::ParamInfo ConfigInfo::m_ParamInfo[] = { ConfigInfo::CI_USED, false, ConfigInfo::CI_INT, - "40", + "0", "20", STR_VALUE(MAX_INT_RNIL) }, diff --git a/storage/ndb/src/mgmsrv/ParamInfo.cpp b/storage/ndb/src/mgmsrv/ParamInfo.cpp index 888b7948c05..a05472de2cb 100644 --- a/storage/ndb/src/mgmsrv/ParamInfo.cpp +++ b/storage/ndb/src/mgmsrv/ParamInfo.cpp @@ -705,7 +705,7 @@ const ParamInfo ParamInfoArray[] = { CI_USED, false, CI_INT, - "40", + "0", "20", STR_VALUE(MAX_INT_RNIL) }, From 86010101e294559d83d0c99def8160eddcf4ce55 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 09:08:30 +0500 Subject: [PATCH 067/153] Fix for bugs #27176: Assigning a string to an year column has unexpected results #26359: Strings becoming truncated and converted to numbers under STRICT mode Problems: 1. storing a string to an integer field we don't check if strntoull10rnd() returns MY_ERRNO_EDOM error. Fix: check for MY_ERRNO_EDOM. 2. storing a string to an year field we use my_strntol() function. Fix: use strntoull10rnd() instead. mysql-test/r/strict.result: Fix for bugs #27176: Assigning a string to an year column has unexpected results #26359: Strings becoming truncated and converted to numbers under STRICT mode - test result. mysql-test/r/type_date.result: Fix for bugs #27176: Assigning a string to an year column has unexpected results #26359: Strings becoming truncated and converted to numbers under STRICT mode - test result. mysql-test/r/type_year.result: Fix for bugs #27176: Assigning a string to an year column has unexpected results #26359: Strings becoming truncated and converted to numbers under STRICT mode - test result. mysql-test/t/strict.test: Fix for bugs #27176: Assigning a string to an year column has unexpected results #26359: Strings becoming truncated and converted to numbers under STRICT mode - test case. mysql-test/t/type_year.test: Fix for bugs #27176: Assigning a string to an year column has unexpected results #26359: Strings becoming truncated and converted to numbers under STRICT mode sql/field.cc: Fix for bugs #27176: Assigning a string to an year column has unexpected results #26359: Strings becoming truncated and converted to numbers under STRICT mode - Field_num::get_int() method introduced. It converts a string to integer then check errors and bounds. - similar Field_tiny::store(const char...), Field_short::store(const char...), Field_medium::store(const char...), Field_long::store(const char...) rewritten, now they just call Field_num::get_int() then store value returned. - Field_num::check_int() simplified. - Field_year::store(const char...) now uses strntoull10rnd() and properly checks errors returned. sql/field.h: Fix for bugs #27176: Assigning a string to an year column has unexpected results #26359: Strings becoming truncated and converted to numbers under STRICT mode - check_int() moved to Field_num. - get_int() introduced. --- mysql-test/r/strict.result | 41 ++++ mysql-test/r/type_date.result | 2 +- mysql-test/r/type_year.result | 12 ++ mysql-test/t/strict.test | 50 +++++ mysql-test/t/type_year.test | 10 +- sql/field.cc | 371 +++++++++++++--------------------- sql/field.h | 7 +- 7 files changed, 263 insertions(+), 230 deletions(-) diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result index 702fc68bb25..93ce4fb8f7c 100644 --- a/mysql-test/r/strict.result +++ b/mysql-test/r/strict.result @@ -1352,3 +1352,44 @@ t1 CREATE TABLE `t1` ( `i` int(11) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 COMMENT='123456789*123456789*123456789*123456789*123456789*123456789*' drop table t1; +set sql_mode= 'traditional'; +create table t1(col1 tinyint, col2 tinyint unsigned, +col3 smallint, col4 smallint unsigned, +col5 mediumint, col6 mediumint unsigned, +col7 int, col8 int unsigned, +col9 bigint, col10 bigint unsigned); +insert into t1(col1) values('-'); +ERROR HY000: Incorrect integer value: '-' for column 'col1' at row 1 +insert into t1(col2) values('+'); +ERROR HY000: Incorrect integer value: '+' for column 'col2' at row 1 +insert into t1(col3) values('-'); +ERROR HY000: Incorrect integer value: '-' for column 'col3' at row 1 +insert into t1(col4) values('+'); +ERROR HY000: Incorrect integer value: '+' for column 'col4' at row 1 +insert into t1(col5) values('-'); +ERROR HY000: Incorrect integer value: '-' for column 'col5' at row 1 +insert into t1(col6) values('+'); +ERROR HY000: Incorrect integer value: '+' for column 'col6' at row 1 +insert into t1(col7) values('-'); +ERROR HY000: Incorrect integer value: '-' for column 'col7' at row 1 +insert into t1(col8) values('+'); +ERROR HY000: Incorrect integer value: '+' for column 'col8' at row 1 +insert into t1(col9) values('-'); +ERROR HY000: Incorrect integer value: '-' for column 'col9' at row 1 +insert into t1(col10) values('+'); +ERROR HY000: Incorrect integer value: '+' for column 'col10' at row 1 +drop table t1; +set sql_mode='traditional'; +create table t1(a year); +insert into t1 values ('-'); +ERROR HY000: Incorrect integer value: '-' for column 'a' at row 1 +insert into t1 values ('+'); +ERROR HY000: Incorrect integer value: '+' for column 'a' at row 1 +insert into t1 values (''); +ERROR HY000: Incorrect integer value: '' for column 'a' at row 1 +insert into t1 values ('2000a'); +ERROR 01000: Data truncated for column 'a' at row 1 +insert into t1 values ('2E3x'); +ERROR 01000: Data truncated for column 'a' at row 1 +drop table t1; +End of 5.0 tests diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result index ed15293bb45..644d4d971c6 100644 --- a/mysql-test/r/type_date.result +++ b/mysql-test/r/type_date.result @@ -99,7 +99,7 @@ DROP TABLE t1, t2, t3; CREATE TABLE t1 (y YEAR); INSERT INTO t1 VALUES ('abc'); Warnings: -Warning 1264 Out of range value adjusted for column 'y' at row 1 +Warning 1366 Incorrect integer value: 'abc' for column 'y' at row 1 SELECT * FROM t1; y 0000 diff --git a/mysql-test/r/type_year.result b/mysql-test/r/type_year.result index 84b688429db..e52947455c8 100644 --- a/mysql-test/r/type_year.result +++ b/mysql-test/r/type_year.result @@ -34,3 +34,15 @@ select if(y = now(), 1, 0) from t1; if(y = now(), 1, 0) 1 drop table t1; +create table t1(a year); +insert into t1 values (2000.5), ('2000.5'), ('2001a'), ('2.001E3'); +Warnings: +Warning 1265 Data truncated for column 'a' at row 3 +select * from t1; +a +2001 +2001 +2001 +2001 +drop table t1; +End of 5.0 tests diff --git a/mysql-test/t/strict.test b/mysql-test/t/strict.test index 224a7422de1..53b3bc03ff7 100644 --- a/mysql-test/t/strict.test +++ b/mysql-test/t/strict.test @@ -1208,3 +1208,53 @@ create table t1 (i int) comment '123456789*123456789*123456789*123456789*123456789*123456789*'; show create table t1; drop table t1; + +# +# Bug #26359: Strings becoming truncated and converted to numbers under STRICT mode +# +set sql_mode= 'traditional'; +create table t1(col1 tinyint, col2 tinyint unsigned, + col3 smallint, col4 smallint unsigned, + col5 mediumint, col6 mediumint unsigned, + col7 int, col8 int unsigned, + col9 bigint, col10 bigint unsigned); +--error 1366 +insert into t1(col1) values('-'); +--error 1366 +insert into t1(col2) values('+'); +--error 1366 +insert into t1(col3) values('-'); +--error 1366 +insert into t1(col4) values('+'); +--error 1366 +insert into t1(col5) values('-'); +--error 1366 +insert into t1(col6) values('+'); +--error 1366 +insert into t1(col7) values('-'); +--error 1366 +insert into t1(col8) values('+'); +--error 1366 +insert into t1(col9) values('-'); +--error 1366 +insert into t1(col10) values('+'); +drop table t1; + +# +# Bug #27176: Assigning a string to an year column has unexpected results +# +set sql_mode='traditional'; +create table t1(a year); +--error 1366 +insert into t1 values ('-'); +--error 1366 +insert into t1 values ('+'); +--error 1366 +insert into t1 values (''); +--error 1265 +insert into t1 values ('2000a'); +--error 1265 +insert into t1 values ('2E3x'); +drop table t1; + +--echo End of 5.0 tests diff --git a/mysql-test/t/type_year.test b/mysql-test/t/type_year.test index 9744da24c02..0e174a556d6 100644 --- a/mysql-test/t/type_year.test +++ b/mysql-test/t/type_year.test @@ -21,4 +21,12 @@ insert into t1 values (now()); select if(y = now(), 1, 0) from t1; drop table t1; -# End of 4.1 tests +# +# Bug #27176: Assigning a string to an year column has unexpected results +# +create table t1(a year); +insert into t1 values (2000.5), ('2000.5'), ('2001a'), ('2.001E3'); +select * from t1; +drop table t1; + +--echo End of 5.0 tests diff --git a/sql/field.cc b/sql/field.cc index a95d0069985..352f08e40ce 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -963,6 +963,31 @@ static Item_result field_types_result_type [FIELDTYPE_NUM]= }; +/* + Test if the given string contains important data: + not spaces for character string, + or any data for binary string. + + SYNOPSIS + test_if_important_data() + cs Character set + str String to test + strend String end + + RETURN + FALSE - If string does not have important data + TRUE - If string has some important data +*/ + +static bool +test_if_important_data(CHARSET_INFO *cs, const char *str, const char *strend) +{ + if (cs != &my_charset_bin) + str+= cs->cset->scan(cs, str, strend, MY_SEQ_SPACES); + return (str < strend); +} + + /* Detect Item_result by given field type of UNION merge result @@ -1051,65 +1076,114 @@ void Field_num::prepend_zeros(String *value) } /* - Test if given number is a int (or a fixed format float with .000) + Test if given number is a int. SYNOPSIS - test_if_int() + Field_num::check_int + cs Character set str String to test end Pointer to char after last used digit - cs Character set + length String length + error Error returned by strntoull10rnd() - NOTES - This is called after one has called my_strntol() or similar function. - This is only used to give warnings in ALTER TABLE or LOAD DATA... - - TODO - Make this multi-byte-character safe + NOTE + This is called after one has called strntoull10rnd() function. RETURN - 0 OK - 1 error. A warning is pushed if field_name != 0 + 0 ok + 1 error: empty string or wrong integer. + 2 error: garbage at the end of string. */ -bool Field::check_int(const char *str, int length, const char *int_end, - CHARSET_INFO *cs) +int Field_num::check_int(CHARSET_INFO *cs, const char *str, int length, + const char *int_end, int error) { - const char *end; - if (str == int_end) + /* Test if we get an empty string or wrong integer */ + if (str == int_end || error == MY_ERRNO_EDOM) { char buff[128]; - String tmp(buff,(uint32) sizeof(buff), system_charset_info); + String tmp(buff, (uint32) sizeof(buff), system_charset_info); tmp.copy(str, length, system_charset_info); push_warning_printf(table->in_use, MYSQL_ERROR::WARN_LEVEL_WARN, ER_TRUNCATED_WRONG_VALUE_FOR_FIELD, ER(ER_TRUNCATED_WRONG_VALUE_FOR_FIELD), "integer", tmp.c_ptr(), field_name, (ulong) table->in_use->row_count); - return 1; // Empty string + return 1; } - end= str+length; - if ((str= int_end) == end) - return 0; // OK; All digits was used - - /* Allow end .0000 */ - if (*str == '.') + /* Test if we have garbage at the end of the given string. */ + if (test_if_important_data(cs, int_end, str + length)) { - for (str++ ; str != end && *str == '0'; str++) - ; - } - /* Allow end space */ - for ( ; str != end ; str++) - { - if (!my_isspace(cs,*str)) - { - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, WARN_DATA_TRUNCATED, 1); - return 1; - } + set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, WARN_DATA_TRUNCATED, 1); + return 2; } return 0; } +/* + Conver a string to an integer then check bounds. + + SYNOPSIS + Field_num::get_int + cs Character set + from String to convert + len Length of the string + rnd OUT longlong value + unsigned_max max unsigned value + signed_min min signed value + signed_max max signed value + + DESCRIPTION + The function calls strntoull10rnd() to get an integer value then + check bounds and errors returned. In case of any error a warning + is raised. + + RETURN + 0 ok + 1 error +*/ + +bool Field_num::get_int(CHARSET_INFO *cs, const char *from, uint len, + longlong *rnd, ulonglong unsigned_max, + longlong signed_min, longlong signed_max) +{ + char *end; + int error; + + *rnd= (longlong) cs->cset->strntoull10rnd(cs, from, len, unsigned_flag, &end, + &error); + if (unsigned_flag) + { + + if (((ulonglong) *rnd > unsigned_max) && (*rnd= (longlong) unsigned_max) || + error == MY_ERRNO_ERANGE) + { + goto out_of_range; + } + } + else + { + if (*rnd < signed_min) + { + *rnd= signed_min; + goto out_of_range; + } + else if (*rnd > signed_max) + { + *rnd= signed_max; + goto out_of_range; + } + } + if (table->in_use->count_cuted_fields && check_int(cs, from, len, end, error)) + return 1; + return 0; + +out_of_range: + set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); + return 1; +} + /* Process decimal library return codes and issue warnings for overflow and truncation. @@ -2505,45 +2579,11 @@ void Field_new_decimal::sql_type(String &str) const int Field_tiny::store(const char *from,uint len,CHARSET_INFO *cs) { - char *end; int error; - - if (unsigned_flag) - { - ulonglong tmp= cs->cset->strntoull10rnd(cs, from, len, 1, &end, &error); - if (error == MY_ERRNO_ERANGE || tmp > 255) - { - set_if_smaller(tmp, 255); - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; - ptr[0]= (char) tmp; - } - else - { - longlong tmp= cs->cset->strntoull10rnd(cs, from, len, 0, &end, &error); - if (tmp < -128) - { - tmp= -128; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (tmp >= 128) - { - tmp= 127; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; - ptr[0]= (char) tmp; - } + longlong rnd; + + error= get_int(cs, from, len, &rnd, 255, -128, 127); + ptr[0]= unsigned_flag ? (char) (ulonglong) rnd : (char) rnd; return error; } @@ -2708,59 +2748,20 @@ void Field_tiny::sql_type(String &res) const int Field_short::store(const char *from,uint len,CHARSET_INFO *cs) { - char *end; + int store_tmp; int error; - - if (unsigned_flag) - { - ulonglong tmp= cs->cset->strntoull10rnd(cs, from, len, 1, &end, &error); - if (error == MY_ERRNO_ERANGE || tmp > UINT_MAX16) - { - set_if_smaller(tmp, UINT_MAX16); - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; + longlong rnd; + + error= get_int(cs, from, len, &rnd, UINT_MAX16, INT_MIN16, INT_MAX16); + store_tmp= unsigned_flag ? (int) (ulonglong) rnd : (int) rnd; #ifdef WORDS_BIGENDIAN - if (table->s->db_low_byte_first) - { - int2store(ptr,tmp); - } - else -#endif - shortstore(ptr,(short) tmp); + if (table->s->db_low_byte_first) + { + int2store(ptr, store_tmp); } else - { - longlong tmp= cs->cset->strntoull10rnd(cs, from, len, 0, &end, &error); - if (tmp < INT_MIN16) - { - tmp= INT_MIN16; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (tmp > INT_MAX16) - { - tmp=INT_MAX16; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; -#ifdef WORDS_BIGENDIAN - if (table->s->db_low_byte_first) - { - int2store(ptr,tmp); - } - else #endif - shortstore(ptr,(short) tmp); - } + shortstore(ptr, (short) store_tmp); return error; } @@ -2988,45 +2989,13 @@ void Field_short::sql_type(String &res) const int Field_medium::store(const char *from,uint len,CHARSET_INFO *cs) { - char *end; + int store_tmp; int error; - - if (unsigned_flag) - { - ulonglong tmp= cs->cset->strntoull10rnd(cs, from, len, 1, &end, &error); - if (error == MY_ERRNO_ERANGE || tmp > UINT_MAX24) - { - set_if_smaller(tmp, UINT_MAX24); - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; - int3store(ptr,tmp); - } - else - { - longlong tmp= cs->cset->strntoull10rnd(cs, from, len, 0, &end, &error); - if (tmp < INT_MIN24) - { - tmp= INT_MIN24; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (tmp > INT_MAX24) - { - tmp=INT_MAX24; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; - int3store(ptr,tmp); - } + longlong rnd; + + error= get_int(cs, from, len, &rnd, UINT_MAX24, INT_MIN24, INT_MAX24); + store_tmp= unsigned_flag ? (int) (ulonglong) rnd : (int) rnd; + int3store(ptr, store_tmp); return error; } @@ -3205,45 +3174,10 @@ int Field_long::store(const char *from,uint len,CHARSET_INFO *cs) { long store_tmp; int error; - char *end; - - if (unsigned_flag) - { - ulonglong tmp= cs->cset->strntoull10rnd(cs, from, len, 1, &end, &error); - if (error == MY_ERRNO_ERANGE || tmp > (ulonglong) UINT_MAX32) - { - set_if_smaller(tmp, (ulonglong) UINT_MAX32); - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; - store_tmp= (long) tmp; - } - else - { - longlong tmp= cs->cset->strntoull10rnd(cs, from, len, 0, &end, &error); - if (tmp < INT_MIN32) - { - tmp= INT_MIN32; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (tmp > INT_MAX32) - { - tmp=INT_MAX32; - set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); - error= 1; - } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) - error= 1; - else - error= 0; - store_tmp= (long) tmp; - } - + longlong rnd; + + error= get_int(cs, from, len, &rnd, UINT_MAX32, INT_MIN32, INT_MAX32); + store_tmp= unsigned_flag ? (long) (ulonglong) rnd : (long) rnd; #ifdef WORDS_BIGENDIAN if (table->s->db_low_byte_first) { @@ -3489,7 +3423,8 @@ int Field_longlong::store(const char *from,uint len,CHARSET_INFO *cs) set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); error= 1; } - else if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) + else if (table->in_use->count_cuted_fields && + check_int(cs, from, len, end, error)) error= 1; else error= 0; @@ -5007,16 +4942,25 @@ int Field_year::store(const char *from, uint len,CHARSET_INFO *cs) { char *end; int error; - long nr= my_strntol(cs, from, len, 10, &end, &error); + longlong nr= cs->cset->strntoull10rnd(cs, from, len, 0, &end, &error); - if (nr < 0 || nr >= 100 && nr <= 1900 || nr > 2155 || error) + if (nr < 0 || nr >= 100 && nr <= 1900 || nr > 2155 || + error == MY_ERRNO_ERANGE) { *ptr=0; set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE, 1); return 1; } - if (table->in_use->count_cuted_fields && check_int(from,len,end,cs)) + if (table->in_use->count_cuted_fields && + (error= check_int(cs, from, len, end, error))) + { + if (error == 1) /* empty or incorrect string */ + { + *ptr= 0; + return 1; + } error= 1; + } if (nr != 0 || len != 4) { @@ -5906,31 +5850,6 @@ report_data_too_long(Field_str *field) } -/* - Test if the given string contains important data: - not spaces for character string, - or any data for binary string. - - SYNOPSIS - test_if_important_data() - cs Character set - str String to test - strend String end - - RETURN - FALSE - If string does not have important data - TRUE - If string has some important data -*/ - -static bool -test_if_important_data(CHARSET_INFO *cs, const char *str, const char *strend) -{ - if (cs != &my_charset_bin) - str+= cs->cset->scan(cs, str, strend, MY_SEQ_SPACES); - return (str < strend); -} - - /* Copy a string and fill with space */ int Field_string::store(const char *from,uint length,CHARSET_INFO *cs) diff --git a/sql/field.h b/sql/field.h index 524380800f3..32553573433 100644 --- a/sql/field.h +++ b/sql/field.h @@ -306,8 +306,6 @@ public: virtual void set_derivation(enum Derivation derivation_arg) { } bool set_warning(MYSQL_ERROR::enum_warning_level, unsigned int code, int cuted_increment); - bool check_int(const char *str, int length, const char *int_end, - CHARSET_INFO *cs); void set_datetime_warning(MYSQL_ERROR::enum_warning_level, uint code, const char *str, uint str_len, timestamp_type ts_type, int cuted_increment); @@ -369,6 +367,11 @@ public: bool eq_def(Field *field); int store_decimal(const my_decimal *); my_decimal *val_decimal(my_decimal *); + int check_int(CHARSET_INFO *cs, const char *str, int length, + const char *int_end, int error); + bool get_int(CHARSET_INFO *cs, const char *from, uint len, + longlong *rnd, ulonglong unsigned_max, + longlong signed_min, longlong signed_max); }; From 3832b71b994714a45616cd8860a899a151d32697 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 22:41:21 -0600 Subject: [PATCH 068/153] Apply innodb-5.0-ss1372 snapshot Bug #27381: InnoDB exits when attempting to rename table to non-existant database Fix Bug#27381 by calling os_file_handle_error_no_exit() instead of os_file_handle_error(). innobase/dict/dict0dict.c: Apply innodb-5.0-ss1372 snapshot Revision r1351: branches/5.0: Merge r1350 from trunk: Lock the data dictionary during rollback. This removes the rare debug assertion failure ut_ad(mutex_own(&(dict_sys->mutex))) in dict_table_get_on_id() after the rollback following crash recovery. innobase/os/os0file.c: Apply innodb-5.0-ss1372 snapshot Revision r1354: branches/5.0: Merge r1352 from trunk: (also make indentation the same as in 5.1 to ease further merges) Fix typo in comment in os/os0file.c Revision r1370: branches/5.0: Merge r1366 from trunk: Fix Bug#27381 by calling os_file_handle_error_no_exit() instead of os_file_handle_error(). innobase/row/row0undo.c: Apply innodb-5.0-ss1372 snapshot Revision r1351: branches/5.0: Merge r1350 from trunk: Lock the data dictionary during rollback. This removes the rare debug assertion failure ut_ad(mutex_own(&(dict_sys->mutex))) in dict_table_get_on_id() after the rollback following crash recovery. --- innobase/dict/dict0dict.c | 3 ++- innobase/os/os0file.c | 20 ++++++++++---------- innobase/row/row0undo.c | 20 ++++++++++---------- 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/innobase/dict/dict0dict.c b/innobase/dict/dict0dict.c index 33aebb25071..96c822857df 100644 --- a/innobase/dict/dict0dict.c +++ b/innobase/dict/dict0dict.c @@ -628,7 +628,8 @@ dict_table_get_on_id( CREATE, for example, we already have the mutex! */ #ifdef UNIV_SYNC_DEBUG - ut_ad(mutex_own(&(dict_sys->mutex))); + ut_ad(mutex_own(&(dict_sys->mutex)) + || trx->dict_operation_lock_mode == RW_X_LATCH); #endif /* UNIV_SYNC_DEBUG */ return(dict_table_get_on_id_low(table_id, trx)); diff --git a/innobase/os/os0file.c b/innobase/os/os0file.c index 5e5c4b19eb0..72f1f837fee 100644 --- a/innobase/os/os0file.c +++ b/innobase/os/os0file.c @@ -920,14 +920,14 @@ try_again: } file = CreateFile((LPCTSTR) name, - access, - FILE_SHARE_READ | FILE_SHARE_WRITE, - /* file can be read ansd written also - by other processes */ - NULL, /* default security attributes */ - create_flag, - attributes, - NULL); /* no template file */ + access, + FILE_SHARE_READ | FILE_SHARE_WRITE, + /* file can be read and written also + by other processes */ + NULL, /* default security attributes */ + create_flag, + attributes, + NULL); /* no template file */ if (file == INVALID_HANDLE_VALUE) { *success = FALSE; @@ -1494,7 +1494,7 @@ os_file_rename( return(TRUE); } - os_file_handle_error(oldpath, "rename"); + os_file_handle_error_no_exit(oldpath, "rename"); return(FALSE); #else @@ -1503,7 +1503,7 @@ os_file_rename( ret = rename((const char*)oldpath, (const char*)newpath); if (ret != 0) { - os_file_handle_error(oldpath, "rename"); + os_file_handle_error_no_exit(oldpath, "rename"); return(FALSE); } diff --git a/innobase/row/row0undo.c b/innobase/row/row0undo.c index 435c0279dbb..c9727e0098e 100644 --- a/innobase/row/row0undo.c +++ b/innobase/row/row0undo.c @@ -212,7 +212,7 @@ row_undo( ulint err; trx_t* trx; dulint roll_ptr; - ibool froze_data_dict = FALSE; + ibool locked_data_dict; ut_ad(node && thr); @@ -263,15 +263,15 @@ row_undo( } /* Prevent DROP TABLE etc. while we are rolling back this row. - If we are doing a TABLE CREATE or some other dictionary operation, - then we already have dict_operation_lock locked in x-mode. Do not - try to lock again in s-mode, because that would cause a hang. */ + If we are doing a TABLE CREATE or some other dictionary operation, + then we already have dict_operation_lock locked in x-mode. Do not + try to lock again, because that would cause a hang. */ - if (trx->dict_operation_lock_mode == 0) { - - row_mysql_freeze_data_dictionary(trx); + locked_data_dict = (trx->dict_operation_lock_mode == 0); - froze_data_dict = TRUE; + if (locked_data_dict) { + + row_mysql_lock_data_dictionary(trx); } if (node->state == UNDO_NODE_INSERT) { @@ -284,9 +284,9 @@ row_undo( err = row_undo_mod(node, thr); } - if (froze_data_dict) { + if (locked_data_dict) { - row_mysql_unfreeze_data_dictionary(trx); + row_mysql_unlock_data_dictionary(trx); } /* Do some cleanup */ From f3009f3f061a4177255111c1f853dd814aea7bdd Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 28 Mar 2007 22:46:28 -0600 Subject: [PATCH 069/153] Applied innodb-5.1-ss1381 snapshot Bug #27381: InnoDB exits when attempting to rename table to non-existant database Fix Bug#27381 by calling os_file_handle_error_no_exit() instead of os_file_handle_error(). mysql-test/t/innodb.test: Applied innodb-5.1-ss1381 snapshot Revision r1373: Port r1372 from branches/5.0: Merge a change from MySQL AB, and remove the innodb_gis test case. ChangeSet 2007/02/19 13:57:06+03:00 kaa@polly.local Bug#18743: Several test cases fails if "classic" configuration in 5.0 The problem happened because those tests were using "cp932" and "ucs2" without checking whether these character sets are available. This fix moves test parts to make character set specific parts be tested only if they are: - some parts were moved to "ctype_ucs.test" and "ctype_cp932.test" - some parts were moved to the newly added tests "innodb-ucs2.test", "mysqlbinglog-cp932.test" and "sp-ucs2.test" mysql-test/t/innodb.test 2007/02/19 13:57:02+03:00 kaa@polly.local +0 -222 Moved ucs2-specific test cases to innodb-ucs2.test storage/innobase/Makefile.am: Applied innodb-5.1-ss1381 snapshot Revision r1353: Makefile.am: EXTRA_DIST: Add the grammar source files to the source distribution of MySQL. storage/innobase/dict/dict0dict.c: Applied innodb-5.1-ss1381 snapshot Revision r1350: Lock the data dictionary during rollback. This removes the rare debug assertion failure ut_ad(mutex_own(&(dict_sys->mutex))) in dict_table_get_on_id() after the rollback following crash recovery. storage/innobase/handler/ha_innodb.cc: Applied innodb-5.1-ss1381 snapshot Revision r1377: Add static qualifiers to some symbols in ha_innodb.cc that are not referenced from other modules. Revision r1380: Remove ha_innobase::last_query_id and references to thd->query_id. MySQL calls external_lock at the beginning and end of a statement when it is not calling start_stmt or commit or rollback. Thus, statement boundaries can be (and are already) detected without monitoring thd->query_id. The function innobase_commit() seemingly lacks the call to innobase_release_stat_resources(), which should be called at the end of every SQL statement. The call was replaced by equivalent statements by Vadim Tkachenko when he implemented innodb_commit_concurrency in MySQL 5.0: http://mysql.bkbits.net:8080/mysql-5.0/?PAGE=patch&REV=1.1886.70.1 Revision r1355: class ha_innobase: Replace statistic_increment() with ha_statistic_increment(). ha_innobase::change_active_index(): Do not call current_thd unless UNIV_DEBUG is defined. Revision r1369: Merge a change from MySQL AB: ChangeSet@1.2409.1.83 2007-03-06 10:36:15-07:00 tsmith@hindu.god Bug #26598: Create variable to allow turning off of statistic gathering on metadata commands Add innodb_stats_on_metadata option, which enables gathering index statistics when processing metadata commands such as SHOW TABLE STATUS. Default behavior of the server does not change (this option is enabled by default). Revision r1342: Minor cleanup in ha_innodb.cc. Remove the unused constants HA_INNOBASE_ROWS_IN_TABLE and HA_INNOBASE_RANGE_COUNT. Declare innobase_active_counter static. Revision r1381: innobase_commit(): Correct the comments and formatting that were broken when innodb_commit_concurrency was implemented. Revision r1360: Minor cleanup. innobase_query_caching_of_table_permitted(): Make static. ha_innobase::register_query_cache_table(): Move the function definition from ha_innodb.h to ha_innodb.cc. Add comments. storage/innobase/handler/ha_innodb.h: Applied innodb-5.1-ss1381 snapshot Revision r1377: Add static qualifiers to some symbols in ha_innodb.cc that are not referenced from other modules. Revision r1380: Remove ha_innobase::last_query_id and references to thd->query_id. MySQL calls external_lock at the beginning and end of a statement when it is not calling start_stmt or commit or rollback. Thus, statement boundaries can be (and are already) detected without monitoring thd->query_id. The function innobase_commit() seemingly lacks the call to innobase_release_stat_resources(), which should be called at the end of every SQL statement. The call was replaced by equivalent statements by Vadim Tkachenko when he implemented innodb_commit_concurrency in MySQL 5.0: http://mysql.bkbits.net:8080/mysql-5.0/?PAGE=patch&REV=1.1886.70.1 Revision r1369: Merge a change from MySQL AB: ChangeSet@1.2409.1.83 2007-03-06 10:36:15-07:00 tsmith@hindu.god Bug #26598: Create variable to allow turning off of statistic gathering on metadata commands Add innodb_stats_on_metadata option, which enables gathering index statistics when processing metadata commands such as SHOW TABLE STATUS. Default behavior of the server does not change (this option is enabled by default). Revision r1360: Minor cleanup. innobase_query_caching_of_table_permitted(): Make static. ha_innobase::register_query_cache_table(): Move the function definition from ha_innodb.h to ha_innodb.cc. Add comments. storage/innobase/include/trx0trx.h: Applied innodb-5.1-ss1381 snapshot Revision r1344: Rename the Boolean field trx->type to trx->is_purge and remove the constants TRX_USER and TRX_PURGE. Revision r1343: trx_sig_struct: Remove state. It is always assigned to TRX_SIG_WAITING and never tested. storage/innobase/os/os0file.c: Applied innodb-5.1-ss1381 snapshot Revision r1352: Fix typo in comment in os/os0file.c Approved by: heikki Revision r1366: Fix Bug#27381 by calling os_file_handle_error_no_exit() instead of os_file_handle_error(). Approved by: Heikki storage/innobase/row/row0undo.c: Applied innodb-5.1-ss1381 snapshot Revision r1350: Lock the data dictionary during rollback. This removes the rare debug assertion failure ut_ad(mutex_own(&(dict_sys->mutex))) in dict_table_get_on_id() after the rollback following crash recovery. storage/innobase/trx/trx0purge.c: Applied innodb-5.1-ss1381 snapshot Revision r1344: Rename the Boolean field trx->type to trx->is_purge and remove the constants TRX_USER and TRX_PURGE. storage/innobase/trx/trx0trx.c: Applied innodb-5.1-ss1381 snapshot Revision r1344: Rename the Boolean field trx->type to trx->is_purge and remove the constants TRX_USER and TRX_PURGE. Revision r1343: trx_sig_struct: Remove state. It is always assigned to TRX_SIG_WAITING and never tested. --- mysql-test/t/innodb.test | 1 - storage/innobase/Makefile.am | 2 + storage/innobase/dict/dict0dict.c | 3 +- storage/innobase/handler/ha_innodb.cc | 156 ++++++++++---------------- storage/innobase/handler/ha_innodb.h | 16 +-- storage/innobase/include/trx0trx.h | 13 +-- storage/innobase/os/os0file.c | 6 +- storage/innobase/row/row0undo.c | 14 +-- storage/innobase/trx/trx0purge.c | 2 +- storage/innobase/trx/trx0trx.c | 7 +- 10 files changed, 82 insertions(+), 138 deletions(-) diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index c4b8491b39d..75f2796abc6 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1810,7 +1810,6 @@ select a,hex(s1) from t1; select hex(s1) from t2; drop table t2,t1; - # Ensure that _ibfk_0 is not mistreated as a # generated foreign key identifier. (Bug #16387) diff --git a/storage/innobase/Makefile.am b/storage/innobase/Makefile.am index f433604f9d4..d694d1ab811 100644 --- a/storage/innobase/Makefile.am +++ b/storage/innobase/Makefile.am @@ -89,6 +89,8 @@ EXTRA_DIST = include/btr0btr.h include/btr0btr.ic include/btr0cur.h include/btr include/ut0sort.h include/ut0ut.h include/ut0ut.ic include/ut0vec.h include/ut0vec.ic include/ha_prototypes.h \ include/ut0list.h include/ut0list.ic \ include/ut0wqueue.h \ + pars/make_bison.sh pars/make_flex.sh \ + pars/pars0grm.y pars/pars0lex.l CMakeLists.txt plug.in noinst_LIBRARIES = libinnobase.a diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c index e07d84a1ee0..f450d3553eb 100644 --- a/storage/innobase/dict/dict0dict.c +++ b/storage/innobase/dict/dict0dict.c @@ -689,7 +689,8 @@ dict_table_get_on_id( if we are doing a rollback to handle an error in TABLE CREATE, for example, we already have the mutex! */ - ut_ad(mutex_own(&(dict_sys->mutex))); + ut_ad(mutex_own(&(dict_sys->mutex)) + || trx->dict_operation_lock_mode == RW_X_LATCH); return(dict_table_get_on_id_low(table_id)); } diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 2d8f3eb0ef9..5faefe83a85 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -92,9 +92,6 @@ extern "C" { #include "../storage/innobase/include/ha_prototypes.h" } -#define HA_INNOBASE_ROWS_IN_TABLE 10000 /* to get optimization right */ -#define HA_INNOBASE_RANGE_COUNT 100 - ulong innobase_large_page_size = 0; /* The default values for the following, type long or longlong, start-up @@ -142,7 +139,7 @@ srv_active_wake_master_thread after each fetch or search, we only do it every INNOBASE_WAKE_INTERVAL'th step. */ #define INNOBASE_WAKE_INTERVAL 32 -ulong innobase_active_counter = 0; +static ulong innobase_active_counter = 0; static HASH innobase_open_tables; @@ -311,13 +308,13 @@ bool innobase_show_status(handlerton *hton, THD* thd, /********************************************************************* Commits a transaction in an InnoDB database. */ - +static void innobase_commit_low( /*================*/ trx_t* trx); /* in: transaction handle */ -SHOW_VAR innodb_status_variables[]= { +static SHOW_VAR innodb_status_variables[]= { {"buffer_pool_pages_data", (char*) &export_vars.innodb_buffer_pool_pages_data, SHOW_LONG}, {"buffer_pool_pages_dirty", @@ -1140,7 +1137,7 @@ holding any InnoDB semaphores. The calling thread is holding the query cache mutex, and this function will reserver the InnoDB kernel mutex. Thus, the 'rank' in sync0sync.h of the MySQL query cache mutex is above the InnoDB kernel mutex. */ - +static my_bool innobase_query_caching_of_table_permitted( /*======================================*/ @@ -1765,7 +1762,7 @@ innobase_flush_logs(handlerton *hton) /********************************************************************* Commits a transaction in an InnoDB database. */ - +static void innobase_commit_low( /*================*/ @@ -1849,12 +1846,11 @@ innobase_commit( /* Update the info whether we should skip XA steps that eat CPU time */ trx->support_xa = (ibool)(thd->variables.innodb_support_xa); - /* Release a possible FIFO ticket and search latch. Since we will - reserve the kernel mutex, we have to release the search system latch - first to obey the latching order. */ + /* Since we will reserve the kernel mutex, we have to release + the search system latch first to obey the latching order. */ if (trx->has_search_latch) { - trx_search_latch_release_if_reserved(trx); + trx_search_latch_release_if_reserved(trx); } /* The flag trx->active_trans is set to 1 in @@ -1941,18 +1937,20 @@ retry: trx_mark_sql_stat_end(trx); } + if (trx->declared_to_be_inside_innodb) { + /* Release our possible ticket in the FIFO */ + + srv_conc_force_exit_innodb(trx); + } + /* Tell the InnoDB server that there might be work for utility threads: */ - if (trx->declared_to_be_inside_innodb) { - /* Release our possible ticket in the FIFO */ - - srv_conc_force_exit_innodb(trx); - } srv_active_wake_master_thread(); DBUG_RETURN(0); } +#if 0 /* TODO: put the MySQL-4.1 functionality back to 5.0. This is needed to get InnoDB Hot Backup to work. */ @@ -1965,7 +1963,7 @@ transaction inside InnoDB but does NOT flush InnoDB log files to disk. To flush you have to call innobase_commit_complete(). We have separated flushing to eliminate the bottleneck of LOCK_log in log.cc which disabled InnoDB's group commit capability. */ - +static int innobase_report_binlog_offset_and_commit( /*=====================================*/ @@ -1995,7 +1993,6 @@ innobase_report_binlog_offset_and_commit( return(0); } -#if 0 /*********************************************************************** This function stores the binlog offset and flushes logs. */ static @@ -2026,12 +2023,11 @@ innobase_store_binlog_offset_and_flush_log( /* Synchronous flush of the log buffer to disk */ log_buffer_flush_to_disk(); } -#endif /********************************************************************* This is called after MySQL has written the binlog entry for the current transaction. Flushes the InnoDB log files to disk if required. */ - +static int innobase_commit_complete( /*=====================*/ @@ -2057,6 +2053,7 @@ innobase_commit_complete( return(0); } +#endif /********************************************************************* Rolls back a transaction or the latest SQL statement. */ @@ -2110,7 +2107,7 @@ innobase_rollback( /********************************************************************* Rolls back a transaction */ - +static int innobase_rollback_trx( /*==================*/ @@ -2405,8 +2402,6 @@ ha_innobase::open( user_thd = NULL; - last_query_id = (ulong)-1; - if (!(share=get_share(name))) { DBUG_RETURN(1); @@ -3374,8 +3369,7 @@ ha_innobase::write_row( ut_error; } - statistic_increment(thd->status_var.ha_write_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_write_count); if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT) table->timestamp_field->set_time(); @@ -3450,13 +3444,6 @@ no_commit: num_write_row++; - if (last_query_id != user_thd->query_id) { - prebuilt->sql_stat_start = TRUE; - last_query_id = user_thd->query_id; - - innobase_release_stat_resources(prebuilt->trx); - } - if (table->next_number_field && record == table->record[0]) { /* This is the case where the table has an auto-increment column */ @@ -3611,13 +3598,6 @@ calc_row_difference( for (i = 0; i < n_fields; i++) { field = table->field[i]; - /* if (thd->query_id != field->query_id) { */ - /* TODO: check that these fields cannot have - changed! */ - - /* goto skip_field; - }*/ - o_ptr = (byte*) old_row + get_field_offset(table, field); n_ptr = (byte*) new_row + get_field_offset(table, field); @@ -3749,13 +3729,6 @@ ha_innobase::update_row( if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE) table->timestamp_field->set_time(); - if (last_query_id != user_thd->query_id) { - prebuilt->sql_stat_start = TRUE; - last_query_id = user_thd->query_id; - - innobase_release_stat_resources(trx); - } - if (prebuilt->upd_node) { uvect = prebuilt->upd_node->update; } else { @@ -3806,13 +3779,6 @@ ha_innobase::delete_row( ut_a(prebuilt->trx == trx); - if (last_query_id != user_thd->query_id) { - prebuilt->sql_stat_start = TRUE; - last_query_id = user_thd->query_id; - - innobase_release_stat_resources(trx); - } - if (!prebuilt->upd_node) { row_get_prebuilt_update_vector(prebuilt); } @@ -3848,15 +3814,6 @@ ha_innobase::unlock_row(void) { DBUG_ENTER("ha_innobase::unlock_row"); - if (UNIV_UNLIKELY(last_query_id != user_thd->query_id)) { - ut_print_timestamp(stderr); - sql_print_error("last_query_id is %lu != user_thd_query_id is " - "%lu", (ulong) last_query_id, - (ulong) user_thd->query_id); - mem_analyze_corruption(prebuilt->trx); - ut_error; - } - /* Consistent read does not take any locks, thus there is nothing to unlock. */ @@ -4062,15 +4019,7 @@ ha_innobase::index_read( ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); - statistic_increment(current_thd->status_var.ha_read_key_count, - &LOCK_status); - - if (last_query_id != user_thd->query_id) { - prebuilt->sql_stat_start = TRUE; - last_query_id = user_thd->query_id; - - innobase_release_stat_resources(prebuilt->trx); - } + ha_statistic_increment(&SSV::ha_read_key_count); index = prebuilt->index; @@ -4168,12 +4117,11 @@ ha_innobase::change_active_index( InnoDB */ { KEY* key=0; - THD* thd = current_thd; - statistic_increment(thd->status_var.ha_read_key_count, &LOCK_status); + ha_statistic_increment(&SSV::ha_read_key_count); DBUG_ENTER("change_active_index"); - ut_ad(user_thd == thd); - ut_a(prebuilt->trx == thd_to_trx(thd, ht)); + ut_ad(user_thd == current_thd); + ut_a(prebuilt->trx == thd_to_trx(user_thd, ht)); active_index = keynr; @@ -4300,8 +4248,7 @@ ha_innobase::index_next( mysql_byte* buf) /* in/out: buffer for next row in MySQL format */ { - statistic_increment(current_thd->status_var.ha_read_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_next_count); return(general_fetch(buf, ROW_SEL_NEXT, 0)); } @@ -4318,8 +4265,7 @@ ha_innobase::index_next_same( const mysql_byte* key, /* in: key value */ uint keylen) /* in: key value length */ { - statistic_increment(current_thd->status_var.ha_read_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_next_count); return(general_fetch(buf, ROW_SEL_NEXT, last_match_mode)); } @@ -4336,8 +4282,7 @@ ha_innobase::index_prev( mysql_byte* buf) /* in/out: buffer for previous row in MySQL format */ { - statistic_increment(current_thd->status_var.ha_read_prev_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_prev_count); return(general_fetch(buf, ROW_SEL_PREV, 0)); } @@ -4356,8 +4301,7 @@ ha_innobase::index_first( int error; DBUG_ENTER("index_first"); - statistic_increment(current_thd->status_var.ha_read_first_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_first_count); error = index_read(buf, NULL, 0, HA_READ_AFTER_KEY); @@ -4383,8 +4327,7 @@ ha_innobase::index_last( int error; DBUG_ENTER("index_last"); - statistic_increment(current_thd->status_var.ha_read_last_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_last_count); error = index_read(buf, NULL, 0, HA_READ_BEFORE_KEY); @@ -4454,8 +4397,7 @@ ha_innobase::rnd_next( int error; DBUG_ENTER("rnd_next"); - statistic_increment(current_thd->status_var.ha_read_rnd_next_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_rnd_next_count); if (start_of_scan) { error = index_first(buf); @@ -4490,8 +4432,7 @@ ha_innobase::rnd_pos( DBUG_ENTER("rnd_pos"); DBUG_DUMP("key", (char*) pos, ref_length); - statistic_increment(current_thd->status_var.ha_read_rnd_count, - &LOCK_status); + ha_statistic_increment(&SSV::ha_read_rnd_count); ut_a(prebuilt->trx == thd_to_trx(current_thd, ht)); @@ -6534,7 +6475,7 @@ ha_innobase::transactional_table_lock( /**************************************************************************** Here we export InnoDB status variables to MySQL. */ - +static int innodb_export_status() /*==================*/ @@ -6640,7 +6581,7 @@ innodb_show_status( /**************************************************************************** Implements the SHOW MUTEX STATUS command. . */ - +static bool innodb_mutex_show_status( /*=====================*/ @@ -7325,6 +7266,33 @@ ha_innobase::cmp_ref( return(0); } +/*********************************************************************** +Ask InnoDB if a query to a table can be cached. */ + +my_bool +ha_innobase::register_query_cache_table( +/*====================================*/ + /* out: TRUE if query caching + of the table is permitted */ + THD* thd, /* in: user thread handle */ + char* table_key, /* in: concatenation of database name, + the null character '\0', + and the table name */ + uint key_length, /* in: length of the full name, i.e. + len(dbname) + len(tablename) + 1 */ + qc_engine_callback* + call_back, /* out: pointer to function for + checking if query caching + is permitted */ + ulonglong *engine_data) /* in/out: data to call_back */ +{ + *call_back = innobase_query_caching_of_table_permitted; + *engine_data = 0; + return(innobase_query_caching_of_table_permitted(thd, table_key, + key_length, + engine_data)); +} + char* ha_innobase::get_mysql_bin_log_name() { @@ -7702,12 +7670,12 @@ static int show_innodb_vars(THD *thd, SHOW_VAR *var, char *buff) return 0; } -SHOW_VAR innodb_status_variables_export[]= { +static SHOW_VAR innodb_status_variables_export[]= { {"Innodb", (char*) &show_innodb_vars, SHOW_FUNC}, {NullS, NullS, SHOW_LONG} }; -struct st_mysql_storage_engine innobase_storage_engine= +static struct st_mysql_storage_engine innobase_storage_engine= { MYSQL_HANDLERTON_INTERFACE_VERSION }; mysql_declare_plugin(innobase) diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index eb977ed6bd5..f5df362b490 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -35,10 +35,6 @@ typedef struct st_innobase_share { struct row_prebuilt_struct; typedef struct row_prebuilt_struct row_prebuilt_t; -my_bool innobase_query_caching_of_table_permitted(THD* thd, char* full_name, - uint full_name_len, - ulonglong *unused); - /* The class defining a handle to an Innodb table */ class ha_innobase: public handler { @@ -48,8 +44,6 @@ class ha_innobase: public handler THD* user_thd; /* the thread handle of the user currently using the handle; this is set in external_lock function */ - query_id_t last_query_id; /* the latest query id where the - handle was used */ THR_LOCK_DATA lock; INNOBASE_SHARE *share; @@ -186,14 +180,7 @@ class ha_innobase: public handler my_bool register_query_cache_table(THD *thd, char *table_key, uint key_length, qc_engine_callback *call_back, - ulonglong *engine_data) - { - *call_back= innobase_query_caching_of_table_permitted; - *engine_data= 0; - return innobase_query_caching_of_table_permitted(thd, table_key, - key_length, - engine_data); - } + ulonglong *engine_data); static char *get_mysql_bin_log_name(); static ulonglong get_mysql_bin_log_pos(); bool primary_key_is_clustered() { return true; } @@ -202,7 +189,6 @@ class ha_innobase: public handler uint table_changes); }; -extern SHOW_VAR innodb_status_variables[]; extern ulong innobase_fast_shutdown; extern ulong innobase_large_page_size; extern long innobase_mirrored_log_groups, innobase_log_files_in_group; diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 8232699c7f9..fe36b0d1a01 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -375,8 +375,6 @@ trx_is_interrupted( /* Signal to a transaction */ struct trx_sig_struct{ ulint type; /* signal type */ - ulint state; /* TRX_SIG_WAITING or - TRX_SIG_BEING_HANDLED */ ulint sender; /* TRX_SIG_SELF or TRX_SIG_OTHER_SESS */ que_thr_t* receiver; /* non-NULL if the sender of the signal @@ -404,7 +402,7 @@ struct trx_struct{ const char* op_info; /* English text describing the current operation, or an empty string */ - ulint type; /* TRX_USER, TRX_PURGE */ + unsigned is_purge:1; /* 0=user transaction, 1=purge */ ulint conc_state; /* state of the trx from the point of view of concurrency control: TRX_ACTIVE, TRX_COMMITTED_IN_MEMORY, @@ -675,12 +673,6 @@ struct trx_struct{ single operation of a transaction, e.g., a parallel query */ -/* Transaction types */ -#define TRX_USER 1 /* normal user transaction */ -#define TRX_PURGE 2 /* purge transaction: this is not - inserted to the trx list of trx_sys - and no rollback segment is assigned to - this */ /* Transaction concurrency states */ #define TRX_NOT_STARTED 1 #define TRX_ACTIVE 2 @@ -742,9 +734,6 @@ struct trx_struct{ session */ #define TRX_SIG_OTHER_SESS 2 /* sent by another session (which must hold rights to this) */ -/* Signal states */ -#define TRX_SIG_WAITING 1 -#define TRX_SIG_BEING_HANDLED 2 /* Commit command node in a query graph */ struct commit_node_struct{ diff --git a/storage/innobase/os/os0file.c b/storage/innobase/os/os0file.c index c4d051ec771..60ba941dbbf 100644 --- a/storage/innobase/os/os0file.c +++ b/storage/innobase/os/os0file.c @@ -930,7 +930,7 @@ try_again: file = CreateFile((LPCTSTR) name, access, FILE_SHARE_READ | FILE_SHARE_WRITE, - /* file can be read ansd written also + /* file can be read and written also by other processes */ NULL, /* default security attributes */ create_flag, @@ -1509,7 +1509,7 @@ os_file_rename( return(TRUE); } - os_file_handle_error(oldpath, "rename"); + os_file_handle_error_no_exit(oldpath, "rename"); return(FALSE); #else @@ -1518,7 +1518,7 @@ os_file_rename( ret = rename((const char*)oldpath, (const char*)newpath); if (ret != 0) { - os_file_handle_error(oldpath, "rename"); + os_file_handle_error_no_exit(oldpath, "rename"); return(FALSE); } diff --git a/storage/innobase/row/row0undo.c b/storage/innobase/row/row0undo.c index 2f04e65e8ee..f03f84ed1b0 100644 --- a/storage/innobase/row/row0undo.c +++ b/storage/innobase/row/row0undo.c @@ -213,7 +213,7 @@ row_undo( ulint err; trx_t* trx; dulint roll_ptr; - ibool froze_data_dict = FALSE; + ibool locked_data_dict; ut_ad(node && thr); @@ -266,13 +266,13 @@ row_undo( /* Prevent DROP TABLE etc. while we are rolling back this row. If we are doing a TABLE CREATE or some other dictionary operation, then we already have dict_operation_lock locked in x-mode. Do not - try to lock again in s-mode, because that would cause a hang. */ + try to lock again, because that would cause a hang. */ - if (trx->dict_operation_lock_mode == 0) { + locked_data_dict = (trx->dict_operation_lock_mode == 0); - row_mysql_freeze_data_dictionary(trx); + if (locked_data_dict) { - froze_data_dict = TRUE; + row_mysql_lock_data_dictionary(trx); } if (node->state == UNDO_NODE_INSERT) { @@ -285,9 +285,9 @@ row_undo( err = row_undo_mod(node, thr); } - if (froze_data_dict) { + if (locked_data_dict) { - row_mysql_unfreeze_data_dictionary(trx); + row_mysql_unlock_data_dictionary(trx); } /* Do some cleanup */ diff --git a/storage/innobase/trx/trx0purge.c b/storage/innobase/trx/trx0purge.c index 25519a09a1d..f0e85ef1604 100644 --- a/storage/innobase/trx/trx0purge.c +++ b/storage/innobase/trx/trx0purge.c @@ -221,7 +221,7 @@ trx_purge_sys_create(void) purge_sys->trx = purge_sys->sess->trx; - purge_sys->trx->type = TRX_PURGE; + purge_sys->trx->is_purge = 1; ut_a(trx_start_low(purge_sys->trx, ULINT_UNDEFINED)); diff --git a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c index 2f0c25c323a..cdea3e9c477 100644 --- a/storage/innobase/trx/trx0trx.c +++ b/storage/innobase/trx/trx0trx.c @@ -109,7 +109,7 @@ trx_create( trx->op_info = ""; - trx->type = TRX_USER; + trx->is_purge = 0; trx->conc_state = TRX_NOT_STARTED; trx->start_time = time(NULL); @@ -667,7 +667,7 @@ trx_start_low( ut_ad(mutex_own(&kernel_mutex)); ut_ad(trx->rseg == NULL); - if (trx->type == TRX_PURGE) { + if (trx->is_purge) { trx->id = ut_dulint_zero; trx->conc_state = TRX_ACTIVE; trx->start_time = time(NULL); @@ -1262,7 +1262,6 @@ trx_sig_send( UT_LIST_ADD_LAST(signals, trx->signals, sig); sig->type = type; - sig->state = TRX_SIG_WAITING; sig->sender = sender; sig->receiver = receiver_thr; @@ -1709,7 +1708,7 @@ trx_print( fputs(trx->op_info, f); } - if (trx->type != TRX_USER) { + if (trx->is_purge) { fputs(" purge trx", f); } From 4e907a7fdc8f7654111f62419e3fd4927626ac69 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 11:20:08 +0200 Subject: [PATCH 070/153] gis_generic test cases: Revert test case to NOT define any keys; the NDB warning can be handled, and ARCHIVE does not allow indexes mysql-test/include/gis_generic.inc: Revert test case to NOT define any keys; the NDB warning can be handled, and ARCHIVE does not allow indexes mysql-test/r/archive_gis.result: Revert test case to NOT define any keys; the NDB warning can be handled, and ARCHIVE does not allow indexes mysql-test/r/bdb_gis.result: Revert test case to NOT define any keys; the NDB warning can be handled, and ARCHIVE does not allow indexes mysql-test/r/innodb_gis.result: Revert test case to NOT define any keys; the NDB warning can be handled, and ARCHIVE does not allow indexes mysql-test/r/ndb_gis.result: Revert test case to NOT define any keys; the NDB warning can be handled, and ARCHIVE does not allow indexes --- mysql-test/include/gis_generic.inc | 34 ++++++++-------- mysql-test/r/archive_gis.result | 32 +++++++-------- mysql-test/r/bdb_gis.result | 32 +++++++-------- mysql-test/r/innodb_gis.result | 32 +++++++-------- mysql-test/r/ndb_gis.result | 64 +++++++++++++++--------------- 5 files changed, 96 insertions(+), 98 deletions(-) diff --git a/mysql-test/include/gis_generic.inc b/mysql-test/include/gis_generic.inc index d83db08ad6b..70e82a13364 100644 --- a/mysql-test/include/gis_generic.inc +++ b/mysql-test/include/gis_generic.inc @@ -188,30 +188,28 @@ drop table t1; # Test all MBR* functions and their non-MBR-prefixed aliases, # using shifted squares to verify the spatial relations. -# Primary key is needed for NDB with binlog; bug ARCHIVE doesn't -# support AUTO_INCREMENT, so specify id values explicitly -CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); +CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrdisjoint FROM t1 a1 JOIN t1 a2 ON MBRDisjoint( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; diff --git a/mysql-test/r/archive_gis.result b/mysql-test/r/archive_gis.result index 4301befb18d..3137d43ec3a 100644 --- a/mysql-test/r/archive_gis.result +++ b/mysql-test/r/archive_gis.result @@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; End of 4.1 tests -CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; mbrcontains center,small diff --git a/mysql-test/r/bdb_gis.result b/mysql-test/r/bdb_gis.result index 108e2cc7a94..d48b5a26e1d 100644 --- a/mysql-test/r/bdb_gis.result +++ b/mysql-test/r/bdb_gis.result @@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; End of 4.1 tests -CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; mbrcontains center,small diff --git a/mysql-test/r/innodb_gis.result b/mysql-test/r/innodb_gis.result index 399ff697416..2c62537aa94 100644 --- a/mysql-test/r/innodb_gis.result +++ b/mysql-test/r/innodb_gis.result @@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; End of 4.1 tests -CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; mbrcontains center,small diff --git a/mysql-test/r/ndb_gis.result b/mysql-test/r/ndb_gis.result index df0ff8e972e..ec064ace651 100644 --- a/mysql-test/r/ndb_gis.result +++ b/mysql-test/r/ndb_gis.result @@ -457,22 +457,22 @@ insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; End of 4.1 tests -CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; mbrcontains center,small @@ -1001,22 +1001,22 @@ insert into t1 values (pointfromtext('point(1,1)')); ERROR 23000: Column 'fl' cannot be null drop table t1; End of 4.1 tests -CREATE TABLE t1 (id INT UNSIGNED NOT NULL PRIMARY KEY, name VARCHAR(100), square GEOMETRY); -INSERT INTO t1 VALUES( 1, "center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); -INSERT INTO t1 VALUES( 2, "small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); -INSERT INTO t1 VALUES( 3, "big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); -INSERT INTO t1 VALUES( 4, "up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); -INSERT INTO t1 VALUES( 5, "up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); -INSERT INTO t1 VALUES( 6, "up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); -INSERT INTO t1 VALUES( 7, "down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); -INSERT INTO t1 VALUES( 8, "down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); -INSERT INTO t1 VALUES( 9, "down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); -INSERT INTO t1 VALUES(10, "right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); -INSERT INTO t1 VALUES(11, "right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); -INSERT INTO t1 VALUES(12, "right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); -INSERT INTO t1 VALUES(13, "left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); -INSERT INTO t1 VALUES(14, "left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); -INSERT INTO t1 VALUES(15, "left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); +CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); +INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); +INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); +INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); +INSERT INTO t1 VALUES("up", GeomFromText('POLYGON (( 0 1, 0 3, 2 3, 2 1, 0 1))')); +INSERT INTO t1 VALUES("up2", GeomFromText('POLYGON (( 0 2, 0 4, 2 4, 2 2, 0 2))')); +INSERT INTO t1 VALUES("up3", GeomFromText('POLYGON (( 0 3, 0 5, 2 5, 2 3, 0 3))')); +INSERT INTO t1 VALUES("down", GeomFromText('POLYGON (( 0 -1, 0 1, 2 1, 2 -1, 0 -1))')); +INSERT INTO t1 VALUES("down2", GeomFromText('POLYGON (( 0 -2, 0 0, 2 0, 2 -2, 0 -2))')); +INSERT INTO t1 VALUES("down3", GeomFromText('POLYGON (( 0 -3, 0 -1, 2 -1, 2 -3, 0 -3))')); +INSERT INTO t1 VALUES("right", GeomFromText('POLYGON (( 1 0, 1 2, 3 2, 3 0, 1 0))')); +INSERT INTO t1 VALUES("right2", GeomFromText('POLYGON (( 2 0, 2 2, 4 2, 4 0, 2 0))')); +INSERT INTO t1 VALUES("right3", GeomFromText('POLYGON (( 3 0, 3 2, 5 2, 5 0, 3 0))')); +INSERT INTO t1 VALUES("left", GeomFromText('POLYGON (( -1 0, -1 2, 1 2, 1 0, -1 0))')); +INSERT INTO t1 VALUES("left2", GeomFromText('POLYGON (( -2 0, -2 2, 0 2, 0 0, -2 0))')); +INSERT INTO t1 VALUES("left3", GeomFromText('POLYGON (( -3 0, -3 2, -1 2, -1 0, -3 0))')); SELECT GROUP_CONCAT(a2.name ORDER BY a2.name) AS mbrcontains FROM t1 a1 JOIN t1 a2 ON MBRContains( a1.square, a2.square) WHERE a1.name = "center" GROUP BY a1.name; mbrcontains center,small From 8b873c3f640722026eca5d35c847ac6a7959daba Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 11:31:50 +0200 Subject: [PATCH 071/153] Make the script detect --default-storage-engine=x and mark the test as requiring that storage engine(if we need to do that) Make --ndb and --with-ndbcluster and alias for --mysqld=--default-storage-engine=ndbcluster --- mysql-test/lib/mtr_cases.pl | 11 +++++++++++ mysql-test/mysql-test-run.pl | 29 +++++++++++++++++++++++------ 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl index 22290a88d39..28c78fbffeb 100644 --- a/mysql-test/lib/mtr_cases.pl +++ b/mysql-test/lib/mtr_cases.pl @@ -498,6 +498,17 @@ sub collect_one_test_case($$$$$$$) { { mtr_options_from_test_file($tinfo,"$testdir/${tname}.test"); + if ( defined $::used_default_engine ) + { + # Different default engine is used + # tag test to require that engine + $tinfo->{'ndb_test'}= 1 + if ( $::used_default_engine =~ /^ndb/i ); + + $tinfo->{'innodb_test'}= 1 + if ( $::used_default_engine =~ /^innodb/i ); + } + if ( $tinfo->{'big_test'} and ! $::opt_big_test ) { $tinfo->{'skip'}= 1; diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 9187e3d23ec..3166672dd89 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -304,6 +304,7 @@ our $path_sql_dir; our @data_dir_lst; our $used_binlog_format; +our $used_default_engine; our $debug_compiled_binaries; our $glob_tot_real_time= 0; @@ -519,7 +520,7 @@ sub command_line_setup () { 'compress' => \$opt_compress, 'bench' => \$opt_bench, 'small-bench' => \$opt_small_bench, - 'with-ndbcluster' => \$opt_with_ndbcluster, + 'with-ndbcluster|ndb' => \$opt_with_ndbcluster, 'vs-config' => \$opt_vs_config, # Control what test suites or cases to run @@ -776,6 +777,26 @@ sub command_line_setup () { mtr_report("Using binlog format '$used_binlog_format'"); } + + # -------------------------------------------------------------------------- + # Find out default storage engine being used(if any) + # -------------------------------------------------------------------------- + if ( $opt_with_ndbcluster ) + { + # --ndb or --with-ndbcluster turns on --default-storage-engine=ndbcluster + push(@opt_extra_mysqld_opt, "--default-storage-engine=ndbcluster"); + } + + foreach my $arg ( @opt_extra_mysqld_opt ) + { + if ( $arg =~ /default-storage-engine=(\S+)/ ) + { + $used_default_engine= $1; + } + } + mtr_report("Using default engine '$used_default_engine'") + if defined $used_default_engine; + # -------------------------------------------------------------------------- # Check if we should speed up tests by trying to run on tmpfs # -------------------------------------------------------------------------- @@ -901,10 +922,6 @@ sub command_line_setup () { # -------------------------------------------------------------------------- # Ndb cluster flags # -------------------------------------------------------------------------- - if ( $opt_with_ndbcluster and !$opt_bench) - { - mtr_error("Can only use --with-ndbcluster togheter with --bench"); - } if ( $opt_ndbconnectstring ) { @@ -5015,7 +5032,7 @@ Options to control what engine/variation to run skip-ssl Dont start server with support for ssl connections bench Run the benchmark suite small-bench Run the benchmarks with --small-tests --small-tables - with-ndbcluster Use cluster as default table type for benchmark + ndb|with-ndbcluster Use cluster as default table type vs-config Visual Studio configuration used to create executables (default: MTR_VS_CONFIG environment variable) From f839f78c9f188e8176e267e9429ce020c608631c Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 12:45:23 +0200 Subject: [PATCH 072/153] ndb_gis.result: post-merge fixup of test result mysql-test/r/ndb_gis.result: post-merge fixup of test result --- mysql-test/r/ndb_gis.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/ndb_gis.result b/mysql-test/r/ndb_gis.result index f0d88098eb1..279a0884b5b 100644 --- a/mysql-test/r/ndb_gis.result +++ b/mysql-test/r/ndb_gis.result @@ -463,7 +463,7 @@ drop table t1; End of 4.1 tests CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); Warnings: -Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' +Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); @@ -1013,7 +1013,7 @@ drop table t1; End of 4.1 tests CREATE TABLE t1 (name VARCHAR(100), square GEOMETRY); Warnings: -Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' +Error 1466 Table storage engine 'ndbcluster' does not support the create option 'Binlog of table with BLOB attribute and no PK' INSERT INTO t1 VALUES("center", GeomFromText('POLYGON (( 0 0, 0 2, 2 2, 2 0, 0 0))')); INSERT INTO t1 VALUES("small", GeomFromText('POLYGON (( 0 0, 0 1, 1 1, 1 0, 0 0))')); INSERT INTO t1 VALUES("big", GeomFromText('POLYGON (( 0 0, 0 3, 3 3, 3 0, 0 0))')); From 13a2fad97c8d9d6f2b56e53f9ca2ec29e9cf1d86 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 13:27:38 +0200 Subject: [PATCH 073/153] create.result: post-merge test result fixup mysql-test/r/create.result: post-merge test result fixup --- mysql-test/r/create.result | 162 ++++++++++++++++++------------------- 1 file changed, 81 insertions(+), 81 deletions(-) diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index e0283273420..a8767c83215 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -836,22 +836,22 @@ key a064_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`, show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` char(10) default NULL, - `c2` char(10) default NULL, - `c3` char(10) default NULL, - `c4` char(10) default NULL, - `c5` char(10) default NULL, - `c6` char(10) default NULL, - `c7` char(10) default NULL, - `c8` char(10) default NULL, - `c9` char(10) default NULL, - `c10` char(10) default NULL, - `c11` char(10) default NULL, - `c12` char(10) default NULL, - `c13` char(10) default NULL, - `c14` char(10) default NULL, - `c15` char(10) default NULL, - `c16` char(10) default NULL, + `c1` char(10) DEFAULT NULL, + `c2` char(10) DEFAULT NULL, + `c3` char(10) DEFAULT NULL, + `c4` char(10) DEFAULT NULL, + `c5` char(10) DEFAULT NULL, + `c6` char(10) DEFAULT NULL, + `c7` char(10) DEFAULT NULL, + `c8` char(10) DEFAULT NULL, + `c9` char(10) DEFAULT NULL, + `c10` char(10) DEFAULT NULL, + `c11` char(10) DEFAULT NULL, + `c12` char(10) DEFAULT NULL, + `c13` char(10) DEFAULT NULL, + `c14` char(10) DEFAULT NULL, + `c15` char(10) DEFAULT NULL, + `c16` char(10) DEFAULT NULL, KEY `a001_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), KEY `a002_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), KEY `a003_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), @@ -921,22 +921,22 @@ flush tables; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` char(10) default NULL, - `c2` char(10) default NULL, - `c3` char(10) default NULL, - `c4` char(10) default NULL, - `c5` char(10) default NULL, - `c6` char(10) default NULL, - `c7` char(10) default NULL, - `c8` char(10) default NULL, - `c9` char(10) default NULL, - `c10` char(10) default NULL, - `c11` char(10) default NULL, - `c12` char(10) default NULL, - `c13` char(10) default NULL, - `c14` char(10) default NULL, - `c15` char(10) default NULL, - `c16` char(10) default NULL, + `c1` char(10) DEFAULT NULL, + `c2` char(10) DEFAULT NULL, + `c3` char(10) DEFAULT NULL, + `c4` char(10) DEFAULT NULL, + `c5` char(10) DEFAULT NULL, + `c6` char(10) DEFAULT NULL, + `c7` char(10) DEFAULT NULL, + `c8` char(10) DEFAULT NULL, + `c9` char(10) DEFAULT NULL, + `c10` char(10) DEFAULT NULL, + `c11` char(10) DEFAULT NULL, + `c12` char(10) DEFAULT NULL, + `c13` char(10) DEFAULT NULL, + `c14` char(10) DEFAULT NULL, + `c15` char(10) DEFAULT NULL, + `c16` char(10) DEFAULT NULL, KEY `a001_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), KEY `a002_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), KEY `a003_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), @@ -1077,22 +1077,22 @@ add key a064_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,` show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` char(10) default NULL, - `c2` char(10) default NULL, - `c3` char(10) default NULL, - `c4` char(10) default NULL, - `c5` char(10) default NULL, - `c6` char(10) default NULL, - `c7` char(10) default NULL, - `c8` char(10) default NULL, - `c9` char(10) default NULL, - `c10` char(10) default NULL, - `c11` char(10) default NULL, - `c12` char(10) default NULL, - `c13` char(10) default NULL, - `c14` char(10) default NULL, - `c15` char(10) default NULL, - `c16` char(10) default NULL, + `c1` char(10) DEFAULT NULL, + `c2` char(10) DEFAULT NULL, + `c3` char(10) DEFAULT NULL, + `c4` char(10) DEFAULT NULL, + `c5` char(10) DEFAULT NULL, + `c6` char(10) DEFAULT NULL, + `c7` char(10) DEFAULT NULL, + `c8` char(10) DEFAULT NULL, + `c9` char(10) DEFAULT NULL, + `c10` char(10) DEFAULT NULL, + `c11` char(10) DEFAULT NULL, + `c12` char(10) DEFAULT NULL, + `c13` char(10) DEFAULT NULL, + `c14` char(10) DEFAULT NULL, + `c15` char(10) DEFAULT NULL, + `c16` char(10) DEFAULT NULL, KEY `a001_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), KEY `a002_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), KEY `a003_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), @@ -1162,22 +1162,22 @@ flush tables; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` char(10) default NULL, - `c2` char(10) default NULL, - `c3` char(10) default NULL, - `c4` char(10) default NULL, - `c5` char(10) default NULL, - `c6` char(10) default NULL, - `c7` char(10) default NULL, - `c8` char(10) default NULL, - `c9` char(10) default NULL, - `c10` char(10) default NULL, - `c11` char(10) default NULL, - `c12` char(10) default NULL, - `c13` char(10) default NULL, - `c14` char(10) default NULL, - `c15` char(10) default NULL, - `c16` char(10) default NULL, + `c1` char(10) DEFAULT NULL, + `c2` char(10) DEFAULT NULL, + `c3` char(10) DEFAULT NULL, + `c4` char(10) DEFAULT NULL, + `c5` char(10) DEFAULT NULL, + `c6` char(10) DEFAULT NULL, + `c7` char(10) DEFAULT NULL, + `c8` char(10) DEFAULT NULL, + `c9` char(10) DEFAULT NULL, + `c10` char(10) DEFAULT NULL, + `c11` char(10) DEFAULT NULL, + `c12` char(10) DEFAULT NULL, + `c13` char(10) DEFAULT NULL, + `c14` char(10) DEFAULT NULL, + `c15` char(10) DEFAULT NULL, + `c16` char(10) DEFAULT NULL, KEY `a001_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), KEY `a002_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), KEY `a003_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), @@ -1260,23 +1260,23 @@ ERROR 42000: Identifier name 'a001_long_123456789_123456789_123456789_123456789_ show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `c1` char(10) default NULL, - `c2` char(10) default NULL, - `c3` char(10) default NULL, - `c4` char(10) default NULL, - `c5` char(10) default NULL, - `c6` char(10) default NULL, - `c7` char(10) default NULL, - `c8` char(10) default NULL, - `c9` char(10) default NULL, - `c10` char(10) default NULL, - `c11` char(10) default NULL, - `c12` char(10) default NULL, - `c13` char(10) default NULL, - `c14` char(10) default NULL, - `c15` char(10) default NULL, - `c16` char(10) default NULL, - `c17` char(10) default NULL + `c1` char(10) DEFAULT NULL, + `c2` char(10) DEFAULT NULL, + `c3` char(10) DEFAULT NULL, + `c4` char(10) DEFAULT NULL, + `c5` char(10) DEFAULT NULL, + `c6` char(10) DEFAULT NULL, + `c7` char(10) DEFAULT NULL, + `c8` char(10) DEFAULT NULL, + `c9` char(10) DEFAULT NULL, + `c10` char(10) DEFAULT NULL, + `c11` char(10) DEFAULT NULL, + `c12` char(10) DEFAULT NULL, + `c13` char(10) DEFAULT NULL, + `c14` char(10) DEFAULT NULL, + `c15` char(10) DEFAULT NULL, + `c16` char(10) DEFAULT NULL, + `c17` char(10) DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; End of 4.1 tests From a5c60b3f29953e9da891ca39a709cff23f2fa1d5 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 14:12:32 +0200 Subject: [PATCH 074/153] Bug#25482 GRANT statements are not replicated if you use "replicate-ignore-table" - GRANT and REVOKE statments didn't have the "updating" flag set and thus statements with a table specified would not replicate if slave filtering rules where turned on. For example "GRANT ... ON test.t1 TO ..." would not replicate. mysql-test/r/rpl_ignore_table.result: Add test results mysql-test/t/rpl_ignore_table.test: Add tests sql/sql_yacc.yy: Pass option TL_OPTION_UPDATING to 'add_table_to_list' when parsing a GRANT or REVOKE and a table specifier is found. This will set the property "updating" on the table and thus the slave filtering rules will be applied. Without setting updating the statement will be not replicated - since "it's not updating anything" - an optimization to quickly skip SELECT's and similar. --- mysql-test/r/rpl_ignore_table.result | 103 +++++++++++++++++++++++++++ mysql-test/t/rpl_ignore_table.test | 98 +++++++++++++++++++++++++ sql/sql_yacc.yy | 3 +- 3 files changed, 203 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/rpl_ignore_table.result b/mysql-test/r/rpl_ignore_table.result index 356a9dcb2f8..28bb4a448e0 100644 --- a/mysql-test/r/rpl_ignore_table.result +++ b/mysql-test/r/rpl_ignore_table.result @@ -14,3 +14,106 @@ SELECT * FROM t4; a DROP TABLE t1; DROP TABLE t4; +**** Test case for BUG#25482 **** +**** Adding GRANTS on master **** +create table test.t1(a int); +create table test.t4(a int); +GRANT SELECT ON test.t1 TO mysqltest1@localhost; +GRANT INSERT ON test.t4 TO mysqltest2@localhost; +GRANT select, update, insert, references on t1 +to mysqltest2@localhost; +GRANT SELECT ON test.* TO mysqltest3@localhost; +GRANT INSERT ON test.t4 TO mysqltest3@localhost; +GRANT select(a), update(a), insert(a), references(a) on t4 +to mysqltest3@localhost; +create database mysqltest2; +create table mysqltest2.t2 (id int); +GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass'; +insert into mysql.user (user, host) values ("mysqltest5", "somehost"); +GRANT SELECT ON *.* TO mysqltest6@localhost; +GRANT INSERT ON *.* TO mysqltest6@localhost; +GRANT INSERT ON test.* TO mysqltest6@localhost; +GRANT INSERT ON test.t1 TO mysqltest6@localhost; +show grants for mysqltest1@localhost; +Grants for mysqltest1@localhost +GRANT USAGE ON *.* TO 'mysqltest1'@'localhost' +GRANT SELECT ON `test`.`t1` TO 'mysqltest1'@'localhost' +show grants for mysqltest2@localhost; +Grants for mysqltest2@localhost +GRANT USAGE ON *.* TO 'mysqltest2'@'localhost' +GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO 'mysqltest2'@'localhost' +GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost' +show grants for mysqltest6@localhost; +Grants for mysqltest6@localhost +GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost' +GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost' +GRANT INSERT ON `test`.`t1` TO 'mysqltest6'@'localhost' +flush privileges; +show grants for mysqltest5@somehost; +Grants for mysqltest5@somehost +GRANT USAGE ON *.* TO 'mysqltest5'@'somehost' +**** Checking grants on slave **** +show grants for mysqltest2@localhost; +Grants for mysqltest2@localhost +GRANT USAGE ON *.* TO 'mysqltest2'@'localhost' +GRANT INSERT ON `test`.`t4` TO 'mysqltest2'@'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +GRANT SELECT ON `mysqltest2`.`t2` TO 'mysqltest4'@'localhost' +show grants for mysqltest5@somehost; +Grants for mysqltest5@somehost +GRANT USAGE ON *.* TO 'mysqltest5'@'somehost' +show grants for mysqltest6@localhost; +Grants for mysqltest6@localhost +GRANT SELECT, INSERT ON *.* TO 'mysqltest6'@'localhost' +GRANT INSERT ON `test`.* TO 'mysqltest6'@'localhost' +show grants for mysqltest1@localhost; +ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost' +**** Revoking grants on master **** +REVOKE SELECT ON test.t1 FROM mysqltest1@localhost; +REVOKE SELECT ON mysqltest2.t2 FROM mysqltest4@localhost; +REVOKE select(a) on t4 +from mysqltest3@localhost; +show grants for mysqltest1@localhost; +Grants for mysqltest1@localhost +GRANT USAGE ON *.* TO 'mysqltest1'@'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +**** Checking grants on slave **** +show grants for mysqltest1@localhost; +ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost' +show grants for mysqltest3@localhost; +Grants for mysqltest3@localhost +GRANT USAGE ON *.* TO 'mysqltest3'@'localhost' +GRANT SELECT ON `test`.* TO 'mysqltest3'@'localhost' +GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO 'mysqltest3'@'localhost' +show grants for mysqltest4@localhost; +Grants for mysqltest4@localhost +GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' +drop table t1, t4, mysqltest2.t2; +drop database mysqltest2; +delete from mysql.user where user like "mysqltest%"; +delete from mysql.db where user like "mysqltest%"; +delete from mysql.tables_priv where user like "mysqltest%"; +delete from mysql.columns_priv where user like "mysqltest%"; diff --git a/mysql-test/t/rpl_ignore_table.test b/mysql-test/t/rpl_ignore_table.test index bc651779208..660921a94be 100644 --- a/mysql-test/t/rpl_ignore_table.test +++ b/mysql-test/t/rpl_ignore_table.test @@ -26,3 +26,101 @@ SELECT * FROM t4; connection master; DROP TABLE t1; DROP TABLE t4; + + +# +# Bug#25482 GRANT statements are not replicated if +# you use "replicate-ignore-table" +# + +--echo **** Test case for BUG#25482 **** +--echo **** Adding GRANTS on master **** + +connection master; +create table test.t1(a int); +create table test.t4(a int); + +# Simple user that should not replicate +GRANT SELECT ON test.t1 TO mysqltest1@localhost; + +# Partial replicate +GRANT INSERT ON test.t4 TO mysqltest2@localhost; +GRANT select, update, insert, references on t1 + to mysqltest2@localhost; + +# Partial replicate 2 +GRANT SELECT ON test.* TO mysqltest3@localhost; +GRANT INSERT ON test.t4 TO mysqltest3@localhost; +GRANT select(a), update(a), insert(a), references(a) on t4 + to mysqltest3@localhost; + +# Create another database and table +create database mysqltest2; +create table mysqltest2.t2 (id int); +# Create a grant that should replicate +GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass'; + +# Create a grant manually +insert into mysql.user (user, host) values ("mysqltest5", "somehost"); + +# Partial replicate 3 with *.* +GRANT SELECT ON *.* TO mysqltest6@localhost; +GRANT INSERT ON *.* TO mysqltest6@localhost; +GRANT INSERT ON test.* TO mysqltest6@localhost; +GRANT INSERT ON test.t1 TO mysqltest6@localhost; + +show grants for mysqltest1@localhost; +show grants for mysqltest2@localhost; +show grants for mysqltest3@localhost; +show grants for mysqltest4@localhost; +show grants for mysqltest6@localhost; + +flush privileges; +show grants for mysqltest5@somehost; + + +sync_slave_with_master; + +--echo **** Checking grants on slave **** + +# Check that grants are replicated to slave +show grants for mysqltest2@localhost; +show grants for mysqltest3@localhost; +show grants for mysqltest4@localhost; +show grants for mysqltest5@somehost; +show grants for mysqltest6@localhost; + +# mysqltest1 should not be on slave +--error 1141 +show grants for mysqltest1@localhost; + +--echo **** Revoking grants on master **** +connection master; +REVOKE SELECT ON test.t1 FROM mysqltest1@localhost; +REVOKE SELECT ON mysqltest2.t2 FROM mysqltest4@localhost; +REVOKE select(a) on t4 + from mysqltest3@localhost; + +show grants for mysqltest1@localhost; +show grants for mysqltest3@localhost; +show grants for mysqltest4@localhost; + +sync_slave_with_master; + +--echo **** Checking grants on slave **** + +# mysqltest1 should not be on slave +--error 1141 +show grants for mysqltest1@localhost; +show grants for mysqltest3@localhost; +show grants for mysqltest4@localhost; + +# Cleanup +connection master; +drop table t1, t4, mysqltest2.t2; +drop database mysqltest2; +delete from mysql.user where user like "mysqltest%"; +delete from mysql.db where user like "mysqltest%"; +delete from mysql.tables_priv where user like "mysqltest%"; +delete from mysql.columns_priv where user like "mysqltest%"; +sync_slave_with_master; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index ee57a4d611c..b72caac46a0 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -5926,7 +5926,8 @@ opt_table: | table_ident { LEX *lex=Lex; - if (!lex->current_select->add_table_to_list(lex->thd, $1,NULL,0)) + if (!lex->current_select->add_table_to_list(lex->thd, $1,NULL, + TL_OPTION_UPDATING)) YYABORT; if (lex->grant == GLOBAL_ACLS) lex->grant = TABLE_ACLS & ~GRANT_ACL; From fff440d921738412f6386577ea3aaebdd962a5c5 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 14:21:45 +0200 Subject: [PATCH 075/153] Update test result after merge --- mysql-test/r/rpl_ignore_table.result | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mysql-test/r/rpl_ignore_table.result b/mysql-test/r/rpl_ignore_table.result index ce21913c5d4..80cff7c9a1e 100644 --- a/mysql-test/r/rpl_ignore_table.result +++ b/mysql-test/r/rpl_ignore_table.result @@ -30,6 +30,10 @@ create database mysqltest2; create table mysqltest2.t2 (id int); GRANT SELECT ON mysqltest2.t2 TO mysqltest4@localhost IDENTIFIED BY 'pass'; insert into mysql.user (user, host) values ("mysqltest5", "somehost"); +Warnings: +Warning 1364 Field 'ssl_cipher' doesn't have a default value +Warning 1364 Field 'x509_issuer' doesn't have a default value +Warning 1364 Field 'x509_subject' doesn't have a default value GRANT SELECT ON *.* TO mysqltest6@localhost; GRANT INSERT ON *.* TO mysqltest6@localhost; GRANT INSERT ON test.* TO mysqltest6@localhost; From d6422f61bab6cd227e2f854493e0ec1a2af97794 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 15:09:57 +0200 Subject: [PATCH 076/153] Bug#19991 CHANGE MASTER need option ssl-verify-server-cert - Add MASTER_SSL_VERIFY_SERVER_CERT option to CHANGE MASTER TO - Add Master_Ssl_Serify_Server_Cert to SHOW SLAVE STATUS - Save and restore ssl_verify_server_cert to master info file setting it to disabled as default. mysql-test/r/rpl_000015.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_change_master.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_empty_master_crash.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_flushlog_loop.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_loaddata.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_log_pos.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_rbr_to_sbr.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_redirect.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_replicate_do.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_rotate_logs.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_row_max_relay_size.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_server_id1.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_server_id2.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_slave_status.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_ssl1.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_stm_log.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_stm_max_relay_size.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_stm_reset_slave.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/r/rpl_stm_until.result: Update test result after adding new column to SHOW SLAVE STATUS mysql-test/t/rpl_ssl1.test: Change to "query_vertical show slave status" sql/lex.h: Add new token for MASTER_SSL_VERIFY_SERVER_CERT sql/repl_failsafe.cc: Turn on verification of master cert if so requested sql/rpl_mi.cc: Add new variable to MASTER_INFo and save/restore it from/to line 15 of master info file sql/rpl_mi.h: Add variable for ssl_verify_server_cert to MASTER_INFO sql/slave.cc: Turn on verification of master cert if so requested Add new column to SHOW SLAVE STATUS sql/sql_lex.h: Add ssl_verify_server_cert to "st_lex_master_info" struct - allow it to be UNCHANGED just like the ssl option. sql/sql_repl.cc: Add ssl_verify_server_cert to "st_lex_master_info" struct - allow it to be UNCHANGED just like the ssl option. sql/sql_yacc.yy: Add MASTER_SSL_VERIFY_SERVER_CERT to CHANGE MASTER TO mysql-test/t/rpl_ssl_verify_server.test: New BitKeeper file ``mysql-test/t/rpl_ssl_verify_server.test'' mysql-test/r/rpl_ssl_verify_server.result: New BitKeeper file ``mysql-test/r/rpl_ssl_verify_server.result'' --- mysql-test/r/rpl_000015.result | 14 +-- mysql-test/r/rpl_change_master.result | 8 +- mysql-test/r/rpl_empty_master_crash.result | 2 +- mysql-test/r/rpl_flushlog_loop.result | 1 + mysql-test/r/rpl_loaddata.result | 12 +-- mysql-test/r/rpl_log_pos.result | 16 ++-- mysql-test/r/rpl_openssl.result | 31 ------ mysql-test/r/rpl_rbr_to_sbr.result | 1 + mysql-test/r/rpl_redirect.result | 2 +- mysql-test/r/rpl_replicate_do.result | 4 +- mysql-test/r/rpl_rotate_logs.result | 12 +-- mysql-test/r/rpl_row_max_relay_size.result | 6 ++ mysql-test/r/rpl_server_id1.result | 4 +- mysql-test/r/rpl_server_id2.result | 4 +- mysql-test/r/rpl_slave_status.result | 1 + mysql-test/r/rpl_ssl1.result | 95 +++++++++++++++++++ mysql-test/r/rpl_ssl_verify_server.result | 57 +++++++++++ mysql-test/r/rpl_stm_log.result | 4 +- mysql-test/r/rpl_stm_max_relay_size.result | 6 ++ mysql-test/r/rpl_stm_reset_slave.result | 16 ++-- mysql-test/r/rpl_stm_until.result | 4 + .../t/{rpl_openssl.test => rpl_ssl1.test} | 4 +- mysql-test/t/rpl_ssl_verify_server.test | 34 +++++++ sql/lex.h | 1 + sql/repl_failsafe.cc | 4 + sql/rpl_mi.cc | 72 +++++++++----- sql/rpl_mi.h | 1 + sql/slave.cc | 9 ++ sql/sql_lex.h | 12 +-- sql/sql_repl.cc | 8 +- sql/sql_yacc.yy | 6 ++ 31 files changed, 340 insertions(+), 111 deletions(-) delete mode 100644 mysql-test/r/rpl_openssl.result create mode 100644 mysql-test/r/rpl_ssl1.result create mode 100644 mysql-test/r/rpl_ssl_verify_server.result rename mysql-test/t/{rpl_openssl.test => rpl_ssl1.test} (96%) create mode 100644 mysql-test/t/rpl_ssl_verify_server.test diff --git a/mysql-test/r/rpl_000015.result b/mysql-test/r/rpl_000015.result index a53750f82ad..930d4cc4f11 100644 --- a/mysql-test/r/rpl_000015.result +++ b/mysql-test/r/rpl_000015.result @@ -4,20 +4,20 @@ File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 102 reset slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert change master to master_host='127.0.0.1'; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 test DEFAULT_MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 test DEFAULT_MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # No change master to master_host='127.0.0.1',master_user='root', master_password='',master_port=MASTER_PORT; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 7 4 # # No No 0 0 0 # None 0 No # No start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 102 # # master-bin.000001 Yes Yes 0 0 102 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 7 master-bin.000001 102 # # master-bin.000001 Yes Yes 0 0 102 # None 0 No # No drop table if exists t1; create table t1 (n int, PRIMARY KEY(n)); insert into t1 values (10),(45),(90); diff --git a/mysql-test/r/rpl_change_master.result b/mysql-test/r/rpl_change_master.result index 513de9494ba..a3cd070b1b1 100644 --- a/mysql-test/r/rpl_change_master.result +++ b/mysql-test/r/rpl_change_master.result @@ -12,12 +12,12 @@ insert into t1 values(1); insert into t1 values(2); stop slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 187 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 187 # None 0 No # No change master to master_user='root'; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 187 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 # # # master-bin.000001 No No 0 0 187 # None 0 No # No start slave; select * from t1; n diff --git a/mysql-test/r/rpl_empty_master_crash.result b/mysql-test/r/rpl_empty_master_crash.result index 3e234d4ef59..d57600d7396 100644 --- a/mysql-test/r/rpl_empty_master_crash.result +++ b/mysql-test/r/rpl_empty_master_crash.result @@ -5,7 +5,7 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert load table t1 from master; ERROR 08S01: Error connecting to master: Master is not configured load table t1 from master; diff --git a/mysql-test/r/rpl_flushlog_loop.result b/mysql-test/r/rpl_flushlog_loop.result index 16d8ba251f4..03b7a10cde6 100644 --- a/mysql-test/r/rpl_flushlog_loop.result +++ b/mysql-test/r/rpl_flushlog_loop.result @@ -51,3 +51,4 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No diff --git a/mysql-test/r/rpl_loaddata.result b/mysql-test/r/rpl_loaddata.result index cae11e98caa..ddcaa788ecf 100644 --- a/mysql-test/r/rpl_loaddata.result +++ b/mysql-test/r/rpl_loaddata.result @@ -38,8 +38,8 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; set global sql_slave_skip_counter=1; start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1793 # # master-bin.000001 Yes Yes # 0 0 1793 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1793 # # master-bin.000001 Yes Yes # 0 0 1793 # None 0 No # No set sql_log_bin=0; delete from t1; set sql_log_bin=1; @@ -48,8 +48,8 @@ stop slave; change master to master_user='test'; change master to master_user='root'; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1828 # # master-bin.000001 No No # 0 0 1828 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 1828 # # master-bin.000001 No No # 0 0 1828 # None 0 No # No set global sql_slave_skip_counter=1; start slave; set sql_log_bin=0; @@ -59,8 +59,8 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1; stop slave; reset slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No reset master; create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60), unique(day)) engine=MyISAM; diff --git a/mysql-test/r/rpl_log_pos.result b/mysql-test/r/rpl_log_pos.result index c7484022b23..8fca1f69fbf 100644 --- a/mysql-test/r/rpl_log_pos.result +++ b/mysql-test/r/rpl_log_pos.result @@ -8,26 +8,26 @@ show master status; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 102 show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes 0 0 102 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes 0 0 102 # None 0 No # No stop slave; change master to master_log_pos=74; start slave; stop slave; change master to master_log_pos=74; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 74 # # master-bin.000001 No No 0 0 74 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 74 # # master-bin.000001 No No 0 0 74 # None 0 No # No start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 74 # # master-bin.000001 No Yes 0 0 74 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 74 # # master-bin.000001 No Yes 0 0 74 # None 0 No # No stop slave; change master to master_log_pos=177; start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 177 # # master-bin.000001 No Yes 0 0 177 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 177 # # master-bin.000001 No Yes 0 0 177 # None 0 No # No show master status; File Position Binlog_Do_DB Binlog_Ignore_DB master-bin.000001 102 diff --git a/mysql-test/r/rpl_openssl.result b/mysql-test/r/rpl_openssl.result deleted file mode 100644 index 4fe02088632..00000000000 --- a/mysql-test/r/rpl_openssl.result +++ /dev/null @@ -1,31 +0,0 @@ -stop slave; -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; -start slave; -grant replication slave on *.* to replssl@localhost require ssl; -create table t1 (t int); -stop slave; -change master to master_user='replssl',master_password=''; -start slave; -insert into t1 values (1); -select * from t1; -t -stop slave; -change master to master_ssl=1 , master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem'; -start slave; -select * from t1; -t -1 -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 replssl MASTER_MYPORT 1 # # # # # # Yes # 0 0 # # None 0 Yes MYSQL_TEST_DIR/std_data/cacert.pem MYSQL_TEST_DIR/std_data/client-cert.pem MYSQL_TEST_DIR/std_data/client-key.pem # -stop slave; -change master to master_user='root',master_password='', master_ssl=0; -start slave; -drop user replssl@localhost; -drop table t1; -show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 # # # # # # Yes # 0 0 # # None 0 No MYSQL_TEST_DIR/std_data/cacert.pem MYSQL_TEST_DIR/std_data/client-cert.pem MYSQL_TEST_DIR/std_data/client-key.pem # diff --git a/mysql-test/r/rpl_rbr_to_sbr.result b/mysql-test/r/rpl_rbr_to_sbr.result index 4b2d129c732..46739ace854 100644 --- a/mysql-test/r/rpl_rbr_to_sbr.result +++ b/mysql-test/r/rpl_rbr_to_sbr.result @@ -55,6 +55,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SHOW BINLOG EVENTS; Log_name Pos Event_type Server_id End_log_pos Info slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 diff --git a/mysql-test/r/rpl_redirect.result b/mysql-test/r/rpl_redirect.result index dd16626cbe3..64866df1c15 100644 --- a/mysql-test/r/rpl_redirect.result +++ b/mysql-test/r/rpl_redirect.result @@ -5,7 +5,7 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert SHOW SLAVE HOSTS; Server_id Host Port Rpl_recovery_rank Master_id 2 127.0.0.1 SLAVE_PORT 2 1 diff --git a/mysql-test/r/rpl_replicate_do.result b/mysql-test/r/rpl_replicate_do.result index 43e7c6779bf..f3eab5fe798 100644 --- a/mysql-test/r/rpl_replicate_do.result +++ b/mysql-test/r/rpl_replicate_do.result @@ -27,8 +27,8 @@ select * from t11; ERROR 42S02: Table 'test.t11' doesn't exist drop table if exists t1,t2,t11; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 # # # master-bin.000001 Yes Yes test.t1 # 0 0 # # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 # # # master-bin.000001 Yes Yes test.t1 # 0 0 # # None 0 No # No create table t1 (ts timestamp); set one_shot time_zone='met'; insert into t1 values('2005-08-12 00:00:00'); diff --git a/mysql-test/r/rpl_rotate_logs.result b/mysql-test/r/rpl_rotate_logs.result index 264f5d224bd..85b867861a3 100644 --- a/mysql-test/r/rpl_rotate_logs.result +++ b/mysql-test/r/rpl_rotate_logs.result @@ -15,8 +15,8 @@ insert into temp_table values ("testing temporary tables"); create table t1 (s text); insert into t1 values('Could not break slave'),('Tried hard'); show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 552 # # master-bin.000001 Yes Yes # 0 0 552 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 60 master-bin.000001 552 # # master-bin.000001 Yes Yes # 0 0 552 # None 0 No # No select * from t1; s Could not break slave @@ -56,8 +56,8 @@ Log_name File_size master-bin.000003 411 insert into t2 values (65); show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 500 # # master-bin.000003 Yes Yes # 0 0 500 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 60 master-bin.000003 500 # # master-bin.000003 Yes Yes # 0 0 500 # None 0 No # No select * from t2; m 34 @@ -84,8 +84,8 @@ select * from t4; a testing temporary tables part 2 show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2036 # # master-bin.000005 Yes Yes # 0 0 2036 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 60 master-bin.000005 2036 # # master-bin.000005 Yes Yes # 0 0 2036 # None 0 No # No lock tables t3 read; select count(*) from t3 where n >= 4; count(*) diff --git a/mysql-test/r/rpl_row_max_relay_size.result b/mysql-test/r/rpl_row_max_relay_size.result index 8bb10ffb080..7b7d87ab6f4 100644 --- a/mysql-test/r/rpl_row_max_relay_size.result +++ b/mysql-test/r/rpl_row_max_relay_size.result @@ -57,6 +57,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 2 # @@ -100,6 +101,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 3: max_relay_log_size = 0 # @@ -143,6 +145,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions # @@ -183,6 +186,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 5 # @@ -224,6 +228,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated # @@ -263,6 +268,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No flush logs; show master status; File master-bin.000002 diff --git a/mysql-test/r/rpl_server_id1.result b/mysql-test/r/rpl_server_id1.result index c94a7748fcd..4aff9a6f1f6 100644 --- a/mysql-test/r/rpl_server_id1.result +++ b/mysql-test/r/rpl_server_id1.result @@ -9,8 +9,8 @@ reset master; stop slave; change master to master_port=SLAVE_PORT; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 102 None 0 No NULL +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # # 0 0 0 102 None 0 No NULL No start slave; insert into t1 values (1); show status like "slave_running"; diff --git a/mysql-test/r/rpl_server_id2.result b/mysql-test/r/rpl_server_id2.result index 72db862040e..41235c080c2 100644 --- a/mysql-test/r/rpl_server_id2.result +++ b/mysql-test/r/rpl_server_id2.result @@ -9,8 +9,8 @@ reset master; stop slave; change master to master_port=SLAVE_PORT; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 102 None 0 No NULL +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root SLAVE_PORT 1 4 slave-relay-bin.000001 4 No No # 0 0 0 102 None 0 No NULL No start slave; insert into t1 values (1); select * from t1; diff --git a/mysql-test/r/rpl_slave_status.result b/mysql-test/r/rpl_slave_status.result index 641a65f5ed7..67bad8554c2 100644 --- a/mysql-test/r/rpl_slave_status.result +++ b/mysql-test/r/rpl_slave_status.result @@ -52,5 +52,6 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master NULL +Master_SSL_Verify_Server_Cert No drop table t1; drop table t1; diff --git a/mysql-test/r/rpl_ssl1.result b/mysql-test/r/rpl_ssl1.result new file mode 100644 index 00000000000..2cb9a8a7c48 --- /dev/null +++ b/mysql-test/r/rpl_ssl1.result @@ -0,0 +1,95 @@ +stop slave; +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; +start slave; +grant replication slave on *.* to replssl@localhost require ssl; +create table t1 (t int); +stop slave; +change master to master_user='replssl',master_password=''; +start slave; +insert into t1 values (1); +select * from t1; +t +stop slave; +change master to master_ssl=1 , master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem'; +start slave; +select * from t1; +t +1 +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User replssl +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File # +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed Yes +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No +stop slave; +change master to master_user='root',master_password='', master_ssl=0; +start slave; +drop user replssl@localhost; +drop table t1; +show slave status; +Slave_IO_State # +Master_Host 127.0.0.1 +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File # +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed No +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No diff --git a/mysql-test/r/rpl_ssl_verify_server.result b/mysql-test/r/rpl_ssl_verify_server.result new file mode 100644 index 00000000000..18265ca2ec8 --- /dev/null +++ b/mysql-test/r/rpl_ssl_verify_server.result @@ -0,0 +1,57 @@ +stop slave; +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; +start slave; +stop slave; +change master to +master_host="localhost", +master_ssl=1 , +master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', +master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', +master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem', +master_ssl_verify_server_cert=1; +start slave; +create table t1 (t int); +insert into t1 values (1); +on slave +select * from t1; +t +1 +show slave status; +Slave_IO_State # +Master_Host localhost +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File # +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed Yes +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert Yes +drop table t1; diff --git a/mysql-test/r/rpl_stm_log.result b/mysql-test/r/rpl_stm_log.result index e0b1aa12c9b..b1e08d2176f 100644 --- a/mysql-test/r/rpl_stm_log.result +++ b/mysql-test/r/rpl_stm_log.result @@ -91,8 +91,8 @@ slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4 slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM slave-bin.000002 # Query 1 # use `test`; insert into t2 values (1) show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 388 # # master-bin.000002 Yes Yes # 0 0 388 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 388 # # master-bin.000002 Yes Yes # 0 0 388 # None 0 No # No show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; diff --git a/mysql-test/r/rpl_stm_max_relay_size.result b/mysql-test/r/rpl_stm_max_relay_size.result index c4a9a5bd3ff..e963f229cc4 100644 --- a/mysql-test/r/rpl_stm_max_relay_size.result +++ b/mysql-test/r/rpl_stm_max_relay_size.result @@ -55,6 +55,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 2 # @@ -98,6 +99,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 3: max_relay_log_size = 0 # @@ -141,6 +143,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions # @@ -181,6 +184,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 5 # @@ -222,6 +226,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No # # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated # @@ -261,6 +266,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No flush logs; show master status; File master-bin.000002 diff --git a/mysql-test/r/rpl_stm_reset_slave.result b/mysql-test/r/rpl_stm_reset_slave.result index 834b9add089..81c71ba6891 100644 --- a/mysql-test/r/rpl_stm_reset_slave.result +++ b/mysql-test/r/rpl_stm_reset_slave.result @@ -5,21 +5,21 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No # No stop slave; change master to master_user='test'; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 No No # 0 0 102 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 No No # 0 0 102 # None 0 No # No reset slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No # No stop slave; reset slave; start slave; diff --git a/mysql-test/r/rpl_stm_until.result b/mysql-test/r/rpl_stm_until.result index e8e33b66864..f186473804e 100644 --- a/mysql-test/r/rpl_stm_until.result +++ b/mysql-test/r/rpl_stm_until.result @@ -53,6 +53,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; select * from t1; n @@ -94,6 +95,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746; select * from t2; n @@ -133,6 +135,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No start slave; stop slave; start slave until master_log_file='master-bin.000001', master_log_pos=776; @@ -170,6 +173,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No start slave until master_log_file='master-bin', master_log_pos=561; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; diff --git a/mysql-test/t/rpl_openssl.test b/mysql-test/t/rpl_ssl1.test similarity index 96% rename from mysql-test/t/rpl_openssl.test rename to mysql-test/t/rpl_ssl1.test index 00ae5c935bf..c48155c0fa1 100644 --- a/mysql-test/t/rpl_openssl.test +++ b/mysql-test/t/rpl_ssl1.test @@ -46,7 +46,7 @@ select * from t1; #checking show slave status --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT --replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # -show slave status; +query_vertical show slave status; #checking if replication works without ssl also performing clean up stop slave; @@ -60,6 +60,6 @@ connection slave; sync_with_master; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT --replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # -show slave status; +query_vertical show slave status; # End of 4.1 tests diff --git a/mysql-test/t/rpl_ssl_verify_server.test b/mysql-test/t/rpl_ssl_verify_server.test new file mode 100644 index 00000000000..de83abdf566 --- /dev/null +++ b/mysql-test/t/rpl_ssl_verify_server.test @@ -0,0 +1,34 @@ +source include/have_openssl.inc; +source include/master-slave.inc; + +# Start replication with ssl_verify_server_cert turned on +connection slave; +stop slave; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval change master to + master_host="localhost", + master_ssl=1 , + master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', + master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', + master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem', + master_ssl_verify_server_cert=1; +start slave; + +connection master; +create table t1 (t int); +insert into t1 values (1); + +sync_slave_with_master; + +echo on slave; +#checking that replication is ok +select * from t1; + +#checking show slave status +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # +query_vertical show slave status; + +connection master; +drop table t1; +sync_slave_with_master; diff --git a/sql/lex.h b/sql/lex.h index 2bf0e08c825..99f7b1734ce 100644 --- a/sql/lex.h +++ b/sql/lex.h @@ -312,6 +312,7 @@ static SYMBOL symbols[] = { { "MASTER_SSL_CERT", SYM(MASTER_SSL_CERT_SYM)}, { "MASTER_SSL_CIPHER",SYM(MASTER_SSL_CIPHER_SYM)}, { "MASTER_SSL_KEY", SYM(MASTER_SSL_KEY_SYM)}, + { "MASTER_SSL_VERIFY_SERVER_CERT", SYM(MASTER_SSL_VERIFY_SERVER_CERT_SYM)}, { "MASTER_USER", SYM(MASTER_USER_SYM)}, { "MATCH", SYM(MATCH)}, { "MAX_CONNECTIONS_PER_HOUR", SYM(MAX_CONNECTIONS_PER_HOUR)}, diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 16b00cab516..33caaf975a8 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -696,12 +696,16 @@ int connect_to_master(THD *thd, MYSQL* mysql, MASTER_INFO* mi) #ifdef HAVE_OPENSSL if (mi->ssl) + { mysql_ssl_set(mysql, mi->ssl_key[0]?mi->ssl_key:0, mi->ssl_cert[0]?mi->ssl_cert:0, mi->ssl_ca[0]?mi->ssl_ca:0, mi->ssl_capath[0]?mi->ssl_capath:0, mi->ssl_cipher[0]?mi->ssl_cipher:0); + mysql_options(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, + &mi->ssl_verify_server_cert); + } #endif mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset_info->csname); diff --git a/sql/rpl_mi.cc b/sql/rpl_mi.cc index 1c426eff768..354a97cefde 100644 --- a/sql/rpl_mi.cc +++ b/sql/rpl_mi.cc @@ -29,12 +29,13 @@ int init_strvar_from_file(char *var, int max_size, IO_CACHE *f, MASTER_INFO::MASTER_INFO() :ssl(0), fd(-1), io_thd(0), inited(0), - abort_slave(0),slave_running(0), slave_run_id(0) + abort_slave(0),slave_running(0), slave_run_id(0), + ssl_verify_server_cert(0) { host[0] = 0; user[0] = 0; password[0] = 0; ssl_ca[0]= 0; ssl_capath[0]= 0; ssl_cert[0]= 0; ssl_cipher[0]= 0; ssl_key[0]= 0; - + bzero((char*) &file, sizeof(file)); pthread_mutex_init(&run_lock, MY_MUTEX_INIT_FAST); pthread_mutex_init(&data_lock, MY_MUTEX_INIT_FAST); @@ -80,12 +81,21 @@ void init_master_info_with_options(MASTER_INFO* mi) strmake(mi->ssl_cipher, master_ssl_cipher, sizeof(mi->ssl_cipher)-1); if (master_ssl_key) strmake(mi->ssl_key, master_ssl_key, sizeof(mi->ssl_key)-1); + /* Intentionally init ssl_verify_server_cert to 0, no option available */ + mi->ssl_verify_server_cert= 0; DBUG_VOID_RETURN; } -#define LINES_IN_MASTER_INFO_WITH_SSL 14 +enum { + LINES_IN_MASTER_INFO_WITH_SSL= 14, + /* 5.1.16 added value of master_ssl_verify_server_cert */ + LINE_FOR_MASTER_SSL_VERIFY_SERVER_CERT= 15, + + /* Number of lines currently used when saving master info file */ + LINES_IN_MASTER_INFO= LINE_FOR_MASTER_SSL_VERIFY_SERVER_CERT +}; int init_master_info(MASTER_INFO* mi, const char* master_info_fname, const char* slave_info_fname, @@ -184,7 +194,8 @@ file '%s')", fname); } mi->fd = fd; - int port, connect_retry, master_log_pos, ssl= 0, lines; + int port, connect_retry, master_log_pos, lines; + int ssl= 0, ssl_verify_server_cert= 0; char *first_non_digit; /* @@ -195,7 +206,8 @@ file '%s')", fname); file since versions before 4.1.x could generate files with more lines than needed. If first line doesn't contain a number or contain number less than - 14 then such file is treated like file from pre 4.1.1 version. + LINES_IN_MASTER_INFO_WITH_SSL then such file is treated like file + from pre 4.1.1 version. There is no ambiguity when reading an old master.info, as before 4.1.1, the first line contained the binlog's name, which is either empty or has an extension (contains a '.'), so can't be confused @@ -219,7 +231,8 @@ file '%s')", fname); if (mi->master_log_name[0]!='\0' && *first_non_digit=='\0' && lines >= LINES_IN_MASTER_INFO_WITH_SSL) - { // Seems to be new format + { + /* Seems to be new format => read master log name from next line */ if (init_strvar_from_file(mi->master_log_name, sizeof(mi->master_log_name), &mi->file, "")) goto errwithmsg; @@ -245,19 +258,31 @@ file '%s')", fname); slave will try connect to master, so in this case warning is printed. */ - if (lines >= LINES_IN_MASTER_INFO_WITH_SSL && - (init_intvar_from_file(&ssl, &mi->file, master_ssl) || - init_strvar_from_file(mi->ssl_ca, sizeof(mi->ssl_ca), - &mi->file, master_ssl_ca) || - init_strvar_from_file(mi->ssl_capath, sizeof(mi->ssl_capath), - &mi->file, master_ssl_capath) || - init_strvar_from_file(mi->ssl_cert, sizeof(mi->ssl_cert), - &mi->file, master_ssl_cert) || - init_strvar_from_file(mi->ssl_cipher, sizeof(mi->ssl_cipher), - &mi->file, master_ssl_cipher) || - init_strvar_from_file(mi->ssl_key, sizeof(mi->ssl_key), - &mi->file, master_ssl_key))) - goto errwithmsg; + if (lines >= LINES_IN_MASTER_INFO_WITH_SSL) + { + if (init_intvar_from_file(&ssl, &mi->file, master_ssl) || + init_strvar_from_file(mi->ssl_ca, sizeof(mi->ssl_ca), + &mi->file, master_ssl_ca) || + init_strvar_from_file(mi->ssl_capath, sizeof(mi->ssl_capath), + &mi->file, master_ssl_capath) || + init_strvar_from_file(mi->ssl_cert, sizeof(mi->ssl_cert), + &mi->file, master_ssl_cert) || + init_strvar_from_file(mi->ssl_cipher, sizeof(mi->ssl_cipher), + &mi->file, master_ssl_cipher) || + init_strvar_from_file(mi->ssl_key, sizeof(mi->ssl_key), + &mi->file, master_ssl_key)) + goto errwithmsg; + + /* + Starting from 5.1.16 ssl_verify_server_cert might be + in the file + */ + if (lines >= LINE_FOR_MASTER_SSL_VERIFY_SERVER_CERT && + init_intvar_from_file(&ssl_verify_server_cert, &mi->file, 0)) + goto errwithmsg; + + } + #ifndef HAVE_OPENSSL if (ssl) sql_print_warning("SSL information in the master info file " @@ -273,6 +298,7 @@ file '%s')", fname); mi->port= (uint) port; mi->connect_retry= (uint) connect_retry; mi->ssl= (my_bool) ssl; + mi->ssl_verify_server_cert= ssl_verify_server_cert; } DBUG_PRINT("master_info",("log_file_name: %s position: %ld", mi->master_log_name, @@ -315,6 +341,7 @@ int flush_master_info(MASTER_INFO* mi, bool flush_relay_log_cache) { IO_CACHE* file = &mi->file; char lbuf[22]; + DBUG_ENTER("flush_master_info"); DBUG_PRINT("enter",("master_pos: %ld", (long) mi->master_log_pos)); @@ -352,13 +379,14 @@ int flush_master_info(MASTER_INFO* mi, bool flush_relay_log_cache) */ my_b_seek(file, 0L); - my_b_printf(file, "%u\n%s\n%s\n%s\n%s\n%s\n%d\n%d\n%d\n%s\n%s\n%s\n%s\n%s\n", - LINES_IN_MASTER_INFO_WITH_SSL, + my_b_printf(file, + "%u\n%s\n%s\n%s\n%s\n%s\n%d\n%d\n%d\n%s\n%s\n%s\n%s\n%s\n%d\n", + LINES_IN_MASTER_INFO, mi->master_log_name, llstr(mi->master_log_pos, lbuf), mi->host, mi->user, mi->password, mi->port, mi->connect_retry, (int)(mi->ssl), mi->ssl_ca, mi->ssl_capath, mi->ssl_cert, - mi->ssl_cipher, mi->ssl_key); + mi->ssl_cipher, mi->ssl_key, mi->ssl_verify_server_cert); DBUG_RETURN(-flush_io_cache(file)); } diff --git a/sql/rpl_mi.h b/sql/rpl_mi.h index ae77e64d93a..c39a89a35b3 100644 --- a/sql/rpl_mi.h +++ b/sql/rpl_mi.h @@ -65,6 +65,7 @@ class MASTER_INFO my_bool ssl; // enables use of SSL connection if true char ssl_ca[FN_REFLEN], ssl_capath[FN_REFLEN], ssl_cert[FN_REFLEN]; char ssl_cipher[FN_REFLEN], ssl_key[FN_REFLEN]; + my_bool ssl_verify_server_cert; my_off_t master_log_pos; File fd; // we keep the file open, so we need to remember the file pointer diff --git a/sql/slave.cc b/sql/slave.cc index 6f3c5926023..65a97162f32 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -1248,6 +1248,8 @@ bool show_master_info(THD* thd, MASTER_INFO* mi) sizeof(mi->ssl_key))); field_list.push_back(new Item_return_int("Seconds_Behind_Master", 10, MYSQL_TYPE_LONGLONG)); + field_list.push_back(new Item_empty_string("Master_SSL_Verify_Server_Cert", + 3)); if (protocol->send_fields(&field_list, Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF)) @@ -1354,7 +1356,10 @@ bool show_master_info(THD* thd, MASTER_INFO* mi) max(0, time_diff) : 0)); } else + { protocol->store_null(); + } + protocol->store(mi->ssl_verify_server_cert? "Yes":"No", &my_charset_bin); pthread_mutex_unlock(&mi->rli.data_lock); pthread_mutex_unlock(&mi->data_lock); @@ -3092,12 +3097,16 @@ static int connect_to_master(THD* thd, MYSQL* mysql, MASTER_INFO* mi, #ifdef HAVE_OPENSSL if (mi->ssl) + { mysql_ssl_set(mysql, mi->ssl_key[0]?mi->ssl_key:0, mi->ssl_cert[0]?mi->ssl_cert:0, mi->ssl_ca[0]?mi->ssl_ca:0, mi->ssl_capath[0]?mi->ssl_capath:0, mi->ssl_cipher[0]?mi->ssl_cipher:0); + mysql_options(mysql, MYSQL_OPT_SSL_VERIFY_SERVER_CERT, + &mi->ssl_verify_server_cert); + } #endif mysql_options(mysql, MYSQL_SET_CHARSET_NAME, default_charset_info->csname); diff --git a/sql/sql_lex.h b/sql/sql_lex.h index 821af3f946d..2b69baa3ec1 100644 --- a/sql/sql_lex.h +++ b/sql/sql_lex.h @@ -188,12 +188,12 @@ typedef struct st_lex_master_info uint port, connect_retry; ulonglong pos; ulong server_id; - /* - Variable for MASTER_SSL option. - MASTER_SSL=0 in CHANGE MASTER TO corresponds to SSL_DISABLE - MASTER_SSL=1 corresponds to SSL_ENABLE - */ - enum {SSL_UNCHANGED=0, SSL_DISABLE, SSL_ENABLE} ssl; + /* + Enum is used for making it possible to detect if the user + changed variable or if it should be left at old value + */ + enum {SSL_UNCHANGED, SSL_DISABLE, SSL_ENABLE} + ssl, ssl_verify_server_cert; char *ssl_key, *ssl_cert, *ssl_ca, *ssl_capath, *ssl_cipher; char *relay_log_name; ulong relay_log_pos; diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 17163fb1940..250ab596b02 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -1126,6 +1126,11 @@ bool change_master(THD* thd, MASTER_INFO* mi) if (lex_mi->ssl != LEX_MASTER_INFO::SSL_UNCHANGED) mi->ssl= (lex_mi->ssl == LEX_MASTER_INFO::SSL_ENABLE); + + if (lex_mi->ssl_verify_server_cert != LEX_MASTER_INFO::SSL_UNCHANGED) + mi->ssl_verify_server_cert= + (lex_mi->ssl_verify_server_cert == LEX_MASTER_INFO::SSL_ENABLE); + if (lex_mi->ssl_ca) strmake(mi->ssl_ca, lex_mi->ssl_ca, sizeof(mi->ssl_ca)-1); if (lex_mi->ssl_capath) @@ -1138,7 +1143,8 @@ bool change_master(THD* thd, MASTER_INFO* mi) strmake(mi->ssl_key, lex_mi->ssl_key, sizeof(mi->ssl_key)-1); #ifndef HAVE_OPENSSL if (lex_mi->ssl || lex_mi->ssl_ca || lex_mi->ssl_capath || - lex_mi->ssl_cert || lex_mi->ssl_cipher || lex_mi->ssl_key ) + lex_mi->ssl_cert || lex_mi->ssl_cipher || lex_mi->ssl_key || + lex_mi->ssl_verify_server_cert ) push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_SLAVE_IGNORED_SSL_PARAMS, ER(ER_SLAVE_IGNORED_SSL_PARAMS)); #endif diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 424fd98c4fc..3aa56cea4d7 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -645,6 +645,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token MASTER_SSL_CIPHER_SYM %token MASTER_SSL_KEY_SYM %token MASTER_SSL_SYM +%token MASTER_SSL_VERIFY_SERVER_CERT_SYM %token MASTER_SYM %token MASTER_USER_SYM %token MATCH /* SQL-2003-R */ @@ -1390,6 +1391,11 @@ master_def: { Lex->mi.ssl_key= $3.str; } + | MASTER_SSL_VERIFY_SERVER_CERT_SYM EQ ulong_num + { + Lex->mi.ssl_verify_server_cert= $3 ? + LEX_MASTER_INFO::SSL_ENABLE : LEX_MASTER_INFO::SSL_DISABLE; + } | master_file_def ; From 0d6367f6692b66e16f5861d42ee21ebd4128d12d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 18:42:27 +0500 Subject: [PATCH 077/153] bug #24633 (sql_mode NO_DIR_IN_CREATE doesn't work with partitioned tables) additional patch to fix SHOW CREATE behaviour mysql-test/r/partition.result: result fixed mysql-test/t/partition.test: testcase sql/sql_partition.cc: check MODE_NO_DIR_IN_CREATE for partitioned tables in SHOW CREATE statement --- mysql-test/r/partition.result | 8 +++++++- mysql-test/t/partition.test | 14 +++++++++++++- sql/sql_partition.cc | 15 +++++++++------ 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/partition.result b/mysql-test/r/partition.result index 35b760cfc9d..2e5fa4b9195 100644 --- a/mysql-test/r/partition.result +++ b/mysql-test/r/partition.result @@ -1231,5 +1231,11 @@ partition p01 values less than (1000) data directory='/not/existing' index directory='/not/existing' ); -DROP TABLE t1; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `i` int(11) DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 /*!50100 PARTITION BY RANGE (i) (PARTITION p01 VALUES LESS THAN (1000) ENGINE = MyISAM) */ +DROP TABLE t1, t2; +set @@sql_mode=@org_mode; End of 5.1 tests diff --git a/mysql-test/t/partition.test b/mysql-test/t/partition.test index 814d96d087d..399f3c4a41d 100644 --- a/mysql-test/t/partition.test +++ b/mysql-test/t/partition.test @@ -1467,6 +1467,16 @@ drop table t1, t2; # Bug #24633 SQL MODE "NO_DIR_IN_CREATE" does not work with partitioned tables # +disable_query_log; +eval create table t2 (i int ) +partition by range (i) +( + partition p01 values less than (1000) + data directory="$MYSQLTEST_VARDIR/master-data/test/" + index directory="$MYSQLTEST_VARDIR/master-data/test/" +); +enable_query_log; + set @org_mode=@@sql_mode; set @@sql_mode='NO_DIR_IN_CREATE'; select @@sql_mode; @@ -1478,6 +1488,8 @@ partition by range (i) index directory='/not/existing' ); -DROP TABLE t1; +show create table t2; +DROP TABLE t1, t2; +set @@sql_mode=@org_mode; --echo End of 5.1 tests diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index dbac53ed5f6..0dae41e7bad 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -1892,12 +1892,15 @@ static int add_partition_options(File fptr, partition_element *p_elem) err+= add_keyword_int(fptr,"MAX_ROWS",(longlong)p_elem->part_max_rows); if (p_elem->part_min_rows) err+= add_keyword_int(fptr,"MIN_ROWS",(longlong)p_elem->part_min_rows); - if (p_elem->data_file_name) - err+= add_keyword_string(fptr, "DATA DIRECTORY", TRUE, - p_elem->data_file_name); - if (p_elem->index_file_name) - err+= add_keyword_string(fptr, "INDEX DIRECTORY", TRUE, - p_elem->index_file_name); + if (!(current_thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE)) + { + if (p_elem->data_file_name) + err+= add_keyword_string(fptr, "DATA DIRECTORY", TRUE, + p_elem->data_file_name); + if (p_elem->index_file_name) + err+= add_keyword_string(fptr, "INDEX DIRECTORY", TRUE, + p_elem->index_file_name); + } if (p_elem->part_comment) err+= add_keyword_string(fptr, "COMMENT", TRUE, p_elem->part_comment); return err + add_engine(fptr,p_elem->engine_type); From 9bf9e226ca45e02f8f83cebaedb395ed84141dc0 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 16:11:02 +0200 Subject: [PATCH 078/153] After merge fixes BitKeeper/deleted/.del-rpl_ssl_verify_server.test: Delete: mysql-test/t/rpl_ssl_verify_server.test BitKeeper/deleted/.del-rpl_ssl_verify_server.result: Delete: mysql-test/r/rpl_ssl_verify_server.result mysql-test/r/rpl_known_bugs_detection.result: Add new column after merge mysql-test/r/rpl_ssl.result: Add new column after merge mysql-test/r/rpl_ssl1.result: Merge test and result file mysql-test/t/rpl_ssl1.test: Merge test and result file --- mysql-test/r/rpl_known_bugs_detection.result | 2 + mysql-test/r/rpl_ssl.result | 2 + mysql-test/r/rpl_ssl1.result | 51 ++++++++++++++++++ mysql-test/r/rpl_ssl_verify_server.result | 57 -------------------- mysql-test/t/rpl_ssl1.test | 32 +++++++++++ mysql-test/t/rpl_ssl_verify_server.test | 34 ------------ 6 files changed, 87 insertions(+), 91 deletions(-) delete mode 100644 mysql-test/r/rpl_ssl_verify_server.result delete mode 100644 mysql-test/t/rpl_ssl_verify_server.test diff --git a/mysql-test/r/rpl_known_bugs_detection.result b/mysql-test/r/rpl_known_bugs_detection.result index eabc6185780..a09d63a5848 100644 --- a/mysql-test/r/rpl_known_bugs_detection.result +++ b/mysql-test/r/rpl_known_bugs_detection.result @@ -45,6 +45,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SELECT * FROM t1; a b stop slave; @@ -127,6 +128,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SELECT * FROM t1; id field_1 field_2 field_3 drop table t1, t2; diff --git a/mysql-test/r/rpl_ssl.result b/mysql-test/r/rpl_ssl.result index 33deb9a8c92..f68b639b12d 100644 --- a/mysql-test/r/rpl_ssl.result +++ b/mysql-test/r/rpl_ssl.result @@ -53,6 +53,7 @@ Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem Master_SSL_Cipher Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No STOP SLAVE; select * from t1; t @@ -91,3 +92,4 @@ Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem Master_SSL_Cipher Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No diff --git a/mysql-test/r/rpl_ssl1.result b/mysql-test/r/rpl_ssl1.result index 2cb9a8a7c48..6bc4b53849f 100644 --- a/mysql-test/r/rpl_ssl1.result +++ b/mysql-test/r/rpl_ssl1.result @@ -93,3 +93,54 @@ Master_SSL_Cipher Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No +stop slave; +change master to +master_host="localhost", +master_ssl=1 , +master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', +master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', +master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem', +master_ssl_verify_server_cert=1; +start slave; +create table t1 (t int); +insert into t1 values (1); +on slave +select * from t1; +t +1 +show slave status; +Slave_IO_State # +Master_Host localhost +Master_User root +Master_Port MASTER_MYPORT +Connect_Retry 1 +Master_Log_File # +Read_Master_Log_Pos # +Relay_Log_File # +Relay_Log_Pos # +Relay_Master_Log_File # +Slave_IO_Running # +Slave_SQL_Running Yes +Replicate_Do_DB +Replicate_Ignore_DB +Replicate_Do_Table +Replicate_Ignore_Table # +Replicate_Wild_Do_Table +Replicate_Wild_Ignore_Table +Last_Errno 0 +Last_Error +Skip_Counter 0 +Exec_Master_Log_Pos # +Relay_Log_Space # +Until_Condition None +Until_Log_File +Until_Log_Pos 0 +Master_SSL_Allowed Yes +Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem +Master_SSL_CA_Path +Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem +Master_SSL_Cipher +Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem +Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert Yes +drop table t1; diff --git a/mysql-test/r/rpl_ssl_verify_server.result b/mysql-test/r/rpl_ssl_verify_server.result deleted file mode 100644 index 18265ca2ec8..00000000000 --- a/mysql-test/r/rpl_ssl_verify_server.result +++ /dev/null @@ -1,57 +0,0 @@ -stop slave; -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; -start slave; -stop slave; -change master to -master_host="localhost", -master_ssl=1 , -master_ssl_ca ='MYSQL_TEST_DIR/std_data/cacert.pem', -master_ssl_cert='MYSQL_TEST_DIR/std_data/client-cert.pem', -master_ssl_key='MYSQL_TEST_DIR/std_data/client-key.pem', -master_ssl_verify_server_cert=1; -start slave; -create table t1 (t int); -insert into t1 values (1); -on slave -select * from t1; -t -1 -show slave status; -Slave_IO_State # -Master_Host localhost -Master_User root -Master_Port MASTER_MYPORT -Connect_Retry 1 -Master_Log_File # -Read_Master_Log_Pos # -Relay_Log_File # -Relay_Log_Pos # -Relay_Master_Log_File # -Slave_IO_Running # -Slave_SQL_Running Yes -Replicate_Do_DB -Replicate_Ignore_DB -Replicate_Do_Table -Replicate_Ignore_Table # -Replicate_Wild_Do_Table -Replicate_Wild_Ignore_Table -Last_Errno 0 -Last_Error -Skip_Counter 0 -Exec_Master_Log_Pos # -Relay_Log_Space # -Until_Condition None -Until_Log_File -Until_Log_Pos 0 -Master_SSL_Allowed Yes -Master_SSL_CA_File MYSQL_TEST_DIR/std_data/cacert.pem -Master_SSL_CA_Path -Master_SSL_Cert MYSQL_TEST_DIR/std_data/client-cert.pem -Master_SSL_Cipher -Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem -Seconds_Behind_Master # -Master_SSL_Verify_Server_Cert Yes -drop table t1; diff --git a/mysql-test/t/rpl_ssl1.test b/mysql-test/t/rpl_ssl1.test index cb7bee8e6d3..6ca1484bb17 100644 --- a/mysql-test/t/rpl_ssl1.test +++ b/mysql-test/t/rpl_ssl1.test @@ -63,3 +63,35 @@ sync_with_master; query_vertical show slave status; # End of 4.1 tests + +# Start replication with ssl_verify_server_cert turned on +connection slave; +stop slave; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR +eval change master to + master_host="localhost", + master_ssl=1 , + master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', + master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', + master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem', + master_ssl_verify_server_cert=1; +start slave; + +connection master; +create table t1 (t int); +insert into t1 values (1); + +sync_slave_with_master; + +echo on slave; +#checking that replication is ok +select * from t1; + +#checking show slave status +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT +--replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # +query_vertical show slave status; + +connection master; +drop table t1; +sync_slave_with_master; diff --git a/mysql-test/t/rpl_ssl_verify_server.test b/mysql-test/t/rpl_ssl_verify_server.test deleted file mode 100644 index de83abdf566..00000000000 --- a/mysql-test/t/rpl_ssl_verify_server.test +++ /dev/null @@ -1,34 +0,0 @@ -source include/have_openssl.inc; -source include/master-slave.inc; - -# Start replication with ssl_verify_server_cert turned on -connection slave; -stop slave; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval change master to - master_host="localhost", - master_ssl=1 , - master_ssl_ca ='$MYSQL_TEST_DIR/std_data/cacert.pem', - master_ssl_cert='$MYSQL_TEST_DIR/std_data/client-cert.pem', - master_ssl_key='$MYSQL_TEST_DIR/std_data/client-key.pem', - master_ssl_verify_server_cert=1; -start slave; - -connection master; -create table t1 (t int); -insert into t1 values (1); - -sync_slave_with_master; - -echo on slave; -#checking that replication is ok -select * from t1; - -#checking show slave status ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT ---replace_column 1 # 6 # 7 # 8 # 9 # 10 # 11 # 16 # 22 # 23 # 33 # -query_vertical show slave status; - -connection master; -drop table t1; -sync_slave_with_master; From 169771462158ec5da9112322d803f027ed39e19b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 16:42:08 +0200 Subject: [PATCH 079/153] Bug#26922 Test 'varbinary' fails to do copy_file on Windows - Copy all *.MY* files from std_data/, we have some .MYD and .MYI files from 4.1 there 5.0 version of make_win_bin_dist copies everything in std_data/ scripts/make_win_bin_dist: Copy all *.MY* files from std_data/, we have some .MYD and .MYI files from 4.1 there 5.0 version of make_win_bin_dist copies everything in std_data/ --- scripts/make_win_bin_dist | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist index 146dcad95f1..1cd4141f532 100755 --- a/scripts/make_win_bin_dist +++ b/scripts/make_win_bin_dist @@ -302,6 +302,7 @@ cp mysql-test/std_data/*.cnf $DESTDIR/mysql-test/std_data/ cp mysql-test/std_data/*.dat $DESTDIR/mysql-test/std_data/ cp mysql-test/std_data/*.frm $DESTDIR/mysql-test/std_data/ cp mysql-test/std_data/*.pem $DESTDIR/mysql-test/std_data/ +cp mysql-test/std_data/*.MY* $DESTDIR/mysql-test/std_data/ cp mysql-test/t/*.opt $DESTDIR/mysql-test/t/ cp mysql-test/t/*.sh $DESTDIR/mysql-test/t/ cp mysql-test/t/*.slave-mi $DESTDIR/mysql-test/t/ From 09eff0aa5bdbfaebe47c155084d5d84e6f5adec4 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 11:12:12 -0400 Subject: [PATCH 080/153] Bug #23491 MySQLDump prefix function call in a view by database name - 5.0 merged to 5.1 differences. sql/item_create.cc: Bug #23491 MySQLDump prefix function call in a view by database name - Added use_explicit_name to Create_sp_func::create method. - Default use_explicit_name to false when db name not specified. - Use use_explicit_name when creating sp_name object. sql/item_create.h: Bug #23491 MySQLDump prefix function call in a view by database name - Updated virtual function definition. sql/sql_yacc.yy: Bug #23491 MySQLDump prefix function call in a view by database name - Use new create method. --- sql/item_create.cc | 8 ++++---- sql/item_create.h | 3 ++- sql/sql_yacc.yy | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sql/item_create.cc b/sql/item_create.cc index ff5825ef389..617a24fac45 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -167,7 +167,7 @@ class Create_sp_func : public Create_qfunc { public: virtual Item* create(THD *thd, LEX_STRING db, LEX_STRING name, - List *item_list); + bool use_explicit_name, List *item_list); static Create_sp_func s_singleton; @@ -2316,7 +2316,7 @@ Create_qfunc::create(THD *thd, LEX_STRING name, List *item_list) if (thd->copy_db_to(&db.str, &db.length)) return NULL; - return create(thd, db, name, item_list); + return create(thd, db, name, false, item_list); } @@ -2433,7 +2433,7 @@ Create_sp_func Create_sp_func::s_singleton; Item* Create_sp_func::create(THD *thd, LEX_STRING db, LEX_STRING name, - List *item_list) + bool use_explicit_name, List *item_list) { int arg_count= 0; Item *func= NULL; @@ -2458,7 +2458,7 @@ Create_sp_func::create(THD *thd, LEX_STRING db, LEX_STRING name, if (item_list != NULL) arg_count= item_list->elements; - qname= new (thd->mem_root) sp_name(db, name); + qname= new (thd->mem_root) sp_name(db, name, use_explicit_name); qname->init_qname(thd); sp_add_used_routine(lex, thd, qname, TYPE_ENUM_FUNCTION); diff --git a/sql/item_create.h b/sql/item_create.h index 985c4428d8f..0a668b3e67f 100644 --- a/sql/item_create.h +++ b/sql/item_create.h @@ -87,11 +87,12 @@ public: @param thd The current thread @param db The database name @param name The function name + @param use_explicit_name Should the function be represented as 'db.name'? @param item_list The list of arguments to the function, can be NULL @return An item representing the parsed function call */ virtual Item* create(THD *thd, LEX_STRING db, LEX_STRING name, - List *item_list) = 0; + bool use_explicit_name, List *item_list) = 0; protected: /** Constructor. */ diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 2a187f0138d..d6f8dd33588 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -6921,7 +6921,7 @@ function_call_generic: builder= find_qualified_function_builder(thd); DBUG_ASSERT(builder); - item= builder->create(thd, $1, $3, $5); + item= builder->create(thd, $1, $3, true, $5); if (! ($$= item)) { From b35b11ee2215b314e7261328d92b0771bd268f8a Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 13:04:27 -0400 Subject: [PATCH 081/153] Post Merge Cleanup. mysql-test/r/mysqldump.result: Post Merge Cleanup --- mysql-test/r/mysqldump.result | 46 +++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 330c86f6518..7b16d02658a 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -3205,29 +3205,6 @@ INSERT INTO t1 VALUES(1,0xff00fef0); DROP TABLE t1; # -# Bug #23491: MySQLDump prefix function call in a view by database name -# -create database bug23491_original; -create database bug23491_restore; -use bug23491_original; -create table t1 (c1 int); -create view v1 as select * from t1; -create procedure p1() select 1; -create function f1() returns int return 1; -create view v2 as select f1(); -create function f2() returns int return f1(); -create view v3 as select bug23491_original.f1(); -use bug23491_restore; -show create view bug23491_restore.v2; -View Create View -v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `f1`() AS `f1()` -show create view bug23491_restore.v3; -View Create View -v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `bug23491_original`.`f1`() AS `bug23491_original.f1()` -drop database bug23491_original; -drop database bug23491_restore; -use test; -# # Bug#26346: stack + buffer overrun in mysqldump # CREATE TABLE t1(a int); @@ -3282,6 +3259,29 @@ UNLOCK TABLES; DROP TABLE t1, t2, t3; # +# Bug #23491: MySQLDump prefix function call in a view by database name +# +create database bug23491_original; +create database bug23491_restore; +use bug23491_original; +create table t1 (c1 int); +create view v1 as select * from t1; +create procedure p1() select 1; +create function f1() returns int return 1; +create view v2 as select f1(); +create function f2() returns int return f1(); +create view v3 as select bug23491_original.f1(); +use bug23491_restore; +show create view bug23491_restore.v2; +View Create View +v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `f1`() AS `f1()` +show create view bug23491_restore.v3; +View Create View +v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS select `bug23491_original`.`f1`() AS `bug23491_original.f1()` +drop database bug23491_original; +drop database bug23491_restore; +use test; +# # End of 5.0 tests # drop table if exists t1; From b07be12e517af5adcbd5aebbec4cf707d11fcd10 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 29 Mar 2007 21:59:06 +0200 Subject: [PATCH 082/153] Update result for bug#19991 --- mysql-test/r/rpl_deadlock_innodb.result | 3 +++ mysql-test/r/rpl_extraCol_innodb.result | 8 ++++++++ mysql-test/r/rpl_extraCol_myisam.result | 8 ++++++++ mysql-test/r/rpl_ndb_basic.result | 1 + mysql-test/r/rpl_ndb_extraCol.result | 8 ++++++++ mysql-test/r/rpl_ndb_idempotent.result | 12 ++++++------ mysql-test/r/rpl_ndb_log.result | 4 ++-- mysql-test/r/rpl_ndb_sync.result | 4 ++-- mysql-test/r/rpl_row_inexist_tbl.result | 1 + mysql-test/r/rpl_row_log.result | 4 ++-- mysql-test/r/rpl_row_log_innodb.result | 4 ++-- mysql-test/r/rpl_row_reset_slave.result | 16 ++++++++-------- mysql-test/r/rpl_row_tabledefs_2myisam.result | 6 ++++++ mysql-test/r/rpl_row_tabledefs_3innodb.result | 6 ++++++ mysql-test/r/rpl_row_until.result | 16 ++++++++-------- 15 files changed, 71 insertions(+), 30 deletions(-) diff --git a/mysql-test/r/rpl_deadlock_innodb.result b/mysql-test/r/rpl_deadlock_innodb.result index caf040c0997..61a70112b2f 100644 --- a/mysql-test/r/rpl_deadlock_innodb.result +++ b/mysql-test/r/rpl_deadlock_innodb.result @@ -78,6 +78,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No stop slave; delete from t3; change master to master_log_pos=544; @@ -132,6 +133,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No set @my_max_relay_log_size= @@global.max_relay_log_size; set global max_relay_log_size=0; stop slave; @@ -191,6 +193,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No drop table t1,t2,t3,t4; set global max_relay_log_size= @my_max_relay_log_size; End of 5.1 tests diff --git a/mysql-test/r/rpl_extraCol_innodb.result b/mysql-test/r/rpl_extraCol_innodb.result index ff505364124..a237edc8063 100644 --- a/mysql-test/r/rpl_extraCol_innodb.result +++ b/mysql-test/r/rpl_extraCol_innodb.result @@ -87,6 +87,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t3 *** @@ -144,6 +145,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t4 *** @@ -201,6 +203,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t5 *** @@ -257,6 +260,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** DROP TABLE t6; @@ -364,6 +368,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t10 *** @@ -420,6 +425,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t11 *** @@ -605,6 +611,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Try to insert in master **** @@ -735,6 +742,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; ** DROP table t17 *** diff --git a/mysql-test/r/rpl_extraCol_myisam.result b/mysql-test/r/rpl_extraCol_myisam.result index b5ccab8ff4c..95f99ba1014 100644 --- a/mysql-test/r/rpl_extraCol_myisam.result +++ b/mysql-test/r/rpl_extraCol_myisam.result @@ -87,6 +87,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t3 *** @@ -144,6 +145,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t4 *** @@ -201,6 +203,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t5 *** @@ -257,6 +260,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** DROP TABLE t6; @@ -364,6 +368,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t10 *** @@ -420,6 +425,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t11 *** @@ -605,6 +611,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Try to insert in master **** @@ -735,6 +742,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; ** DROP table t17 *** diff --git a/mysql-test/r/rpl_ndb_basic.result b/mysql-test/r/rpl_ndb_basic.result index 32a1c790c99..7aa50bbbac4 100644 --- a/mysql-test/r/rpl_ndb_basic.result +++ b/mysql-test/r/rpl_ndb_basic.result @@ -112,6 +112,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master +Master_SSL_Verify_Server_Cert No set GLOBAL slave_transaction_retries=10; START SLAVE; select * from t1 order by nid; diff --git a/mysql-test/r/rpl_ndb_extraCol.result b/mysql-test/r/rpl_ndb_extraCol.result index bc40e24ecac..305cbabb6e6 100644 --- a/mysql-test/r/rpl_ndb_extraCol.result +++ b/mysql-test/r/rpl_ndb_extraCol.result @@ -87,6 +87,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t3 *** @@ -144,6 +145,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t4 *** @@ -201,6 +203,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t5 *** @@ -257,6 +260,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3; *** Drop t6 *** DROP TABLE t6; @@ -364,6 +368,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t10 *** @@ -420,6 +425,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Drop t11 *** @@ -605,6 +611,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; *** Try to insert in master **** @@ -736,6 +743,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; ** DROP table t17 *** diff --git a/mysql-test/r/rpl_ndb_idempotent.result b/mysql-test/r/rpl_ndb_idempotent.result index 982cab33482..2f2273c145e 100644 --- a/mysql-test/r/rpl_ndb_idempotent.result +++ b/mysql-test/r/rpl_ndb_idempotent.result @@ -33,15 +33,15 @@ c1 c2 c3 row3 C 3 row4 D 4 SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No No STOP SLAVE; CHANGE MASTER TO master_log_file = 'master-bin.000001', master_log_pos = ; SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 No No 0 0 None 0 No +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 No No 0 0 None 0 No No START SLAVE; SELECT * FROM t1 ORDER BY c3; c1 c2 c3 @@ -68,6 +68,6 @@ SELECT * FROM t1; c1 c2 c3 row2 new on slave 2 SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No No DROP TABLE IF EXISTS t1; diff --git a/mysql-test/r/rpl_ndb_log.result b/mysql-test/r/rpl_ndb_log.result index 543af3b9abe..2bcf226577c 100644 --- a/mysql-test/r/rpl_ndb_log.result +++ b/mysql-test/r/rpl_ndb_log.result @@ -125,8 +125,8 @@ slave-bin.000002 # Write_rows 2 # table_id: # slave-bin.000002 # Write_rows 2 # table_id: # flags: STMT_END_F slave-bin.000002 # Query 2 # COMMIT show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 593 # # master-bin.000002 Yes Yes # 0 0 593 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 593 # # master-bin.000002 Yes Yes # 0 0 593 # None 0 No # No show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; diff --git a/mysql-test/r/rpl_ndb_sync.result b/mysql-test/r/rpl_ndb_sync.result index a2c3b46db5a..f584a909455 100644 --- a/mysql-test/r/rpl_ndb_sync.result +++ b/mysql-test/r/rpl_ndb_sync.result @@ -72,8 +72,8 @@ master_log_file = 'master-bin.000001', master_log_pos = ; START SLAVE; SHOW SLAVE STATUS; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master - 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert + 127.0.0.1 root MASTER_PORT 1 master-bin.000001 master-bin.000001 Yes Yes 0 0 None 0 No No SELECT hex(c1),hex(c2),c3 FROM t1 ORDER BY c3; hex(c1) hex(c2) c3 1 1 row1 diff --git a/mysql-test/r/rpl_row_inexist_tbl.result b/mysql-test/r/rpl_row_inexist_tbl.result index 5f5a4556d76..f1f1aaf0eb9 100644 --- a/mysql-test/r/rpl_row_inexist_tbl.result +++ b/mysql-test/r/rpl_row_inexist_tbl.result @@ -51,4 +51,5 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No drop table t1, t2; diff --git a/mysql-test/r/rpl_row_log.result b/mysql-test/r/rpl_row_log.result index c6b85e7b329..4a80f84d065 100644 --- a/mysql-test/r/rpl_row_log.result +++ b/mysql-test/r/rpl_row_log.result @@ -93,8 +93,8 @@ slave-bin.000002 # Query 1 # use `test`; create table t2 (n int)ENGINE=MyISAM slave-bin.000002 # Table_map 1 # table_id: # (test.t2) slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 373 # # master-bin.000002 Yes Yes # 0 0 373 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 373 # # master-bin.000002 Yes Yes # 0 0 373 # None 0 No # No show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; diff --git a/mysql-test/r/rpl_row_log_innodb.result b/mysql-test/r/rpl_row_log_innodb.result index bc13047f973..18be0d3c20f 100644 --- a/mysql-test/r/rpl_row_log_innodb.result +++ b/mysql-test/r/rpl_row_log_innodb.result @@ -101,8 +101,8 @@ slave-bin.000002 # Table_map 1 # table_id: # (test.t2) slave-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F slave-bin.000002 # Xid 1 # COMMIT /* XID */ show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 400 # # master-bin.000002 Yes Yes # 0 0 400 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 400 # # master-bin.000002 Yes Yes # 0 0 400 # None 0 No # No show binlog events in 'slave-bin.000005' from 4; ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log DROP TABLE t1; diff --git a/mysql-test/r/rpl_row_reset_slave.result b/mysql-test/r/rpl_row_reset_slave.result index 57fc95708e5..20bd7acf098 100644 --- a/mysql-test/r/rpl_row_reset_slave.result +++ b/mysql-test/r/rpl_row_reset_slave.result @@ -5,21 +5,21 @@ reset slave; drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No # No stop slave; change master to master_user='test'; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 No No # 0 0 102 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 test MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 No No # 0 0 102 # None 0 No # No reset slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 4 # # No No # 0 0 0 # None 0 No # No start slave; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 102 # # master-bin.000001 Yes Yes # 0 0 102 # None 0 No # No stop slave; reset slave; start slave; diff --git a/mysql-test/r/rpl_row_tabledefs_2myisam.result b/mysql-test/r/rpl_row_tabledefs_2myisam.result index d62650fa142..4bde4b21b69 100644 --- a/mysql-test/r/rpl_row_tabledefs_2myisam.result +++ b/mysql-test/r/rpl_row_tabledefs_2myisam.result @@ -137,6 +137,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (2); @@ -175,6 +176,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (4); @@ -213,6 +215,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (5); @@ -251,6 +254,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (6); @@ -289,6 +293,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (6); @@ -326,6 +331,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No INSERT INTO t7 VALUES (1),(2),(3); INSERT INTO t8 VALUES (1),(2),(3); SELECT * FROM t7 ORDER BY a; diff --git a/mysql-test/r/rpl_row_tabledefs_3innodb.result b/mysql-test/r/rpl_row_tabledefs_3innodb.result index 0c3bb734e95..9b2426652a8 100644 --- a/mysql-test/r/rpl_row_tabledefs_3innodb.result +++ b/mysql-test/r/rpl_row_tabledefs_3innodb.result @@ -137,6 +137,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (2); @@ -175,6 +176,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (4); @@ -213,6 +215,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (5); @@ -251,6 +254,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (6); @@ -289,6 +293,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2; START SLAVE; INSERT INTO t9 VALUES (6); @@ -326,6 +331,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No INSERT INTO t7 VALUES (1),(2),(3); INSERT INTO t8 VALUES (1),(2),(3); SELECT * FROM t7 ORDER BY a; diff --git a/mysql-test/r/rpl_row_until.result b/mysql-test/r/rpl_row_until.result index 8d4b0d6b591..cc699e2c960 100644 --- a/mysql-test/r/rpl_row_until.result +++ b/mysql-test/r/rpl_row_until.result @@ -20,8 +20,8 @@ n 3 4 show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 # No 0 0 311 # Master master-bin.000001 311 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 # No 0 0 311 # Master master-bin.000001 311 No # No start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291; select * from t1; n @@ -30,22 +30,22 @@ n 3 4 show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 # No 0 0 311 # Master master-no-such-bin.000001 291 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 # No 0 0 311 # Master master-no-such-bin.000001 291 No # No start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=728; select * from t2; n 1 2 show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 # No 0 0 586 # Relay slave-relay-bin.000004 728 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 # No 0 0 586 # Relay slave-relay-bin.000004 728 No # No start slave; stop slave; start slave until master_log_file='master-bin.000001', master_log_pos=740; show slave status; -Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master -# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 740 # Master master-bin.000001 740 No # +Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert +# 127.0.0.1 root MASTER_MYPORT 1 master-bin.000001 740 slave-relay-bin.000004 # master-bin.000001 Yes No 0 0 740 # Master master-bin.000001 740 No # No start slave until master_log_file='master-bin', master_log_pos=561; ERROR HY000: Incorrect parameter or combination of parameters for START SLAVE UNTIL start slave until master_log_file='master-bin.000001', master_log_pos=561, relay_log_pos=12; From d49d3d0b3ac663e08603afe819d814079adc801e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Mar 2007 06:57:58 +0200 Subject: [PATCH 083/153] Add missing \ causing CMakelists.txt etc not to be included in dist --- storage/innobase/Makefile.am | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/innobase/Makefile.am b/storage/innobase/Makefile.am index d694d1ab811..62c0f8e817c 100644 --- a/storage/innobase/Makefile.am +++ b/storage/innobase/Makefile.am @@ -90,7 +90,7 @@ EXTRA_DIST = include/btr0btr.h include/btr0btr.ic include/btr0cur.h include/btr include/ut0list.h include/ut0list.ic \ include/ut0wqueue.h \ pars/make_bison.sh pars/make_flex.sh \ - pars/pars0grm.y pars/pars0lex.l + pars/pars0grm.y pars/pars0lex.l \ CMakeLists.txt plug.in noinst_LIBRARIES = libinnobase.a From 0da1a0cdecd77d98c4e849030a2efa9774c5f536 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Mar 2007 13:00:21 +0500 Subject: [PATCH 084/153] BUG#26138 - REPAIR TABLE with option USE_FRM erases all records in ARCHIVE table ARCHIVE table was truncated by REPAIR TABLE ... USE_FRM statement. The table handler returned its file name extensions in a wrong order. REPAIR TABLE believed it has to use the meta file to create a new table from it. With the fixed order, REPAIR TABLE does now use the data file to create a new table. So REPAIR TABLE ... USE_FRM works well with ARCHIVE engine now. This issue affects 5.0 only, since in 5.1 ARCHIVE engine stores meta information and data in the same file. mysql-test/r/archive.result: A test case for bug#26138. mysql-test/t/archive.test: A test case for bug#26138. sql/examples/ha_example.cc: Added a comment. sql/ha_archive.cc: First element of engine file name extentions array should be meta/index file extention. Second element - data file extention. This is true for engines that have separate meta/index file and data file. Reoder ha_archive_exts elements to meet described above requirement. sql/handler.h: Added a comment. sql/sql_table.cc: Added a comment. --- mysql-test/r/archive.result | 9 +++++++++ mysql-test/t/archive.test | 10 ++++++++++ sql/examples/ha_example.cc | 6 ++++++ sql/ha_archive.cc | 2 +- sql/handler.h | 11 +++++++++++ sql/sql_table.cc | 4 +++- 6 files changed, 40 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index f73a80dde65..d89cecedcdd 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -12355,3 +12355,12 @@ auto fld1 companynr fld3 fld4 fld5 4 011403 37 intercepted audiology tinily 4 011403 37 intercepted audiology tinily drop table t1, t2, t4; +create table t1 (i int) engine=archive; +insert into t1 values (1); +repair table t1 use_frm; +Table Op Msg_type Msg_text +test.t1 repair status OK +select * from t1; +i +1 +drop table t1; diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test index 80533f21311..0ffbfab3d4f 100644 --- a/mysql-test/t/archive.test +++ b/mysql-test/t/archive.test @@ -1364,3 +1364,13 @@ SELECT * from t2; drop table t1, t2, t4; + +# +# BUG#26138 - REPAIR TABLE with option USE_FRM erases all records in ARCHIVE +# table +# +create table t1 (i int) engine=archive; +insert into t1 values (1); +repair table t1 use_frm; +select * from t1; +drop table t1; diff --git a/sql/examples/ha_example.cc b/sql/examples/ha_example.cc index 19c686ee495..d59ada3b445 100644 --- a/sql/examples/ha_example.cc +++ b/sql/examples/ha_example.cc @@ -211,6 +211,12 @@ ha_example::ha_example(TABLE *table_arg) If frm_error() is called then we will use this to to find out what file extentions exist for the storage engine. This is also used by the default rename_table and delete_table method in handler.cc. + + For engines that have two file name extentions (separate meta/index file + and data file), the order of elements is relevant. First element of engine + file name extentions array should be meta/index file extention. Second + element - data file extention. This order is assumed by + prepare_for_repair() when REPAIR TABLE ... USE_FRM is issued. */ static const char *ha_example_exts[] = { NullS diff --git a/sql/ha_archive.cc b/sql/ha_archive.cc index 2ee514f29c9..e2a2211259f 100644 --- a/sql/ha_archive.cc +++ b/sql/ha_archive.cc @@ -503,8 +503,8 @@ int ha_archive::init_archive_writer() We just implement one additional file extension. */ static const char *ha_archive_exts[] = { - ARZ, ARM, + ARZ, NullS }; diff --git a/sql/handler.h b/sql/handler.h index 9e381ca4482..9863d541b5f 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -780,6 +780,17 @@ public: virtual void free_foreign_key_create_info(char* str) {} /* The following can be called without an open handler */ virtual const char *table_type() const =0; + /* + If frm_error() is called then we will use this to find out what file + extentions exist for the storage engine. This is also used by the default + rename_table and delete_table method in handler.cc. + + For engines that have two file name extentions (separate meta/index file + and data file), the order of elements is relevant. First element of engine + file name extentions array should be meta/index file extention. Second + element - data file extention. This order is assumed by + prepare_for_repair() when REPAIR TABLE ... USE_FRM is issued. + */ virtual const char **bas_ext() const =0; virtual ulong table_flags(void) const =0; virtual ulong index_flags(uint idx, uint part, bool all_parts) const =0; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index c75aff7fab6..fb377971630 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2068,7 +2068,9 @@ static int prepare_for_repair(THD* thd, TABLE_LIST *table_list, /* Check if this is a table type that stores index and data separately, - like ISAM or MyISAM + like ISAM or MyISAM. We assume fixed order of engine file name + extentions array. First element of engine file name extentions array + is meta/index file extention. Second element - data file extention. */ if (!ext[0] || !ext[1]) goto end; // No data file From 62d3063dc18d6251b55911af7d15163ab4adaab1 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Mar 2007 15:43:36 +0200 Subject: [PATCH 085/153] Bug#25657 mysql-test-run.pl kill itself under ActiveState perl - Read the pid from pidfile in order to be able to kill the real process instead of the pseudo process. Most platforms will have the same real_pid as pid - Kill using the real pid mysql-test/lib/mtr_process.pl: Kill using the "real_pid" mysql-test/mysql-test-run.pl: Read the pid from pidfile in order to be able to kill the real process instead of the pseudo process. Most platforms will have the same real_pid as pid --- mysql-test/lib/mtr_process.pl | 25 +++++++++++++++---------- mysql-test/mysql-test-run.pl | 17 +++++++++++++---- 2 files changed, 28 insertions(+), 14 deletions(-) diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index 53bf37bcc83..b20c9b65dd5 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -562,7 +562,7 @@ sub mtr_check_stop_servers ($) { # Return if no processes are defined return if ! @$spec; - #mtr_report("mtr_check_stop_servers"); + mtr_verbose("mtr_check_stop_servers"); mtr_ping_with_timeout(\@$spec); @@ -605,7 +605,10 @@ sub mtr_check_stop_servers ($) { { if ( $srv->{'pid'} ) { - $mysqld_pids{$srv->{'pid'}}= 1; + # Add the process pid to list of pids to kill + # if the process has a "real_pid" use it + $mysqld_pids{$srv->{'real_pid'} ? + $srv->{'real_pid'} : $srv->{'pid'}}= 1; } else { @@ -638,13 +641,9 @@ sub mtr_check_stop_servers ($) { # that for true Win32 processes, kill(0,$pid) will not return 1. # ---------------------------------------------------------------------- - start_reap_all(); # Avoid zombies - my @mysqld_pids= keys %mysqld_pids; mtr_kill_processes(\@mysqld_pids); - stop_reap_all(); # Get into control again - # ---------------------------------------------------------------------- # Now, we check if all we can find using kill(0,$pid) are dead, # and just assume the rest are. We cleanup socket and PID files. @@ -654,14 +653,15 @@ sub mtr_check_stop_servers ($) { my $errors= 0; foreach my $srv ( @$spec ) { - if ( $srv->{'pid'} ) + my $pid= $srv->{'real_pid'} ? $srv->{'real_pid'} : $srv->{'pid'}; + if ( $pid ) { - if ( kill(0,$srv->{'pid'}) ) + if ( kill(0, $pid) ) { # FIXME In Cygwin there seem to be some fast reuse # of PIDs, so dying may not be the right thing to do. $errors++; - mtr_warning("can't kill process $srv->{'pid'}"); + mtr_warning("can't kill process $pid"); } else { @@ -682,6 +682,8 @@ sub mtr_check_stop_servers ($) { mtr_warning("couldn't delete $file"); } } + # Reap the child + waitpid($srv->{'pid'},&WNOHANG); $srv->{'pid'}= 0; } } @@ -1063,7 +1065,10 @@ sub sleep_until_file_created ($$$) { { if ( -r $pidfile ) { - return $pid; + # Read real pid from pidfile + my $real_pid= mtr_fromfile($pidfile); + mtr_verbose("pid: $pid, real_pid: $real_pid"); + return $real_pid; } # Check if it died after the fork() was successful diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 3166672dd89..70e51c288f4 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2549,10 +2549,16 @@ sub ndbcluster_wait_started($$){ sub mysqld_wait_started($){ my $mysqld= shift; - my $res= sleep_until_file_created($mysqld->{'path_pid'}, - $mysqld->{'start_timeout'}, - $mysqld->{'pid'}); - return $res == 0; + my $pid_from_pidfile= + sleep_until_file_created($mysqld->{'path_pid'}, + $mysqld->{'start_timeout'}, + $mysqld->{'pid'}); + + # On platforms with pseudo threads we need to save + # the real pid of mysqld read from pidfile + $mysqld->{'real_pid'}= $pid_from_pidfile; + + return $pid_from_pidfile == 0; } @@ -4047,6 +4053,7 @@ sub stop_all_servers () { push(@kill_pids,{ pid => $mysqld->{'pid'}, + real_pid => $mysqld->{'real_pid'}, pidfile => $mysqld->{'path_pid'}, sockfile => $mysqld->{'path_sock'}, port => $mysqld->{'port'}, @@ -4253,6 +4260,7 @@ sub run_testcase_stop_servers($$$) { push(@kill_pids,{ pid => $mysqld->{'pid'}, + real_pid => $mysqld->{'real_pid'}, pidfile => $mysqld->{'path_pid'}, sockfile => $mysqld->{'path_sock'}, port => $mysqld->{'port'}, @@ -4303,6 +4311,7 @@ sub run_testcase_stop_servers($$$) { push(@kill_pids,{ pid => $mysqld->{'pid'}, + real_pid => $mysqld->{'real_pid'}, pidfile => $mysqld->{'path_pid'}, sockfile => $mysqld->{'path_sock'}, port => $mysqld->{'port'}, From a632339f482aa642ecc2b8baaa20eb9c22d5abcf Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Mar 2007 16:43:15 +0200 Subject: [PATCH 086/153] Cset exclude: msvensson@shellback.(none)|ChangeSet|20070330134336|02280 mysql-test/lib/mtr_process.pl: Exclude mysql-test/mysql-test-run.pl: Exclude --- mysql-test/lib/mtr_process.pl | 25 ++++++++++--------------- mysql-test/mysql-test-run.pl | 17 ++++------------- 2 files changed, 14 insertions(+), 28 deletions(-) diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl index b20c9b65dd5..53bf37bcc83 100644 --- a/mysql-test/lib/mtr_process.pl +++ b/mysql-test/lib/mtr_process.pl @@ -562,7 +562,7 @@ sub mtr_check_stop_servers ($) { # Return if no processes are defined return if ! @$spec; - mtr_verbose("mtr_check_stop_servers"); + #mtr_report("mtr_check_stop_servers"); mtr_ping_with_timeout(\@$spec); @@ -605,10 +605,7 @@ sub mtr_check_stop_servers ($) { { if ( $srv->{'pid'} ) { - # Add the process pid to list of pids to kill - # if the process has a "real_pid" use it - $mysqld_pids{$srv->{'real_pid'} ? - $srv->{'real_pid'} : $srv->{'pid'}}= 1; + $mysqld_pids{$srv->{'pid'}}= 1; } else { @@ -641,9 +638,13 @@ sub mtr_check_stop_servers ($) { # that for true Win32 processes, kill(0,$pid) will not return 1. # ---------------------------------------------------------------------- + start_reap_all(); # Avoid zombies + my @mysqld_pids= keys %mysqld_pids; mtr_kill_processes(\@mysqld_pids); + stop_reap_all(); # Get into control again + # ---------------------------------------------------------------------- # Now, we check if all we can find using kill(0,$pid) are dead, # and just assume the rest are. We cleanup socket and PID files. @@ -653,15 +654,14 @@ sub mtr_check_stop_servers ($) { my $errors= 0; foreach my $srv ( @$spec ) { - my $pid= $srv->{'real_pid'} ? $srv->{'real_pid'} : $srv->{'pid'}; - if ( $pid ) + if ( $srv->{'pid'} ) { - if ( kill(0, $pid) ) + if ( kill(0,$srv->{'pid'}) ) { # FIXME In Cygwin there seem to be some fast reuse # of PIDs, so dying may not be the right thing to do. $errors++; - mtr_warning("can't kill process $pid"); + mtr_warning("can't kill process $srv->{'pid'}"); } else { @@ -682,8 +682,6 @@ sub mtr_check_stop_servers ($) { mtr_warning("couldn't delete $file"); } } - # Reap the child - waitpid($srv->{'pid'},&WNOHANG); $srv->{'pid'}= 0; } } @@ -1065,10 +1063,7 @@ sub sleep_until_file_created ($$$) { { if ( -r $pidfile ) { - # Read real pid from pidfile - my $real_pid= mtr_fromfile($pidfile); - mtr_verbose("pid: $pid, real_pid: $real_pid"); - return $real_pid; + return $pid; } # Check if it died after the fork() was successful diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 70e51c288f4..3166672dd89 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2549,16 +2549,10 @@ sub ndbcluster_wait_started($$){ sub mysqld_wait_started($){ my $mysqld= shift; - my $pid_from_pidfile= - sleep_until_file_created($mysqld->{'path_pid'}, - $mysqld->{'start_timeout'}, - $mysqld->{'pid'}); - - # On platforms with pseudo threads we need to save - # the real pid of mysqld read from pidfile - $mysqld->{'real_pid'}= $pid_from_pidfile; - - return $pid_from_pidfile == 0; + my $res= sleep_until_file_created($mysqld->{'path_pid'}, + $mysqld->{'start_timeout'}, + $mysqld->{'pid'}); + return $res == 0; } @@ -4053,7 +4047,6 @@ sub stop_all_servers () { push(@kill_pids,{ pid => $mysqld->{'pid'}, - real_pid => $mysqld->{'real_pid'}, pidfile => $mysqld->{'path_pid'}, sockfile => $mysqld->{'path_sock'}, port => $mysqld->{'port'}, @@ -4260,7 +4253,6 @@ sub run_testcase_stop_servers($$$) { push(@kill_pids,{ pid => $mysqld->{'pid'}, - real_pid => $mysqld->{'real_pid'}, pidfile => $mysqld->{'path_pid'}, sockfile => $mysqld->{'path_sock'}, port => $mysqld->{'port'}, @@ -4311,7 +4303,6 @@ sub run_testcase_stop_servers($$$) { push(@kill_pids,{ pid => $mysqld->{'pid'}, - real_pid => $mysqld->{'real_pid'}, pidfile => $mysqld->{'path_pid'}, sockfile => $mysqld->{'path_sock'}, port => $mysqld->{'port'}, From 76678a48e2df70b9ff3ae44e4de9c8c0e9a743e2 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 30 Mar 2007 15:01:03 +0000 Subject: [PATCH 087/153] BUG#24793 Add SO_KEEPALIVE socket option to avoid cluster nodes keeping dead connections forever. ndb/src/common/transporter/TCP_Transporter.cpp: Add SO_KEEPALIVE socket option --- ndb/src/common/transporter/TCP_Transporter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ndb/src/common/transporter/TCP_Transporter.cpp b/ndb/src/common/transporter/TCP_Transporter.cpp index 91a5fb50c57..897bad8b787 100644 --- a/ndb/src/common/transporter/TCP_Transporter.cpp +++ b/ndb/src/common/transporter/TCP_Transporter.cpp @@ -155,6 +155,8 @@ TCP_Transporter::initTransporter() { void TCP_Transporter::setSocketOptions(){ + int sockOptKeepAlive = 1; + if (setsockopt(theSocket, SOL_SOCKET, SO_RCVBUF, (char*)&sockOptRcvBufSize, sizeof(sockOptRcvBufSize)) < 0) { #ifdef DEBUG_TRANSPORTER @@ -169,6 +171,11 @@ TCP_Transporter::setSocketOptions(){ #endif }//if + if (setsockopt(theSocket, SOL_SOCKET, SO_KEEPALIVE, + (char*)&sockOptKeepAlive, sizeof(sockOptKeepAlive)) < 0) { + ndbout_c("The setsockopt SO_KEEPALIVE error code = %d", InetErrno); + }//if + //----------------------------------------------- // Set the TCP_NODELAY option so also small packets are sent // as soon as possible From ff979b76ca7c0e74b7fd7e8d9af78235b48d4339 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 31 Mar 2007 15:07:48 +0200 Subject: [PATCH 088/153] Bug#27049 Race condition in test mysqlbinlog.test - Add --local-load option to avoidthat the load data file requested by mysqlbinlog end up in local var/tmp dir and not in system global tmpdir mysql-test/t/mysqlbinlog.test: Add --local-load option to avoidthat the load data file requested by mysqlbinlog end up in local var/tmp dir and not in system global tmpdir --- mysql-test/t/mysqlbinlog.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 97239360507..35f8485a0bd 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -202,6 +202,6 @@ select hex(a) from t1; drop table t1; flush logs; --replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR ---exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000009 +--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000009 --echo End of 5.0 tests From 407389bae4a88eb35359d275bf1c890f0ea84cad Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 31 Mar 2007 17:18:03 +0200 Subject: [PATCH 089/153] Add correct replace --- mysql-test/r/mysqlbinlog.result | 14 +++++++------- mysql-test/t/mysqlbinlog.test | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result index 217d3e5f64a..a50d131cca8 100644 --- a/mysql-test/r/mysqlbinlog.result +++ b/mysql-test/r/mysqlbinlog.result @@ -289,23 +289,23 @@ SET @@session.sql_mode=0/*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; create table t1 (a varchar(64) character set utf8)/*!*/; SET TIMESTAMP=1000000000/*!*/; -load data LOCAL INFILE 'MYSQL_TMP_DIR/SQL_LOAD_MB-6-0' INTO table t1/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-6-0' INTO table t1/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=7/*!*/; -load data LOCAL INFILE 'MYSQL_TMP_DIR/SQL_LOAD_MB-7-0' INTO table t1/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-7-0' INTO table t1/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -load data LOCAL INFILE 'MYSQL_TMP_DIR/SQL_LOAD_MB-8-0' INTO table t1/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-8-0' INTO table t1/*!*/; SET TIMESTAMP=1000000000/*!*/; -load data LOCAL INFILE 'MYSQL_TMP_DIR/SQL_LOAD_MB-9-0' INTO table t1/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-9-0' INTO table t1/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=7/*!*/; -load data LOCAL INFILE 'MYSQL_TMP_DIR/SQL_LOAD_MB-a-0' INTO table t1/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-a-0' INTO table t1/*!*/; SET TIMESTAMP=1000000000/*!*/; SET @@session.collation_database=DEFAULT/*!*/; -load data LOCAL INFILE 'MYSQL_TMP_DIR/SQL_LOAD_MB-b-0' INTO table t1/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-b-0' INTO table t1/*!*/; SET TIMESTAMP=1000000000/*!*/; -load data LOCAL INFILE 'MYSQL_TMP_DIR/SQL_LOAD_MB-c-0' INTO table t1 character set koi8r/*!*/; +load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-c-0' INTO table t1 character set koi8r/*!*/; SET TIMESTAMP=1000000000/*!*/; drop table t1/*!*/; DELIMITER ; diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test index 35f8485a0bd..a7b3f413f23 100644 --- a/mysql-test/t/mysqlbinlog.test +++ b/mysql-test/t/mysqlbinlog.test @@ -201,7 +201,7 @@ load data infile '../std_data_ln/loaddata6.dat' into table t1 character set koi8 select hex(a) from t1; drop table t1; flush logs; ---replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR +--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR --exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ $MYSQLTEST_VARDIR/log/master-bin.000009 --echo End of 5.0 tests From 81786abd7f45d8a8ff788ef2e333417cb7ac29e1 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 31 Mar 2007 20:27:43 +0500 Subject: [PATCH 090/153] After merge fix. --- mysql-test/r/archive.result | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result index f90577813f4..59462e848d2 100644 --- a/mysql-test/r/archive.result +++ b/mysql-test/r/archive.result @@ -12666,7 +12666,6 @@ t6 CREATE TABLE `t6` ( KEY `a` (`a`) ) ENGINE=ARCHIVE DEFAULT CHARSET=latin1 DROP TABLE t1, t2, t4, t5, t6; -drop table t1, t2, t4; create table t1 (i int) engine=archive; insert into t1 values (1); repair table t1 use_frm; From 05e3c7e0bc0e2697e4589fc01a0e1cbfd8693710 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Apr 2007 09:51:14 +0200 Subject: [PATCH 091/153] Bug#26174 Server Crash:INSERT ... SELECT ... FROM I_S.GLOBAL_STATUS in Event - Some variables in I_S.GLOBAL_STATUS were depending on a network connection in order to evaluate. Since no network connection is present during the execution of an event, this caused the server to crash. - The variable function hooks does now verify that the vio- object is valid before attempting to use it. mysql-test/r/information_schema.result: Added test case. mysql-test/t/information_schema.test: Added test case. --- mysql-test/r/information_schema.result | 28 ++++++++++++++ mysql-test/t/information_schema.test | 40 ++++++++++++++++++++ sql/mysqld.cc | 52 +++++++++++++++++--------- sql/set_var.cc | 2 +- 4 files changed, 103 insertions(+), 19 deletions(-) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index e5d6078e863..6c03ace3d27 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1408,4 +1408,32 @@ select user,db from information_schema.processlist; user db user3148 test drop user user3148@localhost; +DROP TABLE IF EXISTS thread_status; +CREATE TABLE thread_status (variable_name VARCHAR(64), +variable_value DECIMAL(22,7)); +CREATE TABLE server_status (variable_name VARCHAR(64), +variable_value DECIMAL(22,7)); +DROP EVENT IF EXISTS log_status; +CREATE EVENT log_status +ON SCHEDULE EVERY 1 SECOND +DO +BEGIN +INSERT INTO thread_status SELECT variable_name, variable_value FROM +information_schema.session_status; +INSERT INTO server_status SELECT variable_name, variable_value FROM +information_schema.global_status; +END$$ +SET GLOBAL event_scheduler=1; +SELECT * FROM thread_status WHERE variable_name LIKE 'SSL%' LIMIT 1,2; +variable_name variable_value +SSL_ACCEPTS 0.0000000 +SSL_CALLBACK_CACHE_HITS 0.0000000 +SELECT variable_name FROM server_status LIMIT 1,2; +variable_name +ABORTED_CONNECTS +BINLOG_CACHE_DISK_USE +DROP EVENT log_status; +DROP TABLE thread_status; +DROP TABLE server_status; +SET GLOBAL event_scheduler=0; End of 5.1 tests. diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 09a588c9195..bd1f4271c94 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1042,5 +1042,45 @@ select user,db from information_schema.processlist; connection default; drop user user3148@localhost; + + +# +# Bug #26174 Server Crash: INSERT ... SELECT ... FROM I_S.GLOBAL_STATUS in Event +# +--disable_warnings +DROP TABLE IF EXISTS thread_status; +CREATE TABLE thread_status (variable_name VARCHAR(64), +variable_value DECIMAL(22,7)); +CREATE TABLE server_status (variable_name VARCHAR(64), +variable_value DECIMAL(22,7)); +DROP EVENT IF EXISTS log_status; +--enable_warnings + +DELIMITER $$; + +CREATE EVENT log_status + ON SCHEDULE EVERY 1 SECOND + DO + BEGIN + INSERT INTO thread_status SELECT variable_name, variable_value FROM +information_schema.session_status; + INSERT INTO server_status SELECT variable_name, variable_value FROM +information_schema.global_status; + END$$ + +DELIMITER ;$$ + +SET GLOBAL event_scheduler=1; +sleep 1; +SELECT * FROM thread_status WHERE variable_name LIKE 'SSL%' LIMIT 1,2; +SELECT variable_name FROM server_status LIMIT 1,2; + + + +DROP EVENT log_status; +DROP TABLE thread_status; +DROP TABLE server_status; +SET GLOBAL event_scheduler=0; + --echo End of 5.1 tests. diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 83b16d9af0a..082a7c6fcbb 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3803,6 +3803,8 @@ we force server id to 2, but this MySQL server will not act as a slave."); { if (Events::get_instance()->init()) unireg_abort(1); + } else { + Events::opt_event_scheduler= Events::EVENTS_DISABLED; } /* Signal threads waiting for server to be started */ @@ -6662,12 +6664,20 @@ static int show_ssl_ctx_get_session_cache_mode(THD *thd, SHOW_VAR *var, char *bu return 0; } -/* Functions relying on SSL */ +/* + Functions relying on SSL + Note: In the show_ssl_* functions, we need to check if we have a + valid vio-object since this isn't always true, specifically + when session_status or global_status is requested from + inside an Event. + */ static int show_ssl_get_version(THD *thd, SHOW_VAR *var, char *buff) { var->type= SHOW_CHAR; - var->value= const_cast(thd->net.vio->ssl_arg ? - SSL_get_version((SSL*) thd->net.vio->ssl_arg) : ""); + if( thd->vio_ok() && thd->net.vio->ssl_arg ) + var->value= const_cast(SSL_get_version((SSL*) thd->net.vio->ssl_arg)); + else + var->value= ""; return 0; } @@ -6675,9 +6685,10 @@ static int show_ssl_session_reused(THD *thd, SHOW_VAR *var, char *buff) { var->type= SHOW_LONG; var->value= buff; - *((long *)buff)= (long)thd->net.vio->ssl_arg ? - SSL_session_reused((SSL*) thd->net.vio->ssl_arg) : - 0; + if( thd->vio_ok() && thd->net.vio->ssl_arg ) + *((long *)buff)= (long)SSL_session_reused((SSL*) thd->net.vio->ssl_arg); + else + *((long *)buff)= 0; return 0; } @@ -6685,9 +6696,10 @@ static int show_ssl_get_default_timeout(THD *thd, SHOW_VAR *var, char *buff) { var->type= SHOW_LONG; var->value= buff; - *((long *)buff)= (long)thd->net.vio->ssl_arg ? - SSL_get_default_timeout((SSL*)thd->net.vio->ssl_arg) : - 0; + if( thd->vio_ok() && thd->net.vio->ssl_arg ) + *((long *)buff)= (long)SSL_get_default_timeout((SSL*)thd->net.vio->ssl_arg); + else + *((long *)buff)= 0; return 0; } @@ -6695,9 +6707,10 @@ static int show_ssl_get_verify_mode(THD *thd, SHOW_VAR *var, char *buff) { var->type= SHOW_LONG; var->value= buff; - *((long *)buff)= (long)thd->net.vio->ssl_arg ? - SSL_get_verify_mode((SSL*)thd->net.vio->ssl_arg) : - 0; + if( thd->net.vio && thd->net.vio->ssl_arg ) + *((long *)buff)= (long)SSL_get_verify_mode((SSL*)thd->net.vio->ssl_arg); + else + *((long *)buff)= 0; return 0; } @@ -6705,17 +6718,20 @@ static int show_ssl_get_verify_depth(THD *thd, SHOW_VAR *var, char *buff) { var->type= SHOW_LONG; var->value= buff; - *((long *)buff)= (long)thd->net.vio->ssl_arg ? - SSL_get_verify_depth((SSL*)thd->net.vio->ssl_arg) : - 0; + if( thd->vio_ok() && thd->net.vio->ssl_arg ) + *((long *)buff)= (long)SSL_get_verify_depth((SSL*)thd->net.vio->ssl_arg); + else + *((long *)buff)= 0; return 0; } static int show_ssl_get_cipher(THD *thd, SHOW_VAR *var, char *buff) { var->type= SHOW_CHAR; - var->value= const_cast(thd->net.vio->ssl_arg ? - SSL_get_cipher((SSL*) thd->net.vio->ssl_arg) : ""); + if( thd->vio_ok() && thd->net.vio->ssl_arg ) + var->value= const_cast(SSL_get_cipher((SSL*) thd->net.vio->ssl_arg)); + else + var->value= ""; return 0; } @@ -6723,7 +6739,7 @@ static int show_ssl_get_cipher_list(THD *thd, SHOW_VAR *var, char *buff) { var->type= SHOW_CHAR; var->value= buff; - if (thd->net.vio->ssl_arg) + if (thd->vio_ok() && thd->net.vio->ssl_arg) { int i; const char *p; diff --git a/sql/set_var.cc b/sql/set_var.cc index e2c90b72feb..91d2a2ec63b 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -4000,7 +4000,7 @@ sys_var_event_scheduler::update(THD *thd, set_var *var) DBUG_ENTER("sys_var_event_scheduler::update"); if (Events::opt_event_scheduler == Events::EVENTS_DISABLED) { - my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--event-scheduler=DISABLED"); + my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--event-scheduler=DISABLED or --skip-grant-tables"); DBUG_RETURN(TRUE); } From fde587ebec4ae7d249a9dfba8e73a286accd5c5e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Apr 2007 10:14:45 +0200 Subject: [PATCH 092/153] Bug#27049 Race condition in test mysqlbinlog.test Remove the setting of --local-load parameter for mysqlbinlog and leave that to the testcases to decide what params to use. mysql-test/mysql-test-run.pl: Remove the setting of --local-load parameter for mysqlbinlog and leave that to the testcases to decide what params to use. --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 3166672dd89..57bd12f7b05 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1959,7 +1959,7 @@ sub environment_setup () { # ---------------------------------------------------- my $cmdline_mysqlbinlog= mtr_native_path($exe_mysqlbinlog) . - " --no-defaults --local-load=$opt_tmpdir"; + "--no-defaults"; if (!$opt_extern && $mysql_version_id >= 50000 ) { $cmdline_mysqlbinlog .=" --character-sets-dir=$path_charsetsdir"; From 5bf24b2b8643414eb0ab32c723a1f04b026689db Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Apr 2007 10:17:29 +0200 Subject: [PATCH 093/153] Fix spelling error --- mysql-test/mysql-test-run.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 57bd12f7b05..451bcc45347 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1959,7 +1959,7 @@ sub environment_setup () { # ---------------------------------------------------- my $cmdline_mysqlbinlog= mtr_native_path($exe_mysqlbinlog) . - "--no-defaults"; + " --no-defaults"; if (!$opt_extern && $mysql_version_id >= 50000 ) { $cmdline_mysqlbinlog .=" --character-sets-dir=$path_charsetsdir"; From 0bb2f43d2e06e8cf3df1068daed20cd8817188f4 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Apr 2007 10:39:23 +0200 Subject: [PATCH 094/153] Cset exclude: tsmith@siva.hindu.god|ChangeSet|20070328212513|13373 myisam/mi_open.c: Exclude mysql-test/r/create.result: Exclude mysql-test/t/create.test: Exclude sql/table.cc: Exclude --- myisam/mi_open.c | 2 +- mysql-test/r/create.result | 517 ------------------------------------- mysql-test/t/create.test | 212 +-------------- sql/table.cc | 13 +- 4 files changed, 3 insertions(+), 741 deletions(-) diff --git a/myisam/mi_open.c b/myisam/mi_open.c index 12d31616128..b007eb63e63 100644 --- a/myisam/mi_open.c +++ b/myisam/mi_open.c @@ -219,7 +219,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) key_parts+=fulltext_keys*FT_SEGS; if (share->base.max_key_length > MI_MAX_KEY_BUFF || keys > MI_MAX_KEY || - key_parts > MI_MAX_KEY * MI_MAX_KEY_SEG) + key_parts >= MI_MAX_KEY * MI_MAX_KEY_SEG) { DBUG_PRINT("error",("Wrong key info: Max_key_length: %d keys: %d key_parts: %d", share->base.max_key_length, keys, key_parts)); my_errno=HA_ERR_UNSUPPORTED; diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index a8a5b62bc81..aa25c55f394 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -701,520 +701,3 @@ t2 CREATE TABLE `t2` ( drop table t1, t2; create table t1(a set("a,b","c,d") not null); ERROR HY000: Illegal set 'a,b' value found during parsing -create table t1 ( -c1 char(10), c2 char(10), c3 char(10), c4 char(10), -c5 char(10), c6 char(10), c7 char(10), c8 char(10), -c9 char(10), c10 char(10), c11 char(10), c12 char(10), -c13 char(10), c14 char(10), c15 char(10), c16 char(10), -key a001_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a002_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a003_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a004_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a005_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a006_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a007_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a008_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a009_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a010_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a011_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a012_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a013_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a014_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a015_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a016_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a017_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a018_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a019_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a020_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a021_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a022_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a023_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a024_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a025_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a026_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a027_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a028_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a029_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a030_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a031_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a032_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a033_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a034_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a035_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a036_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a037_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a038_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a039_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a040_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a041_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a042_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a043_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a044_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a045_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a046_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a047_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a048_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a049_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a050_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a051_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a052_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a053_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a054_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a055_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a056_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a057_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a058_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a059_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a060_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a061_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a062_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a063_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a064_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`) -); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` char(10) default NULL, - `c2` char(10) default NULL, - `c3` char(10) default NULL, - `c4` char(10) default NULL, - `c5` char(10) default NULL, - `c6` char(10) default NULL, - `c7` char(10) default NULL, - `c8` char(10) default NULL, - `c9` char(10) default NULL, - `c10` char(10) default NULL, - `c11` char(10) default NULL, - `c12` char(10) default NULL, - `c13` char(10) default NULL, - `c14` char(10) default NULL, - `c15` char(10) default NULL, - `c16` char(10) default NULL, - KEY `a001_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a002_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a003_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a004_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a005_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a006_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a007_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a008_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a009_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a010_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a011_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a012_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a013_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a014_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a015_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a016_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a017_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a018_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a019_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a020_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a021_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a022_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a023_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a024_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a025_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a026_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a027_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a028_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a029_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a030_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a031_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a032_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a033_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a034_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a035_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a036_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a037_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a038_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a039_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a040_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a041_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a042_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a043_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a044_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a045_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a046_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a047_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a048_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a049_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a050_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a051_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a052_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a053_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a054_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a055_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a056_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a057_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a058_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a059_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a060_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a061_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a062_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a063_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a064_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -flush tables; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` char(10) default NULL, - `c2` char(10) default NULL, - `c3` char(10) default NULL, - `c4` char(10) default NULL, - `c5` char(10) default NULL, - `c6` char(10) default NULL, - `c7` char(10) default NULL, - `c8` char(10) default NULL, - `c9` char(10) default NULL, - `c10` char(10) default NULL, - `c11` char(10) default NULL, - `c12` char(10) default NULL, - `c13` char(10) default NULL, - `c14` char(10) default NULL, - `c15` char(10) default NULL, - `c16` char(10) default NULL, - KEY `a001_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a002_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a003_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a004_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a005_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a006_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a007_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a008_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a009_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a010_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a011_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a012_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a013_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a014_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a015_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a016_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a017_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a018_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a019_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a020_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a021_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a022_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a023_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a024_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a025_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a026_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a027_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a028_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a029_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a030_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a031_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a032_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a033_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a034_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a035_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a036_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a037_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a038_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a039_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a040_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a041_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a042_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a043_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a044_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a045_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a046_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a047_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a048_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a049_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a050_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a051_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a052_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a053_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a054_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a055_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a056_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a057_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a058_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a059_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a060_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a061_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a062_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a063_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a064_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1; -create table t1 ( -c1 char(10), c2 char(10), c3 char(10), c4 char(10), -c5 char(10), c6 char(10), c7 char(10), c8 char(10), -c9 char(10), c10 char(10), c11 char(10), c12 char(10), -c13 char(10), c14 char(10), c15 char(10), c16 char(10) -); -alter table t1 -add key a001_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a002_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a003_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a004_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a005_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a006_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a007_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a008_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a009_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a010_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a011_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a012_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a013_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a014_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a015_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a016_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a017_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a018_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a019_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a020_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a021_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a022_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a023_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a024_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a025_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a026_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a027_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a028_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a029_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a030_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a031_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a032_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a033_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a034_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a035_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a036_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a037_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a038_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a039_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a040_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a041_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a042_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a043_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a044_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a045_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a046_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a047_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a048_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a049_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a050_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a051_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a052_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a053_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a054_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a055_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a056_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a057_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a058_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a059_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a060_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a061_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a062_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a063_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a064_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`); -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` char(10) default NULL, - `c2` char(10) default NULL, - `c3` char(10) default NULL, - `c4` char(10) default NULL, - `c5` char(10) default NULL, - `c6` char(10) default NULL, - `c7` char(10) default NULL, - `c8` char(10) default NULL, - `c9` char(10) default NULL, - `c10` char(10) default NULL, - `c11` char(10) default NULL, - `c12` char(10) default NULL, - `c13` char(10) default NULL, - `c14` char(10) default NULL, - `c15` char(10) default NULL, - `c16` char(10) default NULL, - KEY `a001_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a002_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a003_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a004_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a005_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a006_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a007_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a008_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a009_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a010_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a011_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a012_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a013_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a014_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a015_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a016_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a017_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a018_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a019_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a020_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a021_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a022_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a023_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a024_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a025_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a026_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a027_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a028_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a029_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a030_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a031_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a032_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a033_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a034_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a035_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a036_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a037_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a038_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a039_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a040_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a041_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a042_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a043_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a044_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a045_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a046_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a047_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a048_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a049_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a050_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a051_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a052_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a053_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a054_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a055_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a056_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a057_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a058_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a059_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a060_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a061_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a062_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a063_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a064_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -flush tables; -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` char(10) default NULL, - `c2` char(10) default NULL, - `c3` char(10) default NULL, - `c4` char(10) default NULL, - `c5` char(10) default NULL, - `c6` char(10) default NULL, - `c7` char(10) default NULL, - `c8` char(10) default NULL, - `c9` char(10) default NULL, - `c10` char(10) default NULL, - `c11` char(10) default NULL, - `c12` char(10) default NULL, - `c13` char(10) default NULL, - `c14` char(10) default NULL, - `c15` char(10) default NULL, - `c16` char(10) default NULL, - KEY `a001_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a002_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a003_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a004_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a005_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a006_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a007_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a008_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a009_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a010_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a011_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a012_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a013_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a014_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a015_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a016_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a017_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a018_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a019_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a020_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a021_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a022_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a023_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a024_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a025_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a026_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a027_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a028_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a029_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a030_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a031_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a032_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a033_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a034_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a035_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a036_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a037_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a038_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a039_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a040_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a041_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a042_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a043_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a044_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a045_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a046_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a047_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a048_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a049_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a050_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a051_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a052_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a053_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a054_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a055_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a056_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a057_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a058_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a059_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a060_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a061_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a062_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a063_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - KEY `a064_long_123456789_123456789_123456789_123456789_123456789_1234` (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -alter table t1 add key a065_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`); -ERROR 42000: Too many keys specified; max 64 keys allowed -drop table t1; -create table t1 ( -c1 char(10), c2 char(10), c3 char(10), c4 char(10), -c5 char(10), c6 char(10), c7 char(10), c8 char(10), -c9 char(10), c10 char(10), c11 char(10), c12 char(10), -c13 char(10), c14 char(10), c15 char(10), c16 char(10), -c17 char(10) -); -alter table t1 add key i1 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`, `c17`); -ERROR 42000: Too many key parts specified; max 16 parts allowed -alter table t1 add key a001_long_123456789_123456789_123456789_123456789_123456789_12345 (`c1`); -ERROR 42000: Identifier name 'a001_long_123456789_123456789_123456789_123456789_123456789_12345' is too long -show create table t1; -Table Create Table -t1 CREATE TABLE `t1` ( - `c1` char(10) default NULL, - `c2` char(10) default NULL, - `c3` char(10) default NULL, - `c4` char(10) default NULL, - `c5` char(10) default NULL, - `c6` char(10) default NULL, - `c7` char(10) default NULL, - `c8` char(10) default NULL, - `c9` char(10) default NULL, - `c10` char(10) default NULL, - `c11` char(10) default NULL, - `c12` char(10) default NULL, - `c13` char(10) default NULL, - `c14` char(10) default NULL, - `c15` char(10) default NULL, - `c16` char(10) default NULL, - `c17` char(10) default NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1 -drop table t1; -End of 4.1 tests diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index a3458298ff9..57b16a13c01 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -609,214 +609,4 @@ drop table t1, t2; --error 1105 create table t1(a set("a,b","c,d") not null); - -# -# Bug #26642: create index corrupts table definition in .frm -# -# Problem with creating keys with maximum key-parts and maximum name length -# This test is made for a mysql server supporting names up to 64 bytes -# and a maximum of 16 key segements per Key -# - -create table t1 ( -c1 char(10), c2 char(10), c3 char(10), c4 char(10), -c5 char(10), c6 char(10), c7 char(10), c8 char(10), -c9 char(10), c10 char(10), c11 char(10), c12 char(10), -c13 char(10), c14 char(10), c15 char(10), c16 char(10), - -key a001_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a002_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a003_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a004_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a005_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a006_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a007_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a008_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a009_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - -key a010_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a011_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a012_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a013_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a014_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a015_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a016_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a017_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a018_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a019_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - -key a020_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a021_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a022_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a023_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a024_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a025_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a026_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a027_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a028_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a029_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - -key a030_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a031_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a032_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a033_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a034_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a035_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a036_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a037_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a038_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a039_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - -key a040_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a041_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a042_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a043_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a044_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a045_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a046_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a047_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a048_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a049_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - -key a050_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a051_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a052_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a053_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a054_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a055_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a056_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a057_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a058_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a059_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - -key a060_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a061_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a062_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a063_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -key a064_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`) -); - -# Check that the table is not corrupted -show create table t1; -flush tables; -show create table t1; - -# Repeat test using ALTER to add indexes - -drop table t1; -create table t1 ( -c1 char(10), c2 char(10), c3 char(10), c4 char(10), -c5 char(10), c6 char(10), c7 char(10), c8 char(10), -c9 char(10), c10 char(10), c11 char(10), c12 char(10), -c13 char(10), c14 char(10), c15 char(10), c16 char(10) -); - -alter table t1 - -add key a001_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a002_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a003_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a004_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a005_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a006_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a007_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a008_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a009_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - -add key a010_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a011_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a012_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a013_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a014_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a015_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a016_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a017_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a018_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a019_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - -add key a020_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a021_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a022_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a023_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a024_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a025_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a026_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a027_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a028_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a029_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - -add key a030_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a031_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a032_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a033_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a034_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a035_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a036_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a037_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a038_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a039_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - -add key a040_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a041_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a042_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a043_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a044_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a045_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a046_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a047_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a048_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a049_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - -add key a050_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a051_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a052_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a053_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a054_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a055_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a056_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a057_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a058_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a059_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), - -add key a060_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a061_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a062_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a063_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`), -add key a064_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`); - -show create table t1; -flush tables; -show create table t1; - -# Test the server limits; if any of these pass, all above tests need -# to be rewritten to hit the limit -# -# Ensure limit is really 64 keys ---error 1069 -alter table t1 add key a065_long_123456789_123456789_123456789_123456789_123456789_1234 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`); - -drop table t1; - -# Ensure limit is really 16 key parts per key - -create table t1 ( -c1 char(10), c2 char(10), c3 char(10), c4 char(10), -c5 char(10), c6 char(10), c7 char(10), c8 char(10), -c9 char(10), c10 char(10), c11 char(10), c12 char(10), -c13 char(10), c14 char(10), c15 char(10), c16 char(10), -c17 char(10) -); - -# Get error for max key parts ---error 1070 -alter table t1 add key i1 (`c1`,`c2`,`c3`,`c4`,`c5`,`c6`,`c7`,`c8`,`c9`,`c10`,`c11`,`c12`,`c13`,`c14`,`c15`,`c16`, `c17`); - -# Get error for max key-name length ---error 1059 -alter table t1 add key a001_long_123456789_123456789_123456789_123456789_123456789_12345 (`c1`); - -show create table t1; - -drop table t1; - ---echo End of 4.1 tests +# End of 4.1 tests diff --git a/sql/table.cc b/sql/table.cc index f4f3fcf81dc..a85da8395e7 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -1283,18 +1283,7 @@ File create_frm(register my_string name, const char *db, const char *table, fileinfo[3]= (uchar) ha_checktype(create_info->db_type); fileinfo[4]=1; int2store(fileinfo+6,IO_SIZE); /* Next block starts here */ - /* - For each key (see unireg.cc::pack_keys()): - 8 bytes for the key header - 9 bytes for each key-part (MAX_REF_PARTS) - NAME_LEN bytes for the name - 1 byte for the NAMES_SEP_CHAR (before the name) - For all keys: - 6 bytes for the header - 1 byte for the NAMES_SEP_CHAR (after the last name) - 9 extra bytes (padding for safety? alignment?) - */ - key_length= keys * (8 + MAX_REF_PARTS * 9 + NAME_LEN + 1) + 16; + key_length=keys*(7+NAME_LEN+MAX_REF_PARTS*9)+16; length=(ulong) next_io_size((ulong) (IO_SIZE+key_length+reclength)); int4store(fileinfo+10,length); if (key_length > 0xffff) key_length=0xffff; From d03c7d2d28fe86d88c30f8799b78cf966e5a3ab7 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Apr 2007 15:01:19 +0500 Subject: [PATCH 095/153] Bug#27069 set with identical elements are created added the check for unique elements count in SET mysql-test/r/type_set.result: test result mysql-test/t/type_set.test: test case sql/field.cc: removed the check for elements count in SET sql/sql_table.cc: added the check for unique elements count in SET --- mysql-test/r/type_set.result | 19 +++++++++++++++++++ mysql-test/t/type_set.test | 17 +++++++++++++++++ sql/field.cc | 5 ----- sql/sql_table.cc | 16 +++++++++++++--- 4 files changed, 49 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/type_set.result b/mysql-test/r/type_set.result index fdda4aca25c..03de20baef2 100644 --- a/mysql-test/r/type_set.result +++ b/mysql-test/r/type_set.result @@ -66,3 +66,22 @@ ss ue ue DROP TABLE t1; +create table t1(f1 +set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17', +'18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33', +'34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49', +'50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','128')); +ERROR HY000: Too many strings for column f1 and SET +create table t1(f1 +set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17', +'18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33', +'34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49', +'50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','1')); +Warnings: +Note 1291 Column 'f1' has duplicated value '1' in SET +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `f1` set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','1') default NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +drop table t1; diff --git a/mysql-test/t/type_set.test b/mysql-test/t/type_set.test index 56df3328246..b1c816f3371 100644 --- a/mysql-test/t/type_set.test +++ b/mysql-test/t/type_set.test @@ -39,3 +39,20 @@ SELECT c FROM t1 ORDER BY concat(c); DROP TABLE t1; # End of 4.1 tests + +# +# Bug#27069 set with identical elements are created +# +--error 1097 +create table t1(f1 +set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17', +'18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33', +'34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49', +'50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','128')); +create table t1(f1 +set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17', +'18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33', +'34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49', +'50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','1')); +show create table t1; +drop table t1; diff --git a/sql/field.cc b/sql/field.cc index 152c1bdc364..24cec4e1c74 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -8676,11 +8676,6 @@ bool create_field::init(THD *thd, char *fld_name, enum_field_types fld_type, break; case FIELD_TYPE_SET: { - if (fld_interval_list->elements > sizeof(longlong)*8) - { - my_error(ER_TOO_BIG_SET, MYF(0), fld_name); /* purecov: inspected */ - DBUG_RETURN(TRUE); - } pack_length= get_set_pack_length(fld_interval_list->elements); List_iterator it(*fld_interval_list); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 8b3028f5370..a71579fb74f 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -407,6 +407,7 @@ static int sort_keys(KEY *a, KEY *b) set_or_name "SET" or "ENUM" string for warning message name name of the checked column typelib list of values for the column + dup_val_count returns count of duplicate elements DESCRIPTION This function prints an warning for each value in list @@ -418,11 +419,12 @@ static int sort_keys(KEY *a, KEY *b) void check_duplicates_in_interval(const char *set_or_name, const char *name, TYPELIB *typelib, - CHARSET_INFO *cs) + CHARSET_INFO *cs, unsigned int *dup_val_count) { TYPELIB tmp= *typelib; const char **cur_value= typelib->type_names; unsigned int *cur_length= typelib->type_lengths; + *dup_val_count= 0; for ( ; tmp.count > 1; cur_value++, cur_length++) { @@ -435,6 +437,7 @@ void check_duplicates_in_interval(const char *set_or_name, ER_DUPLICATED_VALUE_IN_TYPE, ER(ER_DUPLICATED_VALUE_IN_TYPE), name,*cur_value,set_or_name); + (*dup_val_count)++; } } } @@ -498,6 +501,7 @@ int prepare_create_field(create_field *sql_field, int *timestamps, int *timestamps_with_niladic, uint table_flags) { + unsigned int dup_val_count; DBUG_ENTER("prepare_field"); /* @@ -573,7 +577,7 @@ int prepare_create_field(create_field *sql_field, sql_field->unireg_check=Field::INTERVAL_FIELD; check_duplicates_in_interval("ENUM",sql_field->field_name, sql_field->interval, - sql_field->charset); + sql_field->charset, &dup_val_count); break; case FIELD_TYPE_SET: sql_field->pack_flag=pack_length_to_packflag(sql_field->pack_length) | @@ -583,7 +587,13 @@ int prepare_create_field(create_field *sql_field, sql_field->unireg_check=Field::BIT_FIELD; check_duplicates_in_interval("SET",sql_field->field_name, sql_field->interval, - sql_field->charset); + sql_field->charset, &dup_val_count); + /* Check that count of unique members is not more then 64 */ + if (sql_field->interval->count - dup_val_count > sizeof(longlong)*8) + { + my_error(ER_TOO_BIG_SET, MYF(0), sql_field->field_name); + DBUG_RETURN(1); + } break; case FIELD_TYPE_DATE: // Rest of string types case FIELD_TYPE_NEWDATE: From f75f2912b6299afbc88f344b1d5f2c7fe097e25a Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Apr 2007 13:57:32 +0200 Subject: [PATCH 096/153] After merge fix --- mysql-test/r/rpl_incident.result | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/r/rpl_incident.result b/mysql-test/r/rpl_incident.result index a9547832ed9..aea35c5f477 100644 --- a/mysql-test/r/rpl_incident.result +++ b/mysql-test/r/rpl_incident.result @@ -59,6 +59,7 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No SET GLOBAL SQL_SLAVE_SKIP_COUNTER=1; START SLAVE; SELECT * FROM t1; @@ -101,5 +102,6 @@ Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master # +Master_SSL_Verify_Server_Cert No DROP TABLE t1; DROP TABLE t1; From c1020aa4c67d48e061065f60400127d04a0adb30 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Apr 2007 14:03:33 +0200 Subject: [PATCH 097/153] Type cast of constant string (empty) to keep compiler happy. --- sql/mysqld.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 3ab3b024643..7121ab6db78 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -6742,7 +6742,7 @@ static int show_ssl_get_version(THD *thd, SHOW_VAR *var, char *buff) if( thd->vio_ok() && thd->net.vio->ssl_arg ) var->value= const_cast(SSL_get_version((SSL*) thd->net.vio->ssl_arg)); else - var->value= ""; + var->value= (char *)""; return 0; } @@ -6796,7 +6796,7 @@ static int show_ssl_get_cipher(THD *thd, SHOW_VAR *var, char *buff) if( thd->vio_ok() && thd->net.vio->ssl_arg ) var->value= const_cast(SSL_get_cipher((SSL*) thd->net.vio->ssl_arg)); else - var->value= ""; + var->value= (char *)""; return 0; } From 3c763afc9c39420f9a2f14c51fe20ddf745f7976 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Apr 2007 17:26:39 +0500 Subject: [PATCH 098/153] BUG#25729 - boolean full text search is confused by NULLs produced by LEFT JOIN Fixed that in certain situations MATCH ... AGAINST returns false hits for NULLs produced by LEFT JOIN when there is no fulltext index available. mysql-test/r/fulltext_left_join.result: A test case for BUG#25729. mysql-test/t/fulltext_left_join.test: A test case for BUG#25729. sql/item_func.cc: concat_ws(NULL) returns empty string instead of NULL. There is not much sense to calculate relevance for empty strings, thus return 0 immediately if we got NULL or empty string from concat_ws. sql/item_func.h: Item_func_match::concat renamed to concat_ws. --- mysql-test/r/fulltext_left_join.result | 7 +++++++ mysql-test/t/fulltext_left_join.test | 11 +++++++++++ sql/item_func.cc | 8 ++++---- sql/item_func.h | 8 ++++---- 4 files changed, 26 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/fulltext_left_join.result b/mysql-test/r/fulltext_left_join.result index fdf11c14cc4..ea4cacf2fab 100644 --- a/mysql-test/r/fulltext_left_join.result +++ b/mysql-test/r/fulltext_left_join.result @@ -90,3 +90,10 @@ id link name relevance 1 1 string 0 2 0 string 0 DROP TABLE t1,t2; +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT, c TEXT, KEY(b)); +INSERT INTO t1 VALUES(1); +INSERT INTO t2(b,c) VALUES(2,'castle'),(3,'castle'); +SELECT * FROM t1 LEFT JOIN t2 ON a=b WHERE MATCH(c) AGAINST('+castle' IN BOOLEAN MODE); +a b c +DROP TABLE t1, t2; diff --git a/mysql-test/t/fulltext_left_join.test b/mysql-test/t/fulltext_left_join.test index 5942ce119ee..8c13ae5cad9 100644 --- a/mysql-test/t/fulltext_left_join.test +++ b/mysql-test/t/fulltext_left_join.test @@ -87,3 +87,14 @@ SELECT t1.*, MATCH(t1.name) AGAINST('string') AS relevance DROP TABLE t1,t2; # End of 4.1 tests + +# +# BUG#25729 - boolean full text search is confused by NULLs produced by LEFT +# JOIN +# +CREATE TABLE t1 (a INT); +CREATE TABLE t2 (b INT, c TEXT, KEY(b)); +INSERT INTO t1 VALUES(1); +INSERT INTO t2(b,c) VALUES(2,'castle'),(3,'castle'); +SELECT * FROM t1 LEFT JOIN t2 ON a=b WHERE MATCH(c) AGAINST('+castle' IN BOOLEAN MODE); +DROP TABLE t1, t2; diff --git a/sql/item_func.cc b/sql/item_func.cc index 32cc90b96d6..34122631fe3 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4597,14 +4597,14 @@ void Item_func_match::init_search(bool no_order) fields.push_back(new Item_string(" ",1, cmp_collation.collation)); for (uint i=1; i < arg_count; i++) fields.push_back(args[i]); - concat=new Item_func_concat_ws(fields); + concat_ws=new Item_func_concat_ws(fields); /* Above function used only to get value and do not need fix_fields for it: Item_string - basic constant fields - fix_fields() was already called for this arguments Item_func_concat_ws - do not need fix_fields() to produce value */ - concat->quick_fix_field(); + concat_ws->quick_fix_field(); } if (master) @@ -4819,8 +4819,8 @@ double Item_func_match::val_real() if (key == NO_SUCH_KEY) { - String *a= concat->val_str(&value); - if ((null_value= (a == 0))) + String *a= concat_ws->val_str(&value); + if ((null_value= (a == 0)) || !a->length()) DBUG_RETURN(0); DBUG_RETURN(ft_handler->please->find_relevance(ft_handler, (byte *)a->ptr(), a->length())); diff --git a/sql/item_func.h b/sql/item_func.h index 68591f9c6f5..3f87d210431 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1308,12 +1308,12 @@ public: FT_INFO *ft_handler; TABLE *table; Item_func_match *master; // for master-slave optimization - Item *concat; // Item_func_concat_ws - String value; // value of concat + Item *concat_ws; // Item_func_concat_ws + String value; // value of concat_ws String search_value; // key_item()'s value converted to cmp_collation Item_func_match(List &a, uint b): Item_real_func(a), key(0), flags(b), - join_key(0), ft_handler(0), table(0), master(0), concat(0) { } + join_key(0), ft_handler(0), table(0), master(0), concat_ws(0) { } void cleanup() { DBUG_ENTER("Item_func_match"); @@ -1321,7 +1321,7 @@ public: if (!master && ft_handler) ft_handler->please->close_search(ft_handler); ft_handler= 0; - concat= 0; + concat_ws= 0; DBUG_VOID_RETURN; } enum Functype functype() const { return FT_FUNC; } From f7417a299eddf6212996c357f79b2715af98567b Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 2 Apr 2007 16:21:12 -0400 Subject: [PATCH 099/153] Minor test cleanup. mysql-test/t/mysqldump.test: Fix for failing Windows test. --- mysql-test/t/mysqldump.test | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index ca85320b35f..126412057ab 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -918,7 +918,7 @@ port=1234 EOF --exec $MYSQL_MY_PRINT_DEFAULTS -c $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1 --exec $MYSQL_MY_PRINT_DEFAULTS -e $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1 mysqltest1 ---remov_file $MYSQLTEST_VARDIR/tmp/tmp.cnf +--remove_file $MYSQLTEST_VARDIR/tmp/tmp.cnf --echo # --echo # Test of fix to BUG 12597 @@ -1480,10 +1480,10 @@ create function f2() returns int return f1(); create view v3 as select bug23491_original.f1(); # Backup. ---exec $MYSQL_DUMP --skip-comments -uroot --opt --routines bug23491_original > $MYSQLTEST_VARDIR/tmp/bug23491_backup.sql; +--exec $MYSQL_DUMP --skip-comments -uroot --opt --routines bug23491_original > $MYSQLTEST_VARDIR/tmp/bug23491_backup.sql # Restore. ---exec $MYSQL bug23491_restore < $MYSQLTEST_VARDIR/tmp/bug23491_backup.sql; +--exec $MYSQL bug23491_restore < $MYSQLTEST_VARDIR/tmp/bug23491_backup.sql # Verify use bug23491_restore; From efaf8c748cc1c6ee33f9265fa2f5818f8d5a0682 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 08:04:25 +0200 Subject: [PATCH 100/153] Work around for bug#27606 --- mysql-test/r/rpl_ignore_table.result | 2 +- mysql-test/t/rpl_ignore_table.test | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/rpl_ignore_table.result b/mysql-test/r/rpl_ignore_table.result index 80cff7c9a1e..9b9146be5a6 100644 --- a/mysql-test/r/rpl_ignore_table.result +++ b/mysql-test/r/rpl_ignore_table.result @@ -119,8 +119,8 @@ drop table t1, t4, mysqltest2.t2; drop database mysqltest2; delete from mysql.user where user like "mysqltest%"; delete from mysql.db where user like "mysqltest%"; -delete from mysql.tables_priv where user like "mysqltest%"; delete from mysql.columns_priv where user like "mysqltest%"; +delete from mysql.tables_priv where user like "mysqltest%"; DROP TABLE IF EXISTS t5; CREATE TABLE t5 ( word varchar(50) collate utf8_unicode_ci NOT NULL default '' diff --git a/mysql-test/t/rpl_ignore_table.test b/mysql-test/t/rpl_ignore_table.test index 72fd7f1db72..f678e0a7cc1 100644 --- a/mysql-test/t/rpl_ignore_table.test +++ b/mysql-test/t/rpl_ignore_table.test @@ -124,10 +124,16 @@ drop table t1, t4, mysqltest2.t2; drop database mysqltest2; delete from mysql.user where user like "mysqltest%"; delete from mysql.db where user like "mysqltest%"; -delete from mysql.tables_priv where user like "mysqltest%"; +# +# BUG 27606 causes failure to replicate this statement +# move it to slave instead +#delete from mysql.tables_priv where user like "mysqltest%"; delete from mysql.columns_priv where user like "mysqltest%"; sync_slave_with_master; +#BUG27606 +delete from mysql.tables_priv where user like "mysqltest%"; + connection master; # From e10f4df4147cf684f09435a969971ce6f97132f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 16:40:16 +0800 Subject: [PATCH 101/153] Bug#25875, Newly created table through CREATE TABLE .. LIKE has no ndb_dd attributes sql/sql_table.cc: add something to get possible tablespace info from src table in mysql_create_like_table() at sql/sql_table.cc --- sql/sql_table.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 0697fdd79b4..ab833ebe6b9 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4611,6 +4611,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, #ifdef WITH_PARTITION_STORAGE_ENGINE char tmp_path[FN_REFLEN]; #endif + char ts_name[FN_LEN]; TABLE_LIST src_tables_list, dst_tables_list; DBUG_ENTER("mysql_create_like_table"); @@ -4691,6 +4692,18 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, if (simple_open_n_lock_tables(thd, &src_tables_list)) DBUG_RETURN(TRUE); + /* + For bug#25875, Newly created table through CREATE TABLE .. LIKE + has no ndb_dd attributes; + Add something to get possible tablespace info from src table, + it can get valid tablespace name only for disk-base ndb table + */ + if ((src_tables_list.table->file->get_tablespace_name(thd, ts_name, FN_LEN))) + { + create_info->tablespace= ts_name; + create_info->storage_media= HA_SM_DISK; + } + /* Validate the destination table From 6e5ca12b6a6f6404246f398456371a81a228070e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 14:24:35 +0500 Subject: [PATCH 102/153] Bug#27327 information_schema status views, variable_value conversion Type of 'Slave_running' status variable is changed to bool mysql-test/r/compress.result: test result mysql-test/r/rpl_packet.result: test result mysql-test/t/compress.test: test case mysql-test/t/rpl_packet.test: test case sql/mysqld.cc: Type of 'Slave_running' status variable is changed to bool --- mysql-test/r/compress.result | 3 +++ mysql-test/r/rpl_packet.result | 6 ++++++ mysql-test/t/compress.test | 1 + mysql-test/t/rpl_packet.test | 2 ++ sql/mysqld.cc | 7 ++++--- 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/compress.result b/mysql-test/r/compress.result index 0aebc817146..11b15ed7675 100644 --- a/mysql-test/r/compress.result +++ b/mysql-test/r/compress.result @@ -1,6 +1,9 @@ SHOW STATUS LIKE 'Compression'; Variable_name Value Compression ON +select * from information_schema.session_status where variable_name= 'COMPRESSION'; +VARIABLE_NAME VARIABLE_VALUE +COMPRESSION 1.0000000 drop table if exists t1,t2,t3,t4; CREATE TABLE t1 ( Period smallint(4) unsigned zerofill DEFAULT '0000' NOT NULL, diff --git a/mysql-test/r/rpl_packet.result b/mysql-test/r/rpl_packet.result index 894bc81b08d..8f4a16341b6 100644 --- a/mysql-test/r/rpl_packet.result +++ b/mysql-test/r/rpl_packet.result @@ -14,6 +14,12 @@ INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa select count(*) from `DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________`.`t1` /* must be 1 */; count(*) 1 +SHOW STATUS LIKE 'Slave_running'; +Variable_name Value +Slave_running ON +select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING'; +VARIABLE_NAME VARIABLE_VALUE +SLAVE_RUNNING 1.0000000 drop database DB_NAME_OF_MAX_LENGTH_AKA_NAME_LEN_64_BYTES_____________________; SET @@global.max_allowed_packet=4096; SET @@global.net_buffer_length=4096; diff --git a/mysql-test/t/compress.test b/mysql-test/t/compress.test index 3f1892b5dec..cd40aef002c 100644 --- a/mysql-test/t/compress.test +++ b/mysql-test/t/compress.test @@ -10,6 +10,7 @@ connect (comp_con,localhost,root,,,,,COMPRESS); # Check compression turned on SHOW STATUS LIKE 'Compression'; +select * from information_schema.session_status where variable_name= 'COMPRESSION'; # Source select test case -- source include/common-tests.inc diff --git a/mysql-test/t/rpl_packet.test b/mysql-test/t/rpl_packet.test index db6f475dc94..466f5d75a0a 100644 --- a/mysql-test/t/rpl_packet.test +++ b/mysql-test/t/rpl_packet.test @@ -29,6 +29,8 @@ connection slave; sync_with_master; eval select count(*) from `$db`.`t1` /* must be 1 */; +SHOW STATUS LIKE 'Slave_running'; +select * from information_schema.session_status where variable_name= 'SLAVE_RUNNING'; connection master; eval drop database $db; save_master_pos; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 5031496158b..cfbf01a6622 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -6513,10 +6513,11 @@ static int show_rpl_status(THD *thd, SHOW_VAR *var, char *buff) static int show_slave_running(THD *thd, SHOW_VAR *var, char *buff) { - var->type= SHOW_CHAR; + var->type= SHOW_MY_BOOL; pthread_mutex_lock(&LOCK_active_mi); - var->value= const_cast((active_mi && active_mi->slave_running && - active_mi->rli.slave_running) ? "ON" : "OFF"); + var->value= buff; + *((my_bool *)buff)= (my_bool) (active_mi && active_mi->slave_running && + active_mi->rli.slave_running); pthread_mutex_unlock(&LOCK_active_mi); return 0; } From 48b3529cbedd97d40edddb34431fef11415e937d Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 11:36:33 +0200 Subject: [PATCH 103/153] Cleanup tables created by test cases mysql-test/r/crash_commit_before.result: Cleanup mysql-test/r/rpl_ignore_table.result: Cleanup mysql-test/r/rpl_packet.result: Cleanup mysql-test/r/rpl_ssl.result: Cleanup mysql-test/t/crash_commit_before.test: Cleanup mysql-test/t/rpl_ignore_table.test: Cleanup mysql-test/t/rpl_packet.test: Cleanup mysql-test/t/rpl_ssl.test: Cleanup --- mysql-test/r/crash_commit_before.result | 1 + mysql-test/r/rpl_ignore_table.result | 1 + mysql-test/r/rpl_packet.result | 2 ++ mysql-test/r/rpl_ssl.result | 2 ++ mysql-test/t/crash_commit_before.test | 3 +++ mysql-test/t/rpl_ignore_table.test | 3 +++ mysql-test/t/rpl_packet.test | 6 ++++++ mysql-test/t/rpl_ssl.test | 6 ++++++ 8 files changed, 24 insertions(+) diff --git a/mysql-test/r/crash_commit_before.result b/mysql-test/r/crash_commit_before.result index 8eba584c539..34fb3284bae 100644 --- a/mysql-test/r/crash_commit_before.result +++ b/mysql-test/r/crash_commit_before.result @@ -11,3 +11,4 @@ t1 CREATE TABLE `t1` ( ) ENGINE=InnoDB DEFAULT CHARSET=latin1 SELECT * FROM t1; a +DROP TABLE t1; diff --git a/mysql-test/r/rpl_ignore_table.result b/mysql-test/r/rpl_ignore_table.result index 9b9146be5a6..e7200b31212 100644 --- a/mysql-test/r/rpl_ignore_table.result +++ b/mysql-test/r/rpl_ignore_table.result @@ -121,6 +121,7 @@ delete from mysql.user where user like "mysqltest%"; delete from mysql.db where user like "mysqltest%"; delete from mysql.columns_priv where user like "mysqltest%"; delete from mysql.tables_priv where user like "mysqltest%"; +delete from mysql.tables_priv where user like "mysqltest%"; DROP TABLE IF EXISTS t5; CREATE TABLE t5 ( word varchar(50) collate utf8_unicode_ci NOT NULL default '' diff --git a/mysql-test/r/rpl_packet.result b/mysql-test/r/rpl_packet.result index 894bc81b08d..a1ec39ece30 100644 --- a/mysql-test/r/rpl_packet.result +++ b/mysql-test/r/rpl_packet.result @@ -24,3 +24,5 @@ INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa SHOW STATUS LIKE 'Slave_running'; Variable_name Value Slave_running OFF +drop table t1; +drop table t1; diff --git a/mysql-test/r/rpl_ssl.result b/mysql-test/r/rpl_ssl.result index f68b639b12d..50e2db35165 100644 --- a/mysql-test/r/rpl_ssl.result +++ b/mysql-test/r/rpl_ssl.result @@ -93,3 +93,5 @@ Master_SSL_Cipher Master_SSL_Key MYSQL_TEST_DIR/std_data/client-key.pem Seconds_Behind_Master # Master_SSL_Verify_Server_Cert No +drop user replssl@localhost; +drop table t1; diff --git a/mysql-test/t/crash_commit_before.test b/mysql-test/t/crash_commit_before.test index 5a91cd7a7ad..4e212d81e66 100644 --- a/mysql-test/t/crash_commit_before.test +++ b/mysql-test/t/crash_commit_before.test @@ -30,3 +30,6 @@ COMMIT; SHOW CREATE TABLE t1; SELECT * FROM t1; + + +DROP TABLE t1; diff --git a/mysql-test/t/rpl_ignore_table.test b/mysql-test/t/rpl_ignore_table.test index f678e0a7cc1..fd4ae64165a 100644 --- a/mysql-test/t/rpl_ignore_table.test +++ b/mysql-test/t/rpl_ignore_table.test @@ -136,6 +136,9 @@ delete from mysql.tables_priv where user like "mysqltest%"; connection master; +#BUG27606 +delete from mysql.tables_priv where user like "mysqltest%"; + # # bug#22877 replication character sets get out of sync # using replicate-wild-ignore-table diff --git a/mysql-test/t/rpl_packet.test b/mysql-test/t/rpl_packet.test index db6f475dc94..a1e933e2e88 100644 --- a/mysql-test/t/rpl_packet.test +++ b/mysql-test/t/rpl_packet.test @@ -68,5 +68,11 @@ connection slave; sleep 2; SHOW STATUS LIKE 'Slave_running'; +# cleanup +connection master; +drop table t1; +connection slave; +drop table t1; + # End of tests diff --git a/mysql-test/t/rpl_ssl.test b/mysql-test/t/rpl_ssl.test index 9f25f71525a..5b5f12c91df 100644 --- a/mysql-test/t/rpl_ssl.test +++ b/mysql-test/t/rpl_ssl.test @@ -58,3 +58,9 @@ sync_slave_with_master; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT --replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # query_vertical show slave status; + +connection master; +drop user replssl@localhost; +drop table t1; +sync_slave_with_master; + From 5203ea6ccb349aae5e53e3f0247256a9fc60208e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 18:44:29 +0800 Subject: [PATCH 104/153] BUG#18676 when cluster storage engine is down, misleading error message on create table with 4009. mysql-test/r/ndb_autodiscover.result: changes ndbd error code to mysqld error code when no cluster connection sql/ha_ndbcluster.cc: map 4009 error code to mysql not connected error sql/handler.cc: define return codes to ha_table_exists_in_engine to something useful NOTE: in 5.1 this should call a handlerton method, not horrible ifdef ndb stuff sql/sql_table.cc: clearly define what happens on create table if exits/not exists/not connected to engine --- mysql-test/r/ndb_autodiscover.result | 2 +- sql/ha_ndbcluster.cc | 11 +++++------ sql/handler.cc | 8 ++++---- sql/sql_table.cc | 25 +++++++++++++++++++------ 4 files changed, 29 insertions(+), 17 deletions(-) diff --git a/mysql-test/r/ndb_autodiscover.result b/mysql-test/r/ndb_autodiscover.result index 6d1b7eb152d..01ea884a8ba 100644 --- a/mysql-test/r/ndb_autodiscover.result +++ b/mysql-test/r/ndb_autodiscover.result @@ -382,7 +382,7 @@ create table t1 (a int primary key) engine=ndb; select * from t1; a select * from t1; -ERROR HY000: Can't lock file (errno: 4009) +ERROR HY000: Can't lock file (errno: 157) use test; drop database test_only_ndb_tables; CREATE TABLE t9 ( diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 7a9c7d0d021..ead7343db88 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -203,6 +203,8 @@ static const err_code_mapping err_map[]= { 284, HA_ERR_TABLE_DEF_CHANGED, 0 }, + {4009, HA_ERR_NO_CONNECTION, 1 }, + { 0, 1, 0 }, { -1, -1, 1 } @@ -5042,14 +5044,11 @@ int ndbcluster_table_exists_in_engine(THD* thd, const char *db, const char *name dict->invalidateTable(name); if (!(tab= dict->getTable(name))) { - const NdbError err= dict->getNdbError(); - if (err.code == 709) - DBUG_RETURN(0); - ERR_RETURN(err); + ERR_RETURN(dict->getNdbError()); } DBUG_PRINT("info", ("Found table %s", tab->getName())); - DBUG_RETURN(1); + DBUG_RETURN(HA_ERR_TABLE_EXIST); } @@ -5234,7 +5233,7 @@ int ndbcluster_find_files(THD *thd,const char *db,const char *path, DBUG_PRINT("info", ("%s existed on disk", name)); // The .ndb file exists on disk, but it's not in list of tables in ndb // Verify that handler agrees table is gone. - if (ndbcluster_table_exists_in_engine(thd, db, file_name) == 0) + if (ndbcluster_table_exists_in_engine(thd, db, file_name) == HA_ERR_NO_SUCH_TABLE) { DBUG_PRINT("info", ("NDB says %s does not exists", file_name)); it.remove(); diff --git a/sql/handler.cc b/sql/handler.cc index 5a27e470d70..62f765f0d22 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -2442,14 +2442,14 @@ ha_find_files(THD *thd,const char *db,const char *path, Ask handler if the table exists in engine RETURN - 0 Table does not exist - 1 Table exists - # Error code + HA_ERR_NO_SUCH_TABLE Table does not exist + HA_ERR_TABLE_EXIST Table exists + # Error code */ int ha_table_exists_in_engine(THD* thd, const char* db, const char* name) { - int error= 0; + int error= HA_ERR_NO_SUCH_TABLE; DBUG_ENTER("ha_table_exists_in_engine"); DBUG_PRINT("enter", ("db: %s, name: %s", db, name)); #ifdef HAVE_NDBCLUSTER_DB diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 512d990347f..1ad1cb6426b 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -1696,6 +1696,7 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name, alias); DBUG_RETURN(FALSE); } + DBUG_PRINT("info",("1")); my_error(ER_TABLE_EXISTS_ERROR, MYF(0), alias); DBUG_RETURN(TRUE); } @@ -1706,6 +1707,7 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name, { if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS) goto warn; + DBUG_PRINT("info",("2")); my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name); goto end; } @@ -1724,14 +1726,25 @@ bool mysql_create_table(THD *thd,const char *db, const char *table_name, { bool create_if_not_exists = create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS; - if (ha_table_exists_in_engine(thd, db, table_name)) + int retcode = ha_table_exists_in_engine(thd, db, table_name); + DBUG_PRINT("info", ("exists_in_engine: %u",retcode)); + switch (retcode) { - DBUG_PRINT("info", ("Table with same name already existed in handler")); + case HA_ERR_NO_SUCH_TABLE: + /* Normal case, no table exists. we can go and create it */ + break; + case HA_ERR_TABLE_EXIST: + DBUG_PRINT("info", ("Table existed in handler")); - if (create_if_not_exists) - goto warn; - my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name); - goto end; + if (create_if_not_exists) + goto warn; + my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name); + goto end; + break; + default: + DBUG_PRINT("info", ("error: %u from storage engine", retcode)); + my_error(retcode, MYF(0),table_name); + goto end; } } From fe074a726fae715912a94630ac5301c60e868e98 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 16:13:27 +0500 Subject: [PATCH 105/153] Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte client/mysqldump.c: fixed typo include/mysql_com.h: added new constants SYSTEM_CHARSET_MBMAXLEN, NAME_CHAR_LEN, USERNAME_CHAR_LENGTH increased NAME_LEN, USERNAME_LENGTH mysql-test/r/create.result: result fix mysql-test/r/grant.result: result fix mysql-test/r/mysql.result: result fix mysql-test/r/sp.result: result fix mysql-test/t/create.test: test case mysql-test/t/grant.test: test case sql/events.cc: NAME_LEN is replaced with NAME_CHAR_LEN sql/item_strfunc.h: fixed calculation of max_length sql/mysql_priv.h: check_string_length function is replaced with check_string_byte_length added new function check_string_char_length sql/sp.cc: NAME_LEN is replaced with NAME_CHAR_LEN sql/sp_head.cc: NAME_LEN is replaced with NAME_CHAR_LEN sql/sp_head.h: changed parameter of 'check_routine_name' function sql/sql_class.cc: NAME_LEN is replaced with NAME_CHAR_LEN sql/share/errmsg.txt: increased argument lengths according to new constants sql/sql_parse.cc: removed unnecessary checks added function 'check_string_char_length' sql/sql_plugin.cc: check that name is not longer than NAME_CHAR_LEN symbols sql/sql_show.cc: NAME_LEN is replaced with NAME_CHAR_LEN sql/sql_table.cc: check that key name is not longer than NAME_LEN symbols sql/sql_udf.cc: check that udf name is not longer than NAME_CHAR_LEN symbols sql/sql_yacc.yy: check that user name is not longer than USERNAME_CHAR_LENGTH symbols sql/table.cc: check that db or table or column name is not longer than NAME_LEN symbols storage/innobase/handler/ha_innodb.cc: removed unnecessary multiplication tests/mysql_client_test.c: NAME_LEN is replaced with NAME_CHAR_LEN --- client/mysqldump.c | 2 +- include/mysql_com.h | 8 +- mysql-test/r/create.result | 99 +- mysql-test/r/grant.result | 9 + mysql-test/r/mysql.result | 2 +- mysql-test/r/sp.result | 2 +- mysql-test/t/create.test | 88 + mysql-test/t/grant.test | 12 + sql/events.cc | 2 +- sql/item_strfunc.h | 4 +- sql/mysql_priv.h | 11 +- sql/share/errmsg.txt | 3584 ++++++++++++------------- sql/sp.cc | 22 +- sql/sp_head.cc | 21 +- sql/sp_head.h | 2 +- sql/sql_class.cc | 11 +- sql/sql_parse.cc | 96 +- sql/sql_plugin.cc | 3 +- sql/sql_show.cc | 194 +- sql/sql_table.cc | 11 +- sql/sql_udf.cc | 9 +- sql/sql_yacc.yy | 25 +- sql/table.cc | 21 +- storage/innobase/handler/ha_innodb.cc | 4 +- tests/mysql_client_test.c | 10 +- 25 files changed, 2255 insertions(+), 1997 deletions(-) diff --git a/client/mysqldump.c b/client/mysqldump.c index c86a2fc385f..408f055cf4a 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -3454,7 +3454,7 @@ static char *get_actual_table_name(const char *old_table_name, MEM_ROOT *root) static int dump_selected_tables(char *db, char **table_names, int tables) { - char table_buff[NAME_LEN*+3]; + char table_buff[NAME_LEN*2+3]; DYNAMIC_STRING lock_tables_query; MEM_ROOT root; char **dump_tables, **pos, **end; diff --git a/include/mysql_com.h b/include/mysql_com.h index e2ab9601f5f..2223dbad6ab 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -20,9 +20,13 @@ #ifndef _mysql_com_h #define _mysql_com_h -#define NAME_LEN 64 /* Field/table name length */ #define HOSTNAME_LENGTH 60 -#define USERNAME_LENGTH 16 +#define SYSTEM_CHARSET_MBMAXLEN 3 +#define NAME_CHAR_LEN 64 /* Field/table name length */ +#define USERNAME_CHAR_LENGTH 16 +#define NAME_LEN (NAME_CHAR_LEN*SYSTEM_CHARSET_MBMAXLEN) +#define USERNAME_LENGTH (USERNAME_CHAR_LENGTH*SYSTEM_CHARSET_MBMAXLEN) + #define SERVER_VERSION_LENGTH 60 #define SQLSTATE_LENGTH 5 diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 53892b219eb..717201f384a 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -827,7 +827,7 @@ ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa DROP DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' RENAME DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa TO a; -ERROR 42000: Unknown database 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +ERROR 42000: Unknown database 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' RENAME DATABASE mysqltest TO aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' create database mysqltest; @@ -838,3 +838,100 @@ USE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' SHOW CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +set names utf8; +create database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; +use имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; +select database(); +database() +имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45 +create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 +( +имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 int, +index имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48 (имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45) +); +create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42 as +select имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 +from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; +select * from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; +имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 +select SCHEMA_NAME from information_schema.schemata +where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +SCHEMA_NAME +имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45 +select TABLE_NAME from information_schema.tables where +table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +TABLE_NAME +имÑ_вью_кодировке_утф8_длиной_больше_чем_42 +имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 +select COLUMN_NAME from information_schema.columns where +table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +COLUMN_NAME +имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 +имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 +select INDEX_NAME from information_schema.statistics where +table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +INDEX_NAME +имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48 +select TABLE_NAME from information_schema.views where +table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +TABLE_NAME +имÑ_вью_кодировке_утф8_длиной_больше_чем_42 +show create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; +Table Create Table +имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 CREATE TABLE `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48` ( + `имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` int(11) DEFAULT NULL, + KEY `имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48` (`имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45`) +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +show create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42; +View Create View +имÑ_вью_кодировке_утф8_длиной_больше_чем_42 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `имÑ_вью_кодировке_утф8_длиной_больше_чем_42` AS select `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48`.`имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` AS `имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` from `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48` +create event имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48 on schedule every 2 year do select 1; +select EVENT_NAME from information_schema.events +where event_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +EVENT_NAME +имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48 +drop event имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48; +create event +очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66 +on schedule every 2 year do select 1; +ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long +create trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49 +before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1; +select TRIGGER_NAME from information_schema.triggers where +trigger_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +TRIGGER_NAME +имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49 +drop trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49; +create trigger +очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66 +before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1; +ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long +drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66; +ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long +create procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50() +begin +end; +select ROUTINE_NAME from information_schema.routines where +routine_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +ROUTINE_NAME +имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50 +drop procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50; +create procedure очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66() +begin +end; +ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long +create function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49() +returns int +return 0; +select ROUTINE_NAME from information_schema.routines where +routine_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +ROUTINE_NAME +имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49 +drop function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49; +create function очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66() +returns int +return 0; +ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long +drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; +set names default; +use test; diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 5d97e540976..2ac5953c456 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -1060,3 +1060,12 @@ DROP USER bug23556@localhost; GRANT PROCESS ON * TO user@localhost; ERROR 3D000: No database selected End of 5.0 tests +set names utf8; +grant select on test.* to юзер_юзер@localhost; +user() +юзер_юзер@localhost +revoke all on test.* from юзер_юзер@localhost; +drop user юзер_юзер@localhost; +grant select on test.* to очень_длинный_юзер@localhost; +ERROR HY000: String 'очень_длинный_юзер' is too long for user name (should be no longer than 16) +set names default; diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result index e83bbe97eaa..61d04deef51 100644 --- a/mysql-test/r/mysql.result +++ b/mysql-test/r/mysql.result @@ -167,7 +167,7 @@ ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errn The commands reported in the bug report ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) Too long dbname -ERROR 1049 (42000) at line 1: Unknown database 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' +ERROR 1102 (42000) at line 1: Incorrect database name 'test_really_long_dbnamexxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' Too long hostname ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyrils_superlonghostnameXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno) 1 diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result index 4abbb35bd6a..733cc40b296 100644 --- a/mysql-test/r/sp.result +++ b/mysql-test/r/sp.result @@ -5398,7 +5398,7 @@ drop database if exists това_е_дълго_име_за_база_данни_ create database това_е_дълго_име_за_база_данни_нали| INSERT INTO mysql.proc VALUES ('това_е_дълго_име_за_база_данни_нали','това_е_процедура_Ñ_доÑта_дълго_име_нали_и_още_по_дълго','PROCEDURE','това_е_процедура_Ñ_доÑта_дълго_име_нали_и_още_по_дълго','SQL','CONTAINS_SQL','NO','DEFINER','','','bad_body','root@localhost',now(), now(),'','')| call това_е_дълго_име_за_база_данни_нали.това_е_процедура_Ñ_доÑта_дълго_име_нали_и_още_по_дълго()| -ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6) +ERROR HY000: Failed to load routine това_е_дълго_име_за_база_данни_нали.това_е_процедура_Ñ_доÑта_дълго_име_нали_и_още_по_дълго. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6) drop database това_е_дълго_име_за_база_данни_нали| CREATE TABLE t3 ( Member_ID varchar(15) NOT NULL, diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index ffdcee06488..83553e314a7 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -734,3 +734,91 @@ drop database mysqltest; USE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; --error 1102 SHOW CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa; + +# +# Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte +# +set names utf8; + +create database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; +use имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; +select database(); +create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 +( + имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 int, + index имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48 (имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45) +); + +create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42 as +select имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 +from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; + +# database, table, field, key, view +select * from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; + +select SCHEMA_NAME from information_schema.schemata +where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; + +select TABLE_NAME from information_schema.tables where +table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; + +select COLUMN_NAME from information_schema.columns where +table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; + +select INDEX_NAME from information_schema.statistics where +table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; + +select TABLE_NAME from information_schema.views where +table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; + +show create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; +show create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42; + +# procedure, function, event, trigger + +create event имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48 on schedule every 2 year do select 1; +select EVENT_NAME from information_schema.events +where event_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +drop event имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48; +--error 1059 +create event +очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66 +on schedule every 2 year do select 1; + +create trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49 +before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1; +select TRIGGER_NAME from information_schema.triggers where +trigger_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +drop trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49; +--error 1059 +create trigger +очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66 +before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1; +--error 1059 +drop trigger очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66; + +create procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50() +begin +end; +select ROUTINE_NAME from information_schema.routines where +routine_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +drop procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50; +--error 1059 +create procedure очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66() +begin +end; + +create function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49() + returns int +return 0; +select ROUTINE_NAME from information_schema.routines where +routine_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +drop function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49; +--error 1059 +create function очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66() + returns int +return 0; + +drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; +set names default; +use test; diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 9417ac687d4..0008c37646c 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -986,3 +986,15 @@ disconnect con1; connection default; --echo End of 5.0 tests + +# +# Bug#21432: Database/Table name limited to 64 bytes, not chars, problems with multi-byte +# +set names utf8; +grant select on test.* to юзер_юзер@localhost; +--exec $MYSQL --default-character-set=utf8 --user=юзер_юзер -e "select user()" +revoke all on test.* from юзер_юзер@localhost; +drop user юзер_юзер@localhost; +--error 1573 +grant select on test.* to очень_длинный_юзер@localhost; +set names default; diff --git a/sql/events.cc b/sql/events.cc index df2f1124f38..66e2a264dbd 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -568,7 +568,7 @@ Events::show_create_event(THD *thd, LEX_STRING dbname, LEX_STRING name) if (et->get_create_event(thd, &show_str)) goto err; - field_list.push_back(new Item_empty_string("Event", NAME_LEN)); + field_list.push_back(new Item_empty_string("Event", NAME_CHAR_LEN)); sql_mode_str= sys_var_thd_sql_mode::symbolic_mode_representation(thd, et->sql_mode, diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 628b51a70d7..1bf8dfbfe7e 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -426,8 +426,8 @@ public: bool fix_fields(THD *thd, Item **ref); void fix_length_and_dec() { - max_length= ((USERNAME_LENGTH + HOSTNAME_LENGTH + 1) * - system_charset_info->mbmaxlen); + max_length= (USERNAME_LENGTH + + (HOSTNAME_LENGTH + 1) * SYSTEM_CHARSET_MBMAXLEN); } const char *func_name() const { return "user"; } const char *fully_qualified_func_name() const { return "user()"; } diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 2bc8c2071d2..7607a004e7a 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -366,7 +366,7 @@ MY_LOCALE *my_locale_by_number(uint number); Maximum length of time zone name that we support (Time zone name is char(64) in db). mysqlbinlog needs it. */ -#define MAX_TIME_ZONE_NAME_LENGTH 72 +#define MAX_TIME_ZONE_NAME_LENGTH (NAME_LEN + 8) /* The rest of the file is included in the server only */ #ifndef MYSQL_CLIENT @@ -622,8 +622,11 @@ void get_default_definer(THD *thd, LEX_USER *definer); LEX_USER *create_default_definer(THD *thd); LEX_USER *create_definer(THD *thd, LEX_STRING *user_name, LEX_STRING *host_name); LEX_USER *get_current_user(THD *thd, LEX_USER *user); -bool check_string_length(LEX_STRING *str, - const char *err_msg, uint max_length); +bool check_string_byte_length(LEX_STRING *str, const char *err_msg, + uint max_byte_length); +bool check_string_char_length(LEX_STRING *str, const char *err_msg, + uint max_char_length, CHARSET_INFO *cs, + bool no_error); enum enum_mysql_completiontype { ROLLBACK_RELEASE=-2, ROLLBACK=1, ROLLBACK_AND_CHAIN=7, @@ -1164,7 +1167,7 @@ void mysql_ha_mark_tables_for_reopen(THD *thd, TABLE *table); /* sql_base.cc */ #define TMP_TABLE_KEY_EXTRA 8 void set_item_name(Item *item,char *pos,uint length); -bool add_field_to_list(THD *thd, char *field_name, enum enum_field_types type, +bool add_field_to_list(THD *thd, LEX_STRING *field_name, enum enum_field_types type, char *length, char *decimal, uint type_modifier, Item *default_value, Item *on_update_value, diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index a42f94760ab..6393307c156 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -100,155 +100,155 @@ ER_CANT_CREATE_TABLE swe "Kan inte skapa tabellen '%-.200s' (Felkod: %d)" ukr "îÅ ÍÏÖÕ ÓÔ×ÏÒÉÔÉ ÔÁÂÌÉÃÀ '%-.200s' (ÐÏÍÉÌËÁ: %d)" ER_CANT_CREATE_DB - cze "Nemohu vytvo-Bøit databázi '%-.64s' (chybový kód: %d)" - dan "Kan ikke oprette databasen '%-.64s' (Fejlkode: %d)" - nla "Kan database '%-.64s' niet aanmaken (Errcode: %d)" - eng "Can't create database '%-.64s' (errno: %d)" - jps "'%-.64s' ƒf[ƒ^ƒx[ƒX‚ªì‚ê‚Ü‚¹‚ñ (errno: %d)", - est "Ei suuda luua andmebaasi '%-.64s' (veakood: %d)" - fre "Ne peut créer la base '%-.64s' (Erreur %d)" - ger "Kann Datenbank '%-.64s' nicht erzeugen (Fehler: %d)" - greek "Áäýíáôç ç äçìéïõñãßá ôçò âÜóçò äåäïìÝíùí '%-.64s' (êùäéêüò ëÜèïõò: %d)" - hun "Az '%-.64s' adatbazis nem hozhato letre (hibakod: %d)" - ita "Impossibile creare il database '%-.64s' (errno: %d)" - jpn "'%-.64s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬ºî¤ì¤Þ¤»¤ó (errno: %d)" - kor "µ¥ÀÌŸº£À̽º '%-.64s'¸¦ ¸¸µéÁö ¸øÇß½À´Ï´Ù.. (¿¡·¯¹øÈ£: %d)" - nor "Kan ikke opprette databasen '%-.64s' (Feilkode: %d)" - norwegian-ny "Kan ikkje opprette databasen '%-.64s' (Feilkode: %d)" - pol "Nie mo¿na stworzyæ bazy danych '%-.64s' (Kod b³êdu: %d)" - por "Não pode criar o banco de dados '%-.64s' (erro no. %d)" - rum "Nu pot sa creez baza de date '%-.64s' (Eroare: %d)" - rus "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÂÁÚÕ ÄÁÎÎÙÈ '%-.64s' (ÏÛÉÂËÁ: %d)" - serbian "Ne mogu da kreiram bazu '%-.64s' (errno: %d)" - slo "Nemô¾em vytvori» databázu '%-.64s' (chybový kód: %d)" - spa "No puedo crear base de datos '%-.64s' (Error: %d)" - swe "Kan inte skapa databasen '%-.64s' (Felkod: %d)" - ukr "îÅ ÍÏÖÕ ÓÔ×ÏÒÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ '%-.64s' (ÐÏÍÉÌËÁ: %d)" + cze "Nemohu vytvo-Bøit databázi '%-.192s' (chybový kód: %d)" + dan "Kan ikke oprette databasen '%-.192s' (Fejlkode: %d)" + nla "Kan database '%-.192s' niet aanmaken (Errcode: %d)" + eng "Can't create database '%-.192s' (errno: %d)" + jps "'%-.192s' ƒf[ƒ^ƒx[ƒX‚ªì‚ê‚Ü‚¹‚ñ (errno: %d)", + est "Ei suuda luua andmebaasi '%-.192s' (veakood: %d)" + fre "Ne peut créer la base '%-.192s' (Erreur %d)" + ger "Kann Datenbank '%-.192s' nicht erzeugen (Fehler: %d)" + greek "Áäýíáôç ç äçìéïõñãßá ôçò âÜóçò äåäïìÝíùí '%-.192s' (êùäéêüò ëÜèïõò: %d)" + hun "Az '%-.192s' adatbazis nem hozhato letre (hibakod: %d)" + ita "Impossibile creare il database '%-.192s' (errno: %d)" + jpn "'%-.192s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬ºî¤ì¤Þ¤»¤ó (errno: %d)" + kor "µ¥ÀÌŸº£À̽º '%-.192s'¸¦ ¸¸µéÁö ¸øÇß½À´Ï´Ù.. (¿¡·¯¹øÈ£: %d)" + nor "Kan ikke opprette databasen '%-.192s' (Feilkode: %d)" + norwegian-ny "Kan ikkje opprette databasen '%-.192s' (Feilkode: %d)" + pol "Nie mo¿na stworzyæ bazy danych '%-.192s' (Kod b³êdu: %d)" + por "Não pode criar o banco de dados '%-.192s' (erro no. %d)" + rum "Nu pot sa creez baza de date '%-.192s' (Eroare: %d)" + rus "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÂÁÚÕ ÄÁÎÎÙÈ '%-.192s' (ÏÛÉÂËÁ: %d)" + serbian "Ne mogu da kreiram bazu '%-.192s' (errno: %d)" + slo "Nemô¾em vytvori» databázu '%-.192s' (chybový kód: %d)" + spa "No puedo crear base de datos '%-.192s' (Error: %d)" + swe "Kan inte skapa databasen '%-.192s' (Felkod: %d)" + ukr "îÅ ÍÏÖÕ ÓÔ×ÏÒÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ '%-.192s' (ÐÏÍÉÌËÁ: %d)" ER_DB_CREATE_EXISTS - cze "Nemohu vytvo-Bøit databázi '%-.64s'; databáze ji¾ existuje" - dan "Kan ikke oprette databasen '%-.64s'; databasen eksisterer" - nla "Kan database '%-.64s' niet aanmaken; database bestaat reeds" - eng "Can't create database '%-.64s'; database exists" - jps "'%-.64s' ƒf[ƒ^ƒx[ƒX‚ªì‚ê‚Ü‚¹‚ñ.Šù‚É‚»‚̃f[ƒ^ƒx[ƒX‚ª‘¶Ý‚µ‚Ü‚·", - est "Ei suuda luua andmebaasi '%-.64s': andmebaas juba eksisteerib" - fre "Ne peut créer la base '%-.64s'; elle existe déjà" - ger "Kann Datenbank '%-.64s' nicht erzeugen. Datenbank existiert bereits" - greek "Áäýíáôç ç äçìéïõñãßá ôçò âÜóçò äåäïìÝíùí '%-.64s'; Ç âÜóç äåäïìÝíùí õðÜñ÷åé Þäç" - hun "Az '%-.64s' adatbazis nem hozhato letre Az adatbazis mar letezik" - ita "Impossibile creare il database '%-.64s'; il database esiste" - jpn "'%-.64s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬ºî¤ì¤Þ¤»¤ó.´û¤Ë¤½¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬Â¸ºß¤·¤Þ¤¹" - kor "µ¥ÀÌŸº£À̽º '%-.64s'¸¦ ¸¸µéÁö ¸øÇß½À´Ï´Ù.. µ¥ÀÌŸº£À̽º°¡ Á¸ÀçÇÔ" - nor "Kan ikke opprette databasen '%-.64s'; databasen eksisterer" - norwegian-ny "Kan ikkje opprette databasen '%-.64s'; databasen eksisterer" - pol "Nie mo¿na stworzyæ bazy danych '%-.64s'; baza danych ju¿ istnieje" - por "Não pode criar o banco de dados '%-.64s'; este banco de dados já existe" - rum "Nu pot sa creez baza de date '%-.64s'; baza de date exista deja" - rus "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÂÁÚÕ ÄÁÎÎÙÈ '%-.64s'. âÁÚÁ ÄÁÎÎÙÈ ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ" - serbian "Ne mogu da kreiram bazu '%-.64s'; baza veæ postoji." - slo "Nemô¾em vytvori» databázu '%-.64s'; databáza existuje" - spa "No puedo crear base de datos '%-.64s'; la base de datos ya existe" - swe "Databasen '%-.64s' existerar redan" - ukr "îÅ ÍÏÖÕ ÓÔ×ÏÒÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ '%-.64s'. âÁÚÁ ÄÁÎÎÉÈ ¦ÓÎÕ¤" + cze "Nemohu vytvo-Bøit databázi '%-.192s'; databáze ji¾ existuje" + dan "Kan ikke oprette databasen '%-.192s'; databasen eksisterer" + nla "Kan database '%-.192s' niet aanmaken; database bestaat reeds" + eng "Can't create database '%-.192s'; database exists" + jps "'%-.192s' ƒf[ƒ^ƒx[ƒX‚ªì‚ê‚Ü‚¹‚ñ.Šù‚É‚»‚̃f[ƒ^ƒx[ƒX‚ª‘¶Ý‚µ‚Ü‚·", + est "Ei suuda luua andmebaasi '%-.192s': andmebaas juba eksisteerib" + fre "Ne peut créer la base '%-.192s'; elle existe déjà" + ger "Kann Datenbank '%-.192s' nicht erzeugen. Datenbank existiert bereits" + greek "Áäýíáôç ç äçìéïõñãßá ôçò âÜóçò äåäïìÝíùí '%-.192s'; Ç âÜóç äåäïìÝíùí õðÜñ÷åé Þäç" + hun "Az '%-.192s' adatbazis nem hozhato letre Az adatbazis mar letezik" + ita "Impossibile creare il database '%-.192s'; il database esiste" + jpn "'%-.192s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬ºî¤ì¤Þ¤»¤ó.´û¤Ë¤½¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬Â¸ºß¤·¤Þ¤¹" + kor "µ¥ÀÌŸº£À̽º '%-.192s'¸¦ ¸¸µéÁö ¸øÇß½À´Ï´Ù.. µ¥ÀÌŸº£À̽º°¡ Á¸ÀçÇÔ" + nor "Kan ikke opprette databasen '%-.192s'; databasen eksisterer" + norwegian-ny "Kan ikkje opprette databasen '%-.192s'; databasen eksisterer" + pol "Nie mo¿na stworzyæ bazy danych '%-.192s'; baza danych ju¿ istnieje" + por "Não pode criar o banco de dados '%-.192s'; este banco de dados já existe" + rum "Nu pot sa creez baza de date '%-.192s'; baza de date exista deja" + rus "îÅ×ÏÚÍÏÖÎÏ ÓÏÚÄÁÔØ ÂÁÚÕ ÄÁÎÎÙÈ '%-.192s'. âÁÚÁ ÄÁÎÎÙÈ ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ" + serbian "Ne mogu da kreiram bazu '%-.192s'; baza veæ postoji." + slo "Nemô¾em vytvori» databázu '%-.192s'; databáza existuje" + spa "No puedo crear base de datos '%-.192s'; la base de datos ya existe" + swe "Databasen '%-.192s' existerar redan" + ukr "îÅ ÍÏÖÕ ÓÔ×ÏÒÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ '%-.192s'. âÁÚÁ ÄÁÎÎÉÈ ¦ÓÎÕ¤" ER_DB_DROP_EXISTS - cze "Nemohu zru-B¹it databázi '%-.64s', databáze neexistuje" - dan "Kan ikke slette (droppe) '%-.64s'; databasen eksisterer ikke" - nla "Kan database '%-.64s' niet verwijderen; database bestaat niet" - eng "Can't drop database '%-.64s'; database doesn't exist" - jps "'%-.64s' ƒf[ƒ^ƒx[ƒX‚ð”jŠü‚Å‚«‚Ü‚¹‚ñ. ‚»‚̃f[ƒ^ƒx[ƒX‚ª‚È‚¢‚̂ł·.", - est "Ei suuda kustutada andmebaasi '%-.64s': andmebaasi ei eksisteeri" - fre "Ne peut effacer la base '%-.64s'; elle n'existe pas" - ger "Kann Datenbank '%-.64s' nicht löschen; Datenbank nicht vorhanden" - greek "Áäýíáôç ç äéáãñáöÞ ôçò âÜóçò äåäïìÝíùí '%-.64s'. Ç âÜóç äåäïìÝíùí äåí õðÜñ÷åé" - hun "A(z) '%-.64s' adatbazis nem szuntetheto meg. Az adatbazis nem letezik" - ita "Impossibile cancellare '%-.64s'; il database non esiste" - jpn "'%-.64s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÇË´þ¤Ç¤­¤Þ¤»¤ó. ¤½¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬¤Ê¤¤¤Î¤Ç¤¹." - kor "µ¥ÀÌŸº£À̽º '%-.64s'¸¦ Á¦°ÅÇÏÁö ¸øÇß½À´Ï´Ù. µ¥ÀÌŸº£À̽º°¡ Á¸ÀçÇÏÁö ¾ÊÀ½ " - nor "Kan ikke fjerne (drop) '%-.64s'; databasen eksisterer ikke" - norwegian-ny "Kan ikkje fjerne (drop) '%-.64s'; databasen eksisterer ikkje" - pol "Nie mo¿na usun?æ bazy danych '%-.64s'; baza danych nie istnieje" - por "Não pode eliminar o banco de dados '%-.64s'; este banco de dados não existe" - rum "Nu pot sa drop baza de date '%-.64s'; baza da date este inexistenta" - rus "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÂÁÚÕ ÄÁÎÎÙÈ '%-.64s'. ôÁËÏÊ ÂÁÚÙ ÄÁÎÎÙÈ ÎÅÔ" - serbian "Ne mogu da izbrišem bazu '%-.64s'; baza ne postoji." - slo "Nemô¾em zmaza» databázu '%-.64s'; databáza neexistuje" - spa "No puedo eliminar base de datos '%-.64s'; la base de datos no existe" - swe "Kan inte radera databasen '%-.64s'; databasen finns inte" - ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ '%-.64s'. âÁÚÁ ÄÁÎÎÉÈ ÎÅ ¦ÓÎÕ¤" + cze "Nemohu zru-B¹it databázi '%-.192s', databáze neexistuje" + dan "Kan ikke slette (droppe) '%-.192s'; databasen eksisterer ikke" + nla "Kan database '%-.192s' niet verwijderen; database bestaat niet" + eng "Can't drop database '%-.192s'; database doesn't exist" + jps "'%-.192s' ƒf[ƒ^ƒx[ƒX‚ð”jŠü‚Å‚«‚Ü‚¹‚ñ. ‚»‚̃f[ƒ^ƒx[ƒX‚ª‚È‚¢‚̂ł·.", + est "Ei suuda kustutada andmebaasi '%-.192s': andmebaasi ei eksisteeri" + fre "Ne peut effacer la base '%-.192s'; elle n'existe pas" + ger "Kann Datenbank '%-.192s' nicht löschen; Datenbank nicht vorhanden" + greek "Áäýíáôç ç äéáãñáöÞ ôçò âÜóçò äåäïìÝíùí '%-.192s'. Ç âÜóç äåäïìÝíùí äåí õðÜñ÷åé" + hun "A(z) '%-.192s' adatbazis nem szuntetheto meg. Az adatbazis nem letezik" + ita "Impossibile cancellare '%-.192s'; il database non esiste" + jpn "'%-.192s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤òÇË´þ¤Ç¤­¤Þ¤»¤ó. ¤½¤Î¥Ç¡¼¥¿¥Ù¡¼¥¹¤¬¤Ê¤¤¤Î¤Ç¤¹." + kor "µ¥ÀÌŸº£À̽º '%-.192s'¸¦ Á¦°ÅÇÏÁö ¸øÇß½À´Ï´Ù. µ¥ÀÌŸº£À̽º°¡ Á¸ÀçÇÏÁö ¾ÊÀ½ " + nor "Kan ikke fjerne (drop) '%-.192s'; databasen eksisterer ikke" + norwegian-ny "Kan ikkje fjerne (drop) '%-.192s'; databasen eksisterer ikkje" + pol "Nie mo¿na usun?æ bazy danych '%-.192s'; baza danych nie istnieje" + por "Não pode eliminar o banco de dados '%-.192s'; este banco de dados não existe" + rum "Nu pot sa drop baza de date '%-.192s'; baza da date este inexistenta" + rus "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÂÁÚÕ ÄÁÎÎÙÈ '%-.192s'. ôÁËÏÊ ÂÁÚÙ ÄÁÎÎÙÈ ÎÅÔ" + serbian "Ne mogu da izbrišem bazu '%-.192s'; baza ne postoji." + slo "Nemô¾em zmaza» databázu '%-.192s'; databáza neexistuje" + spa "No puedo eliminar base de datos '%-.192s'; la base de datos no existe" + swe "Kan inte radera databasen '%-.192s'; databasen finns inte" + ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ '%-.192s'. âÁÚÁ ÄÁÎÎÉÈ ÎÅ ¦ÓÎÕ¤" ER_DB_DROP_DELETE - cze "Chyba p-Bøi ru¹ení databáze (nemohu vymazat '%-.64s', chyba %d)" - dan "Fejl ved sletning (drop) af databasen (kan ikke slette '%-.64s', Fejlkode %d)" - nla "Fout bij verwijderen database (kan '%-.64s' niet verwijderen, Errcode: %d)" - eng "Error dropping database (can't delete '%-.64s', errno: %d)" - jps "ƒf[ƒ^ƒx[ƒX”jŠüƒGƒ‰[ ('%-.64s' ‚ð휂ł«‚Ü‚¹‚ñ, errno: %d)", - est "Viga andmebaasi kustutamisel (ei suuda kustutada faili '%-.64s', veakood: %d)" - fre "Ne peut effacer la base '%-.64s' (erreur %d)" - ger "Fehler beim Löschen der Datenbank ('%-.64s' kann nicht gelöscht werden, Fehler: %d)" - greek "ÐáñïõóéÜóôçêå ðñüâëçìá êáôÜ ôç äéáãñáöÞ ôçò âÜóçò äåäïìÝíùí (áäýíáôç ç äéáãñáöÞ '%-.64s', êùäéêüò ëÜèïõò: %d)" - hun "Adatbazis megszuntetesi hiba ('%-.64s' nem torolheto, hibakod: %d)" - ita "Errore durante la cancellazione del database (impossibile cancellare '%-.64s', errno: %d)" - jpn "¥Ç¡¼¥¿¥Ù¡¼¥¹ÇË´þ¥¨¥é¡¼ ('%-.64s' ¤òºï½ü¤Ç¤­¤Þ¤»¤ó, errno: %d)" - kor "µ¥ÀÌŸº£À̽º Á¦°Å ¿¡·¯('%-.64s'¸¦ »èÁ¦ÇÒ ¼ö ¾øÀ¾´Ï´Ù, ¿¡·¯¹øÈ£: %d)" - nor "Feil ved fjerning (drop) av databasen (kan ikke slette '%-.64s', feil %d)" - norwegian-ny "Feil ved fjerning (drop) av databasen (kan ikkje slette '%-.64s', feil %d)" - pol "B³?d podczas usuwania bazy danych (nie mo¿na usun?æ '%-.64s', b³?d %d)" - por "Erro ao eliminar banco de dados (não pode eliminar '%-.64s' - erro no. %d)" - rum "Eroare dropuind baza de date (nu pot sa sterg '%-.64s', Eroare: %d)" - rus "ïÛÉÂËÁ ÐÒÉ ÕÄÁÌÅÎÉÉ ÂÁÚÙ ÄÁÎÎÙÈ (ÎÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ '%-.64s', ÏÛÉÂËÁ: %d)" - serbian "Ne mogu da izbrišem bazu (ne mogu da izbrišem '%-.64s', errno: %d)" - slo "Chyba pri mazaní databázy (nemô¾em zmaza» '%-.64s', chybový kód: %d)" - spa "Error eliminando la base de datos(no puedo borrar '%-.64s', error %d)" - swe "Fel vid radering av databasen (Kan inte radera '%-.64s'. Felkod: %d)" - ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ (îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ '%-.64s', ÐÏÍÉÌËÁ: %d)" + cze "Chyba p-Bøi ru¹ení databáze (nemohu vymazat '%-.192s', chyba %d)" + dan "Fejl ved sletning (drop) af databasen (kan ikke slette '%-.192s', Fejlkode %d)" + nla "Fout bij verwijderen database (kan '%-.192s' niet verwijderen, Errcode: %d)" + eng "Error dropping database (can't delete '%-.192s', errno: %d)" + jps "ƒf[ƒ^ƒx[ƒX”jŠüƒGƒ‰[ ('%-.192s' ‚ð휂ł«‚Ü‚¹‚ñ, errno: %d)", + est "Viga andmebaasi kustutamisel (ei suuda kustutada faili '%-.192s', veakood: %d)" + fre "Ne peut effacer la base '%-.192s' (erreur %d)" + ger "Fehler beim Löschen der Datenbank ('%-.192s' kann nicht gelöscht werden, Fehler: %d)" + greek "ÐáñïõóéÜóôçêå ðñüâëçìá êáôÜ ôç äéáãñáöÞ ôçò âÜóçò äåäïìÝíùí (áäýíáôç ç äéáãñáöÞ '%-.192s', êùäéêüò ëÜèïõò: %d)" + hun "Adatbazis megszuntetesi hiba ('%-.192s' nem torolheto, hibakod: %d)" + ita "Errore durante la cancellazione del database (impossibile cancellare '%-.192s', errno: %d)" + jpn "¥Ç¡¼¥¿¥Ù¡¼¥¹ÇË´þ¥¨¥é¡¼ ('%-.192s' ¤òºï½ü¤Ç¤­¤Þ¤»¤ó, errno: %d)" + kor "µ¥ÀÌŸº£À̽º Á¦°Å ¿¡·¯('%-.192s'¸¦ »èÁ¦ÇÒ ¼ö ¾øÀ¾´Ï´Ù, ¿¡·¯¹øÈ£: %d)" + nor "Feil ved fjerning (drop) av databasen (kan ikke slette '%-.192s', feil %d)" + norwegian-ny "Feil ved fjerning (drop) av databasen (kan ikkje slette '%-.192s', feil %d)" + pol "B³?d podczas usuwania bazy danych (nie mo¿na usun?æ '%-.192s', b³?d %d)" + por "Erro ao eliminar banco de dados (não pode eliminar '%-.192s' - erro no. %d)" + rum "Eroare dropuind baza de date (nu pot sa sterg '%-.192s', Eroare: %d)" + rus "ïÛÉÂËÁ ÐÒÉ ÕÄÁÌÅÎÉÉ ÂÁÚÙ ÄÁÎÎÙÈ (ÎÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ '%-.192s', ÏÛÉÂËÁ: %d)" + serbian "Ne mogu da izbrišem bazu (ne mogu da izbrišem '%-.192s', errno: %d)" + slo "Chyba pri mazaní databázy (nemô¾em zmaza» '%-.192s', chybový kód: %d)" + spa "Error eliminando la base de datos(no puedo borrar '%-.192s', error %d)" + swe "Fel vid radering av databasen (Kan inte radera '%-.192s'. Felkod: %d)" + ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ (îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ '%-.192s', ÐÏÍÉÌËÁ: %d)" ER_DB_DROP_RMDIR - cze "Chyba p-Bøi ru¹ení databáze (nemohu vymazat adresáø '%-.64s', chyba %d)" - dan "Fejl ved sletting af database (kan ikke slette folderen '%-.64s', Fejlkode %d)" - nla "Fout bij verwijderen database (kan rmdir '%-.64s' niet uitvoeren, Errcode: %d)" - eng "Error dropping database (can't rmdir '%-.64s', errno: %d)" - jps "ƒf[ƒ^ƒx[ƒX”jŠüƒGƒ‰[ ('%-.64s' ‚ð rmdir ‚Å‚«‚Ü‚¹‚ñ, errno: %d)", - est "Viga andmebaasi kustutamisel (ei suuda kustutada kataloogi '%-.64s', veakood: %d)" - fre "Erreur en effaçant la base (rmdir '%-.64s', erreur %d)" - ger "Fehler beim Löschen der Datenbank (Verzeichnis '%-.64s' kann nicht gelöscht werden, Fehler: %d)" - greek "ÐáñïõóéÜóôçêå ðñüâëçìá êáôÜ ôç äéáãñáöÞ ôçò âÜóçò äåäïìÝíùí (áäýíáôç ç äéáãñáöÞ ôïõ öáêÝëëïõ '%-.64s', êùäéêüò ëÜèïõò: %d)" - hun "Adatbazis megszuntetesi hiba ('%-.64s' nem szuntetheto meg, hibakod: %d)" - ita "Errore durante la cancellazione del database (impossibile rmdir '%-.64s', errno: %d)" - jpn "¥Ç¡¼¥¿¥Ù¡¼¥¹ÇË´þ¥¨¥é¡¼ ('%-.64s' ¤ò rmdir ¤Ç¤­¤Þ¤»¤ó, errno: %d)" - kor "µ¥ÀÌŸº£À̽º Á¦°Å ¿¡·¯(rmdir '%-.64s'¸¦ ÇÒ ¼ö ¾øÀ¾´Ï´Ù, ¿¡·¯¹øÈ£: %d)" - nor "Feil ved sletting av database (kan ikke slette katalogen '%-.64s', feil %d)" - norwegian-ny "Feil ved sletting av database (kan ikkje slette katalogen '%-.64s', feil %d)" - pol "B³?d podczas usuwania bazy danych (nie mo¿na wykonaæ rmdir '%-.64s', b³?d %d)" - por "Erro ao eliminar banco de dados (não pode remover diretório '%-.64s' - erro no. %d)" - rum "Eroare dropuind baza de date (nu pot sa rmdir '%-.64s', Eroare: %d)" - rus "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÂÁÚÕ ÄÁÎÎÙÈ (ÎÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ËÁÔÁÌÏÇ '%-.64s', ÏÛÉÂËÁ: %d)" - serbian "Ne mogu da izbrišem bazu (ne mogu da izbrišem direktorijum '%-.64s', errno: %d)" - slo "Chyba pri mazaní databázy (nemô¾em vymaza» adresár '%-.64s', chybový kód: %d)" - spa "Error eliminando la base de datos (No puedo borrar directorio '%-.64s', error %d)" - swe "Fel vid radering av databasen (Kan inte radera biblioteket '%-.64s'. Felkod: %d)" - ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ (îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÔÅËÕ '%-.64s', ÐÏÍÉÌËÁ: %d)" + cze "Chyba p-Bøi ru¹ení databáze (nemohu vymazat adresáø '%-.192s', chyba %d)" + dan "Fejl ved sletting af database (kan ikke slette folderen '%-.192s', Fejlkode %d)" + nla "Fout bij verwijderen database (kan rmdir '%-.192s' niet uitvoeren, Errcode: %d)" + eng "Error dropping database (can't rmdir '%-.192s', errno: %d)" + jps "ƒf[ƒ^ƒx[ƒX”jŠüƒGƒ‰[ ('%-.192s' ‚ð rmdir ‚Å‚«‚Ü‚¹‚ñ, errno: %d)", + est "Viga andmebaasi kustutamisel (ei suuda kustutada kataloogi '%-.192s', veakood: %d)" + fre "Erreur en effaçant la base (rmdir '%-.192s', erreur %d)" + ger "Fehler beim Löschen der Datenbank (Verzeichnis '%-.192s' kann nicht gelöscht werden, Fehler: %d)" + greek "ÐáñïõóéÜóôçêå ðñüâëçìá êáôÜ ôç äéáãñáöÞ ôçò âÜóçò äåäïìÝíùí (áäýíáôç ç äéáãñáöÞ ôïõ öáêÝëëïõ '%-.192s', êùäéêüò ëÜèïõò: %d)" + hun "Adatbazis megszuntetesi hiba ('%-.192s' nem szuntetheto meg, hibakod: %d)" + ita "Errore durante la cancellazione del database (impossibile rmdir '%-.192s', errno: %d)" + jpn "¥Ç¡¼¥¿¥Ù¡¼¥¹ÇË´þ¥¨¥é¡¼ ('%-.192s' ¤ò rmdir ¤Ç¤­¤Þ¤»¤ó, errno: %d)" + kor "µ¥ÀÌŸº£À̽º Á¦°Å ¿¡·¯(rmdir '%-.192s'¸¦ ÇÒ ¼ö ¾øÀ¾´Ï´Ù, ¿¡·¯¹øÈ£: %d)" + nor "Feil ved sletting av database (kan ikke slette katalogen '%-.192s', feil %d)" + norwegian-ny "Feil ved sletting av database (kan ikkje slette katalogen '%-.192s', feil %d)" + pol "B³?d podczas usuwania bazy danych (nie mo¿na wykonaæ rmdir '%-.192s', b³?d %d)" + por "Erro ao eliminar banco de dados (não pode remover diretório '%-.192s' - erro no. %d)" + rum "Eroare dropuind baza de date (nu pot sa rmdir '%-.192s', Eroare: %d)" + rus "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ÂÁÚÕ ÄÁÎÎÙÈ (ÎÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ ËÁÔÁÌÏÇ '%-.192s', ÏÛÉÂËÁ: %d)" + serbian "Ne mogu da izbrišem bazu (ne mogu da izbrišem direktorijum '%-.192s', errno: %d)" + slo "Chyba pri mazaní databázy (nemô¾em vymaza» adresár '%-.192s', chybový kód: %d)" + spa "Error eliminando la base de datos (No puedo borrar directorio '%-.192s', error %d)" + swe "Fel vid radering av databasen (Kan inte radera biblioteket '%-.192s'. Felkod: %d)" + ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÂÁÚÕ ÄÁÎÎÉÈ (îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ ÔÅËÕ '%-.192s', ÐÏÍÉÌËÁ: %d)" ER_CANT_DELETE_FILE - cze "Chyba p-Bøi výmazu '%-.64s' (chybový kód: %d)" - dan "Fejl ved sletning af '%-.64s' (Fejlkode: %d)" - nla "Fout bij het verwijderen van '%-.64s' (Errcode: %d)" - eng "Error on delete of '%-.64s' (errno: %d)" - jps "'%-.64s' ‚Ì휂ªƒGƒ‰[ (errno: %d)", - est "Viga '%-.64s' kustutamisel (veakood: %d)" - fre "Erreur en effaçant '%-.64s' (Errcode: %d)" - ger "Fehler beim Löschen von '%-.64s' (Fehler: %d)" - greek "ÐáñïõóéÜóôçêå ðñüâëçìá êáôÜ ôç äéáãñáöÞ '%-.64s' (êùäéêüò ëÜèïõò: %d)" - hun "Torlesi hiba: '%-.64s' (hibakod: %d)" - ita "Errore durante la cancellazione di '%-.64s' (errno: %d)" - jpn "'%-.64s' ¤Îºï½ü¤¬¥¨¥é¡¼ (errno: %d)" - kor "'%-.64s' »èÁ¦ Áß ¿¡·¯ (¿¡·¯¹øÈ£: %d)" - nor "Feil ved sletting av '%-.64s' (Feilkode: %d)" - norwegian-ny "Feil ved sletting av '%-.64s' (Feilkode: %d)" - pol "B³?d podczas usuwania '%-.64s' (Kod b³êdu: %d)" - por "Erro na remoção de '%-.64s' (erro no. %d)" - rum "Eroare incercind sa delete '%-.64s' (Eroare: %d)" - rus "ïÛÉÂËÁ ÐÒÉ ÕÄÁÌÅÎÉÉ '%-.64s' (ÏÛÉÂËÁ: %d)" - serbian "Greška pri brisanju '%-.64s' (errno: %d)" - slo "Chyba pri mazaní '%-.64s' (chybový kód: %d)" - spa "Error en el borrado de '%-.64s' (Error: %d)" - swe "Kan inte radera filen '%-.64s' (Felkod: %d)" - ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ '%-.64s' (ÐÏÍÉÌËÁ: %d)" + cze "Chyba p-Bøi výmazu '%-.192s' (chybový kód: %d)" + dan "Fejl ved sletning af '%-.192s' (Fejlkode: %d)" + nla "Fout bij het verwijderen van '%-.192s' (Errcode: %d)" + eng "Error on delete of '%-.192s' (errno: %d)" + jps "'%-.192s' ‚Ì휂ªƒGƒ‰[ (errno: %d)", + est "Viga '%-.192s' kustutamisel (veakood: %d)" + fre "Erreur en effaçant '%-.192s' (Errcode: %d)" + ger "Fehler beim Löschen von '%-.192s' (Fehler: %d)" + greek "ÐáñïõóéÜóôçêå ðñüâëçìá êáôÜ ôç äéáãñáöÞ '%-.192s' (êùäéêüò ëÜèïõò: %d)" + hun "Torlesi hiba: '%-.192s' (hibakod: %d)" + ita "Errore durante la cancellazione di '%-.192s' (errno: %d)" + jpn "'%-.192s' ¤Îºï½ü¤¬¥¨¥é¡¼ (errno: %d)" + kor "'%-.192s' »èÁ¦ Áß ¿¡·¯ (¿¡·¯¹øÈ£: %d)" + nor "Feil ved sletting av '%-.192s' (Feilkode: %d)" + norwegian-ny "Feil ved sletting av '%-.192s' (Feilkode: %d)" + pol "B³?d podczas usuwania '%-.192s' (Kod b³êdu: %d)" + por "Erro na remoção de '%-.192s' (erro no. %d)" + rum "Eroare incercind sa delete '%-.192s' (Eroare: %d)" + rus "ïÛÉÂËÁ ÐÒÉ ÕÄÁÌÅÎÉÉ '%-.192s' (ÏÛÉÂËÁ: %d)" + serbian "Greška pri brisanju '%-.192s' (errno: %d)" + slo "Chyba pri mazaní '%-.192s' (chybový kód: %d)" + spa "Error en el borrado de '%-.192s' (Error: %d)" + swe "Kan inte radera filen '%-.192s' (Felkod: %d)" + ukr "îÅ ÍÏÖÕ ×ÉÄÁÌÉÔÉ '%-.192s' (ÐÏÍÉÌËÁ: %d)" ER_CANT_FIND_SYSTEM_REC cze "Nemohu -Bèíst záznam v systémové tabulce" dan "Kan ikke læse posten i systemfolderen" @@ -400,78 +400,78 @@ ER_FILE_NOT_FOUND swe "Hittar inte filen '%-.200s' (Felkod: %d)" ukr "îÅ ÍÏÖÕ ÚÎÁÊÔÉ ÆÁÊÌ: '%-.200s' (ÐÏÍÉÌËÁ: %d)" ER_CANT_READ_DIR - cze "Nemohu -Bèíst adresáø '%-.64s' (chybový kód: %d)" - dan "Kan ikke læse folder '%-.64s' (Fejlkode: %d)" - nla "Kan de directory niet lezen van '%-.64s' (Errcode: %d)" - eng "Can't read dir of '%-.64s' (errno: %d)" - jps "'%-.64s' ƒfƒBƒŒƒNƒgƒŠ‚ª“ǂ߂܂¹‚ñ.(errno: %d)", - est "Ei suuda lugeda kataloogi '%-.64s' (veakood: %d)" - fre "Ne peut lire le répertoire de '%-.64s' (Errcode: %d)" - ger "Verzeichnis von '%-.64s' nicht lesbar (Fehler: %d)" - greek "Äåí åßíáé äõíáôü íá äéáâáóôåß ï öÜêåëëïò ôïõ '%-.64s' (êùäéêüò ëÜèïõò: %d)" - hun "A(z) '%-.64s' konyvtar nem olvashato. (hibakod: %d)" - ita "Impossibile leggere la directory di '%-.64s' (errno: %d)" - jpn "'%-.64s' ¥Ç¥£¥ì¥¯¥È¥ê¤¬ÆÉ¤á¤Þ¤»¤ó.(errno: %d)" - kor "'%-.64s'µð·ºÅ丮¸¦ ÀÐÁö ¸øÇß½À´Ï´Ù. (¿¡·¯¹øÈ£: %d)" - nor "Kan ikke lese katalogen '%-.64s' (Feilkode: %d)" - norwegian-ny "Kan ikkje lese katalogen '%-.64s' (Feilkode: %d)" - pol "Nie mo¿na odczytaæ katalogu '%-.64s' (Kod b³êdu: %d)" - por "Não pode ler o diretório de '%-.64s' (erro no. %d)" - rum "Nu pot sa citesc directorul '%-.64s' (Eroare: %d)" - rus "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ ËÁÔÁÌÏÇ '%-.64s' (ÏÛÉÂËÁ: %d)" - serbian "Ne mogu da proèitam direktorijum '%-.64s' (errno: %d)" - slo "Nemô¾em èíta» adresár '%-.64s' (chybový kód: %d)" - spa "No puedo leer el directorio de '%-.64s' (Error: %d)" - swe "Kan inte läsa från bibliotek '%-.64s' (Felkod: %d)" - ukr "îÅ ÍÏÖÕ ÐÒÏÞÉÔÁÔÉ ÔÅËÕ '%-.64s' (ÐÏÍÉÌËÁ: %d)" + cze "Nemohu -Bèíst adresáø '%-.192s' (chybový kód: %d)" + dan "Kan ikke læse folder '%-.192s' (Fejlkode: %d)" + nla "Kan de directory niet lezen van '%-.192s' (Errcode: %d)" + eng "Can't read dir of '%-.192s' (errno: %d)" + jps "'%-.192s' ƒfƒBƒŒƒNƒgƒŠ‚ª“ǂ߂܂¹‚ñ.(errno: %d)", + est "Ei suuda lugeda kataloogi '%-.192s' (veakood: %d)" + fre "Ne peut lire le répertoire de '%-.192s' (Errcode: %d)" + ger "Verzeichnis von '%-.192s' nicht lesbar (Fehler: %d)" + greek "Äåí åßíáé äõíáôü íá äéáâáóôåß ï öÜêåëëïò ôïõ '%-.192s' (êùäéêüò ëÜèïõò: %d)" + hun "A(z) '%-.192s' konyvtar nem olvashato. (hibakod: %d)" + ita "Impossibile leggere la directory di '%-.192s' (errno: %d)" + jpn "'%-.192s' ¥Ç¥£¥ì¥¯¥È¥ê¤¬ÆÉ¤á¤Þ¤»¤ó.(errno: %d)" + kor "'%-.192s'µð·ºÅ丮¸¦ ÀÐÁö ¸øÇß½À´Ï´Ù. (¿¡·¯¹øÈ£: %d)" + nor "Kan ikke lese katalogen '%-.192s' (Feilkode: %d)" + norwegian-ny "Kan ikkje lese katalogen '%-.192s' (Feilkode: %d)" + pol "Nie mo¿na odczytaæ katalogu '%-.192s' (Kod b³êdu: %d)" + por "Não pode ler o diretório de '%-.192s' (erro no. %d)" + rum "Nu pot sa citesc directorul '%-.192s' (Eroare: %d)" + rus "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÞÉÔÁÔØ ËÁÔÁÌÏÇ '%-.192s' (ÏÛÉÂËÁ: %d)" + serbian "Ne mogu da proèitam direktorijum '%-.192s' (errno: %d)" + slo "Nemô¾em èíta» adresár '%-.192s' (chybový kód: %d)" + spa "No puedo leer el directorio de '%-.192s' (Error: %d)" + swe "Kan inte läsa från bibliotek '%-.192s' (Felkod: %d)" + ukr "îÅ ÍÏÖÕ ÐÒÏÞÉÔÁÔÉ ÔÅËÕ '%-.192s' (ÐÏÍÉÌËÁ: %d)" ER_CANT_SET_WD - cze "Nemohu zm-Bìnit adresáø na '%-.64s' (chybový kód: %d)" - dan "Kan ikke skifte folder til '%-.64s' (Fejlkode: %d)" - nla "Kan de directory niet veranderen naar '%-.64s' (Errcode: %d)" - eng "Can't change dir to '%-.64s' (errno: %d)" - jps "'%-.64s' ƒfƒBƒŒƒNƒgƒŠ‚É chdir ‚Å‚«‚Ü‚¹‚ñ.(errno: %d)", - est "Ei suuda siseneda kataloogi '%-.64s' (veakood: %d)" - fre "Ne peut changer le répertoire pour '%-.64s' (Errcode: %d)" - ger "Kann nicht in das Verzeichnis '%-.64s' wechseln (Fehler: %d)" - greek "Áäýíáôç ç áëëáãÞ ôïõ ôñÝ÷ïíôïò êáôáëüãïõ óå '%-.64s' (êùäéêüò ëÜèïõò: %d)" - hun "Konyvtarvaltas nem lehetseges a(z) '%-.64s'-ba. (hibakod: %d)" - ita "Impossibile cambiare la directory in '%-.64s' (errno: %d)" - jpn "'%-.64s' ¥Ç¥£¥ì¥¯¥È¥ê¤Ë chdir ¤Ç¤­¤Þ¤»¤ó.(errno: %d)" - kor "'%-.64s'µð·ºÅ丮·Î À̵¿ÇÒ ¼ö ¾ø¾ú½À´Ï´Ù. (¿¡·¯¹øÈ£: %d)" - nor "Kan ikke skifte katalog til '%-.64s' (Feilkode: %d)" - norwegian-ny "Kan ikkje skifte katalog til '%-.64s' (Feilkode: %d)" - pol "Nie mo¿na zmieniæ katalogu na '%-.64s' (Kod b³êdu: %d)" - por "Não pode mudar para o diretório '%-.64s' (erro no. %d)" - rum "Nu pot sa schimb directorul '%-.64s' (Eroare: %d)" - rus "îÅ×ÏÚÍÏÖÎÏ ÐÅÒÅÊÔÉ × ËÁÔÁÌÏÇ '%-.64s' (ÏÛÉÂËÁ: %d)" - serbian "Ne mogu da promenim direktorijum na '%-.64s' (errno: %d)" - slo "Nemô¾em vojs» do adresára '%-.64s' (chybový kód: %d)" - spa "No puedo cambiar al directorio de '%-.64s' (Error: %d)" - swe "Kan inte byta till '%-.64s' (Felkod: %d)" - ukr "îÅ ÍÏÖÕ ÐÅÒÅÊÔÉ Õ ÔÅËÕ '%-.64s' (ÐÏÍÉÌËÁ: %d)" + cze "Nemohu zm-Bìnit adresáø na '%-.192s' (chybový kód: %d)" + dan "Kan ikke skifte folder til '%-.192s' (Fejlkode: %d)" + nla "Kan de directory niet veranderen naar '%-.192s' (Errcode: %d)" + eng "Can't change dir to '%-.192s' (errno: %d)" + jps "'%-.192s' ƒfƒBƒŒƒNƒgƒŠ‚É chdir ‚Å‚«‚Ü‚¹‚ñ.(errno: %d)", + est "Ei suuda siseneda kataloogi '%-.192s' (veakood: %d)" + fre "Ne peut changer le répertoire pour '%-.192s' (Errcode: %d)" + ger "Kann nicht in das Verzeichnis '%-.192s' wechseln (Fehler: %d)" + greek "Áäýíáôç ç áëëáãÞ ôïõ ôñÝ÷ïíôïò êáôáëüãïõ óå '%-.192s' (êùäéêüò ëÜèïõò: %d)" + hun "Konyvtarvaltas nem lehetseges a(z) '%-.192s'-ba. (hibakod: %d)" + ita "Impossibile cambiare la directory in '%-.192s' (errno: %d)" + jpn "'%-.192s' ¥Ç¥£¥ì¥¯¥È¥ê¤Ë chdir ¤Ç¤­¤Þ¤»¤ó.(errno: %d)" + kor "'%-.192s'µð·ºÅ丮·Î À̵¿ÇÒ ¼ö ¾ø¾ú½À´Ï´Ù. (¿¡·¯¹øÈ£: %d)" + nor "Kan ikke skifte katalog til '%-.192s' (Feilkode: %d)" + norwegian-ny "Kan ikkje skifte katalog til '%-.192s' (Feilkode: %d)" + pol "Nie mo¿na zmieniæ katalogu na '%-.192s' (Kod b³êdu: %d)" + por "Não pode mudar para o diretório '%-.192s' (erro no. %d)" + rum "Nu pot sa schimb directorul '%-.192s' (Eroare: %d)" + rus "îÅ×ÏÚÍÏÖÎÏ ÐÅÒÅÊÔÉ × ËÁÔÁÌÏÇ '%-.192s' (ÏÛÉÂËÁ: %d)" + serbian "Ne mogu da promenim direktorijum na '%-.192s' (errno: %d)" + slo "Nemô¾em vojs» do adresára '%-.192s' (chybový kód: %d)" + spa "No puedo cambiar al directorio de '%-.192s' (Error: %d)" + swe "Kan inte byta till '%-.192s' (Felkod: %d)" + ukr "îÅ ÍÏÖÕ ÐÅÒÅÊÔÉ Õ ÔÅËÕ '%-.192s' (ÐÏÍÉÌËÁ: %d)" ER_CHECKREAD - cze "Z-Báznam byl zmìnìn od posledního ètení v tabulce '%-.64s'" - dan "Posten er ændret siden sidste læsning '%-.64s'" - nla "Record is veranderd sinds de laatste lees activiteit in de tabel '%-.64s'" - eng "Record has changed since last read in table '%-.64s'" - est "Kirje tabelis '%-.64s' on muutunud viimasest lugemisest saadik" - fre "Enregistrement modifié depuis sa dernière lecture dans la table '%-.64s'" - ger "Datensatz hat sich seit dem letzten Zugriff auf Tabelle '%-.64s' geändert" - greek "Ç åããñáöÞ Ý÷åé áëëÜîåé áðü ôçí ôåëåõôáßá öïñÜ ðïõ áíáóýñèçêå áðü ôïí ðßíáêá '%-.64s'" - hun "A(z) '%-.64s' tablaban talalhato rekord megvaltozott az utolso olvasas ota" - ita "Il record e` cambiato dall'ultima lettura della tabella '%-.64s'" - kor "Å×À̺í '%-.64s'¿¡¼­ ¸¶Áö¸·À¸·Î ÀÐÀº ÈÄ Record°¡ º¯°æµÇ¾ú½À´Ï´Ù." - nor "Posten har blitt endret siden den ble lest '%-.64s'" - norwegian-ny "Posten har vorte endra sidan den sist vart lesen '%-.64s'" - pol "Rekord zosta³ zmieniony od ostaniego odczytania z tabeli '%-.64s'" - por "Registro alterado desde a última leitura da tabela '%-.64s'" - rum "Cimpul a fost schimbat de la ultima citire a tabelei '%-.64s'" - rus "úÁÐÉÓØ ÉÚÍÅÎÉÌÁÓØ Ó ÍÏÍÅÎÔÁ ÐÏÓÌÅÄÎÅÊ ×ÙÂÏÒËÉ × ÔÁÂÌÉÃÅ '%-.64s'" - serbian "Slog je promenjen od zadnjeg èitanja tabele '%-.64s'" - slo "Záznam bol zmenený od posledného èítania v tabuµke '%-.64s'" - spa "El registro ha cambiado desde la ultima lectura de la tabla '%-.64s'" - swe "Posten har förändrats sedan den lästes i register '%-.64s'" - ukr "úÁÐÉÓ ÂÕÌÏ ÚͦÎÅÎÏ Ú ÞÁÓÕ ÏÓÔÁÎÎØÏÇÏ ÞÉÔÁÎÎÑ Ú ÔÁÂÌÉæ '%-.64s'" + cze "Z-Báznam byl zmìnìn od posledního ètení v tabulce '%-.192s'" + dan "Posten er ændret siden sidste læsning '%-.192s'" + nla "Record is veranderd sinds de laatste lees activiteit in de tabel '%-.192s'" + eng "Record has changed since last read in table '%-.192s'" + est "Kirje tabelis '%-.192s' on muutunud viimasest lugemisest saadik" + fre "Enregistrement modifié depuis sa dernière lecture dans la table '%-.192s'" + ger "Datensatz hat sich seit dem letzten Zugriff auf Tabelle '%-.192s' geändert" + greek "Ç åããñáöÞ Ý÷åé áëëÜîåé áðü ôçí ôåëåõôáßá öïñÜ ðïõ áíáóýñèçêå áðü ôïí ðßíáêá '%-.192s'" + hun "A(z) '%-.192s' tablaban talalhato rekord megvaltozott az utolso olvasas ota" + ita "Il record e` cambiato dall'ultima lettura della tabella '%-.192s'" + kor "Å×À̺í '%-.192s'¿¡¼­ ¸¶Áö¸·À¸·Î ÀÐÀº ÈÄ Record°¡ º¯°æµÇ¾ú½À´Ï´Ù." + nor "Posten har blitt endret siden den ble lest '%-.192s'" + norwegian-ny "Posten har vorte endra sidan den sist vart lesen '%-.192s'" + pol "Rekord zosta³ zmieniony od ostaniego odczytania z tabeli '%-.192s'" + por "Registro alterado desde a última leitura da tabela '%-.192s'" + rum "Cimpul a fost schimbat de la ultima citire a tabelei '%-.192s'" + rus "úÁÐÉÓØ ÉÚÍÅÎÉÌÁÓØ Ó ÍÏÍÅÎÔÁ ÐÏÓÌÅÄÎÅÊ ×ÙÂÏÒËÉ × ÔÁÂÌÉÃÅ '%-.192s'" + serbian "Slog je promenjen od zadnjeg èitanja tabele '%-.192s'" + slo "Záznam bol zmenený od posledného èítania v tabuµke '%-.192s'" + spa "El registro ha cambiado desde la ultima lectura de la tabla '%-.192s'" + swe "Posten har förändrats sedan den lästes i register '%-.192s'" + ukr "úÁÐÉÓ ÂÕÌÏ ÚͦÎÅÎÏ Ú ÞÁÓÕ ÏÓÔÁÎÎØÏÇÏ ÞÉÔÁÎÎÑ Ú ÔÁÂÌÉæ '%-.192s'" ER_DISK_FULL cze "Disk je pln-Bý (%s), èekám na uvolnìní nìjakého místa ..." dan "Ikke mere diskplads (%s). Venter på at få frigjort plads..." @@ -498,53 +498,53 @@ ER_DISK_FULL swe "Disken är full (%s). Väntar tills det finns ledigt utrymme..." ukr "äÉÓË ÚÁÐÏ×ÎÅÎÉÊ (%s). ÷ÉÞÉËÕÀ, ÄÏËÉ Ú×¦ÌØÎÉÔØÓÑ ÔÒÏÈÉ Í¦ÓÃÑ..." ER_DUP_KEY 23000 - cze "Nemohu zapsat, zdvojen-Bý klíè v tabulce '%-.64s'" - dan "Kan ikke skrive, flere ens nøgler i tabellen '%-.64s'" - nla "Kan niet schrijven, dubbele zoeksleutel in tabel '%-.64s'" - eng "Can't write; duplicate key in table '%-.64s'" - jps "table '%-.64s' ‚É key ‚ªd•¡‚µ‚Ä‚¢‚Ä‘‚«‚±‚߂܂¹‚ñ", - est "Ei saa kirjutada, korduv võti tabelis '%-.64s'" - fre "Ecriture impossible, doublon dans une clé de la table '%-.64s'" - ger "Kann nicht speichern, Grund: doppelter Schlüssel in Tabelle '%-.64s'" - greek "Äåí åßíáé äõíáôÞ ç êáôá÷þñçóç, ç ôéìÞ õðÜñ÷åé Þäç óôïí ðßíáêá '%-.64s'" - hun "Irasi hiba, duplikalt kulcs a '%-.64s' tablaban." - ita "Scrittura impossibile: chiave duplicata nella tabella '%-.64s'" - jpn "table '%-.64s' ¤Ë key ¤¬½ÅÊ£¤·¤Æ¤¤¤Æ½ñ¤­¤³¤á¤Þ¤»¤ó" - kor "±â·ÏÇÒ ¼ö ¾øÀ¾´Ï´Ù., Å×À̺í '%-.64s'¿¡¼­ Áߺ¹ Ű" - nor "Kan ikke skrive, flere like nøkler i tabellen '%-.64s'" - norwegian-ny "Kan ikkje skrive, flere like nyklar i tabellen '%-.64s'" - pol "Nie mo¿na zapisaæ, powtórzone klucze w tabeli '%-.64s'" - por "Não pode gravar. Chave duplicada na tabela '%-.64s'" - rum "Nu pot sa scriu (can't write), cheie duplicata in tabela '%-.64s'" - rus "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÉÚ×ÅÓÔÉ ÚÁÐÉÓØ, ÄÕÂÌÉÒÕÀÝÉÊÓÑ ËÌÀÞ × ÔÁÂÌÉÃÅ '%-.64s'" - serbian "Ne mogu da pišem pošto postoji duplirani kljuè u tabeli '%-.64s'" - slo "Nemô¾em zapísa», duplikát kµúèa v tabuµke '%-.64s'" - spa "No puedo escribir, clave duplicada en la tabla '%-.64s'" - swe "Kan inte skriva, dubbel söknyckel i register '%-.64s'" - ukr "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ, ÄÕÂÌÀÀÞÉÊÓÑ ËÌÀÞ × ÔÁÂÌÉæ '%-.64s'" + cze "Nemohu zapsat, zdvojen-Bý klíè v tabulce '%-.192s'" + dan "Kan ikke skrive, flere ens nøgler i tabellen '%-.192s'" + nla "Kan niet schrijven, dubbele zoeksleutel in tabel '%-.192s'" + eng "Can't write; duplicate key in table '%-.192s'" + jps "table '%-.192s' ‚É key ‚ªd•¡‚µ‚Ä‚¢‚Ä‘‚«‚±‚߂܂¹‚ñ", + est "Ei saa kirjutada, korduv võti tabelis '%-.192s'" + fre "Ecriture impossible, doublon dans une clé de la table '%-.192s'" + ger "Kann nicht speichern, Grund: doppelter Schlüssel in Tabelle '%-.192s'" + greek "Äåí åßíáé äõíáôÞ ç êáôá÷þñçóç, ç ôéìÞ õðÜñ÷åé Þäç óôïí ðßíáêá '%-.192s'" + hun "Irasi hiba, duplikalt kulcs a '%-.192s' tablaban." + ita "Scrittura impossibile: chiave duplicata nella tabella '%-.192s'" + jpn "table '%-.192s' ¤Ë key ¤¬½ÅÊ£¤·¤Æ¤¤¤Æ½ñ¤­¤³¤á¤Þ¤»¤ó" + kor "±â·ÏÇÒ ¼ö ¾øÀ¾´Ï´Ù., Å×À̺í '%-.192s'¿¡¼­ Áߺ¹ Ű" + nor "Kan ikke skrive, flere like nøkler i tabellen '%-.192s'" + norwegian-ny "Kan ikkje skrive, flere like nyklar i tabellen '%-.192s'" + pol "Nie mo¿na zapisaæ, powtórzone klucze w tabeli '%-.192s'" + por "Não pode gravar. Chave duplicada na tabela '%-.192s'" + rum "Nu pot sa scriu (can't write), cheie duplicata in tabela '%-.192s'" + rus "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÉÚ×ÅÓÔÉ ÚÁÐÉÓØ, ÄÕÂÌÉÒÕÀÝÉÊÓÑ ËÌÀÞ × ÔÁÂÌÉÃÅ '%-.192s'" + serbian "Ne mogu da pišem pošto postoji duplirani kljuè u tabeli '%-.192s'" + slo "Nemô¾em zapísa», duplikát kµúèa v tabuµke '%-.192s'" + spa "No puedo escribir, clave duplicada en la tabla '%-.192s'" + swe "Kan inte skriva, dubbel söknyckel i register '%-.192s'" + ukr "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ, ÄÕÂÌÀÀÞÉÊÓÑ ËÌÀÞ × ÔÁÂÌÉæ '%-.192s'" ER_ERROR_ON_CLOSE - cze "Chyba p-Bøi zavírání '%-.64s' (chybový kód: %d)" - dan "Fejl ved lukning af '%-.64s' (Fejlkode: %d)" - nla "Fout bij het sluiten van '%-.64s' (Errcode: %d)" - eng "Error on close of '%-.64s' (errno: %d)" - est "Viga faili '%-.64s' sulgemisel (veakood: %d)" - fre "Erreur a la fermeture de '%-.64s' (Errcode: %d)" - ger "Fehler beim Schließen von '%-.64s' (Fehler: %d)" - greek "ÐáñïõóéÜóôçêå ðñüâëçìá êëåßíïíôáò ôï '%-.64s' (êùäéêüò ëÜèïõò: %d)" - hun "Hiba a(z) '%-.64s' zarasakor. (hibakod: %d)" - ita "Errore durante la chiusura di '%-.64s' (errno: %d)" - kor "'%-.64s'´Ý´Â Áß ¿¡·¯ (¿¡·¯¹øÈ£: %d)" - nor "Feil ved lukking av '%-.64s' (Feilkode: %d)" - norwegian-ny "Feil ved lukking av '%-.64s' (Feilkode: %d)" - pol "B³?d podczas zamykania '%-.64s' (Kod b³êdu: %d)" - por "Erro ao fechar '%-.64s' (erro no. %d)" - rum "Eroare inchizind '%-.64s' (errno: %d)" - rus "ïÛÉÂËÁ ÐÒÉ ÚÁËÒÙÔÉÉ '%-.64s' (ÏÛÉÂËÁ: %d)" - serbian "Greška pri zatvaranju '%-.64s' (errno: %d)" - slo "Chyba pri zatváraní '%-.64s' (chybový kód: %d)" - spa "Error en el cierre de '%-.64s' (Error: %d)" - swe "Fick fel vid stängning av '%-.64s' (Felkod: %d)" - ukr "îÅ ÍÏÖÕ ÚÁËÒÉÔÉ '%-.64s' (ÐÏÍÉÌËÁ: %d)" + cze "Chyba p-Bøi zavírání '%-.192s' (chybový kód: %d)" + dan "Fejl ved lukning af '%-.192s' (Fejlkode: %d)" + nla "Fout bij het sluiten van '%-.192s' (Errcode: %d)" + eng "Error on close of '%-.192s' (errno: %d)" + est "Viga faili '%-.192s' sulgemisel (veakood: %d)" + fre "Erreur a la fermeture de '%-.192s' (Errcode: %d)" + ger "Fehler beim Schließen von '%-.192s' (Fehler: %d)" + greek "ÐáñïõóéÜóôçêå ðñüâëçìá êëåßíïíôáò ôï '%-.192s' (êùäéêüò ëÜèïõò: %d)" + hun "Hiba a(z) '%-.192s' zarasakor. (hibakod: %d)" + ita "Errore durante la chiusura di '%-.192s' (errno: %d)" + kor "'%-.192s'´Ý´Â Áß ¿¡·¯ (¿¡·¯¹øÈ£: %d)" + nor "Feil ved lukking av '%-.192s' (Feilkode: %d)" + norwegian-ny "Feil ved lukking av '%-.192s' (Feilkode: %d)" + pol "B³?d podczas zamykania '%-.192s' (Kod b³êdu: %d)" + por "Erro ao fechar '%-.192s' (erro no. %d)" + rum "Eroare inchizind '%-.192s' (errno: %d)" + rus "ïÛÉÂËÁ ÐÒÉ ÚÁËÒÙÔÉÉ '%-.192s' (ÏÛÉÂËÁ: %d)" + serbian "Greška pri zatvaranju '%-.192s' (errno: %d)" + slo "Chyba pri zatváraní '%-.192s' (chybový kód: %d)" + spa "Error en el cierre de '%-.192s' (Error: %d)" + swe "Fick fel vid stängning av '%-.192s' (Felkod: %d)" + ukr "îÅ ÍÏÖÕ ÚÁËÒÉÔÉ '%-.192s' (ÐÏÍÉÌËÁ: %d)" ER_ERROR_ON_READ cze "Chyba p-Bøi ètení souboru '%-.200s' (chybový kód: %d)" dan "Fejl ved læsning af '%-.200s' (Fejlkode: %d)" @@ -621,30 +621,30 @@ ER_ERROR_ON_WRITE swe "Fick fel vid skrivning till '%-.200s' (Felkod %d)" ukr "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ ÆÁÊÌ '%-.200s' (ÐÏÍÉÌËÁ: %d)" ER_FILE_USED - cze "'%-.64s' je zam-Bèen proti zmìnám" - dan "'%-.64s' er låst mod opdateringer" - nla "'%-.64s' is geblokeerd tegen veranderingen" - eng "'%-.64s' is locked against change" - jps "'%-.64s' ‚̓ƒbƒN‚³‚ê‚Ä‚¢‚Ü‚·", - est "'%-.64s' on lukustatud muudatuste vastu" - fre "'%-.64s' est verrouillé contre les modifications" - ger "'%-.64s' ist für Änderungen gesperrt" - greek "'%-.64s' äåí åðéôñÝðïíôáé áëëáãÝò" - hun "'%-.64s' a valtoztatas ellen zarolva" - ita "'%-.64s' e` soggetto a lock contro i cambiamenti" - jpn "'%-.64s' ¤Ï¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤Þ¤¹" - kor "'%-.64s'°¡ º¯°æÇÒ ¼ö ¾øµµ·Ï Àá°ÜÀÖÀ¾´Ï´Ù." - nor "'%-.64s' er låst mot oppdateringer" - norwegian-ny "'%-.64s' er låst mot oppdateringar" - pol "'%-.64s' jest zablokowany na wypadek zmian" - por "'%-.64s' está com travamento contra alterações" - rum "'%-.64s' este blocat pentry schimbari (loccked against change)" - rus "'%-.64s' ÚÁÂÌÏËÉÒÏ×ÁÎ ÄÌÑ ÉÚÍÅÎÅÎÉÊ" - serbian "'%-.64s' je zakljuèan za upis" - slo "'%-.64s' je zamknutý proti zmenám" - spa "'%-.64s' esta bloqueado contra cambios" - swe "'%-.64s' är låst mot användning" - ukr "'%-.64s' ÚÁÂÌÏËÏ×ÁÎÉÊ ÎÁ ×ÎÅÓÅÎÎÑ ÚͦÎ" + cze "'%-.192s' je zam-Bèen proti zmìnám" + dan "'%-.192s' er låst mod opdateringer" + nla "'%-.192s' is geblokeerd tegen veranderingen" + eng "'%-.192s' is locked against change" + jps "'%-.192s' ‚̓ƒbƒN‚³‚ê‚Ä‚¢‚Ü‚·", + est "'%-.192s' on lukustatud muudatuste vastu" + fre "'%-.192s' est verrouillé contre les modifications" + ger "'%-.192s' ist für Änderungen gesperrt" + greek "'%-.192s' äåí åðéôñÝðïíôáé áëëáãÝò" + hun "'%-.192s' a valtoztatas ellen zarolva" + ita "'%-.192s' e` soggetto a lock contro i cambiamenti" + jpn "'%-.192s' ¤Ï¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤Þ¤¹" + kor "'%-.192s'°¡ º¯°æÇÒ ¼ö ¾øµµ·Ï Àá°ÜÀÖÀ¾´Ï´Ù." + nor "'%-.192s' er låst mot oppdateringer" + norwegian-ny "'%-.192s' er låst mot oppdateringar" + pol "'%-.192s' jest zablokowany na wypadek zmian" + por "'%-.192s' está com travamento contra alterações" + rum "'%-.192s' este blocat pentry schimbari (loccked against change)" + rus "'%-.192s' ÚÁÂÌÏËÉÒÏ×ÁÎ ÄÌÑ ÉÚÍÅÎÅÎÉÊ" + serbian "'%-.192s' je zakljuèan za upis" + slo "'%-.192s' je zamknutý proti zmenám" + spa "'%-.192s' esta bloqueado contra cambios" + swe "'%-.192s' är låst mot användning" + ukr "'%-.192s' ÚÁÂÌÏËÏ×ÁÎÉÊ ÎÁ ×ÎÅÓÅÎÎÑ ÚͦÎ" ER_FILSORT_ABORT cze "T-Bøídìní pøeru¹eno" dan "Sortering afbrudt" @@ -671,30 +671,30 @@ ER_FILSORT_ABORT swe "Sorteringen avbruten" ukr "óÏÒÔÕ×ÁÎÎÑ ÐÅÒÅÒ×ÁÎÏ" ER_FORM_NOT_FOUND - cze "Pohled '%-.64s' pro '%-.64s' neexistuje" - dan "View '%-.64s' eksisterer ikke for '%-.64s'" - nla "View '%-.64s' bestaat niet voor '%-.64s'" - eng "View '%-.64s' doesn't exist for '%-.64s'" - jps "View '%-.64s' ‚ª '%-.64s' ‚É’è‹`‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", - est "Vaade '%-.64s' ei eksisteeri '%-.64s' jaoks" - fre "La vue (View) '%-.64s' n'existe pas pour '%-.64s'" - ger "View '%-.64s' existiert für '%-.64s' nicht" - greek "Ôï View '%-.64s' äåí õðÜñ÷åé ãéá '%-.64s'" - hun "A(z) '%-.64s' nezet nem letezik a(z) '%-.64s'-hoz" - ita "La view '%-.64s' non esiste per '%-.64s'" - jpn "View '%-.64s' ¤¬ '%-.64s' ¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" - kor "ºä '%-.64s'°¡ '%-.64s'¿¡¼­´Â Á¸ÀçÇÏÁö ¾ÊÀ¾´Ï´Ù." - nor "View '%-.64s' eksisterer ikke for '%-.64s'" - norwegian-ny "View '%-.64s' eksisterar ikkje for '%-.64s'" - pol "Widok '%-.64s' nie istnieje dla '%-.64s'" - por "Visão '%-.64s' não existe para '%-.64s'" - rum "View '%-.64s' nu exista pentru '%-.64s'" - rus "ðÒÅÄÓÔÁ×ÌÅÎÉÅ '%-.64s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ ÄÌÑ '%-.64s'" - serbian "View '%-.64s' ne postoji za '%-.64s'" - slo "Pohµad '%-.64s' neexistuje pre '%-.64s'" - spa "La vista '%-.64s' no existe para '%-.64s'" - swe "Formulär '%-.64s' finns inte i '%-.64s'" - ukr "÷ÉÇÌÑÄ '%-.64s' ÎÅ ¦ÓÎÕ¤ ÄÌÑ '%-.64s'" + cze "Pohled '%-.192s' pro '%-.192s' neexistuje" + dan "View '%-.192s' eksisterer ikke for '%-.192s'" + nla "View '%-.192s' bestaat niet voor '%-.192s'" + eng "View '%-.192s' doesn't exist for '%-.192s'" + jps "View '%-.192s' ‚ª '%-.192s' ‚É’è‹`‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", + est "Vaade '%-.192s' ei eksisteeri '%-.192s' jaoks" + fre "La vue (View) '%-.192s' n'existe pas pour '%-.192s'" + ger "View '%-.192s' existiert für '%-.192s' nicht" + greek "Ôï View '%-.192s' äåí õðÜñ÷åé ãéá '%-.192s'" + hun "A(z) '%-.192s' nezet nem letezik a(z) '%-.192s'-hoz" + ita "La view '%-.192s' non esiste per '%-.192s'" + jpn "View '%-.192s' ¤¬ '%-.192s' ¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" + kor "ºä '%-.192s'°¡ '%-.192s'¿¡¼­´Â Á¸ÀçÇÏÁö ¾ÊÀ¾´Ï´Ù." + nor "View '%-.192s' eksisterer ikke for '%-.192s'" + norwegian-ny "View '%-.192s' eksisterar ikkje for '%-.192s'" + pol "Widok '%-.192s' nie istnieje dla '%-.192s'" + por "Visão '%-.192s' não existe para '%-.192s'" + rum "View '%-.192s' nu exista pentru '%-.192s'" + rus "ðÒÅÄÓÔÁ×ÌÅÎÉÅ '%-.192s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ ÄÌÑ '%-.192s'" + serbian "View '%-.192s' ne postoji za '%-.192s'" + slo "Pohµad '%-.192s' neexistuje pre '%-.192s'" + spa "La vista '%-.192s' no existe para '%-.192s'" + swe "Formulär '%-.192s' finns inte i '%-.192s'" + ukr "÷ÉÇÌÑÄ '%-.192s' ÎÅ ¦ÓÎÕ¤ ÄÌÑ '%-.192s'" ER_GET_ERRNO cze "Obsluha tabulky vr-Bátila chybu %d" dan "Modtog fejl %d fra tabel håndteringen" @@ -720,54 +720,54 @@ ER_GET_ERRNO swe "Fick felkod %d från databashanteraren" ukr "ïÔÒÉÍÁÎÏ ÐÏÍÉÌËÕ %d ×¦Ä ÄÅÓËÒÉÐÔÏÒÁ ÔÁÂÌÉæ" ER_ILLEGAL_HA - cze "Obsluha tabulky '%-.64s' nem-Bá tento parametr" - dan "Denne mulighed eksisterer ikke for tabeltypen '%-.64s'" - nla "Tabel handler voor '%-.64s' heeft deze optie niet" - eng "Table storage engine for '%-.64s' doesn't have this option" - est "Tabeli '%-.64s' handler ei toeta antud operatsiooni" - fre "Le handler de la table '%-.64s' n'a pas cette option" - ger "Diese Option gibt es nicht (Speicher-Engine für '%-.64s')" - greek "Ï ÷åéñéóôÞò ðßíáêá (table handler) ãéá '%-.64s' äåí äéáèÝôåé áõôÞ ôçí åðéëïãÞ" - hun "A(z) '%-.64s' tablakezelonek nincs ilyen opcioja" - ita "Il gestore delle tabelle per '%-.64s' non ha questa opzione" - jpn "Table handler for '%-.64s' doesn't have this option" - kor "'%-.64s'ÀÇ Å×À̺í handler´Â ÀÌ·¯ÇÑ ¿É¼ÇÀ» Á¦°øÇÏÁö ¾ÊÀ¾´Ï´Ù." - nor "Tabell håndtereren for '%-.64s' har ikke denne muligheten" - norwegian-ny "Tabell håndteraren for '%-.64s' har ikkje denne moglegheita" - pol "Obs³uga tabeli '%-.64s' nie posiada tej opcji" - por "Manipulador de tabela para '%-.64s' não tem esta opção" - rum "Handlerul tabelei pentru '%-.64s' nu are aceasta optiune" - rus "ïÂÒÁÂÏÔÞÉË ÔÁÂÌÉÃÙ '%-.64s' ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÜÔÕ ×ÏÚÍÏÖÎÏÓÔØ" - serbian "Handler tabela za '%-.64s' nema ovu opciju" - slo "Obsluha tabuµky '%-.64s' nemá tento parameter" - spa "El manejador de la tabla de '%-.64s' no tiene esta opcion" - swe "Tabellhanteraren for tabell '%-.64s' stödjer ej detta" - ukr "äÅÓËÒÉÐÔÏÒ ÔÁÂÌÉæ '%-.64s' ÎÅ ÍÁ¤ 椧 ×ÌÁÓÔÉ×ÏÓÔ¦" + cze "Obsluha tabulky '%-.192s' nem-Bá tento parametr" + dan "Denne mulighed eksisterer ikke for tabeltypen '%-.192s'" + nla "Tabel handler voor '%-.192s' heeft deze optie niet" + eng "Table storage engine for '%-.192s' doesn't have this option" + est "Tabeli '%-.192s' handler ei toeta antud operatsiooni" + fre "Le handler de la table '%-.192s' n'a pas cette option" + ger "Diese Option gibt es nicht (Speicher-Engine für '%-.192s')" + greek "Ï ÷åéñéóôÞò ðßíáêá (table handler) ãéá '%-.192s' äåí äéáèÝôåé áõôÞ ôçí åðéëïãÞ" + hun "A(z) '%-.192s' tablakezelonek nincs ilyen opcioja" + ita "Il gestore delle tabelle per '%-.192s' non ha questa opzione" + jpn "Table handler for '%-.192s' doesn't have this option" + kor "'%-.192s'ÀÇ Å×À̺í handler´Â ÀÌ·¯ÇÑ ¿É¼ÇÀ» Á¦°øÇÏÁö ¾ÊÀ¾´Ï´Ù." + nor "Tabell håndtereren for '%-.192s' har ikke denne muligheten" + norwegian-ny "Tabell håndteraren for '%-.192s' har ikkje denne moglegheita" + pol "Obs³uga tabeli '%-.192s' nie posiada tej opcji" + por "Manipulador de tabela para '%-.192s' não tem esta opção" + rum "Handlerul tabelei pentru '%-.192s' nu are aceasta optiune" + rus "ïÂÒÁÂÏÔÞÉË ÔÁÂÌÉÃÙ '%-.192s' ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÜÔÕ ×ÏÚÍÏÖÎÏÓÔØ" + serbian "Handler tabela za '%-.192s' nema ovu opciju" + slo "Obsluha tabuµky '%-.192s' nemá tento parameter" + spa "El manejador de la tabla de '%-.192s' no tiene esta opcion" + swe "Tabellhanteraren for tabell '%-.192s' stödjer ej detta" + ukr "äÅÓËÒÉÐÔÏÒ ÔÁÂÌÉæ '%-.192s' ÎÅ ÍÁ¤ 椧 ×ÌÁÓÔÉ×ÏÓÔ¦" ER_KEY_NOT_FOUND - cze "Nemohu naj-Bít záznam v '%-.64s'" - dan "Kan ikke finde posten i '%-.64s'" - nla "Kan record niet vinden in '%-.64s'" - eng "Can't find record in '%-.64s'" - jps "'%-.64s'‚̂Ȃ©‚ɃŒƒR[ƒh‚ªŒ©•t‚©‚è‚Ü‚¹‚ñ", - est "Ei suuda leida kirjet '%-.64s'-s" - fre "Ne peut trouver l'enregistrement dans '%-.64s'" - ger "Kann Datensatz in '%-.64s' nicht finden" - greek "Áäýíáôç ç áíåýñåóç åããñáöÞò óôï '%-.64s'" - hun "Nem talalhato a rekord '%-.64s'-ben" - ita "Impossibile trovare il record in '%-.64s'" - jpn "'%-.64s'¤Î¤Ê¤«¤Ë¥ì¥³¡¼¥É¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó" - kor "'%-.64s'¿¡¼­ ·¹Äڵ带 ãÀ» ¼ö ¾øÀ¾´Ï´Ù." - nor "Kan ikke finne posten i '%-.64s'" - norwegian-ny "Kan ikkje finne posten i '%-.64s'" - pol "Nie mo¿na znale¥æ rekordu w '%-.64s'" - por "Não pode encontrar registro em '%-.64s'" - rum "Nu pot sa gasesc recordul in '%-.64s'" - rus "îÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ ÚÁÐÉÓØ × '%-.64s'" - serbian "Ne mogu da pronaðem slog u '%-.64s'" - slo "Nemô¾em nájs» záznam v '%-.64s'" - spa "No puedo encontrar el registro en '%-.64s'" - swe "Hittar inte posten '%-.64s'" - ukr "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ Õ '%-.64s'" + cze "Nemohu naj-Bít záznam v '%-.192s'" + dan "Kan ikke finde posten i '%-.192s'" + nla "Kan record niet vinden in '%-.192s'" + eng "Can't find record in '%-.192s'" + jps "'%-.192s'‚̂Ȃ©‚ɃŒƒR[ƒh‚ªŒ©•t‚©‚è‚Ü‚¹‚ñ", + est "Ei suuda leida kirjet '%-.192s'-s" + fre "Ne peut trouver l'enregistrement dans '%-.192s'" + ger "Kann Datensatz in '%-.192s' nicht finden" + greek "Áäýíáôç ç áíåýñåóç åããñáöÞò óôï '%-.192s'" + hun "Nem talalhato a rekord '%-.192s'-ben" + ita "Impossibile trovare il record in '%-.192s'" + jpn "'%-.192s'¤Î¤Ê¤«¤Ë¥ì¥³¡¼¥É¤¬¸«ÉÕ¤«¤ê¤Þ¤»¤ó" + kor "'%-.192s'¿¡¼­ ·¹Äڵ带 ãÀ» ¼ö ¾øÀ¾´Ï´Ù." + nor "Kan ikke finne posten i '%-.192s'" + norwegian-ny "Kan ikkje finne posten i '%-.192s'" + pol "Nie mo¿na znale¥æ rekordu w '%-.192s'" + por "Não pode encontrar registro em '%-.192s'" + rum "Nu pot sa gasesc recordul in '%-.192s'" + rus "îÅ×ÏÚÍÏÖÎÏ ÎÁÊÔÉ ÚÁÐÉÓØ × '%-.192s'" + serbian "Ne mogu da pronaðem slog u '%-.192s'" + slo "Nemô¾em nájs» záznam v '%-.192s'" + spa "No puedo encontrar el registro en '%-.192s'" + swe "Hittar inte posten '%-.192s'" + ukr "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ Õ '%-.192s'" ER_NOT_FORM_FILE cze "Nespr-Bávná informace v souboru '%-.200s'" dan "Forkert indhold i: '%-.200s'" @@ -819,55 +819,55 @@ ER_NOT_KEYFILE swe "Fatalt fel vid hantering av register '%-.200s'; kör en reparation" ukr "èÉÂÎÉÊ ÆÁÊÌ ËÌÀÞÅÊ ÄÌÑ ÔÁÂÌÉæ: '%-.200s'; óÐÒÏÂÕÊÔÅ ÊÏÇÏ ×¦ÄÎÏ×ÉÔÉ" ER_OLD_KEYFILE - cze "Star-Bý klíèový soubor pro '%-.64s'; opravte ho." - dan "Gammel indeksfil for tabellen '%-.64s'; reparer den" - nla "Oude zoeksleutel file voor tabel '%-.64s'; repareer het!" - eng "Old key file for table '%-.64s'; repair it!" - jps "'%-.64s' ƒe[ƒuƒ‹‚͌¢Œ`Ž®‚Ì key file ‚̂悤‚Å‚·; C•œ‚ð‚µ‚Ä‚­‚¾‚³‚¢", - est "Tabeli '%-.64s' võtmefail on aegunud; paranda see!" - fre "Vieux fichier d'index pour la table '%-.64s'; réparez le!" - ger "Alte Index-Datei für Tabelle '%-.64s'. Bitte reparieren" - greek "Ðáëáéü áñ÷åßï ôáîéíüìéóçò (key file) ãéá ôïí ðßíáêá '%-.64s'; Ðáñáêáëþ, äéïñèþóôå ôï!" - hun "Regi kulcsfile a '%-.64s'tablahoz; probalja kijavitani!" - ita "File chiave vecchio per la tabella '%-.64s'; riparalo!" - jpn "'%-.64s' ¥Æ¡¼¥Ö¥ë¤Ï¸Å¤¤·Á¼°¤Î key file ¤Î¤è¤¦¤Ç¤¹; ½¤Éü¤ò¤·¤Æ¤¯¤À¤µ¤¤" - kor "'%-.64s' Å×À̺íÀÇ ÀÌÀü¹öÁ¯ÀÇ Å° Á¸Àç. ¼öÁ¤ÇϽÿÀ!" - nor "Gammel nøkkelfil for tabellen '%-.64s'; reparer den!" - norwegian-ny "Gammel nykkelfil for tabellen '%-.64s'; reparer den!" - pol "Plik kluczy dla tabeli '%-.64s' jest starego typu; napraw go!" - por "Arquivo de índice desatualizado para tabela '%-.64s'; repare-o!" - rum "Cheia fisierului e veche pentru tabela '%-.64s'; repar-o!" - rus "óÔÁÒÙÊ ÉÎÄÅËÓÎÙÊ ÆÁÊÌ ÄÌÑ ÔÁÂÌÉÃÙ '%-.64s'; ÏÔÒÅÍÏÎÔÉÒÕÊÔÅ ÅÇÏ!" - serbian "Zastareo key file za tabelu '%-.64s'; ispravite ga" - slo "Starý kµúèový súbor pre '%-.64s'; opravte ho!" - spa "Clave de archivo antigua para la tabla '%-.64s'; reparelo!" - swe "Gammal nyckelfil '%-.64s'; reparera registret" - ukr "óÔÁÒÉÊ ÆÁÊÌ ËÌÀÞÅÊ ÄÌÑ ÔÁÂÌÉæ '%-.64s'; ÷¦ÄÎÏ×¦ÔØ ÊÏÇÏ!" + cze "Star-Bý klíèový soubor pro '%-.192s'; opravte ho." + dan "Gammel indeksfil for tabellen '%-.192s'; reparer den" + nla "Oude zoeksleutel file voor tabel '%-.192s'; repareer het!" + eng "Old key file for table '%-.192s'; repair it!" + jps "'%-.192s' ƒe[ƒuƒ‹‚͌¢Œ`Ž®‚Ì key file ‚̂悤‚Å‚·; C•œ‚ð‚µ‚Ä‚­‚¾‚³‚¢", + est "Tabeli '%-.192s' võtmefail on aegunud; paranda see!" + fre "Vieux fichier d'index pour la table '%-.192s'; réparez le!" + ger "Alte Index-Datei für Tabelle '%-.192s'. Bitte reparieren" + greek "Ðáëáéü áñ÷åßï ôáîéíüìéóçò (key file) ãéá ôïí ðßíáêá '%-.192s'; Ðáñáêáëþ, äéïñèþóôå ôï!" + hun "Regi kulcsfile a '%-.192s'tablahoz; probalja kijavitani!" + ita "File chiave vecchio per la tabella '%-.192s'; riparalo!" + jpn "'%-.192s' ¥Æ¡¼¥Ö¥ë¤Ï¸Å¤¤·Á¼°¤Î key file ¤Î¤è¤¦¤Ç¤¹; ½¤Éü¤ò¤·¤Æ¤¯¤À¤µ¤¤" + kor "'%-.192s' Å×À̺íÀÇ ÀÌÀü¹öÁ¯ÀÇ Å° Á¸Àç. ¼öÁ¤ÇϽÿÀ!" + nor "Gammel nøkkelfil for tabellen '%-.192s'; reparer den!" + norwegian-ny "Gammel nykkelfil for tabellen '%-.192s'; reparer den!" + pol "Plik kluczy dla tabeli '%-.192s' jest starego typu; napraw go!" + por "Arquivo de índice desatualizado para tabela '%-.192s'; repare-o!" + rum "Cheia fisierului e veche pentru tabela '%-.192s'; repar-o!" + rus "óÔÁÒÙÊ ÉÎÄÅËÓÎÙÊ ÆÁÊÌ ÄÌÑ ÔÁÂÌÉÃÙ '%-.192s'; ÏÔÒÅÍÏÎÔÉÒÕÊÔÅ ÅÇÏ!" + serbian "Zastareo key file za tabelu '%-.192s'; ispravite ga" + slo "Starý kµúèový súbor pre '%-.192s'; opravte ho!" + spa "Clave de archivo antigua para la tabla '%-.192s'; reparelo!" + swe "Gammal nyckelfil '%-.192s'; reparera registret" + ukr "óÔÁÒÉÊ ÆÁÊÌ ËÌÀÞÅÊ ÄÌÑ ÔÁÂÌÉæ '%-.192s'; ÷¦ÄÎÏ×¦ÔØ ÊÏÇÏ!" ER_OPEN_AS_READONLY - cze "'%-.64s' je jen pro -Bètení" - dan "'%-.64s' er skrivebeskyttet" - nla "'%-.64s' is alleen leesbaar" - eng "Table '%-.64s' is read only" - jps "'%-.64s' ‚͓ǂݞ‚Ýê—p‚Å‚·", - est "Tabel '%-.64s' on ainult lugemiseks" - fre "'%-.64s' est en lecture seulement" - ger "Tabelle '%-.64s' ist nur lesbar" - greek "'%-.64s' åðéôñÝðåôáé ìüíï ç áíÜãíùóç" - hun "'%-.64s' irasvedett" - ita "'%-.64s' e` di sola lettura" - jpn "'%-.64s' ¤ÏÆÉ¤ß¹þ¤ßÀìÍѤǤ¹" - kor "Å×À̺í '%-.64s'´Â ÀбâÀü¿ë ÀÔ´Ï´Ù." - nor "'%-.64s' er skrivebeskyttet" - norwegian-ny "'%-.64s' er skrivetryggja" - pol "'%-.64s' jest tylko do odczytu" - por "Tabela '%-.64s' é somente para leitura" - rum "Tabela '%-.64s' e read-only" - rus "ôÁÂÌÉÃÁ '%-.64s' ÐÒÅÄÎÁÚÎÁÞÅÎÁ ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ" - serbian "Tabelu '%-.64s' je dozvoljeno samo èitati" - slo "'%-.64s' is èíta» only" - spa "'%-.64s' es de solo lectura" - swe "'%-.64s' är skyddad mot förändring" - ukr "ôÁÂÌÉÃÑ '%-.64s' Ô¦ÌØËÉ ÄÌÑ ÞÉÔÁÎÎÑ" + cze "'%-.192s' je jen pro -Bètení" + dan "'%-.192s' er skrivebeskyttet" + nla "'%-.192s' is alleen leesbaar" + eng "Table '%-.192s' is read only" + jps "'%-.192s' ‚͓ǂݞ‚Ýê—p‚Å‚·", + est "Tabel '%-.192s' on ainult lugemiseks" + fre "'%-.192s' est en lecture seulement" + ger "Tabelle '%-.192s' ist nur lesbar" + greek "'%-.192s' åðéôñÝðåôáé ìüíï ç áíÜãíùóç" + hun "'%-.192s' irasvedett" + ita "'%-.192s' e` di sola lettura" + jpn "'%-.192s' ¤ÏÆÉ¤ß¹þ¤ßÀìÍѤǤ¹" + kor "Å×À̺í '%-.192s'´Â ÀбâÀü¿ë ÀÔ´Ï´Ù." + nor "'%-.192s' er skrivebeskyttet" + norwegian-ny "'%-.192s' er skrivetryggja" + pol "'%-.192s' jest tylko do odczytu" + por "Tabela '%-.192s' é somente para leitura" + rum "Tabela '%-.192s' e read-only" + rus "ôÁÂÌÉÃÁ '%-.192s' ÐÒÅÄÎÁÚÎÁÞÅÎÁ ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ" + serbian "Tabelu '%-.192s' je dozvoljeno samo èitati" + slo "'%-.192s' is èíta» only" + spa "'%-.192s' es de solo lectura" + swe "'%-.192s' är skyddad mot förändring" + ukr "ôÁÂÌÉÃÑ '%-.192s' Ô¦ÌØËÉ ÄÌÑ ÞÉÔÁÎÎÑ" ER_OUTOFMEMORY HY001 S1001 cze "M-Bálo pamìti. Pøestartujte daemona a zkuste znovu (je potøeba %d bytù)" dan "Ikke mere hukommelse. Genstart serveren og prøv igen (mangler %d bytes)" @@ -919,30 +919,30 @@ ER_OUT_OF_SORTMEMORY HY001 S1001 swe "Sorteringsbufferten räcker inte till. Kontrollera startparametrarna" ukr "âÒÁË ÐÁÍ'ÑÔ¦ ÄÌÑ ÓÏÒÔÕ×ÁÎÎÑ. ôÒÅÂÁ ÚÂ¦ÌØÛÉÔÉ ÒÏÚÍ¦Ò ÂÕÆÅÒÁ ÓÏÒÔÕ×ÁÎÎÑ Õ ÓÅÒ×ÅÒÁ" ER_UNEXPECTED_EOF - cze "Neo-Bèekávaný konec souboru pøi ètení '%-.64s' (chybový kód: %d)" - dan "Uventet afslutning på fil (eof) ved læsning af filen '%-.64s' (Fejlkode: %d)" - nla "Onverwachte eof gevonden tijdens het lezen van file '%-.64s' (Errcode: %d)" - eng "Unexpected EOF found when reading file '%-.64s' (errno: %d)" - jps "'%-.64s' ƒtƒ@ƒCƒ‹‚ð“ǂݞ‚Ý’†‚É EOF ‚ª—\Šú‚¹‚ÊŠ‚ÅŒ»‚ê‚Ü‚µ‚½. (errno: %d)", - est "Ootamatu faililõpumärgend faili '%-.64s' lugemisel (veakood: %d)" - fre "Fin de fichier inattendue en lisant '%-.64s' (Errcode: %d)" - ger "Unerwartetes Ende beim Lesen der Datei '%-.64s' (Fehler: %d)" - greek "ÊáôÜ ôç äéÜñêåéá ôçò áíÜãíùóçò, âñÝèçêå áðñïóäüêçôá ôï ôÝëïò ôïõ áñ÷åßïõ '%-.64s' (êùäéêüò ëÜèïõò: %d)" - hun "Varatlan filevege-jel a '%-.64s'olvasasakor. (hibakod: %d)" - ita "Fine del file inaspettata durante la lettura del file '%-.64s' (errno: %d)" - jpn "'%-.64s' ¥Õ¥¡¥¤¥ë¤òÆÉ¤ß¹þ¤ßÃæ¤Ë EOF ¤¬Í½´ü¤»¤Ì½ê¤Ç¸½¤ì¤Þ¤·¤¿. (errno: %d)" - kor "'%-.64s' È­ÀÏÀ» Àд µµÁß À߸øµÈ eofÀ» ¹ß°ß (¿¡·¯¹øÈ£: %d)" - nor "Uventet slutt på fil (eof) ved lesing av filen '%-.64s' (Feilkode: %d)" - norwegian-ny "Uventa slutt på fil (eof) ved lesing av fila '%-.64s' (Feilkode: %d)" - pol "Nieoczekiwany 'eof' napotkany podczas czytania z pliku '%-.64s' (Kod b³êdu: %d)" - por "Encontrado fim de arquivo inesperado ao ler arquivo '%-.64s' (erro no. %d)" - rum "Sfirsit de fisier neasteptat in citirea fisierului '%-.64s' (errno: %d)" - rus "îÅÏÖÉÄÁÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ '%-.64s' (ÏÛÉÂËÁ: %d)" - serbian "Neoèekivani kraj pri èitanju file-a '%-.64s' (errno: %d)" - slo "Neoèakávaný koniec súboru pri èítaní '%-.64s' (chybový kód: %d)" - spa "Inesperado fin de ficheroU mientras leiamos el archivo '%-.64s' (Error: %d)" - swe "Oväntat filslut vid läsning från '%-.64s' (Felkod: %d)" - ukr "èÉÂÎÉÊ Ë¦ÎÅÃØ ÆÁÊÌÕ '%-.64s' (ÐÏÍÉÌËÁ: %d)" + cze "Neo-Bèekávaný konec souboru pøi ètení '%-.192s' (chybový kód: %d)" + dan "Uventet afslutning på fil (eof) ved læsning af filen '%-.192s' (Fejlkode: %d)" + nla "Onverwachte eof gevonden tijdens het lezen van file '%-.192s' (Errcode: %d)" + eng "Unexpected EOF found when reading file '%-.192s' (errno: %d)" + jps "'%-.192s' ƒtƒ@ƒCƒ‹‚ð“ǂݞ‚Ý’†‚É EOF ‚ª—\Šú‚¹‚ÊŠ‚ÅŒ»‚ê‚Ü‚µ‚½. (errno: %d)", + est "Ootamatu faililõpumärgend faili '%-.192s' lugemisel (veakood: %d)" + fre "Fin de fichier inattendue en lisant '%-.192s' (Errcode: %d)" + ger "Unerwartetes Ende beim Lesen der Datei '%-.192s' (Fehler: %d)" + greek "ÊáôÜ ôç äéÜñêåéá ôçò áíÜãíùóçò, âñÝèçêå áðñïóäüêçôá ôï ôÝëïò ôïõ áñ÷åßïõ '%-.192s' (êùäéêüò ëÜèïõò: %d)" + hun "Varatlan filevege-jel a '%-.192s'olvasasakor. (hibakod: %d)" + ita "Fine del file inaspettata durante la lettura del file '%-.192s' (errno: %d)" + jpn "'%-.192s' ¥Õ¥¡¥¤¥ë¤òÆÉ¤ß¹þ¤ßÃæ¤Ë EOF ¤¬Í½´ü¤»¤Ì½ê¤Ç¸½¤ì¤Þ¤·¤¿. (errno: %d)" + kor "'%-.192s' È­ÀÏÀ» Àд µµÁß À߸øµÈ eofÀ» ¹ß°ß (¿¡·¯¹øÈ£: %d)" + nor "Uventet slutt på fil (eof) ved lesing av filen '%-.192s' (Feilkode: %d)" + norwegian-ny "Uventa slutt på fil (eof) ved lesing av fila '%-.192s' (Feilkode: %d)" + pol "Nieoczekiwany 'eof' napotkany podczas czytania z pliku '%-.192s' (Kod b³êdu: %d)" + por "Encontrado fim de arquivo inesperado ao ler arquivo '%-.192s' (erro no. %d)" + rum "Sfirsit de fisier neasteptat in citirea fisierului '%-.192s' (errno: %d)" + rus "îÅÏÖÉÄÁÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ '%-.192s' (ÏÛÉÂËÁ: %d)" + serbian "Neoèekivani kraj pri èitanju file-a '%-.192s' (errno: %d)" + slo "Neoèakávaný koniec súboru pri èítaní '%-.192s' (chybový kód: %d)" + spa "Inesperado fin de ficheroU mientras leiamos el archivo '%-.192s' (Error: %d)" + swe "Oväntat filslut vid läsning från '%-.192s' (Felkod: %d)" + ukr "èÉÂÎÉÊ Ë¦ÎÅÃØ ÆÁÊÌÕ '%-.192s' (ÐÏÍÉÌËÁ: %d)" ER_CON_COUNT_ERROR 08004 cze "P-Bøíli¹ mnoho spojení" dan "For mange forbindelser (connections)" @@ -1041,53 +1041,53 @@ ER_HANDSHAKE_ERROR 08S01 swe "Fel vid initiering av kommunikationen med klienten" ukr "îÅצÒÎÁ ÕÓÔÁÎÏ×ËÁ Ú×'ÑÚËÕ" ER_DBACCESS_DENIED_ERROR 42000 - cze "P-Bøístup pro u¾ivatele '%-.32s'@'%-.64s' k databázi '%-.64s' není povolen" - dan "Adgang nægtet bruger: '%-.32s'@'%-.64s' til databasen '%-.64s'" - nla "Toegang geweigerd voor gebruiker: '%-.32s'@'%-.64s' naar database '%-.64s'" - eng "Access denied for user '%-.32s'@'%-.64s' to database '%-.64s'" - jps "ƒ†[ƒU[ '%-.32s'@'%-.64s' ‚Ì '%-.64s' ƒf[ƒ^ƒx[ƒX‚ւ̃AƒNƒZƒX‚ð‹‘”Û‚µ‚Ü‚·", - est "Ligipääs keelatud kasutajale '%-.32s'@'%-.64s' andmebaasile '%-.64s'" - fre "Accès refusé pour l'utilisateur: '%-.32s'@'@%-.64s'. Base '%-.64s'" - ger "Benutzer '%-.32s'@'%-.64s' hat keine Zugriffsberechtigung für Datenbank '%-.64s'" - greek "Äåí åðéôÝñåôáé ç ðñüóâáóç óôï ÷ñÞóôç: '%-.32s'@'%-.64s' óôç âÜóç äåäïìÝíùí '%-.64s'" - hun "A(z) '%-.32s'@'%-.64s' felhasznalo szamara tiltott eleres az '%-.64s' adabazishoz." - ita "Accesso non consentito per l'utente: '%-.32s'@'%-.64s' al database '%-.64s'" - jpn "¥æ¡¼¥¶¡¼ '%-.32s'@'%-.64s' ¤Î '%-.64s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ø¤Î¥¢¥¯¥»¥¹¤òµñÈݤ·¤Þ¤¹" - kor "'%-.32s'@'%-.64s' »ç¿ëÀÚ´Â '%-.64s' µ¥ÀÌŸº£À̽º¿¡ Á¢±ÙÀÌ °ÅºÎ µÇ¾ú½À´Ï´Ù." - nor "Tilgang nektet for bruker: '%-.32s'@'%-.64s' til databasen '%-.64s' nektet" - norwegian-ny "Tilgang ikkje tillate for brukar: '%-.32s'@'%-.64s' til databasen '%-.64s' nekta" - por "Acesso negado para o usuário '%-.32s'@'%-.64s' ao banco de dados '%-.64s'" - rum "Acces interzis pentru utilizatorul: '%-.32s'@'%-.64s' la baza de date '%-.64s'" - rus "äÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s'@'%-.64s' ÄÏÓÔÕÐ Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.64s' ÚÁËÒÙÔ" - serbian "Pristup je zabranjen korisniku '%-.32s'@'%-.64s' za bazu '%-.64s'" - slo "Zakázaný prístup pre u¾ívateµa: '%-.32s'@'%-.64s' k databázi '%-.64s'" - spa "Acceso negado para usuario: '%-.32s'@'%-.64s' para la base de datos '%-.64s'" - swe "Användare '%-.32s'@'%-.64s' är ej berättigad att använda databasen %-.64s" - ukr "äÏÓÔÕÐ ÚÁÂÏÒÏÎÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ: '%-.32s'@'%-.64s' ÄÏ ÂÁÚÉ ÄÁÎÎÉÈ '%-.64s'" + cze "P-Bøístup pro u¾ivatele '%-.48s'@'%-.64s' k databázi '%-.192s' není povolen" + dan "Adgang nægtet bruger: '%-.48s'@'%-.64s' til databasen '%-.192s'" + nla "Toegang geweigerd voor gebruiker: '%-.48s'@'%-.64s' naar database '%-.192s'" + eng "Access denied for user '%-.48s'@'%-.64s' to database '%-.192s'" + jps "ƒ†[ƒU[ '%-.48s'@'%-.64s' ‚Ì '%-.192s' ƒf[ƒ^ƒx[ƒX‚ւ̃AƒNƒZƒX‚ð‹‘”Û‚µ‚Ü‚·", + est "Ligipääs keelatud kasutajale '%-.48s'@'%-.64s' andmebaasile '%-.192s'" + fre "Accès refusé pour l'utilisateur: '%-.48s'@'@%-.64s'. Base '%-.192s'" + ger "Benutzer '%-.48s'@'%-.64s' hat keine Zugriffsberechtigung für Datenbank '%-.192s'" + greek "Äåí åðéôÝñåôáé ç ðñüóâáóç óôï ÷ñÞóôç: '%-.48s'@'%-.64s' óôç âÜóç äåäïìÝíùí '%-.192s'" + hun "A(z) '%-.48s'@'%-.64s' felhasznalo szamara tiltott eleres az '%-.192s' adabazishoz." + ita "Accesso non consentito per l'utente: '%-.48s'@'%-.64s' al database '%-.192s'" + jpn "¥æ¡¼¥¶¡¼ '%-.48s'@'%-.64s' ¤Î '%-.192s' ¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ø¤Î¥¢¥¯¥»¥¹¤òµñÈݤ·¤Þ¤¹" + kor "'%-.48s'@'%-.64s' »ç¿ëÀÚ´Â '%-.192s' µ¥ÀÌŸº£À̽º¿¡ Á¢±ÙÀÌ °ÅºÎ µÇ¾ú½À´Ï´Ù." + nor "Tilgang nektet for bruker: '%-.48s'@'%-.64s' til databasen '%-.192s' nektet" + norwegian-ny "Tilgang ikkje tillate for brukar: '%-.48s'@'%-.64s' til databasen '%-.192s' nekta" + por "Acesso negado para o usuário '%-.48s'@'%-.64s' ao banco de dados '%-.192s'" + rum "Acces interzis pentru utilizatorul: '%-.48s'@'%-.64s' la baza de date '%-.192s'" + rus "äÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.48s'@'%-.64s' ÄÏÓÔÕÐ Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.192s' ÚÁËÒÙÔ" + serbian "Pristup je zabranjen korisniku '%-.48s'@'%-.64s' za bazu '%-.192s'" + slo "Zakázaný prístup pre u¾ívateµa: '%-.48s'@'%-.64s' k databázi '%-.192s'" + spa "Acceso negado para usuario: '%-.48s'@'%-.64s' para la base de datos '%-.192s'" + swe "Användare '%-.48s'@'%-.64s' är ej berättigad att använda databasen %-.192s" + ukr "äÏÓÔÕÐ ÚÁÂÏÒÏÎÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ: '%-.48s'@'%-.64s' ÄÏ ÂÁÚÉ ÄÁÎÎÉÈ '%-.192s'" ER_ACCESS_DENIED_ERROR 28000 - cze "P-Bøístup pro u¾ivatele '%-.32s'@'%-.64s' (s heslem %s)" - dan "Adgang nægtet bruger: '%-.32s'@'%-.64s' (Bruger adgangskode: %s)" - nla "Toegang geweigerd voor gebruiker: '%-.32s'@'%-.64s' (Wachtwoord gebruikt: %s)" - eng "Access denied for user '%-.32s'@'%-.64s' (using password: %s)" - jps "ƒ†[ƒU[ '%-.32s'@'%-.64s' ‚ð‹‘”Û‚µ‚Ü‚·.uUsing password: %s)", - est "Ligipääs keelatud kasutajale '%-.32s'@'%-.64s' (kasutab parooli: %s)" - fre "Accès refusé pour l'utilisateur: '%-.32s'@'@%-.64s' (mot de passe: %s)" - ger "Benutzer '%-.32s'@'%-.64s' hat keine Zugriffsberechtigung (verwendetes Passwort: %s)" - greek "Äåí åðéôÝñåôáé ç ðñüóâáóç óôï ÷ñÞóôç: '%-.32s'@'%-.64s' (÷ñÞóç password: %s)" - hun "A(z) '%-.32s'@'%-.64s' felhasznalo szamara tiltott eleres. (Hasznalja a jelszot: %s)" - ita "Accesso non consentito per l'utente: '%-.32s'@'%-.64s' (Password: %s)" - jpn "¥æ¡¼¥¶¡¼ '%-.32s'@'%-.64s' ¤òµñÈݤ·¤Þ¤¹.uUsing password: %s)" - kor "'%-.32s'@'%-.64s' »ç¿ëÀÚ´Â Á¢±ÙÀÌ °ÅºÎ µÇ¾ú½À´Ï´Ù. (using password: %s)" - nor "Tilgang nektet for bruker: '%-.32s'@'%-.64s' (Bruker passord: %s)" - norwegian-ny "Tilgang ikke tillate for brukar: '%-.32s'@'%-.64s' (Brukar passord: %s)" - por "Acesso negado para o usuário '%-.32s'@'%-.64s' (senha usada: %s)" - rum "Acces interzis pentru utilizatorul: '%-.32s'@'%-.64s' (Folosind parola: %s)" - rus "äÏÓÔÕÐ ÚÁËÒÙÔ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s'@'%-.64s' (ÂÙÌ ÉÓÐÏÌØÚÏ×ÁÎ ÐÁÒÏÌØ: %s)" - serbian "Pristup je zabranjen korisniku '%-.32s'@'%-.64s' (koristi lozinku: '%s')" - slo "Zakázaný prístup pre u¾ívateµa: '%-.32s'@'%-.64s' (pou¾itie hesla: %s)" - spa "Acceso negado para usuario: '%-.32s'@'%-.64s' (Usando clave: %s)" - swe "Användare '%-.32s'@'%-.64s' är ej berättigad att logga in (Använder lösen: %s)" - ukr "äÏÓÔÕÐ ÚÁÂÏÒÏÎÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ: '%-.32s'@'%-.64s' (÷ÉËÏÒÉÓÔÁÎÏ ÐÁÒÏÌØ: %s)" + cze "P-Bøístup pro u¾ivatele '%-.48s'@'%-.64s' (s heslem %s)" + dan "Adgang nægtet bruger: '%-.48s'@'%-.64s' (Bruger adgangskode: %s)" + nla "Toegang geweigerd voor gebruiker: '%-.48s'@'%-.64s' (Wachtwoord gebruikt: %s)" + eng "Access denied for user '%-.48s'@'%-.64s' (using password: %s)" + jps "ƒ†[ƒU[ '%-.48s'@'%-.64s' ‚ð‹‘”Û‚µ‚Ü‚·.uUsing password: %s)", + est "Ligipääs keelatud kasutajale '%-.48s'@'%-.64s' (kasutab parooli: %s)" + fre "Accès refusé pour l'utilisateur: '%-.48s'@'@%-.64s' (mot de passe: %s)" + ger "Benutzer '%-.48s'@'%-.64s' hat keine Zugriffsberechtigung (verwendetes Passwort: %s)" + greek "Äåí åðéôÝñåôáé ç ðñüóâáóç óôï ÷ñÞóôç: '%-.48s'@'%-.64s' (÷ñÞóç password: %s)" + hun "A(z) '%-.48s'@'%-.64s' felhasznalo szamara tiltott eleres. (Hasznalja a jelszot: %s)" + ita "Accesso non consentito per l'utente: '%-.48s'@'%-.64s' (Password: %s)" + jpn "¥æ¡¼¥¶¡¼ '%-.48s'@'%-.64s' ¤òµñÈݤ·¤Þ¤¹.uUsing password: %s)" + kor "'%-.48s'@'%-.64s' »ç¿ëÀÚ´Â Á¢±ÙÀÌ °ÅºÎ µÇ¾ú½À´Ï´Ù. (using password: %s)" + nor "Tilgang nektet for bruker: '%-.48s'@'%-.64s' (Bruker passord: %s)" + norwegian-ny "Tilgang ikke tillate for brukar: '%-.48s'@'%-.64s' (Brukar passord: %s)" + por "Acesso negado para o usuário '%-.48s'@'%-.64s' (senha usada: %s)" + rum "Acces interzis pentru utilizatorul: '%-.48s'@'%-.64s' (Folosind parola: %s)" + rus "äÏÓÔÕÐ ÚÁËÒÙÔ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.48s'@'%-.64s' (ÂÙÌ ÉÓÐÏÌØÚÏ×ÁÎ ÐÁÒÏÌØ: %s)" + serbian "Pristup je zabranjen korisniku '%-.48s'@'%-.64s' (koristi lozinku: '%s')" + slo "Zakázaný prístup pre u¾ívateµa: '%-.48s'@'%-.64s' (pou¾itie hesla: %s)" + spa "Acceso negado para usuario: '%-.48s'@'%-.64s' (Usando clave: %s)" + swe "Användare '%-.48s'@'%-.64s' är ej berättigad att logga in (Använder lösen: %s)" + ukr "äÏÓÔÕÐ ÚÁÂÏÒÏÎÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ: '%-.48s'@'%-.64s' (÷ÉËÏÒÉÓÔÁÎÏ ÐÁÒÏÌØ: %s)" ER_NO_DB_ERROR 3D000 cze "Nebyla vybr-Bána ¾ádná databáze" dan "Ingen database valgt" @@ -1139,80 +1139,80 @@ ER_UNKNOWN_COM_ERROR 08S01 swe "Okänt commando" ukr "îÅצÄÏÍÁ ËÏÍÁÎÄÁ" ER_BAD_NULL_ERROR 23000 - cze "Sloupec '%-.64s' nem-Bù¾e být null" - dan "Kolonne '%-.64s' kan ikke være NULL" - nla "Kolom '%-.64s' kan niet null zijn" - eng "Column '%-.64s' cannot be null" - jps "Column '%-.64s' ‚Í null ‚ɂ͂ł«‚È‚¢‚̂ł·", - est "Tulp '%-.64s' ei saa omada nullväärtust" - fre "Le champ '%-.64s' ne peut être vide (null)" - ger "Feld '%-.64s' darf nicht NULL sein" - greek "Ôï ðåäßï '%-.64s' äåí ìðïñåß íá åßíáé êåíü (null)" - hun "A(z) '%-.64s' oszlop erteke nem lehet nulla" - ita "La colonna '%-.64s' non puo` essere nulla" - jpn "Column '%-.64s' ¤Ï null ¤Ë¤Ï¤Ç¤­¤Ê¤¤¤Î¤Ç¤¹" - kor "Ä®·³ '%-.64s'´Â ³Î(Null)ÀÌ µÇ¸é ¾ÈµË´Ï´Ù. " - nor "Kolonne '%-.64s' kan ikke vere null" - norwegian-ny "Kolonne '%-.64s' kan ikkje vere null" - pol "Kolumna '%-.64s' nie mo¿e byæ null" - por "Coluna '%-.64s' não pode ser vazia" - rum "Coloana '%-.64s' nu poate sa fie null" - rus "óÔÏÌÂÅà '%-.64s' ÎÅ ÍÏÖÅÔ ÐÒÉÎÉÍÁÔØ ×ÅÌÉÞÉÎÕ NULL" - serbian "Kolona '%-.64s' ne može biti NULL" - slo "Pole '%-.64s' nemô¾e by» null" - spa "La columna '%-.64s' no puede ser nula" - swe "Kolumn '%-.64s' får inte vara NULL" - ukr "óÔÏ×ÂÅÃØ '%-.64s' ÎÅ ÍÏÖÅ ÂÕÔÉ ÎÕÌØÏ×ÉÍ" + cze "Sloupec '%-.192s' nem-Bù¾e být null" + dan "Kolonne '%-.192s' kan ikke være NULL" + nla "Kolom '%-.192s' kan niet null zijn" + eng "Column '%-.192s' cannot be null" + jps "Column '%-.192s' ‚Í null ‚ɂ͂ł«‚È‚¢‚̂ł·", + est "Tulp '%-.192s' ei saa omada nullväärtust" + fre "Le champ '%-.192s' ne peut être vide (null)" + ger "Feld '%-.192s' darf nicht NULL sein" + greek "Ôï ðåäßï '%-.192s' äåí ìðïñåß íá åßíáé êåíü (null)" + hun "A(z) '%-.192s' oszlop erteke nem lehet nulla" + ita "La colonna '%-.192s' non puo` essere nulla" + jpn "Column '%-.192s' ¤Ï null ¤Ë¤Ï¤Ç¤­¤Ê¤¤¤Î¤Ç¤¹" + kor "Ä®·³ '%-.192s'´Â ³Î(Null)ÀÌ µÇ¸é ¾ÈµË´Ï´Ù. " + nor "Kolonne '%-.192s' kan ikke vere null" + norwegian-ny "Kolonne '%-.192s' kan ikkje vere null" + pol "Kolumna '%-.192s' nie mo¿e byæ null" + por "Coluna '%-.192s' não pode ser vazia" + rum "Coloana '%-.192s' nu poate sa fie null" + rus "óÔÏÌÂÅà '%-.192s' ÎÅ ÍÏÖÅÔ ÐÒÉÎÉÍÁÔØ ×ÅÌÉÞÉÎÕ NULL" + serbian "Kolona '%-.192s' ne može biti NULL" + slo "Pole '%-.192s' nemô¾e by» null" + spa "La columna '%-.192s' no puede ser nula" + swe "Kolumn '%-.192s' får inte vara NULL" + ukr "óÔÏ×ÂÅÃØ '%-.192s' ÎÅ ÍÏÖÅ ÂÕÔÉ ÎÕÌØÏ×ÉÍ" ER_BAD_DB_ERROR 42000 - cze "Nezn-Bámá databáze '%-.64s'" - dan "Ukendt database '%-.64s'" - nla "Onbekende database '%-.64s'" - eng "Unknown database '%-.64s'" - jps "'%-.64s' ‚È‚ñ‚ăf[ƒ^ƒx[ƒX‚Í’m‚è‚Ü‚¹‚ñ.", - est "Tundmatu andmebaas '%-.64s'" - fre "Base '%-.64s' inconnue" - ger "Unbekannte Datenbank '%-.64s'" - greek "Áãíùóôç âÜóç äåäïìÝíùí '%-.64s'" - hun "Ervenytelen adatbazis: '%-.64s'" - ita "Database '%-.64s' sconosciuto" - jpn "'%-.64s' ¤Ê¤ó¤Æ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÏÃΤê¤Þ¤»¤ó." - kor "µ¥ÀÌŸº£À̽º '%-.64s'´Â ¾Ë¼ö ¾øÀ½" - nor "Ukjent database '%-.64s'" - norwegian-ny "Ukjent database '%-.64s'" - pol "Nieznana baza danych '%-.64s'" - por "Banco de dados '%-.64s' desconhecido" - rum "Baza de data invalida '%-.64s'" - rus "îÅÉÚ×ÅÓÔÎÁÑ ÂÁÚÁ ÄÁÎÎÙÈ '%-.64s'" - serbian "Nepoznata baza '%-.64s'" - slo "Neznáma databáza '%-.64s'" - spa "Base de datos desconocida '%-.64s'" - swe "Okänd databas: '%-.64s'" - ukr "îÅצÄÏÍÁ ÂÁÚÁ ÄÁÎÎÉÈ '%-.64s'" + cze "Nezn-Bámá databáze '%-.192s'" + dan "Ukendt database '%-.192s'" + nla "Onbekende database '%-.192s'" + eng "Unknown database '%-.192s'" + jps "'%-.192s' ‚È‚ñ‚ăf[ƒ^ƒx[ƒX‚Í’m‚è‚Ü‚¹‚ñ.", + est "Tundmatu andmebaas '%-.192s'" + fre "Base '%-.192s' inconnue" + ger "Unbekannte Datenbank '%-.192s'" + greek "Áãíùóôç âÜóç äåäïìÝíùí '%-.192s'" + hun "Ervenytelen adatbazis: '%-.192s'" + ita "Database '%-.192s' sconosciuto" + jpn "'%-.192s' ¤Ê¤ó¤Æ¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÏÃΤê¤Þ¤»¤ó." + kor "µ¥ÀÌŸº£À̽º '%-.192s'´Â ¾Ë¼ö ¾øÀ½" + nor "Ukjent database '%-.192s'" + norwegian-ny "Ukjent database '%-.192s'" + pol "Nieznana baza danych '%-.192s'" + por "Banco de dados '%-.192s' desconhecido" + rum "Baza de data invalida '%-.192s'" + rus "îÅÉÚ×ÅÓÔÎÁÑ ÂÁÚÁ ÄÁÎÎÙÈ '%-.192s'" + serbian "Nepoznata baza '%-.192s'" + slo "Neznáma databáza '%-.192s'" + spa "Base de datos desconocida '%-.192s'" + swe "Okänd databas: '%-.192s'" + ukr "îÅצÄÏÍÁ ÂÁÚÁ ÄÁÎÎÉÈ '%-.192s'" ER_TABLE_EXISTS_ERROR 42S01 - cze "Tabulka '%-.64s' ji-B¾ existuje" - dan "Tabellen '%-.64s' findes allerede" - nla "Tabel '%-.64s' bestaat al" - eng "Table '%-.64s' already exists" - jps "Table '%-.64s' ‚ÍŠù‚É‚ ‚è‚Ü‚·", - est "Tabel '%-.64s' juba eksisteerib" - fre "La table '%-.64s' existe déjà" - ger "Tabelle '%-.64s' bereits vorhanden" - greek "Ï ðßíáêáò '%-.64s' õðÜñ÷åé Þäç" - hun "A(z) '%-.64s' tabla mar letezik" - ita "La tabella '%-.64s' esiste gia`" - jpn "Table '%-.64s' ¤Ï´û¤Ë¤¢¤ê¤Þ¤¹" - kor "Å×À̺í '%-.64s'´Â ÀÌ¹Ì Á¸ÀçÇÔ" - nor "Tabellen '%-.64s' eksisterer allerede" - norwegian-ny "Tabellen '%-.64s' eksisterar allereide" - pol "Tabela '%-.64s' ju¿ istnieje" - por "Tabela '%-.64s' já existe" - rum "Tabela '%-.64s' exista deja" - rus "ôÁÂÌÉÃÁ '%-.64s' ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ" - serbian "Tabela '%-.64s' veæ postoji" - slo "Tabuµka '%-.64s' u¾ existuje" - spa "La tabla '%-.64s' ya existe" - swe "Tabellen '%-.64s' finns redan" - ukr "ôÁÂÌÉÃÑ '%-.64s' ×ÖÅ ¦ÓÎÕ¤" + cze "Tabulka '%-.192s' ji-B¾ existuje" + dan "Tabellen '%-.192s' findes allerede" + nla "Tabel '%-.192s' bestaat al" + eng "Table '%-.192s' already exists" + jps "Table '%-.192s' ‚ÍŠù‚É‚ ‚è‚Ü‚·", + est "Tabel '%-.192s' juba eksisteerib" + fre "La table '%-.192s' existe déjà" + ger "Tabelle '%-.192s' bereits vorhanden" + greek "Ï ðßíáêáò '%-.192s' õðÜñ÷åé Þäç" + hun "A(z) '%-.192s' tabla mar letezik" + ita "La tabella '%-.192s' esiste gia`" + jpn "Table '%-.192s' ¤Ï´û¤Ë¤¢¤ê¤Þ¤¹" + kor "Å×À̺í '%-.192s'´Â ÀÌ¹Ì Á¸ÀçÇÔ" + nor "Tabellen '%-.192s' eksisterer allerede" + norwegian-ny "Tabellen '%-.192s' eksisterar allereide" + pol "Tabela '%-.192s' ju¿ istnieje" + por "Tabela '%-.192s' já existe" + rum "Tabela '%-.192s' exista deja" + rus "ôÁÂÌÉÃÁ '%-.192s' ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ" + serbian "Tabela '%-.192s' veæ postoji" + slo "Tabuµka '%-.192s' u¾ existuje" + spa "La tabla '%-.192s' ya existe" + swe "Tabellen '%-.192s' finns redan" + ukr "ôÁÂÌÉÃÑ '%-.192s' ×ÖÅ ¦ÓÎÕ¤" ER_BAD_TABLE_ERROR 42S02 cze "Nezn-Bámá tabulka '%-.100s'" dan "Ukendt tabel '%-.100s'" @@ -1239,29 +1239,29 @@ ER_BAD_TABLE_ERROR 42S02 swe "Okänd tabell '%-.100s'" ukr "îÅצÄÏÍÁ ÔÁÂÌÉÃÑ '%-.100s'" ER_NON_UNIQ_ERROR 23000 - cze "Sloupec '%-.64s' v %-.64s nen-Bí zcela jasný" - dan "Felt: '%-.64s' i tabel %-.64s er ikke entydigt" - nla "Kolom: '%-.64s' in %-.64s is niet eenduidig" - eng "Column '%-.64s' in %-.64s is ambiguous" - est "Väli '%-.64s' %-.64s-s ei ole ühene" - fre "Champ: '%-.64s' dans %-.64s est ambigu" - ger "Feld '%-.64s' in %-.64s ist nicht eindeutig" - greek "Ôï ðåäßï: '%-.64s' óå %-.64s äåí Ý÷åé êáèïñéóôåß" - hun "A(z) '%-.64s' oszlop %-.64s-ben ketertelmu" - ita "Colonna: '%-.64s' di %-.64s e` ambigua" - jpn "Column: '%-.64s' in %-.64s is ambiguous" - kor "Ä®·³: '%-.64s' in '%-.64s' ÀÌ ¸ðÈ£ÇÔ" - nor "Felt: '%-.64s' i tabell %-.64s er ikke entydig" - norwegian-ny "Kolonne: '%-.64s' i tabell %-.64s er ikkje eintydig" - pol "Kolumna: '%-.64s' w %-.64s jest dwuznaczna" - por "Coluna '%-.64s' em '%-.64s' é ambígua" - rum "Coloana: '%-.64s' in %-.64s este ambigua" - rus "óÔÏÌÂÅà '%-.64s' × %-.64s ÚÁÄÁÎ ÎÅÏÄÎÏÚÎÁÞÎÏ" - serbian "Kolona '%-.64s' u %-.64s nije jedinstvena u kontekstu" - slo "Pole: '%-.64s' v %-.64s je nejasné" - spa "La columna: '%-.64s' en %-.64s es ambigua" - swe "Kolumn '%-.64s' i %-.64s är inte unik" - ukr "óÔÏ×ÂÅÃØ '%-.64s' Õ %-.64s ×ÉÚÎÁÞÅÎÉÊ ÎÅÏÄÎÏÚÎÁÞÎÏ" + cze "Sloupec '%-.192s' v %-.192s nen-Bí zcela jasný" + dan "Felt: '%-.192s' i tabel %-.192s er ikke entydigt" + nla "Kolom: '%-.192s' in %-.192s is niet eenduidig" + eng "Column '%-.192s' in %-.192s is ambiguous" + est "Väli '%-.192s' %-.192s-s ei ole ühene" + fre "Champ: '%-.192s' dans %-.192s est ambigu" + ger "Feld '%-.192s' in %-.192s ist nicht eindeutig" + greek "Ôï ðåäßï: '%-.192s' óå %-.192s äåí Ý÷åé êáèïñéóôåß" + hun "A(z) '%-.192s' oszlop %-.192s-ben ketertelmu" + ita "Colonna: '%-.192s' di %-.192s e` ambigua" + jpn "Column: '%-.192s' in %-.192s is ambiguous" + kor "Ä®·³: '%-.192s' in '%-.192s' ÀÌ ¸ðÈ£ÇÔ" + nor "Felt: '%-.192s' i tabell %-.192s er ikke entydig" + norwegian-ny "Kolonne: '%-.192s' i tabell %-.192s er ikkje eintydig" + pol "Kolumna: '%-.192s' w %-.192s jest dwuznaczna" + por "Coluna '%-.192s' em '%-.192s' é ambígua" + rum "Coloana: '%-.192s' in %-.192s este ambigua" + rus "óÔÏÌÂÅà '%-.192s' × %-.192s ÚÁÄÁÎ ÎÅÏÄÎÏÚÎÁÞÎÏ" + serbian "Kolona '%-.192s' u %-.192s nije jedinstvena u kontekstu" + slo "Pole: '%-.192s' v %-.192s je nejasné" + spa "La columna: '%-.192s' en %-.192s es ambigua" + swe "Kolumn '%-.192s' i %-.192s är inte unik" + ukr "óÔÏ×ÂÅÃØ '%-.192s' Õ %-.192s ×ÉÚÎÁÞÅÎÉÊ ÎÅÏÄÎÏÚÎÁÞÎÏ" ER_SERVER_SHUTDOWN 08S01 cze "Prob-Bíhá ukonèování práce serveru" dan "Database nedlukning er i gang" @@ -1288,77 +1288,77 @@ ER_SERVER_SHUTDOWN 08S01 swe "Servern går nu ned" ukr "úÁ×ÅÒÛÕ¤ÔØÓÑ ÒÁÂÏÔÁ ÓÅÒ×ÅÒÁ" ER_BAD_FIELD_ERROR 42S22 S0022 - cze "Nezn-Bámý sloupec '%-.64s' v %-.64s" - dan "Ukendt kolonne '%-.64s' i tabel %-.64s" - nla "Onbekende kolom '%-.64s' in %-.64s" - eng "Unknown column '%-.64s' in '%-.64s'" - jps "'%-.64s' column ‚Í '%-.64s' ‚ɂ͂ ‚è‚Ü‚¹‚ñ.", - est "Tundmatu tulp '%-.64s' '%-.64s'-s" - fre "Champ '%-.64s' inconnu dans %-.64s" - ger "Unbekanntes Tabellenfeld '%-.64s' in %-.64s" - greek "Áãíùóôï ðåäßï '%-.64s' óå '%-.64s'" - hun "A(z) '%-.64s' oszlop ervenytelen '%-.64s'-ben" - ita "Colonna sconosciuta '%-.64s' in '%-.64s'" - jpn "'%-.64s' column ¤Ï '%-.64s' ¤Ë¤Ï¤¢¤ê¤Þ¤»¤ó." - kor "Unknown Ä®·³ '%-.64s' in '%-.64s'" - nor "Ukjent kolonne '%-.64s' i tabell %-.64s" - norwegian-ny "Ukjent felt '%-.64s' i tabell %-.64s" - pol "Nieznana kolumna '%-.64s' w %-.64s" - por "Coluna '%-.64s' desconhecida em '%-.64s'" - rum "Coloana invalida '%-.64s' in '%-.64s'" - rus "îÅÉÚ×ÅÓÔÎÙÊ ÓÔÏÌÂÅà '%-.64s' × '%-.64s'" - serbian "Nepoznata kolona '%-.64s' u '%-.64s'" - slo "Neznáme pole '%-.64s' v '%-.64s'" - spa "La columna '%-.64s' en %-.64s es desconocida" - swe "Okänd kolumn '%-.64s' i %-.64s" - ukr "îÅצÄÏÍÉÊ ÓÔÏ×ÂÅÃØ '%-.64s' Õ '%-.64s'" + cze "Nezn-Bámý sloupec '%-.192s' v %-.192s" + dan "Ukendt kolonne '%-.192s' i tabel %-.192s" + nla "Onbekende kolom '%-.192s' in %-.192s" + eng "Unknown column '%-.192s' in '%-.192s'" + jps "'%-.192s' column ‚Í '%-.192s' ‚ɂ͂ ‚è‚Ü‚¹‚ñ.", + est "Tundmatu tulp '%-.192s' '%-.192s'-s" + fre "Champ '%-.192s' inconnu dans %-.192s" + ger "Unbekanntes Tabellenfeld '%-.192s' in %-.192s" + greek "Áãíùóôï ðåäßï '%-.192s' óå '%-.192s'" + hun "A(z) '%-.192s' oszlop ervenytelen '%-.192s'-ben" + ita "Colonna sconosciuta '%-.192s' in '%-.192s'" + jpn "'%-.192s' column ¤Ï '%-.192s' ¤Ë¤Ï¤¢¤ê¤Þ¤»¤ó." + kor "Unknown Ä®·³ '%-.192s' in '%-.192s'" + nor "Ukjent kolonne '%-.192s' i tabell %-.192s" + norwegian-ny "Ukjent felt '%-.192s' i tabell %-.192s" + pol "Nieznana kolumna '%-.192s' w %-.192s" + por "Coluna '%-.192s' desconhecida em '%-.192s'" + rum "Coloana invalida '%-.192s' in '%-.192s'" + rus "îÅÉÚ×ÅÓÔÎÙÊ ÓÔÏÌÂÅà '%-.192s' × '%-.192s'" + serbian "Nepoznata kolona '%-.192s' u '%-.192s'" + slo "Neznáme pole '%-.192s' v '%-.192s'" + spa "La columna '%-.192s' en %-.192s es desconocida" + swe "Okänd kolumn '%-.192s' i %-.192s" + ukr "îÅצÄÏÍÉÊ ÓÔÏ×ÂÅÃØ '%-.192s' Õ '%-.192s'" ER_WRONG_FIELD_WITH_GROUP 42000 S1009 - cze "Pou-B¾ité '%-.64s' nebylo v group by" - dan "Brugte '%-.64s' som ikke var i group by" - nla "Opdracht gebruikt '%-.64s' dat niet in de GROUP BY voorkomt" - eng "'%-.64s' isn't in GROUP BY" - jps "'%-.64s' isn't in GROUP BY", - est "'%-.64s' puudub GROUP BY klauslis" - fre "'%-.64s' n'est pas dans 'group by'" - ger "'%-.64s' ist nicht in GROUP BY vorhanden" - greek "×ñçóéìïðïéÞèçêå '%-.64s' ðïõ äåí õðÞñ÷å óôï group by" - hun "Used '%-.64s' with wasn't in group by" - ita "Usato '%-.64s' che non e` nel GROUP BY" - kor "'%-.64s'Àº GROUP BY¼Ó¿¡ ¾øÀ½" - nor "Brukte '%-.64s' som ikke var i group by" - norwegian-ny "Brukte '%-.64s' som ikkje var i group by" - pol "U¿yto '%-.64s' bez umieszczenia w group by" - por "'%-.64s' não está em 'GROUP BY'" - rum "'%-.64s' nu exista in clauza GROUP BY" - rus "'%-.64s' ÎÅ ÐÒÉÓÕÔÓÔ×ÕÅÔ × GROUP BY" - serbian "Entitet '%-.64s' nije naveden u komandi 'GROUP BY'" - slo "Pou¾ité '%-.64s' nebolo v 'group by'" - spa "Usado '%-.64s' el cual no esta group by" - swe "'%-.64s' finns inte i GROUP BY" - ukr "'%-.64s' ÎÅ ¤ Õ GROUP BY" + cze "Pou-B¾ité '%-.192s' nebylo v group by" + dan "Brugte '%-.192s' som ikke var i group by" + nla "Opdracht gebruikt '%-.192s' dat niet in de GROUP BY voorkomt" + eng "'%-.192s' isn't in GROUP BY" + jps "'%-.192s' isn't in GROUP BY", + est "'%-.192s' puudub GROUP BY klauslis" + fre "'%-.192s' n'est pas dans 'group by'" + ger "'%-.192s' ist nicht in GROUP BY vorhanden" + greek "×ñçóéìïðïéÞèçêå '%-.192s' ðïõ äåí õðÞñ÷å óôï group by" + hun "Used '%-.192s' with wasn't in group by" + ita "Usato '%-.192s' che non e` nel GROUP BY" + kor "'%-.192s'Àº GROUP BY¼Ó¿¡ ¾øÀ½" + nor "Brukte '%-.192s' som ikke var i group by" + norwegian-ny "Brukte '%-.192s' som ikkje var i group by" + pol "U¿yto '%-.192s' bez umieszczenia w group by" + por "'%-.192s' não está em 'GROUP BY'" + rum "'%-.192s' nu exista in clauza GROUP BY" + rus "'%-.192s' ÎÅ ÐÒÉÓÕÔÓÔ×ÕÅÔ × GROUP BY" + serbian "Entitet '%-.192s' nije naveden u komandi 'GROUP BY'" + slo "Pou¾ité '%-.192s' nebolo v 'group by'" + spa "Usado '%-.192s' el cual no esta group by" + swe "'%-.192s' finns inte i GROUP BY" + ukr "'%-.192s' ÎÅ ¤ Õ GROUP BY" ER_WRONG_GROUP_FIELD 42000 S1009 - cze "Nemohu pou-B¾ít group na '%-.64s'" - dan "Kan ikke gruppere på '%-.64s'" - nla "Kan '%-.64s' niet groeperen" - eng "Can't group on '%-.64s'" - est "Ei saa grupeerida '%-.64s' järgi" - fre "Ne peut regrouper '%-.64s'" - ger "Gruppierung über '%-.64s' nicht möglich" - greek "Áäýíáôç ç ïìáäïðïßçóç (group on) '%-.64s'" - hun "A group nem hasznalhato: '%-.64s'" - ita "Impossibile raggruppare per '%-.64s'" - kor "'%-.64s'¸¦ ±×·ìÇÒ ¼ö ¾øÀ½" - nor "Kan ikke gruppere på '%-.64s'" - norwegian-ny "Kan ikkje gruppere på '%-.64s'" - pol "Nie mo¿na grupowaæ po '%-.64s'" - por "Não pode agrupar em '%-.64s'" - rum "Nu pot sa grupez pe (group on) '%-.64s'" - rus "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÉÚ×ÅÓÔÉ ÇÒÕÐÐÉÒÏ×ËÕ ÐÏ '%-.64s'" - serbian "Ne mogu da grupišem po '%-.64s'" - slo "Nemô¾em pou¾i» 'group' na '%-.64s'" - spa "No puedo agrupar por '%-.64s'" - swe "Kan inte använda GROUP BY med '%-.64s'" - ukr "îÅ ÍÏÖÕ ÇÒÕÐÕ×ÁÔÉ ÐÏ '%-.64s'" + cze "Nemohu pou-B¾ít group na '%-.192s'" + dan "Kan ikke gruppere på '%-.192s'" + nla "Kan '%-.192s' niet groeperen" + eng "Can't group on '%-.192s'" + est "Ei saa grupeerida '%-.192s' järgi" + fre "Ne peut regrouper '%-.192s'" + ger "Gruppierung über '%-.192s' nicht möglich" + greek "Áäýíáôç ç ïìáäïðïßçóç (group on) '%-.192s'" + hun "A group nem hasznalhato: '%-.192s'" + ita "Impossibile raggruppare per '%-.192s'" + kor "'%-.192s'¸¦ ±×·ìÇÒ ¼ö ¾øÀ½" + nor "Kan ikke gruppere på '%-.192s'" + norwegian-ny "Kan ikkje gruppere på '%-.192s'" + pol "Nie mo¿na grupowaæ po '%-.192s'" + por "Não pode agrupar em '%-.192s'" + rum "Nu pot sa grupez pe (group on) '%-.192s'" + rus "îÅ×ÏÚÍÏÖÎÏ ÐÒÏÉÚ×ÅÓÔÉ ÇÒÕÐÐÉÒÏ×ËÕ ÐÏ '%-.192s'" + serbian "Ne mogu da grupišem po '%-.192s'" + slo "Nemô¾em pou¾i» 'group' na '%-.192s'" + spa "No puedo agrupar por '%-.192s'" + swe "Kan inte använda GROUP BY med '%-.192s'" + ukr "îÅ ÍÏÖÕ ÇÒÕÐÕ×ÁÔÉ ÐÏ '%-.192s'" ER_WRONG_SUM_SELECT 42000 S1009 cze "P-Bøíkaz obsahuje zároveò funkci sum a sloupce" dan "Udtrykket har summer (sum) funktioner og kolonner i samme udtryk" @@ -1429,103 +1429,103 @@ ER_TOO_LONG_IDENT 42000 S1009 swe "Kolumnnamn '%-.100s' är för långt" ukr "¶Í'Ñ ¦ÄÅÎÔÉÆ¦ËÁÔÏÒÁ '%-.100s' ÚÁÄÏ×ÇÅ" ER_DUP_FIELDNAME 42S21 S1009 - cze "Zdvojen-Bé jméno sloupce '%-.64s'" - dan "Feltnavnet '%-.64s' findes allerede" - nla "Dubbele kolom naam '%-.64s'" - eng "Duplicate column name '%-.64s'" - jps "'%-.64s' ‚Æ‚¢‚¤ column –¼‚Íd•¡‚µ‚Ă܂·", - est "Kattuv tulba nimi '%-.64s'" - fre "Nom du champ '%-.64s' déjà utilisé" - ger "Doppelter Spaltenname: '%-.64s'" - greek "ÅðáíÜëçøç column name '%-.64s'" - hun "Duplikalt oszlopazonosito: '%-.64s'" - ita "Nome colonna duplicato '%-.64s'" - jpn "'%-.64s' ¤È¤¤¤¦ column ̾¤Ï½ÅÊ£¤·¤Æ¤Þ¤¹" - kor "Áߺ¹µÈ Ä®·³ À̸§: '%-.64s'" - nor "Feltnavnet '%-.64s' eksisterte fra før" - norwegian-ny "Feltnamnet '%-.64s' eksisterte frå før" - pol "Powtórzona nazwa kolumny '%-.64s'" - por "Nome da coluna '%-.64s' duplicado" - rum "Numele coloanei '%-.64s' e duplicat" - rus "äÕÂÌÉÒÕÀÝÅÅÓÑ ÉÍÑ ÓÔÏÌÂÃÁ '%-.64s'" - serbian "Duplirano ime kolone '%-.64s'" - slo "Opakované meno poµa '%-.64s'" - spa "Nombre de columna duplicado '%-.64s'" - swe "Kolumnnamn '%-.64s finns flera gånger" - ukr "äÕÂÌÀÀÞÅ ¦Í'Ñ ÓÔÏ×ÂÃÑ '%-.64s'" + cze "Zdvojen-Bé jméno sloupce '%-.192s'" + dan "Feltnavnet '%-.192s' findes allerede" + nla "Dubbele kolom naam '%-.192s'" + eng "Duplicate column name '%-.192s'" + jps "'%-.192s' ‚Æ‚¢‚¤ column –¼‚Íd•¡‚µ‚Ă܂·", + est "Kattuv tulba nimi '%-.192s'" + fre "Nom du champ '%-.192s' déjà utilisé" + ger "Doppelter Spaltenname: '%-.192s'" + greek "ÅðáíÜëçøç column name '%-.192s'" + hun "Duplikalt oszlopazonosito: '%-.192s'" + ita "Nome colonna duplicato '%-.192s'" + jpn "'%-.192s' ¤È¤¤¤¦ column ̾¤Ï½ÅÊ£¤·¤Æ¤Þ¤¹" + kor "Áߺ¹µÈ Ä®·³ À̸§: '%-.192s'" + nor "Feltnavnet '%-.192s' eksisterte fra før" + norwegian-ny "Feltnamnet '%-.192s' eksisterte frå før" + pol "Powtórzona nazwa kolumny '%-.192s'" + por "Nome da coluna '%-.192s' duplicado" + rum "Numele coloanei '%-.192s' e duplicat" + rus "äÕÂÌÉÒÕÀÝÅÅÓÑ ÉÍÑ ÓÔÏÌÂÃÁ '%-.192s'" + serbian "Duplirano ime kolone '%-.192s'" + slo "Opakované meno poµa '%-.192s'" + spa "Nombre de columna duplicado '%-.192s'" + swe "Kolumnnamn '%-.192s finns flera gånger" + ukr "äÕÂÌÀÀÞÅ ¦Í'Ñ ÓÔÏ×ÂÃÑ '%-.192s'" ER_DUP_KEYNAME 42000 S1009 - cze "Zdvojen-Bé jméno klíèe '%-.64s'" - dan "Indeksnavnet '%-.64s' findes allerede" - nla "Dubbele zoeksleutel naam '%-.64s'" - eng "Duplicate key name '%-.64s'" - jps "'%-.64s' ‚Æ‚¢‚¤ key ‚Ì–¼‘O‚Íd•¡‚µ‚Ä‚¢‚Ü‚·", - est "Kattuv võtme nimi '%-.64s'" - fre "Nom de clef '%-.64s' déjà utilisé" - ger "Doppelter Name für Schlüssel vorhanden: '%-.64s'" - greek "ÅðáíÜëçøç key name '%-.64s'" - hun "Duplikalt kulcsazonosito: '%-.64s'" - ita "Nome chiave duplicato '%-.64s'" - jpn "'%-.64s' ¤È¤¤¤¦ key ¤Î̾Á°¤Ï½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" - kor "Áߺ¹µÈ Ű À̸§ : '%-.64s'" - nor "Nøkkelnavnet '%-.64s' eksisterte fra før" - norwegian-ny "Nøkkelnamnet '%-.64s' eksisterte frå før" - pol "Powtórzony nazwa klucza '%-.64s'" - por "Nome da chave '%-.64s' duplicado" - rum "Numele cheiei '%-.64s' e duplicat" - rus "äÕÂÌÉÒÕÀÝÅÅÓÑ ÉÍÑ ËÌÀÞÁ '%-.64s'" - serbian "Duplirano ime kljuèa '%-.64s'" - slo "Opakované meno kµúèa '%-.64s'" - spa "Nombre de clave duplicado '%-.64s'" - swe "Nyckelnamn '%-.64s' finns flera gånger" - ukr "äÕÂÌÀÀÞÅ ¦Í'Ñ ËÌÀÞÁ '%-.64s'" + cze "Zdvojen-Bé jméno klíèe '%-.192s'" + dan "Indeksnavnet '%-.192s' findes allerede" + nla "Dubbele zoeksleutel naam '%-.192s'" + eng "Duplicate key name '%-.192s'" + jps "'%-.192s' ‚Æ‚¢‚¤ key ‚Ì–¼‘O‚Íd•¡‚µ‚Ä‚¢‚Ü‚·", + est "Kattuv võtme nimi '%-.192s'" + fre "Nom de clef '%-.192s' déjà utilisé" + ger "Doppelter Name für Schlüssel vorhanden: '%-.192s'" + greek "ÅðáíÜëçøç key name '%-.192s'" + hun "Duplikalt kulcsazonosito: '%-.192s'" + ita "Nome chiave duplicato '%-.192s'" + jpn "'%-.192s' ¤È¤¤¤¦ key ¤Î̾Á°¤Ï½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" + kor "Áߺ¹µÈ Ű À̸§ : '%-.192s'" + nor "Nøkkelnavnet '%-.192s' eksisterte fra før" + norwegian-ny "Nøkkelnamnet '%-.192s' eksisterte frå før" + pol "Powtórzony nazwa klucza '%-.192s'" + por "Nome da chave '%-.192s' duplicado" + rum "Numele cheiei '%-.192s' e duplicat" + rus "äÕÂÌÉÒÕÀÝÅÅÓÑ ÉÍÑ ËÌÀÞÁ '%-.192s'" + serbian "Duplirano ime kljuèa '%-.192s'" + slo "Opakované meno kµúèa '%-.192s'" + spa "Nombre de clave duplicado '%-.192s'" + swe "Nyckelnamn '%-.192s' finns flera gånger" + ukr "äÕÂÌÀÀÞÅ ¦Í'Ñ ËÌÀÞÁ '%-.192s'" ER_DUP_ENTRY 23000 S1009 - cze "Zdvojen-Bý klíè '%-.64s' (èíslo klíèe %d)" - dan "Ens værdier '%-.64s' for indeks %d" - nla "Dubbele ingang '%-.64s' voor zoeksleutel %d" - eng "Duplicate entry '%-.64s' for key %d" - jps "'%-.64s' ‚Í key %d ‚É‚¨‚¢‚Äd•¡‚µ‚Ä‚¢‚Ü‚·", - est "Kattuv väärtus '%-.64s' võtmele %d" - fre "Duplicata du champ '%-.64s' pour la clef %d" - ger "Doppelter Eintrag '%-.64s' für Schlüssel %d" - greek "ÄéðëÞ åããñáöÞ '%-.64s' ãéá ôï êëåéäß %d" - hun "Duplikalt bejegyzes '%-.64s' a %d kulcs szerint." - ita "Valore duplicato '%-.64s' per la chiave %d" - jpn "'%-.64s' ¤Ï key %d ¤Ë¤ª¤¤¤Æ½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" - kor "Áߺ¹µÈ ÀÔ·Â °ª '%-.64s': key %d" - nor "Like verdier '%-.64s' for nøkkel %d" - norwegian-ny "Like verdiar '%-.64s' for nykkel %d" - pol "Powtórzone wyst?pienie '%-.64s' dla klucza %d" - por "Entrada '%-.64s' duplicada para a chave %d" - rum "Cimpul '%-.64s' e duplicat pentru cheia %d" - rus "äÕÂÌÉÒÕÀÝÁÑÓÑ ÚÁÐÉÓØ '%-.64s' ÐÏ ËÌÀÞÕ %d" - serbian "Dupliran unos '%-.64s' za kljuè '%d'" - slo "Opakovaný kµúè '%-.64s' (èíslo kµúèa %d)" - spa "Entrada duplicada '%-.64s' para la clave %d" - swe "Dubbel nyckel '%-.64s' för nyckel %d" - ukr "äÕÂÌÀÀÞÉÊ ÚÁÐÉÓ '%-.64s' ÄÌÑ ËÌÀÞÁ %d" + cze "Zdvojen-Bý klíè '%-.192s' (èíslo klíèe %d)" + dan "Ens værdier '%-.192s' for indeks %d" + nla "Dubbele ingang '%-.192s' voor zoeksleutel %d" + eng "Duplicate entry '%-.192s' for key %d" + jps "'%-.192s' ‚Í key %d ‚É‚¨‚¢‚Äd•¡‚µ‚Ä‚¢‚Ü‚·", + est "Kattuv väärtus '%-.192s' võtmele %d" + fre "Duplicata du champ '%-.192s' pour la clef %d" + ger "Doppelter Eintrag '%-.192s' für Schlüssel %d" + greek "ÄéðëÞ åããñáöÞ '%-.192s' ãéá ôï êëåéäß %d" + hun "Duplikalt bejegyzes '%-.192s' a %d kulcs szerint." + ita "Valore duplicato '%-.192s' per la chiave %d" + jpn "'%-.192s' ¤Ï key %d ¤Ë¤ª¤¤¤Æ½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" + kor "Áߺ¹µÈ ÀÔ·Â °ª '%-.192s': key %d" + nor "Like verdier '%-.192s' for nøkkel %d" + norwegian-ny "Like verdiar '%-.192s' for nykkel %d" + pol "Powtórzone wyst?pienie '%-.192s' dla klucza %d" + por "Entrada '%-.192s' duplicada para a chave %d" + rum "Cimpul '%-.192s' e duplicat pentru cheia %d" + rus "äÕÂÌÉÒÕÀÝÁÑÓÑ ÚÁÐÉÓØ '%-.192s' ÐÏ ËÌÀÞÕ %d" + serbian "Dupliran unos '%-.192s' za kljuè '%d'" + slo "Opakovaný kµúè '%-.192s' (èíslo kµúèa %d)" + spa "Entrada duplicada '%-.192s' para la clave %d" + swe "Dubbel nyckel '%-.192s' för nyckel %d" + ukr "äÕÂÌÀÀÞÉÊ ÚÁÐÉÓ '%-.192s' ÄÌÑ ËÌÀÞÁ %d" ER_WRONG_FIELD_SPEC 42000 S1009 - cze "Chybn-Bá specifikace sloupce '%-.64s'" - dan "Forkert kolonnespecifikaton for felt '%-.64s'" - nla "Verkeerde kolom specificatie voor kolom '%-.64s'" - eng "Incorrect column specifier for column '%-.64s'" - est "Vigane tulba kirjeldus tulbale '%-.64s'" - fre "Mauvais paramètre de champ pour le champ '%-.64s'" - ger "Falsche Spezifikation für Feld '%-.64s'" - greek "ÅóöáëìÝíï column specifier ãéá ôï ðåäßï '%-.64s'" - hun "Rossz oszlopazonosito: '%-.64s'" - ita "Specifica errata per la colonna '%-.64s'" - kor "Ä®·³ '%-.64s'ÀÇ ºÎÁ¤È®ÇÑ Ä®·³ Á¤ÀÇÀÚ" - nor "Feil kolonne spesifikator for felt '%-.64s'" - norwegian-ny "Feil kolonne spesifikator for kolonne '%-.64s'" - pol "B³êdna specyfikacja kolumny dla kolumny '%-.64s'" - por "Especificador de coluna incorreto para a coluna '%-.64s'" - rum "Specificandul coloanei '%-.64s' este incorect" - rus "îÅËÏÒÒÅËÔÎÙÊ ÏÐÒÅÄÅÌÉÔÅÌØ ÓÔÏÌÂÃÁ ÄÌÑ ÓÔÏÌÂÃÁ '%-.64s'" - serbian "Pogrešan naziv kolone za kolonu '%-.64s'" - slo "Chyba v ¹pecifikácii poµa '%-.64s'" - spa "Especificador de columna erroneo para la columna '%-.64s'" - swe "Felaktigt kolumntyp för kolumn '%-.64s'" - ukr "îÅצÒÎÉÊ ÓÐÅÃÉÆ¦ËÁÔÏÒ ÓÔÏ×ÂÃÑ '%-.64s'" + cze "Chybn-Bá specifikace sloupce '%-.192s'" + dan "Forkert kolonnespecifikaton for felt '%-.192s'" + nla "Verkeerde kolom specificatie voor kolom '%-.192s'" + eng "Incorrect column specifier for column '%-.192s'" + est "Vigane tulba kirjeldus tulbale '%-.192s'" + fre "Mauvais paramètre de champ pour le champ '%-.192s'" + ger "Falsche Spezifikation für Feld '%-.192s'" + greek "ÅóöáëìÝíï column specifier ãéá ôï ðåäßï '%-.192s'" + hun "Rossz oszlopazonosito: '%-.192s'" + ita "Specifica errata per la colonna '%-.192s'" + kor "Ä®·³ '%-.192s'ÀÇ ºÎÁ¤È®ÇÑ Ä®·³ Á¤ÀÇÀÚ" + nor "Feil kolonne spesifikator for felt '%-.192s'" + norwegian-ny "Feil kolonne spesifikator for kolonne '%-.192s'" + pol "B³êdna specyfikacja kolumny dla kolumny '%-.192s'" + por "Especificador de coluna incorreto para a coluna '%-.192s'" + rum "Specificandul coloanei '%-.192s' este incorect" + rus "îÅËÏÒÒÅËÔÎÙÊ ÏÐÒÅÄÅÌÉÔÅÌØ ÓÔÏÌÂÃÁ ÄÌÑ ÓÔÏÌÂÃÁ '%-.192s'" + serbian "Pogrešan naziv kolone za kolonu '%-.192s'" + slo "Chyba v ¹pecifikácii poµa '%-.192s'" + spa "Especificador de columna erroneo para la columna '%-.192s'" + swe "Felaktigt kolumntyp för kolumn '%-.192s'" + ukr "îÅצÒÎÉÊ ÓÐÅÃÉÆ¦ËÁÔÏÒ ÓÔÏ×ÂÃÑ '%-.192s'" ER_PARSE_ERROR 42000 s1009 cze "%s bl-Bízko '%-.80s' na øádku %d" dan "%s nær '%-.80s' på linje %d" @@ -1577,53 +1577,53 @@ ER_EMPTY_QUERY 42000 swe "Frågan var tom" ukr "ðÕÓÔÉÊ ÚÁÐÉÔ" ER_NONUNIQ_TABLE 42000 S1009 - cze "Nejednozna-Bèná tabulka/alias: '%-.64s'" - dan "Tabellen/aliaset: '%-.64s' er ikke unikt" - nla "Niet unieke waarde tabel/alias: '%-.64s'" - eng "Not unique table/alias: '%-.64s'" - jps "'%-.64s' ‚͈êˆÓ‚Ì table/alias –¼‚ł͂ ‚è‚Ü‚¹‚ñ", - est "Ei ole unikaalne tabel/alias '%-.64s'" - fre "Table/alias: '%-.64s' non unique" - ger "Tabellenname/Alias '%-.64s' nicht eindeutig" - greek "Áäýíáôç ç áíåýñåóç unique table/alias: '%-.64s'" - hun "Nem egyedi tabla/alias: '%-.64s'" - ita "Tabella/alias non unico: '%-.64s'" - jpn "'%-.64s' ¤Ï°ì°Õ¤Î table/alias ̾¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" - kor "Unique ÇÏÁö ¾ÊÀº Å×À̺í/alias: '%-.64s'" - nor "Ikke unikt tabell/alias: '%-.64s'" - norwegian-ny "Ikkje unikt tabell/alias: '%-.64s'" - pol "Tabela/alias nie s? unikalne: '%-.64s'" - por "Tabela/alias '%-.64s' não única" - rum "Tabela/alias: '%-.64s' nu este unic" - rus "ðÏ×ÔÏÒÑÀÝÁÑÓÑ ÔÁÂÌÉÃÁ/ÐÓÅ×ÄÏÎÉÍ '%-.64s'" - serbian "Tabela ili alias nisu bili jedinstveni: '%-.64s'" - slo "Nie jednoznaèná tabuµka/alias: '%-.64s'" - spa "Tabla/alias: '%-.64s' es no unica" - swe "Icke unikt tabell/alias: '%-.64s'" - ukr "îÅÕΦËÁÌØÎÁ ÔÁÂÌÉÃÑ/ÐÓÅ×ÄÏΦÍ: '%-.64s'" + cze "Nejednozna-Bèná tabulka/alias: '%-.192s'" + dan "Tabellen/aliaset: '%-.192s' er ikke unikt" + nla "Niet unieke waarde tabel/alias: '%-.192s'" + eng "Not unique table/alias: '%-.192s'" + jps "'%-.192s' ‚͈êˆÓ‚Ì table/alias –¼‚ł͂ ‚è‚Ü‚¹‚ñ", + est "Ei ole unikaalne tabel/alias '%-.192s'" + fre "Table/alias: '%-.192s' non unique" + ger "Tabellenname/Alias '%-.192s' nicht eindeutig" + greek "Áäýíáôç ç áíåýñåóç unique table/alias: '%-.192s'" + hun "Nem egyedi tabla/alias: '%-.192s'" + ita "Tabella/alias non unico: '%-.192s'" + jpn "'%-.192s' ¤Ï°ì°Õ¤Î table/alias ̾¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó" + kor "Unique ÇÏÁö ¾ÊÀº Å×À̺í/alias: '%-.192s'" + nor "Ikke unikt tabell/alias: '%-.192s'" + norwegian-ny "Ikkje unikt tabell/alias: '%-.192s'" + pol "Tabela/alias nie s? unikalne: '%-.192s'" + por "Tabela/alias '%-.192s' não única" + rum "Tabela/alias: '%-.192s' nu este unic" + rus "ðÏ×ÔÏÒÑÀÝÁÑÓÑ ÔÁÂÌÉÃÁ/ÐÓÅ×ÄÏÎÉÍ '%-.192s'" + serbian "Tabela ili alias nisu bili jedinstveni: '%-.192s'" + slo "Nie jednoznaèná tabuµka/alias: '%-.192s'" + spa "Tabla/alias: '%-.192s' es no unica" + swe "Icke unikt tabell/alias: '%-.192s'" + ukr "îÅÕΦËÁÌØÎÁ ÔÁÂÌÉÃÑ/ÐÓÅ×ÄÏΦÍ: '%-.192s'" ER_INVALID_DEFAULT 42000 S1009 - cze "Chybn-Bá defaultní hodnota pro '%-.64s'" - dan "Ugyldig standardværdi for '%-.64s'" - nla "Foutieve standaard waarde voor '%-.64s'" - eng "Invalid default value for '%-.64s'" - est "Vigane vaikeväärtus '%-.64s' jaoks" - fre "Valeur par défaut invalide pour '%-.64s'" - ger "Fehlerhafter Vorgabewert (DEFAULT) für '%-.64s'" - greek "ÅóöáëìÝíç ðñïêáèïñéóìÝíç ôéìÞ (default value) ãéá '%-.64s'" - hun "Ervenytelen ertek: '%-.64s'" - ita "Valore di default non valido per '%-.64s'" - kor "'%-.64s'ÀÇ À¯È¿ÇÏÁö ¸øÇÑ µðÆúÆ® °ªÀ» »ç¿ëÇϼ̽À´Ï´Ù." - nor "Ugyldig standardverdi for '%-.64s'" - norwegian-ny "Ugyldig standardverdi for '%-.64s'" - pol "Niew³a?ciwa warto?æ domy?lna dla '%-.64s'" - por "Valor padrão (default) inválido para '%-.64s'" - rum "Valoarea de default este invalida pentru '%-.64s'" - rus "îÅËÏÒÒÅËÔÎÏÅ ÚÎÁÞÅÎÉÅ ÐÏ ÕÍÏÌÞÁÎÉÀ ÄÌÑ '%-.64s'" - serbian "Loša default vrednost za '%-.64s'" - slo "Chybná implicitná hodnota pre '%-.64s'" - spa "Valor por defecto invalido para '%-.64s'" - swe "Ogiltigt DEFAULT värde för '%-.64s'" - ukr "îÅצÒÎÅ ÚÎÁÞÅÎÎÑ ÐÏ ÚÁÍÏ×ÞÕ×ÁÎÎÀ ÄÌÑ '%-.64s'" + cze "Chybn-Bá defaultní hodnota pro '%-.192s'" + dan "Ugyldig standardværdi for '%-.192s'" + nla "Foutieve standaard waarde voor '%-.192s'" + eng "Invalid default value for '%-.192s'" + est "Vigane vaikeväärtus '%-.192s' jaoks" + fre "Valeur par défaut invalide pour '%-.192s'" + ger "Fehlerhafter Vorgabewert (DEFAULT) für '%-.192s'" + greek "ÅóöáëìÝíç ðñïêáèïñéóìÝíç ôéìÞ (default value) ãéá '%-.192s'" + hun "Ervenytelen ertek: '%-.192s'" + ita "Valore di default non valido per '%-.192s'" + kor "'%-.192s'ÀÇ À¯È¿ÇÏÁö ¸øÇÑ µðÆúÆ® °ªÀ» »ç¿ëÇϼ̽À´Ï´Ù." + nor "Ugyldig standardverdi for '%-.192s'" + norwegian-ny "Ugyldig standardverdi for '%-.192s'" + pol "Niew³a?ciwa warto?æ domy?lna dla '%-.192s'" + por "Valor padrão (default) inválido para '%-.192s'" + rum "Valoarea de default este invalida pentru '%-.192s'" + rus "îÅËÏÒÒÅËÔÎÏÅ ÚÎÁÞÅÎÉÅ ÐÏ ÕÍÏÌÞÁÎÉÀ ÄÌÑ '%-.192s'" + serbian "Loša default vrednost za '%-.192s'" + slo "Chybná implicitná hodnota pre '%-.192s'" + spa "Valor por defecto invalido para '%-.192s'" + swe "Ogiltigt DEFAULT värde för '%-.192s'" + ukr "îÅצÒÎÅ ÚÎÁÞÅÎÎÑ ÐÏ ÚÁÍÏ×ÞÕ×ÁÎÎÀ ÄÌÑ '%-.192s'" ER_MULTIPLE_PRI_KEY 42000 S1009 cze "Definov-Báno více primárních klíèù" dan "Flere primærnøgler specificeret" @@ -1723,78 +1723,78 @@ ER_TOO_LONG_KEY 42000 S1009 swe "För lång nyckel. Högsta tillåtna nyckellängd är %d" ukr "úÁÚÎÁÞÅÎÉÊ ËÌÀÞ ÚÁÄÏ×ÇÉÊ. îÁÊÂ¦ÌØÛÁ ÄÏ×ÖÉÎÁ ËÌÀÞÁ %d ÂÁÊÔ¦×" ER_KEY_COLUMN_DOES_NOT_EXITS 42000 S1009 - cze "Kl-Bíèový sloupec '%-.64s' v tabulce neexistuje" - dan "Nøglefeltet '%-.64s' eksisterer ikke i tabellen" - nla "Zoeksleutel kolom '%-.64s' bestaat niet in tabel" - eng "Key column '%-.64s' doesn't exist in table" - jps "Key column '%-.64s' ‚ªƒe[ƒuƒ‹‚É‚ ‚è‚Ü‚¹‚ñ.", - est "Võtme tulp '%-.64s' puudub tabelis" - fre "La clé '%-.64s' n'existe pas dans la table" - ger "In der Tabelle gibt es kein Schlüsselfeld '%-.64s'" - greek "Ôï ðåäßï êëåéäß '%-.64s' äåí õðÜñ÷åé óôïí ðßíáêá" - hun "A(z) '%-.64s'kulcsoszlop nem letezik a tablaban" - ita "La colonna chiave '%-.64s' non esiste nella tabella" - jpn "Key column '%-.64s' ¤¬¥Æ¡¼¥Ö¥ë¤Ë¤¢¤ê¤Þ¤»¤ó." - kor "Key Ä®·³ '%-.64s'´Â Å×ÀÌºí¿¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù." - nor "Nøkkel felt '%-.64s' eksiterer ikke i tabellen" - norwegian-ny "Nykkel kolonne '%-.64s' eksiterar ikkje i tabellen" - pol "Kolumna '%-.64s' zdefiniowana w kluczu nie istnieje w tabeli" - por "Coluna chave '%-.64s' não existe na tabela" - rum "Coloana cheie '%-.64s' nu exista in tabela" - rus "ëÌÀÞÅ×ÏÊ ÓÔÏÌÂÅà '%-.64s' × ÔÁÂÌÉÃÅ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ" - serbian "Kljuèna kolona '%-.64s' ne postoji u tabeli" - slo "Kµúèový ståpec '%-.64s' v tabuµke neexistuje" - spa "La columna clave '%-.64s' no existe en la tabla" - swe "Nyckelkolumn '%-.64s' finns inte" - ukr "ëÌÀÞÏ×ÉÊ ÓÔÏ×ÂÅÃØ '%-.64s' ÎÅ ¦ÓÎÕ¤ Õ ÔÁÂÌÉæ" + cze "Kl-Bíèový sloupec '%-.192s' v tabulce neexistuje" + dan "Nøglefeltet '%-.192s' eksisterer ikke i tabellen" + nla "Zoeksleutel kolom '%-.192s' bestaat niet in tabel" + eng "Key column '%-.192s' doesn't exist in table" + jps "Key column '%-.192s' ‚ªƒe[ƒuƒ‹‚É‚ ‚è‚Ü‚¹‚ñ.", + est "Võtme tulp '%-.192s' puudub tabelis" + fre "La clé '%-.192s' n'existe pas dans la table" + ger "In der Tabelle gibt es kein Schlüsselfeld '%-.192s'" + greek "Ôï ðåäßï êëåéäß '%-.192s' äåí õðÜñ÷åé óôïí ðßíáêá" + hun "A(z) '%-.192s'kulcsoszlop nem letezik a tablaban" + ita "La colonna chiave '%-.192s' non esiste nella tabella" + jpn "Key column '%-.192s' ¤¬¥Æ¡¼¥Ö¥ë¤Ë¤¢¤ê¤Þ¤»¤ó." + kor "Key Ä®·³ '%-.192s'´Â Å×ÀÌºí¿¡ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù." + nor "Nøkkel felt '%-.192s' eksiterer ikke i tabellen" + norwegian-ny "Nykkel kolonne '%-.192s' eksiterar ikkje i tabellen" + pol "Kolumna '%-.192s' zdefiniowana w kluczu nie istnieje w tabeli" + por "Coluna chave '%-.192s' não existe na tabela" + rum "Coloana cheie '%-.192s' nu exista in tabela" + rus "ëÌÀÞÅ×ÏÊ ÓÔÏÌÂÅà '%-.192s' × ÔÁÂÌÉÃÅ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ" + serbian "Kljuèna kolona '%-.192s' ne postoji u tabeli" + slo "Kµúèový ståpec '%-.192s' v tabuµke neexistuje" + spa "La columna clave '%-.192s' no existe en la tabla" + swe "Nyckelkolumn '%-.192s' finns inte" + ukr "ëÌÀÞÏ×ÉÊ ÓÔÏ×ÂÅÃØ '%-.192s' ÎÅ ¦ÓÎÕ¤ Õ ÔÁÂÌÉæ" ER_BLOB_USED_AS_KEY 42000 S1009 - cze "Blob sloupec '%-.64s' nem-Bù¾e být pou¾it jako klíè" - dan "BLOB feltet '%-.64s' kan ikke bruges ved specifikation af indeks" - nla "BLOB kolom '%-.64s' kan niet gebruikt worden bij zoeksleutel specificatie" - eng "BLOB column '%-.64s' can't be used in key specification with the used table type" - est "BLOB-tüüpi tulpa '%-.64s' ei saa kasutada võtmena" - fre "Champ BLOB '%-.64s' ne peut être utilisé dans une clé" - ger "BLOB-Feld '%-.64s' kann beim verwendeten Tabellentyp nicht als Schlüssel verwendet werden" - greek "Ðåäßï ôýðïõ Blob '%-.64s' äåí ìðïñåß íá ÷ñçóéìïðïéçèåß óôïí ïñéóìü åíüò êëåéäéïý (key specification)" - hun "Blob objektum '%-.64s' nem hasznalhato kulcskent" - ita "La colonna BLOB '%-.64s' non puo` essere usata nella specifica della chiave" - kor "BLOB Ä®·³ '%-.64s'´Â Ű Á¤ÀÇ¿¡¼­ »ç¿ëµÉ ¼ö ¾ø½À´Ï´Ù." - nor "Blob felt '%-.64s' kan ikke brukes ved spesifikasjon av nøkler" - norwegian-ny "Blob kolonne '%-.64s' kan ikkje brukast ved spesifikasjon av nyklar" - pol "Kolumna typu Blob '%-.64s' nie mo¿e byæ u¿yta w specyfikacji klucza" - por "Coluna BLOB '%-.64s' não pode ser utilizada na especificação de chave para o tipo de tabela usado" - rum "Coloana de tip BLOB '%-.64s' nu poate fi folosita in specificarea cheii cu tipul de tabla folosit" - rus "óÔÏÌÂÅà ÔÉÐÁ BLOB '%-.64s' ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎ ËÁË ÚÎÁÞÅÎÉÅ ËÌÀÞÁ × ÔÁÂÌÉÃÅ ÔÁËÏÇÏ ÔÉÐÁ" - serbian "BLOB kolona '%-.64s' ne može biti upotrebljena za navoðenje kljuèa sa tipom tabele koji se trenutno koristi" - slo "Blob pole '%-.64s' nemô¾e by» pou¾ité ako kµúè" - spa "La columna Blob '%-.64s' no puede ser usada en una declaracion de clave" - swe "En BLOB '%-.64s' kan inte vara nyckel med den använda tabelltypen" - ukr "BLOB ÓÔÏ×ÂÅÃØ '%-.64s' ÎÅ ÍÏÖÅ ÂÕÔÉ ×ÉËÏÒÉÓÔÁÎÉÊ Õ ×ÉÚÎÁÞÅÎΦ ËÌÀÞÁ × ÃØÏÍÕ ÔÉЦ ÔÁÂÌÉæ" + cze "Blob sloupec '%-.192s' nem-Bù¾e být pou¾it jako klíè" + dan "BLOB feltet '%-.192s' kan ikke bruges ved specifikation af indeks" + nla "BLOB kolom '%-.192s' kan niet gebruikt worden bij zoeksleutel specificatie" + eng "BLOB column '%-.192s' can't be used in key specification with the used table type" + est "BLOB-tüüpi tulpa '%-.192s' ei saa kasutada võtmena" + fre "Champ BLOB '%-.192s' ne peut être utilisé dans une clé" + ger "BLOB-Feld '%-.192s' kann beim verwendeten Tabellentyp nicht als Schlüssel verwendet werden" + greek "Ðåäßï ôýðïõ Blob '%-.192s' äåí ìðïñåß íá ÷ñçóéìïðïéçèåß óôïí ïñéóìü åíüò êëåéäéïý (key specification)" + hun "Blob objektum '%-.192s' nem hasznalhato kulcskent" + ita "La colonna BLOB '%-.192s' non puo` essere usata nella specifica della chiave" + kor "BLOB Ä®·³ '%-.192s'´Â Ű Á¤ÀÇ¿¡¼­ »ç¿ëµÉ ¼ö ¾ø½À´Ï´Ù." + nor "Blob felt '%-.192s' kan ikke brukes ved spesifikasjon av nøkler" + norwegian-ny "Blob kolonne '%-.192s' kan ikkje brukast ved spesifikasjon av nyklar" + pol "Kolumna typu Blob '%-.192s' nie mo¿e byæ u¿yta w specyfikacji klucza" + por "Coluna BLOB '%-.192s' não pode ser utilizada na especificação de chave para o tipo de tabela usado" + rum "Coloana de tip BLOB '%-.192s' nu poate fi folosita in specificarea cheii cu tipul de tabla folosit" + rus "óÔÏÌÂÅà ÔÉÐÁ BLOB '%-.192s' ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎ ËÁË ÚÎÁÞÅÎÉÅ ËÌÀÞÁ × ÔÁÂÌÉÃÅ ÔÁËÏÇÏ ÔÉÐÁ" + serbian "BLOB kolona '%-.192s' ne može biti upotrebljena za navoðenje kljuèa sa tipom tabele koji se trenutno koristi" + slo "Blob pole '%-.192s' nemô¾e by» pou¾ité ako kµúè" + spa "La columna Blob '%-.192s' no puede ser usada en una declaracion de clave" + swe "En BLOB '%-.192s' kan inte vara nyckel med den använda tabelltypen" + ukr "BLOB ÓÔÏ×ÂÅÃØ '%-.192s' ÎÅ ÍÏÖÅ ÂÕÔÉ ×ÉËÏÒÉÓÔÁÎÉÊ Õ ×ÉÚÎÁÞÅÎΦ ËÌÀÞÁ × ÃØÏÍÕ ÔÉЦ ÔÁÂÌÉæ" ER_TOO_BIG_FIELDLENGTH 42000 S1009 - cze "P-Bøíli¹ velká délka sloupce '%-.64s' (nejvíce %d). Pou¾ijte BLOB" - dan "For stor feltlængde for kolonne '%-.64s' (maks = %d). Brug BLOB i stedet" - nla "Te grote kolomlengte voor '%-.64s' (max = %d). Maak hiervoor gebruik van het type BLOB" - eng "Column length too big for column '%-.64s' (max = %d); use BLOB or TEXT instead" - jps "column '%-.64s' ‚Í,Šm•Û‚·‚é column ‚̑傫‚³‚ª‘½‚·‚¬‚Ü‚·. (Å‘å %d ‚Ü‚Å). BLOB ‚ð‚©‚í‚è‚ÉŽg—p‚µ‚Ä‚­‚¾‚³‚¢.", - est "Tulba '%-.64s' pikkus on liiga pikk (maksimaalne pikkus: %d). Kasuta BLOB väljatüüpi" - fre "Champ '%-.64s' trop long (max = %d). Utilisez un BLOB" - ger "Feldlänge für Feld '%-.64s' zu groß (maximal %d). BLOB- oder TEXT-Spaltentyp verwenden!" - greek "Ðïëý ìåãÜëï ìÞêïò ãéá ôï ðåäßï '%-.64s' (max = %d). Ðáñáêáëþ ÷ñçóéìïðïéåßóôå ôïí ôýðï BLOB" - hun "A(z) '%-.64s' oszlop tul hosszu. (maximum = %d). Hasznaljon BLOB tipust inkabb." - ita "La colonna '%-.64s' e` troppo grande (max=%d). Utilizza un BLOB." - jpn "column '%-.64s' ¤Ï,³ÎÊݤ¹¤ë column ¤ÎÂ礭¤µ¤¬Â¿¤¹¤®¤Þ¤¹. (ºÇÂç %d ¤Þ¤Ç). BLOB ¤ò¤«¤ï¤ê¤Ë»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤." - kor "Ä®·³ '%-.64s'ÀÇ Ä®·³ ±æÀ̰¡ ³Ê¹« ±é´Ï´Ù (ÃÖ´ë = %d). ´ë½Å¿¡ BLOB¸¦ »ç¿ëÇϼ¼¿ä." - nor "For stor nøkkellengde for kolonne '%-.64s' (maks = %d). Bruk BLOB istedenfor" - norwegian-ny "For stor nykkellengde for felt '%-.64s' (maks = %d). Bruk BLOB istadenfor" - pol "Zbyt du¿a d³ugo?æ kolumny '%-.64s' (maks. = %d). W zamian u¿yj typu BLOB" - por "Comprimento da coluna '%-.64s' grande demais (max = %d); use BLOB em seu lugar" - rum "Lungimea coloanei '%-.64s' este prea lunga (maximum = %d). Foloseste BLOB mai bine" - rus "óÌÉÛËÏÍ ÂÏÌØÛÁÑ ÄÌÉÎÁ ÓÔÏÌÂÃÁ '%-.64s' (ÍÁËÓÉÍÕÍ = %d). éÓÐÏÌØÚÕÊÔÅ ÔÉÐ BLOB ÉÌÉ TEXT ×ÍÅÓÔÏ ÔÅËÕÝÅÇÏ" - serbian "Previše podataka za kolonu '%-.64s' (maksimum je %d). Upotrebite BLOB polje" - slo "Príli¹ veµká då¾ka pre pole '%-.64s' (maximum = %d). Pou¾ite BLOB" - spa "Longitud de columna demasiado grande para la columna '%-.64s' (maximo = %d).Usar BLOB en su lugar" - swe "För stor kolumnlängd angiven för '%-.64s' (max= %d). Använd en BLOB instället" - ukr "úÁÄÏ×ÇÁ ÄÏ×ÖÉÎÁ ÓÔÏ×ÂÃÑ '%-.64s' (max = %d). ÷ÉËÏÒÉÓÔÁÊÔÅ ÔÉÐ BLOB" + cze "P-Bøíli¹ velká délka sloupce '%-.192s' (nejvíce %d). Pou¾ijte BLOB" + dan "For stor feltlængde for kolonne '%-.192s' (maks = %d). Brug BLOB i stedet" + nla "Te grote kolomlengte voor '%-.192s' (max = %d). Maak hiervoor gebruik van het type BLOB" + eng "Column length too big for column '%-.192s' (max = %d); use BLOB or TEXT instead" + jps "column '%-.192s' ‚Í,Šm•Û‚·‚é column ‚̑傫‚³‚ª‘½‚·‚¬‚Ü‚·. (Å‘å %d ‚Ü‚Å). BLOB ‚ð‚©‚í‚è‚ÉŽg—p‚µ‚Ä‚­‚¾‚³‚¢.", + est "Tulba '%-.192s' pikkus on liiga pikk (maksimaalne pikkus: %d). Kasuta BLOB väljatüüpi" + fre "Champ '%-.192s' trop long (max = %d). Utilisez un BLOB" + ger "Feldlänge für Feld '%-.192s' zu groß (maximal %d). BLOB- oder TEXT-Spaltentyp verwenden!" + greek "Ðïëý ìåãÜëï ìÞêïò ãéá ôï ðåäßï '%-.192s' (max = %d). Ðáñáêáëþ ÷ñçóéìïðïéåßóôå ôïí ôýðï BLOB" + hun "A(z) '%-.192s' oszlop tul hosszu. (maximum = %d). Hasznaljon BLOB tipust inkabb." + ita "La colonna '%-.192s' e` troppo grande (max=%d). Utilizza un BLOB." + jpn "column '%-.192s' ¤Ï,³ÎÊݤ¹¤ë column ¤ÎÂ礭¤µ¤¬Â¿¤¹¤®¤Þ¤¹. (ºÇÂç %d ¤Þ¤Ç). BLOB ¤ò¤«¤ï¤ê¤Ë»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤." + kor "Ä®·³ '%-.192s'ÀÇ Ä®·³ ±æÀ̰¡ ³Ê¹« ±é´Ï´Ù (ÃÖ´ë = %d). ´ë½Å¿¡ BLOB¸¦ »ç¿ëÇϼ¼¿ä." + nor "For stor nøkkellengde for kolonne '%-.192s' (maks = %d). Bruk BLOB istedenfor" + norwegian-ny "For stor nykkellengde for felt '%-.192s' (maks = %d). Bruk BLOB istadenfor" + pol "Zbyt du¿a d³ugo?æ kolumny '%-.192s' (maks. = %d). W zamian u¿yj typu BLOB" + por "Comprimento da coluna '%-.192s' grande demais (max = %d); use BLOB em seu lugar" + rum "Lungimea coloanei '%-.192s' este prea lunga (maximum = %d). Foloseste BLOB mai bine" + rus "óÌÉÛËÏÍ ÂÏÌØÛÁÑ ÄÌÉÎÁ ÓÔÏÌÂÃÁ '%-.192s' (ÍÁËÓÉÍÕÍ = %d). éÓÐÏÌØÚÕÊÔÅ ÔÉÐ BLOB ÉÌÉ TEXT ×ÍÅÓÔÏ ÔÅËÕÝÅÇÏ" + serbian "Previše podataka za kolonu '%-.192s' (maksimum je %d). Upotrebite BLOB polje" + slo "Príli¹ veµká då¾ka pre pole '%-.192s' (maximum = %d). Pou¾ite BLOB" + spa "Longitud de columna demasiado grande para la columna '%-.192s' (maximo = %d).Usar BLOB en su lugar" + swe "För stor kolumnlängd angiven för '%-.192s' (max= %d). Använd en BLOB instället" + ukr "úÁÄÏ×ÇÁ ÄÏ×ÖÉÎÁ ÓÔÏ×ÂÃÑ '%-.192s' (max = %d). ÷ÉËÏÒÉÓÔÁÊÔÅ ÔÉÐ BLOB" ER_WRONG_AUTO_KEY 42000 S1009 cze "M-Bù¾ete mít pouze jedno AUTO pole a to musí být definováno jako klíè" dan "Der kan kun specificeres eet AUTO_INCREMENT-felt, og det skal være indekseret" @@ -1919,30 +1919,30 @@ ER_SHUTDOWN_COMPLETE swe "%s: Avslutning klar\n" ukr "%s: òÏÂÏÔÕ ÚÁ×ÅÒÛÅÎÏ\n" ER_FORCING_CLOSE 08S01 - cze "%s: n-Básilné uzavøení threadu %ld u¾ivatele '%-.32s'\n" - dan "%s: Forceret nedlukning af tråd: %ld bruger: '%-.32s'\n" - nla "%s: Afsluiten afgedwongen van thread %ld gebruiker: '%-.32s'\n" - eng "%s: Forcing close of thread %ld user: '%-.32s'\n" - jps "%s: ƒXƒŒƒbƒh %ld ‹­§I—¹ user: '%-.32s'\n", - est "%s: Sulgen jõuga lõime %ld kasutaja: '%-.32s'\n" - fre "%s: Arrêt forcé de la tâche (thread) %ld utilisateur: '%-.32s'\n" - ger "%s: Thread %ld zwangsweise beendet. Benutzer: '%-.32s'\n" - greek "%s: Ôï thread èá êëåßóåé %ld user: '%-.32s'\n" - hun "%s: A(z) %ld thread kenyszeritett zarasa. Felhasznalo: '%-.32s'\n" - ita "%s: Forzata la chiusura del thread %ld utente: '%-.32s'\n" - jpn "%s: ¥¹¥ì¥Ã¥É %ld ¶¯À©½ªÎ» user: '%-.32s'\n" - kor "%s: thread %ldÀÇ °­Á¦ Á¾·á user: '%-.32s'\n" - nor "%s: Påtvinget avslutning av tråd %ld bruker: '%-.32s'\n" - norwegian-ny "%s: Påtvinga avslutning av tråd %ld brukar: '%-.32s'\n" - pol "%s: Wymuszenie zamkniêcia w?tku %ld u¿ytkownik: '%-.32s'\n" - por "%s: Forçando finalização da 'thread' %ld - usuário '%-.32s'\n" - rum "%s: Terminare fortata a thread-ului %ld utilizatorului: '%-.32s'\n" - rus "%s: ðÒÉÎÕÄÉÔÅÌØÎÏ ÚÁËÒÙ×ÁÅÍ ÐÏÔÏË %ld ÐÏÌØÚÏ×ÁÔÅÌÑ: '%-.32s'\n" - serbian "%s: Usiljeno gašenje thread-a %ld koji pripada korisniku: '%-.32s'\n" - slo "%s: násilné ukonèenie vlákna %ld u¾ívateµa '%-.32s'\n" - spa "%s: Forzando a cerrar el thread %ld usuario: '%-.32s'\n" - swe "%s: Stänger av tråd %ld; användare: '%-.32s'\n" - ukr "%s: ðÒÉÓËÏÒÀÀ ÚÁËÒÉÔÔÑ Ç¦ÌËÉ %ld ËÏÒÉÓÔÕ×ÁÞÁ: '%-.32s'\n" + cze "%s: n-Básilné uzavøení threadu %ld u¾ivatele '%-.48s'\n" + dan "%s: Forceret nedlukning af tråd: %ld bruger: '%-.48s'\n" + nla "%s: Afsluiten afgedwongen van thread %ld gebruiker: '%-.48s'\n" + eng "%s: Forcing close of thread %ld user: '%-.48s'\n" + jps "%s: ƒXƒŒƒbƒh %ld ‹­§I—¹ user: '%-.48s'\n", + est "%s: Sulgen jõuga lõime %ld kasutaja: '%-.48s'\n" + fre "%s: Arrêt forcé de la tâche (thread) %ld utilisateur: '%-.48s'\n" + ger "%s: Thread %ld zwangsweise beendet. Benutzer: '%-.48s'\n" + greek "%s: Ôï thread èá êëåßóåé %ld user: '%-.48s'\n" + hun "%s: A(z) %ld thread kenyszeritett zarasa. Felhasznalo: '%-.48s'\n" + ita "%s: Forzata la chiusura del thread %ld utente: '%-.48s'\n" + jpn "%s: ¥¹¥ì¥Ã¥É %ld ¶¯À©½ªÎ» user: '%-.48s'\n" + kor "%s: thread %ldÀÇ °­Á¦ Á¾·á user: '%-.48s'\n" + nor "%s: Påtvinget avslutning av tråd %ld bruker: '%-.48s'\n" + norwegian-ny "%s: Påtvinga avslutning av tråd %ld brukar: '%-.48s'\n" + pol "%s: Wymuszenie zamkniêcia w?tku %ld u¿ytkownik: '%-.48s'\n" + por "%s: Forçando finalização da 'thread' %ld - usuário '%-.48s'\n" + rum "%s: Terminare fortata a thread-ului %ld utilizatorului: '%-.48s'\n" + rus "%s: ðÒÉÎÕÄÉÔÅÌØÎÏ ÚÁËÒÙ×ÁÅÍ ÐÏÔÏË %ld ÐÏÌØÚÏ×ÁÔÅÌÑ: '%-.48s'\n" + serbian "%s: Usiljeno gašenje thread-a %ld koji pripada korisniku: '%-.48s'\n" + slo "%s: násilné ukonèenie vlákna %ld u¾ívateµa '%-.48s'\n" + spa "%s: Forzando a cerrar el thread %ld usuario: '%-.48s'\n" + swe "%s: Stänger av tråd %ld; användare: '%-.48s'\n" + ukr "%s: ðÒÉÓËÏÒÀÀ ÚÁËÒÉÔÔÑ Ç¦ÌËÉ %ld ËÏÒÉÓÔÕ×ÁÞÁ: '%-.48s'\n" ER_IPSOCK_ERROR 08S01 cze "Nemohu vytvo-Bøit IP socket" dan "Kan ikke oprette IP socket" @@ -1969,30 +1969,30 @@ ER_IPSOCK_ERROR 08S01 swe "Kan inte skapa IP-socket" ukr "îÅ ÍÏÖÕ ÓÔ×ÏÒÉÔÉ IP ÒÏÚ'¤Í" ER_NO_SUCH_INDEX 42S12 S1009 - cze "Tabulka '%-.64s' nem-Bá index odpovídající CREATE INDEX. Vytvoøte tabulku znovu" - dan "Tabellen '%-.64s' har ikke den nøgle, som blev brugt i CREATE INDEX. Genopret tabellen" - nla "Tabel '%-.64s' heeft geen INDEX zoals deze gemaakt worden met CREATE INDEX. Maak de tabel opnieuw" - eng "Table '%-.64s' has no index like the one used in CREATE INDEX; recreate the table" - jps "Table '%-.64s' ‚Í‚»‚̂悤‚È index ‚ðŽ‚Á‚Ä‚¢‚Ü‚¹‚ñ(CREATE INDEX ŽÀsŽž‚ÉŽw’肳‚ê‚Ä‚¢‚Ü‚¹‚ñ). ƒe[ƒuƒ‹‚ðì‚è’¼‚µ‚Ä‚­‚¾‚³‚¢", - est "Tabelil '%-.64s' puuduvad võtmed. Loo tabel uuesti" - fre "La table '%-.64s' n'a pas d'index comme celle utilisée dans CREATE INDEX. Recréez la table" - ger "Tabelle '%-.64s' besitzt keinen wie den in CREATE INDEX verwendeten Index. Tabelle neu anlegen" - greek "Ï ðßíáêáò '%-.64s' äåí Ý÷åé åõñåôÞñéï (index) óáí áõôü ðïõ ÷ñçóéìïðïéåßôå óôçí CREATE INDEX. Ðáñáêáëþ, îáíáäçìéïõñãÞóôå ôïí ðßíáêá" - hun "A(z) '%-.64s' tablahoz nincs meg a CREATE INDEX altal hasznalt index. Alakitsa at a tablat" - ita "La tabella '%-.64s' non ha nessun indice come quello specificatato dalla CREATE INDEX. Ricrea la tabella" - jpn "Table '%-.64s' ¤Ï¤½¤Î¤è¤¦¤Ê index ¤ò»ý¤Ã¤Æ¤¤¤Þ¤»¤ó(CREATE INDEX ¼Â¹Ô»þ¤Ë»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó). ¥Æ¡¼¥Ö¥ë¤òºî¤êľ¤·¤Æ¤¯¤À¤µ¤¤" - kor "Å×À̺í '%-.64s'´Â À妽º¸¦ ¸¸µéÁö ¾Ê¾Ò½À´Ï´Ù. alter Å×À̺í¸í·ÉÀ» ÀÌ¿ëÇÏ¿© Å×À̺íÀ» ¼öÁ¤Çϼ¼¿ä..." - nor "Tabellen '%-.64s' har ingen index som den som er brukt i CREATE INDEX. Gjenopprett tabellen" - norwegian-ny "Tabellen '%-.64s' har ingen index som den som er brukt i CREATE INDEX. Oprett tabellen på nytt" - pol "Tabela '%-.64s' nie ma indeksu takiego jak w CREATE INDEX. Stwórz tabelê" - por "Tabela '%-.64s' não possui um índice como o usado em CREATE INDEX. Recrie a tabela" - rum "Tabela '%-.64s' nu are un index ca acela folosit in CREATE INDEX. Re-creeaza tabela" - rus "÷ ÔÁÂÌÉÃÅ '%-.64s' ÎÅÔ ÔÁËÏÇÏ ÉÎÄÅËÓÁ, ËÁË × CREATE INDEX. óÏÚÄÁÊÔÅ ÔÁÂÌÉÃÕ ÚÁÎÏ×Ï" - serbian "Tabela '%-.64s' nema isti indeks kao onaj upotrebljen pri komandi 'CREATE INDEX'. Napravite tabelu ponovo" - slo "Tabuµka '%-.64s' nemá index zodpovedajúci CREATE INDEX. Vytvorte tabulku znova" - spa "La tabla '%-.64s' no tiene indice como el usado en CREATE INDEX. Crea de nuevo la tabla" - swe "Tabellen '%-.64s' har inget index som motsvarar det angivna i CREATE INDEX. Skapa om tabellen" - ukr "ôÁÂÌÉÃÑ '%-.64s' ÍÁ¤ ¦ÎÄÅËÓ, ÝÏ ÎÅ ÓЦ×ÐÁÄÁ¤ Ú ×ËÁÚÁÎÎÉÍ Õ CREATE INDEX. óÔ×ÏÒ¦ÔØ ÔÁÂÌÉÃÀ ÚÎÏ×Õ" + cze "Tabulka '%-.192s' nem-Bá index odpovídající CREATE INDEX. Vytvoøte tabulku znovu" + dan "Tabellen '%-.192s' har ikke den nøgle, som blev brugt i CREATE INDEX. Genopret tabellen" + nla "Tabel '%-.192s' heeft geen INDEX zoals deze gemaakt worden met CREATE INDEX. Maak de tabel opnieuw" + eng "Table '%-.192s' has no index like the one used in CREATE INDEX; recreate the table" + jps "Table '%-.192s' ‚Í‚»‚̂悤‚È index ‚ðŽ‚Á‚Ä‚¢‚Ü‚¹‚ñ(CREATE INDEX ŽÀsŽž‚ÉŽw’肳‚ê‚Ä‚¢‚Ü‚¹‚ñ). ƒe[ƒuƒ‹‚ðì‚è’¼‚µ‚Ä‚­‚¾‚³‚¢", + est "Tabelil '%-.192s' puuduvad võtmed. Loo tabel uuesti" + fre "La table '%-.192s' n'a pas d'index comme celle utilisée dans CREATE INDEX. Recréez la table" + ger "Tabelle '%-.192s' besitzt keinen wie den in CREATE INDEX verwendeten Index. Tabelle neu anlegen" + greek "Ï ðßíáêáò '%-.192s' äåí Ý÷åé åõñåôÞñéï (index) óáí áõôü ðïõ ÷ñçóéìïðïéåßôå óôçí CREATE INDEX. Ðáñáêáëþ, îáíáäçìéïõñãÞóôå ôïí ðßíáêá" + hun "A(z) '%-.192s' tablahoz nincs meg a CREATE INDEX altal hasznalt index. Alakitsa at a tablat" + ita "La tabella '%-.192s' non ha nessun indice come quello specificatato dalla CREATE INDEX. Ricrea la tabella" + jpn "Table '%-.192s' ¤Ï¤½¤Î¤è¤¦¤Ê index ¤ò»ý¤Ã¤Æ¤¤¤Þ¤»¤ó(CREATE INDEX ¼Â¹Ô»þ¤Ë»ØÄꤵ¤ì¤Æ¤¤¤Þ¤»¤ó). ¥Æ¡¼¥Ö¥ë¤òºî¤êľ¤·¤Æ¤¯¤À¤µ¤¤" + kor "Å×À̺í '%-.192s'´Â À妽º¸¦ ¸¸µéÁö ¾Ê¾Ò½À´Ï´Ù. alter Å×À̺í¸í·ÉÀ» ÀÌ¿ëÇÏ¿© Å×À̺íÀ» ¼öÁ¤Çϼ¼¿ä..." + nor "Tabellen '%-.192s' har ingen index som den som er brukt i CREATE INDEX. Gjenopprett tabellen" + norwegian-ny "Tabellen '%-.192s' har ingen index som den som er brukt i CREATE INDEX. Oprett tabellen på nytt" + pol "Tabela '%-.192s' nie ma indeksu takiego jak w CREATE INDEX. Stwórz tabelê" + por "Tabela '%-.192s' não possui um índice como o usado em CREATE INDEX. Recrie a tabela" + rum "Tabela '%-.192s' nu are un index ca acela folosit in CREATE INDEX. Re-creeaza tabela" + rus "÷ ÔÁÂÌÉÃÅ '%-.192s' ÎÅÔ ÔÁËÏÇÏ ÉÎÄÅËÓÁ, ËÁË × CREATE INDEX. óÏÚÄÁÊÔÅ ÔÁÂÌÉÃÕ ÚÁÎÏ×Ï" + serbian "Tabela '%-.192s' nema isti indeks kao onaj upotrebljen pri komandi 'CREATE INDEX'. Napravite tabelu ponovo" + slo "Tabuµka '%-.192s' nemá index zodpovedajúci CREATE INDEX. Vytvorte tabulku znova" + spa "La tabla '%-.192s' no tiene indice como el usado en CREATE INDEX. Crea de nuevo la tabla" + swe "Tabellen '%-.192s' har inget index som motsvarar det angivna i CREATE INDEX. Skapa om tabellen" + ukr "ôÁÂÌÉÃÑ '%-.192s' ÍÁ¤ ¦ÎÄÅËÓ, ÝÏ ÎÅ ÓЦ×ÐÁÄÁ¤ Ú ×ËÁÚÁÎÎÉÍ Õ CREATE INDEX. óÔ×ÏÒ¦ÔØ ÔÁÂÌÉÃÀ ÚÎÏ×Õ" ER_WRONG_FIELD_TERMINATORS 42000 S1009 cze "Argument separ-Bátoru polo¾ek nebyl oèekáván. Pøeètìte si manuál" dan "Felt adskiller er ikke som forventet, se dokumentationen" @@ -2190,30 +2190,30 @@ ER_CANT_REMOVE_ALL_FIELDS 42000 swe "Man kan inte radera alla fält med ALTER TABLE. Använd DROP TABLE istället" ukr "îÅ ÍÏÖÌÉ×Ï ×ÉÄÁÌÉÔÉ ×Ó¦ ÓÔÏ×Âæ ÚÁ ÄÏÐÏÍÏÇÏÀ ALTER TABLE. äÌÑ ÃØÏÇÏ ÓËÏÒÉÓÔÁÊÔÅÓÑ DROP TABLE" ER_CANT_DROP_FIELD_OR_KEY 42000 - cze "Nemohu zru-B¹it '%-.64s' (provést DROP). Zkontrolujte, zda neexistují záznamy/klíèe" - dan "Kan ikke udføre DROP '%-.64s'. Undersøg om feltet/nøglen eksisterer." - nla "Kan '%-.64s' niet weggooien. Controleer of het veld of de zoeksleutel daadwerkelijk bestaat." - eng "Can't DROP '%-.64s'; check that column/key exists" - jps "'%-.64s' ‚ð”jŠü‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½; check that column/key exists", - est "Ei suuda kustutada '%-.64s'. Kontrolli kas tulp/võti eksisteerib" - fre "Ne peut effacer (DROP) '%-.64s'. Vérifiez s'il existe" - ger "Kann '%-.64s' nicht löschen. Existiert die Spalte oder der Schlüssel?" - greek "Áäýíáôç ç äéáãñáöÞ (DROP) '%-.64s'. Ðáñáêáëþ åëÝãîôå áí ôï ðåäßï/êëåéäß õðÜñ÷åé" - hun "A DROP '%-.64s' nem lehetseges. Ellenorizze, hogy a mezo/kulcs letezik-e" - ita "Impossibile cancellare '%-.64s'. Controllare che il campo chiave esista" - jpn "'%-.64s' ¤òÇË´þ¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿; check that column/key exists" - kor "'%-.64s'¸¦ DROPÇÒ ¼ö ¾ø½À´Ï´Ù. Ä®·³À̳ª ۰¡ Á¸ÀçÇÏ´ÂÁö äũÇϼ¼¿ä." - nor "Kan ikke DROP '%-.64s'. Undersøk om felt/nøkkel eksisterer." - norwegian-ny "Kan ikkje DROP '%-.64s'. Undersøk om felt/nøkkel eksisterar." - pol "Nie mo¿na wykonaæ operacji DROP '%-.64s'. Sprawd¥, czy to pole/klucz istnieje" - por "Não se pode fazer DROP '%-.64s'. Confira se esta coluna/chave existe" - rum "Nu pot sa DROP '%-.64s'. Verifica daca coloana/cheia exista" - rus "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ (DROP) '%-.64s'. õÂÅÄÉÔÅÓØ ÞÔÏ ÓÔÏÌÂÅÃ/ËÌÀÞ ÄÅÊÓÔ×ÉÔÅÌØÎÏ ÓÕÝÅÓÔ×ÕÅÔ" - serbian "Ne mogu da izvršim komandu drop 'DROP' na '%-.64s'. Proverite da li ta kolona (odnosno kljuè) postoji" - slo "Nemô¾em zru¹i» (DROP) '%-.64s'. Skontrolujte, èi neexistujú záznamy/kµúèe" - spa "No puedo ELIMINAR '%-.64s'. compuebe que el campo/clave existe" - swe "Kan inte ta bort '%-.64s'. Kontrollera att fältet/nyckel finns" - ukr "îÅ ÍÏÖÕ DROP '%-.64s'. ðÅÒÅצÒÔÅ, ÞÉ ÃÅÊ ÓÔÏ×ÂÅÃØ/ËÌÀÞ ¦ÓÎÕ¤" + cze "Nemohu zru-B¹it '%-.192s' (provést DROP). Zkontrolujte, zda neexistují záznamy/klíèe" + dan "Kan ikke udføre DROP '%-.192s'. Undersøg om feltet/nøglen eksisterer." + nla "Kan '%-.192s' niet weggooien. Controleer of het veld of de zoeksleutel daadwerkelijk bestaat." + eng "Can't DROP '%-.192s'; check that column/key exists" + jps "'%-.192s' ‚ð”jŠü‚Å‚«‚Ü‚¹‚ñ‚Å‚µ‚½; check that column/key exists", + est "Ei suuda kustutada '%-.192s'. Kontrolli kas tulp/võti eksisteerib" + fre "Ne peut effacer (DROP) '%-.192s'. Vérifiez s'il existe" + ger "Kann '%-.192s' nicht löschen. Existiert die Spalte oder der Schlüssel?" + greek "Áäýíáôç ç äéáãñáöÞ (DROP) '%-.192s'. Ðáñáêáëþ åëÝãîôå áí ôï ðåäßï/êëåéäß õðÜñ÷åé" + hun "A DROP '%-.192s' nem lehetseges. Ellenorizze, hogy a mezo/kulcs letezik-e" + ita "Impossibile cancellare '%-.192s'. Controllare che il campo chiave esista" + jpn "'%-.192s' ¤òÇË´þ¤Ç¤­¤Þ¤»¤ó¤Ç¤·¤¿; check that column/key exists" + kor "'%-.192s'¸¦ DROPÇÒ ¼ö ¾ø½À´Ï´Ù. Ä®·³À̳ª ۰¡ Á¸ÀçÇÏ´ÂÁö äũÇϼ¼¿ä." + nor "Kan ikke DROP '%-.192s'. Undersøk om felt/nøkkel eksisterer." + norwegian-ny "Kan ikkje DROP '%-.192s'. Undersøk om felt/nøkkel eksisterar." + pol "Nie mo¿na wykonaæ operacji DROP '%-.192s'. Sprawd¥, czy to pole/klucz istnieje" + por "Não se pode fazer DROP '%-.192s'. Confira se esta coluna/chave existe" + rum "Nu pot sa DROP '%-.192s'. Verifica daca coloana/cheia exista" + rus "îÅ×ÏÚÍÏÖÎÏ ÕÄÁÌÉÔØ (DROP) '%-.192s'. õÂÅÄÉÔÅÓØ ÞÔÏ ÓÔÏÌÂÅÃ/ËÌÀÞ ÄÅÊÓÔ×ÉÔÅÌØÎÏ ÓÕÝÅÓÔ×ÕÅÔ" + serbian "Ne mogu da izvršim komandu drop 'DROP' na '%-.192s'. Proverite da li ta kolona (odnosno kljuè) postoji" + slo "Nemô¾em zru¹i» (DROP) '%-.192s'. Skontrolujte, èi neexistujú záznamy/kµúèe" + spa "No puedo ELIMINAR '%-.192s'. compuebe que el campo/clave existe" + swe "Kan inte ta bort '%-.192s'. Kontrollera att fältet/nyckel finns" + ukr "îÅ ÍÏÖÕ DROP '%-.192s'. ðÅÒÅצÒÔÅ, ÞÉ ÃÅÊ ÓÔÏ×ÂÅÃØ/ËÌÀÞ ¦ÓÎÕ¤" ER_INSERT_INFO cze "Z-Báznamù: %ld Zdvojených: %ld Varování: %ld" dan "Poster: %ld Ens: %ld Advarsler: %ld" @@ -2240,11 +2240,11 @@ ER_INSERT_INFO swe "Rader: %ld Dubletter: %ld Varningar: %ld" ukr "úÁÐÉÓ¦×: %ld äÕÂ̦ËÁÔ¦×: %ld úÁÓÔÅÒÅÖÅÎØ: %ld" ER_UPDATE_TABLE_USED - eng "You can't specify target table '%-.64s' for update in FROM clause" - ger "Die Verwendung der zu aktualisierenden Zieltabelle '%-.64s' ist in der FROM-Klausel nicht zulässig." - rus "îÅ ÄÏÐÕÓËÁÅÔÓÑ ÕËÁÚÁÎÉÅ ÔÁÂÌÉÃÙ '%-.64s' × ÓÐÉÓËÅ ÔÁÂÌÉà FROM ÄÌÑ ×ÎÅÓÅÎÉÑ × ÎÅÅ ÉÚÍÅÎÅÎÉÊ" - swe "INSERT-table '%-.64s' får inte finnas i FROM tabell-listan" - ukr "ôÁÂÌÉÃÑ '%-.64s' ÝÏ ÚͦÎÀ¤ÔØÓÑ ÎÅ ÄÏÚ×ÏÌÅÎÁ Õ ÐÅÒÅ̦ËÕ ÔÁÂÌÉÃØ FROM" + eng "You can't specify target table '%-.192s' for update in FROM clause" + ger "Die Verwendung der zu aktualisierenden Zieltabelle '%-.192s' ist in der FROM-Klausel nicht zulässig." + rus "îÅ ÄÏÐÕÓËÁÅÔÓÑ ÕËÁÚÁÎÉÅ ÔÁÂÌÉÃÙ '%-.192s' × ÓÐÉÓËÅ ÔÁÂÌÉà FROM ÄÌÑ ×ÎÅÓÅÎÉÑ × ÎÅÅ ÉÚÍÅÎÅÎÉÊ" + swe "INSERT-table '%-.192s' får inte finnas i FROM tabell-listan" + ukr "ôÁÂÌÉÃÑ '%-.192s' ÝÏ ÚͦÎÀ¤ÔØÓÑ ÎÅ ÄÏÚ×ÏÌÅÎÁ Õ ÐÅÒÅ̦ËÕ ÔÁÂÌÉÃØ FROM" ER_NO_SUCH_THREAD cze "Nezn-Bámá identifikace threadu: %lu" dan "Ukendt tråd id: %lu" @@ -2319,28 +2319,28 @@ ER_NO_TABLES_USED swe "Inga tabeller angivna" ukr "îÅ ×ÉËÏÒÉÓÔÁÎÏ ÔÁÂÌÉÃØ" ER_TOO_BIG_SET - cze "P-Bøíli¹ mnoho øetìzcù pro sloupec %-.64s a SET" - dan "For mange tekststrenge til specifikationen af SET i kolonne %-.64s" - nla "Teveel strings voor kolom %-.64s en SET" - eng "Too many strings for column %-.64s and SET" - est "Liiga palju string tulbale %-.64s tüübile SET" - fre "Trop de chaînes dans la colonne %-.64s avec SET" - ger "Zu viele Strings für Feld %-.64s und SET angegeben" - greek "ÐÜñá ðïëëÜ strings ãéá ôï ðåäßï %-.64s êáé SET" - hun "Tul sok karakter: %-.64s es SET" - ita "Troppe stringhe per la colonna %-.64s e la SET" - kor "Ä®·³ %-.64s¿Í SET¿¡¼­ ½ºÆ®¸µÀÌ ³Ê¹« ¸¹½À´Ï´Ù." - nor "For mange tekststrenger kolonne %-.64s og SET" - norwegian-ny "For mange tekststrengar felt %-.64s og SET" - pol "Zbyt wiele ³añcuchów dla kolumny %-.64s i polecenia SET" - por "'Strings' demais para coluna '%-.64s' e SET" - rum "Prea multe siruri pentru coloana %-.64s si SET" - rus "óÌÉÛËÏÍ ÍÎÏÇÏ ÚÎÁÞÅÎÉÊ ÄÌÑ ÓÔÏÌÂÃÁ %-.64s × SET" - serbian "Previše string-ova za kolonu '%-.64s' i komandu 'SET'" - slo "Príli¹ mnoho re»azcov pre pole %-.64s a SET" - spa "Muchas strings para columna %-.64s y SET" - swe "För många alternativ till kolumn %-.64s för SET" - ukr "úÁÂÁÇÁÔÏ ÓÔÒÏË ÄÌÑ ÓÔÏ×ÂÃÑ %-.64s ÔÁ SET" + cze "P-Bøíli¹ mnoho øetìzcù pro sloupec %-.192s a SET" + dan "For mange tekststrenge til specifikationen af SET i kolonne %-.192s" + nla "Teveel strings voor kolom %-.192s en SET" + eng "Too many strings for column %-.192s and SET" + est "Liiga palju string tulbale %-.192s tüübile SET" + fre "Trop de chaînes dans la colonne %-.192s avec SET" + ger "Zu viele Strings für Feld %-.192s und SET angegeben" + greek "ÐÜñá ðïëëÜ strings ãéá ôï ðåäßï %-.192s êáé SET" + hun "Tul sok karakter: %-.192s es SET" + ita "Troppe stringhe per la colonna %-.192s e la SET" + kor "Ä®·³ %-.192s¿Í SET¿¡¼­ ½ºÆ®¸µÀÌ ³Ê¹« ¸¹½À´Ï´Ù." + nor "For mange tekststrenger kolonne %-.192s og SET" + norwegian-ny "For mange tekststrengar felt %-.192s og SET" + pol "Zbyt wiele ³añcuchów dla kolumny %-.192s i polecenia SET" + por "'Strings' demais para coluna '%-.192s' e SET" + rum "Prea multe siruri pentru coloana %-.192s si SET" + rus "óÌÉÛËÏÍ ÍÎÏÇÏ ÚÎÁÞÅÎÉÊ ÄÌÑ ÓÔÏÌÂÃÁ %-.192s × SET" + serbian "Previše string-ova za kolonu '%-.192s' i komandu 'SET'" + slo "Príli¹ mnoho re»azcov pre pole %-.192s a SET" + spa "Muchas strings para columna %-.192s y SET" + swe "För många alternativ till kolumn %-.192s för SET" + ukr "úÁÂÁÇÁÔÏ ÓÔÒÏË ÄÌÑ ÓÔÏ×ÂÃÑ %-.192s ÔÁ SET" ER_NO_UNIQUE_LOGFILE cze "Nemohu vytvo-Bøit jednoznaèné jméno logovacího souboru %-.200s.(1-999)\n" dan "Kan ikke lave unikt log-filnavn %-.200s.(1-999)\n" @@ -2365,79 +2365,79 @@ ER_NO_UNIQUE_LOGFILE swe "Kan inte generera ett unikt filnamn %-.200s.(1-999)\n" ukr "îÅ ÍÏÖÕ ÚÇÅÎÅÒÕ×ÁÔÉ ÕΦËÁÌØÎÅ ¦Í'Ñ log-ÆÁÊÌÕ %-.200s.(1-999)\n" ER_TABLE_NOT_LOCKED_FOR_WRITE - cze "Tabulka '%-.64s' byla zam-Bèena s READ a nemù¾e být zmìnìna" - dan "Tabellen '%-.64s' var låst med READ lås og kan ikke opdateres" - nla "Tabel '%-.64s' was gelocked met een lock om te lezen. Derhalve kunnen geen wijzigingen worden opgeslagen." - eng "Table '%-.64s' was locked with a READ lock and can't be updated" - jps "Table '%-.64s' ‚Í READ lock ‚ɂȂÁ‚Ä‚¢‚ÄAXV‚͂ł«‚Ü‚¹‚ñ", - est "Tabel '%-.64s' on lukustatud READ lukuga ning ei ole muudetav" - fre "Table '%-.64s' verrouillée lecture (READ): modification impossible" - ger "Tabelle '%-.64s' ist mit Lesesperre versehen und kann nicht aktualisiert werden" - greek "Ï ðßíáêáò '%-.64s' Ý÷åé êëåéäùèåß ìå READ lock êáé äåí åðéôñÝðïíôáé áëëáãÝò" - hun "A(z) '%-.64s' tabla zarolva lett (READ lock) es nem lehet frissiteni" - ita "La tabella '%-.64s' e` soggetta a lock in lettura e non puo` essere aggiornata" - jpn "Table '%-.64s' ¤Ï READ lock ¤Ë¤Ê¤Ã¤Æ¤¤¤Æ¡¢¹¹¿·¤Ï¤Ç¤­¤Þ¤»¤ó" - kor "Å×À̺í '%-.64s'´Â READ ¶ôÀÌ Àá°ÜÀ־ °»½ÅÇÒ ¼ö ¾ø½À´Ï´Ù." - nor "Tabellen '%-.64s' var låst med READ lås og kan ikke oppdateres" - norwegian-ny "Tabellen '%-.64s' var låst med READ lås og kan ikkje oppdaterast" - pol "Tabela '%-.64s' zosta³a zablokowana przez READ i nie mo¿e zostaæ zaktualizowana" - por "Tabela '%-.64s' foi travada com trava de leitura e não pode ser atualizada" - rum "Tabela '%-.64s' a fost locked cu un READ lock si nu poate fi actualizata" - rus "ôÁÂÌÉÃÁ '%-.64s' ÚÁÂÌÏËÉÒÏ×ÁÎÁ ÕÒÏ×ÎÅÍ READ lock É ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÚÍÅÎÅÎÁ" - serbian "Tabela '%-.64s' je zakljuèana READ lock-om; iz nje se može samo èitati ali u nju se ne može pisati" - slo "Tabuµka '%-.64s' bola zamknutá s READ a nemô¾e by» zmenená" - spa "Tabla '%-.64s' fue trabada con un READ lock y no puede ser actualizada" - swe "Tabell '%-.64s' kan inte uppdateras emedan den är låst för läsning" - ukr "ôÁÂÌÉÃÀ '%-.64s' ÚÁÂÌÏËÏ×ÁÎÏ Ô¦ÌØËÉ ÄÌÑ ÞÉÔÁÎÎÑ, ÔÏÍÕ §§ ÎÅ ÍÏÖÎÁ ÏÎÏ×ÉÔÉ" + cze "Tabulka '%-.192s' byla zam-Bèena s READ a nemù¾e být zmìnìna" + dan "Tabellen '%-.192s' var låst med READ lås og kan ikke opdateres" + nla "Tabel '%-.192s' was gelocked met een lock om te lezen. Derhalve kunnen geen wijzigingen worden opgeslagen." + eng "Table '%-.192s' was locked with a READ lock and can't be updated" + jps "Table '%-.192s' ‚Í READ lock ‚ɂȂÁ‚Ä‚¢‚ÄAXV‚͂ł«‚Ü‚¹‚ñ", + est "Tabel '%-.192s' on lukustatud READ lukuga ning ei ole muudetav" + fre "Table '%-.192s' verrouillée lecture (READ): modification impossible" + ger "Tabelle '%-.192s' ist mit Lesesperre versehen und kann nicht aktualisiert werden" + greek "Ï ðßíáêáò '%-.192s' Ý÷åé êëåéäùèåß ìå READ lock êáé äåí åðéôñÝðïíôáé áëëáãÝò" + hun "A(z) '%-.192s' tabla zarolva lett (READ lock) es nem lehet frissiteni" + ita "La tabella '%-.192s' e` soggetta a lock in lettura e non puo` essere aggiornata" + jpn "Table '%-.192s' ¤Ï READ lock ¤Ë¤Ê¤Ã¤Æ¤¤¤Æ¡¢¹¹¿·¤Ï¤Ç¤­¤Þ¤»¤ó" + kor "Å×À̺í '%-.192s'´Â READ ¶ôÀÌ Àá°ÜÀ־ °»½ÅÇÒ ¼ö ¾ø½À´Ï´Ù." + nor "Tabellen '%-.192s' var låst med READ lås og kan ikke oppdateres" + norwegian-ny "Tabellen '%-.192s' var låst med READ lås og kan ikkje oppdaterast" + pol "Tabela '%-.192s' zosta³a zablokowana przez READ i nie mo¿e zostaæ zaktualizowana" + por "Tabela '%-.192s' foi travada com trava de leitura e não pode ser atualizada" + rum "Tabela '%-.192s' a fost locked cu un READ lock si nu poate fi actualizata" + rus "ôÁÂÌÉÃÁ '%-.192s' ÚÁÂÌÏËÉÒÏ×ÁÎÁ ÕÒÏ×ÎÅÍ READ lock É ÎÅ ÍÏÖÅÔ ÂÙÔØ ÉÚÍÅÎÅÎÁ" + serbian "Tabela '%-.192s' je zakljuèana READ lock-om; iz nje se može samo èitati ali u nju se ne može pisati" + slo "Tabuµka '%-.192s' bola zamknutá s READ a nemô¾e by» zmenená" + spa "Tabla '%-.192s' fue trabada con un READ lock y no puede ser actualizada" + swe "Tabell '%-.192s' kan inte uppdateras emedan den är låst för läsning" + ukr "ôÁÂÌÉÃÀ '%-.192s' ÚÁÂÌÏËÏ×ÁÎÏ Ô¦ÌØËÉ ÄÌÑ ÞÉÔÁÎÎÑ, ÔÏÍÕ §§ ÎÅ ÍÏÖÎÁ ÏÎÏ×ÉÔÉ" ER_TABLE_NOT_LOCKED - cze "Tabulka '%-.64s' nebyla zam-Bèena s LOCK TABLES" - dan "Tabellen '%-.64s' var ikke låst med LOCK TABLES" - nla "Tabel '%-.64s' was niet gelocked met LOCK TABLES" - eng "Table '%-.64s' was not locked with LOCK TABLES" - jps "Table '%-.64s' ‚Í LOCK TABLES ‚É‚æ‚Á‚ăƒbƒN‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", - est "Tabel '%-.64s' ei ole lukustatud käsuga LOCK TABLES" - fre "Table '%-.64s' non verrouillée: utilisez LOCK TABLES" - ger "Tabelle '%-.64s' wurde nicht mit LOCK TABLES gesperrt" - greek "Ï ðßíáêáò '%-.64s' äåí Ý÷åé êëåéäùèåß ìå LOCK TABLES" - hun "A(z) '%-.64s' tabla nincs zarolva a LOCK TABLES-szel" - ita "Non e` stato impostato il lock per la tabella '%-.64s' con LOCK TABLES" - jpn "Table '%-.64s' ¤Ï LOCK TABLES ¤Ë¤è¤Ã¤Æ¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" - kor "Å×À̺í '%-.64s'´Â LOCK TABLES ¸í·ÉÀ¸·Î Àá±âÁö ¾Ê¾Ò½À´Ï´Ù." - nor "Tabellen '%-.64s' var ikke låst med LOCK TABLES" - norwegian-ny "Tabellen '%-.64s' var ikkje låst med LOCK TABLES" - pol "Tabela '%-.64s' nie zosta³a zablokowana poleceniem LOCK TABLES" - por "Tabela '%-.64s' não foi travada com LOCK TABLES" - rum "Tabela '%-.64s' nu a fost locked cu LOCK TABLES" - rus "ôÁÂÌÉÃÁ '%-.64s' ÎÅ ÂÙÌÁ ÚÁÂÌÏËÉÒÏ×ÁÎÁ Ó ÐÏÍÏÝØÀ LOCK TABLES" - serbian "Tabela '%-.64s' nije bila zakljuèana komandom 'LOCK TABLES'" - slo "Tabuµka '%-.64s' nebola zamknutá s LOCK TABLES" - spa "Tabla '%-.64s' no fue trabada con LOCK TABLES" - swe "Tabell '%-.64s' är inte låst med LOCK TABLES" - ukr "ôÁÂÌÉÃÀ '%-.64s' ÎÅ ÂÕÌÏ ÂÌÏËÏ×ÁÎÏ Ú LOCK TABLES" + cze "Tabulka '%-.192s' nebyla zam-Bèena s LOCK TABLES" + dan "Tabellen '%-.192s' var ikke låst med LOCK TABLES" + nla "Tabel '%-.192s' was niet gelocked met LOCK TABLES" + eng "Table '%-.192s' was not locked with LOCK TABLES" + jps "Table '%-.192s' ‚Í LOCK TABLES ‚É‚æ‚Á‚ăƒbƒN‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", + est "Tabel '%-.192s' ei ole lukustatud käsuga LOCK TABLES" + fre "Table '%-.192s' non verrouillée: utilisez LOCK TABLES" + ger "Tabelle '%-.192s' wurde nicht mit LOCK TABLES gesperrt" + greek "Ï ðßíáêáò '%-.192s' äåí Ý÷åé êëåéäùèåß ìå LOCK TABLES" + hun "A(z) '%-.192s' tabla nincs zarolva a LOCK TABLES-szel" + ita "Non e` stato impostato il lock per la tabella '%-.192s' con LOCK TABLES" + jpn "Table '%-.192s' ¤Ï LOCK TABLES ¤Ë¤è¤Ã¤Æ¥í¥Ã¥¯¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" + kor "Å×À̺í '%-.192s'´Â LOCK TABLES ¸í·ÉÀ¸·Î Àá±âÁö ¾Ê¾Ò½À´Ï´Ù." + nor "Tabellen '%-.192s' var ikke låst med LOCK TABLES" + norwegian-ny "Tabellen '%-.192s' var ikkje låst med LOCK TABLES" + pol "Tabela '%-.192s' nie zosta³a zablokowana poleceniem LOCK TABLES" + por "Tabela '%-.192s' não foi travada com LOCK TABLES" + rum "Tabela '%-.192s' nu a fost locked cu LOCK TABLES" + rus "ôÁÂÌÉÃÁ '%-.192s' ÎÅ ÂÙÌÁ ÚÁÂÌÏËÉÒÏ×ÁÎÁ Ó ÐÏÍÏÝØÀ LOCK TABLES" + serbian "Tabela '%-.192s' nije bila zakljuèana komandom 'LOCK TABLES'" + slo "Tabuµka '%-.192s' nebola zamknutá s LOCK TABLES" + spa "Tabla '%-.192s' no fue trabada con LOCK TABLES" + swe "Tabell '%-.192s' är inte låst med LOCK TABLES" + ukr "ôÁÂÌÉÃÀ '%-.192s' ÎÅ ÂÕÌÏ ÂÌÏËÏ×ÁÎÏ Ú LOCK TABLES" ER_BLOB_CANT_HAVE_DEFAULT 42000 - cze "Blob polo-B¾ka '%-.64s' nemù¾e mít defaultní hodnotu" - dan "BLOB feltet '%-.64s' kan ikke have en standard værdi" - nla "Blob veld '%-.64s' can geen standaardwaarde bevatten" - eng "BLOB/TEXT column '%-.64s' can't have a default value" - est "BLOB-tüüpi tulp '%-.64s' ei saa omada vaikeväärtust" - fre "BLOB '%-.64s' ne peut avoir de valeur par défaut" - ger "BLOB/TEXT-Feld '%-.64s' darf keinen Vorgabewert (DEFAULT) haben" - greek "Ôá Blob ðåäßá '%-.64s' äåí ìðïñïýí íá Ý÷ïõí ðñïêáèïñéóìÝíåò ôéìÝò (default value)" - hun "A(z) '%-.64s' blob objektumnak nem lehet alapertelmezett erteke" - ita "Il campo BLOB '%-.64s' non puo` avere un valore di default" - jpn "BLOB column '%-.64s' can't have a default value" - kor "BLOB Ä®·³ '%-.64s' ´Â µðÆúÆ® °ªÀ» °¡Áú ¼ö ¾ø½À´Ï´Ù." - nor "Blob feltet '%-.64s' kan ikke ha en standard verdi" - norwegian-ny "Blob feltet '%-.64s' kan ikkje ha ein standard verdi" - pol "Pole typu blob '%-.64s' nie mo¿e mieæ domy?lnej warto?ci" - por "Coluna BLOB '%-.64s' não pode ter um valor padrão (default)" - rum "Coloana BLOB '%-.64s' nu poate avea o valoare default" - rus "îÅ×ÏÚÍÏÖÎÏ ÕËÁÚÙ×ÁÔØ ÚÎÁÞÅÎÉÅ ÐÏ ÕÍÏÌÞÁÎÉÀ ÄÌÑ ÓÔÏÌÂÃÁ BLOB '%-.64s'" - serbian "BLOB kolona '%-.64s' ne može imati default vrednost" - slo "Pole BLOB '%-.64s' nemô¾e ma» implicitnú hodnotu" - spa "Campo Blob '%-.64s' no puede tener valores patron" - swe "BLOB fält '%-.64s' kan inte ha ett DEFAULT-värde" - ukr "óÔÏ×ÂÅÃØ BLOB '%-.64s' ÎÅ ÍÏÖÅ ÍÁÔÉ ÚÎÁÞÅÎÎÑ ÐÏ ÚÁÍÏ×ÞÕ×ÁÎÎÀ" + cze "Blob polo-B¾ka '%-.192s' nemù¾e mít defaultní hodnotu" + dan "BLOB feltet '%-.192s' kan ikke have en standard værdi" + nla "Blob veld '%-.192s' can geen standaardwaarde bevatten" + eng "BLOB/TEXT column '%-.192s' can't have a default value" + est "BLOB-tüüpi tulp '%-.192s' ei saa omada vaikeväärtust" + fre "BLOB '%-.192s' ne peut avoir de valeur par défaut" + ger "BLOB/TEXT-Feld '%-.192s' darf keinen Vorgabewert (DEFAULT) haben" + greek "Ôá Blob ðåäßá '%-.192s' äåí ìðïñïýí íá Ý÷ïõí ðñïêáèïñéóìÝíåò ôéìÝò (default value)" + hun "A(z) '%-.192s' blob objektumnak nem lehet alapertelmezett erteke" + ita "Il campo BLOB '%-.192s' non puo` avere un valore di default" + jpn "BLOB column '%-.192s' can't have a default value" + kor "BLOB Ä®·³ '%-.192s' ´Â µðÆúÆ® °ªÀ» °¡Áú ¼ö ¾ø½À´Ï´Ù." + nor "Blob feltet '%-.192s' kan ikke ha en standard verdi" + norwegian-ny "Blob feltet '%-.192s' kan ikkje ha ein standard verdi" + pol "Pole typu blob '%-.192s' nie mo¿e mieæ domy?lnej warto?ci" + por "Coluna BLOB '%-.192s' não pode ter um valor padrão (default)" + rum "Coloana BLOB '%-.192s' nu poate avea o valoare default" + rus "îÅ×ÏÚÍÏÖÎÏ ÕËÁÚÙ×ÁÔØ ÚÎÁÞÅÎÉÅ ÐÏ ÕÍÏÌÞÁÎÉÀ ÄÌÑ ÓÔÏÌÂÃÁ BLOB '%-.192s'" + serbian "BLOB kolona '%-.192s' ne može imati default vrednost" + slo "Pole BLOB '%-.192s' nemô¾e ma» implicitnú hodnotu" + spa "Campo Blob '%-.192s' no puede tener valores patron" + swe "BLOB fält '%-.192s' kan inte ha ett DEFAULT-värde" + ukr "óÔÏ×ÂÅÃØ BLOB '%-.192s' ÎÅ ÍÏÖÅ ÍÁÔÉ ÚÎÁÞÅÎÎÑ ÐÏ ÚÁÍÏ×ÞÕ×ÁÎÎÀ" ER_WRONG_DB_NAME 42000 cze "Nep-Bøípustné jméno databáze '%-.100s'" dan "Ugyldigt database navn '%-.100s'" @@ -2534,121 +2534,121 @@ ER_UNKNOWN_ERROR swe "Oidentifierat fel" ukr "îÅצÄÏÍÁ ÐÏÍÉÌËÁ" ER_UNKNOWN_PROCEDURE 42000 - cze "Nezn-Bámá procedura %-.64s" - dan "Ukendt procedure %-.64s" - nla "Onbekende procedure %-.64s" - eng "Unknown procedure '%-.64s'" - est "Tundmatu protseduur '%-.64s'" - fre "Procédure %-.64s inconnue" - ger "Unbekannte Prozedur '%-.64s'" - greek "Áãíùóôç äéáäéêáóßá '%-.64s'" - hun "Ismeretlen eljaras: '%-.64s'" - ita "Procedura '%-.64s' sconosciuta" - kor "¾Ë¼ö ¾ø´Â ¼öÇ๮ : '%-.64s'" - nor "Ukjent prosedyre %-.64s" - norwegian-ny "Ukjend prosedyre %-.64s" - pol "Unkown procedure %-.64s" - por "'Procedure' '%-.64s' desconhecida" - rum "Procedura unknown '%-.64s'" - rus "îÅÉÚ×ÅÓÔÎÁÑ ÐÒÏÃÅÄÕÒÁ '%-.64s'" - serbian "Nepoznata procedura '%-.64s'" - slo "Neznámá procedúra '%-.64s'" - spa "Procedimiento desconocido %-.64s" - swe "Okänd procedur: %-.64s" - ukr "îÅצÄÏÍÁ ÐÒÏÃÅÄÕÒÁ '%-.64s'" + cze "Nezn-Bámá procedura %-.192s" + dan "Ukendt procedure %-.192s" + nla "Onbekende procedure %-.192s" + eng "Unknown procedure '%-.192s'" + est "Tundmatu protseduur '%-.192s'" + fre "Procédure %-.192s inconnue" + ger "Unbekannte Prozedur '%-.192s'" + greek "Áãíùóôç äéáäéêáóßá '%-.192s'" + hun "Ismeretlen eljaras: '%-.192s'" + ita "Procedura '%-.192s' sconosciuta" + kor "¾Ë¼ö ¾ø´Â ¼öÇ๮ : '%-.192s'" + nor "Ukjent prosedyre %-.192s" + norwegian-ny "Ukjend prosedyre %-.192s" + pol "Unkown procedure %-.192s" + por "'Procedure' '%-.192s' desconhecida" + rum "Procedura unknown '%-.192s'" + rus "îÅÉÚ×ÅÓÔÎÁÑ ÐÒÏÃÅÄÕÒÁ '%-.192s'" + serbian "Nepoznata procedura '%-.192s'" + slo "Neznámá procedúra '%-.192s'" + spa "Procedimiento desconocido %-.192s" + swe "Okänd procedur: %-.192s" + ukr "îÅצÄÏÍÁ ÐÒÏÃÅÄÕÒÁ '%-.192s'" ER_WRONG_PARAMCOUNT_TO_PROCEDURE 42000 - cze "Chybn-Bý poèet parametrù procedury %-.64s" - dan "Forkert antal parametre til proceduren %-.64s" - nla "Foutief aantal parameters doorgegeven aan procedure %-.64s" - eng "Incorrect parameter count to procedure '%-.64s'" - est "Vale parameetrite hulk protseduurile '%-.64s'" - fre "Mauvais nombre de paramètres pour la procedure %-.64s" - ger "Falsche Parameterzahl für Prozedur '%-.64s'" - greek "ËÜèïò áñéèìüò ðáñáìÝôñùí óôç äéáäéêáóßá '%-.64s'" - hun "Rossz parameter a(z) '%-.64s'eljaras szamitasanal" - ita "Numero di parametri errato per la procedura '%-.64s'" - kor "'%-.64s' ¼öÇ๮¿¡ ´ëÇÑ ºÎÁ¤È®ÇÑ ÆÄ¶ó¸ÞÅÍ" - nor "Feil parameter antall til prosedyren %-.64s" - norwegian-ny "Feil parameter tal til prosedyra %-.64s" - pol "Incorrect parameter count to procedure %-.64s" - por "Número de parâmetros incorreto para a 'procedure' '%-.64s'" - rum "Procedura '%-.64s' are un numar incorect de parametri" - rus "îÅËÏÒÒÅËÔÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÐÁÒÁÍÅÔÒÏ× ÄÌÑ ÐÒÏÃÅÄÕÒÙ '%-.64s'" - serbian "Pogrešan broj parametara za proceduru '%-.64s'" - slo "Chybný poèet parametrov procedúry '%-.64s'" - spa "Equivocado parametro count para procedimiento %-.64s" - swe "Felaktigt antal parametrar till procedur %-.64s" - ukr "èÉÂÎÁ Ë¦ÌØË¦ÓÔØ ÐÁÒÁÍÅÔÒ¦× ÐÒÏÃÅÄÕÒÉ '%-.64s'" + cze "Chybn-Bý poèet parametrù procedury %-.192s" + dan "Forkert antal parametre til proceduren %-.192s" + nla "Foutief aantal parameters doorgegeven aan procedure %-.192s" + eng "Incorrect parameter count to procedure '%-.192s'" + est "Vale parameetrite hulk protseduurile '%-.192s'" + fre "Mauvais nombre de paramètres pour la procedure %-.192s" + ger "Falsche Parameterzahl für Prozedur '%-.192s'" + greek "ËÜèïò áñéèìüò ðáñáìÝôñùí óôç äéáäéêáóßá '%-.192s'" + hun "Rossz parameter a(z) '%-.192s'eljaras szamitasanal" + ita "Numero di parametri errato per la procedura '%-.192s'" + kor "'%-.192s' ¼öÇ๮¿¡ ´ëÇÑ ºÎÁ¤È®ÇÑ ÆÄ¶ó¸ÞÅÍ" + nor "Feil parameter antall til prosedyren %-.192s" + norwegian-ny "Feil parameter tal til prosedyra %-.192s" + pol "Incorrect parameter count to procedure %-.192s" + por "Número de parâmetros incorreto para a 'procedure' '%-.192s'" + rum "Procedura '%-.192s' are un numar incorect de parametri" + rus "îÅËÏÒÒÅËÔÎÏÅ ËÏÌÉÞÅÓÔ×Ï ÐÁÒÁÍÅÔÒÏ× ÄÌÑ ÐÒÏÃÅÄÕÒÙ '%-.192s'" + serbian "Pogrešan broj parametara za proceduru '%-.192s'" + slo "Chybný poèet parametrov procedúry '%-.192s'" + spa "Equivocado parametro count para procedimiento %-.192s" + swe "Felaktigt antal parametrar till procedur %-.192s" + ukr "èÉÂÎÁ Ë¦ÌØË¦ÓÔØ ÐÁÒÁÍÅÔÒ¦× ÐÒÏÃÅÄÕÒÉ '%-.192s'" ER_WRONG_PARAMETERS_TO_PROCEDURE - cze "Chybn-Bé parametry procedury %-.64s" - dan "Forkert(e) parametre til proceduren %-.64s" - nla "Foutieve parameters voor procedure %-.64s" - eng "Incorrect parameters to procedure '%-.64s'" - est "Vigased parameetrid protseduurile '%-.64s'" - fre "Paramètre erroné pour la procedure %-.64s" - ger "Falsche Parameter für Prozedur '%-.64s'" - greek "ËÜèïò ðáñÜìåôñïé óôçí äéáäéêáóßá '%-.64s'" - hun "Rossz parameter a(z) '%-.64s' eljarasban" - ita "Parametri errati per la procedura '%-.64s'" - kor "'%-.64s' ¼öÇ๮¿¡ ´ëÇÑ ºÎÁ¤È®ÇÑ ÆÄ¶ó¸ÞÅÍ" - nor "Feil parametre til prosedyren %-.64s" - norwegian-ny "Feil parameter til prosedyra %-.64s" - pol "Incorrect parameters to procedure %-.64s" - por "Parâmetros incorretos para a 'procedure' '%-.64s'" - rum "Procedura '%-.64s' are parametrii incorecti" - rus "îÅËÏÒÒÅËÔÎÙÅ ÐÁÒÁÍÅÔÒÙ ÄÌÑ ÐÒÏÃÅÄÕÒÙ '%-.64s'" - serbian "Pogrešni parametri prosleðeni proceduri '%-.64s'" - slo "Chybné parametre procedúry '%-.64s'" - spa "Equivocados parametros para procedimiento %-.64s" - swe "Felaktiga parametrar till procedur %-.64s" - ukr "èÉÂÎÉÊ ÐÁÒÁÍÅÔÅÒ ÐÒÏÃÅÄÕÒÉ '%-.64s'" + cze "Chybn-Bé parametry procedury %-.192s" + dan "Forkert(e) parametre til proceduren %-.192s" + nla "Foutieve parameters voor procedure %-.192s" + eng "Incorrect parameters to procedure '%-.192s'" + est "Vigased parameetrid protseduurile '%-.192s'" + fre "Paramètre erroné pour la procedure %-.192s" + ger "Falsche Parameter für Prozedur '%-.192s'" + greek "ËÜèïò ðáñÜìåôñïé óôçí äéáäéêáóßá '%-.192s'" + hun "Rossz parameter a(z) '%-.192s' eljarasban" + ita "Parametri errati per la procedura '%-.192s'" + kor "'%-.192s' ¼öÇ๮¿¡ ´ëÇÑ ºÎÁ¤È®ÇÑ ÆÄ¶ó¸ÞÅÍ" + nor "Feil parametre til prosedyren %-.192s" + norwegian-ny "Feil parameter til prosedyra %-.192s" + pol "Incorrect parameters to procedure %-.192s" + por "Parâmetros incorretos para a 'procedure' '%-.192s'" + rum "Procedura '%-.192s' are parametrii incorecti" + rus "îÅËÏÒÒÅËÔÎÙÅ ÐÁÒÁÍÅÔÒÙ ÄÌÑ ÐÒÏÃÅÄÕÒÙ '%-.192s'" + serbian "Pogrešni parametri prosleðeni proceduri '%-.192s'" + slo "Chybné parametre procedúry '%-.192s'" + spa "Equivocados parametros para procedimiento %-.192s" + swe "Felaktiga parametrar till procedur %-.192s" + ukr "èÉÂÎÉÊ ÐÁÒÁÍÅÔÅÒ ÐÒÏÃÅÄÕÒÉ '%-.192s'" ER_UNKNOWN_TABLE 42S02 - cze "Nezn-Bámá tabulka '%-.64s' v %-.32s" - dan "Ukendt tabel '%-.64s' i %-.32s" - nla "Onbekende tabel '%-.64s' in %-.32s" - eng "Unknown table '%-.64s' in %-.32s" - est "Tundmatu tabel '%-.64s' %-.32s-s" - fre "Table inconnue '%-.64s' dans %-.32s" - ger "Unbekannte Tabelle '%-.64s' in '%-.32s'" - greek "Áãíùóôïò ðßíáêáò '%-.64s' óå %-.32s" - hun "Ismeretlen tabla: '%-.64s' %-.32s-ban" - ita "Tabella '%-.64s' sconosciuta in %-.32s" - jpn "Unknown table '%-.64s' in %-.32s" - kor "¾Ë¼ö ¾ø´Â Å×À̺í '%-.64s' (µ¥ÀÌŸº£À̽º %-.32s)" - nor "Ukjent tabell '%-.64s' i %-.32s" - norwegian-ny "Ukjend tabell '%-.64s' i %-.32s" - pol "Unknown table '%-.64s' in %-.32s" - por "Tabela '%-.64s' desconhecida em '%-.32s'" - rum "Tabla '%-.64s' invalida in %-.32s" - rus "îÅÉÚ×ÅÓÔÎÁÑ ÔÁÂÌÉÃÁ '%-.64s' × %-.32s" - serbian "Nepoznata tabela '%-.64s' u '%-.32s'" - slo "Neznáma tabuµka '%-.64s' v %-.32s" - spa "Tabla desconocida '%-.64s' in %-.32s" - swe "Okänd tabell '%-.64s' i '%-.32s'" - ukr "îÅצÄÏÍÁ ÔÁÂÌÉÃÑ '%-.64s' Õ %-.32s" + cze "Nezn-Bámá tabulka '%-.192s' v %-.32s" + dan "Ukendt tabel '%-.192s' i %-.32s" + nla "Onbekende tabel '%-.192s' in %-.32s" + eng "Unknown table '%-.192s' in %-.32s" + est "Tundmatu tabel '%-.192s' %-.32s-s" + fre "Table inconnue '%-.192s' dans %-.32s" + ger "Unbekannte Tabelle '%-.192s' in '%-.32s'" + greek "Áãíùóôïò ðßíáêáò '%-.192s' óå %-.32s" + hun "Ismeretlen tabla: '%-.192s' %-.32s-ban" + ita "Tabella '%-.192s' sconosciuta in %-.32s" + jpn "Unknown table '%-.192s' in %-.32s" + kor "¾Ë¼ö ¾ø´Â Å×À̺í '%-.192s' (µ¥ÀÌŸº£À̽º %-.32s)" + nor "Ukjent tabell '%-.192s' i %-.32s" + norwegian-ny "Ukjend tabell '%-.192s' i %-.32s" + pol "Unknown table '%-.192s' in %-.32s" + por "Tabela '%-.192s' desconhecida em '%-.32s'" + rum "Tabla '%-.192s' invalida in %-.32s" + rus "îÅÉÚ×ÅÓÔÎÁÑ ÔÁÂÌÉÃÁ '%-.192s' × %-.32s" + serbian "Nepoznata tabela '%-.192s' u '%-.32s'" + slo "Neznáma tabuµka '%-.192s' v %-.32s" + spa "Tabla desconocida '%-.192s' in %-.32s" + swe "Okänd tabell '%-.192s' i '%-.32s'" + ukr "îÅצÄÏÍÁ ÔÁÂÌÉÃÑ '%-.192s' Õ %-.32s" ER_FIELD_SPECIFIED_TWICE 42000 - cze "Polo-B¾ka '%-.64s' je zadána dvakrát" - dan "Feltet '%-.64s' er anvendt to gange" - nla "Veld '%-.64s' is dubbel gespecificeerd" - eng "Column '%-.64s' specified twice" - est "Tulp '%-.64s' on määratletud topelt" - fre "Champ '%-.64s' spécifié deux fois" - ger "Feld '%-.64s' wurde zweimal angegeben" - greek "Ôï ðåäßï '%-.64s' Ý÷åé ïñéóèåß äýï öïñÝò" - hun "A(z) '%-.64s' mezot ketszer definialta" - ita "Campo '%-.64s' specificato 2 volte" - kor "Ä®·³ '%-.64s'´Â µÎ¹ø Á¤ÀǵǾî ÀÖÀ¾´Ï´Ù." - nor "Feltet '%-.64s' er spesifisert to ganger" - norwegian-ny "Feltet '%-.64s' er spesifisert to gangar" - pol "Field '%-.64s' specified twice" - por "Coluna '%-.64s' especificada duas vezes" - rum "Coloana '%-.64s' specificata de doua ori" - rus "óÔÏÌÂÅà '%-.64s' ÕËÁÚÁÎ Ä×ÁÖÄÙ" - serbian "Kolona '%-.64s' je navedena dva puta" - slo "Pole '%-.64s' je zadané dvakrát" - spa "Campo '%-.64s' especificado dos veces" - swe "Fält '%-.64s' är redan använt" - ukr "óÔÏ×ÂÅÃØ '%-.64s' ÚÁÚÎÁÞÅÎÏ Äצަ" + cze "Polo-B¾ka '%-.192s' je zadána dvakrát" + dan "Feltet '%-.192s' er anvendt to gange" + nla "Veld '%-.192s' is dubbel gespecificeerd" + eng "Column '%-.192s' specified twice" + est "Tulp '%-.192s' on määratletud topelt" + fre "Champ '%-.192s' spécifié deux fois" + ger "Feld '%-.192s' wurde zweimal angegeben" + greek "Ôï ðåäßï '%-.192s' Ý÷åé ïñéóèåß äýï öïñÝò" + hun "A(z) '%-.192s' mezot ketszer definialta" + ita "Campo '%-.192s' specificato 2 volte" + kor "Ä®·³ '%-.192s'´Â µÎ¹ø Á¤ÀǵǾî ÀÖÀ¾´Ï´Ù." + nor "Feltet '%-.192s' er spesifisert to ganger" + norwegian-ny "Feltet '%-.192s' er spesifisert to gangar" + pol "Field '%-.192s' specified twice" + por "Coluna '%-.192s' especificada duas vezes" + rum "Coloana '%-.192s' specificata de doua ori" + rus "óÔÏÌÂÅà '%-.192s' ÕËÁÚÁÎ Ä×ÁÖÄÙ" + serbian "Kolona '%-.192s' je navedena dva puta" + slo "Pole '%-.192s' je zadané dvakrát" + spa "Campo '%-.192s' especificado dos veces" + swe "Fält '%-.192s' är redan använt" + ukr "óÔÏ×ÂÅÃØ '%-.192s' ÚÁÚÎÁÞÅÎÏ Äצަ" ER_INVALID_GROUP_FUNC_USE cze "Nespr-Bávné pou¾ití funkce group" dan "Forkert brug af grupperings-funktion" @@ -2670,28 +2670,28 @@ ER_INVALID_GROUP_FUNC_USE swe "Felaktig användning av SQL grupp function" ukr "èÉÂÎÅ ×ÉËÏÒÉÓÔÁÎÎÑ ÆÕÎËæ§ ÇÒÕÐÕ×ÁÎÎÑ" ER_UNSUPPORTED_EXTENSION 42000 - cze "Tabulka '%-.64s' pou-B¾ívá roz¹íøení, které v této verzi MySQL není" - dan "Tabellen '%-.64s' bruger et filtypenavn som ikke findes i denne MySQL version" - nla "Tabel '%-.64s' gebruikt een extensie, die niet in deze MySQL-versie voorkomt." - eng "Table '%-.64s' uses an extension that doesn't exist in this MySQL version" - est "Tabel '%-.64s' kasutab laiendust, mis ei eksisteeri antud MySQL versioonis" - fre "Table '%-.64s' : utilise une extension invalide pour cette version de MySQL" - ger "Tabelle '%-.64s' verwendet eine Erweiterung, die in dieser MySQL-Version nicht verfügbar ist" - greek "Ï ðßíáêò '%-.64s' ÷ñçóéìïðïéåß êÜðïéï extension ðïõ äåí õðÜñ÷åé óôçí Ýêäïóç áõôÞ ôçò MySQL" - hun "A(z) '%-.64s' tabla olyan bovitest hasznal, amely nem letezik ebben a MySQL versioban." - ita "La tabella '%-.64s' usa un'estensione che non esiste in questa versione di MySQL" - kor "Å×À̺í '%-.64s'´Â È®Àå¸í·ÉÀ» ÀÌ¿ëÇÏÁö¸¸ ÇöÀçÀÇ MySQL ¹öÁ¯¿¡¼­´Â Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù." - nor "Table '%-.64s' uses a extension that doesn't exist in this MySQL version" - norwegian-ny "Table '%-.64s' uses a extension that doesn't exist in this MySQL version" - pol "Table '%-.64s' uses a extension that doesn't exist in this MySQL version" - por "Tabela '%-.64s' usa uma extensão que não existe nesta versão do MySQL" - rum "Tabela '%-.64s' foloseste o extensire inexistenta in versiunea curenta de MySQL" - rus "÷ ÔÁÂÌÉÃÅ '%-.64s' ÉÓÐÏÌØÚÕÀÔÓÑ ×ÏÚÍÏÖÎÏÓÔÉ, ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÍÙÅ × ÜÔÏÊ ×ÅÒÓÉÉ MySQL" - serbian "Tabela '%-.64s' koristi ekstenziju koje ne postoji u ovoj verziji MySQL-a" - slo "Tabuµka '%-.64s' pou¾íva roz¹írenie, ktoré v tejto verzii MySQL nie je" - spa "Tabla '%-.64s' usa una extensión que no existe en esta MySQL versión" - swe "Tabell '%-.64s' har en extension som inte finns i denna version av MySQL" - ukr "ôÁÂÌÉÃÑ '%-.64s' ×ÉËÏÒÉÓÔÏ×Õ¤ ÒÏÚÛÉÒÅÎÎÑ, ÝÏ ÎÅ ¦ÓÎÕ¤ Õ Ã¦Ê ×ÅÒÓ¦§ MySQL" + cze "Tabulka '%-.192s' pou-B¾ívá roz¹íøení, které v této verzi MySQL není" + dan "Tabellen '%-.192s' bruger et filtypenavn som ikke findes i denne MySQL version" + nla "Tabel '%-.192s' gebruikt een extensie, die niet in deze MySQL-versie voorkomt." + eng "Table '%-.192s' uses an extension that doesn't exist in this MySQL version" + est "Tabel '%-.192s' kasutab laiendust, mis ei eksisteeri antud MySQL versioonis" + fre "Table '%-.192s' : utilise une extension invalide pour cette version de MySQL" + ger "Tabelle '%-.192s' verwendet eine Erweiterung, die in dieser MySQL-Version nicht verfügbar ist" + greek "Ï ðßíáêò '%-.192s' ÷ñçóéìïðïéåß êÜðïéï extension ðïõ äåí õðÜñ÷åé óôçí Ýêäïóç áõôÞ ôçò MySQL" + hun "A(z) '%-.192s' tabla olyan bovitest hasznal, amely nem letezik ebben a MySQL versioban." + ita "La tabella '%-.192s' usa un'estensione che non esiste in questa versione di MySQL" + kor "Å×À̺í '%-.192s'´Â È®Àå¸í·ÉÀ» ÀÌ¿ëÇÏÁö¸¸ ÇöÀçÀÇ MySQL ¹öÁ¯¿¡¼­´Â Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù." + nor "Table '%-.192s' uses a extension that doesn't exist in this MySQL version" + norwegian-ny "Table '%-.192s' uses a extension that doesn't exist in this MySQL version" + pol "Table '%-.192s' uses a extension that doesn't exist in this MySQL version" + por "Tabela '%-.192s' usa uma extensão que não existe nesta versão do MySQL" + rum "Tabela '%-.192s' foloseste o extensire inexistenta in versiunea curenta de MySQL" + rus "÷ ÔÁÂÌÉÃÅ '%-.192s' ÉÓÐÏÌØÚÕÀÔÓÑ ×ÏÚÍÏÖÎÏÓÔÉ, ÎÅ ÐÏÄÄÅÒÖÉ×ÁÅÍÙÅ × ÜÔÏÊ ×ÅÒÓÉÉ MySQL" + serbian "Tabela '%-.192s' koristi ekstenziju koje ne postoji u ovoj verziji MySQL-a" + slo "Tabuµka '%-.192s' pou¾íva roz¹írenie, ktoré v tejto verzii MySQL nie je" + spa "Tabla '%-.192s' usa una extensión que no existe en esta MySQL versión" + swe "Tabell '%-.192s' har en extension som inte finns i denna version av MySQL" + ukr "ôÁÂÌÉÃÑ '%-.192s' ×ÉËÏÒÉÓÔÏ×Õ¤ ÒÏÚÛÉÒÅÎÎÑ, ÝÏ ÎÅ ¦ÓÎÕ¤ Õ Ã¦Ê ×ÅÒÓ¦§ MySQL" ER_TABLE_MUST_HAVE_COLUMNS 42000 cze "Tabulka mus-Bí mít alespoò jeden sloupec" dan "En tabel skal have mindst een kolonne" @@ -2715,27 +2715,27 @@ ER_TABLE_MUST_HAVE_COLUMNS 42000 swe "Tabeller måste ha minst 1 kolumn" ukr "ôÁÂÌÉÃÑ ÐÏ×ÉÎÎÁ ÍÁÔÉ ÈÏÞÁ ÏÄÉÎ ÓÔÏ×ÂÅÃØ" ER_RECORD_FILE_FULL - cze "Tabulka '%-.64s' je pln-Bá" - dan "Tabellen '%-.64s' er fuld" - nla "De tabel '%-.64s' is vol" - eng "The table '%-.64s' is full" - jps "table '%-.64s' ‚Í‚¢‚Á‚Ï‚¢‚Å‚·", - est "Tabel '%-.64s' on täis" - fre "La table '%-.64s' est pleine" - ger "Tabelle '%-.64s' ist voll" - greek "Ï ðßíáêáò '%-.64s' åßíáé ãåìÜôïò" - hun "A '%-.64s' tabla megtelt" - ita "La tabella '%-.64s' e` piena" - jpn "table '%-.64s' ¤Ï¤¤¤Ã¤Ñ¤¤¤Ç¤¹" - kor "Å×À̺í '%-.64s'°¡ full³µ½À´Ï´Ù. " - por "Tabela '%-.64s' está cheia" - rum "Tabela '%-.64s' e plina" - rus "ôÁÂÌÉÃÁ '%-.64s' ÐÅÒÅÐÏÌÎÅÎÁ" - serbian "Tabela '%-.64s' je popunjena do kraja" - slo "Tabuµka '%-.64s' je plná" - spa "La tabla '%-.64s' está llena" - swe "Tabellen '%-.64s' är full" - ukr "ôÁÂÌÉÃÑ '%-.64s' ÚÁÐÏ×ÎÅÎÁ" + cze "Tabulka '%-.192s' je pln-Bá" + dan "Tabellen '%-.192s' er fuld" + nla "De tabel '%-.192s' is vol" + eng "The table '%-.192s' is full" + jps "table '%-.192s' ‚Í‚¢‚Á‚Ï‚¢‚Å‚·", + est "Tabel '%-.192s' on täis" + fre "La table '%-.192s' est pleine" + ger "Tabelle '%-.192s' ist voll" + greek "Ï ðßíáêáò '%-.192s' åßíáé ãåìÜôïò" + hun "A '%-.192s' tabla megtelt" + ita "La tabella '%-.192s' e` piena" + jpn "table '%-.192s' ¤Ï¤¤¤Ã¤Ñ¤¤¤Ç¤¹" + kor "Å×À̺í '%-.192s'°¡ full³µ½À´Ï´Ù. " + por "Tabela '%-.192s' está cheia" + rum "Tabela '%-.192s' e plina" + rus "ôÁÂÌÉÃÁ '%-.192s' ÐÅÒÅÐÏÌÎÅÎÁ" + serbian "Tabela '%-.192s' je popunjena do kraja" + slo "Tabuµka '%-.192s' je plná" + spa "La tabla '%-.192s' está llena" + swe "Tabellen '%-.192s' är full" + ukr "ôÁÂÌÉÃÑ '%-.192s' ÚÁÐÏ×ÎÅÎÁ" ER_UNKNOWN_CHARACTER_SET 42000 cze "Nezn-Bámá znaková sada: '%-.64s'" dan "Ukendt tegnsæt: '%-.64s'" @@ -2865,52 +2865,52 @@ ER_WRONG_OUTER_JOIN 42000 swe "Felaktigt referens i OUTER JOIN. Kontrollera ON-uttrycket" ukr "ðÅÒÅÈÒÅÓÎÁ ÚÁÌÅÖΦÓÔØ Õ OUTER JOIN. ðÅÒÅצÒÔÅ ÕÍÏ×Õ ON" ER_NULL_COLUMN_IN_INDEX 42000 - eng "Table handler doesn't support NULL in given index. Please change column '%-.64s' to be NOT NULL or use another handler" - swe "Tabell hanteraren kan inte indexera NULL kolumner för den givna index typen. Ändra '%-.64s' till NOT NULL eller använd en annan hanterare" + eng "Table handler doesn't support NULL in given index. Please change column '%-.192s' to be NOT NULL or use another handler" + swe "Tabell hanteraren kan inte indexera NULL kolumner för den givna index typen. Ändra '%-.192s' till NOT NULL eller använd en annan hanterare" ER_CANT_FIND_UDF - cze "Nemohu na-Bèíst funkci '%-.64s'" - dan "Kan ikke læse funktionen '%-.64s'" - nla "Kan functie '%-.64s' niet laden" - eng "Can't load function '%-.64s'" - jps "function '%-.64s' ‚ð ƒ[ƒh‚Å‚«‚Ü‚¹‚ñ", - est "Ei suuda avada funktsiooni '%-.64s'" - fre "Imposible de charger la fonction '%-.64s'" - ger "Kann Funktion '%-.64s' nicht laden" - greek "Äåí åßíáé äõíáôÞ ç äéáäéêáóßá load ãéá ôç óõíÜñôçóç '%-.64s'" - hun "A(z) '%-.64s' fuggveny nem toltheto be" - ita "Impossibile caricare la funzione '%-.64s'" - jpn "function '%-.64s' ¤ò ¥í¡¼¥É¤Ç¤­¤Þ¤»¤ó" - kor "'%-.64s' ÇÔ¼ö¸¦ ·ÎµåÇÏÁö ¸øÇß½À´Ï´Ù." - por "Não pode carregar a função '%-.64s'" - rum "Nu pot incarca functia '%-.64s'" - rus "îÅ×ÏÚÍÏÖÎÏ ÚÁÇÒÕÚÉÔØ ÆÕÎËÃÉÀ '%-.64s'" - serbian "Ne mogu da uèitam funkciju '%-.64s'" - slo "Nemô¾em naèíta» funkciu '%-.64s'" - spa "No puedo cargar función '%-.64s'" - swe "Kan inte ladda funktionen '%-.64s'" - ukr "îÅ ÍÏÖÕ ÚÁ×ÁÎÔÁÖÉÔÉ ÆÕÎËæÀ '%-.64s'" + cze "Nemohu na-Bèíst funkci '%-.192s'" + dan "Kan ikke læse funktionen '%-.192s'" + nla "Kan functie '%-.192s' niet laden" + eng "Can't load function '%-.192s'" + jps "function '%-.192s' ‚ð ƒ[ƒh‚Å‚«‚Ü‚¹‚ñ", + est "Ei suuda avada funktsiooni '%-.192s'" + fre "Imposible de charger la fonction '%-.192s'" + ger "Kann Funktion '%-.192s' nicht laden" + greek "Äåí åßíáé äõíáôÞ ç äéáäéêáóßá load ãéá ôç óõíÜñôçóç '%-.192s'" + hun "A(z) '%-.192s' fuggveny nem toltheto be" + ita "Impossibile caricare la funzione '%-.192s'" + jpn "function '%-.192s' ¤ò ¥í¡¼¥É¤Ç¤­¤Þ¤»¤ó" + kor "'%-.192s' ÇÔ¼ö¸¦ ·ÎµåÇÏÁö ¸øÇß½À´Ï´Ù." + por "Não pode carregar a função '%-.192s'" + rum "Nu pot incarca functia '%-.192s'" + rus "îÅ×ÏÚÍÏÖÎÏ ÚÁÇÒÕÚÉÔØ ÆÕÎËÃÉÀ '%-.192s'" + serbian "Ne mogu da uèitam funkciju '%-.192s'" + slo "Nemô¾em naèíta» funkciu '%-.192s'" + spa "No puedo cargar función '%-.192s'" + swe "Kan inte ladda funktionen '%-.192s'" + ukr "îÅ ÍÏÖÕ ÚÁ×ÁÎÔÁÖÉÔÉ ÆÕÎËæÀ '%-.192s'" ER_CANT_INITIALIZE_UDF - cze "Nemohu inicializovat funkci '%-.64s'; %-.80s" - dan "Kan ikke starte funktionen '%-.64s'; %-.80s" - nla "Kan functie '%-.64s' niet initialiseren; %-.80s" - eng "Can't initialize function '%-.64s'; %-.80s" - jps "function '%-.64s' ‚ð‰Šú‰»‚Å‚«‚Ü‚¹‚ñ; %-.80s", - est "Ei suuda algväärtustada funktsiooni '%-.64s'; %-.80s" - fre "Impossible d'initialiser la fonction '%-.64s'; %-.80s" - ger "Kann Funktion '%-.64s' nicht initialisieren: %-.80s" - greek "Äåí åßíáé äõíáôÞ ç Ýíáñîç ôçò óõíÜñôçóçò '%-.64s'; %-.80s" - hun "A(z) '%-.64s' fuggveny nem inicializalhato; %-.80s" - ita "Impossibile inizializzare la funzione '%-.64s'; %-.80s" - jpn "function '%-.64s' ¤ò½é´ü²½¤Ç¤­¤Þ¤»¤ó; %-.80s" - kor "'%-.64s' ÇÔ¼ö¸¦ ÃʱâÈ­ ÇÏÁö ¸øÇß½À´Ï´Ù.; %-.80s" - por "Não pode inicializar a função '%-.64s' - '%-.80s'" - rum "Nu pot initializa functia '%-.64s'; %-.80s" - rus "îÅ×ÏÚÍÏÖÎÏ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÔØ ÆÕÎËÃÉÀ '%-.64s'; %-.80s" - serbian "Ne mogu da inicijalizujem funkciju '%-.64s'; %-.80s" - slo "Nemô¾em inicializova» funkciu '%-.64s'; %-.80s" - spa "No puedo inicializar función '%-.64s'; %-.80s" - swe "Kan inte initialisera funktionen '%-.64s'; '%-.80s'" - ukr "îÅ ÍÏÖÕ ¦Î¦Ã¦Á̦ÚÕ×ÁÔÉ ÆÕÎËæÀ '%-.64s'; %-.80s" + cze "Nemohu inicializovat funkci '%-.192s'; %-.80s" + dan "Kan ikke starte funktionen '%-.192s'; %-.80s" + nla "Kan functie '%-.192s' niet initialiseren; %-.80s" + eng "Can't initialize function '%-.192s'; %-.80s" + jps "function '%-.192s' ‚ð‰Šú‰»‚Å‚«‚Ü‚¹‚ñ; %-.80s", + est "Ei suuda algväärtustada funktsiooni '%-.192s'; %-.80s" + fre "Impossible d'initialiser la fonction '%-.192s'; %-.80s" + ger "Kann Funktion '%-.192s' nicht initialisieren: %-.80s" + greek "Äåí åßíáé äõíáôÞ ç Ýíáñîç ôçò óõíÜñôçóçò '%-.192s'; %-.80s" + hun "A(z) '%-.192s' fuggveny nem inicializalhato; %-.80s" + ita "Impossibile inizializzare la funzione '%-.192s'; %-.80s" + jpn "function '%-.192s' ¤ò½é´ü²½¤Ç¤­¤Þ¤»¤ó; %-.80s" + kor "'%-.192s' ÇÔ¼ö¸¦ ÃʱâÈ­ ÇÏÁö ¸øÇß½À´Ï´Ù.; %-.80s" + por "Não pode inicializar a função '%-.192s' - '%-.80s'" + rum "Nu pot initializa functia '%-.192s'; %-.80s" + rus "îÅ×ÏÚÍÏÖÎÏ ÉÎÉÃÉÁÌÉÚÉÒÏ×ÁÔØ ÆÕÎËÃÉÀ '%-.192s'; %-.80s" + serbian "Ne mogu da inicijalizujem funkciju '%-.192s'; %-.80s" + slo "Nemô¾em inicializova» funkciu '%-.192s'; %-.80s" + spa "No puedo inicializar función '%-.192s'; %-.80s" + swe "Kan inte initialisera funktionen '%-.192s'; '%-.80s'" + ukr "îÅ ÍÏÖÕ ¦Î¦Ã¦Á̦ÚÕ×ÁÔÉ ÆÕÎËæÀ '%-.192s'; %-.80s" ER_UDF_NO_PATHS cze "Pro sd-Bílenou knihovnu nejsou povoleny cesty" dan "Angivelse af sti ikke tilladt for delt bibliotek" @@ -2934,52 +2934,52 @@ ER_UDF_NO_PATHS swe "Man får inte ange sökväg för dynamiska bibliotek" ukr "îÅ ÄÏÚ×ÏÌÅÎÏ ×ÉËÏÒÉÓÔÏ×Õ×ÁÔÉ ÐÕÔ¦ ÄÌÑ ÒÏÚĦÌÀ×ÁÎÉÈ Â¦Â̦ÏÔÅË" ER_UDF_EXISTS - cze "Funkce '%-.64s' ji-B¾ existuje" - dan "Funktionen '%-.64s' findes allerede" - nla "Functie '%-.64s' bestaat reeds" - eng "Function '%-.64s' already exists" - jps "Function '%-.64s' ‚ÍŠù‚É’è‹`‚³‚ê‚Ä‚¢‚Ü‚·", - est "Funktsioon '%-.64s' juba eksisteerib" - fre "La fonction '%-.64s' existe déjà" - ger "Funktion '%-.64s' existiert schon" - greek "Ç óõíÜñôçóç '%-.64s' õðÜñ÷åé Þäç" - hun "A '%-.64s' fuggveny mar letezik" - ita "La funzione '%-.64s' esiste gia`" - jpn "Function '%-.64s' ¤Ï´û¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹" - kor "'%-.64s' ÇÔ¼ö´Â ÀÌ¹Ì Á¸ÀçÇÕ´Ï´Ù." - por "Função '%-.64s' já existe" - rum "Functia '%-.64s' exista deja" - rus "æÕÎËÃÉÑ '%-.64s' ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ" - serbian "Funkcija '%-.64s' veæ postoji" - slo "Funkcia '%-.64s' u¾ existuje" - spa "Función '%-.64s' ya existe" - swe "Funktionen '%-.64s' finns redan" - ukr "æÕÎËÃ¦Ñ '%-.64s' ×ÖÅ ¦ÓÎÕ¤" + cze "Funkce '%-.192s' ji-B¾ existuje" + dan "Funktionen '%-.192s' findes allerede" + nla "Functie '%-.192s' bestaat reeds" + eng "Function '%-.192s' already exists" + jps "Function '%-.192s' ‚ÍŠù‚É’è‹`‚³‚ê‚Ä‚¢‚Ü‚·", + est "Funktsioon '%-.192s' juba eksisteerib" + fre "La fonction '%-.192s' existe déjà" + ger "Funktion '%-.192s' existiert schon" + greek "Ç óõíÜñôçóç '%-.192s' õðÜñ÷åé Þäç" + hun "A '%-.192s' fuggveny mar letezik" + ita "La funzione '%-.192s' esiste gia`" + jpn "Function '%-.192s' ¤Ï´û¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹" + kor "'%-.192s' ÇÔ¼ö´Â ÀÌ¹Ì Á¸ÀçÇÕ´Ï´Ù." + por "Função '%-.192s' já existe" + rum "Functia '%-.192s' exista deja" + rus "æÕÎËÃÉÑ '%-.192s' ÕÖÅ ÓÕÝÅÓÔ×ÕÅÔ" + serbian "Funkcija '%-.192s' veæ postoji" + slo "Funkcia '%-.192s' u¾ existuje" + spa "Función '%-.192s' ya existe" + swe "Funktionen '%-.192s' finns redan" + ukr "æÕÎËÃ¦Ñ '%-.192s' ×ÖÅ ¦ÓÎÕ¤" ER_CANT_OPEN_LIBRARY - cze "Nemohu otev-Bøít sdílenou knihovnu '%-.64s' (errno: %d %-.128s)" - dan "Kan ikke åbne delt bibliotek '%-.64s' (errno: %d %-.128s)" - nla "Kan shared library '%-.64s' niet openen (Errcode: %d %-.128s)" - eng "Can't open shared library '%-.64s' (errno: %d %-.128s)" - jps "shared library '%-.64s' ‚ðŠJ‚­Ž–‚ª‚Å‚«‚Ü‚¹‚ñ (errno: %d %-.128s)", - est "Ei suuda avada jagatud teeki '%-.64s' (veakood: %d %-.128s)" - fre "Impossible d'ouvrir la bibliothèque partagée '%-.64s' (errno: %d %-.128s)" - ger "Kann Shared Library '%-.64s' nicht öffnen (Fehler: %d %-.128s)" - greek "Äåí åßíáé äõíáôÞ ç áíÜãíùóç ôçò shared library '%-.64s' (êùäéêüò ëÜèïõò: %d %-.128s)" - hun "A(z) '%-.64s' megosztott konyvtar nem hasznalhato (hibakod: %d %-.128s)" - ita "Impossibile aprire la libreria condivisa '%-.64s' (errno: %d %-.128s)" - jpn "shared library '%-.64s' ¤ò³«¤¯»ö¤¬¤Ç¤­¤Þ¤»¤ó (errno: %d %-.128s)" - kor "'%-.64s' °øÀ¯ ¶óÀ̹ö·¯¸®¸¦ ¿­¼ö ¾ø½À´Ï´Ù.(¿¡·¯¹øÈ£: %d %-.128s)" - nor "Can't open shared library '%-.64s' (errno: %d %-.128s)" - norwegian-ny "Can't open shared library '%-.64s' (errno: %d %-.128s)" - pol "Can't open shared library '%-.64s' (errno: %d %-.128s)" - por "Não pode abrir biblioteca compartilhada '%-.64s' (erro no. %d '%-.128s')" - rum "Nu pot deschide libraria shared '%-.64s' (Eroare: %d %-.128s)" - rus "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÄÉÎÁÍÉÞÅÓËÕÀ ÂÉÂÌÉÏÔÅËÕ '%-.64s' (ÏÛÉÂËÁ: %d %-.128s)" - serbian "Ne mogu da otvorim share-ovanu biblioteku '%-.64s' (errno: %d %-.128s)" - slo "Nemô¾em otvori» zdieµanú kni¾nicu '%-.64s' (chybový kód: %d %-.128s)" - spa "No puedo abrir libraria conjugada '%-.64s' (errno: %d %-.128s)" - swe "Kan inte öppna det dynamiska biblioteket '%-.64s' (Felkod: %d %-.128s)" - ukr "îÅ ÍÏÖÕ ×¦ÄËÒÉÔÉ ÒÏÚĦÌÀ×ÁÎÕ Â¦Â̦ÏÔÅËÕ '%-.64s' (ÐÏÍÉÌËÁ: %d %-.128s)" + cze "Nemohu otev-Bøít sdílenou knihovnu '%-.192s' (errno: %d %-.128s)" + dan "Kan ikke åbne delt bibliotek '%-.192s' (errno: %d %-.128s)" + nla "Kan shared library '%-.192s' niet openen (Errcode: %d %-.128s)" + eng "Can't open shared library '%-.192s' (errno: %d %-.128s)" + jps "shared library '%-.192s' ‚ðŠJ‚­Ž–‚ª‚Å‚«‚Ü‚¹‚ñ (errno: %d %-.128s)", + est "Ei suuda avada jagatud teeki '%-.192s' (veakood: %d %-.128s)" + fre "Impossible d'ouvrir la bibliothèque partagée '%-.192s' (errno: %d %-.128s)" + ger "Kann Shared Library '%-.192s' nicht öffnen (Fehler: %d %-.128s)" + greek "Äåí åßíáé äõíáôÞ ç áíÜãíùóç ôçò shared library '%-.192s' (êùäéêüò ëÜèïõò: %d %-.128s)" + hun "A(z) '%-.192s' megosztott konyvtar nem hasznalhato (hibakod: %d %-.128s)" + ita "Impossibile aprire la libreria condivisa '%-.192s' (errno: %d %-.128s)" + jpn "shared library '%-.192s' ¤ò³«¤¯»ö¤¬¤Ç¤­¤Þ¤»¤ó (errno: %d %-.128s)" + kor "'%-.192s' °øÀ¯ ¶óÀ̹ö·¯¸®¸¦ ¿­¼ö ¾ø½À´Ï´Ù.(¿¡·¯¹øÈ£: %d %-.128s)" + nor "Can't open shared library '%-.192s' (errno: %d %-.128s)" + norwegian-ny "Can't open shared library '%-.192s' (errno: %d %-.128s)" + pol "Can't open shared library '%-.192s' (errno: %d %-.128s)" + por "Não pode abrir biblioteca compartilhada '%-.192s' (erro no. %d '%-.128s')" + rum "Nu pot deschide libraria shared '%-.192s' (Eroare: %d %-.128s)" + rus "îÅ×ÏÚÍÏÖÎÏ ÏÔËÒÙÔØ ÄÉÎÁÍÉÞÅÓËÕÀ ÂÉÂÌÉÏÔÅËÕ '%-.192s' (ÏÛÉÂËÁ: %d %-.128s)" + serbian "Ne mogu da otvorim share-ovanu biblioteku '%-.192s' (errno: %d %-.128s)" + slo "Nemô¾em otvori» zdieµanú kni¾nicu '%-.192s' (chybový kód: %d %-.128s)" + spa "No puedo abrir libraria conjugada '%-.192s' (errno: %d %-.128s)" + swe "Kan inte öppna det dynamiska biblioteket '%-.192s' (Felkod: %d %-.128s)" + ukr "îÅ ÍÏÖÕ ×¦ÄËÒÉÔÉ ÒÏÚĦÌÀ×ÁÎÕ Â¦Â̦ÏÔÅËÕ '%-.192s' (ÐÏÍÉÌËÁ: %d %-.128s)" ER_CANT_FIND_DL_ENTRY cze "Nemohu naj-Bít funkci '%-.128s' v knihovnì" dan "Kan ikke finde funktionen '%-.128s' i bibliotek" @@ -3003,27 +3003,27 @@ ER_CANT_FIND_DL_ENTRY swe "Hittar inte funktionen '%-.128s' in det dynamiska biblioteket" ukr "îÅ ÍÏÖÕ ÚÎÁÊÔÉ ÆÕÎËæÀ '%-.128s' Õ Â¦Â̦ÏÔÅæ" ER_FUNCTION_NOT_DEFINED - cze "Funkce '%-.64s' nen-Bí definována" - dan "Funktionen '%-.64s' er ikke defineret" - nla "Functie '%-.64s' is niet gedefinieerd" - eng "Function '%-.64s' is not defined" - jps "Function '%-.64s' ‚Í’è‹`‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", - est "Funktsioon '%-.64s' ei ole defineeritud" - fre "La fonction '%-.64s' n'est pas définie" - ger "Funktion '%-.64s' ist nicht definiert" - greek "Ç óõíÜñôçóç '%-.64s' äåí Ý÷åé ïñéóèåß" - hun "A '%-.64s' fuggveny nem definialt" - ita "La funzione '%-.64s' non e` definita" - jpn "Function '%-.64s' ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" - kor "'%-.64s' ÇÔ¼ö°¡ Á¤ÀǵǾî ÀÖÁö ¾Ê½À´Ï´Ù." - por "Função '%-.64s' não está definida" - rum "Functia '%-.64s' nu e definita" - rus "æÕÎËÃÉÑ '%-.64s' ÎÅ ÏÐÒÅÄÅÌÅÎÁ" - serbian "Funkcija '%-.64s' nije definisana" - slo "Funkcia '%-.64s' nie je definovaná" - spa "Función '%-.64s' no está definida" - swe "Funktionen '%-.64s' är inte definierad" - ukr "æÕÎËæÀ '%-.64s' ÎÅ ×ÉÚÎÁÞÅÎÏ" + cze "Funkce '%-.192s' nen-Bí definována" + dan "Funktionen '%-.192s' er ikke defineret" + nla "Functie '%-.192s' is niet gedefinieerd" + eng "Function '%-.192s' is not defined" + jps "Function '%-.192s' ‚Í’è‹`‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", + est "Funktsioon '%-.192s' ei ole defineeritud" + fre "La fonction '%-.192s' n'est pas définie" + ger "Funktion '%-.192s' ist nicht definiert" + greek "Ç óõíÜñôçóç '%-.192s' äåí Ý÷åé ïñéóèåß" + hun "A '%-.192s' fuggveny nem definialt" + ita "La funzione '%-.192s' non e` definita" + jpn "Function '%-.192s' ¤ÏÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" + kor "'%-.192s' ÇÔ¼ö°¡ Á¤ÀǵǾî ÀÖÁö ¾Ê½À´Ï´Ù." + por "Função '%-.192s' não está definida" + rum "Functia '%-.192s' nu e definita" + rus "æÕÎËÃÉÑ '%-.192s' ÎÅ ÏÐÒÅÄÅÌÅÎÁ" + serbian "Funkcija '%-.192s' nije definisana" + slo "Funkcia '%-.192s' nie je definovaná" + spa "Función '%-.192s' no está definida" + swe "Funktionen '%-.192s' är inte definierad" + ukr "æÕÎËæÀ '%-.192s' ÎÅ ×ÉÚÎÁÞÅÎÏ" ER_HOST_IS_BLOCKED cze "Stroj '%-.64s' je zablokov-Bán kvùli mnoha chybám pøi pøipojování. Odblokujete pou¾itím 'mysqladmin flush-hosts'" dan "Værten '%-.64s' er blokeret på grund af mange fejlforespørgsler. Lås op med 'mysqladmin flush-hosts'" @@ -3188,27 +3188,27 @@ ER_WRONG_VALUE_COUNT_ON_ROW 21S01 swe "Antalet kolumner motsvarar inte antalet värden på rad: %ld" ukr "ë¦ÌØË¦ÓÔØ ÓÔÏ×ÂÃ¦× ÎÅ ÓЦ×ÐÁÄÁ¤ Ú Ë¦ÌØË¦ÓÔÀ ÚÎÁÞÅÎØ Õ ÓÔÒÏæ %ld" ER_CANT_REOPEN_TABLE - cze "Nemohu znovuotev-Bøít tabulku: '%-.64s" - dan "Kan ikke genåbne tabel '%-.64s" - nla "Kan tabel niet opnieuw openen: '%-.64s" - eng "Can't reopen table: '%-.64s'" - est "Ei suuda taasavada tabelit '%-.64s'" - fre "Impossible de réouvrir la table: '%-.64s" - ger "Kann Tabelle'%-.64s' nicht erneut öffnen" - hun "Nem lehet ujra-megnyitni a tablat: '%-.64s" - ita "Impossibile riaprire la tabella: '%-.64s'" - kor "Å×À̺íÀ» ´Ù½Ã ¿­¼ö ¾ø±º¿ä: '%-.64s" - nor "Can't reopen table: '%-.64s" - norwegian-ny "Can't reopen table: '%-.64s" - pol "Can't reopen table: '%-.64s" - por "Não pode reabrir a tabela '%-.64s" - rum "Nu pot redeschide tabela: '%-.64s'" - rus "îÅ×ÏÚÍÏÖÎÏ ÚÁÎÏ×Ï ÏÔËÒÙÔØ ÔÁÂÌÉÃÕ '%-.64s'" - serbian "Ne mogu da ponovo otvorim tabelu '%-.64s'" - slo "Can't reopen table: '%-.64s" - spa "No puedo reabrir tabla: '%-.64s" - swe "Kunde inte stänga och öppna tabell '%-.64s" - ukr "îÅ ÍÏÖÕ ÐÅÒÅצÄËÒÉÔÉ ÔÁÂÌÉÃÀ: '%-.64s'" + cze "Nemohu znovuotev-Bøít tabulku: '%-.192s" + dan "Kan ikke genåbne tabel '%-.192s" + nla "Kan tabel niet opnieuw openen: '%-.192s" + eng "Can't reopen table: '%-.192s'" + est "Ei suuda taasavada tabelit '%-.192s'" + fre "Impossible de réouvrir la table: '%-.192s" + ger "Kann Tabelle'%-.192s' nicht erneut öffnen" + hun "Nem lehet ujra-megnyitni a tablat: '%-.192s" + ita "Impossibile riaprire la tabella: '%-.192s'" + kor "Å×À̺íÀ» ´Ù½Ã ¿­¼ö ¾ø±º¿ä: '%-.192s" + nor "Can't reopen table: '%-.192s" + norwegian-ny "Can't reopen table: '%-.192s" + pol "Can't reopen table: '%-.192s" + por "Não pode reabrir a tabela '%-.192s" + rum "Nu pot redeschide tabela: '%-.192s'" + rus "îÅ×ÏÚÍÏÖÎÏ ÚÁÎÏ×Ï ÏÔËÒÙÔØ ÔÁÂÌÉÃÕ '%-.192s'" + serbian "Ne mogu da ponovo otvorim tabelu '%-.192s'" + slo "Can't reopen table: '%-.192s" + spa "No puedo reabrir tabla: '%-.192s" + swe "Kunde inte stänga och öppna tabell '%-.192s" + ukr "îÅ ÍÏÖÕ ÐÅÒÅצÄËÒÉÔÉ ÔÁÂÌÉÃÀ: '%-.192s'" ER_INVALID_USE_OF_NULL 22004 cze "Neplatn-Bé u¾ití hodnoty NULL" dan "Forkert brug af nulværdi (NULL)" @@ -3266,65 +3266,65 @@ ER_MIX_OF_GROUP_FUNC_AND_FIELDS 42000 swe "Man får ha både GROUP-kolumner (MIN(),MAX(),COUNT()...) och fält i en fråga om man inte har en GROUP BY-del" ukr "úͦÛÕ×ÁÎÎÑ GROUP ÓÔÏ×ÂÃ¦× (MIN(),MAX(),COUNT()...) Ú ÎÅ GROUP ÓÔÏ×ÂÃÑÍÉ ¤ ÚÁÂÏÒÏÎÅÎÉÍ, ÑËÝÏ ÎÅ ÍÁ¤ GROUP BY" ER_NONEXISTING_GRANT 42000 - cze "Neexistuje odpov-Bídající grant pro u¾ivatele '%-.32s' na stroji '%-.64s'" - dan "Denne tilladelse findes ikke for brugeren '%-.32s' på vært '%-.64s'" - nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.32s' op host '%-.64s'" - eng "There is no such grant defined for user '%-.32s' on host '%-.64s'" - jps "ƒ†[ƒU[ '%-.32s' (ƒzƒXƒg '%-.64s' ‚̃†[ƒU[) ‚Í‹–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", - est "Sellist õigust ei ole defineeritud kasutajale '%-.32s' masinast '%-.64s'" - fre "Un tel droit n'est pas défini pour l'utilisateur '%-.32s' sur l'hôte '%-.64s'" - ger "Für Benutzer '%-.32s' auf Host '%-.64s' gibt es keine solche Berechtigung" - hun "A '%-.32s' felhasznalonak nincs ilyen joga a '%-.64s' host-on" - ita "GRANT non definita per l'utente '%-.32s' dalla macchina '%-.64s'" - jpn "¥æ¡¼¥¶¡¼ '%-.32s' (¥Û¥¹¥È '%-.64s' ¤Î¥æ¡¼¥¶¡¼) ¤Ïµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" - kor "»ç¿ëÀÚ '%-.32s' (È£½ºÆ® '%-.64s')¸¦ À§ÇÏ¿© Á¤ÀÇµÈ ±×·± ½ÂÀÎÀº ¾ø½À´Ï´Ù." - por "Não existe tal permissão (grant) definida para o usuário '%-.32s' no 'host' '%-.64s'" - rum "Nu exista un astfel de grant definit pentru utilzatorul '%-.32s' de pe host-ul '%-.64s'" - rus "ôÁËÉÅ ÐÒÁ×Á ÎÅ ÏÐÒÅÄÅÌÅÎÙ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' ÎÁ ÈÏÓÔÅ '%-.64s'" - serbian "Ne postoji odobrenje za pristup korisniku '%-.32s' na host-u '%-.64s'" - spa "No existe permiso definido para usuario '%-.32s' en el servidor '%-.64s'" - swe "Det finns inget privilegium definierat för användare '%-.32s' på '%-.64s'" - ukr "ðÏ×ÎÏ×ÁÖÅÎØ ÎÅ ×ÉÚÎÁÞÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ '%-.32s' Ú ÈÏÓÔÕ '%-.64s'" + cze "Neexistuje odpov-Bídající grant pro u¾ivatele '%-.48s' na stroji '%-.64s'" + dan "Denne tilladelse findes ikke for brugeren '%-.48s' på vært '%-.64s'" + nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.48s' op host '%-.64s'" + eng "There is no such grant defined for user '%-.48s' on host '%-.64s'" + jps "ƒ†[ƒU[ '%-.48s' (ƒzƒXƒg '%-.64s' ‚̃†[ƒU[) ‚Í‹–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", + est "Sellist õigust ei ole defineeritud kasutajale '%-.48s' masinast '%-.64s'" + fre "Un tel droit n'est pas défini pour l'utilisateur '%-.48s' sur l'hôte '%-.64s'" + ger "Für Benutzer '%-.48s' auf Host '%-.64s' gibt es keine solche Berechtigung" + hun "A '%-.48s' felhasznalonak nincs ilyen joga a '%-.64s' host-on" + ita "GRANT non definita per l'utente '%-.48s' dalla macchina '%-.64s'" + jpn "¥æ¡¼¥¶¡¼ '%-.48s' (¥Û¥¹¥È '%-.64s' ¤Î¥æ¡¼¥¶¡¼) ¤Ïµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" + kor "»ç¿ëÀÚ '%-.48s' (È£½ºÆ® '%-.64s')¸¦ À§ÇÏ¿© Á¤ÀÇµÈ ±×·± ½ÂÀÎÀº ¾ø½À´Ï´Ù." + por "Não existe tal permissão (grant) definida para o usuário '%-.48s' no 'host' '%-.64s'" + rum "Nu exista un astfel de grant definit pentru utilzatorul '%-.48s' de pe host-ul '%-.64s'" + rus "ôÁËÉÅ ÐÒÁ×Á ÎÅ ÏÐÒÅÄÅÌÅÎÙ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.48s' ÎÁ ÈÏÓÔÅ '%-.64s'" + serbian "Ne postoji odobrenje za pristup korisniku '%-.48s' na host-u '%-.64s'" + spa "No existe permiso definido para usuario '%-.48s' en el servidor '%-.64s'" + swe "Det finns inget privilegium definierat för användare '%-.48s' på '%-.64s'" + ukr "ðÏ×ÎÏ×ÁÖÅÎØ ÎÅ ×ÉÚÎÁÞÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ '%-.48s' Ú ÈÏÓÔÕ '%-.64s'" ER_TABLEACCESS_DENIED_ERROR 42000 - cze "%-.16s p-Bøíkaz nepøístupný pro u¾ivatele: '%-.32s'@'%-.64s' pro tabulku '%-.64s'" - dan "%-.16s-kommandoen er ikke tilladt for brugeren '%-.32s'@'%-.64s' for tabellen '%-.64s'" - nla "%-.16s commando geweigerd voor gebruiker: '%-.32s'@'%-.64s' voor tabel '%-.64s'" - eng "%-.16s command denied to user '%-.32s'@'%-.64s' for table '%-.64s'" - jps "ƒRƒ}ƒ“ƒh %-.16s ‚Í ƒ†[ƒU[ '%-.32s'@'%-.64s' ,ƒe[ƒuƒ‹ '%-.64s' ‚ɑ΂µ‚Ä‹–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", - est "%-.16s käsk ei ole lubatud kasutajale '%-.32s'@'%-.64s' tabelis '%-.64s'" - fre "La commande '%-.16s' est interdite à l'utilisateur: '%-.32s'@'@%-.64s' sur la table '%-.64s'" - ger "%-.16s Befehl nicht erlaubt für Benutzer '%-.32s'@'%-.64s' auf Tabelle '%-.64s'" - hun "%-.16s parancs a '%-.32s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.64s' tablaban" - ita "Comando %-.16s negato per l'utente: '%-.32s'@'%-.64s' sulla tabella '%-.64s'" - jpn "¥³¥Þ¥ó¥É %-.16s ¤Ï ¥æ¡¼¥¶¡¼ '%-.32s'@'%-.64s' ,¥Æ¡¼¥Ö¥ë '%-.64s' ¤ËÂФ·¤Æµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" - kor "'%-.16s' ¸í·ÉÀº ´ÙÀ½ »ç¿ëÀÚ¿¡°Ô °ÅºÎµÇ¾ú½À´Ï´Ù. : '%-.32s'@'%-.64s' for Å×À̺í '%-.64s'" - por "Comando '%-.16s' negado para o usuário '%-.32s'@'%-.64s' na tabela '%-.64s'" - rum "Comanda %-.16s interzisa utilizatorului: '%-.32s'@'%-.64s' pentru tabela '%-.64s'" - rus "ëÏÍÁÎÄÁ %-.16s ÚÁÐÒÅÝÅÎÁ ÐÏÌØÚÏ×ÁÔÅÌÀ '%-.32s'@'%-.64s' ÄÌÑ ÔÁÂÌÉÃÙ '%-.64s'" - serbian "%-.16s komanda zabranjena za korisnika '%-.32s'@'%-.64s' za tabelu '%-.64s'" - spa "%-.16s comando negado para usuario: '%-.32s'@'%-.64s' para tabla '%-.64s'" - swe "%-.16s ej tillåtet för '%-.32s'@'%-.64s' för tabell '%-.64s'" - ukr "%-.16s ËÏÍÁÎÄÁ ÚÁÂÏÒÏÎÅÎÁ ËÏÒÉÓÔÕ×ÁÞÕ: '%-.32s'@'%-.64s' Õ ÔÁÂÌÉæ '%-.64s'" + cze "%-.16s p-Bøíkaz nepøístupný pro u¾ivatele: '%-.48s'@'%-.64s' pro tabulku '%-.192s'" + dan "%-.16s-kommandoen er ikke tilladt for brugeren '%-.48s'@'%-.64s' for tabellen '%-.192s'" + nla "%-.16s commando geweigerd voor gebruiker: '%-.48s'@'%-.64s' voor tabel '%-.192s'" + eng "%-.16s command denied to user '%-.48s'@'%-.64s' for table '%-.192s'" + jps "ƒRƒ}ƒ“ƒh %-.16s ‚Í ƒ†[ƒU[ '%-.48s'@'%-.64s' ,ƒe[ƒuƒ‹ '%-.192s' ‚ɑ΂µ‚Ä‹–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", + est "%-.16s käsk ei ole lubatud kasutajale '%-.48s'@'%-.64s' tabelis '%-.192s'" + fre "La commande '%-.16s' est interdite à l'utilisateur: '%-.48s'@'@%-.64s' sur la table '%-.192s'" + ger "%-.16s Befehl nicht erlaubt für Benutzer '%-.48s'@'%-.64s' auf Tabelle '%-.192s'" + hun "%-.16s parancs a '%-.48s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.192s' tablaban" + ita "Comando %-.16s negato per l'utente: '%-.48s'@'%-.64s' sulla tabella '%-.192s'" + jpn "¥³¥Þ¥ó¥É %-.16s ¤Ï ¥æ¡¼¥¶¡¼ '%-.48s'@'%-.64s' ,¥Æ¡¼¥Ö¥ë '%-.192s' ¤ËÂФ·¤Æµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" + kor "'%-.16s' ¸í·ÉÀº ´ÙÀ½ »ç¿ëÀÚ¿¡°Ô °ÅºÎµÇ¾ú½À´Ï´Ù. : '%-.48s'@'%-.64s' for Å×À̺í '%-.192s'" + por "Comando '%-.16s' negado para o usuário '%-.48s'@'%-.64s' na tabela '%-.192s'" + rum "Comanda %-.16s interzisa utilizatorului: '%-.48s'@'%-.64s' pentru tabela '%-.192s'" + rus "ëÏÍÁÎÄÁ %-.16s ÚÁÐÒÅÝÅÎÁ ÐÏÌØÚÏ×ÁÔÅÌÀ '%-.48s'@'%-.64s' ÄÌÑ ÔÁÂÌÉÃÙ '%-.192s'" + serbian "%-.16s komanda zabranjena za korisnika '%-.48s'@'%-.64s' za tabelu '%-.192s'" + spa "%-.16s comando negado para usuario: '%-.48s'@'%-.64s' para tabla '%-.192s'" + swe "%-.16s ej tillåtet för '%-.48s'@'%-.64s' för tabell '%-.192s'" + ukr "%-.16s ËÏÍÁÎÄÁ ÚÁÂÏÒÏÎÅÎÁ ËÏÒÉÓÔÕ×ÁÞÕ: '%-.48s'@'%-.64s' Õ ÔÁÂÌÉæ '%-.192s'" ER_COLUMNACCESS_DENIED_ERROR 42000 - cze "%-.16s p-Bøíkaz nepøístupný pro u¾ivatele: '%-.32s'@'%-.64s' pro sloupec '%-.64s' v tabulce '%-.64s'" - dan "%-.16s-kommandoen er ikke tilladt for brugeren '%-.32s'@'%-.64s' for kolonne '%-.64s' in tabellen '%-.64s'" - nla "%-.16s commando geweigerd voor gebruiker: '%-.32s'@'%-.64s' voor kolom '%-.64s' in tabel '%-.64s'" - eng "%-.16s command denied to user '%-.32s'@'%-.64s' for column '%-.64s' in table '%-.64s'" - jps "ƒRƒ}ƒ“ƒh %-.16s ‚Í ƒ†[ƒU[ '%-.32s'@'%-.64s'\n ƒJƒ‰ƒ€ '%-.64s' ƒe[ƒuƒ‹ '%-.64s' ‚ɑ΂µ‚Ä‹–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", - est "%-.16s käsk ei ole lubatud kasutajale '%-.32s'@'%-.64s' tulbale '%-.64s' tabelis '%-.64s'" - fre "La commande '%-.16s' est interdite à l'utilisateur: '%-.32s'@'@%-.64s' sur la colonne '%-.64s' de la table '%-.64s'" - ger "%-.16s Befehl nicht erlaubt für Benutzer '%-.32s'@'%-.64s' und Feld '%-.64s' in Tabelle '%-.64s'" - hun "%-.16s parancs a '%-.32s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.64s' mezo eseten a '%-.64s' tablaban" - ita "Comando %-.16s negato per l'utente: '%-.32s'@'%-.64s' sulla colonna '%-.64s' della tabella '%-.64s'" - jpn "¥³¥Þ¥ó¥É %-.16s ¤Ï ¥æ¡¼¥¶¡¼ '%-.32s'@'%-.64s'\n ¥«¥é¥à '%-.64s' ¥Æ¡¼¥Ö¥ë '%-.64s' ¤ËÂФ·¤Æµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" - kor "'%-.16s' ¸í·ÉÀº ´ÙÀ½ »ç¿ëÀÚ¿¡°Ô °ÅºÎµÇ¾ú½À´Ï´Ù. : '%-.32s'@'%-.64s' for Ä®·³ '%-.64s' in Å×À̺í '%-.64s'" - por "Comando '%-.16s' negado para o usuário '%-.32s'@'%-.64s' na coluna '%-.64s', na tabela '%-.64s'" - rum "Comanda %-.16s interzisa utilizatorului: '%-.32s'@'%-.64s' pentru coloana '%-.64s' in tabela '%-.64s'" - rus "ëÏÍÁÎÄÁ %-.16s ÚÁÐÒÅÝÅÎÁ ÐÏÌØÚÏ×ÁÔÅÌÀ '%-.32s'@'%-.64s' ÄÌÑ ÓÔÏÌÂÃÁ '%-.64s' × ÔÁÂÌÉÃÅ '%-.64s'" - serbian "%-.16s komanda zabranjena za korisnika '%-.32s'@'%-.64s' za kolonu '%-.64s' iz tabele '%-.64s'" - spa "%-.16s comando negado para usuario: '%-.32s'@'%-.64s' para columna '%-.64s' en la tabla '%-.64s'" - swe "%-.16s ej tillåtet för '%-.32s'@'%-.64s' för kolumn '%-.64s' i tabell '%-.64s'" - ukr "%-.16s ËÏÍÁÎÄÁ ÚÁÂÏÒÏÎÅÎÁ ËÏÒÉÓÔÕ×ÁÞÕ: '%-.32s'@'%-.64s' ÄÌÑ ÓÔÏ×ÂÃÑ '%-.64s' Õ ÔÁÂÌÉæ '%-.64s'" + cze "%-.16s p-Bøíkaz nepøístupný pro u¾ivatele: '%-.48s'@'%-.64s' pro sloupec '%-.192s' v tabulce '%-.192s'" + dan "%-.16s-kommandoen er ikke tilladt for brugeren '%-.48s'@'%-.64s' for kolonne '%-.192s' in tabellen '%-.192s'" + nla "%-.16s commando geweigerd voor gebruiker: '%-.48s'@'%-.64s' voor kolom '%-.192s' in tabel '%-.192s'" + eng "%-.16s command denied to user '%-.48s'@'%-.64s' for column '%-.192s' in table '%-.192s'" + jps "ƒRƒ}ƒ“ƒh %-.16s ‚Í ƒ†[ƒU[ '%-.48s'@'%-.64s'\n ƒJƒ‰ƒ€ '%-.192s' ƒe[ƒuƒ‹ '%-.192s' ‚ɑ΂µ‚Ä‹–‰Â‚³‚ê‚Ä‚¢‚Ü‚¹‚ñ", + est "%-.16s käsk ei ole lubatud kasutajale '%-.48s'@'%-.64s' tulbale '%-.192s' tabelis '%-.192s'" + fre "La commande '%-.16s' est interdite à l'utilisateur: '%-.48s'@'@%-.64s' sur la colonne '%-.192s' de la table '%-.192s'" + ger "%-.16s Befehl nicht erlaubt für Benutzer '%-.48s'@'%-.64s' und Feld '%-.192s' in Tabelle '%-.192s'" + hun "%-.16s parancs a '%-.48s'@'%-.64s' felhasznalo szamara nem engedelyezett a '%-.192s' mezo eseten a '%-.192s' tablaban" + ita "Comando %-.16s negato per l'utente: '%-.48s'@'%-.64s' sulla colonna '%-.192s' della tabella '%-.192s'" + jpn "¥³¥Þ¥ó¥É %-.16s ¤Ï ¥æ¡¼¥¶¡¼ '%-.48s'@'%-.64s'\n ¥«¥é¥à '%-.192s' ¥Æ¡¼¥Ö¥ë '%-.192s' ¤ËÂФ·¤Æµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó" + kor "'%-.16s' ¸í·ÉÀº ´ÙÀ½ »ç¿ëÀÚ¿¡°Ô °ÅºÎµÇ¾ú½À´Ï´Ù. : '%-.48s'@'%-.64s' for Ä®·³ '%-.192s' in Å×À̺í '%-.192s'" + por "Comando '%-.16s' negado para o usuário '%-.48s'@'%-.64s' na coluna '%-.192s', na tabela '%-.192s'" + rum "Comanda %-.16s interzisa utilizatorului: '%-.48s'@'%-.64s' pentru coloana '%-.192s' in tabela '%-.192s'" + rus "ëÏÍÁÎÄÁ %-.16s ÚÁÐÒÅÝÅÎÁ ÐÏÌØÚÏ×ÁÔÅÌÀ '%-.48s'@'%-.64s' ÄÌÑ ÓÔÏÌÂÃÁ '%-.192s' × ÔÁÂÌÉÃÅ '%-.192s'" + serbian "%-.16s komanda zabranjena za korisnika '%-.48s'@'%-.64s' za kolonu '%-.192s' iz tabele '%-.192s'" + spa "%-.16s comando negado para usuario: '%-.48s'@'%-.64s' para columna '%-.192s' en la tabla '%-.192s'" + swe "%-.16s ej tillåtet för '%-.48s'@'%-.64s' för kolumn '%-.192s' i tabell '%-.192s'" + ukr "%-.16s ËÏÍÁÎÄÁ ÚÁÂÏÒÏÎÅÎÁ ËÏÒÉÓÔÕ×ÁÞÕ: '%-.48s'@'%-.64s' ÄÌÑ ÓÔÏ×ÂÃÑ '%-.192s' Õ ÔÁÂÌÉæ '%-.192s'" ER_ILLEGAL_GRANT_FOR_TABLE 42000 cze "Neplatn-Bý pøíkaz GRANT/REVOKE. Prosím, pøeètìte si v manuálu, jaká privilegia je mo¾né pou¾ít." dan "Forkert GRANT/REVOKE kommando. Se i brugervejledningen hvilke privilegier der kan specificeres." @@ -3368,46 +3368,46 @@ ER_GRANT_WRONG_HOST_OR_USER 42000 swe "Felaktigt maskinnamn eller användarnamn använt med GRANT" ukr "áÒÇÕÍÅÎÔ host ÁÂÏ user ÄÌÑ GRANT ÚÁÄÏ×ÇÉÊ" ER_NO_SUCH_TABLE 42S02 - cze "Tabulka '%-.64s.%-.64s' neexistuje" - dan "Tabellen '%-.64s.%-.64s' eksisterer ikke" - nla "Tabel '%-.64s.%-.64s' bestaat niet" - eng "Table '%-.64s.%-.64s' doesn't exist" - est "Tabelit '%-.64s.%-.64s' ei eksisteeri" - fre "La table '%-.64s.%-.64s' n'existe pas" - ger "Tabelle '%-.64s.%-.64s' existiert nicht" - hun "A '%-.64s.%-.64s' tabla nem letezik" - ita "La tabella '%-.64s.%-.64s' non esiste" - jpn "Table '%-.64s.%-.64s' doesn't exist" - kor "Å×À̺í '%-.64s.%-.64s' ´Â Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù." - nor "Table '%-.64s.%-.64s' doesn't exist" - norwegian-ny "Table '%-.64s.%-.64s' doesn't exist" - pol "Table '%-.64s.%-.64s' doesn't exist" - por "Tabela '%-.64s.%-.64s' não existe" - rum "Tabela '%-.64s.%-.64s' nu exista" - rus "ôÁÂÌÉÃÁ '%-.64s.%-.64s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ" - serbian "Tabela '%-.64s.%-.64s' ne postoji" - slo "Table '%-.64s.%-.64s' doesn't exist" - spa "Tabla '%-.64s.%-.64s' no existe" - swe "Det finns ingen tabell som heter '%-.64s.%-.64s'" - ukr "ôÁÂÌÉÃÑ '%-.64s.%-.64s' ÎÅ ¦ÓÎÕ¤" + cze "Tabulka '%-.192s.%-.192s' neexistuje" + dan "Tabellen '%-.192s.%-.192s' eksisterer ikke" + nla "Tabel '%-.192s.%-.192s' bestaat niet" + eng "Table '%-.192s.%-.192s' doesn't exist" + est "Tabelit '%-.192s.%-.192s' ei eksisteeri" + fre "La table '%-.192s.%-.192s' n'existe pas" + ger "Tabelle '%-.192s.%-.192s' existiert nicht" + hun "A '%-.192s.%-.192s' tabla nem letezik" + ita "La tabella '%-.192s.%-.192s' non esiste" + jpn "Table '%-.192s.%-.192s' doesn't exist" + kor "Å×À̺í '%-.192s.%-.192s' ´Â Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù." + nor "Table '%-.192s.%-.192s' doesn't exist" + norwegian-ny "Table '%-.192s.%-.192s' doesn't exist" + pol "Table '%-.192s.%-.192s' doesn't exist" + por "Tabela '%-.192s.%-.192s' não existe" + rum "Tabela '%-.192s.%-.192s' nu exista" + rus "ôÁÂÌÉÃÁ '%-.192s.%-.192s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ" + serbian "Tabela '%-.192s.%-.192s' ne postoji" + slo "Table '%-.192s.%-.192s' doesn't exist" + spa "Tabla '%-.192s.%-.192s' no existe" + swe "Det finns ingen tabell som heter '%-.192s.%-.192s'" + ukr "ôÁÂÌÉÃÑ '%-.192s.%-.192s' ÎÅ ¦ÓÎÕ¤" ER_NONEXISTING_TABLE_GRANT 42000 - cze "Neexistuje odpov-Bídající grant pro u¾ivatele '%-.32s' na stroji '%-.64s' pro tabulku '%-.64s'" - dan "Denne tilladelse eksisterer ikke for brugeren '%-.32s' på vært '%-.64s' for tabellen '%-.64s'" - nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.32s' op host '%-.64s' op tabel '%-.64s'" - eng "There is no such grant defined for user '%-.32s' on host '%-.64s' on table '%-.64s'" - est "Sellist õigust ei ole defineeritud kasutajale '%-.32s' masinast '%-.64s' tabelile '%-.64s'" - fre "Un tel droit n'est pas défini pour l'utilisateur '%-.32s' sur l'hôte '%-.64s' sur la table '%-.64s'" - ger "Eine solche Berechtigung ist für User '%-.32s' auf Host '%-.64s' an Tabelle '%-.64s' nicht definiert" - hun "A '%-.32s' felhasznalo szamara a '%-.64s' host '%-.64s' tablajaban ez a parancs nem engedelyezett" - ita "GRANT non definita per l'utente '%-.32s' dalla macchina '%-.64s' sulla tabella '%-.64s'" - kor "»ç¿ëÀÚ '%-.32s'(È£½ºÆ® '%-.64s')´Â Å×À̺í '%-.64s'¸¦ »ç¿ëÇϱâ À§ÇÏ¿© Á¤ÀÇµÈ ½ÂÀÎÀº ¾ø½À´Ï´Ù. " - por "Não existe tal permissão (grant) definido para o usuário '%-.32s' no 'host' '%-.64s', na tabela '%-.64s'" - rum "Nu exista un astfel de privilegiu (grant) definit pentru utilizatorul '%-.32s' de pe host-ul '%-.64s' pentru tabela '%-.64s'" - rus "ôÁËÉÅ ÐÒÁ×Á ÎÅ ÏÐÒÅÄÅÌÅÎÙ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' ÎÁ ËÏÍÐØÀÔÅÒÅ '%-.64s' ÄÌÑ ÔÁÂÌÉÃÙ '%-.64s'" - serbian "Ne postoji odobrenje za pristup korisniku '%-.32s' na host-u '%-.64s' tabeli '%-.64s'" - spa "No existe tal permiso definido para usuario '%-.32s' en el servidor '%-.64s' en la tabla '%-.64s'" - swe "Det finns inget privilegium definierat för användare '%-.32s' på '%-.64s' för tabell '%-.64s'" - ukr "ðÏ×ÎÏ×ÁÖÅÎØ ÎÅ ×ÉÚÎÁÞÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ '%-.32s' Ú ÈÏÓÔÕ '%-.64s' ÄÌÑ ÔÁÂÌÉæ '%-.64s'" + cze "Neexistuje odpov-Bídající grant pro u¾ivatele '%-.48s' na stroji '%-.64s' pro tabulku '%-.192s'" + dan "Denne tilladelse eksisterer ikke for brugeren '%-.48s' på vært '%-.64s' for tabellen '%-.192s'" + nla "Deze toegang (GRANT) is niet toegekend voor gebruiker '%-.48s' op host '%-.64s' op tabel '%-.192s'" + eng "There is no such grant defined for user '%-.48s' on host '%-.64s' on table '%-.192s'" + est "Sellist õigust ei ole defineeritud kasutajale '%-.48s' masinast '%-.64s' tabelile '%-.192s'" + fre "Un tel droit n'est pas défini pour l'utilisateur '%-.48s' sur l'hôte '%-.64s' sur la table '%-.192s'" + ger "Eine solche Berechtigung ist für User '%-.48s' auf Host '%-.64s' an Tabelle '%-.192s' nicht definiert" + hun "A '%-.48s' felhasznalo szamara a '%-.64s' host '%-.192s' tablajaban ez a parancs nem engedelyezett" + ita "GRANT non definita per l'utente '%-.48s' dalla macchina '%-.64s' sulla tabella '%-.192s'" + kor "»ç¿ëÀÚ '%-.48s'(È£½ºÆ® '%-.64s')´Â Å×À̺í '%-.192s'¸¦ »ç¿ëÇϱâ À§ÇÏ¿© Á¤ÀÇµÈ ½ÂÀÎÀº ¾ø½À´Ï´Ù. " + por "Não existe tal permissão (grant) definido para o usuário '%-.48s' no 'host' '%-.64s', na tabela '%-.192s'" + rum "Nu exista un astfel de privilegiu (grant) definit pentru utilizatorul '%-.48s' de pe host-ul '%-.64s' pentru tabela '%-.192s'" + rus "ôÁËÉÅ ÐÒÁ×Á ÎÅ ÏÐÒÅÄÅÌÅÎÙ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.48s' ÎÁ ËÏÍÐØÀÔÅÒÅ '%-.64s' ÄÌÑ ÔÁÂÌÉÃÙ '%-.192s'" + serbian "Ne postoji odobrenje za pristup korisniku '%-.48s' na host-u '%-.64s' tabeli '%-.192s'" + spa "No existe tal permiso definido para usuario '%-.48s' en el servidor '%-.64s' en la tabla '%-.192s'" + swe "Det finns inget privilegium definierat för användare '%-.48s' på '%-.64s' för tabell '%-.192s'" + ukr "ðÏ×ÎÏ×ÁÖÅÎØ ÎÅ ×ÉÚÎÁÞÅÎÏ ÄÌÑ ËÏÒÉÓÔÕ×ÁÞÁ '%-.48s' Ú ÈÏÓÔÕ '%-.64s' ÄÌÑ ÔÁÂÌÉæ '%-.192s'" ER_NOT_ALLOWED_COMMAND 42000 cze "Pou-B¾itý pøíkaz není v této verzi MySQL povolen" dan "Den brugte kommando er ikke tilladt med denne udgave af MySQL" @@ -3451,23 +3451,23 @@ ER_SYNTAX_ERROR 42000 swe "Du har något fel i din syntax" ukr "õ ×ÁÓ ÐÏÍÉÌËÁ Õ ÓÉÎÔÁËÓÉÓ¦ SQL" ER_DELAYED_CANT_CHANGE_LOCK - cze "Zpo-B¾dìný insert threadu nebyl schopen získat po¾adovaný zámek pro tabulku %-.64s" - dan "Forsinket indsættelse tråden (delayed insert thread) kunne ikke opnå lås på tabellen %-.64s" - nla "'Delayed insert' thread kon de aangevraagde 'lock' niet krijgen voor tabel %-.64s" - eng "Delayed insert thread couldn't get requested lock for table %-.64s" - est "INSERT DELAYED lõim ei suutnud saada soovitud lukku tabelile %-.64s" - fre "La tâche 'delayed insert' n'a pas pu obtenir le verrou démandé sur la table %-.64s" - ger "Verzögerter (DELAYED) Einfüge-Thread konnte die angeforderte Sperre für Tabelle '%-.64s' nicht erhalten" - hun "A kesleltetett beillesztes (delayed insert) thread nem kapott zatolast a %-.64s tablahoz" - ita "Il thread di inserimento ritardato non riesce ad ottenere il lock per la tabella %-.64s" - kor "Áö¿¬µÈ insert ¾²·¹µå°¡ Å×À̺í %-.64sÀÇ ¿ä±¸µÈ ¶ôÅ·À» ó¸®ÇÒ ¼ö ¾ø¾ú½À´Ï´Ù." - por "'Thread' de inserção retardada (atrasada) pois não conseguiu obter a trava solicitada para tabela '%-.64s'" - rum "Thread-ul pentru inserarea aminata nu a putut obtine lacatul (lock) pentru tabela %-.64s" - rus "ðÏÔÏË, ÏÂÓÌÕÖÉ×ÁÀÝÉÊ ÏÔÌÏÖÅÎÎÕÀ ×ÓÔÁ×ËÕ (delayed insert), ÎÅ ÓÍÏÇ ÐÏÌÕÞÉÔØ ÚÁÐÒÁÛÉ×ÁÅÍÕÀ ÂÌÏËÉÒÏ×ËÕ ÎÁ ÔÁÂÌÉÃÕ %-.64s" - serbian "Prolongirani 'INSERT' thread nije mogao da dobije traženo zakljuèavanje tabele '%-.64s'" - spa "Thread de inserción retarda no pudiendo bloquear para la tabla %-.64s" - swe "DELAYED INSERT-tråden kunde inte låsa tabell '%-.64s'" - ukr "ç¦ÌËÁ ÄÌÑ INSERT DELAYED ÎÅ ÍÏÖÅ ÏÔÒÉÍÁÔÉ ÂÌÏËÕ×ÁÎÎÑ ÄÌÑ ÔÁÂÌÉæ %-.64s" + cze "Zpo-B¾dìný insert threadu nebyl schopen získat po¾adovaný zámek pro tabulku %-.192s" + dan "Forsinket indsættelse tråden (delayed insert thread) kunne ikke opnå lås på tabellen %-.192s" + nla "'Delayed insert' thread kon de aangevraagde 'lock' niet krijgen voor tabel %-.192s" + eng "Delayed insert thread couldn't get requested lock for table %-.192s" + est "INSERT DELAYED lõim ei suutnud saada soovitud lukku tabelile %-.192s" + fre "La tâche 'delayed insert' n'a pas pu obtenir le verrou démandé sur la table %-.192s" + ger "Verzögerter (DELAYED) Einfüge-Thread konnte die angeforderte Sperre für Tabelle '%-.192s' nicht erhalten" + hun "A kesleltetett beillesztes (delayed insert) thread nem kapott zatolast a %-.192s tablahoz" + ita "Il thread di inserimento ritardato non riesce ad ottenere il lock per la tabella %-.192s" + kor "Áö¿¬µÈ insert ¾²·¹µå°¡ Å×À̺í %-.192sÀÇ ¿ä±¸µÈ ¶ôÅ·À» ó¸®ÇÒ ¼ö ¾ø¾ú½À´Ï´Ù." + por "'Thread' de inserção retardada (atrasada) pois não conseguiu obter a trava solicitada para tabela '%-.192s'" + rum "Thread-ul pentru inserarea aminata nu a putut obtine lacatul (lock) pentru tabela %-.192s" + rus "ðÏÔÏË, ÏÂÓÌÕÖÉ×ÁÀÝÉÊ ÏÔÌÏÖÅÎÎÕÀ ×ÓÔÁ×ËÕ (delayed insert), ÎÅ ÓÍÏÇ ÐÏÌÕÞÉÔØ ÚÁÐÒÁÛÉ×ÁÅÍÕÀ ÂÌÏËÉÒÏ×ËÕ ÎÁ ÔÁÂÌÉÃÕ %-.192s" + serbian "Prolongirani 'INSERT' thread nije mogao da dobije traženo zakljuèavanje tabele '%-.192s'" + spa "Thread de inserción retarda no pudiendo bloquear para la tabla %-.192s" + swe "DELAYED INSERT-tråden kunde inte låsa tabell '%-.192s'" + ukr "ç¦ÌËÁ ÄÌÑ INSERT DELAYED ÎÅ ÍÏÖÅ ÏÔÒÉÍÁÔÉ ÂÌÏËÕ×ÁÎÎÑ ÄÌÑ ÔÁÂÌÉæ %-.192s" ER_TOO_MANY_DELAYED_THREADS cze "P-Bøíli¹ mnoho zpo¾dìných threadù" dan "For mange slettede tråde (threads) i brug" @@ -3487,28 +3487,28 @@ ER_TOO_MANY_DELAYED_THREADS swe "Det finns redan 'max_delayed_threads' trådar i använding" ukr "úÁÂÁÇÁÔÏ ÚÁÔÒÉÍÁÎÉÈ Ç¦ÌÏË ×ÉËÏÒÉÓÔÏ×Õ¤ÔØÓÑ" ER_ABORTING_CONNECTION 08S01 - cze "Zru-B¹eno spojení %ld do databáze: '%-.64s' u¾ivatel: '%-.32s' (%-.64s)" - dan "Afbrudt forbindelse %ld til database: '%-.64s' bruger: '%-.32s' (%-.64s)" - nla "Afgebroken verbinding %ld naar db: '%-.64s' gebruiker: '%-.32s' (%-.64s)" - eng "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)" - est "Ühendus katkestatud %ld andmebaasile: '%-.64s' kasutajale: '%-.32s' (%-.64s)" - fre "Connection %ld avortée vers la bd: '%-.64s' utilisateur: '%-.32s' (%-.64s)" - ger "Abbruch der Verbindung %ld zur Datenbank '%-.64s'. Benutzer: '%-.32s' (%-.64s)" - hun "Megszakitott kapcsolat %ld db: '%-.64s' adatbazishoz, felhasznalo: '%-.32s' (%-.64s)" - ita "Interrotta la connessione %ld al db: '%-.64s' utente: '%-.32s' (%-.64s)" - jpn "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)" - kor "µ¥ÀÌŸº£À̽º Á¢¼ÓÀ» À§ÇÑ ¿¬°á %ld°¡ Áß´ÜµÊ : '%-.64s' »ç¿ëÀÚ: '%-.32s' (%-.64s)" - nor "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)" - norwegian-ny "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)" - pol "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)" - por "Conexão %ld abortou para o banco de dados '%-.64s' - usuário '%-.32s' (%-.64s)" - rum "Conectie terminata %ld la baza de date: '%-.64s' utilizator: '%-.32s' (%-.64s)" - rus "ðÒÅÒ×ÁÎÏ ÓÏÅÄÉÎÅÎÉÅ %ld Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.64s' ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' (%-.64s)" - serbian "Prekinuta konekcija broj %ld ka bazi: '%-.64s' korisnik je bio: '%-.32s' (%-.64s)" - slo "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)" - spa "Conexión abortada %ld para db: '%-.64s' usuario: '%-.32s' (%-.64s)" - swe "Avbröt länken för tråd %ld till db '%-.64s', användare '%-.32s' (%-.64s)" - ukr "ðÅÒÅÒ×ÁÎÏ Ú'¤ÄÎÁÎÎÑ %ld ÄÏ ÂÁÚÉ ÄÁÎÎÉÈ: '%-.64s' ËÏÒÉÓÔÕ×ÁÞÁ: '%-.32s' (%-.64s)" + cze "Zru-B¹eno spojení %ld do databáze: '%-.192s' u¾ivatel: '%-.48s' (%-.64s)" + dan "Afbrudt forbindelse %ld til database: '%-.192s' bruger: '%-.48s' (%-.64s)" + nla "Afgebroken verbinding %ld naar db: '%-.192s' gebruiker: '%-.48s' (%-.64s)" + eng "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" + est "Ühendus katkestatud %ld andmebaasile: '%-.192s' kasutajale: '%-.48s' (%-.64s)" + fre "Connection %ld avortée vers la bd: '%-.192s' utilisateur: '%-.48s' (%-.64s)" + ger "Abbruch der Verbindung %ld zur Datenbank '%-.192s'. Benutzer: '%-.48s' (%-.64s)" + hun "Megszakitott kapcsolat %ld db: '%-.192s' adatbazishoz, felhasznalo: '%-.48s' (%-.64s)" + ita "Interrotta la connessione %ld al db: '%-.192s' utente: '%-.48s' (%-.64s)" + jpn "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" + kor "µ¥ÀÌŸº£À̽º Á¢¼ÓÀ» À§ÇÑ ¿¬°á %ld°¡ Áß´ÜµÊ : '%-.192s' »ç¿ëÀÚ: '%-.48s' (%-.64s)" + nor "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" + norwegian-ny "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" + pol "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" + por "Conexão %ld abortou para o banco de dados '%-.192s' - usuário '%-.48s' (%-.64s)" + rum "Conectie terminata %ld la baza de date: '%-.192s' utilizator: '%-.48s' (%-.64s)" + rus "ðÒÅÒ×ÁÎÏ ÓÏÅÄÉÎÅÎÉÅ %ld Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.192s' ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.48s' (%-.64s)" + serbian "Prekinuta konekcija broj %ld ka bazi: '%-.192s' korisnik je bio: '%-.48s' (%-.64s)" + slo "Aborted connection %ld to db: '%-.192s' user: '%-.48s' (%-.64s)" + spa "Conexión abortada %ld para db: '%-.192s' usuario: '%-.48s' (%-.64s)" + swe "Avbröt länken för tråd %ld till db '%-.192s', användare '%-.48s' (%-.64s)" + ukr "ðÅÒÅÒ×ÁÎÏ Ú'¤ÄÎÁÎÎÑ %ld ÄÏ ÂÁÚÉ ÄÁÎÎÉÈ: '%-.192s' ËÏÒÉÓÔÕ×ÁÞÁ: '%-.48s' (%-.64s)" ER_NET_PACKET_TOO_LARGE 08S01 cze "Zji-B¹tìn pøíchozí packet del¹í ne¾ 'max_allowed_packet'" dan "Modtog en datapakke som var større end 'max_allowed_packet'" @@ -3723,29 +3723,29 @@ ER_TABLE_CANT_HANDLE_AUTO_INCREMENT 42000 swe "Den använda tabelltypen kan inte hantera AUTO_INCREMENT-kolumner" ukr "÷ÉËÏÒÉÓÔÁÎÉÊ ÔÉÐ ÔÁÂÌÉæ ΊЦÄÔÒÉÍÕ¤ AUTO_INCREMENT ÓÔÏ×Âæ" ER_DELAYED_INSERT_TABLE_LOCKED - cze "INSERT DELAYED nen-Bí mo¾no s tabulkou '%-.64s' pou¾ít, proto¾e je zamèená pomocí LOCK TABLES" - dan "INSERT DELAYED kan ikke bruges med tabellen '%-.64s', fordi tabellen er låst med LOCK TABLES" - nla "INSERT DELAYED kan niet worden gebruikt bij table '%-.64s', vanwege een 'lock met LOCK TABLES" - eng "INSERT DELAYED can't be used with table '%-.64s' because it is locked with LOCK TABLES" - est "INSERT DELAYED ei saa kasutada tabeli '%-.64s' peal, kuna see on lukustatud LOCK TABLES käsuga" - fre "INSERT DELAYED ne peut être utilisé avec la table '%-.64s', car elle est verrouée avec LOCK TABLES" - ger "INSERT DELAYED kann für Tabelle '%-.64s' nicht verwendet werden, da sie mit LOCK TABLES gesperrt ist" - greek "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES" - hun "Az INSERT DELAYED nem hasznalhato a '%-.64s' tablahoz, mert a tabla zarolt (LOCK TABLES)" - ita "L'inserimento ritardato (INSERT DELAYED) non puo` essere usato con la tabella '%-.64s', perche` soggetta a lock da 'LOCK TABLES'" - jpn "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES" - kor "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES" - nor "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES" - norwegian-ny "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES" - pol "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES" - por "INSERT DELAYED não pode ser usado com a tabela '%-.64s', porque ela está travada com LOCK TABLES" - rum "INSERT DELAYED nu poate fi folosit cu tabela '%-.64s', deoarece este locked folosing LOCK TABLES" - rus "îÅÌØÚÑ ÉÓÐÏÌØÚÏ×ÁÔØ INSERT DELAYED ÄÌÑ ÔÁÂÌÉÃÙ '%-.64s', ÐÏÔÏÍÕ ÞÔÏ ÏÎÁ ÚÁÂÌÏËÉÒÏ×ÁÎÁ Ó ÐÏÍÏÝØÀ LOCK TABLES" - serbian "Komanda 'INSERT DELAYED' ne može biti iskorištena u tabeli '%-.64s', zbog toga što je zakljuèana komandom 'LOCK TABLES'" - slo "INSERT DELAYED can't be used with table '%-.64s', because it is locked with LOCK TABLES" - spa "INSERT DELAYED no puede ser usado con tablas '%-.64s', porque esta bloqueada con LOCK TABLES" - swe "INSERT DELAYED kan inte användas med tabell '%-.64s', emedan den är låst med LOCK TABLES" - ukr "INSERT DELAYED ÎÅ ÍÏÖÅ ÂÕÔÉ ×ÉËÏÒÉÓÔÁÎÏ Ú ÔÁÂÌÉÃÅÀ '%-.64s', ÔÏÍÕ ÝÏ §§ ÚÁÂÌÏËÏ×ÁÎÏ Ú LOCK TABLES" + cze "INSERT DELAYED nen-Bí mo¾no s tabulkou '%-.192s' pou¾ít, proto¾e je zamèená pomocí LOCK TABLES" + dan "INSERT DELAYED kan ikke bruges med tabellen '%-.192s', fordi tabellen er låst med LOCK TABLES" + nla "INSERT DELAYED kan niet worden gebruikt bij table '%-.192s', vanwege een 'lock met LOCK TABLES" + eng "INSERT DELAYED can't be used with table '%-.192s' because it is locked with LOCK TABLES" + est "INSERT DELAYED ei saa kasutada tabeli '%-.192s' peal, kuna see on lukustatud LOCK TABLES käsuga" + fre "INSERT DELAYED ne peut être utilisé avec la table '%-.192s', car elle est verrouée avec LOCK TABLES" + ger "INSERT DELAYED kann für Tabelle '%-.192s' nicht verwendet werden, da sie mit LOCK TABLES gesperrt ist" + greek "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" + hun "Az INSERT DELAYED nem hasznalhato a '%-.192s' tablahoz, mert a tabla zarolt (LOCK TABLES)" + ita "L'inserimento ritardato (INSERT DELAYED) non puo` essere usato con la tabella '%-.192s', perche` soggetta a lock da 'LOCK TABLES'" + jpn "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" + kor "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" + nor "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" + norwegian-ny "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" + pol "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" + por "INSERT DELAYED não pode ser usado com a tabela '%-.192s', porque ela está travada com LOCK TABLES" + rum "INSERT DELAYED nu poate fi folosit cu tabela '%-.192s', deoarece este locked folosing LOCK TABLES" + rus "îÅÌØÚÑ ÉÓÐÏÌØÚÏ×ÁÔØ INSERT DELAYED ÄÌÑ ÔÁÂÌÉÃÙ '%-.192s', ÐÏÔÏÍÕ ÞÔÏ ÏÎÁ ÚÁÂÌÏËÉÒÏ×ÁÎÁ Ó ÐÏÍÏÝØÀ LOCK TABLES" + serbian "Komanda 'INSERT DELAYED' ne može biti iskorištena u tabeli '%-.192s', zbog toga što je zakljuèana komandom 'LOCK TABLES'" + slo "INSERT DELAYED can't be used with table '%-.192s', because it is locked with LOCK TABLES" + spa "INSERT DELAYED no puede ser usado con tablas '%-.192s', porque esta bloqueada con LOCK TABLES" + swe "INSERT DELAYED kan inte användas med tabell '%-.192s', emedan den är låst med LOCK TABLES" + ukr "INSERT DELAYED ÎÅ ÍÏÖÅ ÂÕÔÉ ×ÉËÏÒÉÓÔÁÎÏ Ú ÔÁÂÌÉÃÅÀ '%-.192s', ÔÏÍÕ ÝÏ §§ ÚÁÂÌÏËÏ×ÁÎÏ Ú LOCK TABLES" ER_WRONG_COLUMN_NAME 42000 cze "Nespr-Bávné jméno sloupce '%-.100s'" dan "Forkert kolonnenavn '%-.100s'" @@ -3764,29 +3764,29 @@ ER_WRONG_COLUMN_NAME 42000 swe "Felaktigt kolumnnamn '%-.100s'" ukr "îÅצÒÎÅ ¦Í'Ñ ÓÔÏ×ÂÃÑ '%-.100s'" ER_WRONG_KEY_COLUMN 42000 - cze "Handler pou-B¾ité tabulky neumí indexovat sloupce '%-.64s'" - dan "Den brugte tabeltype kan ikke indeksere kolonnen '%-.64s'" - nla "De gebruikte tabel 'handler' kan kolom '%-.64s' niet indexeren" - eng "The used storage engine can't index column '%-.64s'" - est "Tabelihandler ei oska indekseerida tulpa '%-.64s'" - fre "Le handler de la table ne peut indexé la colonne '%-.64s'" - ger "Die verwendete Speicher-Engine kann die Spalte '%-.64s' nicht indizieren" - greek "The used table handler can't index column '%-.64s'" - hun "A hasznalt tablakezelo nem tudja a '%-.64s' mezot indexelni" - ita "Il gestore delle tabelle non puo` indicizzare la colonna '%-.64s'" - jpn "The used table handler can't index column '%-.64s'" - kor "The used table handler can't index column '%-.64s'" - nor "The used table handler can't index column '%-.64s'" - norwegian-ny "The used table handler can't index column '%-.64s'" - pol "The used table handler can't index column '%-.64s'" - por "O manipulador de tabela usado não pode indexar a coluna '%-.64s'" - rum "Handler-ul tabelei folosite nu poate indexa coloana '%-.64s'" - rus "éÓÐÏÌØÚÏ×ÁÎÎÙÊ ÏÂÒÁÂÏÔÞÉË ÔÁÂÌÉÃÙ ÎÅ ÍÏÖÅÔ ÐÒÏÉÎÄÅËÓÉÒÏ×ÁÔØ ÓÔÏÌÂÅà '%-.64s'" - serbian "Handler tabele ne može da indeksira kolonu '%-.64s'" - slo "The used table handler can't index column '%-.64s'" - spa "El manipulador de tabla usado no puede indexar columna '%-.64s'" - swe "Den använda tabelltypen kan inte indexera kolumn '%-.64s'" - ukr "÷ÉËÏÒÉÓÔÁÎÉÊ ×ËÁÚ¦×ÎÉË ÔÁÂÌÉæ ÎÅ ÍÏÖÅ ¦ÎÄÅËÓÕ×ÁÔÉ ÓÔÏ×ÂÅÃØ '%-.64s'" + cze "Handler pou-B¾ité tabulky neumí indexovat sloupce '%-.192s'" + dan "Den brugte tabeltype kan ikke indeksere kolonnen '%-.192s'" + nla "De gebruikte tabel 'handler' kan kolom '%-.192s' niet indexeren" + eng "The used storage engine can't index column '%-.192s'" + est "Tabelihandler ei oska indekseerida tulpa '%-.192s'" + fre "Le handler de la table ne peut indexé la colonne '%-.192s'" + ger "Die verwendete Speicher-Engine kann die Spalte '%-.192s' nicht indizieren" + greek "The used table handler can't index column '%-.192s'" + hun "A hasznalt tablakezelo nem tudja a '%-.192s' mezot indexelni" + ita "Il gestore delle tabelle non puo` indicizzare la colonna '%-.192s'" + jpn "The used table handler can't index column '%-.192s'" + kor "The used table handler can't index column '%-.192s'" + nor "The used table handler can't index column '%-.192s'" + norwegian-ny "The used table handler can't index column '%-.192s'" + pol "The used table handler can't index column '%-.192s'" + por "O manipulador de tabela usado não pode indexar a coluna '%-.192s'" + rum "Handler-ul tabelei folosite nu poate indexa coloana '%-.192s'" + rus "éÓÐÏÌØÚÏ×ÁÎÎÙÊ ÏÂÒÁÂÏÔÞÉË ÔÁÂÌÉÃÙ ÎÅ ÍÏÖÅÔ ÐÒÏÉÎÄÅËÓÉÒÏ×ÁÔØ ÓÔÏÌÂÅà '%-.192s'" + serbian "Handler tabele ne može da indeksira kolonu '%-.192s'" + slo "The used table handler can't index column '%-.192s'" + spa "El manipulador de tabla usado no puede indexar columna '%-.192s'" + swe "Den använda tabelltypen kan inte indexera kolumn '%-.192s'" + ukr "÷ÉËÏÒÉÓÔÁÎÉÊ ×ËÁÚ¦×ÎÉË ÔÁÂÌÉæ ÎÅ ÍÏÖÅ ¦ÎÄÅËÓÕ×ÁÔÉ ÓÔÏ×ÂÅÃØ '%-.192s'" ER_WRONG_MRG_TABLE cze "V-B¹echny tabulky v MERGE tabulce nejsou definovány stejnì" dan "Tabellerne i MERGE er ikke defineret ens" @@ -3811,46 +3811,46 @@ ER_WRONG_MRG_TABLE swe "Tabellerna i MERGE-tabellen är inte identiskt definierade" ukr "ôÁÂÌÉæ Õ MERGE TABLE ÍÁÀÔØ Ò¦ÚÎÕ ÓÔÒÕËÔÕÒÕ" ER_DUP_UNIQUE 23000 - cze "Kv-Bùli unique constraintu nemozu zapsat do tabulky '%-.64s'" - dan "Kan ikke skrive til tabellen '%-.64s' fordi det vil bryde CONSTRAINT regler" - nla "Kan niet opslaan naar table '%-.64s' vanwege 'unique' beperking" - eng "Can't write, because of unique constraint, to table '%-.64s'" - est "Ei suuda kirjutada tabelisse '%-.64s', kuna see rikub ühesuse kitsendust" - fre "Écriture impossible à cause d'un index UNIQUE sur la table '%-.64s'" - ger "Schreiben in Tabelle '%-.64s' nicht möglich wegen einer Eindeutigkeitsbeschränkung (unique constraint)" - hun "A '%-.64s' nem irhato, az egyedi mezok miatt" - ita "Impossibile scrivere nella tabella '%-.64s' per limitazione di unicita`" - por "Não pode gravar, devido à restrição UNIQUE, na tabela '%-.64s'" - rum "Nu pot scrie pe hard-drive, din cauza constraintului unic (unique constraint) pentru tabela '%-.64s'" - rus "îÅ×ÏÚÍÏÖÎÏ ÚÁÐÉÓÁÔØ × ÔÁÂÌÉÃÕ '%-.64s' ÉÚ-ÚÁ ÏÇÒÁÎÉÞÅÎÉÊ ÕÎÉËÁÌØÎÏÇÏ ËÌÀÞÁ" - serbian "Zbog provere jedinstvenosti ne mogu da upišem podatke u tabelu '%-.64s'" - spa "No puedo escribir, debido al único constraint, para tabla '%-.64s'" - swe "Kan inte skriva till tabell '%-.64s'; UNIQUE-test" - ukr "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ ÄÏ ÔÁÂÌÉæ '%-.64s', Ú ÐÒÉÞÉÎÉ ×ÉÍÏÇ ÕΦËÁÌØÎÏÓÔ¦" + cze "Kv-Bùli unique constraintu nemozu zapsat do tabulky '%-.192s'" + dan "Kan ikke skrive til tabellen '%-.192s' fordi det vil bryde CONSTRAINT regler" + nla "Kan niet opslaan naar table '%-.192s' vanwege 'unique' beperking" + eng "Can't write, because of unique constraint, to table '%-.192s'" + est "Ei suuda kirjutada tabelisse '%-.192s', kuna see rikub ühesuse kitsendust" + fre "Écriture impossible à cause d'un index UNIQUE sur la table '%-.192s'" + ger "Schreiben in Tabelle '%-.192s' nicht möglich wegen einer Eindeutigkeitsbeschränkung (unique constraint)" + hun "A '%-.192s' nem irhato, az egyedi mezok miatt" + ita "Impossibile scrivere nella tabella '%-.192s' per limitazione di unicita`" + por "Não pode gravar, devido à restrição UNIQUE, na tabela '%-.192s'" + rum "Nu pot scrie pe hard-drive, din cauza constraintului unic (unique constraint) pentru tabela '%-.192s'" + rus "îÅ×ÏÚÍÏÖÎÏ ÚÁÐÉÓÁÔØ × ÔÁÂÌÉÃÕ '%-.192s' ÉÚ-ÚÁ ÏÇÒÁÎÉÞÅÎÉÊ ÕÎÉËÁÌØÎÏÇÏ ËÌÀÞÁ" + serbian "Zbog provere jedinstvenosti ne mogu da upišem podatke u tabelu '%-.192s'" + spa "No puedo escribir, debido al único constraint, para tabla '%-.192s'" + swe "Kan inte skriva till tabell '%-.192s'; UNIQUE-test" + ukr "îÅ ÍÏÖÕ ÚÁÐÉÓÁÔÉ ÄÏ ÔÁÂÌÉæ '%-.192s', Ú ÐÒÉÞÉÎÉ ×ÉÍÏÇ ÕΦËÁÌØÎÏÓÔ¦" ER_BLOB_KEY_WITHOUT_LENGTH 42000 - cze "BLOB sloupec '%-.64s' je pou-B¾it ve specifikaci klíèe bez délky" - dan "BLOB kolonnen '%-.64s' brugt i nøglespecifikation uden nøglelængde" - nla "BLOB kolom '%-.64s' gebruikt in zoeksleutel specificatie zonder zoeksleutel lengte" - eng "BLOB/TEXT column '%-.64s' used in key specification without a key length" - est "BLOB-tüüpi tulp '%-.64s' on kasutusel võtmes ilma pikkust määratlemata" - fre "La colonne '%-.64s' de type BLOB est utilisée dans une définition d'index sans longueur d'index" - ger "BLOB- oder TEXT-Spalte '%-.64s' wird in der Schlüsseldefinition ohne Schlüssellängenangabe verwendet" - greek "BLOB column '%-.64s' used in key specification without a key length" - hun "BLOB mezo '%-.64s' hasznalt a mezo specifikacioban, a mezohossz megadasa nelkul" - ita "La colonna '%-.64s' di tipo BLOB e` usata in una chiave senza specificarne la lunghezza" - jpn "BLOB column '%-.64s' used in key specification without a key length" - kor "BLOB column '%-.64s' used in key specification without a key length" - nor "BLOB column '%-.64s' used in key specification without a key length" - norwegian-ny "BLOB column '%-.64s' used in key specification without a key length" - pol "BLOB column '%-.64s' used in key specification without a key length" - por "Coluna BLOB '%-.64s' usada na especificação de chave sem o comprimento da chave" - rum "Coloana BLOB '%-.64s' este folosita in specificarea unei chei fara ca o lungime de cheie sa fie folosita" - rus "óÔÏÌÂÅà ÔÉÐÁ BLOB '%-.64s' ÂÙÌ ÕËÁÚÁÎ × ÏÐÒÅÄÅÌÅÎÉÉ ËÌÀÞÁ ÂÅÚ ÕËÁÚÁÎÉÑ ÄÌÉÎÙ ËÌÀÞÁ" - serbian "BLOB kolona '%-.64s' je upotrebljena u specifikaciji kljuèa bez navoðenja dužine kljuèa" - slo "BLOB column '%-.64s' used in key specification without a key length" - spa "Columna BLOB column '%-.64s' usada en especificación de clave sin tamaño de la clave" - swe "Du har inte angett någon nyckellängd för BLOB '%-.64s'" - ukr "óÔÏ×ÂÅÃØ BLOB '%-.64s' ×ÉËÏÒÉÓÔÁÎÏ Õ ×ÉÚÎÁÞÅÎΦ ËÌÀÞÁ ÂÅÚ ×ËÁÚÁÎÎÑ ÄÏ×ÖÉÎÉ ËÌÀÞÁ" + cze "BLOB sloupec '%-.192s' je pou-B¾it ve specifikaci klíèe bez délky" + dan "BLOB kolonnen '%-.192s' brugt i nøglespecifikation uden nøglelængde" + nla "BLOB kolom '%-.192s' gebruikt in zoeksleutel specificatie zonder zoeksleutel lengte" + eng "BLOB/TEXT column '%-.192s' used in key specification without a key length" + est "BLOB-tüüpi tulp '%-.192s' on kasutusel võtmes ilma pikkust määratlemata" + fre "La colonne '%-.192s' de type BLOB est utilisée dans une définition d'index sans longueur d'index" + ger "BLOB- oder TEXT-Spalte '%-.192s' wird in der Schlüsseldefinition ohne Schlüssellängenangabe verwendet" + greek "BLOB column '%-.192s' used in key specification without a key length" + hun "BLOB mezo '%-.192s' hasznalt a mezo specifikacioban, a mezohossz megadasa nelkul" + ita "La colonna '%-.192s' di tipo BLOB e` usata in una chiave senza specificarne la lunghezza" + jpn "BLOB column '%-.192s' used in key specification without a key length" + kor "BLOB column '%-.192s' used in key specification without a key length" + nor "BLOB column '%-.192s' used in key specification without a key length" + norwegian-ny "BLOB column '%-.192s' used in key specification without a key length" + pol "BLOB column '%-.192s' used in key specification without a key length" + por "Coluna BLOB '%-.192s' usada na especificação de chave sem o comprimento da chave" + rum "Coloana BLOB '%-.192s' este folosita in specificarea unei chei fara ca o lungime de cheie sa fie folosita" + rus "óÔÏÌÂÅà ÔÉÐÁ BLOB '%-.192s' ÂÙÌ ÕËÁÚÁÎ × ÏÐÒÅÄÅÌÅÎÉÉ ËÌÀÞÁ ÂÅÚ ÕËÁÚÁÎÉÑ ÄÌÉÎÙ ËÌÀÞÁ" + serbian "BLOB kolona '%-.192s' je upotrebljena u specifikaciji kljuèa bez navoðenja dužine kljuèa" + slo "BLOB column '%-.192s' used in key specification without a key length" + spa "Columna BLOB column '%-.192s' usada en especificación de clave sin tamaño de la clave" + swe "Du har inte angett någon nyckellängd för BLOB '%-.192s'" + ukr "óÔÏ×ÂÅÃØ BLOB '%-.192s' ×ÉËÏÒÉÓÔÁÎÏ Õ ×ÉÚÎÁÞÅÎΦ ËÌÀÞÁ ÂÅÚ ×ËÁÚÁÎÎÑ ÄÏ×ÖÉÎÉ ËÌÀÞÁ" ER_PRIMARY_CANT_HAVE_NULL 42000 cze "V-B¹echny èásti primárního klíèe musejí být NOT NULL; pokud potøebujete NULL, pou¾ijte UNIQUE" dan "Alle dele af en PRIMARY KEY skal være NOT NULL; Hvis du skal bruge NULL i nøglen, brug UNIQUE istedet" @@ -3936,21 +3936,21 @@ ER_UPDATE_WITHOUT_KEY_IN_SAFE_MODE swe "Du använder 'säker uppdateringsmod' och försökte uppdatera en tabell utan en WHERE-sats som använder sig av en nyckel" ukr "÷É Õ ÒÅÖÉͦ ÂÅÚÐÅÞÎÏÇÏ ÏÎÏ×ÌÅÎÎÑ ÔÁ ÎÁÍÁÇÁ¤ÔÅÓØ ÏÎÏ×ÉÔÉ ÔÁÂÌÉÃÀ ÂÅÚ ÏÐÅÒÁÔÏÒÁ WHERE, ÝÏ ×ÉËÏÒÉÓÔÏ×Õ¤ KEY ÓÔÏ×ÂÅÃØ" ER_KEY_DOES_NOT_EXITS 42000 S1009 - cze "Kl-Bíè '%-.64s' v tabulce '%-.64s' neexistuje" - dan "Nøglen '%-.64s' eksisterer ikke i tabellen '%-.64s'" - nla "Zoeksleutel '%-.64s' bestaat niet in tabel '%-.64s'" - eng "Key '%-.64s' doesn't exist in table '%-.64s'" - est "Võti '%-.64s' ei eksisteeri tabelis '%-.64s'" - fre "L'index '%-.64s' n'existe pas sur la table '%-.64s'" - ger "Schlüssel '%-.64s' existiert in der Tabelle '%-.64s' nicht" - hun "A '%-.64s' kulcs nem letezik a '%-.64s' tablaban" - ita "La chiave '%-.64s' non esiste nella tabella '%-.64s'" - por "Chave '%-.64s' não existe na tabela '%-.64s'" - rus "ëÌÀÞ '%-.64s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ × ÔÁÂÌÉÃÅ '%-.64s'" - serbian "Kljuè '%-.64s' ne postoji u tabeli '%-.64s'" - spa "Clave '%-.64s' no existe en la tabla '%-.64s'" - swe "Nyckel '%-.64s' finns inte in tabell '%-.64s'" - ukr "ëÌÀÞ '%-.64s' ÎÅ ¦ÓÎÕ¤ × ÔÁÂÌÉæ '%-.64s'" + cze "Kl-Bíè '%-.192s' v tabulce '%-.192s' neexistuje" + dan "Nøglen '%-.192s' eksisterer ikke i tabellen '%-.192s'" + nla "Zoeksleutel '%-.192s' bestaat niet in tabel '%-.192s'" + eng "Key '%-.192s' doesn't exist in table '%-.192s'" + est "Võti '%-.192s' ei eksisteeri tabelis '%-.192s'" + fre "L'index '%-.192s' n'existe pas sur la table '%-.192s'" + ger "Schlüssel '%-.192s' existiert in der Tabelle '%-.192s' nicht" + hun "A '%-.192s' kulcs nem letezik a '%-.192s' tablaban" + ita "La chiave '%-.192s' non esiste nella tabella '%-.192s'" + por "Chave '%-.192s' não existe na tabela '%-.192s'" + rus "ëÌÀÞ '%-.192s' ÎÅ ÓÕÝÅÓÔ×ÕÅÔ × ÔÁÂÌÉÃÅ '%-.192s'" + serbian "Kljuè '%-.192s' ne postoji u tabeli '%-.192s'" + spa "Clave '%-.192s' no existe en la tabla '%-.192s'" + swe "Nyckel '%-.192s' finns inte in tabell '%-.192s'" + ukr "ëÌÀÞ '%-.192s' ÎÅ ¦ÓÎÕ¤ × ÔÁÂÌÉæ '%-.192s'" ER_CHECK_NO_SUCH_TABLE 42000 cze "Nemohu otev-Bøít tabulku" dan "Kan ikke åbne tabellen" @@ -4072,20 +4072,20 @@ ER_ERROR_DURING_CHECKPOINT swe "Fick fel %d vid CHECKPOINT" ukr "ïÔÒÉÍÁÎÏ ÐÏÍÉÌËÕ %d Ð¦Ä ÞÁÓ CHECKPOINT" ER_NEW_ABORTING_CONNECTION 08S01 - cze "Spojen-Bí %ld do databáze: '%-.64s' u¾ivatel: '%-.32s' stroj: '%-.64s' (%-.64s) bylo pøeru¹eno" - dan "Afbrød forbindelsen %ld til databasen '%-.64s' bruger: '%-.32s' vært: '%-.64s' (%-.64s)" - nla "Afgebroken verbinding %ld naar db: '%-.64s' gebruiker: '%-.32s' host: '%-.64s' (%-.64s)" - eng "Aborted connection %ld to db: '%-.64s' user: '%-.32s' host: '%-.64s' (%-.64s)" - est "Ühendus katkestatud %ld andmebaas: '%-.64s' kasutaja: '%-.32s' masin: '%-.64s' (%-.64s)" - fre "Connection %ld avortée vers la bd: '%-.64s' utilisateur: '%-.32s' hôte: '%-.64s' (%-.64s)" - ger "Abbruch der Verbindung %ld zur Datenbank '%-.64s'. Benutzer: '%-.32s', Host: '%-.64s' (%-.64s)" - ita "Interrotta la connessione %ld al db: ''%-.64s' utente: '%-.32s' host: '%-.64s' (%-.64s)" - por "Conexão %ld abortada para banco de dados '%-.64s' - usuário '%-.32s' - 'host' '%-.64s' ('%-.64s')" - rus "ðÒÅÒ×ÁÎÏ ÓÏÅÄÉÎÅÎÉÅ %ld Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.64s' ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.32s' Ó ÈÏÓÔÁ '%-.64s' (%-.64s)" - serbian "Prekinuta konekcija broj %ld ka bazi: '%-.64s' korisnik je bio: '%-.32s' a host: '%-.64s' (%-.64s)" - spa "Abortada conexión %ld para db: '%-.64s' usuario: '%-.32s' servidor: '%-.64s' (%-.64s)" - swe "Avbröt länken för tråd %ld till db '%-.64s', användare '%-.32s', host '%-.64s' (%-.64s)" - ukr "ðÅÒÅÒ×ÁÎÏ Ú'¤ÄÎÁÎÎÑ %ld ÄÏ ÂÁÚÉ ÄÁÎÎÉÈ: '%-.64s' ËÏÒÉÓÔÕ×ÁÞ: '%-.32s' ÈÏÓÔ: '%-.64s' (%-.64s)" + cze "Spojen-Bí %ld do databáze: '%-.192s' u¾ivatel: '%-.48s' stroj: '%-.64s' (%-.64s) bylo pøeru¹eno" + dan "Afbrød forbindelsen %ld til databasen '%-.192s' bruger: '%-.48s' vært: '%-.64s' (%-.64s)" + nla "Afgebroken verbinding %ld naar db: '%-.192s' gebruiker: '%-.48s' host: '%-.64s' (%-.64s)" + eng "Aborted connection %ld to db: '%-.192s' user: '%-.48s' host: '%-.64s' (%-.64s)" + est "Ühendus katkestatud %ld andmebaas: '%-.192s' kasutaja: '%-.48s' masin: '%-.64s' (%-.64s)" + fre "Connection %ld avortée vers la bd: '%-.192s' utilisateur: '%-.48s' hôte: '%-.64s' (%-.64s)" + ger "Abbruch der Verbindung %ld zur Datenbank '%-.192s'. Benutzer: '%-.48s', Host: '%-.64s' (%-.64s)" + ita "Interrotta la connessione %ld al db: ''%-.192s' utente: '%-.48s' host: '%-.64s' (%-.64s)" + por "Conexão %ld abortada para banco de dados '%-.192s' - usuário '%-.48s' - 'host' '%-.64s' ('%-.64s')" + rus "ðÒÅÒ×ÁÎÏ ÓÏÅÄÉÎÅÎÉÅ %ld Ë ÂÁÚÅ ÄÁÎÎÙÈ '%-.192s' ÐÏÌØÚÏ×ÁÔÅÌÑ '%-.48s' Ó ÈÏÓÔÁ '%-.64s' (%-.64s)" + serbian "Prekinuta konekcija broj %ld ka bazi: '%-.192s' korisnik je bio: '%-.48s' a host: '%-.64s' (%-.64s)" + spa "Abortada conexión %ld para db: '%-.192s' usuario: '%-.48s' servidor: '%-.64s' (%-.64s)" + swe "Avbröt länken för tråd %ld till db '%-.192s', användare '%-.48s', host '%-.64s' (%-.64s)" + ukr "ðÅÒÅÒ×ÁÎÏ Ú'¤ÄÎÁÎÎÑ %ld ÄÏ ÂÁÚÉ ÄÁÎÎÉÈ: '%-.192s' ËÏÒÉÓÔÕ×ÁÞ: '%-.48s' ÈÏÓÔ: '%-.64s' (%-.64s)" ER_DUMP_NOT_IMPLEMENTED cze "Handler tabulky nepodporuje bin-Bární dump" dan "Denne tabeltype unserstøtter ikke binært tabeldump" @@ -4110,20 +4110,20 @@ ER_FLUSH_MASTER_BINLOG_CLOSED serbian "Binarni log file zatvoren, ne mogu da izvršim komandu 'RESET MASTER'" ukr "òÅÐ̦ËÁæÊÎÉÊ ÌÏÇ ÚÁËÒÉÔÏ, ÎÅ ÍÏÖÕ ×ÉËÏÎÁÔÉ RESET MASTER" ER_INDEX_REBUILD - cze "P-Bøebudování indexu dumpnuté tabulky '%-.64s' nebylo úspì¹né" - dan "Kunne ikke genopbygge indekset for den dumpede tabel '%-.64s'" - nla "Gefaald tijdens heropbouw index van gedumpte tabel '%-.64s'" - eng "Failed rebuilding the index of dumped table '%-.64s'" - fre "La reconstruction de l'index de la table copiée '%-.64s' a échoué" - ger "Neuerstellung des Index der Dump-Tabelle '%-.64s' fehlgeschlagen" - greek "Failed rebuilding the index of dumped table '%-.64s'" - hun "Failed rebuilding the index of dumped table '%-.64s'" - ita "Fallita la ricostruzione dell'indice della tabella copiata '%-.64s'" - por "Falhou na reconstrução do índice da tabela 'dumped' '%-.64s'" - rus "ïÛÉÂËÁ ÐÅÒÅÓÔÒÏÊËÉ ÉÎÄÅËÓÁ ÓÏÈÒÁÎÅÎÎÏÊ ÔÁÂÌÉÃÙ '%-.64s'" - serbian "Izgradnja indeksa dump-ovane tabele '%-.64s' nije uspela" - spa "Falla reconstruyendo el indice de la tabla dumped '%-.64s'" - ukr "îÅ×ÄÁÌŠצÄÎÏ×ÌÅÎÎÑ ¦ÎÄÅËÓÁ ÐÅÒÅÄÁÎϧ ÔÁÂÌÉæ '%-.64s'" + cze "P-Bøebudování indexu dumpnuté tabulky '%-.192s' nebylo úspì¹né" + dan "Kunne ikke genopbygge indekset for den dumpede tabel '%-.192s'" + nla "Gefaald tijdens heropbouw index van gedumpte tabel '%-.192s'" + eng "Failed rebuilding the index of dumped table '%-.192s'" + fre "La reconstruction de l'index de la table copiée '%-.192s' a échoué" + ger "Neuerstellung des Index der Dump-Tabelle '%-.192s' fehlgeschlagen" + greek "Failed rebuilding the index of dumped table '%-.192s'" + hun "Failed rebuilding the index of dumped table '%-.192s'" + ita "Fallita la ricostruzione dell'indice della tabella copiata '%-.192s'" + por "Falhou na reconstrução do índice da tabela 'dumped' '%-.192s'" + rus "ïÛÉÂËÁ ÐÅÒÅÓÔÒÏÊËÉ ÉÎÄÅËÓÁ ÓÏÈÒÁÎÅÎÎÏÊ ÔÁÂÌÉÃÙ '%-.192s'" + serbian "Izgradnja indeksa dump-ovane tabele '%-.192s' nije uspela" + spa "Falla reconstruyendo el indice de la tabla dumped '%-.192s'" + ukr "îÅ×ÄÁÌŠצÄÎÏ×ÌÅÎÎÑ ¦ÎÄÅËÓÁ ÐÅÒÅÄÁÎϧ ÔÁÂÌÉæ '%-.192s'" ER_MASTER cze "Chyba masteru: '%-.64s'" dan "Fejl fra master: '%-.64s'" @@ -4212,35 +4212,35 @@ ER_UNKNOWN_SYSTEM_VARIABLE swe "Okänd systemvariabel: '%-.64s'" ukr "îÅצÄÏÍÁ ÓÉÓÔÅÍÎÁ ÚͦÎÎÁ '%-.64s'" ER_CRASHED_ON_USAGE - cze "Tabulka '%-.64s' je ozna-Bèena jako poru¹ená a mìla by být opravena" - dan "Tabellen '%-.64s' er markeret med fejl og bør repareres" - nla "Tabel '%-.64s' staat als gecrashed gemarkeerd en dient te worden gerepareerd" - eng "Table '%-.64s' is marked as crashed and should be repaired" - est "Tabel '%-.64s' on märgitud vigaseks ja tuleb parandada" - fre "La table '%-.64s' est marquée 'crashed' et devrait être réparée" - ger "Tabelle '%-.64s' ist als defekt markiert und sollte repariert werden" - ita "La tabella '%-.64s' e` segnalata come corrotta e deve essere riparata" - por "Tabela '%-.64s' está marcada como danificada e deve ser reparada" - rus "ôÁÂÌÉÃÁ '%-.64s' ÐÏÍÅÞÅÎÁ ËÁË ÉÓÐÏÒÞÅÎÎÁÑ É ÄÏÌÖÎÁ ÐÒÏÊÔÉ ÐÒÏ×ÅÒËÕ É ÒÅÍÏÎÔ" - serbian "Tabela '%-.64s' je markirana kao ošteæena i trebala bi biti popravljena" - spa "Tabla '%-.64s' está marcada como crashed y debe ser reparada" - swe "Tabell '%-.64s' är trasig och bör repareras med REPAIR TABLE" - ukr "ôÁÂÌÉÃÀ '%-.64s' ÍÁÒËÏ×ÁÎÏ ÑË Ú¦ÐÓÏ×ÁÎÕ ÔÁ §§ ÐÏÔÒ¦ÂÎÏ ×¦ÄÎÏ×ÉÔÉ" + cze "Tabulka '%-.192s' je ozna-Bèena jako poru¹ená a mìla by být opravena" + dan "Tabellen '%-.192s' er markeret med fejl og bør repareres" + nla "Tabel '%-.192s' staat als gecrashed gemarkeerd en dient te worden gerepareerd" + eng "Table '%-.192s' is marked as crashed and should be repaired" + est "Tabel '%-.192s' on märgitud vigaseks ja tuleb parandada" + fre "La table '%-.192s' est marquée 'crashed' et devrait être réparée" + ger "Tabelle '%-.192s' ist als defekt markiert und sollte repariert werden" + ita "La tabella '%-.192s' e` segnalata come corrotta e deve essere riparata" + por "Tabela '%-.192s' está marcada como danificada e deve ser reparada" + rus "ôÁÂÌÉÃÁ '%-.192s' ÐÏÍÅÞÅÎÁ ËÁË ÉÓÐÏÒÞÅÎÎÁÑ É ÄÏÌÖÎÁ ÐÒÏÊÔÉ ÐÒÏ×ÅÒËÕ É ÒÅÍÏÎÔ" + serbian "Tabela '%-.192s' je markirana kao ošteæena i trebala bi biti popravljena" + spa "Tabla '%-.192s' está marcada como crashed y debe ser reparada" + swe "Tabell '%-.192s' är trasig och bör repareras med REPAIR TABLE" + ukr "ôÁÂÌÉÃÀ '%-.192s' ÍÁÒËÏ×ÁÎÏ ÑË Ú¦ÐÓÏ×ÁÎÕ ÔÁ §§ ÐÏÔÒ¦ÂÎÏ ×¦ÄÎÏ×ÉÔÉ" ER_CRASHED_ON_REPAIR - cze "Tabulka '%-.64s' je ozna-Bèena jako poru¹ená a poslední (automatická?) oprava se nezdaøila" - dan "Tabellen '%-.64s' er markeret med fejl og sidste (automatiske?) REPAIR fejlede" - nla "Tabel '%-.64s' staat als gecrashed gemarkeerd en de laatste (automatische?) reparatie poging mislukte" - eng "Table '%-.64s' is marked as crashed and last (automatic?) repair failed" - est "Tabel '%-.64s' on märgitud vigaseks ja viimane (automaatne?) parandus ebaõnnestus" - fre "La table '%-.64s' est marquée 'crashed' et le dernier 'repair' a échoué" - ger "Tabelle '%-.64s' ist als defekt markiert und der letzte (automatische?) Reparaturversuch schlug fehl" - ita "La tabella '%-.64s' e` segnalata come corrotta e l'ultima ricostruzione (automatica?) e` fallita" - por "Tabela '%-.64s' está marcada como danificada e a última reparação (automática?) falhou" - rus "ôÁÂÌÉÃÁ '%-.64s' ÐÏÍÅÞÅÎÁ ËÁË ÉÓÐÏÒÞÅÎÎÁÑ É ÐÏÓÌÅÄÎÉÊ (Á×ÔÏÍÁÔÉÞÅÓËÉÊ?) ÒÅÍÏÎÔ ÎÅ ÂÙÌ ÕÓÐÅÛÎÙÍ" - serbian "Tabela '%-.64s' je markirana kao ošteæena, a zadnja (automatska?) popravka je bila neuspela" - spa "Tabla '%-.64s' está marcada como crashed y la última reparación (automactica?) falló" - swe "Tabell '%-.64s' är trasig och senast (automatiska?) reparation misslyckades" - ukr "ôÁÂÌÉÃÀ '%-.64s' ÍÁÒËÏ×ÁÎÏ ÑË Ú¦ÐÓÏ×ÁÎÕ ÔÁ ÏÓÔÁÎΤ (Á×ÔÏÍÁÔÉÞÎÅ?) צÄÎÏ×ÌÅÎÎÑ ÎÅ ×ÄÁÌÏÓÑ" + cze "Tabulka '%-.192s' je ozna-Bèena jako poru¹ená a poslední (automatická?) oprava se nezdaøila" + dan "Tabellen '%-.192s' er markeret med fejl og sidste (automatiske?) REPAIR fejlede" + nla "Tabel '%-.192s' staat als gecrashed gemarkeerd en de laatste (automatische?) reparatie poging mislukte" + eng "Table '%-.192s' is marked as crashed and last (automatic?) repair failed" + est "Tabel '%-.192s' on märgitud vigaseks ja viimane (automaatne?) parandus ebaõnnestus" + fre "La table '%-.192s' est marquée 'crashed' et le dernier 'repair' a échoué" + ger "Tabelle '%-.192s' ist als defekt markiert und der letzte (automatische?) Reparaturversuch schlug fehl" + ita "La tabella '%-.192s' e` segnalata come corrotta e l'ultima ricostruzione (automatica?) e` fallita" + por "Tabela '%-.192s' está marcada como danificada e a última reparação (automática?) falhou" + rus "ôÁÂÌÉÃÁ '%-.192s' ÐÏÍÅÞÅÎÁ ËÁË ÉÓÐÏÒÞÅÎÎÁÑ É ÐÏÓÌÅÄÎÉÊ (Á×ÔÏÍÁÔÉÞÅÓËÉÊ?) ÒÅÍÏÎÔ ÎÅ ÂÙÌ ÕÓÐÅÛÎÙÍ" + serbian "Tabela '%-.192s' je markirana kao ošteæena, a zadnja (automatska?) popravka je bila neuspela" + spa "Tabla '%-.192s' está marcada como crashed y la última reparación (automactica?) falló" + swe "Tabell '%-.192s' är trasig och senast (automatiska?) reparation misslyckades" + ukr "ôÁÂÌÉÃÀ '%-.192s' ÍÁÒËÏ×ÁÎÏ ÑË Ú¦ÐÓÏ×ÁÎÕ ÔÁ ÏÓÔÁÎΤ (Á×ÔÏÍÁÔÉÞÎÅ?) צÄÎÏ×ÌÅÎÎÑ ÎÅ ×ÄÁÌÏÓÑ" ER_WARNING_NOT_COMPLETE_ROLLBACK dan "Advarsel: Visse data i tabeller der ikke understøtter transaktioner kunne ikke tilbagestilles" nla "Waarschuwing: Roll back mislukt voor sommige buiten transacties gewijzigde tabellen" @@ -4438,18 +4438,18 @@ ER_WRONG_ARGUMENTS swe "Felaktiga argument till %s" ukr "èÉÂÎÉÊ ÁÒÇÕÍÅÎÔ ÄÌÑ %s" ER_NO_PERMISSION_TO_CREATE_USER 42000 - nla "'%-.32s'@'%-.64s' mag geen nieuwe gebruikers creeren" - eng "'%-.32s'@'%-.64s' is not allowed to create new users" - est "Kasutajal '%-.32s'@'%-.64s' ei ole lubatud luua uusi kasutajaid" - fre "'%-.32s'@'%-.64s' n'est pas autorisé à créer de nouveaux utilisateurs" - ger "'%-.32s'@'%-.64s' ist nicht berechtigt, neue Benutzer hinzuzufügen" - ita "A '%-.32s'@'%-.64s' non e' permesso creare nuovi utenti" - por "Não é permitido a '%-.32s'@'%-.64s' criar novos usuários" - rus "'%-.32s'@'%-.64s' ÎÅ ÒÁÚÒÅÛÁÅÔÓÑ ÓÏÚÄÁ×ÁÔØ ÎÏ×ÙÈ ÐÏÌØÚÏ×ÁÔÅÌÅÊ" - serbian "Korisniku '%-.32s'@'%-.64s' nije dozvoljeno da kreira nove korisnike" - spa "'%-.32s`@`%-.64s` no es permitido para crear nuevos usuarios" - swe "'%-.32s'@'%-.64s' har inte rättighet att skapa nya användare" - ukr "ëÏÒÉÓÔÕ×ÁÞÕ '%-.32s'@'%-.64s' ÎÅ ÄÏÚ×ÏÌÅÎÏ ÓÔ×ÏÒÀ×ÁÔÉ ÎÏ×ÉÈ ËÏÒÉÓÔÕ×ÁÞ¦×" + nla "'%-.48s'@'%-.64s' mag geen nieuwe gebruikers creeren" + eng "'%-.48s'@'%-.64s' is not allowed to create new users" + est "Kasutajal '%-.48s'@'%-.64s' ei ole lubatud luua uusi kasutajaid" + fre "'%-.48s'@'%-.64s' n'est pas autorisé à créer de nouveaux utilisateurs" + ger "'%-.48s'@'%-.64s' ist nicht berechtigt, neue Benutzer hinzuzufügen" + ita "A '%-.48s'@'%-.64s' non e' permesso creare nuovi utenti" + por "Não é permitido a '%-.48s'@'%-.64s' criar novos usuários" + rus "'%-.48s'@'%-.64s' ÎÅ ÒÁÚÒÅÛÁÅÔÓÑ ÓÏÚÄÁ×ÁÔØ ÎÏ×ÙÈ ÐÏÌØÚÏ×ÁÔÅÌÅÊ" + serbian "Korisniku '%-.48s'@'%-.64s' nije dozvoljeno da kreira nove korisnike" + spa "'%-.48s`@`%-.64s` no es permitido para crear nuevos usuarios" + swe "'%-.48s'@'%-.64s' har inte rättighet att skapa nya användare" + ukr "ëÏÒÉÓÔÕ×ÁÞÕ '%-.48s'@'%-.64s' ÎÅ ÄÏÚ×ÏÌÅÎÏ ÓÔ×ÏÒÀ×ÁÔÉ ÎÏ×ÉÈ ËÏÒÉÓÔÕ×ÁÞ¦×" ER_UNION_TABLES_IN_DIFFERENT_DIR nla "Incorrecte tabel definitie; alle MERGE tabellen moeten tot dezelfde database behoren" eng "Incorrect table definition; all MERGE tables must be in the same database" @@ -4715,19 +4715,19 @@ ER_SLAVE_IGNORED_TABLE spa "Slave SQL thread ignorado el query debido a las reglas de replicación-*-tabla" swe "Slav SQL tråden ignorerade frågan pga en replicate-*-table regel" ER_INCORRECT_GLOBAL_LOCAL_VAR - eng "Variable '%-.64s' is a %s variable" - serbian "Incorrect foreign key definition for '%-.64s': %s" - ger "Variable '%-.64s' ist eine %s-Variable" - nla "Variabele '%-.64s' is geen %s variabele" - spa "Variable '%-.64s' es una %s variable" - swe "Variabel '%-.64s' är av typ %s" + eng "Variable '%-.192s' is a %s variable" + serbian "Incorrect foreign key definition for '%-.192s': %s" + ger "Variable '%-.192s' ist eine %s-Variable" + nla "Variabele '%-.192s' is geen %s variabele" + spa "Variable '%-.192s' es una %s variable" + swe "Variabel '%-.192s' är av typ %s" ER_WRONG_FK_DEF 42000 - eng "Incorrect foreign key definition for '%-.64s': %s" - ger "Falsche Fremdschlüssel-Definition für '%-.64s': %s" - nla "Incorrecte foreign key definitie voor '%-.64s': %s" - por "Definição errada da chave estrangeira para '%-.64s': %s" - spa "Equivocada definición de llave extranjera para '%-.64s': %s" - swe "Felaktig FOREIGN KEY-definition för '%-.64s': %s" + eng "Incorrect foreign key definition for '%-.192s': %s" + ger "Falsche Fremdschlüssel-Definition für '%-.192s': %s" + nla "Incorrecte foreign key definitie voor '%-.192s': %s" + por "Definição errada da chave estrangeira para '%-.192s': %s" + spa "Equivocada definición de llave extranjera para '%-.192s': %s" + swe "Felaktig FOREIGN KEY-definition för '%-.192s': %s" ER_KEY_REF_DO_NOT_MATCH_TABLE_REF eng "Key reference and table reference don't match" ger "Schlüssel- und Tabellenverweis passen nicht zusammen" @@ -4811,12 +4811,12 @@ ER_SELECT_REDUCED 01000 swe "Select %u reducerades vid optimiering" ukr "Select %u was ÓËÁÓÏ×ÁÎÏ ÐÒÉ ÏÐÔÉÍiÚÁÃii" ER_TABLENAME_NOT_ALLOWED_HERE 42000 - eng "Table '%-.64s' from one of the SELECTs cannot be used in %-.32s" - ger "Tabelle '%-.64s', die in einem der SELECT-Befehle verwendet wurde, kann nicht in %-.32s verwendet werden" - nla "Tabel '%-.64s' uit een van de SELECTS kan niet in %-.32s gebruikt worden" - por "Tabela '%-.64s' de um dos SELECTs não pode ser usada em %-.32s" - spa "Tabla '%-.64s' de uno de los SELECT no puede ser usada en %-.32s" - swe "Tabell '%-.64s' från en SELECT kan inte användas i %-.32s" + eng "Table '%-.192s' from one of the SELECTs cannot be used in %-.32s" + ger "Tabelle '%-.192s', die in einem der SELECT-Befehle verwendet wurde, kann nicht in %-.32s verwendet werden" + nla "Tabel '%-.192s' uit een van de SELECTS kan niet in %-.32s gebruikt worden" + por "Tabela '%-.192s' de um dos SELECTs não pode ser usada em %-.32s" + spa "Tabla '%-.192s' de uno de los SELECT no puede ser usada en %-.32s" + swe "Tabell '%-.192s' från en SELECT kan inte användas i %-.32s" ER_NOT_SUPPORTED_AUTH_MODE 08004 eng "Client does not support authentication protocol requested by server; consider upgrading MySQL client" ger "Client unterstützt das vom Server erwartete Authentifizierungsprotokoll nicht. Bitte aktualisieren Sie Ihren MySQL-Client" @@ -4959,12 +4959,12 @@ ER_SERVER_IS_IN_SECURE_AUTH_MODE rus "óÅÒ×ÅÒ ÚÁÐÕÝÅÎ × ÒÅÖÉÍÅ --secure-auth (ÂÅÚÏÐÁÓÎÏÊ Á×ÔÏÒÉÚÁÃÉÉ), ÎÏ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÑ '%s'@'%s' ÐÁÒÏÌØ ÓÏÈÒÁÎ£Î × ÓÔÁÒÏÍ ÆÏÒÍÁÔÅ; ÎÅÏÂÈÏÄÉÍÏ ÏÂÎÏ×ÉÔØ ÆÏÒÍÁÔ ÐÁÒÏÌÑ" spa "Servidor está rodando en modo --secure-auth, pero '%s'@'%s' tiene clave en el antiguo formato; por favor cambie la clave para el nuevo formato" ER_WARN_FIELD_RESOLVED - eng "Field or reference '%-.64s%s%-.64s%s%-.64s' of SELECT #%d was resolved in SELECT #%d" - ger "Feld oder Verweis '%-.64s%s%-.64s%s%-.64s' im SELECT-Befehl Nr. %d wurde im SELECT-Befehl Nr. %d aufgelöst" - por "Campo ou referência '%-.64s%s%-.64s%s%-.64s' de SELECT #%d foi resolvido em SELECT #%d" - rus "ðÏÌÅ ÉÌÉ ÓÓÙÌËÁ '%-.64s%s%-.64s%s%-.64s' ÉÚ SELECTÁ #%d ÂÙÌÁ ÎÁÊÄÅÎÁ × SELECTÅ #%d" - spa "Campo o referencia '%-.64s%s%-.64s%s%-.64s' de SELECT #%d fue resolvido en SELECT #%d" - ukr "óÔÏ×ÂÅÃØ ÁÂÏ ÐÏÓÉÌÁÎÎÑ '%-.64s%s%-.64s%s%-.64s' ¦Ú SELECTÕ #%d ÂÕÌÏ ÚÎÁÊÄÅÎÅ Õ SELECT¦ #%d" + eng "Field or reference '%-.192s%s%-.192s%s%-.192s' of SELECT #%d was resolved in SELECT #%d" + ger "Feld oder Verweis '%-.192s%s%-.192s%s%-.192s' im SELECT-Befehl Nr. %d wurde im SELECT-Befehl Nr. %d aufgelöst" + por "Campo ou referência '%-.192s%s%-.192s%s%-.192s' de SELECT #%d foi resolvido em SELECT #%d" + rus "ðÏÌÅ ÉÌÉ ÓÓÙÌËÁ '%-.192s%s%-.192s%s%-.192s' ÉÚ SELECTÁ #%d ÂÙÌÁ ÎÁÊÄÅÎÁ × SELECTÅ #%d" + spa "Campo o referencia '%-.192s%s%-.192s%s%-.192s' de SELECT #%d fue resolvido en SELECT #%d" + ukr "óÔÏ×ÂÅÃØ ÁÂÏ ÐÏÓÉÌÁÎÎÑ '%-.192s%s%-.192s%s%-.192s' ¦Ú SELECTÕ #%d ÂÕÌÏ ÚÎÁÊÄÅÎÅ Õ SELECT¦ #%d" ER_BAD_SLAVE_UNTIL_COND eng "Incorrect parameter or combination of parameters for START SLAVE UNTIL" ger "Falscher Parameter oder falsche Kombination von Parametern für START SLAVE UNTIL" @@ -5001,11 +5001,11 @@ ER_WARN_QC_RESIZE swe "Storleken av "Query cache" kunde inte sättas till %lu, ny storlek är %lu" ukr "ëÅÛ ÚÁÐÉÔ¦× ÎÅÓÐÒÏÍÏÖÅÎ ×ÓÔÁÎÏ×ÉÔÉ ÒÏÚÍ¦Ò %lu, ÎÏ×ÉÊ ÒÏÚÍ¦Ò ËÅÛÁ ÚÁÐÉÔ¦× - %lu" ER_BAD_FT_COLUMN - eng "Column '%-.64s' cannot be part of FULLTEXT index" - ger "Feld '%-.64s' kann nicht Teil eines FULLTEXT-Index sein" - por "Coluna '%-.64s' não pode ser parte de índice FULLTEXT" - spa "Columna '%-.64s' no puede ser parte de FULLTEXT index" - swe "Kolumn '%-.64s' kan inte vara del av ett FULLTEXT index" + eng "Column '%-.192s' cannot be part of FULLTEXT index" + ger "Feld '%-.192s' kann nicht Teil eines FULLTEXT-Index sein" + por "Coluna '%-.192s' não pode ser parte de índice FULLTEXT" + spa "Columna '%-.192s' no puede ser parte de FULLTEXT index" + swe "Kolumn '%-.192s' kan inte vara del av ett FULLTEXT index" ER_UNKNOWN_KEY_CACHE eng "Unknown key cache '%-.100s'" ger "Unbekannter Schlüssel-Cache '%-.100s'" @@ -5063,10 +5063,10 @@ ER_TOO_MUCH_AUTO_TIMESTAMP_COLS por "Incorreta definição de tabela; Pode ter somente uma coluna TIMESTAMP com CURRENT_TIMESTAMP em DEFAULT ou ON UPDATE cláusula" spa "Incorrecta definición de tabla; Solamente debe haber una columna TIMESTAMP con CURRENT_TIMESTAMP en DEFAULT o ON UPDATE cláusula" ER_INVALID_ON_UPDATE - eng "Invalid ON UPDATE clause for '%-.64s' column" - ger "Ungültige ON-UPDATE-Klausel für Spalte '%-.64s'" - por "Inválida cláusula ON UPDATE para campo '%-.64s'" - spa "Inválido ON UPDATE cláusula para campo '%-.64s'" + eng "Invalid ON UPDATE clause for '%-.192s' column" + ger "Ungültige ON-UPDATE-Klausel für Spalte '%-.192s'" + por "Inválida cláusula ON UPDATE para campo '%-.192s'" + spa "Inválido ON UPDATE cláusula para campo '%-.192s'" ER_UNSUPPORTED_PS eng "This command is not supported in the prepared statement protocol yet" ger "Dieser Befehl wird im Protokoll für vorbereitete Anweisungen noch nicht unterstützt" @@ -5209,50 +5209,50 @@ ER_SP_CASE_NOT_FOUND 20000 eng "Case not found for CASE statement" ger "Fall für CASE-Anweisung nicht gefunden" ER_FPARSER_TOO_BIG_FILE - eng "Configuration file '%-.64s' is too big" - ger "Konfigurationsdatei '%-.64s' ist zu groß" - rus "óÌÉÛËÏÍ ÂÏÌØÛÏÊ ËÏÎÆÉÇÕÒÁÃÉÏÎÎÙÊ ÆÁÊÌ '%-.64s'" - ukr "úÁÎÁÄÔÏ ×ÅÌÉËÉÊ ËÏÎÆ¦ÇÕÒÁæÊÎÉÊ ÆÁÊÌ '%-.64s'" + eng "Configuration file '%-.192s' is too big" + ger "Konfigurationsdatei '%-.192s' ist zu groß" + rus "óÌÉÛËÏÍ ÂÏÌØÛÏÊ ËÏÎÆÉÇÕÒÁÃÉÏÎÎÙÊ ÆÁÊÌ '%-.192s'" + ukr "úÁÎÁÄÔÏ ×ÅÌÉËÉÊ ËÏÎÆ¦ÇÕÒÁæÊÎÉÊ ÆÁÊÌ '%-.192s'" ER_FPARSER_BAD_HEADER - eng "Malformed file type header in file '%-.64s'" - ger "Nicht wohlgeformter Dateityp-Header in Datei '%-.64s'" - rus "îÅ×ÅÒÎÙÊ ÚÁÇÏÌÏ×ÏË ÔÉÐÁ ÆÁÊÌÁ '%-.64s'" - ukr "îÅצÒÎÉÊ ÚÁÇÏÌÏ×ÏË ÔÉÐÕ Õ ÆÁÊ̦ '%-.64s'" + eng "Malformed file type header in file '%-.192s'" + ger "Nicht wohlgeformter Dateityp-Header in Datei '%-.192s'" + rus "îÅ×ÅÒÎÙÊ ÚÁÇÏÌÏ×ÏË ÔÉÐÁ ÆÁÊÌÁ '%-.192s'" + ukr "îÅצÒÎÉÊ ÚÁÇÏÌÏ×ÏË ÔÉÐÕ Õ ÆÁÊ̦ '%-.192s'" ER_FPARSER_EOF_IN_COMMENT eng "Unexpected end of file while parsing comment '%-.200s'" ger "Unerwartetes Dateiende beim Parsen des Kommentars '%-.200s'" rus "îÅÏÖÉÄÁÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ × ËÏÍÅÎÔÁÒÉÉ '%-.200s'" ukr "îÅÓÐÏĦ×ÁÎÎÉÊ Ë¦ÎÅÃØ ÆÁÊÌÕ Õ ËÏÍÅÎÔÁÒ¦ '%-.200s'" ER_FPARSER_ERROR_IN_PARAMETER - eng "Error while parsing parameter '%-.64s' (line: '%-.64s')" - ger "Fehler beim Parsen des Parameters '%-.64s' (Zeile: '%-.64s')" - rus "ïÛÉÂËÁ ÐÒÉ ÒÁÓÐÏÚÎÁ×ÁÎÉÉ ÐÁÒÁÍÅÔÒÁ '%-.64s' (ÓÔÒÏËÁ: '%-.64s')" - ukr "ðÏÍÉÌËÁ × ÒÏÓЦÚÎÁ×ÁÎΦ ÐÁÒÁÍÅÔÒÕ '%-.64s' (ÒÑÄÏË: '%-.64s')" + eng "Error while parsing parameter '%-.192s' (line: '%-.192s')" + ger "Fehler beim Parsen des Parameters '%-.192s' (Zeile: '%-.192s')" + rus "ïÛÉÂËÁ ÐÒÉ ÒÁÓÐÏÚÎÁ×ÁÎÉÉ ÐÁÒÁÍÅÔÒÁ '%-.192s' (ÓÔÒÏËÁ: '%-.192s')" + ukr "ðÏÍÉÌËÁ × ÒÏÓЦÚÎÁ×ÁÎΦ ÐÁÒÁÍÅÔÒÕ '%-.192s' (ÒÑÄÏË: '%-.192s')" ER_FPARSER_EOF_IN_UNKNOWN_PARAMETER - eng "Unexpected end of file while skipping unknown parameter '%-.64s'" - ger "Unerwartetes Dateiende beim Überspringen des unbekannten Parameters '%-.64s'" - rus "îÅÏÖÉÄÁÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ ÐÒÉ ÐÒÏÐÕÓËÅ ÎÅÉÚ×ÅÓÔÎÏÇÏ ÐÁÒÁÍÅÔÒÁ '%-.64s'" - ukr "îÅÓÐÏĦ×ÁÎÎÉÊ Ë¦ÎÅÃØ ÆÁÊÌÕ Õ ÓÐÒϦ ÐÒÏÍÉÎÕÔÉ ÎÅצÄÏÍÉÊ ÐÁÒÁÍÅÔÒ '%-.64s'" + eng "Unexpected end of file while skipping unknown parameter '%-.192s'" + ger "Unerwartetes Dateiende beim Überspringen des unbekannten Parameters '%-.192s'" + rus "îÅÏÖÉÄÁÎÎÙÊ ËÏÎÅà ÆÁÊÌÁ ÐÒÉ ÐÒÏÐÕÓËÅ ÎÅÉÚ×ÅÓÔÎÏÇÏ ÐÁÒÁÍÅÔÒÁ '%-.192s'" + ukr "îÅÓÐÏĦ×ÁÎÎÉÊ Ë¦ÎÅÃØ ÆÁÊÌÕ Õ ÓÐÒϦ ÐÒÏÍÉÎÕÔÉ ÎÅצÄÏÍÉÊ ÐÁÒÁÍÅÔÒ '%-.192s'" ER_VIEW_NO_EXPLAIN eng "EXPLAIN/SHOW can not be issued; lacking privileges for underlying table" ger "EXPLAIN/SHOW kann nicht verlangt werden. Rechte für zugrunde liegende Tabelle fehlen" rus "EXPLAIN/SHOW ÎÅ ÍÏÖÅÔ ÂÙÔØ ×ÙÐÏÌÎÅÎÎÏ; ÎÅÄÏÓÔÁÔÏÞÎÏ ÐÒÁ× ÎÁ ÔÁËÂÌÉÃÙ ÚÁÐÒÏÓÁ" ukr "EXPLAIN/SHOW ÎÅ ÍÏÖÅ ÂÕÔÉ ×¦ËÏÎÁÎÏ; ÎÅÍÁ¤ ÐÒÁ× ÎÁ ÔÉÂÌÉæ ÚÁÐÉÔÕ" ER_FRM_UNKNOWN_TYPE - eng "File '%-.64s' has unknown type '%-.64s' in its header" - ger "Datei '%-.64s' hat unbekannten Typ '%-.64s' im Header" - rus "æÁÊÌ '%-.64s' ÓÏÄÅÒÖÉÔ ÎÅÉÚ×ÅÓÔÎÙÊ ÔÉÐ '%-.64s' × ÚÁÇÏÌÏ×ËÅ" - ukr "æÁÊÌ '%-.64s' ÍÁ¤ ÎÅצÄÏÍÉÊ ÔÉÐ '%-.64s' Õ ÚÁÇÏÌÏ×ËÕ" + eng "File '%-.192s' has unknown type '%-.64s' in its header" + ger "Datei '%-.192s' hat unbekannten Typ '%-.64s' im Header" + rus "æÁÊÌ '%-.192s' ÓÏÄÅÒÖÉÔ ÎÅÉÚ×ÅÓÔÎÙÊ ÔÉÐ '%-.64s' × ÚÁÇÏÌÏ×ËÅ" + ukr "æÁÊÌ '%-.192s' ÍÁ¤ ÎÅצÄÏÍÉÊ ÔÉÐ '%-.64s' Õ ÚÁÇÏÌÏ×ËÕ" ER_WRONG_OBJECT - eng "'%-.64s.%-.64s' is not %s" - ger "'%-.64s.%-.64s' ist nicht %s" - rus "'%-.64s.%-.64s' - ÎÅ %s" - ukr "'%-.64s.%-.64s' ÎÅ ¤ %s" + eng "'%-.192s.%-.192s' is not %s" + ger "'%-.192s.%-.192s' ist nicht %s" + rus "'%-.192s.%-.192s' - ÎÅ %s" + ukr "'%-.192s.%-.192s' ÎÅ ¤ %s" ER_NONUPDATEABLE_COLUMN - eng "Column '%-.64s' is not updatable" - ger "Feld '%-.64s' ist nicht aktualisierbar" - rus "óÔÏÌÂÅà '%-.64s' ÎÅ ÏÂÎÏ×ÌÑÅÍÙÊ" - ukr "óÔÏ×ÂÅÃØ '%-.64s' ÎÅ ÍÏÖÅ ÂÕÔÉ ÚÍÉÎÅÎÉÊ" + eng "Column '%-.192s' is not updatable" + ger "Feld '%-.192s' ist nicht aktualisierbar" + rus "óÔÏÌÂÅà '%-.192s' ÎÅ ÏÂÎÏ×ÌÑÅÍÙÊ" + ukr "óÔÏ×ÂÅÃØ '%-.192s' ÎÅ ÍÏÖÅ ÂÕÔÉ ÚÍÉÎÅÎÉÊ" ER_VIEW_SELECT_DERIVED eng "View's SELECT contains a subquery in the FROM clause" ger "SELECT der View enthält eine Subquery in der FROM-Klausel" @@ -5269,10 +5269,10 @@ ER_VIEW_SELECT_VARIABLE rus "View SELECT ÓÏÄÅÒÖÉÔ ÐÅÒÅÍÅÎÎÕÀ ÉÌÉ ÐÁÒÁÍÅÔÒ" ukr "View SELECT ÍÁ¤ ÚÍÉÎÎÕ ÁÂÏ ÐÁÒÁÍÅÔÅÒ" ER_VIEW_SELECT_TMPTABLE - eng "View's SELECT refers to a temporary table '%-.64s'" - ger "SELECT der View verweist auf eine temporäre Tabelle '%-.64s'" - rus "View SELECT ÓÏÄÅÒÖÉÔ ÓÓÙÌËÕ ÎÁ ×ÒÅÍÅÎÎÕÀ ÔÁÂÌÉÃÕ '%-.64s'" - ukr "View SELECT ×ÉËÏÒÉÓÔÏ×Õ¤ ÔÉÍÞÁÓÏ×Õ ÔÁÂÌÉÃÀ '%-.64s'" + eng "View's SELECT refers to a temporary table '%-.192s'" + ger "SELECT der View verweist auf eine temporäre Tabelle '%-.192s'" + rus "View SELECT ÓÏÄÅÒÖÉÔ ÓÓÙÌËÕ ÎÁ ×ÒÅÍÅÎÎÕÀ ÔÁÂÌÉÃÕ '%-.192s'" + ukr "View SELECT ×ÉËÏÒÉÓÔÏ×Õ¤ ÔÉÍÞÁÓÏ×Õ ÔÁÂÌÉÃÀ '%-.192s'" ER_VIEW_WRONG_LIST eng "View's SELECT and view's field list have different column counts" ger "SELECT- und Feldliste der Views haben unterschiedliche Anzahlen von Spalten" @@ -5289,7 +5289,7 @@ ER_WARN_VIEW_WITHOUT_KEY rus "ïÂÎÏ×ÌÑÅÍÙÊ view ÎÅ ÓÏÄÅÒÖÉÔ ËÌÀÞÁ ÉÓÐÏÌØÚÏ×ÁÎÎÙÈ(ÏÊ) × ÎÅÍ ÔÁÂÌÉÃ(Ù)" ukr "View, ÝÏ ÏÎÏ×ÌÀÅÔØÓÑ, ΊͦÓÔÉÔØ ÐÏ×ÎÏÇÏ ËÌÀÞÁ ÔÁÂÌÉæ(Ø), ÝÏ ×ÉËÏÒ¦ÓÔÁÎÁ × ÎØÀÏÍÕ" ER_VIEW_INVALID - eng "View '%-.64s.%-.64s' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" + eng "View '%-.192s.%-.192s' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them" ER_SP_NO_DROP_SP eng "Can't drop or alter a %s from within another stored routine" ger "Kann eine %s nicht von innerhalb einer anderen gespeicherten Routine löschen oder ändern" @@ -5303,8 +5303,8 @@ ER_TRG_DOES_NOT_EXIST eng "Trigger does not exist" ger "Trigger existiert nicht" ER_TRG_ON_VIEW_OR_TEMP_TABLE - eng "Trigger's '%-.64s' is view or temporary table" - ger "'%-.64s' des Triggers ist View oder temporäre Tabelle" + eng "Trigger's '%-.192s' is view or temporary table" + ger "'%-.192s' des Triggers ist View oder temporäre Tabelle" ER_TRG_CANT_CHANGE_ROW eng "Updating of %s row is not allowed in %strigger" ger "Aktualisieren einer %s-Zeile ist in einem %s-Trigger nicht erlaubt" @@ -5312,30 +5312,30 @@ ER_TRG_NO_SUCH_ROW_IN_TRG eng "There is no %s row in %s trigger" ger "Es gibt keine %s-Zeile im %s-Trigger" ER_NO_DEFAULT_FOR_FIELD - eng "Field '%-.64s' doesn't have a default value" - ger "Feld '%-.64s' hat keinen Vorgabewert" + eng "Field '%-.192s' doesn't have a default value" + ger "Feld '%-.192s' hat keinen Vorgabewert" ER_DIVISION_BY_ZERO 22012 eng "Division by 0" ger "Division durch 0" ER_TRUNCATED_WRONG_VALUE_FOR_FIELD - eng "Incorrect %-.32s value: '%-.128s' for column '%.64s' at row %ld" - ger "Falscher %-.32s-Wert: '%-.128s' für Feld '%.64s' in Zeile %ld" + eng "Incorrect %-.32s value: '%-.128s' for column '%.192s' at row %ld" + ger "Falscher %-.32s-Wert: '%-.128s' für Feld '%.192s' in Zeile %ld" ER_ILLEGAL_VALUE_FOR_TYPE 22007 - eng "Illegal %s '%-.64s' value found during parsing" - ger "Nicht zulässiger %s-Wert '%-.64s' beim Parsen gefunden" + eng "Illegal %s '%-.192s' value found during parsing" + ger "Nicht zulässiger %s-Wert '%-.192s' beim Parsen gefunden" ER_VIEW_NONUPD_CHECK - eng "CHECK OPTION on non-updatable view '%-.64s.%-.64s'" - ger "CHECK OPTION auf nicht-aktualisierbarem View '%-.64s.%-.64s'" - rus "CHECK OPTION ÄÌÑ ÎÅÏÂÎÏ×ÌÑÅÍÏÇÏ VIEW '%-.64s.%-.64s'" - ukr "CHECK OPTION ÄÌÑ VIEW '%-.64s.%-.64s' ÝÏ ÎÅ ÍÏÖÅ ÂÕÔÉ ÏÎÏ×ÌÅÎÎÉÍ" + eng "CHECK OPTION on non-updatable view '%-.192s.%-.192s'" + ger "CHECK OPTION auf nicht-aktualisierbarem View '%-.192s.%-.192s'" + rus "CHECK OPTION ÄÌÑ ÎÅÏÂÎÏ×ÌÑÅÍÏÇÏ VIEW '%-.192s.%-.192s'" + ukr "CHECK OPTION ÄÌÑ VIEW '%-.192s.%-.192s' ÝÏ ÎÅ ÍÏÖÅ ÂÕÔÉ ÏÎÏ×ÌÅÎÎÉÍ" ER_VIEW_CHECK_FAILED - eng "CHECK OPTION failed '%-.64s.%-.64s'" - ger "CHECK OPTION fehlgeschlagen: '%-.64s.%-.64s'" - rus "ÐÒÏ×ÅÒËÁ CHECK OPTION ÄÌÑ VIEW '%-.64s.%-.64s' ÐÒÏ×ÁÌÉÌÁÓØ" - ukr "ðÅÒÅצÒËÁ CHECK OPTION ÄÌÑ VIEW '%-.64s.%-.64s' ÎÅ ÐÒÏÊÛÌÁ" + eng "CHECK OPTION failed '%-.192s.%-.192s'" + ger "CHECK OPTION fehlgeschlagen: '%-.192s.%-.192s'" + rus "ÐÒÏ×ÅÒËÁ CHECK OPTION ÄÌÑ VIEW '%-.192s.%-.192s' ÐÒÏ×ÁÌÉÌÁÓØ" + ukr "ðÅÒÅצÒËÁ CHECK OPTION ÄÌÑ VIEW '%-.192s.%-.192s' ÎÅ ÐÒÏÊÛÌÁ" ER_PROCACCESS_DENIED_ERROR 42000 - eng "%-.16s command denied to user '%-.32s'@'%-.64s' for routine '%-.64s'" - ger "Befehl %-.16s nicht zulässig für Benutzer '%-.32s'@'%-.64s' in Routine '%-.64s'" + eng "%-.16s command denied to user '%-.48s'@'%-.64s' for routine '%-.192s'" + ger "Befehl %-.16s nicht zulässig für Benutzer '%-.48s'@'%-.64s' in Routine '%-.192s'" ER_RELAY_LOG_FAIL eng "Failed purging old relay logs: %s" ger "Bereinigen alter Relais-Logs fehlgeschlagen: %s" @@ -5397,28 +5397,28 @@ ER_PS_MANY_PARAM eng "Prepared statement contains too many placeholders" ger "Vorbereitete Anweisung enthält zu viele Platzhalter" ER_KEY_PART_0 - eng "Key part '%-.64s' length cannot be 0" - ger "Länge des Schlüsselteils '%-.64s' kann nicht 0 sein" + eng "Key part '%-.192s' length cannot be 0" + ger "Länge des Schlüsselteils '%-.192s' kann nicht 0 sein" ER_VIEW_CHECKSUM eng "View text checksum failed" ger "View-Text-Prüfsumme fehlgeschlagen" rus "ðÒÏ×ÅÒËÁ ËÏÎÔÒÏÌØÎÏÊ ÓÕÍÍÙ ÔÅËÓÔÁ VIEW ÐÒÏ×ÁÌÉÌÁÓØ" ukr "ðÅÒÅצÒËÁ ËÏÎÔÒÏÌØÎϧ ÓÕÍÉ ÔÅËÓÔÕ VIEW ÎÅ ÐÒÏÊÛÌÁ" ER_VIEW_MULTIUPDATE - eng "Can not modify more than one base table through a join view '%-.64s.%-.64s'" - ger "Kann nicht mehr als eine Basistabelle über Join-View '%-.64s.%-.64s' ändern" - rus "îÅÌØÚÑ ÉÚÍÅÎÉÔØ ÂÏÌØÛÅ ÞÅÍ ÏÄÎÕ ÂÁÚÏ×ÕÀ ÔÁÂÌÉÃÕ ÉÓÐÏÌØÚÕÑ ÍÎÏÇÏÔÁÂÌÉÞÎÙÊ VIEW '%-.64s.%-.64s'" - ukr "îÅÍÏÖÌÉ×Ï ÏÎÏ×ÉÔÉ Â¦ÌØÛ ÎÉÖ ÏÄÎÕ ÂÁÚÏ×Õ ÔÁÂÌÉÃÀ ×ÙËÏÒÉÓÔÏ×ÕÀÞÉ VIEW '%-.64s.%-.64s', ÝÏ Í¦ÓÔ¦ÔØ ÄÅË¦ÌØËÁ ÔÁÂÌÉÃØ" + eng "Can not modify more than one base table through a join view '%-.192s.%-.192s'" + ger "Kann nicht mehr als eine Basistabelle über Join-View '%-.192s.%-.192s' ändern" + rus "îÅÌØÚÑ ÉÚÍÅÎÉÔØ ÂÏÌØÛÅ ÞÅÍ ÏÄÎÕ ÂÁÚÏ×ÕÀ ÔÁÂÌÉÃÕ ÉÓÐÏÌØÚÕÑ ÍÎÏÇÏÔÁÂÌÉÞÎÙÊ VIEW '%-.192s.%-.192s'" + ukr "îÅÍÏÖÌÉ×Ï ÏÎÏ×ÉÔÉ Â¦ÌØÛ ÎÉÖ ÏÄÎÕ ÂÁÚÏ×Õ ÔÁÂÌÉÃÀ ×ÙËÏÒÉÓÔÏ×ÕÀÞÉ VIEW '%-.192s.%-.192s', ÝÏ Í¦ÓÔ¦ÔØ ÄÅË¦ÌØËÁ ÔÁÂÌÉÃØ" ER_VIEW_NO_INSERT_FIELD_LIST - eng "Can not insert into join view '%-.64s.%-.64s' without fields list" - ger "Kann nicht ohne Feldliste in Join-View '%-.64s.%-.64s' einfügen" - rus "îÅÌØÚÑ ×ÓÔÁ×ÌÑÔØ ÚÁÐÉÓÉ × ÍÎÏÇÏÔÁÂÌÉÞÎÙÊ VIEW '%-.64s.%-.64s' ÂÅÚ ÓÐÉÓËÁ ÐÏÌÅÊ" - ukr "îÅÍÏÖÌÉ×Ï ÕÓÔÁ×ÉÔÉ ÒÑÄËÉ Õ VIEW '%-.64s.%-.64s', ÝÏ Í¦ÓÔÉÔØ ÄÅË¦ÌØËÁ ÔÁÂÌÉÃØ, ÂÅÚ ÓÐÉÓËÕ ÓÔÏ×Âæ×" + eng "Can not insert into join view '%-.192s.%-.192s' without fields list" + ger "Kann nicht ohne Feldliste in Join-View '%-.192s.%-.192s' einfügen" + rus "îÅÌØÚÑ ×ÓÔÁ×ÌÑÔØ ÚÁÐÉÓÉ × ÍÎÏÇÏÔÁÂÌÉÞÎÙÊ VIEW '%-.192s.%-.192s' ÂÅÚ ÓÐÉÓËÁ ÐÏÌÅÊ" + ukr "îÅÍÏÖÌÉ×Ï ÕÓÔÁ×ÉÔÉ ÒÑÄËÉ Õ VIEW '%-.192s.%-.192s', ÝÏ Í¦ÓÔÉÔØ ÄÅË¦ÌØËÁ ÔÁÂÌÉÃØ, ÂÅÚ ÓÐÉÓËÕ ÓÔÏ×Âæ×" ER_VIEW_DELETE_MERGE_VIEW - eng "Can not delete from join view '%-.64s.%-.64s'" - ger "Kann nicht aus Join-View '%-.64s.%-.64s' löschen" - rus "îÅÌØÚÑ ÕÄÁÌÑÔØ ÉÚ ÍÎÏÇÏÔÁÂÌÉÞÎÏÇÏ VIEW '%-.64s.%-.64s'" - ukr "îÅÍÏÖÌÉ×Ï ×ÉÄÁÌÉÔÉ ÒÑÄËÉ Õ VIEW '%-.64s.%-.64s', ÝÏ Í¦ÓÔÉÔØ ÄÅË¦ÌØËÁ ÔÁÂÌÉÃØ" + eng "Can not delete from join view '%-.192s.%-.192s'" + ger "Kann nicht aus Join-View '%-.192s.%-.192s' löschen" + rus "îÅÌØÚÑ ÕÄÁÌÑÔØ ÉÚ ÍÎÏÇÏÔÁÂÌÉÞÎÏÇÏ VIEW '%-.192s.%-.192s'" + ukr "îÅÍÏÖÌÉ×Ï ×ÉÄÁÌÉÔÉ ÒÑÄËÉ Õ VIEW '%-.192s.%-.192s', ÝÏ Í¦ÓÔÉÔØ ÄÅË¦ÌØËÁ ÔÁÂÌÉÃØ" ER_CANNOT_USER eng "Operation %s failed for %.256s" ger "Operation %s schlug fehl für %.256s" @@ -5443,8 +5443,8 @@ ER_XA_RBROLLBACK XA100 eng "XA_RBROLLBACK: Transaction branch was rolled back" ger "XA_RBROLLBACK: Transaktionszweig wurde zurückgerollt" ER_NONEXISTING_PROC_GRANT 42000 - eng "There is no such grant defined for user '%-.32s' on host '%-.64s' on routine '%-.64s'" - ger "Es gibt diese Berechtigung für Benutzer '%-.32s' auf Host '%-.64s' für Routine '%-.64s' nicht" + eng "There is no such grant defined for user '%-.48s' on host '%-.64s' on routine '%-.192s'" + ger "Es gibt diese Berechtigung für Benutzer '%-.48s' auf Host '%-.64s' für Routine '%-.192s' nicht" ER_PROC_AUTO_GRANT_FAIL eng "Failed to grant EXECUTE and ALTER ROUTINE privileges" ger "Gewährung von EXECUTE- und ALTER-ROUTINE-Rechten fehlgeschlagen" @@ -5503,20 +5503,20 @@ ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG eng "Explicit or implicit commit is not allowed in stored function or trigger." ger "Explizites oder implizites Commit ist in gespeicherten Funktionen und in Triggern nicht erlaubt" ER_NO_DEFAULT_FOR_VIEW_FIELD - eng "Field of view '%-.64s.%-.64s' underlying table doesn't have a default value" - ger "Ein Feld der dem View '%-.64s.%-.64s' zugrundeliegenden Tabelle hat keinen Vorgabewert" + eng "Field of view '%-.192s.%-.192s' underlying table doesn't have a default value" + ger "Ein Feld der dem View '%-.192s.%-.192s' zugrundeliegenden Tabelle hat keinen Vorgabewert" ER_SP_NO_RECURSION eng "Recursive stored functions and triggers are not allowed." ger "Rekursive gespeicherte Routinen und Triggers sind nicht erlaubt" ER_TOO_BIG_SCALE 42000 S1009 - eng "Too big scale %d specified for column '%-.64s'. Maximum is %d." - ger "Zu großer Skalierungsfaktor %d für Feld '%-.64s' angegeben. Maximum ist %d" + eng "Too big scale %d specified for column '%-.192s'. Maximum is %d." + ger "Zu großer Skalierungsfaktor %d für Feld '%-.192s' angegeben. Maximum ist %d" ER_TOO_BIG_PRECISION 42000 S1009 - eng "Too big precision %d specified for column '%-.64s'. Maximum is %d." - ger "Zu große Genauigkeit %d für Feld '%-.64s' angegeben. Maximum ist %d" + eng "Too big precision %d specified for column '%-.192s'. Maximum is %d." + ger "Zu große Genauigkeit %d für Feld '%-.192s' angegeben. Maximum ist %d" ER_M_BIGGER_THAN_D 42000 S1009 - eng "For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%-.64s')." - ger "Für FLOAT(M,D), DOUBLE(M,D) oder DECIMAL(M,D) muss M >= D sein (Feld '%-.64s')" + eng "For float(M,D), double(M,D) or decimal(M,D), M must be >= D (column '%-.192s')." + ger "Für FLOAT(M,D), DOUBLE(M,D) oder DECIMAL(M,D) muss M >= D sein (Feld '%-.192s')" ER_WRONG_LOCK_OF_SYSTEM_TABLE eng "You can't combine write-locking of system tables with other tables or lock types" ER_CONNECT_TO_FOREIGN_DATA_SOURCE @@ -5550,8 +5550,8 @@ ER_WARN_CANT_DROP_DEFAULT_KEYCACHE eng "Cannot drop default keycache" ger "Der vorgabemäßige Schlüssel-Cache kann nicht gelöscht werden" ER_TOO_BIG_DISPLAYWIDTH 42000 S1009 - eng "Display width out of range for column '%-.64s' (max = %d)" - ger "Anzeigebreite außerhalb des zulässigen Bereichs für Spalte '%-.64s' (Maximum: %d)" + eng "Display width out of range for column '%-.192s' (max = %d)" + ger "Anzeigebreite außerhalb des zulässigen Bereichs für Spalte '%-.192s' (Maximum: %d)" ER_XAER_DUPID XAE08 eng "XAER_DUPID: The XID already exists" ger "XAER_DUPID: Die XID existiert bereits" @@ -5559,11 +5559,11 @@ ER_DATETIME_FUNCTION_OVERFLOW 22008 eng "Datetime function: %-.32s field overflow" ger "Datetime-Funktion: %-.32s Feldüberlauf" ER_CANT_UPDATE_USED_TABLE_IN_SF_OR_TRG - eng "Can't update table '%-.64s' in stored function/trigger because it is already used by statement which invoked this stored function/trigger." - ger "Kann Tabelle '%-.64s' in gespeicherter Funktion oder Trigger nicht aktualisieren, weil sie bereits von der Anweisung verwendet wird, die diese gespeicherte Funktion oder den Trigger aufrief" + eng "Can't update table '%-.192s' in stored function/trigger because it is already used by statement which invoked this stored function/trigger." + ger "Kann Tabelle '%-.192s' in gespeicherter Funktion oder Trigger nicht aktualisieren, weil sie bereits von der Anweisung verwendet wird, die diese gespeicherte Funktion oder den Trigger aufrief" ER_VIEW_PREVENT_UPDATE - eng "The definition of table '%-.64s' prevents operation %.64s on table '%-.64s'." - ger "Die Definition der Tabelle '%-.64s' verhindert die Operation %.64s auf Tabelle '%-.64s'" + eng "The definition of table '%-.192s' prevents operation %.192s on table '%-.192s'." + ger "Die Definition der Tabelle '%-.192s' verhindert die Operation %.192s auf Tabelle '%-.192s'" ER_PS_NO_RECURSION eng "The prepared statement contains a stored routine call that refers to that same statement. It's not allowed to execute a prepared statement in such a recursive manner" ger "Die vorbereitete Anweisung enthält einen Aufruf einer gespeicherten Routine, die auf eben dieselbe Anweisung verweist. Es ist nicht erlaubt, eine vorbereitete Anweisung in solch rekursiver Weise auszuführen" @@ -5574,17 +5574,17 @@ ER_MALFORMED_DEFINER eng "Definer is not fully qualified" ger "Definierer des View ist nicht vollständig spezifiziert" ER_VIEW_FRM_NO_USER - eng "View '%-.64s'.'%-.64s' has no definer information (old table format). Current user is used as definer. Please recreate the view!" - ger "View '%-.64s'.'%-.64s' hat keine Definierer-Information (altes Tabellenformat). Der aktuelle Benutzer wird als Definierer verwendet. Bitte erstellen Sie den View neu" + eng "View '%-.192s'.'%-.192s' has no definer information (old table format). Current user is used as definer. Please recreate the view!" + ger "View '%-.192s'.'%-.192s' hat keine Definierer-Information (altes Tabellenformat). Der aktuelle Benutzer wird als Definierer verwendet. Bitte erstellen Sie den View neu" ER_VIEW_OTHER_USER - eng "You need the SUPER privilege for creation view with '%-.64s'@'%-.64s' definer" - ger "Sie brauchen die SUPER-Berechtigung, um einen View mit dem Definierer '%-.64s'@'%-.64s' zu erzeugen" + eng "You need the SUPER privilege for creation view with '%-.192s'@'%-.192s' definer" + ger "Sie brauchen die SUPER-Berechtigung, um einen View mit dem Definierer '%-.192s'@'%-.192s' zu erzeugen" ER_NO_SUCH_USER eng "There is no '%-.64s'@'%-.64s' registered" ger "'%-.64s'@'%-.64s' ist nicht registriert" ER_FORBID_SCHEMA_CHANGE - eng "Changing schema from '%-.64s' to '%-.64s' is not allowed." - ger "Wechsel des Schemas von '%-.64s' auf '%-.64s' ist nicht erlaubt" + eng "Changing schema from '%-.192s' to '%-.192s' is not allowed." + ger "Wechsel des Schemas von '%-.192s' auf '%-.192s' ist nicht erlaubt" ER_ROW_IS_REFERENCED_2 23000 eng "Cannot delete or update a parent row: a foreign key constraint fails (%.192s)" ger "Kann Eltern-Zeile nicht löschen oder aktualisieren: eine Fremdschlüsselbedingung schlägt fehl (%.192s)" @@ -5595,22 +5595,22 @@ ER_SP_BAD_VAR_SHADOW 42000 eng "Variable '%-.64s' must be quoted with `...`, or renamed" ger "Variable '%-.64s' muss mit `...` geschützt oder aber umbenannt werden" ER_TRG_NO_DEFINER - eng "No definer attribute for trigger '%-.64s'.'%-.64s'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger." - ger "Kein Definierer-Attribut für Trigger '%-.64s'.'%-.64s'. Der Trigger wird mit der Autorisierung des Aufrufers aktiviert, der möglicherweise keine zureichenden Berechtigungen hat. Bitte legen Sie den Trigger neu an." + eng "No definer attribute for trigger '%-.192s'.'%-.192s'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger." + ger "Kein Definierer-Attribut für Trigger '%-.192s'.'%-.192s'. Der Trigger wird mit der Autorisierung des Aufrufers aktiviert, der möglicherweise keine zureichenden Berechtigungen hat. Bitte legen Sie den Trigger neu an." ER_OLD_FILE_FORMAT - eng "'%-.64s' has an old format, you should re-create the '%s' object(s)" - ger "'%-.64s' hat altes Format, Sie sollten die '%s'-Objekt(e) neu erzeugen" + eng "'%-.192s' has an old format, you should re-create the '%s' object(s)" + ger "'%-.192s' hat altes Format, Sie sollten die '%s'-Objekt(e) neu erzeugen" ER_SP_RECURSION_LIMIT - eng "Recursive limit %d (as set by the max_sp_recursion_depth variable) was exceeded for routine %.64s" - ger "Rekursionsgrenze %d (durch Variable max_sp_recursion_depth gegeben) wurde für Routine %.64s überschritten" + eng "Recursive limit %d (as set by the max_sp_recursion_depth variable) was exceeded for routine %.192s" + ger "Rekursionsgrenze %d (durch Variable max_sp_recursion_depth gegeben) wurde für Routine %.192s überschritten" ER_SP_PROC_TABLE_CORRUPT - eng "Failed to load routine %-.64s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)" - ger "Routine %-.64s konnte nicht geladen werden. Die Tabelle mysql.proc fehlt, ist beschädigt, oder enthält fehlerhaften Daten (interner Code: %d)" + eng "Failed to load routine %-.192s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)" + ger "Routine %-.192s konnte nicht geladen werden. Die Tabelle mysql.proc fehlt, ist beschädigt, oder enthält fehlerhaften Daten (interner Code: %d)" ER_FOREIGN_SERVER_EXISTS eng "The foreign server, %s, you are trying to create already exists." ER_SP_WRONG_NAME 42000 - eng "Incorrect routine name '%-.64s'" - ger "Ungültiger Routinenname '%-.64s'" + eng "Incorrect routine name '%-.192s'" + ger "Ungültiger Routinenname '%-.192s'" ER_TABLE_NEEDS_UPGRADE eng "Table upgrade required. Please do \"REPAIR TABLE `%-.32s`\" to fix it!" ger "Tabellenaktualisierung erforderlich. Bitte zum Reparieren \"REPAIR TABLE `%-.32s`\" eingeben!" @@ -5621,11 +5621,11 @@ ER_MAX_PREPARED_STMT_COUNT_REACHED 42000 eng "Can't create more than max_prepared_stmt_count statements (current value: %lu)" ger "Kann nicht mehr Anweisungen als max_prepared_stmt_count erzeugen (aktueller Wert: %lu)" ER_VIEW_RECURSIVE - eng "`%-.64s`.`%-.64s` contains view recursion" - ger "`%-.64s`.`%-.64s` enthält View-Rekursion" + eng "`%-.192s`.`%-.192s` contains view recursion" + ger "`%-.192s`.`%-.192s` enthält View-Rekursion" ER_NON_GROUPING_FIELD_USED 42000 - eng "non-grouping field '%-.64s' is used in %-.64s clause" - ger "In der %-.64s-Klausel wird das die Nicht-Gruppierungsspalte '%-.64s' verwendet" + eng "non-grouping field '%-.192s' is used in %-.64s clause" + ger "In der %-.192s-Klausel wird das die Nicht-Gruppierungsspalte '%-.64s' verwendet" ER_TABLE_CANT_HANDLE_SPKEYS eng "The used table type doesn't support SPATIAL indexes" ger "Der verwendete Tabellentyp unterstützt keine SPATIAL-Indizes" @@ -5681,9 +5681,9 @@ ER_INCONSISTENT_PARTITION_INFO_ERROR ger "Die Partitionierungsinformationen in der frm-Datei stimmen nicht mit dem überein, was in die frm-Datei geschrieben werden kann" swe "Partitioneringsinformationen i frm-filen är inte konsistent med vad som kan skrivas i frm-filen" ER_PARTITION_FUNC_NOT_ALLOWED_ERROR - eng "The %-.64s function returns the wrong type" - ger "Die %-.64s-Funktion gibt einen falschen Typ zurück" - swe "%-.64s-funktionen returnerar felaktig typ" + eng "The %-.192s function returns the wrong type" + ger "Die %-.192s-Funktion gibt einen falschen Typ zurück" + swe "%-.192s-funktionen returnerar felaktig typ" ER_PARTITIONS_MUST_BE_DEFINED_ERROR eng "For %-.64s partitions each partition must be defined" ger "Für %-.64s-Partitionen muss jede Partition definiert sein" @@ -5729,7 +5729,7 @@ ER_BLOB_FIELD_IN_PART_FUNC_ERROR ger "In der Partitionierungsfunktion sind BLOB-Spalten nicht erlaubt" swe "Ett BLOB-fält är inte tillåtet i partitioneringsfunktioner" ER_UNIQUE_KEY_NEED_ALL_FIELDS_IN_PF - eng "A %-.64s must include all columns in the table's partitioning function" + eng "A %-.192s must include all columns in the table's partitioning function" ER_NO_PARTS_ERROR eng "Number of %-.64s = 0 is not an allowed value" ger "Eine Anzahl von %-.64s = 0 ist kein erlaubter Wert" @@ -5783,9 +5783,9 @@ ER_REORG_PARTITION_NOT_EXIST ger "Es wurde versucht, mehr Partitionen als vorhanden zu reorganisieren" swe "Fler partitioner att reorganisera än det finns partitioner" ER_SAME_NAME_PARTITION - eng "Duplicate partition name %-.64s" - ger "Doppelter Partitionsname: %-.64s" - swe "Duplicerat partitionsnamn %-.64s" + eng "Duplicate partition name %-.192s" + ger "Doppelter Partitionsname: %-.192s" + swe "Duplicerat partitionsnamn %-.192s" ER_NO_BINLOG_ERROR eng "It is not allowed to shut off binlog on this command" ger "Es es nicht erlaubt, bei diesem Befehl binlog abzuschalten" @@ -5810,8 +5810,8 @@ ER_LIMITED_PART_RANGE ger "Der Handler %-.64s unterstützt in VALUES nur 32-Bit-Integers" swe "%-.64s stödjer endast 32 bitar i integers i VALUES" ER_PLUGIN_IS_NOT_LOADED - eng "Plugin '%-.64s' is not loaded" - ger "Plugin '%-.64s' ist nicht geladen" + eng "Plugin '%-.192s' is not loaded" + ger "Plugin '%-.192s' ist nicht geladen" ER_WRONG_VALUE eng "Incorrect %-.32s value: '%-.128s'" ger "Falscher %-.32s-Wert: '%-.128s'" @@ -5852,17 +5852,17 @@ ER_FOREIGN_SERVER_DOESNT_EXIST eng "The foreign server name you are trying to reference does not exist. Data source error: %-.64s" ger "Die externe Verbindung, auf die Sie zugreifen wollen, existiert nicht. Datenquellenfehlermeldung: %-.64s" ER_EVENT_ALREADY_EXISTS - eng "Event '%-.64s' already exists" - ger "Event '%-.64s' existiert bereits" + eng "Event '%-.192s' already exists" + ger "Event '%-.192s' existiert bereits" ER_EVENT_STORE_FAILED eng "Failed to store event %s. Error code %d from storage engine." ger "Speichern von Event %s fehlgeschlagen. Fehlercode der Speicher-Engine: %d" ER_EVENT_DOES_NOT_EXIST - eng "Unknown event '%-.64s'" - ger "Unbekanntes Event '%-.64s'" + eng "Unknown event '%-.192s'" + ger "Unbekanntes Event '%-.192s'" ER_EVENT_CANT_ALTER - eng "Failed to alter event '%-.64s'" - ger "Ändern des Events '%-.64s' fehlgeschlagen" + eng "Failed to alter event '%-.192s'" + ger "Ändern des Events '%-.192s' fehlgeschlagen" ER_EVENT_DROP_FAILED eng "Failed to drop %s" ger "Löschen von %s fehlgeschlagen" @@ -5899,8 +5899,8 @@ ER_EVENT_DATA_TOO_LONG eng "Data for column '%s' too long" ger "Daten der Spalte '%s' zu lang" ER_DROP_INDEX_FK - eng "Cannot drop index '%-.64s': needed in a foreign key constraint" - ger "Kann Index '%-.64s' nicht löschen: wird für einen Fremdschlüssel benötigt" + eng "Cannot drop index '%-.192s': needed in a foreign key constraint" + ger "Kann Index '%-.192s' nicht löschen: wird für einen Fremdschlüssel benötigt" ER_WARN_DEPRECATED_SYNTAX eng "The syntax '%s' is deprecated and will be removed in MySQL %s. Please use %s instead" ger "Die Syntax '%s' ist veraltet und wird in MySQL %s entfernt. Bitte benutzen Sie statt dessen %s" @@ -5911,8 +5911,8 @@ ER_CANT_READ_LOCK_LOG_TABLE eng "You can't use usual read lock with log tables. Try READ LOCAL instead" ger "Log-Tabellen können nicht mit normalen Lesesperren gesperrt werden. Verwenden Sie statt dessen READ LOCAL" ER_FOREIGN_DUPLICATE_KEY 23000 S1009 - eng "Upholding foreign key constraints for table '%.64s', entry '%-.64s', key %d would lead to a duplicate entry" - ger "Aufrechterhalten der Fremdschlüssel-Constraints für Tabelle '%.64s', Eintrag '%-.64s', Schlüssel %d würde zu einem doppelten Eintrag führen" + eng "Upholding foreign key constraints for table '%.192s', entry '%-.192s', key %d would lead to a duplicate entry" + ger "Aufrechterhalten der Fremdschlüssel-Constraints für Tabelle '%.192s', Eintrag '%-.192s', Schlüssel %d würde zu einem doppelten Eintrag führen" ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE eng "Column count of mysql.%s is wrong. Expected %d, found %d. Created with MySQL %d, now running %d. Please use scripts/mysql_fix_privilege_tables" ger "Spaltenanzahl von mysql.%s falsch. %d erwartet, aber %d erhalten. Erzeugt mit MySQL %d, jetzt unter %d. Bitte benutzen Sie scripts/mysql_fix_privilege_tables, um den Fehler zu beheben" @@ -5954,8 +5954,8 @@ ER_CANT_CHANGE_TX_ISOLATION 25001 eng "Transaction isolation level can't be changed while a transaction is in progress" ger "Transaktionsisolationsebene kann während einer laufenden Transaktion nicht geändert werden" ER_DUP_ENTRY_AUTOINCREMENT_CASE - eng "ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '%-.64s' for key '%-.64s'" - ger "ALTER TABLE führt zur Neusequenzierung von auto_increment, wodurch der doppelte Eintrag '%-.64s' für Schlüssel '%-.64s' auftritt" + eng "ALTER TABLE causes auto_increment resequencing, resulting in duplicate entry '%-.192s' for key '%-.192s'" + ger "ALTER TABLE führt zur Neusequenzierung von auto_increment, wodurch der doppelte Eintrag '%-.192s' für Schlüssel '%-.192s' auftritt" ER_EVENT_MODIFY_QUEUE_ERROR eng "Internal scheduler error %d" ger "Interner Scheduler-Fehler %d" @@ -6012,42 +6012,42 @@ ER_CANT_RENAME_LOG_TABLE eng "Cannot rename '%s'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to '%s'" ger "Kann '%s' nicht umbenennen. Wenn Loggen angeschaltet ist, müssen beim Umbenennen zu/von einer Logtabelle zwei Tabellen angegeben werden: die Logtabelle zu einer Archivtabelle und eine weitere Tabelle zurück zu '%s'" ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT 42000 - eng "Incorrect parameter count in the call to native function '%-.64s'" - ger "Falsche Anzahl von Parametern beim Aufruf der nativen Funktion '%-.64s'" + eng "Incorrect parameter count in the call to native function '%-.192s'" + ger "Falsche Anzahl von Parametern beim Aufruf der nativen Funktion '%-.192s'" ER_WRONG_PARAMETERS_TO_NATIVE_FCT 42000 - eng "Incorrect parameters in the call to native function '%-.64s'" - ger "Falscher Parameter beim Aufruf der nativen Funktion '%-.64s'" + eng "Incorrect parameters in the call to native function '%-.192s'" + ger "Falscher Parameter beim Aufruf der nativen Funktion '%-.192s'" ER_WRONG_PARAMETERS_TO_STORED_FCT 42000 - eng "Incorrect parameters in the call to stored function '%-.64s'" - ger "Falsche Parameter beim Aufruf der gespeicherten Funktion '%-.64s'" + eng "Incorrect parameters in the call to stored function '%-.192s'" + ger "Falsche Parameter beim Aufruf der gespeicherten Funktion '%-.192s'" ER_NATIVE_FCT_NAME_COLLISION - eng "This function '%-.64s' has the same name as a native function" - ger "Die Funktion '%-.64s' hat denselben Namen wie eine native Funktion" + eng "This function '%-.192s' has the same name as a native function" + ger "Die Funktion '%-.192s' hat denselben Namen wie eine native Funktion" ER_DUP_ENTRY_WITH_KEY_NAME 23000 S1009 - cze "Zvojen-Bý klíè '%-.64s' (èíslo klíèe '%-.64s')" - dan "Ens værdier '%-.64s' for indeks '%-.64s'" - nla "Dubbele ingang '%-.64s' voor zoeksleutel '%-.64s'" - eng "Duplicate entry '%-.64s' for key '%-.64s'" - jps "'%-.64s' ‚Í key '%-.64s' ‚É‚¨‚¢‚Äd•¡‚µ‚Ä‚¢‚Ü‚·", - est "Kattuv väärtus '%-.64s' võtmele '%-.64s'" - fre "Duplicata du champ '%-.64s' pour la clef '%-.64s'" - ger "Doppelter Eintrag '%-.64s' für Schlüssel '%-.64s'" - greek "ÄéðëÞ åããñáöÞ '%-.64s' ãéá ôï êëåéäß '%-.64s'" - hun "Duplikalt bejegyzes '%-.64s' a '%-.64s' kulcs szerint." - ita "Valore duplicato '%-.64s' per la chiave '%-.64s'" - jpn "'%-.64s' ¤Ï key '%-.64s' ¤Ë¤ª¤¤¤Æ½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" - kor "Áߺ¹µÈ ÀÔ·Â °ª '%-.64s': key '%-.64s'" - nor "Like verdier '%-.64s' for nøkkel '%-.64s'" - norwegian-ny "Like verdiar '%-.64s' for nykkel '%-.64s'" - pol "Powtórzone wyst?pienie '%-.64s' dla klucza '%-.64s'" - por "Entrada '%-.64s' duplicada para a chave '%-.64s'" - rum "Cimpul '%-.64s' e duplicat pentru cheia '%-.64s'" - rus "äÕÂÌÉÒÕÀÝÁÑÓÑ ÚÁÐÉÓØ '%-.64s' ÐÏ ËÌÀÞÕ '%-.64s'" - serbian "Dupliran unos '%-.64s' za kljuè '%-.64s'" - slo "Opakovaný kµúè '%-.64s' (èíslo kµúèa '%-.64s')" - spa "Entrada duplicada '%-.64s' para la clave '%-.64s'" - swe "Dubbel nyckel '%-.64s' för nyckel '%-.64s'" - ukr "äÕÂÌÀÀÞÉÊ ÚÁÐÉÓ '%-.64s' ÄÌÑ ËÌÀÞÁ '%-.64s'" + cze "Zvojen-Bý klíè '%-.64s' (èíslo klíèe '%-.192s')" + dan "Ens værdier '%-.64s' for indeks '%-.192s'" + nla "Dubbele ingang '%-.64s' voor zoeksleutel '%-.192s'" + eng "Duplicate entry '%-.64s' for key '%-.192s'" + jps "'%-.64s' ‚Í key '%-.192s' ‚É‚¨‚¢‚Äd•¡‚µ‚Ä‚¢‚Ü‚·", + est "Kattuv väärtus '%-.64s' võtmele '%-.192s'" + fre "Duplicata du champ '%-.64s' pour la clef '%-.192s'" + ger "Doppelter Eintrag '%-.64s' für Schlüssel '%-.192s'" + greek "ÄéðëÞ åããñáöÞ '%-.64s' ãéá ôï êëåéäß '%-.192s'" + hun "Duplikalt bejegyzes '%-.64s' a '%-.192s' kulcs szerint." + ita "Valore duplicato '%-.64s' per la chiave '%-.192s'" + jpn "'%-.64s' ¤Ï key '%-.192s' ¤Ë¤ª¤¤¤Æ½ÅÊ£¤·¤Æ¤¤¤Þ¤¹" + kor "Áߺ¹µÈ ÀÔ·Â °ª '%-.64s': key '%-.192s'" + nor "Like verdier '%-.64s' for nøkkel '%-.192s'" + norwegian-ny "Like verdiar '%-.64s' for nykkel '%-.192s'" + pol "Powtórzone wyst?pienie '%-.64s' dla klucza '%-.192s'" + por "Entrada '%-.64s' duplicada para a chave '%-.192s'" + rum "Cimpul '%-.64s' e duplicat pentru cheia '%-.192s'" + rus "äÕÂÌÉÒÕÀÝÁÑÓÑ ÚÁÐÉÓØ '%-.64s' ÐÏ ËÌÀÞÕ '%-.192s'" + serbian "Dupliran unos '%-.64s' za kljuè '%-.192s'" + slo "Opakovaný kµúè '%-.64s' (èíslo kµúèa '%-.192s')" + spa "Entrada duplicada '%-.64s' para la clave '%-.192s'" + swe "Dubbel nyckel '%-.64s' för nyckel '%-.192s'" + ukr "äÕÂÌÀÀÞÉÊ ÚÁÐÉÓ '%-.64s' ÄÌÑ ËÌÀÞÁ '%-.192s'" ER_BINLOG_PURGE_EMFILE eng "Too many files opened, please execute the command again" ger "Zu viele offene Dateien, bitte führen Sie den Befehl noch einmal aus" diff --git a/sql/sp.cc b/sql/sp.cc index c1a9aac0c24..44d7807f23c 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -682,15 +682,15 @@ struct st_used_field static struct st_used_field init_fields[]= { - { "Db", NAME_LEN, MYSQL_TYPE_STRING, 0}, - { "Name", NAME_LEN, MYSQL_TYPE_STRING, 0}, - { "Type", 9, MYSQL_TYPE_STRING, 0}, - { "Definer", 77, MYSQL_TYPE_STRING, 0}, - { "Modified", 0, MYSQL_TYPE_TIMESTAMP, 0}, - { "Created", 0, MYSQL_TYPE_TIMESTAMP, 0}, - { "Security_type", 1, MYSQL_TYPE_STRING, 0}, - { "Comment", NAME_LEN, MYSQL_TYPE_STRING, 0}, - { 0, 0, MYSQL_TYPE_STRING, 0} + { "Db", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0}, + { "Name", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0}, + { "Type", 9, MYSQL_TYPE_STRING, 0}, + { "Definer", 77, MYSQL_TYPE_STRING, 0}, + { "Modified", 0, MYSQL_TYPE_TIMESTAMP, 0}, + { "Created", 0, MYSQL_TYPE_TIMESTAMP, 0}, + { "Security_type", 1, MYSQL_TYPE_STRING, 0}, + { "Comment", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0}, + { 0, 0, MYSQL_TYPE_STRING, 0} }; @@ -1598,10 +1598,8 @@ sp_cache_routines_and_add_tables_aux(THD *thd, LEX *lex, rest of the server checks agains NAME_LEN bytes and not chars. Hence, the overrun happens only if the name is in length > 32 and uses multibyte (cyrillic, greek, etc.) - - !! Change 3 with SYSTEM_CHARSET_MBMAXLEN when it's defined. */ - char n[NAME_LEN*3*2+2]; + char n[NAME_LEN*2+2]; /* m_qname.str is not always \0 terminated */ memcpy(n, name.m_qname.str, name.m_qname.length); diff --git a/sql/sp_head.cc b/sql/sp_head.cc index f5e32847fb0..cb4a50eefe8 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -408,9 +408,22 @@ sp_name::init_qname(THD *thd) */ bool -check_routine_name(LEX_STRING ident) +check_routine_name(LEX_STRING *ident) { - return (!ident.str || !ident.str[0] || ident.str[ident.length-1] == ' '); + if (!ident || !ident->str || !ident->str[0] || + ident->str[ident->length-1] == ' ') + { + my_error(ER_SP_WRONG_NAME, MYF(0), ident->str); + return TRUE; + } + if (check_string_char_length(ident, "", NAME_CHAR_LEN, + system_charset_info, 1)) + { + my_error(ER_TOO_LONG_IDENT, MYF(0), ident->str); + return TRUE; + } + + return FALSE; } /* ------------------------------------------------------------------ */ @@ -2121,7 +2134,7 @@ sp_head::show_create_procedure(THD *thd) sys_var_thd_sql_mode::symbolic_mode_representation(thd, m_sql_mode, &sql_mode_len); - field_list.push_back(new Item_empty_string("Procedure", NAME_LEN)); + field_list.push_back(new Item_empty_string("Procedure", NAME_CHAR_LEN)); field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len)); // 1024 is for not to confuse old clients Item_empty_string *definition= @@ -2192,7 +2205,7 @@ sp_head::show_create_function(THD *thd) sys_var_thd_sql_mode::symbolic_mode_representation(thd, m_sql_mode, &sql_mode_len); - field_list.push_back(new Item_empty_string("Function",NAME_LEN)); + field_list.push_back(new Item_empty_string("Function",NAME_CHAR_LEN)); field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len)); Item_empty_string *definition= new Item_empty_string("Create Function", max(buffer.length(),1024)); diff --git a/sql/sp_head.h b/sql/sp_head.h index 19dc2dac476..5e38bbebd4c 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -95,7 +95,7 @@ public: bool -check_routine_name(LEX_STRING name); +check_routine_name(LEX_STRING *ident); class sp_head :private Query_arena { diff --git a/sql/sql_class.cc b/sql/sql_class.cc index cc38d63c9f9..0abda16ea6a 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -898,7 +898,7 @@ int THD::send_explain_fields(select_result *result) CHARSET_INFO *cs= system_charset_info; field_list.push_back(new Item_return_int("id",3, MYSQL_TYPE_LONGLONG)); field_list.push_back(new Item_empty_string("select_type", 19, cs)); - field_list.push_back(item= new Item_empty_string("table", NAME_LEN, cs)); + field_list.push_back(item= new Item_empty_string("table", NAME_CHAR_LEN, cs)); item->maybe_null= 1; if (lex->describe & DESCRIBE_PARTITIONS) { @@ -911,15 +911,16 @@ int THD::send_explain_fields(select_result *result) field_list.push_back(item= new Item_empty_string("type", 10, cs)); item->maybe_null= 1; field_list.push_back(item=new Item_empty_string("possible_keys", - NAME_LEN*MAX_KEY, cs)); + NAME_CHAR_LEN*MAX_KEY, cs)); item->maybe_null=1; - field_list.push_back(item=new Item_empty_string("key", NAME_LEN, cs)); + field_list.push_back(item=new Item_empty_string("key", NAME_CHAR_LEN, cs)); item->maybe_null=1; field_list.push_back(item=new Item_empty_string("key_len", - NAME_LEN*MAX_KEY)); + NAME_CHAR_LEN*MAX_KEY)); item->maybe_null=1; field_list.push_back(item=new Item_empty_string("ref", - NAME_LEN*MAX_REF_PARTS, cs)); + NAME_CHAR_LEN*MAX_REF_PARTS, + cs)); item->maybe_null=1; field_list.push_back(item= new Item_return_int("rows", 10, MYSQL_TYPE_LONGLONG)); diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 17f1c73dbcb..783b1b43759 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -3218,12 +3218,6 @@ end_with_restore_list: is_schema_db(lex->spname->m_db.str))) break; - if (lex->spname->m_name.length > NAME_LEN) - { - my_error(ER_TOO_LONG_IDENT, MYF(0), lex->spname->m_name.str); - /* this jumps to the end of the function and skips own messaging */ - goto error; - } if (lex->sql_command == SQLCOM_SHOW_CREATE_EVENT) res= Events::get_instance()->show_create_event(thd, lex->spname->m_db, @@ -3996,11 +3990,6 @@ create_sp_error: } case SQLCOM_SHOW_CREATE_PROC: { - if (lex->spname->m_name.length > NAME_LEN) - { - my_error(ER_TOO_LONG_IDENT, MYF(0), lex->spname->m_name.str); - goto error; - } if (sp_show_create_procedure(thd, lex->spname) != SP_OK) { /* We don't distinguish between errors for now */ my_error(ER_SP_DOES_NOT_EXIST, MYF(0), @@ -4011,11 +4000,6 @@ create_sp_error: } case SQLCOM_SHOW_CREATE_FUNC: { - if (lex->spname->m_name.length > NAME_LEN) - { - my_error(ER_TOO_LONG_IDENT, MYF(0), lex->spname->m_name.str); - goto error; - } if (sp_show_create_function(thd, lex->spname) != SP_OK) { /* We don't distinguish between errors for now */ my_error(ER_SP_DOES_NOT_EXIST, MYF(0), @@ -4044,11 +4028,6 @@ create_sp_error: { sp_head *sp; - if (lex->spname->m_name.length > NAME_LEN) - { - my_error(ER_TOO_LONG_IDENT, MYF(0), lex->spname->m_name.str); - goto error; - } if (lex->sql_command == SQLCOM_SHOW_PROC_CODE) sp= sp_find_routine(thd, TYPE_ENUM_PROCEDURE, lex->spname, &thd->sp_proc_cache, FALSE); @@ -5332,7 +5311,7 @@ bool mysql_test_parse_for_slave(THD *thd, char *inBuf, uint length) ** Return 0 if ok ******************************************************************************/ -bool add_field_to_list(THD *thd, char *field_name, enum_field_types type, +bool add_field_to_list(THD *thd, LEX_STRING *field_name, enum_field_types type, char *length, char *decimals, uint type_modifier, Item *default_value, Item *on_update_value, @@ -5345,14 +5324,15 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type, LEX *lex= thd->lex; DBUG_ENTER("add_field_to_list"); - if (strlen(field_name) > NAME_LEN) + if (check_string_char_length(field_name, "", NAME_CHAR_LEN, + system_charset_info, 1)) { - my_error(ER_TOO_LONG_IDENT, MYF(0), field_name); /* purecov: inspected */ + my_error(ER_TOO_LONG_IDENT, MYF(0), field_name->str); /* purecov: inspected */ DBUG_RETURN(1); /* purecov: inspected */ } if (type_modifier & PRI_KEY_FLAG) { - lex->col_list.push_back(new key_part_spec(field_name,0)); + lex->col_list.push_back(new key_part_spec(field_name->str, 0)); lex->key_list.push_back(new Key(Key::PRIMARY, NullS, &default_key_create_info, 0, lex->col_list)); @@ -5360,7 +5340,7 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type, } if (type_modifier & (UNIQUE_FLAG | UNIQUE_KEY_FLAG)) { - lex->col_list.push_back(new key_part_spec(field_name,0)); + lex->col_list.push_back(new key_part_spec(field_name->str, 0)); lex->key_list.push_back(new Key(Key::UNIQUE, NullS, &default_key_create_info, 0, lex->col_list)); @@ -5380,7 +5360,7 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type, !(((Item_func*)default_value)->functype() == Item_func::NOW_FUNC && type == MYSQL_TYPE_TIMESTAMP)) { - my_error(ER_INVALID_DEFAULT, MYF(0), field_name); + my_error(ER_INVALID_DEFAULT, MYF(0), field_name->str); DBUG_RETURN(1); } else if (default_value->type() == Item::NULL_ITEM) @@ -5389,20 +5369,20 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type, if ((type_modifier & (NOT_NULL_FLAG | AUTO_INCREMENT_FLAG)) == NOT_NULL_FLAG) { - my_error(ER_INVALID_DEFAULT, MYF(0), field_name); + my_error(ER_INVALID_DEFAULT, MYF(0), field_name->str); DBUG_RETURN(1); } } else if (type_modifier & AUTO_INCREMENT_FLAG) { - my_error(ER_INVALID_DEFAULT, MYF(0), field_name); + my_error(ER_INVALID_DEFAULT, MYF(0), field_name->str); DBUG_RETURN(1); } } if (on_update_value && type != MYSQL_TYPE_TIMESTAMP) { - my_error(ER_INVALID_ON_UPDATE, MYF(0), field_name); + my_error(ER_INVALID_ON_UPDATE, MYF(0), field_name->str); DBUG_RETURN(1); } @@ -5418,7 +5398,7 @@ bool add_field_to_list(THD *thd, char *field_name, enum_field_types type, } if (!(new_field= new create_field()) || - new_field->init(thd, field_name, type, length, decimals, type_modifier, + new_field->init(thd, field_name->str, type, length, decimals, type_modifier, default_value, on_update_value, comment, change, interval_list, cs, uint_geom_type)) DBUG_RETURN(1); @@ -6970,26 +6950,62 @@ LEX_USER *get_current_user(THD *thd, LEX_USER *user) /* - Check that length of a string does not exceed some limit. + Check that byte length of a string does not exceed some limit. SYNOPSIS - check_string_length() - str string to be checked - err_msg error message to be displayed if the string is too long - max_length max length + check_string_byte_length() + str string to be checked + err_msg error message to be displayed if the string is too long + max_byte_length max length in bytes RETURN FALSE the passed string is not longer than max_length TRUE the passed string is longer than max_length + + NOTE + The function is not used in existing code but can be useful later? */ -bool check_string_length(LEX_STRING *str, const char *err_msg, - uint max_length) +bool check_string_byte_length(LEX_STRING *str, const char *err_msg, + uint max_byte_length) { - if (str->length <= max_length) + if (str->length <= max_byte_length) return FALSE; - my_error(ER_WRONG_STRING_LENGTH, MYF(0), str->str, err_msg, max_length); + my_error(ER_WRONG_STRING_LENGTH, MYF(0), str->str, err_msg, max_byte_length); return TRUE; } + + +/* + Check that char length of a string does not exceed some limit. + + SYNOPSIS + check_string_char_length() + str string to be checked + err_msg error message to be displayed if the string is too long + max_char_length max length in symbols + cs string charset + + RETURN + FALSE the passed string is not longer than max_char_length + TRUE the passed string is longer than max_char_length +*/ + + +bool check_string_char_length(LEX_STRING *str, const char *err_msg, + uint max_char_length, CHARSET_INFO *cs, + bool no_error) +{ + int well_formed_error; + uint res= cs->cset->well_formed_len(cs, str->str, str->str + str->length, + max_char_length, &well_formed_error); + + if (!well_formed_error && str->length == res) + return FALSE; + + if (!no_error) + my_error(ER_WRONG_STRING_LENGTH, MYF(0), str->str, err_msg, max_char_length); + return TRUE; +} diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 70bc9ef23d5..46fb1568df6 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -162,7 +162,8 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report) plugin directory are used (to make this even remotely secure). */ if (my_strchr(files_charset_info, dl->str, dl->str + dl->length, FN_LIBCHAR) || - dl->length > NAME_LEN || + check_string_char_length((LEX_STRING *) dl, "", NAME_CHAR_LEN, + system_charset_info, 1) || plugin_dir_len + dl->length + 1 >= FN_REFLEN) { if (report & REPORT_TO_USER) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 445890adedb..9e02bc34f99 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -362,7 +362,7 @@ bool mysqld_show_privileges(THD *thd) field_list.push_back(new Item_empty_string("Privilege",10)); field_list.push_back(new Item_empty_string("Context",15)); - field_list.push_back(new Item_empty_string("Comment",NAME_LEN)); + field_list.push_back(new Item_empty_string("Comment",NAME_CHAR_LEN)); if (protocol->send_fields(&field_list, Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF)) @@ -438,8 +438,8 @@ bool mysqld_show_column_types(THD *thd) field_list.push_back(new Item_empty_string("Zerofill",4)); field_list.push_back(new Item_empty_string("Searchable",4)); field_list.push_back(new Item_empty_string("Case_Sensitive",4)); - field_list.push_back(new Item_empty_string("Default",NAME_LEN)); - field_list.push_back(new Item_empty_string("Comment",NAME_LEN)); + field_list.push_back(new Item_empty_string("Default",NAME_CHAR_LEN)); + field_list.push_back(new Item_empty_string("Comment",NAME_CHAR_LEN)); if (protocol->send_fields(&field_list, Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF)) @@ -521,7 +521,7 @@ find_files(THD *thd, List *files, const char *db, for (i=0 ; i < (uint) dirp->number_off_files ; i++) { - char uname[NAME_LEN*3+1]; /* Unencoded name */ + char uname[NAME_LEN + 1]; /* Unencoded name */ file=dirp->dir_entry+i; if (dir) { /* Return databases */ @@ -651,13 +651,13 @@ mysqld_show_create(THD *thd, TABLE_LIST *table_list) List field_list; if (table_list->view) { - field_list.push_back(new Item_empty_string("View",NAME_LEN)); + field_list.push_back(new Item_empty_string("View",NAME_CHAR_LEN)); field_list.push_back(new Item_empty_string("Create View", max(buffer.length(),1024))); } else { - field_list.push_back(new Item_empty_string("Table",NAME_LEN)); + field_list.push_back(new Item_empty_string("Table",NAME_CHAR_LEN)); // 1024 is for not to confuse old clients field_list.push_back(new Item_empty_string("Create Table", max(buffer.length(),1024))); @@ -731,7 +731,7 @@ bool mysqld_show_create_db(THD *thd, char *dbname, load_db_opt_by_name(thd, dbname, &create); } List field_list; - field_list.push_back(new Item_empty_string("Database",NAME_LEN)); + field_list.push_back(new Item_empty_string("Database",NAME_CHAR_LEN)); field_list.push_back(new Item_empty_string("Create Database",1024)); if (protocol->send_fields(&field_list, @@ -1626,7 +1626,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) field_list.push_back(new Item_int("Id", 0, MY_INT32_NUM_DECIMAL_DIGITS)); field_list.push_back(new Item_empty_string("User",16)); field_list.push_back(new Item_empty_string("Host",LIST_PROCESS_HOST_LEN)); - field_list.push_back(field=new Item_empty_string("db",NAME_LEN)); + field_list.push_back(field=new Item_empty_string("db",NAME_CHAR_LEN)); field->maybe_null=1; field_list.push_back(new Item_empty_string("Command",16)); field_list.push_back(new Item_return_int("Time",7, MYSQL_TYPE_LONG)); @@ -5341,7 +5341,7 @@ int fill_schema_session_variables(THD *thd, TABLE_LIST *tables, COND *cond) ST_FIELD_INFO schema_fields_info[]= { {"CATALOG_NAME", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"SCHEMA_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Database"}, + {"SCHEMA_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Database"}, {"DEFAULT_CHARACTER_SET_NAME", 64, MYSQL_TYPE_STRING, 0, 0, 0}, {"DEFAULT_COLLATION_NAME", 64, MYSQL_TYPE_STRING, 0, 0, 0}, {"SQL_PATH", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, @@ -5352,10 +5352,10 @@ ST_FIELD_INFO schema_fields_info[]= ST_FIELD_INFO tables_fields_info[]= { {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, - {"TABLE_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"ENGINE", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, "Engine"}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, + {"TABLE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"ENGINE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, "Engine"}, {"VERSION", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1, "Version"}, {"ROW_FORMAT", 10, MYSQL_TYPE_STRING, 0, 1, "Row_format"}, {"TABLE_ROWS", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1, "Rows"}, @@ -5384,13 +5384,13 @@ ST_FIELD_INFO tables_fields_info[]= ST_FIELD_INFO columns_fields_info[]= { {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"COLUMN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Field"}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"COLUMN_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Field"}, {"ORDINAL_POSITION", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 0, 0}, {"COLUMN_DEFAULT", MAX_FIELD_VARCHARLENGTH, MYSQL_TYPE_STRING, 0, 1, "Default"}, {"IS_NULLABLE", 3, MYSQL_TYPE_STRING, 0, 0, "Null"}, - {"DATA_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"DATA_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"CHARACTER_MAXIMUM_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1, 0}, {"CHARACTER_OCTET_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS , MYSQL_TYPE_LONG, 0, 1, 0}, @@ -5443,9 +5443,9 @@ ST_FIELD_INFO engines_fields_info[]= ST_FIELD_INFO events_fields_info[]= { - {"EVENT_CATALOG", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"EVENT_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Db"}, - {"EVENT_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, + {"EVENT_CATALOG", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"EVENT_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Db"}, + {"EVENT_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, {"DEFINER", 77, MYSQL_TYPE_STRING, 0, 0, "Definer"}, {"TIME_ZONE", 64, MYSQL_TYPE_STRING, 0, 0, "Time zone"}, {"EVENT_BODY", 8, MYSQL_TYPE_STRING, 0, 0, 0}, @@ -5462,7 +5462,7 @@ ST_FIELD_INFO events_fields_info[]= {"CREATED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0}, {"LAST_ALTERED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0}, {"LAST_EXECUTED", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0}, - {"EVENT_COMMENT", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"EVENT_COMMENT", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"ORIGINATOR", 10, MYSQL_TYPE_LONG, 0, 0, "Originator"}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5479,25 +5479,25 @@ ST_FIELD_INFO coll_charset_app_fields_info[]= ST_FIELD_INFO proc_fields_info[]= { - {"SPECIFIC_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"SPECIFIC_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"ROUTINE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"ROUTINE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Db"}, - {"ROUTINE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, + {"ROUTINE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Db"}, + {"ROUTINE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, {"ROUTINE_TYPE", 9, MYSQL_TYPE_STRING, 0, 0, "Type"}, - {"DTD_IDENTIFIER", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"DTD_IDENTIFIER", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"ROUTINE_BODY", 8, MYSQL_TYPE_STRING, 0, 0, 0}, {"ROUTINE_DEFINITION", 65535, MYSQL_TYPE_STRING, 0, 1, 0}, - {"EXTERNAL_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"EXTERNAL_LANGUAGE", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"EXTERNAL_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"EXTERNAL_LANGUAGE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"PARAMETER_STYLE", 8, MYSQL_TYPE_STRING, 0, 0, 0}, {"IS_DETERMINISTIC", 3, MYSQL_TYPE_STRING, 0, 0, 0}, - {"SQL_DATA_ACCESS", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"SQL_PATH", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"SQL_DATA_ACCESS", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"SQL_PATH", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"SECURITY_TYPE", 7, MYSQL_TYPE_STRING, 0, 0, "Security_type"}, {"CREATED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, "Created"}, {"LAST_ALTERED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, "Modified"}, {"SQL_MODE", 65535, MYSQL_TYPE_STRING, 0, 0, 0}, - {"ROUTINE_COMMENT", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Comment"}, + {"ROUTINE_COMMENT", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Comment"}, {"DEFINER", 77, MYSQL_TYPE_STRING, 0, 0, "Definer"}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5506,13 +5506,13 @@ ST_FIELD_INFO proc_fields_info[]= ST_FIELD_INFO stat_fields_info[]= { {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"}, {"NON_UNIQUE", 1, MYSQL_TYPE_LONG, 0, 0, "Non_unique"}, - {"INDEX_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"INDEX_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Key_name"}, + {"INDEX_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"INDEX_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Key_name"}, {"SEQ_IN_INDEX", 2, MYSQL_TYPE_LONG, 0, 0, "Seq_in_index"}, - {"COLUMN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Column_name"}, + {"COLUMN_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Column_name"}, {"COLLATION", 1, MYSQL_TYPE_STRING, 0, 1, "Collation"}, {"CARDINALITY", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONG, 0, 1, "Cardinality"}, {"SUB_PART", 3, MYSQL_TYPE_LONG, 0, 1, "Sub_part"}, @@ -5527,8 +5527,8 @@ ST_FIELD_INFO stat_fields_info[]= ST_FIELD_INFO view_fields_info[]= { {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"VIEW_DEFINITION", 65535, MYSQL_TYPE_STRING, 0, 0, 0}, {"CHECK_OPTION", 8, MYSQL_TYPE_STRING, 0, 0, 0}, {"IS_UPDATABLE", 3, MYSQL_TYPE_STRING, 0, 0, 0}, @@ -5542,7 +5542,7 @@ ST_FIELD_INFO user_privileges_fields_info[]= { {"GRANTEE", 81, MYSQL_TYPE_STRING, 0, 0, 0}, {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"PRIVILEGE_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"PRIVILEGE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"IS_GRANTABLE", 3, MYSQL_TYPE_STRING, 0, 0, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5552,8 +5552,8 @@ ST_FIELD_INFO schema_privileges_fields_info[]= { {"GRANTEE", 81, MYSQL_TYPE_STRING, 0, 0, 0}, {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"PRIVILEGE_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"PRIVILEGE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"IS_GRANTABLE", 3, MYSQL_TYPE_STRING, 0, 0, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5563,9 +5563,9 @@ ST_FIELD_INFO table_privileges_fields_info[]= { {"GRANTEE", 81, MYSQL_TYPE_STRING, 0, 0, 0}, {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"PRIVILEGE_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"PRIVILEGE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"IS_GRANTABLE", 3, MYSQL_TYPE_STRING, 0, 0, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5575,10 +5575,10 @@ ST_FIELD_INFO column_privileges_fields_info[]= { {"GRANTEE", 81, MYSQL_TYPE_STRING, 0, 0, 0}, {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"COLUMN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"PRIVILEGE_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"COLUMN_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"PRIVILEGE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"IS_GRANTABLE", 3, MYSQL_TYPE_STRING, 0, 0, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5587,11 +5587,11 @@ ST_FIELD_INFO column_privileges_fields_info[]= ST_FIELD_INFO table_constraints_fields_info[]= { {"CONSTRAINT_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"CONSTRAINT_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"CONSTRAINT_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"CONSTRAINT_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"CONSTRAINT_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"CONSTRAINT_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"CONSTRAINT_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5599,17 +5599,17 @@ ST_FIELD_INFO table_constraints_fields_info[]= ST_FIELD_INFO key_column_usage_fields_info[]= { {"CONSTRAINT_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"CONSTRAINT_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"CONSTRAINT_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"CONSTRAINT_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"CONSTRAINT_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"COLUMN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"COLUMN_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"ORDINAL_POSITION", 10 ,MYSQL_TYPE_LONG, 0, 0, 0}, {"POSITION_IN_UNIQUE_CONSTRAINT", 10 ,MYSQL_TYPE_LONG, 0, 1, 0}, - {"REFERENCED_TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"REFERENCED_TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"REFERENCED_COLUMN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"REFERENCED_TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"REFERENCED_TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"REFERENCED_COLUMN_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5617,17 +5617,17 @@ ST_FIELD_INFO key_column_usage_fields_info[]= ST_FIELD_INFO table_names_fields_info[]= { {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Tables_in_"}, - {"TABLE_TYPE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Table_type"}, + {"TABLE_SCHEMA",NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Tables_in_"}, + {"TABLE_TYPE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Table_type"}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; ST_FIELD_INFO open_tables_fields_info[]= { - {"Database", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Database"}, - {"Table",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"}, + {"Database", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Database"}, + {"Table",NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"}, {"In_use", 1, MYSQL_TYPE_LONG, 0, 0, "In_use"}, {"Name_locked", 4, MYSQL_TYPE_LONG, 0, 0, "Name_locked"}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} @@ -5637,19 +5637,19 @@ ST_FIELD_INFO open_tables_fields_info[]= ST_FIELD_INFO triggers_fields_info[]= { {"TRIGGER_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TRIGGER_SCHEMA",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TRIGGER_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Trigger"}, + {"TRIGGER_SCHEMA",NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TRIGGER_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Trigger"}, {"EVENT_MANIPULATION", 6, MYSQL_TYPE_STRING, 0, 0, "Event"}, {"EVENT_OBJECT_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"EVENT_OBJECT_SCHEMA",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"EVENT_OBJECT_TABLE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"}, + {"EVENT_OBJECT_SCHEMA",NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"EVENT_OBJECT_TABLE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Table"}, {"ACTION_ORDER", 4, MYSQL_TYPE_LONG, 0, 0, 0}, {"ACTION_CONDITION", 65535, MYSQL_TYPE_STRING, 0, 1, 0}, {"ACTION_STATEMENT", 65535, MYSQL_TYPE_STRING, 0, 0, "Statement"}, {"ACTION_ORIENTATION", 9, MYSQL_TYPE_STRING, 0, 0, 0}, {"ACTION_TIMING", 6, MYSQL_TYPE_STRING, 0, 0, "Timing"}, - {"ACTION_REFERENCE_OLD_TABLE", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"ACTION_REFERENCE_NEW_TABLE", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"ACTION_REFERENCE_OLD_TABLE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"ACTION_REFERENCE_NEW_TABLE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"ACTION_REFERENCE_OLD_ROW", 3, MYSQL_TYPE_STRING, 0, 0, 0}, {"ACTION_REFERENCE_NEW_ROW", 3, MYSQL_TYPE_STRING, 0, 0, 0}, {"CREATED", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Created"}, @@ -5662,10 +5662,10 @@ ST_FIELD_INFO triggers_fields_info[]= ST_FIELD_INFO partitions_fields_info[]= { {"TABLE_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA",NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"PARTITION_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"SUBPARTITION_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"TABLE_SCHEMA",NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"PARTITION_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"SUBPARTITION_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"PARTITION_ORDINAL_POSITION", 21 , MYSQL_TYPE_LONG, 0, 1, 0}, {"SUBPARTITION_ORDINAL_POSITION", 21 , MYSQL_TYPE_LONG, 0, 1, 0}, {"PARTITION_METHOD", 12, MYSQL_TYPE_STRING, 0, 1, 0}, @@ -5685,7 +5685,7 @@ ST_FIELD_INFO partitions_fields_info[]= {"CHECKSUM", 21 , MYSQL_TYPE_LONG, 0, 1, 0}, {"PARTITION_COMMENT", 80, MYSQL_TYPE_STRING, 0, 0, 0}, {"NODEGROUP", 12 , MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLESPACE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"TABLESPACE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; @@ -5719,7 +5719,7 @@ ST_FIELD_INFO processlist_fields_info[]= {"ID", 4, MYSQL_TYPE_LONG, 0, 0, "Id"}, {"USER", 16, MYSQL_TYPE_STRING, 0, 0, "User"}, {"HOST", LIST_PROCESS_HOST_LEN, MYSQL_TYPE_STRING, 0, 0, "Host"}, - {"DB", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, "Db"}, + {"DB", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, "Db"}, {"COMMAND", 16, MYSQL_TYPE_STRING, 0, 0, "Command"}, {"TIME", 7, MYSQL_TYPE_LONG, 0, 0, "Time"}, {"STATE", 64, MYSQL_TYPE_STRING, 0, 1, "State"}, @@ -5730,14 +5730,14 @@ ST_FIELD_INFO processlist_fields_info[]= ST_FIELD_INFO plugin_fields_info[]= { - {"PLUGIN_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, + {"PLUGIN_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, "Name"}, {"PLUGIN_VERSION", 20, MYSQL_TYPE_STRING, 0, 0, 0}, {"PLUGIN_STATUS", 10, MYSQL_TYPE_STRING, 0, 0, "Status"}, {"PLUGIN_TYPE", 80, MYSQL_TYPE_STRING, 0, 0, "Type"}, {"PLUGIN_TYPE_VERSION", 20, MYSQL_TYPE_STRING, 0, 0, 0}, - {"PLUGIN_LIBRARY", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, "Library"}, + {"PLUGIN_LIBRARY", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, "Library"}, {"PLUGIN_LIBRARY_VERSION", 20, MYSQL_TYPE_STRING, 0, 1, 0}, - {"PLUGIN_AUTHOR", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"PLUGIN_AUTHOR", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"PLUGIN_DESCRIPTION", 65535, MYSQL_TYPE_STRING, 0, 1, 0}, {"PLUGIN_LICENSE", 80, MYSQL_TYPE_STRING, 0, 1, "License"}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} @@ -5746,16 +5746,16 @@ ST_FIELD_INFO plugin_fields_info[]= ST_FIELD_INFO files_fields_info[]= { {"FILE_ID", 4, MYSQL_TYPE_LONG, 0, 0, 0}, - {"FILE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"FILE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"FILE_TYPE", 20, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLESPACE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_CATALOG", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"LOGFILE_GROUP_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"TABLESPACE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"TABLE_CATALOG", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"TABLE_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"LOGFILE_GROUP_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"LOGFILE_GROUP_NUMBER", 4, MYSQL_TYPE_LONG, 0, 1, 0}, - {"ENGINE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"FULLTEXT_KEYS", NAME_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, + {"ENGINE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"FULLTEXT_KEYS", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 1, 0}, {"DELETED_ROWS", 4, MYSQL_TYPE_LONG, 0, 1, 0}, {"UPDATE_COUNT", 4, MYSQL_TYPE_LONG, 0, 1, 0}, {"FREE_EXTENTS", 4, MYSQL_TYPE_LONG, 0, 1, 0}, @@ -5799,16 +5799,16 @@ void init_fill_schema_files_row(TABLE* table) ST_FIELD_INFO referential_constraints_fields_info[]= { {"CONSTRAINT_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"CONSTRAINT_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"CONSTRAINT_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"CONSTRAINT_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"CONSTRAINT_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {"UNIQUE_CONSTRAINT_CATALOG", FN_REFLEN, MYSQL_TYPE_STRING, 0, 1, 0}, - {"UNIQUE_CONSTRAINT_SCHEMA", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"UNIQUE_CONSTRAINT_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"MATCH_OPTION", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"UPDATE_RULE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"DELETE_RULE", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, - {"REFERENCED_TABLE_NAME", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"UNIQUE_CONSTRAINT_SCHEMA", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"UNIQUE_CONSTRAINT_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"MATCH_OPTION", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"UPDATE_RULE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"DELETE_RULE", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, + {"REFERENCED_TABLE_NAME", NAME_CHAR_LEN, MYSQL_TYPE_STRING, 0, 0, 0}, {0, 0, MYSQL_TYPE_STRING, 0, 0, 0} }; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 3eb47ebae6e..a753cc9e8e0 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2541,6 +2541,7 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info, { DBUG_PRINT("info", ("key name: '%s' type: %d", key->name ? key->name : "(none)" , key->type)); + LEX_STRING key_name_str; if (key->type == Key::FOREIGN_KEY) { fk_key_count++; @@ -2562,7 +2563,10 @@ static int mysql_prepare_table(THD *thd, HA_CREATE_INFO *create_info, my_error(ER_TOO_MANY_KEY_PARTS,MYF(0),tmp); DBUG_RETURN(-1); } - if (key->name && strlen(key->name) > NAME_LEN) + key_name_str.str= (char*) key->name; + key_name_str.length= key->name ? strlen(key->name) : 0; + if (check_string_char_length(&key_name_str, "", NAME_CHAR_LEN, + system_charset_info, 1)) { my_error(ER_TOO_LONG_IDENT, MYF(0), key->name); DBUG_RETURN(-1); @@ -4049,7 +4053,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, if (end_active_trans(thd)) DBUG_RETURN(1); - field_list.push_back(item = new Item_empty_string("Table", NAME_LEN*2)); + field_list.push_back(item = new Item_empty_string("Table", NAME_CHAR_LEN*2)); item->maybe_null = 1; field_list.push_back(item = new Item_empty_string("Op", 10)); item->maybe_null = 1; @@ -4631,7 +4635,8 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, /* Validate the source table */ - if (table_ident->table.length > NAME_LEN || + if (check_string_char_length(&table_ident->table, "", NAME_CHAR_LEN, + system_charset_info, 1) || (table_ident->table.length && check_table_name(src_table,table_ident->table.length))) { diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc index da5c1b0bc66..fd7ba698a93 100644 --- a/sql/sql_udf.cc +++ b/sql/sql_udf.cc @@ -169,8 +169,10 @@ void udf_init() This is done to ensure that only approved dll from the system directories are used (to make this even remotely secure). */ - if (my_strchr(files_charset_info, dl_name, dl_name + strlen(dl_name), FN_LIBCHAR) || - strlen(name.str) > NAME_LEN) + if (my_strchr(files_charset_info, dl_name, + dl_name + strlen(dl_name), FN_LIBCHAR) || + check_string_char_length(&name, "", NAME_CHAR_LEN, + system_charset_info, 1)) { sql_print_error("Invalid row in mysql.func table for function '%.64s'", name.str); @@ -397,7 +399,8 @@ int mysql_create_function(THD *thd,udf_func *udf) my_message(ER_UDF_NO_PATHS, ER(ER_UDF_NO_PATHS), MYF(0)); DBUG_RETURN(1); } - if (udf->name.length > NAME_LEN) + if (check_string_char_length(&udf->name, "", NAME_CHAR_LEN, + system_charset_info, 1)) { my_error(ER_TOO_LONG_IDENT, MYF(0), udf->name); DBUG_RETURN(1); diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 36b09224796..f011899e5cc 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1926,9 +1926,8 @@ sp_name: my_error(ER_WRONG_DB_NAME, MYF(0), $1.str); MYSQL_YYABORT; } - if (check_routine_name($3)) + if (check_routine_name(&$3)) { - my_error(ER_SP_WRONG_NAME, MYF(0), $3.str); MYSQL_YYABORT; } $$= new sp_name($1, $3); @@ -1938,9 +1937,8 @@ sp_name: { THD *thd= YYTHD; LEX_STRING db; - if (check_routine_name($1)) + if (check_routine_name(&$1)) { - my_error(ER_SP_WRONG_NAME, MYF(0), $1.str); MYSQL_YYABORT; } if (thd->copy_db_to(&db.str, &db.length)) @@ -4535,8 +4533,7 @@ field_spec: type opt_attribute { LEX *lex=Lex; - if (add_field_to_list(lex->thd, $1.str, - (enum enum_field_types) $3, + if (add_field_to_list(lex->thd, &$1, (enum enum_field_types) $3, lex->length,lex->dec,lex->type, lex->default_value, lex->on_update_value, &lex->comment, @@ -5492,7 +5489,7 @@ alter_list_item: type opt_attribute { LEX *lex=Lex; - if (add_field_to_list(lex->thd,$3.str, + if (add_field_to_list(lex->thd,&$3, (enum enum_field_types) $5, lex->length,lex->dec,lex->type, lex->default_value, lex->on_update_value, @@ -9717,8 +9714,9 @@ user: $$->host.str= (char *) "%"; $$->host.length= 1; - if (check_string_length(&$$->user, - ER(ER_USERNAME), USERNAME_LENGTH)) + if (check_string_char_length(&$$->user, ER(ER_USERNAME), + USERNAME_CHAR_LENGTH, + system_charset_info, 0)) MYSQL_YYABORT; } | ident_or_text '@' ident_or_text @@ -9728,10 +9726,11 @@ user: MYSQL_YYABORT; $$->user = $1; $$->host=$3; - if (check_string_length(&$$->user, - ER(ER_USERNAME), USERNAME_LENGTH) || - check_string_length(&$$->host, - ER(ER_HOSTNAME), HOSTNAME_LENGTH)) + if (check_string_char_length(&$$->user, ER(ER_USERNAME), + USERNAME_CHAR_LENGTH, + system_charset_info, 0) || + check_string_byte_length(&$$->host, ER(ER_HOSTNAME), + HOSTNAME_LENGTH)) MYSQL_YYABORT; } | CURRENT_USER optional_braces diff --git a/sql/table.cc b/sql/table.cc index 4123473cf1e..d1c9836d15c 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -2329,8 +2329,9 @@ uint calculate_key_len(TABLE *table, uint key, const byte *buf, bool check_db_name(LEX_STRING *org_name) { char *name= org_name->str; + uint name_length= org_name->length; - if (!org_name->length || org_name->length > NAME_LEN) + if (!name_length || name_length > NAME_LEN) return 1; if (lower_case_table_names && name != any_db) @@ -2339,6 +2340,7 @@ bool check_db_name(LEX_STRING *org_name) #if defined(USE_MB) && defined(USE_MB_IDENT) if (use_mb(system_charset_info)) { + name_length= 0; bool last_char_is_space= TRUE; char *end= name + org_name->length; while (name < end) @@ -2349,12 +2351,14 @@ bool check_db_name(LEX_STRING *org_name) if (!len) len= 1; name+= len; + name_length++; } - return last_char_is_space; + return (last_char_is_space || name_length > NAME_CHAR_LEN); } else #endif - return org_name->str[org_name->length - 1] != ' '; /* purecov: inspected */ + return ((org_name->str[org_name->length - 1] != ' ') || + (name_length > NAME_CHAR_LEN)); /* purecov: inspected */ } @@ -2367,6 +2371,7 @@ bool check_db_name(LEX_STRING *org_name) bool check_table_name(const char *name, uint length) { + uint name_length= 0; // name length in symbols const char *end= name+length; if (!length || length > NAME_LEN) return 1; @@ -2387,14 +2392,16 @@ bool check_table_name(const char *name, uint length) if (len) { name += len; + name_length++; continue; } } #endif name++; + name_length++; } #if defined(USE_MB) && defined(USE_MB_IDENT) - return last_char_is_space; + return (last_char_is_space || name_length > NAME_CHAR_LEN) ; #else return 0; #endif @@ -2403,7 +2410,7 @@ bool check_table_name(const char *name, uint length) bool check_column_name(const char *name) { - const char *start= name; + uint name_length= 0; // name length in symbols bool last_char_is_space= TRUE; while (*name) @@ -2417,6 +2424,7 @@ bool check_column_name(const char *name) if (len) { name += len; + name_length++; continue; } } @@ -2426,9 +2434,10 @@ bool check_column_name(const char *name) if (*name == NAMES_SEP_CHAR) return 1; name++; + name_length++; } /* Error if empty or too long column name */ - return last_char_is_space || (uint) (name - start) > NAME_LEN; + return last_char_is_space || (uint) name_length > NAME_CHAR_LEN; } diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index e9309f4f8b8..ca3e24223b5 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -5922,8 +5922,8 @@ ha_innobase::get_foreign_key_list(THD *thd, List *f_key_list) FOREIGN_KEY_INFO f_key_info; LEX_STRING *name= 0; uint ulen; - char uname[NAME_LEN*3+1]; /* Unencoded name */ - char db_name[NAME_LEN*3+1]; + char uname[NAME_LEN+1]; /* Unencoded name */ + char db_name[NAME_LEN+1]; const char *tmp_buff; tmp_buff= foreign->id; diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index b12d5fa1db0..6b0092e3880 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -7811,16 +7811,16 @@ static void test_explain_bug() "", "", "", 19, 0); verify_prepare_field(result, 2, "table", "", MYSQL_TYPE_VAR_STRING, - "", "", "", NAME_LEN, 0); + "", "", "", NAME_CHAR_LEN, 0); verify_prepare_field(result, 3, "type", "", MYSQL_TYPE_VAR_STRING, "", "", "", 10, 0); verify_prepare_field(result, 4, "possible_keys", "", MYSQL_TYPE_VAR_STRING, - "", "", "", NAME_LEN*MAX_KEY, 0); + "", "", "", NAME_CHAR_LEN*MAX_KEY, 0); verify_prepare_field(result, 5, "key", "", MYSQL_TYPE_VAR_STRING, - "", "", "", NAME_LEN, 0); + "", "", "", NAME_CHAR_LEN, 0); if (mysql_get_server_version(mysql) <= 50000) { @@ -7830,11 +7830,11 @@ static void test_explain_bug() else { verify_prepare_field(result, 6, "key_len", "", MYSQL_TYPE_VAR_STRING, "", - "", "", NAME_LEN*MAX_KEY, 0); + "", "", NAME_CHAR_LEN*MAX_KEY, 0); } verify_prepare_field(result, 7, "ref", "", MYSQL_TYPE_VAR_STRING, - "", "", "", NAME_LEN*16, 0); + "", "", "", NAME_CHAR_LEN*16, 0); verify_prepare_field(result, 8, "rows", "", MYSQL_TYPE_LONGLONG, "", "", "", 10, 0); From b9bba4f4b41834f4a919b780eee961c766d9a0dc Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 13:36:58 +0200 Subject: [PATCH 106/153] Replace not portable "--system rm" with --remove_file --- mysql-test/t/sp.test | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test index d49f36fd6d7..fbca496eaf2 100644 --- a/mysql-test/t/sp.test +++ b/mysql-test/t/sp.test @@ -706,9 +706,11 @@ begin insert into test.t1 values (concat(x, "2"), y+2); end| ---system rm -f $MYSQLTEST_VARDIR/tmp/spout +# Remove spout file if it exists +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/spout call into_outfile("ofile", 1)| ---system rm -f $MYSQLTEST_VARDIR/tmp/spout +--remove_file $MYSQLTEST_VARDIR/tmp/spout delete from t1| drop procedure into_outfile| @@ -723,9 +725,11 @@ begin insert into test.t1 values (concat(x, "2"), y+2); end| ---system rm -f $MYSQLTEST_VARDIR/tmp/spdump +# Remove spdump file if it exists +--error 0,1 +--remove_file $MYSQLTEST_VARDIR/tmp/spdump call into_dumpfile("dfile", 1)| ---system rm -f $MYSQLTEST_VARDIR/tmp/spdump +--remove_file $MYSQLTEST_VARDIR/tmp/spdump delete from t1| drop procedure into_dumpfile| From 780212301367ada0b9166bf5bfdcaa2ccdb141b2 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 16:13:23 +0200 Subject: [PATCH 107/153] Remove the cleanup of table t1 until problem with lock is fixed --- mysql-test/r/rpl_packet.result | 2 -- mysql-test/t/rpl_packet.test | 8 ++++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/rpl_packet.result b/mysql-test/r/rpl_packet.result index a1ec39ece30..894bc81b08d 100644 --- a/mysql-test/r/rpl_packet.result +++ b/mysql-test/r/rpl_packet.result @@ -24,5 +24,3 @@ INSERT INTO `t1`(`f1`) VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa SHOW STATUS LIKE 'Slave_running'; Variable_name Value Slave_running OFF -drop table t1; -drop table t1; diff --git a/mysql-test/t/rpl_packet.test b/mysql-test/t/rpl_packet.test index a1e933e2e88..83fe75363a5 100644 --- a/mysql-test/t/rpl_packet.test +++ b/mysql-test/t/rpl_packet.test @@ -69,10 +69,10 @@ sleep 2; SHOW STATUS LIKE 'Slave_running'; # cleanup -connection master; -drop table t1; -connection slave; -drop table t1; +#connection master; +#drop table t1; +#connection slave; +#drop table t1; # End of tests From 5152132b47318438eb5773238c05630e2b206469 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 19:40:55 +0500 Subject: [PATCH 108/153] Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte additional fix sql/mysql_priv.h: additional fix --- sql/mysql_priv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 7607a004e7a..c1d2caf9371 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -366,7 +366,7 @@ MY_LOCALE *my_locale_by_number(uint number); Maximum length of time zone name that we support (Time zone name is char(64) in db). mysqlbinlog needs it. */ -#define MAX_TIME_ZONE_NAME_LENGTH (NAME_LEN + 8) +#define MAX_TIME_ZONE_NAME_LENGTH (NAME_LEN + 1) /* The rest of the file is included in the server only */ #ifndef MYSQL_CLIENT From 7bf304a6bd85c6fdfdf2c6ff8c4a7a2d0ce3c681 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 18:00:57 +0300 Subject: [PATCH 109/153] Bug #27513: test case added to make sure this crash bug doesn't reappear. mysql-test/r/errors.result: Bug #27513: test case mysql-test/t/errors.test: Bug #27513: test case --- mysql-test/r/errors.result | 18 ++++++++++++++++++ mysql-test/t/errors.test | 11 +++++++++++ 2 files changed, 29 insertions(+) diff --git a/mysql-test/r/errors.result b/mysql-test/r/errors.result index 0c84f24a2e4..0b12853ab80 100644 --- a/mysql-test/r/errors.result +++ b/mysql-test/r/errors.result @@ -28,3 +28,21 @@ ERROR 42000: Display width out of range for column 'a' (max = 255) set sql_mode='traditional'; create table t1 (a varchar(66000)); ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead +CREATE TABLE t1 (a INT); +SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); +a +Warnings: +Error 1365 Division by 0 +INSERT INTO t1 VALUES(1); +SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); +a +1 +Warnings: +Error 1365 Division by 0 +INSERT INTO t1 VALUES(2),(3); +SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); +a +1 +Warnings: +Error 1365 Division by 0 +DROP TABLE t1; diff --git a/mysql-test/t/errors.test b/mysql-test/t/errors.test index f5647a293e8..6ddef2a8c08 100644 --- a/mysql-test/t/errors.test +++ b/mysql-test/t/errors.test @@ -41,4 +41,15 @@ set sql_mode='traditional'; --error 1074 create table t1 (a varchar(66000)); +# +# Bug #27513: mysql 5.0.x + NULL pointer DoS +# +CREATE TABLE t1 (a INT); +SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); +INSERT INTO t1 VALUES(1); +SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); +INSERT INTO t1 VALUES(2),(3); +SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); +DROP TABLE t1; + # End of 5.0 tests From 65e5af7b7f8838c224d466ed0cd50440bc146ebc Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 21:33:56 +0400 Subject: [PATCH 110/153] Fix a race that breaks the valgrind build. mysql-test/r/information_schema.result: Fix a race (updated result file) mysql-test/t/information_schema.test: Fix a race in a test. --- mysql-test/r/information_schema.result | 3 ++- mysql-test/t/information_schema.test | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 6c03ace3d27..ac280f301d8 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1415,7 +1415,8 @@ CREATE TABLE server_status (variable_name VARCHAR(64), variable_value DECIMAL(22,7)); DROP EVENT IF EXISTS log_status; CREATE EVENT log_status -ON SCHEDULE EVERY 1 SECOND +ON SCHEDULE AT NOW() +ON COMPLETION PRESERVE DO BEGIN INSERT INTO thread_status SELECT variable_name, variable_value FROM diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index bd1f4271c94..96a11b3061e 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1059,7 +1059,8 @@ DROP EVENT IF EXISTS log_status; DELIMITER $$; CREATE EVENT log_status - ON SCHEDULE EVERY 1 SECOND + ON SCHEDULE AT NOW() + ON COMPLETION PRESERVE DO BEGIN INSERT INTO thread_status SELECT variable_name, variable_value FROM @@ -1071,12 +1072,12 @@ information_schema.global_status; DELIMITER ;$$ SET GLOBAL event_scheduler=1; -sleep 1; +let $wait_condition=select count(variable_name) != 0 from server_status; +let $wait_timeout=30; +--source include/wait_condition.inc SELECT * FROM thread_status WHERE variable_name LIKE 'SSL%' LIMIT 1,2; SELECT variable_name FROM server_status LIMIT 1,2; - - DROP EVENT log_status; DROP TABLE thread_status; DROP TABLE server_status; From 73fb1aed614d77539debaa0c2f4445d09b6af010 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 15:05:33 -0500 Subject: [PATCH 111/153] Bug #20376 Doesn't auto-detect data dir This changeset fixes the problem where mysql, when run as a service, can't "detect" it's own data directory. sql/mysqld.cc: When running on Windows we check to see if we have a hard path in my_progname. If not, then we use GetModuleFilename to get the full path for the executing module. This allows the program to determine where it's at when running as a service. --- sql/mysqld.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 5031496158b..04d4c3e76e1 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -7333,6 +7333,18 @@ static void mysql_init_variables(void) /* Allow Win32 and NetWare users to move MySQL anywhere */ { char prg_dev[LIBLEN]; +#if defined __WIN__ + char executing_path_name[LIBLEN]; + if (!test_if_hard_path(my_progname)) + { + // we don't want to use GetModuleFileName inside of my_path since + // my_path is a generic path dereferencing function and here we care + // only about the executing binary. + GetModuleFileName(NULL, executing_path_name, sizeof(executing_path_name)); + my_path(prg_dev, executing_path_name, NULL); + } + else +#endif my_path(prg_dev,my_progname,"mysql/bin"); strcat(prg_dev,"/../"); // Remove 'bin' to get base dir cleanup_dirname(mysql_home,prg_dev); From 0ee34b1ca25aa757f373857513d51d58fd7aea80 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 14:32:16 -0700 Subject: [PATCH 112/153] Fixed bug #27532: wrong results with ORDER/GROUP BY queries containing IN/BETWEEN predicates in sorting expressions. Wrong results may occur when the select list contains an expression with IN/BETWEEN predicate that differs from a sorting expression by an additional NOT only. Added the method Item_func_opt_neg::eq to compare correctly expressions containing [NOT] IN/BETWEEN. The eq method inherited from the Item_func returns TRUE when comparing 'a IN (1,2)' with 'a NOT IN (1,2)' that is not, of course, correct. mysql-test/r/order_by.result: Added a test case for bug #27532. mysql-test/t/order_by.test: Added a test case for bug #27532. sql/item_cmpfunc.cc: Fixed bug #27532. Added the method Item_func_opt_neg::eq to compare correctly expressions containing [NOT] IN/BETWEEN. The eq method inherited from the Item_func returns TRUE when comparing 'a IN (1,2)' with 'a NOT IN (1,2)' that is not, of course, correct. sql/item_cmpfunc.h: Added the method Item_func_opt_neg::eq to compare correctly expressions containing [NOT] IN/BETWEEN. The eq method inherited from the Item_func returns TRUE when comparing 'a IN (1,2)' with 'a NOT IN (1,2)' that is not, of course, correct. --- mysql-test/r/order_by.result | 59 ++++++++++++++++++++++++++++++++++++ mysql-test/t/order_by.test | 29 ++++++++++++++++++ sql/item_cmpfunc.cc | 20 ++++++++++++ sql/item_cmpfunc.h | 1 + 4 files changed, 109 insertions(+) diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index f5601ba0e43..2d6a4a922bc 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -879,3 +879,62 @@ ERROR 23000: Column 'val' in order clause is ambiguous SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val > 1; ERROR 23000: Column 'val' in order clause is ambiguous DROP TABLE t1; +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (3), (2), (4), (1); +SELECT a, IF(a IN (2,3), a, a+10) FROM t1 +ORDER BY IF(a IN (2,3), a, a+10); +a IF(a IN (2,3), a, a+10) +2 2 +3 3 +1 11 +4 14 +SELECT a, IF(a NOT IN (2,3), a, a+10) FROM t1 +ORDER BY IF(a NOT IN (2,3), a, a+10); +a IF(a NOT IN (2,3), a, a+10) +1 1 +4 4 +2 12 +3 13 +SELECT a, IF(a IN (2,3), a, a+10) FROM t1 +ORDER BY IF(a NOT IN (2,3), a, a+10); +a IF(a IN (2,3), a, a+10) +1 11 +4 14 +2 2 +3 3 +SELECT a, IF(a BETWEEN 2 AND 3, a, a+10) FROM t1 +ORDER BY IF(a BETWEEN 2 AND 3, a, a+10); +a IF(a BETWEEN 2 AND 3, a, a+10) +2 2 +3 3 +1 11 +4 14 +SELECT a, IF(a NOT BETWEEN 2 AND 3, a, a+10) FROM t1 +ORDER BY IF(a NOT BETWEEN 2 AND 3, a, a+10); +a IF(a NOT BETWEEN 2 AND 3, a, a+10) +1 1 +4 4 +2 12 +3 13 +SELECT a, IF(a BETWEEN 2 AND 3, a, a+10) FROM t1 +ORDER BY IF(a NOT BETWEEN 2 AND 3, a, a+10); +a IF(a BETWEEN 2 AND 3, a, a+10) +1 11 +4 14 +2 2 +3 3 +SELECT IF(a IN (1,2), a, '') as x1, IF(a NOT IN (1,2), a, '') as x2 +FROM t1 GROUP BY x1, x2; +x1 x2 + 3 + 4 +1 +2 +SELECT IF(a IN (1,2), a, '') as x1, IF(a NOT IN (1,2), a, '') as x2 +FROM t1 GROUP BY x1, IF(a NOT IN (1,2), a, ''); +x1 x2 + 3 + 4 +1 +2 +DROP TABLE t1; diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index d781bd6c6ba..af5811fb4a2 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -617,6 +617,35 @@ SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val; --error 1052 SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val > 1; +DROP TABLE t1; + +# +# Bug #27532: ORDER/GROUP BY expressions with IN/BETWEEN and NOT IN/BETWEEN +# + +CREATE TABLE t1 (a int); +INSERT INTO t1 VALUES (3), (2), (4), (1); + +SELECT a, IF(a IN (2,3), a, a+10) FROM t1 + ORDER BY IF(a IN (2,3), a, a+10); +SELECT a, IF(a NOT IN (2,3), a, a+10) FROM t1 + ORDER BY IF(a NOT IN (2,3), a, a+10); +SELECT a, IF(a IN (2,3), a, a+10) FROM t1 + ORDER BY IF(a NOT IN (2,3), a, a+10); + +SELECT a, IF(a BETWEEN 2 AND 3, a, a+10) FROM t1 + ORDER BY IF(a BETWEEN 2 AND 3, a, a+10); +SELECT a, IF(a NOT BETWEEN 2 AND 3, a, a+10) FROM t1 + ORDER BY IF(a NOT BETWEEN 2 AND 3, a, a+10); +SELECT a, IF(a BETWEEN 2 AND 3, a, a+10) FROM t1 + ORDER BY IF(a NOT BETWEEN 2 AND 3, a, a+10); + +SELECT IF(a IN (1,2), a, '') as x1, IF(a NOT IN (1,2), a, '') as x2 + FROM t1 GROUP BY x1, x2; +SELECT IF(a IN (1,2), a, '') as x1, IF(a NOT IN (1,2), a, '') as x2 + FROM t1 GROUP BY x1, IF(a NOT IN (1,2), a, ''); + + DROP TABLE t1; # End of 4.1 tests diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index ffb60754381..4d54dfc2b39 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -838,6 +838,26 @@ longlong Item_func_strcmp::val_int() } +bool Item_func_opt_neg::eq(const Item *item, bool binary_cmp) const +{ + /* Assume we don't have rtti */ + if (this == item) + return 1; + if (item->type() != FUNC_ITEM) + return 0; + Item_func *item_func=(Item_func*) item; + if (arg_count != item_func->arg_count || + functype() != item_func->functype()) + return 0; + if (negated != ((Item_func_opt_neg *) item_func)->negated) + return 0; + for (uint i=0; i < arg_count ; i++) + if (!args[i]->eq(item_func->arguments()[i], binary_cmp)) + return 0; + return 1; +} + + void Item_func_interval::fix_length_and_dec() { if (row->cols() > 8) diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index a13be83e093..132e019b4a3 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -405,6 +405,7 @@ public: negated= !negated; return this; } + bool eq(const Item *item, bool binary_cmp) const; }; From da037917b22ad522062ddcb15f96bc6249084fd3 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 17:09:41 -0700 Subject: [PATCH 113/153] Fix after manual merge --- mysql-test/r/order_by.result | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 918a6b2e3d1..5eeb9bd6190 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -963,8 +963,8 @@ x1 x2 3 4 1 -2 -DROP TABLE t1; +2 +DROP TABLE t1; create table t1 (a int not null, b int not null, c int not null); insert t1 values (1,1,1),(1,1,2),(1,2,1); select a, b from t1 group by a, b order by sum(c); From e488e6f23a14490b619d5bbbf2fc4db65dc4b9ef Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 3 Apr 2007 19:45:37 -0700 Subject: [PATCH 114/153] Improved coverage for the code added to fix bug 27532. --- mysql-test/r/order_by.result | 25 +++++++++++++++++++++++++ mysql-test/t/order_by.test | 6 ++++++ 2 files changed, 31 insertions(+) diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result index 2d6a4a922bc..79b163dc1ee 100644 --- a/mysql-test/r/order_by.result +++ b/mysql-test/r/order_by.result @@ -937,4 +937,29 @@ x1 x2 4 1 2 +SELECT a, a IN (1,2) FROM t1 ORDER BY a IN (1,2); +a a IN (1,2) +3 0 +4 0 +2 1 +1 1 +SELECT a FROM t1 ORDER BY a IN (1,2); +a +3 +4 +2 +1 +SELECT a+10 FROM t1 ORDER BY a IN (1,2); +a+10 +13 +14 +12 +11 +SELECT a, IF(a IN (1,2), a, a+10) FROM t1 +ORDER BY IF(a IN (3,4), a, a+10); +a IF(a IN (1,2), a, a+10) +3 13 +4 14 +1 1 +2 2 DROP TABLE t1; diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test index af5811fb4a2..5c607608462 100644 --- a/mysql-test/t/order_by.test +++ b/mysql-test/t/order_by.test @@ -645,6 +645,12 @@ SELECT IF(a IN (1,2), a, '') as x1, IF(a NOT IN (1,2), a, '') as x2 SELECT IF(a IN (1,2), a, '') as x1, IF(a NOT IN (1,2), a, '') as x2 FROM t1 GROUP BY x1, IF(a NOT IN (1,2), a, ''); +# The remaining queries are for better coverage +SELECT a, a IN (1,2) FROM t1 ORDER BY a IN (1,2); +SELECT a FROM t1 ORDER BY a IN (1,2); +SELECT a+10 FROM t1 ORDER BY a IN (1,2); +SELECT a, IF(a IN (1,2), a, a+10) FROM t1 + ORDER BY IF(a IN (3,4), a, a+10); DROP TABLE t1; From ee58034fc9c67615e60799e20e7d6d30ed01f58b Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Apr 2007 15:22:37 +0800 Subject: [PATCH 115/153] recovery from 5.0 merge for bug18676 mysql-test/r/ndb_autodiscover.result: recovery for bug#18676 merge in 5.0 sql/ha_ndbcluster.cc: recovery for bug#18676 merge in 5.0 sql/handler.cc: recovery for bug#18676 merge in 5.0 sql/sql_table.cc: recovery for bug#18676 merge in 5.0 --- mysql-test/r/ndb_autodiscover.result | 2 +- sql/ha_ndbcluster.cc | 2 ++ sql/handler.cc | 8 ++++---- sql/sql_table.cc | 2 -- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mysql-test/r/ndb_autodiscover.result b/mysql-test/r/ndb_autodiscover.result index 487f52f6427..cb85c4ac873 100644 --- a/mysql-test/r/ndb_autodiscover.result +++ b/mysql-test/r/ndb_autodiscover.result @@ -382,7 +382,7 @@ create table t1 (a int primary key) engine=ndb; select * from t1; a select * from t1; -ERROR HY000: Can't lock file (errno: 157) +ERROR HY000: Can't lock file (errno: 4009) use test; drop database test_only_ndb_tables; CREATE TABLE t9 ( diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 5ea29265388..4db35cd7377 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -221,6 +221,7 @@ static int ndb_to_mysql_error(const NdbError *ndberr) { /* read the mysql mapped error code */ int error= ndberr->mysql_code; + switch (error) { /* errors for which we do not add warnings, just return mapped error code @@ -239,6 +240,7 @@ static int ndb_to_mysql_error(const NdbError *ndberr) default: break; } + /* Push the NDB error message as warning - Used to be able to use SHOW WARNINGS toget more info on what the error is diff --git a/sql/handler.cc b/sql/handler.cc index 751b324165d..23c3103493e 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -2865,9 +2865,9 @@ ha_find_files(THD *thd,const char *db,const char *path, Ask handler if the table exists in engine RETURN - HA_ERR_NO_SUCH_TABLE Table does not exist - HA_ERR_TABLE_EXIST Table exists - # Error code + 0 Table does not exist + 1 Table exists + # Error code */ struct st_table_exists_in_engine_args @@ -2891,7 +2891,7 @@ static my_bool table_exists_in_engine_handlerton(THD *thd, st_plugin_int *plugin int ha_table_exists_in_engine(THD* thd, const char* db, const char* name) { - int error= HA_ERR_NO_SUCH_TABLE; + int error= 0; DBUG_ENTER("ha_table_exists_in_engine"); DBUG_PRINT("enter", ("db: %s, name: %s", db, name)); st_table_exists_in_engine_args args= {db, name}; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 006ff3d7093..fc401e93d9c 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -3439,7 +3439,6 @@ bool mysql_create_table_internal(THD *thd, error= 0; goto err; } - DBUG_PRINT("info",("1")); my_error(ER_TABLE_EXISTS_ERROR, MYF(0), alias); goto err; } @@ -3451,7 +3450,6 @@ bool mysql_create_table_internal(THD *thd, { if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS) goto warn; - DBUG_PRINT("info",("2")); my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name); goto unlock_and_end; } From 93e11dce942e8aec8501982fe3e664a9d4abd471 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Apr 2007 14:01:47 +0500 Subject: [PATCH 116/153] Bug #23675 Partitions: possible security breach via alter now we return different error message if user doesn't have SELECT grants mysql-test/r/partition_grant.result: test result mysql-test/t/partition_grant.test: testcase sql/mysql_priv.h: no_errors parameter added to check_single_table_access() sql/partition_info.cc: access rights control added to the print_no_partition() sql/share/errmsg.txt: message added sql/sql_base.cc: no_errors parameter added to check_single_table_access() sql/sql_parse.cc: no_errors parameter added to check_single_table_access() --- mysql-test/r/partition_grant.result | 11 ++++++++++- mysql-test/t/partition_grant.test | 24 +++++++++++++++++++++++- sql/mysql_priv.h | 2 +- sql/partition_info.cc | 26 +++++++++++++++++++------- sql/share/errmsg.txt | 2 ++ sql/sql_base.cc | 2 +- sql/sql_parse.cc | 12 +++++++----- 7 files changed, 63 insertions(+), 16 deletions(-) diff --git a/mysql-test/r/partition_grant.result b/mysql-test/r/partition_grant.result index e88427e5396..c334a473a2a 100644 --- a/mysql-test/r/partition_grant.result +++ b/mysql-test/r/partition_grant.result @@ -19,7 +19,16 @@ revoke alter on mysqltest_1.* from mysqltest_1@localhost; alter table t1 drop partition p3; ERROR 42000: ALTER command denied to user 'mysqltest_1'@'localhost' for table 't1' revoke select,alter,drop on mysqltest_1.* from mysqltest_1@localhost; -drop user mysqltest_1@localhost; drop table t1; +create table t1 (s1 int); +insert into t1 values (1); +grant alter on mysqltest_1.* to mysqltest_1@localhost; +alter table t1 partition by list (s1) (partition p1 values in (2)); +ERROR HY000: Table has no partition for some existing values +grant select, alter on mysqltest_1.* to mysqltest_1@localhost; +alter table t1 partition by list (s1) (partition p1 values in (2)); +ERROR HY000: Table has no partition for value 1 +drop table t1; +drop user mysqltest_1@localhost; drop schema mysqltest_1; End of 5.1 tests diff --git a/mysql-test/t/partition_grant.test b/mysql-test/t/partition_grant.test index ee7c71b497a..0d30ad01c7a 100644 --- a/mysql-test/t/partition_grant.test +++ b/mysql-test/t/partition_grant.test @@ -52,8 +52,30 @@ disconnect conn3; connection default; revoke select,alter,drop on mysqltest_1.* from mysqltest_1@localhost; -drop user mysqltest_1@localhost; drop table t1; + +# +# Bug #23675 Partitions: possible security breach via alter +# + +create table t1 (s1 int); +insert into t1 values (1); +grant alter on mysqltest_1.* to mysqltest_1@localhost; +connect (conn4,localhost,mysqltest_1,,mysqltest_1); +connection conn4; +--error 1514 +alter table t1 partition by list (s1) (partition p1 values in (2)); +connection default; +grant select, alter on mysqltest_1.* to mysqltest_1@localhost; +disconnect conn4; +connect (conn5,localhost,mysqltest_1,,mysqltest_1); +--error 1514 +alter table t1 partition by list (s1) (partition p1 values in (2)); +disconnect conn5; +connection default; +drop table t1; + +drop user mysqltest_1@localhost; drop schema mysqltest_1; --echo End of 5.1 tests diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 099c9b98c1f..1fa92c00b1e 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -598,7 +598,7 @@ class THD; void close_thread_tables(THD *thd, bool locked=0, bool skip_derived=0); bool check_one_table_access(THD *thd, ulong privilege, TABLE_LIST *tables); bool check_single_table_access(THD *thd, ulong privilege, - TABLE_LIST *tables); + TABLE_LIST *tables, bool no_errors); bool check_routine_access(THD *thd,ulong want_access,char *db,char *name, bool is_proc, bool no_errors); bool check_some_access(THD *thd, ulong want_access, TABLE_LIST *table); diff --git a/sql/partition_info.cc b/sql/partition_info.cc index a7f9bd413c6..98c2e5432ab 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -849,15 +849,27 @@ void partition_info::print_no_partition_found(TABLE *table) { char buf[100]; char *buf_ptr= (char*)&buf; - my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set); + TABLE_LIST table_list; - if (part_expr->null_value) - buf_ptr= (char*)"NULL"; + bzero(&table_list, sizeof(table_list)); + table_list.db= table->s->db.str; + table_list.table_name= table->s->table_name.str; + + if (check_single_table_access(current_thd, + SELECT_ACL, &table_list, TRUE)) + my_message(ER_NO_PARTITION_FOR_GIVEN_VALUE, + ER(ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT), MYF(0)); else - longlong2str(err_value, buf, - part_expr->unsigned_flag ? 10 : -10); - my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, MYF(0), buf_ptr); - dbug_tmp_restore_column_map(table->read_set, old_map); + { + my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->read_set); + if (part_expr->null_value) + buf_ptr= (char*)"NULL"; + else + longlong2str(err_value, buf, + part_expr->unsigned_flag ? 10 : -10); + my_error(ER_NO_PARTITION_FOR_GIVEN_VALUE, MYF(0), buf_ptr); + dbug_tmp_restore_column_map(table->read_set, old_map); + } } /* Set up buffers and arrays for fields requiring preparation diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 1d9c7c814fd..38b27b0b5df 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -6053,3 +6053,5 @@ ER_DUP_ENTRY_WITH_KEY_NAME 23000 S1009 ER_BINLOG_PURGE_EMFILE eng "Too many files opened, please execute the command again" ger "Zu viele offene Dateien, bitte führen Sie den Befehl noch einmal aus" +ER_NO_PARTITION_FOR_GIVEN_VALUE_SILENT + eng "Table has no partition for some existing values" diff --git a/sql/sql_base.cc b/sql/sql_base.cc index d4316f11491..06207492926 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -5781,7 +5781,7 @@ bool setup_tables_and_check_access(THD *thd, { if (leaves_tmp->belong_to_view && check_single_table_access(thd, first_table ? want_access_first : - want_access, leaves_tmp)) + want_access, leaves_tmp, FALSE)) { tables->hide_view_error(thd); return TRUE; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index a396231b8a8..9c921286184 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -4433,6 +4433,8 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables) thd Thread handler privilege requested privilege all_tables global table list of query + no_errors FALSE/TRUE - report/don't report error to + the client (using my_error() call). RETURN 0 - OK @@ -4440,7 +4442,7 @@ static bool execute_sqlcom_select(THD *thd, TABLE_LIST *all_tables) */ bool check_single_table_access(THD *thd, ulong privilege, - TABLE_LIST *all_tables) + TABLE_LIST *all_tables, bool no_errors) { Security_context * backup_ctx= thd->security_ctx; @@ -4456,12 +4458,12 @@ bool check_single_table_access(THD *thd, ulong privilege, db_name= all_tables->db; if (check_access(thd, privilege, db_name, - &all_tables->grant.privilege, 0, 0, + &all_tables->grant.privilege, 0, no_errors, test(all_tables->schema_table))) goto deny; /* Show only 1 table for check_grant */ - if (grant_option && check_grant(thd, privilege, all_tables, 0, 1, 0)) + if (grant_option && check_grant(thd, privilege, all_tables, 0, 1, no_errors)) goto deny; thd->security_ctx= backup_ctx; @@ -4489,7 +4491,7 @@ deny: bool check_one_table_access(THD *thd, ulong privilege, TABLE_LIST *all_tables) { - if (check_single_table_access (thd,privilege,all_tables)) + if (check_single_table_access (thd,privilege,all_tables, FALSE)) return 1; /* Check rights on tables of subselects and implictly opened tables */ @@ -4502,7 +4504,7 @@ bool check_one_table_access(THD *thd, ulong privilege, TABLE_LIST *all_tables) */ if (view && subselects_tables->belong_to_view == view) { - if (check_single_table_access (thd, privilege, subselects_tables)) + if (check_single_table_access (thd, privilege, subselects_tables, FALSE)) return 1; subselects_tables= subselects_tables->next_global; } From a16d1fd4389fc0a07522b442934ab22f19ae83c1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Apr 2007 14:19:33 +0500 Subject: [PATCH 117/153] merging mysql-test/r/ndb_partition_error2.result: error message fixed --- mysql-test/r/ndb_partition_error2.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/r/ndb_partition_error2.result b/mysql-test/r/ndb_partition_error2.result index fd477306858..a739ef3923c 100644 --- a/mysql-test/r/ndb_partition_error2.result +++ b/mysql-test/r/ndb_partition_error2.result @@ -1,3 +1,3 @@ drop table if exists t1; create table t1 (s1 int) engine=ndbcluster; -ERROR HY000: For the partitioned engine it is necessary to define all partition +ERROR HY000: For the partitioned engine it is necessary to define all partitions From c5bb750f0b509c2dc30e33b9c51d01e939d777be Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Apr 2007 11:41:43 +0200 Subject: [PATCH 118/153] Portability fix to work around OS X -x86 toolchain bug with common (uninitialized data) symbols mysys/my_pthread.c: Initialize thd_lib_detected for portability (OS X -x86) --- mysys/my_pthread.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysys/my_pthread.c b/mysys/my_pthread.c index d8182b67442..aba3e47d754 100644 --- a/mysys/my_pthread.c +++ b/mysys/my_pthread.c @@ -29,7 +29,7 @@ #define SCHED_POLICY SCHED_OTHER #endif -uint thd_lib_detected; +uint thd_lib_detected= 0; #ifndef my_pthread_setprio void my_pthread_setprio(pthread_t thread_id,int prior) From dbd125fd909c531b2296a7bd90283d259a62fb59 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Apr 2007 13:38:19 +0300 Subject: [PATCH 119/153] BUG 27513: fixed left-over sql mode from a test case. --- mysql-test/r/errors.result | 7 +------ mysql-test/t/errors.test | 1 + 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/errors.result b/mysql-test/r/errors.result index 0b12853ab80..94debb1785f 100644 --- a/mysql-test/r/errors.result +++ b/mysql-test/r/errors.result @@ -28,21 +28,16 @@ ERROR 42000: Display width out of range for column 'a' (max = 255) set sql_mode='traditional'; create table t1 (a varchar(66000)); ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead +set sql_mode=default; CREATE TABLE t1 (a INT); SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); a -Warnings: -Error 1365 Division by 0 INSERT INTO t1 VALUES(1); SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); a 1 -Warnings: -Error 1365 Division by 0 INSERT INTO t1 VALUES(2),(3); SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0))); a 1 -Warnings: -Error 1365 Division by 0 DROP TABLE t1; diff --git a/mysql-test/t/errors.test b/mysql-test/t/errors.test index 6ddef2a8c08..4fbdcba635f 100644 --- a/mysql-test/t/errors.test +++ b/mysql-test/t/errors.test @@ -40,6 +40,7 @@ create table t1 (a int(256)); set sql_mode='traditional'; --error 1074 create table t1 (a varchar(66000)); +set sql_mode=default; # # Bug #27513: mysql 5.0.x + NULL pointer DoS From 2efc0f51cf3e80cd49c1ea0dee9a440936ee6287 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Apr 2007 12:50:39 +0200 Subject: [PATCH 120/153] Bug #26242 UPDATE with subquery and triggers failing with cluster tables In certain cases AFTER UPDATE/DELETE triggers on NDB tables that referenced subject table didn't see the results of operation which caused invocation of those triggers. In other words AFTER trigger invoked as result of update (or deletion) of particular row saw version of this row before update (or deletion). The problem occured because NDB handler in those cases postponed actual update/delete operations to be able to perform them later as one batch. This fix solves the problem by disabling this optimization for particular operation if subject table has AFTER trigger for this operation defined. To achieve this we introduce two new flags for handler::extra() method: HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH. These are called if there exists AFTER DELETE/UPDATE triggers during a statement that potentially can generate calls to delete_row()/update_row(). This includes multi_delete/multi_update statements as well as insert statements that do delete/update as part of an ON DUPLICATE statement. include/my_base.h: Added HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH to inform handler when batching of delete/update is not possible. mysql-test/r/ndb_trigger.result: Bug #26242 UPDATE with subquery and triggers failing with cluster tables --- Added new test cases mysql-test/t/ndb_trigger.test: Bug #26242 UPDATE with subquery and triggers failing with cluster tables --- Added new test cases sql/ha_ndbcluster.cc: Bug #26242 UPDATE with subquery and triggers failing with cluster tables: Use HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH to inform handler when batching of delete/update is not possible sql/ha_ndbcluster.h: Bug #26242 UPDATE with subquery and triggers failing with cluster tables: Added member variables for handling of HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH to inform handler when batching of delete/update is not possible sql/mysql_priv.h: Added new method prepare_triggers_for_insert_stmt to check if batching of delete/update must be disallowed. sql/sql_delete.cc: Use HA_EXTRA_DELETE_CANNOT_BATCH to inform handler when batching of delete is not possible sql/sql_insert.cc: Added method prepare_triggers_for_insert_stmt to check if batching of delete/update must be dissallowed. Use HA_EXTRA_DELETE_CANNOT_BATCH and HA_EXTRA_UPDATE_CANNOT_BATCH to inform handler when batching of delete/update is not possible sql/sql_load.cc: Call prepare_triggers_for_insert_stmt to check if batching of delete/update must be dissallowed and mark fields used by triggers for the insert statement. sql/sql_trigger.h: Added has_triggers to support what particular triggers exist on a table. sql/sql_update.cc: Use HA_EXTRA_UPDATE_CANNOT_BATCH to inform handler when batching of update is not possible --- include/my_base.h | 10 +- mysql-test/r/ndb_trigger.result | 171 ++++++++++++++++++++++++++++++++ mysql-test/t/ndb_trigger.test | 108 ++++++++++++++++++++ sql/ha_ndbcluster.cc | 23 ++++- sql/ha_ndbcluster.h | 2 + sql/mysql_priv.h | 2 + sql/sql_delete.cc | 24 +++++ sql/sql_insert.cc | 51 +++++++++- sql/sql_load.cc | 2 +- sql/sql_trigger.h | 5 + sql/sql_update.cc | 26 +++++ 11 files changed, 416 insertions(+), 8 deletions(-) diff --git a/include/my_base.h b/include/my_base.h index dda64db2ef9..633cd8c8df0 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -161,7 +161,15 @@ enum ha_extra_function { Off by default. */ HA_EXTRA_WRITE_CAN_REPLACE, - HA_EXTRA_WRITE_CANNOT_REPLACE + HA_EXTRA_WRITE_CANNOT_REPLACE, + /* + Inform handler that delete_row()/update_row() cannot batch deletes/updates + and should perform them immediately. This may be needed when table has + AFTER DELETE/UPDATE triggers which access to subject table. + These flags are reset by the handler::extra(HA_EXTRA_RESET) call. + */ + HA_EXTRA_DELETE_CANNOT_BATCH, + HA_EXTRA_UPDATE_CANNOT_BATCH }; /* The following is parameter to ha_panic() */ diff --git a/mysql-test/r/ndb_trigger.result b/mysql-test/r/ndb_trigger.result index 27f83df70c9..562c5120715 100644 --- a/mysql-test/r/ndb_trigger.result +++ b/mysql-test/r/ndb_trigger.result @@ -116,4 +116,175 @@ op a b d 1 1.050000000000000000000000000000 d 2 2.050000000000000000000000000000 drop tables t1, t2, t3; +CREATE TABLE t1 ( +id INT NOT NULL PRIMARY KEY, +xy INT +) ENGINE=ndbcluster; +INSERT INTO t1 VALUES (1, 0); +CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id = NEW.id; END // +CREATE TABLE t2 ( +id INT NOT NULL PRIMARY KEY, +xy INT +) ENGINE=ndbcluster; +INSERT INTO t2 VALUES (2, 0); +CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY) ENGINE=ndbcluster; +INSERT INTO t3 VALUES (1); +CREATE TABLE t4 LIKE t1; +CREATE TRIGGER t4_update AFTER UPDATE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id = NEW.id; END // +CREATE TABLE t5 LIKE t2; +UPDATE t1 SET xy = 3 WHERE id = 1; +SELECT xy FROM t1 where id = 1; +xy +3 +SELECT xy FROM t2 where id = 1; +xy +3 +UPDATE t1 SET xy = 4 WHERE id IN (SELECT id FROM t3 WHERE id = 1); +SELECT xy FROM t1 where id = 1; +xy +4 +SELECT xy FROM t2 where id = 1; +xy +4 +INSERT INTO t4 SELECT * FROM t1; +INSERT INTO t5 SELECT * FROM t2; +UPDATE t1,t4 SET t1.xy = 3, t4.xy = 3 WHERE t1.id = 1 AND t4.id = 1; +SELECT xy FROM t1 where id = 1; +xy +3 +SELECT xy FROM t2 where id = 1; +xy +3 +SELECT xy FROM t4 where id = 1; +xy +3 +SELECT xy FROM t5 where id = 1; +xy +3 +UPDATE t1,t4 SET t1.xy = 4, t4.xy = 4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 1) AND t4.id IN (SELECT id FROM t3 WHERE id = 1); +SELECT xy FROM t1 where id = 1; +xy +4 +SELECT xy FROM t2 where id = 1; +xy +4 +SELECT xy FROM t4 where id = 1; +xy +4 +SELECT xy FROM t5 where id = 1; +xy +4 +INSERT INTO t1 VALUES (1,0) ON DUPLICATE KEY UPDATE xy = 5; +SELECT xy FROM t1 where id = 1; +xy +5 +SELECT xy FROM t2 where id = 1; +xy +5 +DROP TRIGGER t1_update; +DROP TRIGGER t4_update; +CREATE TRIGGER t1_delete AFTER DELETE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id > 4; END // +CREATE TRIGGER t4_delete AFTER DELETE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id > 4; END // +INSERT INTO t1 VALUES (5, 0),(6,0); +INSERT INTO t2 VALUES (5, 1),(6,1); +INSERT INTO t3 VALUES (5); +SELECT * FROM t1 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +DELETE FROM t1 WHERE id IN (SELECT id FROM t3 WHERE id = 5); +SELECT * FROM t1 order by id; +id xy +1 5 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +INSERT INTO t1 VALUES (5,0); +UPDATE t2 SET xy = 1 WHERE id = 6; +TRUNCATE t4; +INSERT INTO t4 SELECT * FROM t1; +TRUNCATE t5; +INSERT INTO t5 SELECT * FROM t2; +SELECT * FROM t1 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +SELECT * FROM t4 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t5 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +DELETE FROM t1,t4 USING t1,t3,t4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 5) AND t4.id IN (SELECT id FROM t3 WHERE id = 5); +SELECT * FROM t1 order by id; +id xy +1 5 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +SELECT * FROM t4 order by id; +id xy +1 5 +6 0 +SELECT * FROM t5 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +INSERT INTO t1 VALUES (5, 0); +REPLACE INTO t2 VALUES (6,1); +SELECT * FROM t1 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +REPLACE INTO t1 VALUES (5, 1); +SELECT * FROM t1 order by id; +id xy +1 5 +5 1 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +DROP TRIGGER t1_delete; +DROP TRIGGER t4_delete; +DROP TABLE t1, t2, t3, t4, t5; End of 5.0 tests diff --git a/mysql-test/t/ndb_trigger.test b/mysql-test/t/ndb_trigger.test index 2521ef17842..25b079cfe7c 100644 --- a/mysql-test/t/ndb_trigger.test +++ b/mysql-test/t/ndb_trigger.test @@ -89,4 +89,112 @@ select * from t2 order by op, a, b; drop tables t1, t2, t3; +# Test for bug#26242 +# Verify that AFTER UPDATE/DELETE triggers are executed +# after the change has actually taken place + +CREATE TABLE t1 ( + id INT NOT NULL PRIMARY KEY, + xy INT +) ENGINE=ndbcluster; + +INSERT INTO t1 VALUES (1, 0); + +DELIMITER //; +CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id = NEW.id; END // +DELIMITER ;// + +CREATE TABLE t2 ( + id INT NOT NULL PRIMARY KEY, + xy INT +) ENGINE=ndbcluster; + +INSERT INTO t2 VALUES (2, 0); + +CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY) ENGINE=ndbcluster; + +INSERT INTO t3 VALUES (1); + +CREATE TABLE t4 LIKE t1; + +DELIMITER //; +CREATE TRIGGER t4_update AFTER UPDATE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id = NEW.id; END // +DELIMITER ;// + +CREATE TABLE t5 LIKE t2; + +UPDATE t1 SET xy = 3 WHERE id = 1; +SELECT xy FROM t1 where id = 1; +SELECT xy FROM t2 where id = 1; + +UPDATE t1 SET xy = 4 WHERE id IN (SELECT id FROM t3 WHERE id = 1); +SELECT xy FROM t1 where id = 1; +SELECT xy FROM t2 where id = 1; + +INSERT INTO t4 SELECT * FROM t1; +INSERT INTO t5 SELECT * FROM t2; +UPDATE t1,t4 SET t1.xy = 3, t4.xy = 3 WHERE t1.id = 1 AND t4.id = 1; +SELECT xy FROM t1 where id = 1; +SELECT xy FROM t2 where id = 1; +SELECT xy FROM t4 where id = 1; +SELECT xy FROM t5 where id = 1; + +UPDATE t1,t4 SET t1.xy = 4, t4.xy = 4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 1) AND t4.id IN (SELECT id FROM t3 WHERE id = 1); +SELECT xy FROM t1 where id = 1; +SELECT xy FROM t2 where id = 1; +SELECT xy FROM t4 where id = 1; +SELECT xy FROM t5 where id = 1; + +INSERT INTO t1 VALUES (1,0) ON DUPLICATE KEY UPDATE xy = 5; +SELECT xy FROM t1 where id = 1; +SELECT xy FROM t2 where id = 1; + +DROP TRIGGER t1_update; +DROP TRIGGER t4_update; + +DELIMITER //; +CREATE TRIGGER t1_delete AFTER DELETE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id > 4; END // +DELIMITER ;// + +DELIMITER //; +CREATE TRIGGER t4_delete AFTER DELETE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id > 4; END // +DELIMITER ;// + +INSERT INTO t1 VALUES (5, 0),(6,0); +INSERT INTO t2 VALUES (5, 1),(6,1); +INSERT INTO t3 VALUES (5); +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; +DELETE FROM t1 WHERE id IN (SELECT id FROM t3 WHERE id = 5); +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; + +INSERT INTO t1 VALUES (5,0); +UPDATE t2 SET xy = 1 WHERE id = 6; +TRUNCATE t4; +INSERT INTO t4 SELECT * FROM t1; +TRUNCATE t5; +INSERT INTO t5 SELECT * FROM t2; +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; +SELECT * FROM t4 order by id; +SELECT * FROM t5 order by id; +DELETE FROM t1,t4 USING t1,t3,t4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 5) AND t4.id IN (SELECT id FROM t3 WHERE id = 5); +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; +SELECT * FROM t4 order by id; +SELECT * FROM t5 order by id; + +INSERT INTO t1 VALUES (5, 0); +REPLACE INTO t2 VALUES (6,1); +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; +REPLACE INTO t1 VALUES (5, 1); +SELECT * FROM t1 order by id; +SELECT * FROM t2 order by id; + +DROP TRIGGER t1_delete; +DROP TRIGGER t4_delete; +DROP TABLE t1, t2, t3, t4, t5; + --echo End of 5.0 tests diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index d1d3484d432..9c5c10aa3dd 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -2524,8 +2524,13 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data) ERR_RETURN(op->getNdbError()); } - // Execute update operation - if (!cursor && execute_no_commit(this,trans,false) != 0) { + /* + Execute update operation if we are not doing a scan for update + and there exist UPDATE AFTER triggers + */ + + if ((!cursor || m_update_cannot_batch) && + execute_no_commit(this,trans,false) != 0) { no_uncommitted_rows_execute_failure(); DBUG_RETURN(ndb_err(trans)); } @@ -2566,7 +2571,7 @@ int ha_ndbcluster::delete_row(const byte *record) no_uncommitted_rows_update(-1); - if (!m_primary_key_update) + if (!(m_primary_key_update || m_delete_cannot_batch)) // If deleting from cursor, NoCommit will be handled in next_result DBUG_RETURN(0); } @@ -3277,6 +3282,8 @@ int ha_ndbcluster::extra(enum ha_extra_function operation) DBUG_PRINT("info", ("HA_EXTRA_RESET")); DBUG_PRINT("info", ("Clearing condition stack")); cond_clear(); + m_delete_cannot_batch= FALSE; + m_update_cannot_batch= FALSE; break; case HA_EXTRA_CACHE: /* Cash record in HA_rrnd() */ DBUG_PRINT("info", ("HA_EXTRA_CACHE")); @@ -3393,6 +3400,14 @@ int ha_ndbcluster::extra(enum ha_extra_function operation) DBUG_PRINT("info", ("Turning OFF use of write instead of insert")); m_use_write= FALSE; break; + case HA_EXTRA_DELETE_CANNOT_BATCH: + DBUG_PRINT("info", ("HA_EXTRA_DELETE_CANNOT_BATCH")); + m_delete_cannot_batch= TRUE; + break; + case HA_EXTRA_UPDATE_CANNOT_BATCH: + DBUG_PRINT("info", ("HA_EXTRA_UPDATE_CANNOT_BATCH")); + m_update_cannot_batch= TRUE; + break; } DBUG_RETURN(0); @@ -4744,6 +4759,8 @@ ha_ndbcluster::ha_ndbcluster(TABLE *table_arg): m_bulk_insert_rows((ha_rows) 1024), m_rows_changed((ha_rows) 0), m_bulk_insert_not_flushed(FALSE), + m_delete_cannot_batch(FALSE), + m_update_cannot_batch(FALSE), m_ops_pending(0), m_skip_auto_increment(TRUE), m_blobs_pending(0), diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h index 5d66a7920f9..452192d83a0 100644 --- a/sql/ha_ndbcluster.h +++ b/sql/ha_ndbcluster.h @@ -774,6 +774,8 @@ bool uses_blob_value(bool all_fields); ha_rows m_bulk_insert_rows; ha_rows m_rows_changed; bool m_bulk_insert_not_flushed; + bool m_delete_cannot_batch; + bool m_update_cannot_batch; ha_rows m_ops_pending; bool m_skip_auto_increment; bool m_blobs_pending; diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 1636b5a31e4..9d45f2ee5e4 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -811,6 +811,8 @@ bool mysql_insert(THD *thd,TABLE_LIST *table,List &fields, bool ignore); int check_that_all_fields_are_given_values(THD *thd, TABLE *entry, TABLE_LIST *table_list); +void prepare_triggers_for_insert_stmt(THD *thd, TABLE *table, + enum_duplicates duplic); void mark_fields_used_by_triggers_for_insert_stmt(THD *thd, TABLE *table, enum_duplicates duplic); bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds); diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 87a6575cc64..668a3d8786a 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -209,7 +209,19 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, thd->proc_info="updating"; if (table->triggers) + { table->triggers->mark_fields_used(thd, TRG_EVENT_DELETE); + if (table->triggers->has_triggers(TRG_EVENT_DELETE, + TRG_ACTION_AFTER)) + { + /* + The table has AFTER DELETE triggers that might access to subject table + and therefore might need delete to be done immediately. So we turn-off + the batching. + */ + (void) table->file->extra(HA_EXTRA_DELETE_CANNOT_BATCH); + } + } while (!(error=info.read_record(&info)) && !thd->killed && !thd->net.report_error) @@ -526,7 +538,19 @@ multi_delete::initialize_tables(JOIN *join) else normal_tables= 1; if (tbl->triggers) + { tbl->triggers->mark_fields_used(thd, TRG_EVENT_DELETE); + if (tbl->triggers->has_triggers(TRG_EVENT_DELETE, + TRG_ACTION_AFTER)) + { + /* + The table has AFTER DELETE triggers that might access to subject + table and therefore might need delete to be done immediately. + So we turn-off the batching. + */ + (void) tbl->file->extra(HA_EXTRA_DELETE_CANNOT_BATCH); + } + } } else if ((tab->type != JT_SYSTEM && tab->type != JT_CONST) && walk == delete_tables) diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 2ce83caa369..79e9988d8ce 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -279,6 +279,51 @@ static int check_update_fields(THD *thd, TABLE_LIST *insert_table_list, } +/* + Prepare triggers for INSERT-like statement. + + SYNOPSIS + prepare_triggers_for_insert_stmt() + thd The current thread + table Table to which insert will happen + duplic Type of duplicate handling for insert which will happen + + NOTE + Prepare triggers for INSERT-like statement by marking fields + used by triggers and inform handlers that batching of UPDATE/DELETE + cannot be done if there are BEFORE UPDATE/DELETE triggers. +*/ + +void prepare_triggers_for_insert_stmt(THD *thd, TABLE *table, + enum_duplicates duplic) +{ + if (table->triggers) + { + if (table->triggers->has_triggers(TRG_EVENT_DELETE, + TRG_ACTION_AFTER)) + { + /* + The table has AFTER DELETE triggers that might access to + subject table and therefore might need delete to be done + immediately. So we turn-off the batching. + */ + (void) table->file->extra(HA_EXTRA_DELETE_CANNOT_BATCH); + } + if (table->triggers->has_triggers(TRG_EVENT_UPDATE, + TRG_ACTION_AFTER)) + { + /* + The table has AFTER UPDATE triggers that might access to subject + table and therefore might need update to be done immediately. + So we turn-off the batching. + */ + (void) table->file->extra(HA_EXTRA_UPDATE_CANNOT_BATCH); + } + mark_fields_used_by_triggers_for_insert_stmt(thd, table, duplic); + } +} + + /* Mark fields used by triggers for INSERT-like statement. @@ -513,7 +558,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, error= 1; } - mark_fields_used_by_triggers_for_insert_stmt(thd, table, duplic); + prepare_triggers_for_insert_stmt(thd, table, duplic); if (table_list->prepare_where(thd, 0, TRUE) || table_list->prepare_check_option(thd)) @@ -2393,8 +2438,8 @@ select_insert::prepare(List &values, SELECT_LEX_UNIT *u) table_list->prepare_check_option(thd)); if (!res) - mark_fields_used_by_triggers_for_insert_stmt(thd, table, - info.handle_duplicates); + prepare_triggers_for_insert_stmt(thd, table, + info.handle_duplicates); DBUG_RETURN(res); } diff --git a/sql/sql_load.cc b/sql/sql_load.cc index bdc08b7bd2d..857fe81c773 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -222,7 +222,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, DBUG_RETURN(TRUE); } - mark_fields_used_by_triggers_for_insert_stmt(thd, table, handle_duplicates); + prepare_triggers_for_insert_stmt(thd, table, handle_duplicates); uint tot_length=0; bool use_blobs= 0, use_vars= 0; diff --git a/sql/sql_trigger.h b/sql/sql_trigger.h index 7e0fadfa677..d2e3c52eef4 100644 --- a/sql/sql_trigger.h +++ b/sql/sql_trigger.h @@ -110,6 +110,11 @@ public: const char *old_table, const char *new_db, const char *new_table); + bool has_triggers(trg_event_type event_type, + trg_action_time_type action_time) + { + return (bodies[event_type][action_time]); + } bool has_delete_triggers() { return (bodies[TRG_EVENT_DELETE][TRG_ACTION_BEFORE] || diff --git a/sql/sql_update.cc b/sql/sql_update.cc index d431b671f18..8ec4fcbbc4d 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -435,7 +435,19 @@ int mysql_update(THD *thd, MODE_STRICT_ALL_TABLES))); if (table->triggers) + { table->triggers->mark_fields_used(thd, TRG_EVENT_UPDATE); + if (table->triggers->has_triggers(TRG_EVENT_UPDATE, + TRG_ACTION_AFTER)) + { + /* + The table has AFTER UPDATE triggers that might access to subject + table and therefore might need update to be done immediately. + So we turn-off the batching. + */ + (void) table->file->extra(HA_EXTRA_UPDATE_CANNOT_BATCH); + } + } /* We can use compare_record() to optimize away updates if @@ -1000,6 +1012,20 @@ int multi_update::prepare(List ¬_used_values, table->no_keyread=1; table->used_keys.clear_all(); table->pos_in_table_list= tl; + if (table->triggers) + { + table->triggers->mark_fields_used(thd, TRG_EVENT_UPDATE); + if (table->triggers->has_triggers(TRG_EVENT_UPDATE, + TRG_ACTION_AFTER)) + { + /* + The table has AFTER UPDATE triggers that might access to subject + table and therefore might need update to be done immediately. + So we turn-off the batching. + */ + (void) table->file->extra(HA_EXTRA_UPDATE_CANNOT_BATCH); + } + } } } From 22e2ca5473531bb3af80f85959b51ae112e7b859 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Apr 2007 19:30:43 +0800 Subject: [PATCH 121/153] sync the initialization configuration information between ConfigInfo.cpp and ParamInfo.cpp --- storage/ndb/src/mgmsrv/ParamInfo.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/storage/ndb/src/mgmsrv/ParamInfo.cpp b/storage/ndb/src/mgmsrv/ParamInfo.cpp index a05472de2cb..26a759e43d2 100644 --- a/storage/ndb/src/mgmsrv/ParamInfo.cpp +++ b/storage/ndb/src/mgmsrv/ParamInfo.cpp @@ -380,10 +380,10 @@ const ParamInfo ParamInfoArray[] = { "If set to yes, then NDB Cluster data will not be swapped out to disk", CI_USED, true, - CI_BOOL, - "false", - "false", - "true" }, + CI_INT, + "0", + "1", + "2" }, { CFG_DB_WATCHDOG_INTERVAL, @@ -1114,6 +1114,18 @@ const ParamInfo ParamInfoArray[] = { "0", "0", STR_VALUE(MAX_INT_RNIL) }, + + { + CFG_DB_MEMREPORT_FREQUENCY, + "MemReportFrequency", + DB_TOKEN, + "Frequency of mem reports in seconds, 0 = only when passing %-limits", + CI_USED, + false, + CI_INT, + "0", + "0", + STR_VALUE(MAX_INT_RNIL) }, /*************************************************************************** * API From 5f74873349b0cf772db976906d091aff30b9fe12 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Apr 2007 17:36:58 +0500 Subject: [PATCH 122/153] Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte additional fix(to satisfy Win where CreateFile func does not support the path longer than 260) mysql-test/r/create.result: Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte additional fix mysql-test/t/create.test: Bug#21432 Database/Table name limited to 64 bytes, not chars, problems with multi-byte additional fix --- mysql-test/r/create.result | 30 ++++++++++++++++-------------- mysql-test/t/create.test | 29 ++++++++++++++++------------- 2 files changed, 32 insertions(+), 27 deletions(-) diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 717201f384a..39b112eb4f6 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -844,6 +844,12 @@ use имÑ_базы_в_кодировке_утф8_длиной_больше_че select database(); database() имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45 +use test; +select SCHEMA_NAME from information_schema.schemata +where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +SCHEMA_NAME +имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45 +drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 ( имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 int, @@ -854,26 +860,22 @@ select имÑ_полÑ_в_кодировке_утф8_длиной_больше_ from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; select * from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 -select SCHEMA_NAME from information_schema.schemata -where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; -SCHEMA_NAME -имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45 select TABLE_NAME from information_schema.tables where -table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +table_schema='test'; TABLE_NAME имÑ_вью_кодировке_утф8_длиной_больше_чем_42 имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 select COLUMN_NAME from information_schema.columns where -table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +table_schema='test'; COLUMN_NAME имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 select INDEX_NAME from information_schema.statistics where -table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +table_schema='test'; INDEX_NAME имÑ_индекÑа_в_кодировке_утф8_длиной_больше_чем_48 select TABLE_NAME from information_schema.views where -table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +table_schema='test'; TABLE_NAME имÑ_вью_кодировке_утф8_длиной_больше_чем_42 show create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; @@ -887,7 +889,7 @@ View Create View имÑ_вью_кодировке_утф8_длиной_больше_чем_42 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `имÑ_вью_кодировке_утф8_длиной_больше_чем_42` AS select `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48`.`имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` AS `имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45` from `имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48` create event имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48 on schedule every 2 year do select 1; select EVENT_NAME from information_schema.events -where event_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +where event_schema='test'; EVENT_NAME имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48 drop event имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48; @@ -898,7 +900,7 @@ ERROR 42000: Identifier name 'очень_очень_очень_очень_оче create trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49 before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1; select TRIGGER_NAME from information_schema.triggers where -trigger_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +trigger_schema='test'; TRIGGER_NAME имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49 drop trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49; @@ -912,7 +914,7 @@ create procedure имÑ_процедуры_в_кодировке_утф8_дли begin end; select ROUTINE_NAME from information_schema.routines where -routine_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +routine_schema='test'; ROUTINE_NAME имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50 drop procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50; @@ -924,7 +926,7 @@ create function имÑ_функции_в_кодировке_утф8_длиной returns int return 0; select ROUTINE_NAME from information_schema.routines where -routine_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +routine_schema='test'; ROUTINE_NAME имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49 drop function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49; @@ -932,6 +934,6 @@ create function очень_очень_очень_очень_очень_очен returns int return 0; ERROR 42000: Identifier name 'очень_очень_очень_очень_очень_очень_очень_очень_длинна' is too long -drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; +drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42; +drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; set names default; -use test; diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test index 83553e314a7..4fedea1cb84 100644 --- a/mysql-test/t/create.test +++ b/mysql-test/t/create.test @@ -743,6 +743,12 @@ set names utf8; create database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; use имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; select database(); +use test; + +select SCHEMA_NAME from information_schema.schemata +where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; + +drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 ( имÑ_полÑ_в_кодировке_утф8_длиной_больше_чем_45 int, @@ -756,20 +762,17 @@ from имÑ_таблицы_в_кодировке_утф8_длиной_больш # database, table, field, key, view select * from имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; -select SCHEMA_NAME from information_schema.schemata -where schema_name='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; - select TABLE_NAME from information_schema.tables where -table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +table_schema='test'; select COLUMN_NAME from information_schema.columns where -table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +table_schema='test'; select INDEX_NAME from information_schema.statistics where -table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +table_schema='test'; select TABLE_NAME from information_schema.views where -table_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +table_schema='test'; show create table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; show create view имÑ_вью_кодировке_утф8_длиной_больше_чем_42; @@ -778,7 +781,7 @@ show create view имÑ_вью_кодировке_утф8_длиной_боль create event имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48 on schedule every 2 year do select 1; select EVENT_NAME from information_schema.events -where event_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +where event_schema='test'; drop event имÑ_ÑобытиÑ_в_кодировке_утф8_длиной_больше_чем_48; --error 1059 create event @@ -788,7 +791,7 @@ on schedule every 2 year do select 1; create trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49 before insert on имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48 for each row set @a:=1; select TRIGGER_NAME from information_schema.triggers where -trigger_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +trigger_schema='test'; drop trigger имÑ_триггера_в_кодировке_утф8_длиной_больше_чем_49; --error 1059 create trigger @@ -801,7 +804,7 @@ create procedure имÑ_процедуры_в_кодировке_утф8_дли begin end; select ROUTINE_NAME from information_schema.routines where -routine_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +routine_schema='test'; drop procedure имÑ_процедуры_в_кодировке_утф8_длиной_больше_чем_50; --error 1059 create procedure очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66() @@ -812,13 +815,13 @@ create function имÑ_функции_в_кодировке_утф8_длиной returns int return 0; select ROUTINE_NAME from information_schema.routines where -routine_schema='имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45'; +routine_schema='test'; drop function имÑ_функции_в_кодировке_утф8_длиной_больше_чем_49; --error 1059 create function очень_очень_очень_очень_очень_очень_очень_очень_длиннаÑ_Ñтрока_66() returns int return 0; -drop database имÑ_базы_в_кодировке_утф8_длиной_больше_чем_45; +drop view имÑ_вью_кодировке_утф8_длиной_больше_чем_42; +drop table имÑ_таблицы_в_кодировке_утф8_длиной_больше_чем_48; set names default; -use test; From ef217b8819276c434caf13e3a4feba0cd49e4adc Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Apr 2007 14:46:09 +0200 Subject: [PATCH 123/153] set name for ndb tools --- storage/ndb/tools/delete_all.cpp | 1 + storage/ndb/tools/desc.cpp | 1 + storage/ndb/tools/drop_index.cpp | 1 + storage/ndb/tools/drop_tab.cpp | 1 + storage/ndb/tools/listTables.cpp | 1 + storage/ndb/tools/select_all.cpp | 1 + storage/ndb/tools/select_count.cpp | 1 + 7 files changed, 7 insertions(+) diff --git a/storage/ndb/tools/delete_all.cpp b/storage/ndb/tools/delete_all.cpp index c925e22d3ec..4e3037f1941 100644 --- a/storage/ndb/tools/delete_all.cpp +++ b/storage/ndb/tools/delete_all.cpp @@ -75,6 +75,7 @@ int main(int argc, char** argv){ return NDBT_ProgramExit(NDBT_WRONGARGS); Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_delete_all"); if(con.connect(12, 5, 1) != 0) { ndbout << "Unable to connect to management server." << endl; diff --git a/storage/ndb/tools/desc.cpp b/storage/ndb/tools/desc.cpp index 4d9d6dff72a..9eb0cf67ceb 100644 --- a/storage/ndb/tools/desc.cpp +++ b/storage/ndb/tools/desc.cpp @@ -81,6 +81,7 @@ int main(int argc, char** argv){ return NDBT_ProgramExit(NDBT_WRONGARGS); Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_desc"); if(con.connect(12, 5, 1) != 0) { ndbout << "Unable to connect to management server." << endl; diff --git a/storage/ndb/tools/drop_index.cpp b/storage/ndb/tools/drop_index.cpp index 23ebfff6cf4..256c40e1924 100644 --- a/storage/ndb/tools/drop_index.cpp +++ b/storage/ndb/tools/drop_index.cpp @@ -61,6 +61,7 @@ int main(int argc, char** argv){ } Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_drop_index"); if(con.connect(12, 5, 1) != 0) { return NDBT_ProgramExit(NDBT_FAILED); diff --git a/storage/ndb/tools/drop_tab.cpp b/storage/ndb/tools/drop_tab.cpp index d965be29f31..a7accb904a4 100644 --- a/storage/ndb/tools/drop_tab.cpp +++ b/storage/ndb/tools/drop_tab.cpp @@ -61,6 +61,7 @@ int main(int argc, char** argv){ } Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_drop_table"); if(con.connect(12, 5, 1) != 0) { ndbout << "Unable to connect to management server." << endl; diff --git a/storage/ndb/tools/listTables.cpp b/storage/ndb/tools/listTables.cpp index 359e308dcb8..6a73bcc54f5 100644 --- a/storage/ndb/tools/listTables.cpp +++ b/storage/ndb/tools/listTables.cpp @@ -307,6 +307,7 @@ int main(int argc, char** argv){ _tabname = argv[0]; ndb_cluster_connection = new Ndb_cluster_connection(opt_connect_str); + ndb_cluster_connection->set_name("ndb_show_tables"); if (ndb_cluster_connection->connect(12,5,1)) fatal("Unable to connect to management server."); if (ndb_cluster_connection->wait_until_ready(30,0) < 0) diff --git a/storage/ndb/tools/select_all.cpp b/storage/ndb/tools/select_all.cpp index 9adde165003..e2072f30edf 100644 --- a/storage/ndb/tools/select_all.cpp +++ b/storage/ndb/tools/select_all.cpp @@ -129,6 +129,7 @@ int main(int argc, char** argv){ } Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_select_all"); if(con.connect(12, 5, 1) != 0) { ndbout << "Unable to connect to management server." << endl; diff --git a/storage/ndb/tools/select_count.cpp b/storage/ndb/tools/select_count.cpp index 8933d803f53..552d156b665 100644 --- a/storage/ndb/tools/select_count.cpp +++ b/storage/ndb/tools/select_count.cpp @@ -83,6 +83,7 @@ int main(int argc, char** argv){ } Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_select_count"); if(con.connect(12, 5, 1) != 0) { ndbout << "Unable to connect to management server." << endl; From 59a64c2b1604649be464d38141e2345c79d27bd3 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Apr 2007 16:58:25 +0200 Subject: [PATCH 124/153] Merge from 5.0 mysql-test/r/ndb_trigger.result: Re-generated sql/mysql_priv.h: Merge sql/sql_insert.cc: Merge sql/sql_load.cc: Merge sql/sql_update.cc: Merge --- mysql-test/r/ndb_trigger.result | 171 ++++++++++++++++++++++++++++++++ sql/mysql_priv.h | 3 +- sql/sql_insert.cc | 15 ++- sql/sql_load.cc | 2 +- sql/sql_update.cc | 21 ++-- 5 files changed, 188 insertions(+), 24 deletions(-) diff --git a/mysql-test/r/ndb_trigger.result b/mysql-test/r/ndb_trigger.result index 2aeca5db2d3..28f9f9bdc37 100644 --- a/mysql-test/r/ndb_trigger.result +++ b/mysql-test/r/ndb_trigger.result @@ -141,4 +141,175 @@ a b drop trigger t4_au; drop trigger t4_ad; drop table t1, t2, t3, t4, t5; +CREATE TABLE t1 ( +id INT NOT NULL PRIMARY KEY, +xy INT +) ENGINE=ndbcluster; +INSERT INTO t1 VALUES (1, 0); +CREATE TRIGGER t1_update AFTER UPDATE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id = NEW.id; END // +CREATE TABLE t2 ( +id INT NOT NULL PRIMARY KEY, +xy INT +) ENGINE=ndbcluster; +INSERT INTO t2 VALUES (2, 0); +CREATE TABLE t3 (id INT NOT NULL PRIMARY KEY) ENGINE=ndbcluster; +INSERT INTO t3 VALUES (1); +CREATE TABLE t4 LIKE t1; +CREATE TRIGGER t4_update AFTER UPDATE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id = NEW.id; END // +CREATE TABLE t5 LIKE t2; +UPDATE t1 SET xy = 3 WHERE id = 1; +SELECT xy FROM t1 where id = 1; +xy +3 +SELECT xy FROM t2 where id = 1; +xy +3 +UPDATE t1 SET xy = 4 WHERE id IN (SELECT id FROM t3 WHERE id = 1); +SELECT xy FROM t1 where id = 1; +xy +4 +SELECT xy FROM t2 where id = 1; +xy +4 +INSERT INTO t4 SELECT * FROM t1; +INSERT INTO t5 SELECT * FROM t2; +UPDATE t1,t4 SET t1.xy = 3, t4.xy = 3 WHERE t1.id = 1 AND t4.id = 1; +SELECT xy FROM t1 where id = 1; +xy +3 +SELECT xy FROM t2 where id = 1; +xy +3 +SELECT xy FROM t4 where id = 1; +xy +3 +SELECT xy FROM t5 where id = 1; +xy +3 +UPDATE t1,t4 SET t1.xy = 4, t4.xy = 4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 1) AND t4.id IN (SELECT id FROM t3 WHERE id = 1); +SELECT xy FROM t1 where id = 1; +xy +4 +SELECT xy FROM t2 where id = 1; +xy +4 +SELECT xy FROM t4 where id = 1; +xy +4 +SELECT xy FROM t5 where id = 1; +xy +4 +INSERT INTO t1 VALUES (1,0) ON DUPLICATE KEY UPDATE xy = 5; +SELECT xy FROM t1 where id = 1; +xy +5 +SELECT xy FROM t2 where id = 1; +xy +5 +DROP TRIGGER t1_update; +DROP TRIGGER t4_update; +CREATE TRIGGER t1_delete AFTER DELETE ON t1 FOR EACH ROW BEGIN REPLACE INTO t2 SELECT * FROM t1 WHERE t1.id > 4; END // +CREATE TRIGGER t4_delete AFTER DELETE ON t4 FOR EACH ROW BEGIN REPLACE INTO t5 SELECT * FROM t4 WHERE t4.id > 4; END // +INSERT INTO t1 VALUES (5, 0),(6,0); +INSERT INTO t2 VALUES (5, 1),(6,1); +INSERT INTO t3 VALUES (5); +SELECT * FROM t1 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +DELETE FROM t1 WHERE id IN (SELECT id FROM t3 WHERE id = 5); +SELECT * FROM t1 order by id; +id xy +1 5 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +INSERT INTO t1 VALUES (5,0); +UPDATE t2 SET xy = 1 WHERE id = 6; +TRUNCATE t4; +INSERT INTO t4 SELECT * FROM t1; +TRUNCATE t5; +INSERT INTO t5 SELECT * FROM t2; +SELECT * FROM t1 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +SELECT * FROM t4 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t5 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +DELETE FROM t1,t4 USING t1,t3,t4 WHERE t1.id IN (SELECT id FROM t3 WHERE id = 5) AND t4.id IN (SELECT id FROM t3 WHERE id = 5); +SELECT * FROM t1 order by id; +id xy +1 5 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +SELECT * FROM t4 order by id; +id xy +1 5 +6 0 +SELECT * FROM t5 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +INSERT INTO t1 VALUES (5, 0); +REPLACE INTO t2 VALUES (6,1); +SELECT * FROM t1 order by id; +id xy +1 5 +5 0 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 1 +REPLACE INTO t1 VALUES (5, 1); +SELECT * FROM t1 order by id; +id xy +1 5 +5 1 +6 0 +SELECT * FROM t2 order by id; +id xy +1 5 +2 0 +5 1 +6 0 +DROP TRIGGER t1_delete; +DROP TRIGGER t4_delete; +DROP TABLE t1, t2, t3, t4, t5; End of 5.1 tests diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index b3a7afd449a..9839ee4b6b7 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -974,8 +974,7 @@ bool mysql_insert(THD *thd,TABLE_LIST *table,List &fields, bool ignore); int check_that_all_fields_are_given_values(THD *thd, TABLE *entry, TABLE_LIST *table_list); -void prepare_triggers_for_insert_stmt(THD *thd, TABLE *table, - enum_duplicates duplic); +void prepare_triggers_for_insert_stmt(TABLE *table); bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds); bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, SQL_LIST *order, ha_rows rows, ulonglong options, diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index af239c1f62b..d7432318adc 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -340,14 +340,12 @@ static int check_update_fields(THD *thd, TABLE_LIST *insert_table_list, return 0; } - +/* Prepare triggers for INSERT-like statement. SYNOPSIS prepare_triggers_for_insert_stmt() - thd The current thread table Table to which insert will happen - duplic Type of duplicate handling for insert which will happen NOTE Prepare triggers for INSERT-like statement by marking fields @@ -355,8 +353,7 @@ static int check_update_fields(THD *thd, TABLE_LIST *insert_table_list, cannot be done if there are BEFORE UPDATE/DELETE triggers. */ -void prepare_triggers_for_insert_stmt(THD *thd, TABLE *table, - enum_duplicates duplic) +void prepare_triggers_for_insert_stmt(TABLE *table) { if (table->triggers) { @@ -380,12 +377,11 @@ void prepare_triggers_for_insert_stmt(THD *thd, TABLE *table, */ (void) table->file->extra(HA_EXTRA_UPDATE_CANNOT_BATCH); } - mark_fields_used_by_triggers_for_insert_stmt(thd, table, duplic); } + table->mark_columns_needed_for_insert(); } -/* bool mysql_insert(THD *thd,TABLE_LIST *table_list, List &fields, List &values_list, @@ -584,7 +580,8 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list, error= 1; } - table->mark_columns_needed_for_insert(); + prepare_triggers_for_insert_stmt(table); + if (table_list->prepare_where(thd, 0, TRUE) || table_list->prepare_check_option(thd)) @@ -2602,7 +2599,7 @@ select_insert::prepare(List &values, SELECT_LEX_UNIT *u) table_list->prepare_check_option(thd)); if (!res) - table->mark_columns_needed_for_insert(); + prepare_triggers_for_insert_stmt(table); DBUG_RETURN(res); } diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 364fda2c94b..01b64b29280 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -226,7 +226,7 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list, DBUG_RETURN(TRUE); } - table->mark_columns_needed_for_insert(); + prepare_triggers_for_insert_stmt(table); uint tot_length=0; bool use_blobs= 0, use_vars= 0; diff --git a/sql/sql_update.cc b/sql/sql_update.cc index 7c25f21c14d..72883da4ba9 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -1129,19 +1129,16 @@ int multi_update::prepare(List ¬_used_values, table->no_keyread=1; table->used_keys.clear_all(); table->pos_in_table_list= tl; - if (table->triggers) + if (table->triggers && + table->triggers->has_triggers(TRG_EVENT_UPDATE, + TRG_ACTION_AFTER)) { - table->triggers->mark_fields_used(thd, TRG_EVENT_UPDATE); - if (table->triggers->has_triggers(TRG_EVENT_UPDATE, - TRG_ACTION_AFTER)) - { - /* - The table has AFTER UPDATE triggers that might access to subject - table and therefore might need update to be done immediately. - So we turn-off the batching. - */ - (void) table->file->extra(HA_EXTRA_UPDATE_CANNOT_BATCH); - } + /* + The table has AFTER UPDATE triggers that might access to subject + table and therefore might need update to be done immediately. + So we turn-off the batching. + */ + (void) table->file->extra(HA_EXTRA_UPDATE_CANNOT_BATCH); } } } From 821355da3cc8c883bd95e2f01e7011a4ad33a23c Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Apr 2007 21:40:47 +0200 Subject: [PATCH 125/153] Bug #27638: slow logging to CSV table inserts bad query_time and lock_time values When MySQL logged slow query information to a CSV table, it stored the query_time and lock_time values with an incorrect formula. If the time was over 59 seconds, this caused incorrect statistics (either the slow query was not logged, or the time was far from correct). This change fixes the method used to store those TIME values in the slow_log table. mysql-test/r/log_tables-big.result: BitKeeper file /benchmarks/ext3/TOSAVE/tsmith/bk/maint/51/mysql-test/r/log_tables-big.result mysql-test/t/log_tables-big-master.opt: BitKeeper file /benchmarks/ext3/TOSAVE/tsmith/bk/maint/51/mysql-test/t/log_tables-big-master.opt mysql-test/t/log_tables-big.test: BitKeeper file /benchmarks/ext3/TOSAVE/tsmith/bk/maint/51/mysql-test/t/log_tables-big.test sql/time.cc: initialize all TIME fields (except neg, which may store a needed value) in calc_time_from_sec() sql/log.cc: Log_to_csv_event_handler::log_slow(): call store_time() instead of store() for query_time and lock_time include/my_time.h: Add TIME_MAX_VALUE_SECONDS definition --- include/my_time.h | 2 ++ mysql-test/r/log_tables-big.result | 29 +++++++++++++++++++++ mysql-test/t/log_tables-big-master.opt | 1 + mysql-test/t/log_tables-big.test | 35 ++++++++++++++++++++++++++ sql/log.cc | 14 +++++++++-- sql/time.cc | 5 ++++ 6 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 mysql-test/r/log_tables-big.result create mode 100644 mysql-test/t/log_tables-big-master.opt create mode 100644 mysql-test/t/log_tables-big.test diff --git a/include/my_time.h b/include/my_time.h index d96c5822069..6aa25487cf1 100644 --- a/include/my_time.h +++ b/include/my_time.h @@ -72,6 +72,8 @@ typedef long my_time_t; #define TIME_MAX_SECOND 59 #define TIME_MAX_VALUE (TIME_MAX_HOUR*10000 + TIME_MAX_MINUTE*100 + \ TIME_MAX_SECOND) +#define TIME_MAX_VALUE_SECONDS (TIME_MAX_HOUR * 3600L + \ + TIME_MAX_MINUTE * 60L + TIME_MAX_SECOND) my_bool check_date(const MYSQL_TIME *ltime, my_bool not_zero_date, ulong flags, int *was_cut); diff --git a/mysql-test/r/log_tables-big.result b/mysql-test/r/log_tables-big.result new file mode 100644 index 00000000000..9b81127c825 --- /dev/null +++ b/mysql-test/r/log_tables-big.result @@ -0,0 +1,29 @@ +set session long_query_time=10; +select get_lock('bug27638', 1); +get_lock('bug27638', 1) +1 +set session long_query_time=1; +truncate table mysql.slow_log; +select get_lock('bug27638', 2); +get_lock('bug27638', 2) +0 +select if (query_time between '00:00:01' and '00:00:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log; +qt sql_text +OK select get_lock('bug27638', 2) +truncate table mysql.slow_log; +select get_lock('bug27638', 60); +get_lock('bug27638', 60) +0 +select if (query_time between '00:00:59' and '00:01:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log; +qt sql_text +OK select get_lock('bug27638', 60) +truncate table mysql.slow_log; +select get_lock('bug27638', 101); +get_lock('bug27638', 101) +0 +select if (query_time between '00:01:40' and '00:01:50', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log; +qt sql_text +OK select get_lock('bug27638', 101) +select release_lock('bug27638'); +release_lock('bug27638') +1 diff --git a/mysql-test/t/log_tables-big-master.opt b/mysql-test/t/log_tables-big-master.opt new file mode 100644 index 00000000000..35ff7911705 --- /dev/null +++ b/mysql-test/t/log_tables-big-master.opt @@ -0,0 +1 @@ +--log-slow-queries diff --git a/mysql-test/t/log_tables-big.test b/mysql-test/t/log_tables-big.test new file mode 100644 index 00000000000..8c956fa6f55 --- /dev/null +++ b/mysql-test/t/log_tables-big.test @@ -0,0 +1,35 @@ +# this test needs multithreaded mysqltest +-- source include/not_embedded.inc + +# Test sleeps for long times +--source include/big_test.inc + +# check that CSV engine was compiled in +--source include/have_csv.inc + +connect (con1,localhost,root,,); +connect (con2,localhost,root,,); + +# +# Bug #27638: slow logging to CSV table inserts bad query_time and lock_time values +# +connection con1; +set session long_query_time=10; +select get_lock('bug27638', 1); +connection con2; +set session long_query_time=1; +truncate table mysql.slow_log; +select get_lock('bug27638', 2); +select if (query_time between '00:00:01' and '00:00:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log; +truncate table mysql.slow_log; +select get_lock('bug27638', 60); +select if (query_time between '00:00:59' and '00:01:10', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log; +truncate table mysql.slow_log; +select get_lock('bug27638', 101); +select if (query_time between '00:01:40' and '00:01:50', 'OK', 'WRONG') as qt, sql_text from mysql.slow_log; +connection con1; +select release_lock('bug27638'); +connection default; + +disconnect con1; +disconnect con2; diff --git a/sql/log.cc b/sql/log.cc index 57f16a1e11e..3cfcabd8363 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -569,11 +569,21 @@ bool Log_to_csv_event_handler:: if (query_start_arg) { + /* + A TIME field can not hold the full longlong range; query_time or + lock_time may be truncated without warning here, if greater than + 839 hours (~35 days) + */ + TIME t; + t.neg= 0; + /* fill in query_time field */ - if (table->field[2]->store(query_time, TRUE)) + calc_time_from_sec(&t, (long) min(query_time, (longlong) TIME_MAX_VALUE_SECONDS), 0); + if (table->field[2]->store_time(&t, MYSQL_TIMESTAMP_TIME)) goto err; /* lock_time */ - if (table->field[3]->store(lock_time, TRUE)) + calc_time_from_sec(&t, (long) min(lock_time, (longlong) TIME_MAX_VALUE_SECONDS), 0); + if (table->field[3]->store_time(&t, MYSQL_TIMESTAMP_TIME)) goto err; /* rows_sent */ if (table->field[4]->store((longlong) thd->sent_row_count, TRUE)) diff --git a/sql/time.cc b/sql/time.cc index 4854206b1c8..ef2c87673d5 100644 --- a/sql/time.cc +++ b/sql/time.cc @@ -313,6 +313,11 @@ void localtime_to_TIME(TIME *to, struct tm *from) void calc_time_from_sec(TIME *to, long seconds, long microseconds) { long t_seconds; + // to->neg is not cleared, it may already be set to a useful value + to->time_type= MYSQL_TIMESTAMP_TIME; + to->year= 0; + to->month= 0; + to->day= 0; to->hour= seconds/3600L; t_seconds= seconds%3600L; to->minute= t_seconds/60L; From a0c4e184f80de8db3b9d1340715502454ee09ef6 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 00:04:44 +0400 Subject: [PATCH 126/153] Fix a failure of this test case on HP-UX. mysql-test/r/information_schema.result: Fix a race in the test case (second attempt). mysql-test/t/information_schema.test: Fix a race in the test case (second attempt). --- mysql-test/r/information_schema.result | 32 +++++++++++--------- mysql-test/t/information_schema.test | 42 +++++++++++++++----------- 2 files changed, 41 insertions(+), 33 deletions(-) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index ac280f301d8..3453a486da9 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1409,31 +1409,33 @@ user db user3148 test drop user user3148@localhost; DROP TABLE IF EXISTS thread_status; -CREATE TABLE thread_status (variable_name VARCHAR(64), -variable_value DECIMAL(22,7)); -CREATE TABLE server_status (variable_name VARCHAR(64), -variable_value DECIMAL(22,7)); -DROP EVENT IF EXISTS log_status; -CREATE EVENT log_status +DROP TABLE IF EXISTS server_status; +DROP EVENT IF EXISTS event_status; +SET GLOBAL event_scheduler=1; +CREATE EVENT event_status ON SCHEDULE AT NOW() -ON COMPLETION PRESERVE +ON COMPLETION NOT PRESERVE DO BEGIN -INSERT INTO thread_status SELECT variable_name, variable_value FROM -information_schema.session_status; -INSERT INTO server_status SELECT variable_name, variable_value FROM -information_schema.global_status; +CREATE TABLE thread_status +SELECT variable_name, variable_value +FROM information_schema.session_status +WHERE variable_name LIKE 'SSL_ACCEPTS' OR +variable_name LIKE 'SSL_CALLBACK_CACHE_HITS'; +CREATE TABLE server_status +SELECT variable_name +FROM information_schema.global_status +WHERE variable_name LIKE 'ABORTED_CONNECTS' OR +variable_name LIKE 'BINLOG_CACHE_DISK_USE'; END$$ -SET GLOBAL event_scheduler=1; -SELECT * FROM thread_status WHERE variable_name LIKE 'SSL%' LIMIT 1,2; +SELECT variable_name, variable_value FROM thread_status; variable_name variable_value SSL_ACCEPTS 0.0000000 SSL_CALLBACK_CACHE_HITS 0.0000000 -SELECT variable_name FROM server_status LIMIT 1,2; +SELECT variable_name FROM server_status; variable_name ABORTED_CONNECTS BINLOG_CACHE_DISK_USE -DROP EVENT log_status; DROP TABLE thread_status; DROP TABLE server_status; SET GLOBAL event_scheduler=0; diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index 96a11b3061e..ae330f47bc5 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1049,36 +1049,42 @@ drop user user3148@localhost; # --disable_warnings DROP TABLE IF EXISTS thread_status; -CREATE TABLE thread_status (variable_name VARCHAR(64), -variable_value DECIMAL(22,7)); -CREATE TABLE server_status (variable_name VARCHAR(64), -variable_value DECIMAL(22,7)); -DROP EVENT IF EXISTS log_status; +DROP TABLE IF EXISTS server_status; +DROP EVENT IF EXISTS event_status; + --enable_warnings +SET GLOBAL event_scheduler=1; + DELIMITER $$; -CREATE EVENT log_status +CREATE EVENT event_status ON SCHEDULE AT NOW() - ON COMPLETION PRESERVE + ON COMPLETION NOT PRESERVE DO - BEGIN - INSERT INTO thread_status SELECT variable_name, variable_value FROM -information_schema.session_status; - INSERT INTO server_status SELECT variable_name, variable_value FROM -information_schema.global_status; - END$$ +BEGIN + CREATE TABLE thread_status + SELECT variable_name, variable_value + FROM information_schema.session_status + WHERE variable_name LIKE 'SSL_ACCEPTS' OR + variable_name LIKE 'SSL_CALLBACK_CACHE_HITS'; + + CREATE TABLE server_status + SELECT variable_name + FROM information_schema.global_status + WHERE variable_name LIKE 'ABORTED_CONNECTS' OR + variable_name LIKE 'BINLOG_CACHE_DISK_USE'; +END$$ DELIMITER ;$$ -SET GLOBAL event_scheduler=1; -let $wait_condition=select count(variable_name) != 0 from server_status; +let $wait_condition=select count(*) = 0 from information_schema.events where event_name='event_status'; let $wait_timeout=30; --source include/wait_condition.inc -SELECT * FROM thread_status WHERE variable_name LIKE 'SSL%' LIMIT 1,2; -SELECT variable_name FROM server_status LIMIT 1,2; -DROP EVENT log_status; +SELECT variable_name, variable_value FROM thread_status; +SELECT variable_name FROM server_status; + DROP TABLE thread_status; DROP TABLE server_status; SET GLOBAL event_scheduler=0; From 6575e2d296120973db8c8132a7396d054eec24d9 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 4 Apr 2007 21:35:58 +0000 Subject: [PATCH 127/153] fix test for bug#25721 did not run properly on a fast Windows machine --- mysql-test/r/federated_server.result | 4 +++- mysql-test/t/federated_server.test | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mysql-test/r/federated_server.result b/mysql-test/r/federated_server.result index a3e7cd793a6..0905aabb075 100644 --- a/mysql-test/r/federated_server.result +++ b/mysql-test/r/federated_server.result @@ -259,8 +259,10 @@ create procedure p1 () begin DECLARE v INT DEFAULT 0; DECLARE e INT DEFAULT 0; +DECLARE i INT; DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET e = e + 1; -WHILE v < 10000 do +SET i = sleep(5); +WHILE v < 20000 do CREATE SERVER s FOREIGN DATA WRAPPER mysql OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test'); diff --git a/mysql-test/t/federated_server.test b/mysql-test/t/federated_server.test index b2075b8e262..20332f65bff 100644 --- a/mysql-test/t/federated_server.test +++ b/mysql-test/t/federated_server.test @@ -296,8 +296,10 @@ create procedure p1 () begin DECLARE v INT DEFAULT 0; DECLARE e INT DEFAULT 0; + DECLARE i INT; DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET e = e + 1; - WHILE v < 10000 do + SET i = sleep(5); + WHILE v < 20000 do CREATE SERVER s FOREIGN DATA WRAPPER mysql OPTIONS (USER 'Remote', HOST '192.168.1.106', DATABASE 'test'); From 4c0f3c50f80d325563380f83a6a6e620d71a359b Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 06:49:43 +0200 Subject: [PATCH 128/153] Fixed compilation error on Windows --- sql/sql_trigger.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/sql_trigger.h b/sql/sql_trigger.h index d2e3c52eef4..5f22a7c9757 100644 --- a/sql/sql_trigger.h +++ b/sql/sql_trigger.h @@ -113,7 +113,7 @@ public: bool has_triggers(trg_event_type event_type, trg_action_time_type action_time) { - return (bodies[event_type][action_time]); + return (bodies[event_type][action_time] != NULL); } bool has_delete_triggers() { From cfe2d1da886ea48c445076a3509b76ea1242e54d Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 07:28:09 +0200 Subject: [PATCH 129/153] Removed compiler warnings --- sql/ha_ndbcluster.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 9c5c10aa3dd..2fb245d6d96 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -3408,6 +3408,8 @@ int ha_ndbcluster::extra(enum ha_extra_function operation) DBUG_PRINT("info", ("HA_EXTRA_UPDATE_CANNOT_BATCH")); m_update_cannot_batch= TRUE; break; + default: + break; } DBUG_RETURN(0); From c66a15285f0d8dabc555fc9fd7bac1022a583d91 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 09:10:22 +0200 Subject: [PATCH 130/153] Add extra INSERT to make usre sync_slave_with_master has job to do mysql-test/r/rpl_ssl.result: Add an extra INSERT to make sure that the "sync_slave_with_master" has someghing to do and thus have to wait for the slave IO thread to start. mysql-test/t/rpl_ssl.test: Add an extra INSERT to make sure that the "sync_slave_with_master" has someghing to do and thus have to wait for the slave IO thread to start. --- mysql-test/r/rpl_ssl.result | 1 + mysql-test/t/rpl_ssl.test | 3 +++ 2 files changed, 4 insertions(+) diff --git a/mysql-test/r/rpl_ssl.result b/mysql-test/r/rpl_ssl.result index 50e2db35165..908f0020188 100644 --- a/mysql-test/r/rpl_ssl.result +++ b/mysql-test/r/rpl_ssl.result @@ -58,6 +58,7 @@ STOP SLAVE; select * from t1; t 1 +insert into t1 values (NULL); show slave status; Slave_IO_State # Master_Host 127.0.0.1 diff --git a/mysql-test/t/rpl_ssl.test b/mysql-test/t/rpl_ssl.test index 5b5f12c91df..dd03d5533b0 100644 --- a/mysql-test/t/rpl_ssl.test +++ b/mysql-test/t/rpl_ssl.test @@ -54,6 +54,9 @@ while ($i) start slave; enable_query_log; connection master; +# INSERT one more record to make sure +# the sync has something to do +insert into t1 values (NULL); sync_slave_with_master; --replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR $MASTER_MYPORT MASTER_MYPORT --replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 # From e8a0ac29a766a848ffa39e6bf1500200241785a1 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 09:12:30 +0200 Subject: [PATCH 131/153] Bug#27644 ndb: connecting api node/mysqld may "steal" node_id from running mysqld - test case workaround to avoid random failures --- mysql-test/t/ndb_autodiscover3.test | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/mysql-test/t/ndb_autodiscover3.test b/mysql-test/t/ndb_autodiscover3.test index 73b4bf8b94f..259da6e3501 100644 --- a/mysql-test/t/ndb_autodiscover3.test +++ b/mysql-test/t/ndb_autodiscover3.test @@ -1,5 +1,6 @@ -- source include/have_ndb.inc -- source include/have_multi_ndb.inc +-- source include/ndb_default_cluster.inc -- source include/not_embedded.inc @@ -7,6 +8,11 @@ drop table if exists t1, t2; --enable_warnings +# Workaround for Bug#27644 +# ndb: connecting api node/mysqld may "steal" node_id from running mysqld +# - let ndb_waiter use a fixed node id so "steal" cannot happen +--let connect_str = "nodeid=6;$NDB_CONNECTSTRING" + # # Transaction ongoing while cluster is restarted # @@ -17,7 +23,7 @@ begin; insert into t1 values (1); --exec $NDB_MGM --no-defaults -e "all restart" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT --error 1297 insert into t1 values (2); @@ -35,7 +41,7 @@ insert into t2 values (1,1),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10, select * from t2 order by a limit 3; --exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT --connection server2 create table t2 (a int key) engine=ndbcluster; @@ -49,7 +55,7 @@ select * from t2 order by a limit 3; select * from t2 order by a limit 3; --exec $NDB_MGM --no-defaults -e "all restart -i" >> $NDB_TOOLS_OUTPUT ---exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults >> $NDB_TOOLS_OUTPUT +--exec $NDB_TOOLS_DIR/ndb_waiter --no-defaults -c $connect_str >> $NDB_TOOLS_OUTPUT --connection server1 show tables; From a3d8d943b96f53e10682094a7ccb90392bd5e8b8 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 09:16:16 +0200 Subject: [PATCH 132/153] set name for ndb tools --- ndb/tools/delete_all.cpp | 1 + ndb/tools/desc.cpp | 1 + ndb/tools/drop_index.cpp | 1 + ndb/tools/drop_tab.cpp | 1 + ndb/tools/listTables.cpp | 1 + ndb/tools/select_all.cpp | 1 + ndb/tools/select_count.cpp | 1 + 7 files changed, 7 insertions(+) diff --git a/ndb/tools/delete_all.cpp b/ndb/tools/delete_all.cpp index ae380560e35..9b6a8cf94c6 100644 --- a/ndb/tools/delete_all.cpp +++ b/ndb/tools/delete_all.cpp @@ -67,6 +67,7 @@ int main(int argc, char** argv){ return NDBT_ProgramExit(NDBT_WRONGARGS); Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_delete_all"); if(con.connect(12, 5, 1) != 0) { ndbout << "Unable to connect to management server." << endl; diff --git a/ndb/tools/desc.cpp b/ndb/tools/desc.cpp index c2f3ea8b615..83258515796 100644 --- a/ndb/tools/desc.cpp +++ b/ndb/tools/desc.cpp @@ -69,6 +69,7 @@ int main(int argc, char** argv){ return NDBT_ProgramExit(NDBT_WRONGARGS); Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_desc"); if(con.connect(12, 5, 1) != 0) { ndbout << "Unable to connect to management server." << endl; diff --git a/ndb/tools/drop_index.cpp b/ndb/tools/drop_index.cpp index 23ebfff6cf4..256c40e1924 100644 --- a/ndb/tools/drop_index.cpp +++ b/ndb/tools/drop_index.cpp @@ -61,6 +61,7 @@ int main(int argc, char** argv){ } Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_drop_index"); if(con.connect(12, 5, 1) != 0) { return NDBT_ProgramExit(NDBT_FAILED); diff --git a/ndb/tools/drop_tab.cpp b/ndb/tools/drop_tab.cpp index d965be29f31..a7accb904a4 100644 --- a/ndb/tools/drop_tab.cpp +++ b/ndb/tools/drop_tab.cpp @@ -61,6 +61,7 @@ int main(int argc, char** argv){ } Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_drop_table"); if(con.connect(12, 5, 1) != 0) { ndbout << "Unable to connect to management server." << endl; diff --git a/ndb/tools/listTables.cpp b/ndb/tools/listTables.cpp index db88f9bc25c..009789824e8 100644 --- a/ndb/tools/listTables.cpp +++ b/ndb/tools/listTables.cpp @@ -219,6 +219,7 @@ int main(int argc, char** argv){ _tabname = argv[0]; ndb_cluster_connection = new Ndb_cluster_connection(opt_connect_str); + ndb_cluster_connection->set_name("ndb_show_tables"); if (ndb_cluster_connection->connect(12,5,1)) fatal("Unable to connect to management server."); if (ndb_cluster_connection->wait_until_ready(30,0) < 0) diff --git a/ndb/tools/select_all.cpp b/ndb/tools/select_all.cpp index 69bd5b0f917..27d96a9c6ed 100644 --- a/ndb/tools/select_all.cpp +++ b/ndb/tools/select_all.cpp @@ -108,6 +108,7 @@ int main(int argc, char** argv){ } Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_select_all"); if(con.connect(12, 5, 1) != 0) { ndbout << "Unable to connect to management server." << endl; diff --git a/ndb/tools/select_count.cpp b/ndb/tools/select_count.cpp index 8933d803f53..552d156b665 100644 --- a/ndb/tools/select_count.cpp +++ b/ndb/tools/select_count.cpp @@ -83,6 +83,7 @@ int main(int argc, char** argv){ } Ndb_cluster_connection con(opt_connect_str); + con.set_name("ndb_select_count"); if(con.connect(12, 5, 1) != 0) { ndbout << "Unable to connect to management server." << endl; From a127d582591c0a8e238e9c6f3fd813c48cc11477 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 13:25:39 +0500 Subject: [PATCH 133/153] aftermerging fix sql/partition_info.cc: here we have to check for zero return from file->get_default_no_partitions --- sql/partition_info.cc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 6444d54ea5d..3e0257f5b1d 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -187,8 +187,14 @@ bool partition_info::set_up_default_partitions(handler *file, my_error(ER_PARTITIONS_MUST_BE_DEFINED_ERROR, MYF(0), error_string); goto end; } - if (no_parts == 0) - no_parts= file->get_default_no_partitions(info); + + if ((no_parts == 0) && + ((no_parts= file->get_default_no_partitions(info)) == 0)) + { + my_error(ER_PARTITION_NOT_DEFINED_ERROR, MYF(0), "partitions"); + goto end; + } + if (unlikely(no_parts > MAX_PARTITIONS)) { my_error(ER_TOO_MANY_PARTITIONS_ERROR, MYF(0)); From 483ce953948f92f1a62af719bbb2f23655648288 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 12:01:01 +0200 Subject: [PATCH 134/153] ndb: change attribute id for ANY_VALUE as id was already reserved for upcoming read pached patch --- storage/ndb/include/kernel/AttributeHeader.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/storage/ndb/include/kernel/AttributeHeader.hpp b/storage/ndb/include/kernel/AttributeHeader.hpp index 2d013b31156..8ee1e33d851 100644 --- a/storage/ndb/include/kernel/AttributeHeader.hpp +++ b/storage/ndb/include/kernel/AttributeHeader.hpp @@ -45,7 +45,8 @@ public: STATIC_CONST( ROWID = 0xFFF6 ); STATIC_CONST( ROW_GCI = 0xFFF5 ); STATIC_CONST( FRAGMENT_VARSIZED_MEMORY = 0xFFF4 ); - STATIC_CONST( ANY_VALUE = 0xFFF3 ); + // 0xFFF3 to be used for read packed when merged + STATIC_CONST( ANY_VALUE = 0xFFF2 ); // NOTE: in 5.1 ctors and init take size in bytes From fa1d637e896d71932adcd1451c1564f724590189 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 15:24:34 +0400 Subject: [PATCH 135/153] A set of changes aiming to make the Event Scheduler more user-friendly when there are no up-to-date system tables to support it: - initialize the scheduler before reporting "Ready for connections". This ensures that warnings, if any, are printed before "Ready for connections", and this message is not mangled. - do not abort the scheduler if there are no system tables - check the tables once at start up, remember the status and disable the scheduler if the tables are not up to date. If one attempts to use the scheduler with bad tables, issue an error message. - clean up the behaviour of the module under LOCK TABLES and pre-locking mode - make sure implicit commit of Events DDL works as expected. - add more tests Collateral clean ups in the events code. This patch fixes Bug#23631 Events: SHOW VARIABLES doesn't work when mysql.event is damaged mysql-test/r/events.result: Update results. mysql-test/r/events_bugs.result: Update results. mysql-test/r/events_restart_phase1.result: Update results. mysql-test/r/events_restart_phase2.result: Update results. mysql-test/r/events_restart_phase3.result: Update results. mysql-test/r/events_scheduling.result: Update results. mysql-test/r/events_time_zone.result: Update results. mysql-test/t/events.test: Add new tests for tampering with mysql.event and some more tests for sub-statements, LOCK TABLES mode and pre-locking. mysql-test/t/events_bugs.test: Move the non-concurrent part of test for Bug 16420 to this file. mysql-test/t/events_restart_phase1.test: Rewrite events_restart_* tests to take into account that now we check mysql.event table only once, at server startup. mysql-test/t/events_restart_phase2.test: Rewrite events_restart_* tests to take into account that now we check mysql.event table only once, at server startup. mysql-test/t/events_restart_phase3.test: Rewrite events_restart_* tests to take into account that now we check mysql.event table only once, at server startup. mysql-test/t/events_scheduling.test: Add more coverage for event_scheduler global variable. mysql-test/t/events_time_zone.test: Move the non-concurrent part of the tests for Bug 16420 to events_bugs.test sql/event_data_objects.cc: Move update_timing_fields functionality to Event_db_repository. Make loading of events from a table record more robust to tampering with the table - now we do not check mysql.event on every table open. sql/event_data_objects.h: Cleanup. sql/event_db_repository.cc: Now Event_db_repository is responsible for table I/O only. All the logic of events DDL is handled outside, in Events class please refer to the added test coverage to see how this change affected the behavior of Event Scheduler. Dependency on sp_head.h and sp.h removed. Make this module robust to tweaks with mysql.event table. Move check_system_tables from events.cc to this file sql/event_db_repository.h: Cleanup declarations (remove unused ones, change return type to bool from int). sql/event_queue.cc: Update to adapt to the new start up scheme of the Event Scheduler. sql/event_queue.h: Cleanup declarations. sql/event_scheduler.cc: Make all the error messages uniform: [SEVERITY] Event Scheduler: [user][schema.event] message Using append_identifier for error logging was an overkill - we may need it only if the system character set may have NUL (null character) as part of a valid identifier, this is currently never the case, whereas additional quoting did not look nice in the log. sql/event_scheduler.h: Cleanup the headers. sql/events.cc: Use a different start up procedure of Event Scheduler: - at start up, try to check the system tables first. If they are not up-to-date, disable the scheduler. - try to load all the active events. In case of a load error, abort start up. - do not parse an event on start up. Parsing only gives some information about event validity, but far not all. Consolidate the business logic of Events DDL in this module. Now opt_event_scheduler may change after start up and thus is protected by LOCK_event_metadata mutex. sql/events.h: Use all-static-data-members approach to implement Singleton pattern. sql/mysqld.cc: New invocation scheme of Events. Move some logic to events.cc. Initialize the scheduler before reporting "Ready for connections". sql/set_var.cc: Clean up sys_var_thd_sql_mode::symbolic_mode_representation to work with a LEX_STRING. Move more logic related to @@events_scheduler global variable to Events module. sql/set_var.h: Update declarations. sql/share/errmsg.txt: If someone tampered with mysql.event table after the server has started we no longer give him/her a complete report what was actually broken. Do not send the user to look at the error log in such case, as there is nothing there (check_table_intact is not executed). sql/sp_head.cc: Update to a new declaration of sys_var_thd_sql_mode::symbolic_mode_representation sql/sql_db.cc: New invocation scheme of Events module. sql/sql_parse.cc: Move more logic to Events module. Make sure that we are consistent in the way access rights are checked for Events DDL: always after committing the current transaction and checking the system tables. sql/sql_show.cc: Update to the new declarations of sys_var_thd_sql_mode::symbolic_mode_representation sql/sql_test.cc: New invocation scheme of events. sql/table.cc: mysql.event is a system table. Update check_table_intact to be concurrent, more verbose, and less smart. sql/table.h: Add a helper method. mysql-test/r/events_trans.result: New BitKeeper file ``mysql-test/r/events_trans.result'' mysql-test/t/events_trans.test: New BitKeeper file ``mysql-test/t/events_trans.test'': test cases for Event Scheduler that require a transactional storage engine. --- mysql-test/r/events.result | 406 +++++++-- mysql-test/r/events_bugs.result | 150 +++- mysql-test/r/events_restart_phase1.result | 22 +- mysql-test/r/events_restart_phase2.result | 48 +- mysql-test/r/events_restart_phase3.result | 10 +- mysql-test/r/events_scheduling.result | 4 + mysql-test/r/events_time_zone.result | 142 ---- mysql-test/r/events_trans.result | 159 ++++ mysql-test/t/events.test | 382 ++++++++- mysql-test/t/events_bugs.test | 185 +++- mysql-test/t/events_restart_phase1.test | 46 +- mysql-test/t/events_restart_phase2.test | 44 +- mysql-test/t/events_restart_phase3.test | 22 +- mysql-test/t/events_scheduling.test | 4 + mysql-test/t/events_time_zone.test | 171 +--- mysql-test/t/events_trans.test | 159 ++++ sql/event_data_objects.cc | 94 +-- sql/event_data_objects.h | 3 - sql/event_db_repository.cc | 655 ++++++++------- sql/event_db_repository.h | 28 +- sql/event_queue.cc | 76 +- sql/event_queue.h | 41 +- sql/event_scheduler.cc | 99 +-- sql/event_scheduler.h | 25 +- sql/events.cc | 972 ++++++++++++---------- sql/events.h | 106 ++- sql/mysqld.cc | 46 +- sql/set_var.cc | 65 +- sql/set_var.h | 6 +- sql/share/errmsg.txt | 4 +- sql/sp_head.cc | 28 +- sql/sql_db.cc | 2 +- sql/sql_parse.cc | 53 +- sql/sql_show.cc | 25 +- sql/sql_test.cc | 2 +- sql/table.cc | 265 +++--- sql/table.h | 18 +- 37 files changed, 2820 insertions(+), 1747 deletions(-) create mode 100644 mysql-test/r/events_trans.result create mode 100644 mysql-test/t/events_trans.test diff --git a/mysql-test/r/events.result b/mysql-test/r/events.result index b0640af0b13..7125b13cb88 100644 --- a/mysql-test/r/events.result +++ b/mysql-test/r/events.result @@ -1,4 +1,8 @@ -create database if not exists events_test; +drop database if exists events_test; +drop database if exists db_x; +drop database if exists mysqltest_db2; +drop database if exists mysqltest_no_such_database; +create database events_test; use events_test; CREATE USER pauline@localhost; CREATE DATABASE db_x; @@ -223,72 +227,180 @@ drop event root19; drop event root20; drop event ðóóò21; set names latin1; +Create a test event. Only event metadata is relevant, +the actual schedule and body are not. CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; SHOW EVENTS; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED +Try to alter mysql.event: the server should fail to load +event information after mysql.event was tampered with. + +First, let's add a column to the end and make sure everything +works as before + +ALTER TABLE mysql.event ADD dummy INT; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status +events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED +SELECT event_name FROM INFORMATION_SCHEMA.events; +event_name +intact_check +SHOW CREATE EVENT intact_check; +Event sql_mode time_zone Create Event +intact_check SYSTEM CREATE EVENT `intact_check` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO SELECT "nothing" +DROP EVENT no_such_event; +ERROR HY000: Unknown event 'no_such_event' +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +DROP EVENT intact_check_1; +ERROR HY000: Unknown event 'intact_check_1' +DROP EVENT intact_check_2; +DROP EVENT intact_check; +DROP DATABASE IF EXISTS mysqltest_no_such_database; +Warnings: +Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +SELECT @@event_scheduler; +@@event_scheduler +OFF +SHOW VARIABLES LIKE 'event_scheduler'; +Variable_name Value +event_scheduler OFF +SET GLOBAL event_scheduler=OFF; +ALTER TABLE mysql.event DROP dummy; +CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; + +Now let's add a column to the first position: the server +expects to see event schema name there + ALTER TABLE mysql.event ADD dummy INT FIRST; SHOW EVENTS; -ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 18. The table is probably corrupted -ALTER TABLE mysql.event DROP dummy, ADD dummy2 VARCHAR(64) FIRST; -SHOW EVENTS; -ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 18. The table is probably corrupted -ALTER TABLE mysql.event DROP dummy2; -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted +SELECT event_name FROM INFORMATION_SCHEMA.events; +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted +SHOW CREATE EVENT intact_check; +ERROR HY000: Unknown event 'intact_check' +DROP EVENT no_such_event; +ERROR HY000: Unknown event 'no_such_event' +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +ERROR HY000: Unknown event 'intact_check_1' +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +ERROR HY000: Unknown event 'intact_check_1' +DROP EVENT intact_check_1; +ERROR HY000: Unknown event 'intact_check_1' +DROP EVENT intact_check_2; +ERROR HY000: Unknown event 'intact_check_2' +DROP EVENT intact_check; +ERROR HY000: Unknown event 'intact_check' +DROP DATABASE IF EXISTS mysqltest_no_such_database; +Warnings: +Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +SELECT @@event_scheduler; +@@event_scheduler +OFF +SHOW VARIABLES LIKE 'event_scheduler'; +Variable_name Value +event_scheduler OFF +SET GLOBAL event_scheduler=OFF; +Clean up +ALTER TABLE mysql.event DROP dummy; +DELETE FROM mysql.event; +CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; +Back up the table, further changes are not reversible CREATE TABLE event_like LIKE mysql.event; INSERT INTO event_like SELECT * FROM mysql.event; -ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default ''; -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details -ALTER TABLE mysql.event MODIFY db char(20) character set utf8 collate utf8_bin default ''; -SHOW CREATE TABLE mysql.event; -Table Create Table -event CREATE TABLE `event` ( - `db` char(20) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', - `name` char(64) NOT NULL DEFAULT '', - `body` longblob NOT NULL, - `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', - `execute_at` datetime DEFAULT NULL, - `interval_value` int(11) DEFAULT NULL, - `interval_field` enum('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') DEFAULT NULL, - `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', - `last_executed` datetime DEFAULT NULL, - `starts` datetime DEFAULT NULL, - `ends` datetime DEFAULT NULL, - `status` enum('ENABLED','DISABLED') NOT NULL DEFAULT 'ENABLED', - `on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP', - `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL DEFAULT '', - `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '', - `time_zone` char(64) CHARACTER SET latin1 NOT NULL DEFAULT 'SYSTEM', - PRIMARY KEY (`db`,`name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Events' -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details -ALTER TABLE mysql.event MODIFY db char(64) character set utf8 collate utf8_bin default ''; -"This should work" -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED -ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default ''; -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details -ALTER TABLE mysql.event MODIFY db varchar(64) character set utf8 collate utf8_bin default ''; -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ERROR HY000: Cannot load from mysql.event. The table is probably corrupted. Please see the error log for details + +Drop some columns and try more checks. + + ALTER TABLE mysql.event DROP comment, DROP starts; +SHOW EVENTS; +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted +SHOW CREATE EVENT intact_check; +ERROR HY000: Cannot load from mysql.event. The table is probably corrupted +DROP EVENT no_such_event; +ERROR HY000: Unknown event 'no_such_event' +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 15. The table is probably corrupted +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +ERROR HY000: Unknown event 'intact_check_1' +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +ERROR HY000: Unknown event 'intact_check_1' +DROP EVENT intact_check_1; +ERROR HY000: Unknown event 'intact_check_1' +DROP EVENT intact_check_2; +ERROR HY000: Unknown event 'intact_check_2' +DROP EVENT intact_check; +DROP DATABASE IF EXISTS mysqltest_no_such_database; +Warnings: +Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +SELECT @@event_scheduler; +@@event_scheduler +OFF +SHOW VARIABLES LIKE 'event_scheduler'; +Variable_name Value +event_scheduler OFF +SET GLOBAL event_scheduler=OFF; + +Now drop the table, and test again + + DROP TABLE mysql.event; +SHOW EVENTS; +ERROR 42S02: Table 'mysql.event' doesn't exist +SELECT event_name FROM INFORMATION_SCHEMA.events; +ERROR 42S02: Table 'mysql.event' doesn't exist +SHOW CREATE EVENT intact_check; +ERROR 42S02: Table 'mysql.event' doesn't exist +DROP EVENT no_such_event; +ERROR 42S02: Table 'mysql.event' doesn't exist +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; +ERROR 42S02: Table 'mysql.event' doesn't exist +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +ERROR 42S02: Table 'mysql.event' doesn't exist +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +ERROR 42S02: Table 'mysql.event' doesn't exist +DROP EVENT intact_check_1; +ERROR 42S02: Table 'mysql.event' doesn't exist +DROP EVENT intact_check_2; +ERROR 42S02: Table 'mysql.event' doesn't exist +DROP EVENT intact_check; +ERROR 42S02: Table 'mysql.event' doesn't exist +DROP DATABASE IF EXISTS mysqltest_no_such_database; +Warnings: +Note 1008 Can't drop database 'mysqltest_no_such_database'; database doesn't exist +Error 1146 Table 'mysql.event' doesn't exist +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +OK, there is an unnecessary warning about the non-existent table +but it's not easy to fix and no one complained about it. +A similar warning is printed if mysql.proc is missing. +SHOW WARNINGS; +Level Code Message +Error 1146 Table 'mysql.event' doesn't exist +SELECT @@event_scheduler; +@@event_scheduler +OFF +SHOW VARIABLES LIKE 'event_scheduler'; +Variable_name Value +event_scheduler OFF +SET GLOBAL event_scheduler=OFF; +Restore the original table. CREATE TABLE mysql.event like event_like; -INSERT INTO mysql.event SELECT * FROM event_like; DROP TABLE event_like; SHOW EVENTS; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED -DROP EVENT intact_check; create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5; select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event; db name body definer convert_tz(execute_at, 'UTC', 'SYSTEM') on_completion @@ -401,4 +513,196 @@ SHOW EVENTS FROM ``; ERROR 42000: Incorrect database name '' SHOW EVENTS FROM `events\\test`; Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status + +LOCK TABLES mode. + +create table t1 (a int); +create event e1 on schedule every 10 hour do select 1; +lock table t1 read; +show create event e1; +Event sql_mode time_zone Create Event +e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 +select event_name from information_schema.events; +event_name +e1 +create event e2 on schedule every 10 hour do select 1; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +alter event e2 disable; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +alter event e2 rename to e3; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +drop event e2; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +drop event e1; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +unlock tables; +lock table t1 write; +show create event e1; +Event sql_mode time_zone Create Event +e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 +select event_name from information_schema.events; +event_name +e1 +create event e2 on schedule every 10 hour do select 1; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +alter event e2 disable; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +alter event e2 rename to e3; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +drop event e2; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +drop event e1; +ERROR HY000: Table 'event' was not locked with LOCK TABLES +unlock tables; +lock table t1 read, mysql.event read; +show create event e1; +Event sql_mode time_zone Create Event +e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 +select event_name from information_schema.events; +event_name +e1 +create event e2 on schedule every 10 hour do select 1; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +alter event e2 disable; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +alter event e2 rename to e3; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +drop event e2; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +drop event e1; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +unlock tables; +lock table t1 write, mysql.event read; +show create event e1; +Event sql_mode time_zone Create Event +e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 +select event_name from information_schema.events; +event_name +e1 +create event e2 on schedule every 10 hour do select 1; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +alter event e2 disable; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +alter event e2 rename to e3; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +drop event e2; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +drop event e1; +ERROR HY000: Table 'event' was locked with a READ lock and can't be updated +unlock tables; +lock table t1 read, mysql.event write; +ERROR HY000: You can't combine write-locking of system tables with other tables or lock types +lock table t1 write, mysql.event write; +ERROR HY000: You can't combine write-locking of system tables with other tables or lock types +lock table mysql.event write; +show create event e1; +Event sql_mode time_zone Create Event +e1 SYSTEM CREATE EVENT `e1` ON SCHEDULE EVERY 10 HOUR STARTS '#' ON COMPLETION NOT PRESERVE ENABLE DO select 1 +select event_name from information_schema.events; +event_name +e1 +create event e2 on schedule every 10 hour do select 1; +alter event e2 disable; +alter event e2 rename to e3; +drop event e3; +drop event e1; +unlock tables; +Make sure we have left no events +select event_name from information_schema.events; +event_name + +Events in sub-statements, events and prelocking + + +create event e1 on schedule every 10 hour do select 1; +create function f1() returns int +begin +show create event e1; +return 1; +end| +ERROR 0A000: Not allowed to return a result set from a function +create trigger trg before insert on t1 for each row +begin +show create event e1; +end| +ERROR 0A000: Not allowed to return a result set from a trigger +create function f1() returns int +begin +select event_name from information_schema.events; +return 1; +end| +ERROR 0A000: Not allowed to return a result set from a function +create trigger trg before insert on t1 for each row +begin +select event_name from information_schema.events; +end| +ERROR 0A000: Not allowed to return a result set from a trigger +create function f1() returns int +begin +create event e2 on schedule every 10 hour do select 1; +return 1; +end| +ERROR HY000: Recursion of EVENT DDL statements is forbidden when body is present +create function f1() returns int +begin +alter event e1 rename to e2; +return 1; +end| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +create function f1() returns int +begin +drop event e2; +return 1; +end| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +---------------------------------------------------------------------- +create trigger trg before insert on t1 for each row +begin +set new.a= f1(); +end| +create function f1() returns int +begin +call p1(); +return 0; +end| +create procedure p1() +begin +select event_name from information_schema.events; +end| +insert into t1 (a) values (1)| +ERROR 0A000: Not allowed to return a result set from a trigger +drop procedure p1| +create procedure p1() +begin +show create event e1; +end| +insert into t1 (a) values (1)| +ERROR 0A000: Not allowed to return a result set from a trigger +drop procedure p1| +create procedure p1() +begin +create temporary table tmp select event_name from information_schema.events; +end| +expected to work, since we redirect the output into a tmp table +insert into t1 (a) values (1)| +select * from tmp| +event_name +e1 +drop temporary table tmp| +drop procedure p1| +create procedure p1() +begin +alter event e1 rename to e2; +end| +insert into t1 (a) values (1)| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +drop procedure p1| +create procedure p1() +begin +drop event e1; +end| +insert into t1 (a) values (1)| +ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger. +drop table t1| +drop event e1| drop database events_test; diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result index 6835ecd7fde..b7690a57207 100644 --- a/mysql-test/r/events_bugs.result +++ b/mysql-test/r/events_bugs.result @@ -1,4 +1,7 @@ -create database if not exists events_test; +drop database if exists events_test; +drop database if exists mysqltest_db1; +drop database if exists mysqltest_db2; +create database events_test; use events_test; CREATE EVENT lower_case ON SCHEDULE EVERY 1 MINUTE DO SELECT 1; CREATE EVENT Lower_case ON SCHEDULE EVERY 2 MINUTE DO SELECT 2; @@ -381,4 +384,149 @@ ERROR 42000: Access denied; you need the SUPER privilege for this operation DROP EVENT e1; ERROR HY000: Unknown event 'e1' DROP USER mysqltest_u1@localhost; +SET GLOBAL EVENT_SCHEDULER= OFF; +SET @save_time_zone= @@TIME_ZONE; +SET TIME_ZONE= '+00:00'; +SET TIMESTAMP= UNIX_TIMESTAMP('2005-12-31 23:58:59'); +CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status +events_test e1 root@localhost +00:00 RECURRING NULL 1 DAY 2005-12-31 23:58:59 NULL ENABLED +SET TIME_ZONE= '-01:00'; +ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2000-01-01 00:00:00'; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status +events_test e1 root@localhost -01:00 RECURRING NULL 1 DAY 2000-01-01 00:00:00 NULL ENABLED +SET TIME_ZONE= '+02:00'; +ALTER EVENT e1 ON SCHEDULE AT '2000-01-02 00:00:00' + ON COMPLETION PRESERVE DISABLE; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status +events_test e1 root@localhost +02:00 ONE TIME 2000-01-02 00:00:00 NULL NULL NULL NULL DISABLED +SET TIME_ZONE= '-03:00'; +ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY ENDS '2030-01-03 00:00:00' + ON COMPLETION PRESERVE DISABLE; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status +events_test e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 DISABLED +SET TIME_ZONE= '+04:00'; +ALTER EVENT e1 DO SELECT 2; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status +events_test e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 ENABLED +DROP EVENT e1; +SET TIME_ZONE='+05:00'; +CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO +SELECT 1; +SET TIMESTAMP= @@TIMESTAMP + 1; +SET TIME_ZONE='-05:00'; +CREATE EVENT e2 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO +SELECT 1; +SET TIMESTAMP= @@TIMESTAMP + 1; +SET TIME_ZONE='+00:00'; +CREATE EVENT e3 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO +SELECT 1; +SELECT * FROM INFORMATION_SCHEMA.EVENTS ORDER BY event_name; +EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT +NULL events_test e1 root@localhost +05:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:58:59 2005-12-31 23:58:59 NULL +NULL events_test e2 root@localhost -05:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:59:00 2005-12-31 23:59:00 NULL +NULL events_test e3 root@localhost +00:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:59:01 2005-12-31 23:59:01 NULL +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status +events_test e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED +events_test e2 root@localhost -05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED +events_test e3 root@localhost +00:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED +SHOW CREATE EVENT e1; +Event sql_mode time_zone Create Event +e1 +05:00 CREATE EVENT `e1` ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 1 +SHOW CREATE EVENT e2; +Event sql_mode time_zone Create Event +e2 -05:00 CREATE EVENT `e2` ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 1 +SHOW CREATE EVENT e3; +Event sql_mode time_zone Create Event +e3 +00:00 CREATE EVENT `e3` ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 1 +The following should fail, and nothing should be altered. +ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00'; +ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been altered +ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' DISABLE; +ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been altered +The following should give warnings, and nothing should be created. +CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' +DO +SELECT 1; +Warnings: +Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' DISABLE +DO +SELECT 1; +Warnings: +Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DO +SELECT 1; +Warnings: +Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DISABLE +DO +SELECT 1; +Warnings: +Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status +events_test e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED +events_test e2 root@localhost -05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED +events_test e3 root@localhost +00:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED +The following should succeed giving a warning. +ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE; +Warnings: +Note 1533 Event execution time is in the past. Event has been disabled +CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE +DO +SELECT 1; +Warnings: +Note 1533 Event execution time is in the past. Event has been disabled +CREATE EVENT e5 ON SCHEDULE AT '1999-01-01 00:00:00' + ON COMPLETION PRESERVE +DO +SELECT 1; +Warnings: +Note 1533 Event execution time is in the past. Event has been disabled +The following should succeed without warnings. +ALTER EVENT e2 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'; +ALTER EVENT e3 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE; +CREATE EVENT e6 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' DO +SELECT 1; +CREATE EVENT e7 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE +DO +SELECT 1; +CREATE EVENT e8 ON SCHEDULE AT '1999-01-01 00:00:00' + ON COMPLETION PRESERVE DISABLE +DO +SELECT 1; +SHOW EVENTS; +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status +events_test e1 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED +events_test e2 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 NULL ENABLED +events_test e3 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED +events_test e4 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED +events_test e5 root@localhost +00:00 ONE TIME 1999-01-01 00:00:00 NULL NULL NULL NULL DISABLED +events_test e6 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 NULL ENABLED +events_test e7 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED +events_test e8 root@localhost +00:00 ONE TIME 1999-01-01 00:00:00 NULL NULL NULL NULL DISABLED +DROP EVENT e8; +DROP EVENT e7; +DROP EVENT e6; +DROP EVENT e5; +DROP EVENT e4; +DROP EVENT e3; +DROP EVENT e2; +DROP EVENT e1; +SET TIME_ZONE=@save_time_zone; drop database events_test; diff --git a/mysql-test/r/events_restart_phase1.result b/mysql-test/r/events_restart_phase1.result index 0c032884dc4..7b1de62f2ef 100644 --- a/mysql-test/r/events_restart_phase1.result +++ b/mysql-test/r/events_restart_phase1.result @@ -1,12 +1,16 @@ -create database if not exists mysqltest_events_test; -use mysqltest_events_test; set global event_scheduler=off; +drop database if exists events_test; +create database events_test; +use events_test; create table execution_log(name char(10)); -create event abc1 on schedule every 1 second do insert into execution_log value('abc1'); -create event abc2 on schedule every 1 second do insert into execution_log value('abc2'); -create event abc3 on schedule every 1 second do insert into execution_log value('abc3'); -select name from execution_log; -name -insert into mysql.event values ('db1','bad','select 42','root@localhost',NULL,1000,'MICROSECOND','2006-05-05 17:39:11','2006-05-05 17:39:20','2016-05-05 15:39:24','2016-05-05 15:39:11',NULL,'ENABLED','DROP','','comment1','SYSTEM'); -insert into mysql.event values ('db1','bad2','sect','root@localhost',NULL,1000,'SECOND','2006-05-05 17:39:11','2006-05-05 17:39:20','2016-05-05 15:39:24','2016-05-05 15:39:11',NULL,'ENABLED','DROP','','comment2','SYSTEM'); +create event abc1 on schedule every 1 second do +insert into execution_log value('abc1'); +create event abc2 on schedule every 1 second do +insert into execution_log value('abc2'); +create event abc3 on schedule every 1 second do +insert into execution_log value('abc3'); +create table event_like like mysql.event; +insert into event_like select * from mysql.event; +alter table mysql.event +change column body body longtext character set utf8 collate utf8_bin; "Now we restart the server" diff --git a/mysql-test/r/events_restart_phase2.result b/mysql-test/r/events_restart_phase2.result index 703cb92324f..60ddf06bf23 100644 --- a/mysql-test/r/events_restart_phase2.result +++ b/mysql-test/r/events_restart_phase2.result @@ -1,6 +1,42 @@ -use mysqltest_events_test; -"Should get 0 rows because the queue aborted run -select distinct name from execution_log order by name; -name -delete from mysql.event where name like 'bad%'; -"Now restart the server again" +use events_test; +select @@event_scheduler; +@@event_scheduler +DISABLED +show events; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +select event_name from information_schema.events; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +show create event intact_check; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +drop event no_such_event; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +create event intact_check_1 on schedule every 5 hour do select 5; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +alter event intact_check_1 on schedule every 8 hour do select 8; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +alter event intact_check_1 rename to intact_check_2; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +drop event intact_check_1; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +drop event intact_check_2; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +drop event intact_check; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +set global event_scheduler=on; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +set global event_scheduler=off; +ERROR HY000: Cannot proceed because system tables used by Event Scheduler were found damaged at server start +show variables like 'event_scheduler'; +Variable_name Value +event_scheduler DISABLED +Make sure that we still can create and drop databases, +and no warnings are produced. +drop database if exists mysqltest_database_not_exists; +Warnings: +Note 1008 Can't drop database 'mysqltest_database_not_exists'; database doesn't exist +create database mysqltest_db1; +drop database mysqltest_db1; +Restore the original mysql.event table +drop table mysql.event; +rename table event_like to mysql.event; +Now let's restart the server again diff --git a/mysql-test/r/events_restart_phase3.result b/mysql-test/r/events_restart_phase3.result index e653d6a7c23..8ac00fdc70d 100644 --- a/mysql-test/r/events_restart_phase3.result +++ b/mysql-test/r/events_restart_phase3.result @@ -1,12 +1,12 @@ -use mysqltest_events_test; +use events_test; +select @@event_scheduler; +@@event_scheduler +ON "Should get 3 rows : abc1, abc2, abc3 select distinct name from execution_log order by name; name abc1 abc2 abc3 -drop event abc1; -drop event abc2; -drop event abc3; drop table execution_log; -drop database mysqltest_events_test; +drop database events_test; diff --git a/mysql-test/r/events_scheduling.result b/mysql-test/r/events_scheduling.result index d885dc3a048..b945b83093f 100644 --- a/mysql-test/r/events_scheduling.result +++ b/mysql-test/r/events_scheduling.result @@ -1,6 +1,8 @@ CREATE DATABASE IF NOT EXISTS events_test; USE events_test; SET GLOBAL event_scheduler=OFF; +Try agian to make sure it's allowed +SET GLOBAL event_scheduler=OFF; SHOW VARIABLES LIKE 'event_scheduler'; Variable_name Value event_scheduler OFF @@ -13,6 +15,8 @@ SHOW VARIABLES LIKE 'event_scheduler'; Variable_name Value event_scheduler OFF SET GLOBAL event_scheduler=ON; +Try again to make sure it's allowed +SET GLOBAL event_scheduler=ON; SHOW VARIABLES LIKE 'event_scheduler'; Variable_name Value event_scheduler ON diff --git a/mysql-test/r/events_time_zone.result b/mysql-test/r/events_time_zone.result index 3d5ff794848..b20aa445183 100644 --- a/mysql-test/r/events_time_zone.result +++ b/mysql-test/r/events_time_zone.result @@ -3,148 +3,6 @@ CREATE DATABASE mysqltest_db1; USE mysqltest_db1; SET GLOBAL EVENT_SCHEDULER= OFF; SET @save_time_zone= @@TIME_ZONE; -SET TIME_ZONE= '+00:00'; -SET TIMESTAMP= UNIX_TIMESTAMP('2005-12-31 23:58:59'); -CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -mysqltest_db1 e1 root@localhost +00:00 RECURRING NULL 1 DAY 2005-12-31 23:58:59 NULL ENABLED -SET TIME_ZONE= '-01:00'; -ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2000-01-01 00:00:00'; -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -mysqltest_db1 e1 root@localhost -01:00 RECURRING NULL 1 DAY 2000-01-01 00:00:00 NULL ENABLED -SET TIME_ZONE= '+02:00'; -ALTER EVENT e1 ON SCHEDULE AT '2000-01-02 00:00:00' - ON COMPLETION PRESERVE DISABLE; -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -mysqltest_db1 e1 root@localhost +02:00 ONE TIME 2000-01-02 00:00:00 NULL NULL NULL NULL DISABLED -SET TIME_ZONE= '-03:00'; -ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY ENDS '2030-01-03 00:00:00' - ON COMPLETION PRESERVE DISABLE; -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -mysqltest_db1 e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 DISABLED -SET TIME_ZONE= '+04:00'; -ALTER EVENT e1 DO SELECT 2; -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -mysqltest_db1 e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 ENABLED -DROP EVENT e1; -SET TIME_ZONE='+05:00'; -CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO -SELECT 1; -SET TIMESTAMP= @@TIMESTAMP + 1; -SET TIME_ZONE='-05:00'; -CREATE EVENT e2 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO -SELECT 1; -SET TIMESTAMP= @@TIMESTAMP + 1; -SET TIME_ZONE='+00:00'; -CREATE EVENT e3 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO -SELECT 1; -SELECT * FROM INFORMATION_SCHEMA.EVENTS; -EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT -NULL mysqltest_db1 e1 root@localhost +05:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:58:59 2005-12-31 23:58:59 NULL -NULL mysqltest_db1 e2 root@localhost -05:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:59:00 2005-12-31 23:59:00 NULL -NULL mysqltest_db1 e3 root@localhost +00:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:59:01 2005-12-31 23:59:01 NULL -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -mysqltest_db1 e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED -mysqltest_db1 e2 root@localhost -05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED -mysqltest_db1 e3 root@localhost +00:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED -SHOW CREATE EVENT e1; -Event sql_mode time_zone Create Event -e1 +05:00 CREATE EVENT `e1` ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 1 -SHOW CREATE EVENT e2; -Event sql_mode time_zone Create Event -e2 -05:00 CREATE EVENT `e2` ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 1 -SHOW CREATE EVENT e3; -Event sql_mode time_zone Create Event -e3 +00:00 CREATE EVENT `e3` ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 1 -The following should fail, and nothing should be altered. -ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00'; -ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been altered -ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' DISABLE; -ERROR HY000: Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been altered -The following should give warnings, and nothing should be created. -CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' -DO -SELECT 1; -Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created -CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' DISABLE -DO -SELECT 1; -Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created -CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DO -SELECT 1; -Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created -CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DISABLE -DO -SELECT 1; -Warnings: -Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -mysqltest_db1 e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED -mysqltest_db1 e2 root@localhost -05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED -mysqltest_db1 e3 root@localhost +00:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED -The following should succeed giving a warning. -ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE; -Warnings: -Note 1533 Event execution time is in the past. Event has been disabled -CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE -DO -SELECT 1; -Warnings: -Note 1533 Event execution time is in the past. Event has been disabled -CREATE EVENT e5 ON SCHEDULE AT '1999-01-01 00:00:00' - ON COMPLETION PRESERVE -DO -SELECT 1; -Warnings: -Note 1533 Event execution time is in the past. Event has been disabled -The following should succeed without warnings. -ALTER EVENT e2 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'; -ALTER EVENT e3 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE; -CREATE EVENT e6 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' DO -SELECT 1; -CREATE EVENT e7 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE -DO -SELECT 1; -CREATE EVENT e8 ON SCHEDULE AT '1999-01-01 00:00:00' - ON COMPLETION PRESERVE DISABLE -DO -SELECT 1; -SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -mysqltest_db1 e1 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED -mysqltest_db1 e2 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 NULL ENABLED -mysqltest_db1 e3 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED -mysqltest_db1 e4 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED -mysqltest_db1 e5 root@localhost +00:00 ONE TIME 1999-01-01 00:00:00 NULL NULL NULL NULL DISABLED -mysqltest_db1 e6 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 NULL ENABLED -mysqltest_db1 e7 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED -mysqltest_db1 e8 root@localhost +00:00 ONE TIME 1999-01-01 00:00:00 NULL NULL NULL NULL DISABLED -DROP EVENT e8; -DROP EVENT e7; -DROP EVENT e6; -DROP EVENT e5; -DROP EVENT e4; -DROP EVENT e3; -DROP EVENT e2; -DROP EVENT e1; CREATE TABLE t_step (step INT); INSERT INTO t_step VALUES (@step); CREATE FUNCTION round_to_step(i INT, n INT) RETURNS INT diff --git a/mysql-test/r/events_trans.result b/mysql-test/r/events_trans.result new file mode 100644 index 00000000000..145fb8be084 --- /dev/null +++ b/mysql-test/r/events_trans.result @@ -0,0 +1,159 @@ +drop database if exists events_test; +drop database if exists mysqltest_db2; +drop database if exists mysqltest_no_such_database; +create database events_test; +use events_test; + +Test that Events DDL issue an implicit COMMIT + + +set autocommit=off; +select @@autocommit; +@@autocommit +0 +create table t1 (a varchar(255)) engine=innodb; +begin work; +insert into t1 (a) values ("OK: create event"); +create event e1 on schedule every 1 day do select 1; +rollback work; +select * from t1; +a +OK: create event +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: alter event"); +alter event e1 on schedule every 2 day do select 2; +rollback work; +select * from t1; +a +OK: alter event +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: alter event rename"); +alter event e1 rename to e2; +rollback work; +select * from t1; +a +OK: alter event rename +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: drop event"); +drop event e2; +rollback work; +select * from t1; +a +OK: drop event +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: drop event if exists"); +drop event if exists e2; +Warnings: +Note 1305 Event e2 does not exist +rollback work; +select * from t1; +a +OK: drop event if exists +delete from t1; +commit work; +create event e1 on schedule every 1 day do select 1; +begin work; +insert into t1 (a) values ("OK: create event if not exists"); +create event if not exists e1 on schedule every 2 day do select 2; +Warnings: +Note 1526 Event 'e1' already exists +rollback work; +select * from t1; +a +OK: create event if not exists +delete from t1; +commit work; + +Now check various error conditions: make sure we issue an +implicit commit anyway + +begin work; +insert into t1 (a) values ("OK: create event: event already exists"); +create event e1 on schedule every 2 day do select 2; +ERROR HY000: Event 'e1' already exists +rollback work; +select * from t1; +a +OK: create event: event already exists +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: alter event rename: rename to same name"); +alter event e1 rename to e1; +ERROR HY000: Same old and new event name +rollback work; +select * from t1; +a +OK: alter event rename: rename to same name +delete from t1; +commit work; +create event e2 on schedule every 3 day do select 3; +begin work; +insert into t1 (a) values ("OK: alter event rename: destination exists"); +alter event e2 rename to e1; +ERROR HY000: Event 'e1' already exists +rollback work; +select * from t1; +a +OK: alter event rename: destination exists +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: create event: database does not exist"); +create event mysqltest_no_such_database.e1 on schedule every 1 day do select 1; +ERROR 42000: Unknown database 'mysqltest_no_such_database' +rollback work; +select * from t1; +a +OK: create event: database does not exist +delete from t1; +commit work; +grant create, insert, select, delete on mysqltest_db2.* +to mysqltest_user1@localhost; +create database mysqltest_db2; +set autocommit=off; +select @@autocommit; +@@autocommit +0 +create table t1 (a varchar(255)) engine=innodb; +begin work; +insert into t1 (a) values ("OK: create event: insufficient privileges"); +create event e1 on schedule every 1 day do select 1; +ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2' +rollback work; +select * from t1; +a +OK: create event: insufficient privileges +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: alter event: insufficient privileges"); +alter event e1 on schedule every 1 day do select 1; +ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2' +rollback work; +select * from t1; +a +OK: alter event: insufficient privileges +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: drop event: insufficient privileges"); +drop event e1; +ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2' +rollback work; +select * from t1; +a +OK: drop event: insufficient privileges +delete from t1; +commit work; +drop user mysqltest_user1@localhost; +drop database mysqltest_db2; +drop database events_test; diff --git a/mysql-test/t/events.test b/mysql-test/t/events.test index 39bc1063ace..c8054e49da4 100644 --- a/mysql-test/t/events.test +++ b/mysql-test/t/events.test @@ -1,7 +1,13 @@ # Can't test with embedded server that doesn't support grants -- source include/not_embedded.inc -create database if not exists events_test; +--disable_warnings +drop database if exists events_test; +drop database if exists db_x; +drop database if exists mysqltest_db2; +drop database if exists mysqltest_no_such_database; +--enable_warnings +create database events_test; use events_test; # @@ -215,62 +221,161 @@ set names latin1; # # -# mysql.event intact checking start +# mysql.event intact checking +# Check that the server does not crash if +# one has destroyed or tampered with the event table. +# Please see see for events_restart_phase* tests to +# see the server behavior at start up with bad mysql.event +# table. # -# There should be at least 1 second between the ALTERs or we can't catch the change of create_time!! +# +--echo Create a test event. Only event metadata is relevant, +--echo the actual schedule and body are not. # CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; --replace_column 8 # 9 # SHOW EVENTS; -ALTER TABLE mysql.event ADD dummy INT FIRST; ---error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED -SHOW EVENTS; -ALTER TABLE mysql.event DROP dummy, ADD dummy2 VARCHAR(64) FIRST; ---error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED -SHOW EVENTS; -ALTER TABLE mysql.event DROP dummy2; +# +--echo Try to alter mysql.event: the server should fail to load +--echo event information after mysql.event was tampered with. +--echo +--echo First, let's add a column to the end and make sure everything +--echo works as before +--echo +ALTER TABLE mysql.event ADD dummy INT; --replace_column 8 # 9 # SHOW EVENTS; +SELECT event_name FROM INFORMATION_SCHEMA.events; +--replace_regex /STARTS '[^']+'/STARTS '#'/ +SHOW CREATE EVENT intact_check; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT no_such_event; +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT intact_check_1; +DROP EVENT intact_check_2; +DROP EVENT intact_check; +DROP DATABASE IF EXISTS mysqltest_no_such_database; +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +SELECT @@event_scheduler; +SHOW VARIABLES LIKE 'event_scheduler'; +SET GLOBAL event_scheduler=OFF; +# Clean up +ALTER TABLE mysql.event DROP dummy; +CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; +--echo +--echo Now let's add a column to the first position: the server +--echo expects to see event schema name there +--echo +ALTER TABLE mysql.event ADD dummy INT FIRST; +--error ER_CANNOT_LOAD_FROM_TABLE +SHOW EVENTS; +--error ER_CANNOT_LOAD_FROM_TABLE +SELECT event_name FROM INFORMATION_SCHEMA.events; +--error ER_EVENT_DOES_NOT_EXIST +SHOW CREATE EVENT intact_check; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT no_such_event; +--error ER_CANNOT_LOAD_FROM_TABLE +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; +--error ER_EVENT_DOES_NOT_EXIST +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +--error ER_EVENT_DOES_NOT_EXIST +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT intact_check_1; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT intact_check_2; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT intact_check; +# Should work OK +DROP DATABASE IF EXISTS mysqltest_no_such_database; +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +SELECT @@event_scheduler; +SHOW VARIABLES LIKE 'event_scheduler'; +SET GLOBAL event_scheduler=OFF; +--echo Clean up +ALTER TABLE mysql.event DROP dummy; +DELETE FROM mysql.event; +CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; +--echo Back up the table, further changes are not reversible CREATE TABLE event_like LIKE mysql.event; INSERT INTO event_like SELECT * FROM mysql.event; -#sleep a bit or we won't catch the change of time ---sleep 1.1 -ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default ''; ---error ER_CANNOT_LOAD_FROM_TABLE -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; -ALTER TABLE mysql.event MODIFY db char(20) character set utf8 collate utf8_bin default ''; -#wait a bit or we won't see the difference because of seconds resolution ---sleep 1.1 -SHOW CREATE TABLE mysql.event; ---error ER_CANNOT_LOAD_FROM_TABLE -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; ---sleep 1.1 -ALTER TABLE mysql.event MODIFY db char(64) character set utf8 collate utf8_bin default ''; ---sleep 1.1 ---echo "This should work" ---replace_column 8 # 9 # -SHOW EVENTS; ---sleep 1.1 -ALTER TABLE mysql.event MODIFY db char(64) character set cp1251 default ''; ---error ER_CANNOT_LOAD_FROM_TABLE -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; ---sleep 1.1 -ALTER TABLE mysql.event MODIFY db varchar(64) character set utf8 collate utf8_bin default ''; ---sleep 1.1 ---error ER_CANNOT_LOAD_FROM_TABLE -SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; ---sleep 1.1 +--echo +--echo Drop some columns and try more checks. +--echo +--echo ALTER TABLE mysql.event DROP comment, DROP starts; ---sleep 1.1 ---error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED +--error ER_CANNOT_LOAD_FROM_TABLE +SHOW EVENTS; +--error ER_CANNOT_LOAD_FROM_TABLE SELECT event_name FROM INFORMATION_SCHEMA.EVENTS; +--error ER_CANNOT_LOAD_FROM_TABLE +SHOW CREATE EVENT intact_check; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT no_such_event; +--error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; +--error ER_EVENT_DOES_NOT_EXIST +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +--error ER_EVENT_DOES_NOT_EXIST +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT intact_check_1; +--error ER_EVENT_DOES_NOT_EXIST +DROP EVENT intact_check_2; +# Should succeed +DROP EVENT intact_check; +DROP DATABASE IF EXISTS mysqltest_no_such_database; +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +SELECT @@event_scheduler; +SHOW VARIABLES LIKE 'event_scheduler'; +SET GLOBAL event_scheduler=OFF; +--echo +--echo Now drop the table, and test again +--echo +--echo DROP TABLE mysql.event; +--error ER_NO_SUCH_TABLE +SHOW EVENTS; +--error ER_NO_SUCH_TABLE +SELECT event_name FROM INFORMATION_SCHEMA.events; +--error ER_NO_SUCH_TABLE +SHOW CREATE EVENT intact_check; +--error ER_NO_SUCH_TABLE +DROP EVENT no_such_event; +--error ER_NO_SUCH_TABLE +CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; +--error ER_NO_SUCH_TABLE +ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; +--error ER_NO_SUCH_TABLE +ALTER EVENT intact_check_1 RENAME TO intact_check_2; +--error ER_NO_SUCH_TABLE +DROP EVENT intact_check_1; +--error ER_NO_SUCH_TABLE +DROP EVENT intact_check_2; +--error ER_NO_SUCH_TABLE +DROP EVENT intact_check; +DROP DATABASE IF EXISTS mysqltest_no_such_database; +CREATE DATABASE mysqltest_db2; +DROP DATABASE mysqltest_db2; +--echo OK, there is an unnecessary warning about the non-existent table +--echo but it's not easy to fix and no one complained about it. +--echo A similar warning is printed if mysql.proc is missing. +SHOW WARNINGS; +SELECT @@event_scheduler; +SHOW VARIABLES LIKE 'event_scheduler'; +SET GLOBAL event_scheduler=OFF; +--echo Restore the original table. CREATE TABLE mysql.event like event_like; -INSERT INTO mysql.event SELECT * FROM event_like; DROP TABLE event_like; --replace_column 8 # 9 # SHOW EVENTS; -DROP EVENT intact_check; # # mysql.event intact checking end # @@ -424,5 +529,200 @@ SHOW EVENTS FROM aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa SHOW EVENTS FROM ``; SHOW EVENTS FROM `events\\test`; +# +# A check for events SQL under LOCK TABLES and in pre-locked mode. +# +--echo +--echo LOCK TABLES mode. +--echo +# +# SHOW CREATE EVENT and INFORMATION_SCHEMA.events are available and +# cause an implicit lock/unlock of mysql.event table, regardless of the +# currently locked tables. +# +create table t1 (a int); +create event e1 on schedule every 10 hour do select 1; +# +lock table t1 read; +# +--replace_regex /STARTS '[^']+'/STARTS '#'/ +show create event e1; +select event_name from information_schema.events; +--error ER_TABLE_NOT_LOCKED +create event e2 on schedule every 10 hour do select 1; +--error ER_TABLE_NOT_LOCKED +alter event e2 disable; +--error ER_TABLE_NOT_LOCKED +alter event e2 rename to e3; +--error ER_TABLE_NOT_LOCKED +drop event e2; +--error ER_TABLE_NOT_LOCKED +drop event e1; +unlock tables; +# +lock table t1 write; +# +--replace_regex /STARTS '[^']+'/STARTS '#'/ +show create event e1; +select event_name from information_schema.events; +--error ER_TABLE_NOT_LOCKED +create event e2 on schedule every 10 hour do select 1; +--error ER_TABLE_NOT_LOCKED +alter event e2 disable; +--error ER_TABLE_NOT_LOCKED +alter event e2 rename to e3; +--error ER_TABLE_NOT_LOCKED +drop event e2; +--error ER_TABLE_NOT_LOCKED +drop event e1; +unlock tables; +# +lock table t1 read, mysql.event read; +# +--replace_regex /STARTS '[^']+'/STARTS '#'/ +show create event e1; +select event_name from information_schema.events; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +create event e2 on schedule every 10 hour do select 1; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +alter event e2 disable; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +alter event e2 rename to e3; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +drop event e2; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +drop event e1; +unlock tables; +# +lock table t1 write, mysql.event read; +# +--replace_regex /STARTS '[^']+'/STARTS '#'/ +show create event e1; +select event_name from information_schema.events; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +create event e2 on schedule every 10 hour do select 1; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +alter event e2 disable; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +alter event e2 rename to e3; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +drop event e2; +--error ER_TABLE_NOT_LOCKED_FOR_WRITE +drop event e1; +unlock tables; +# +--error ER_WRONG_LOCK_OF_SYSTEM_TABLE +lock table t1 read, mysql.event write; +# +--error ER_WRONG_LOCK_OF_SYSTEM_TABLE +lock table t1 write, mysql.event write; +# +lock table mysql.event write; +--replace_regex /STARTS '[^']+'/STARTS '#'/ +show create event e1; +select event_name from information_schema.events; +create event e2 on schedule every 10 hour do select 1; +alter event e2 disable; +alter event e2 rename to e3; +drop event e3; +drop event e1; +unlock tables; +--echo Make sure we have left no events +select event_name from information_schema.events; +--echo +--echo Events in sub-statements, events and prelocking +--echo +--echo +create event e1 on schedule every 10 hour do select 1; +delimiter |; +--error ER_SP_NO_RETSET +create function f1() returns int +begin + show create event e1; + return 1; +end| +--error ER_SP_NO_RETSET +create trigger trg before insert on t1 for each row +begin + show create event e1; +end| +--error ER_SP_NO_RETSET +create function f1() returns int +begin + select event_name from information_schema.events; + return 1; +end| +--error ER_SP_NO_RETSET +create trigger trg before insert on t1 for each row +begin + select event_name from information_schema.events; +end| +--error ER_EVENT_RECURSION_FORBIDDEN +create function f1() returns int +begin + create event e2 on schedule every 10 hour do select 1; + return 1; +end| +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG +create function f1() returns int +begin + alter event e1 rename to e2; + return 1; +end| +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG +create function f1() returns int +begin + drop event e2; + return 1; +end| +--echo ---------------------------------------------------------------------- +create trigger trg before insert on t1 for each row +begin + set new.a= f1(); +end| +create function f1() returns int +begin + call p1(); + return 0; +end| +create procedure p1() +begin + select event_name from information_schema.events; +end| +--error ER_SP_NO_RETSET +insert into t1 (a) values (1)| +drop procedure p1| +create procedure p1() +begin + show create event e1; +end| +--error ER_SP_NO_RETSET +insert into t1 (a) values (1)| +drop procedure p1| +create procedure p1() +begin + create temporary table tmp select event_name from information_schema.events; +end| +--echo expected to work, since we redirect the output into a tmp table +insert into t1 (a) values (1)| +select * from tmp| +drop temporary table tmp| +drop procedure p1| +create procedure p1() +begin + alter event e1 rename to e2; +end| +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG +insert into t1 (a) values (1)| +drop procedure p1| +create procedure p1() +begin + drop event e1; +end| +--error ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG +insert into t1 (a) values (1)| +drop table t1| +drop event e1| +delimiter ;| drop database events_test; diff --git a/mysql-test/t/events_bugs.test b/mysql-test/t/events_bugs.test index 56c44dc3a9f..8343c6b4bc6 100644 --- a/mysql-test/t/events_bugs.test +++ b/mysql-test/t/events_bugs.test @@ -1,7 +1,12 @@ # Can't test with embedded server that doesn't support grants -- source include/not_embedded.inc -create database if not exists events_test; +--disable_warnings +drop database if exists events_test; +drop database if exists mysqltest_db1; +drop database if exists mysqltest_db2; +--enable_warnings +create database events_test; use events_test; # @@ -429,6 +434,184 @@ DROP USER mysqltest_u1@localhost; # +# BUG#16420: Events: timestamps become UTC +# BUG#26429: SHOW CREATE EVENT is incorrect for an event that +# STARTS NOW() +# BUG#26431: Impossible to re-create an event from backup if its +# STARTS clause is in the past +# WL#3698: Events: execution in local time zone +# +# Here we only check non-concurrent aspects of the patch. +# For the actual tests of time zones please see events_time_zone.test +# +SET GLOBAL EVENT_SCHEDULER= OFF; +SET @save_time_zone= @@TIME_ZONE; + +#---------------------------------------------------------------------- + +# We will use a separate connection because SET TIMESTAMP will stop +# the clock in that connection. + +SET TIME_ZONE= '+00:00'; +SET TIMESTAMP= UNIX_TIMESTAMP('2005-12-31 23:58:59'); + + +# Test when event time zone is updated on ALTER EVENT. +# + +CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; +SHOW EVENTS; + +# Test storing and updating of the event time zone. +# +SET TIME_ZONE= '-01:00'; +ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2000-01-01 00:00:00'; +SHOW EVENTS; + +# This will update event time zone. +SET TIME_ZONE= '+02:00'; +ALTER EVENT e1 ON SCHEDULE AT '2000-01-02 00:00:00' + ON COMPLETION PRESERVE DISABLE; +SHOW EVENTS; + +# This will update event time zone. +SET TIME_ZONE= '-03:00'; +ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY ENDS '2030-01-03 00:00:00' + ON COMPLETION PRESERVE DISABLE; +SHOW EVENTS; + +# This will not update event time zone, as no time is being adjusted. +SET TIME_ZONE= '+04:00'; +ALTER EVENT e1 DO SELECT 2; +SHOW EVENTS; + +DROP EVENT e1; + +#---------------------------------------------------------------------- + +# Create some events. +SET TIME_ZONE='+05:00'; +CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO + SELECT 1; + +SET TIMESTAMP= @@TIMESTAMP + 1; + +SET TIME_ZONE='-05:00'; +CREATE EVENT e2 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO + SELECT 1; + +SET TIMESTAMP= @@TIMESTAMP + 1; + +SET TIME_ZONE='+00:00'; +CREATE EVENT e3 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO + SELECT 1; + + +# Test INFORMATION_SCHEMA.EVENTS. +# + +SELECT * FROM INFORMATION_SCHEMA.EVENTS ORDER BY event_name; + + +# Test SHOW EVENTS. +# + +SHOW EVENTS; + + +# Test SHOW CREATE EVENT. +# + +SHOW CREATE EVENT e1; +SHOW CREATE EVENT e2; +SHOW CREATE EVENT e3; + +#---------------------------------------------------------------------- + +# Test times in the past. +# + +--echo The following should fail, and nothing should be altered. + +--error ER_EVENT_CANNOT_ALTER_IN_THE_PAST +ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00'; + +--error ER_EVENT_CANNOT_ALTER_IN_THE_PAST +ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' DISABLE; + +--echo The following should give warnings, and nothing should be created. + +CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' +DO + SELECT 1; + +CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' DISABLE +DO + SELECT 1; + +CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DO + SELECT 1; + +CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DISABLE +DO + SELECT 1; + +SHOW EVENTS; + +--echo The following should succeed giving a warning. + +ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE; + +CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE +DO + SELECT 1; + +CREATE EVENT e5 ON SCHEDULE AT '1999-01-01 00:00:00' + ON COMPLETION PRESERVE +DO + SELECT 1; + +--echo The following should succeed without warnings. + +ALTER EVENT e2 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'; + +ALTER EVENT e3 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE; + +CREATE EVENT e6 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' DO + SELECT 1; + +CREATE EVENT e7 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' + ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE +DO + SELECT 1; + +CREATE EVENT e8 ON SCHEDULE AT '1999-01-01 00:00:00' + ON COMPLETION PRESERVE DISABLE +DO + SELECT 1; + +SHOW EVENTS; + + +DROP EVENT e8; +DROP EVENT e7; +DROP EVENT e6; +DROP EVENT e5; +DROP EVENT e4; +DROP EVENT e3; +DROP EVENT e2; +DROP EVENT e1; + +SET TIME_ZONE=@save_time_zone; + +# # End of tests # drop database events_test; diff --git a/mysql-test/t/events_restart_phase1.test b/mysql-test/t/events_restart_phase1.test index 0a84f6c4966..6a94ef12222 100644 --- a/mysql-test/t/events_restart_phase1.test +++ b/mysql-test/t/events_restart_phase1.test @@ -1,19 +1,43 @@ # Can't test with embedded server that doesn't support grants -- source include/not_embedded.inc +# +# Test that when the server is restarted, it checks mysql.event table, +# and disables the scheduler if it's not up to date. +# + +# Switch off the scheduler for now. +set global event_scheduler=off; --disable_warnings -create database if not exists mysqltest_events_test; +drop database if exists events_test; --enable_warnings - -use mysqltest_events_test; -set global event_scheduler=off; +create database events_test; +use events_test; create table execution_log(name char(10)); -create event abc1 on schedule every 1 second do insert into execution_log value('abc1'); -create event abc2 on schedule every 1 second do insert into execution_log value('abc2'); -create event abc3 on schedule every 1 second do insert into execution_log value('abc3'); ---sleep 1.5 -select name from execution_log; -insert into mysql.event values ('db1','bad','select 42','root@localhost',NULL,1000,'MICROSECOND','2006-05-05 17:39:11','2006-05-05 17:39:20','2016-05-05 15:39:24','2016-05-05 15:39:11',NULL,'ENABLED','DROP','','comment1','SYSTEM'); -insert into mysql.event values ('db1','bad2','sect','root@localhost',NULL,1000,'SECOND','2006-05-05 17:39:11','2006-05-05 17:39:20','2016-05-05 15:39:24','2016-05-05 15:39:11',NULL,'ENABLED','DROP','','comment2','SYSTEM'); +create event abc1 on schedule every 1 second do + insert into execution_log value('abc1'); +create event abc2 on schedule every 1 second do + insert into execution_log value('abc2'); +create event abc3 on schedule every 1 second do + insert into execution_log value('abc3'); +# +# There are various conditions when a server would regard mysql.event +# table as damaged: +# - the table has more column than specified in the compiled in value, but +# the version of the server which created the table is the same +# - the column count in the table is less than the compiled in value +# - some column has an incompatible type specification (for what is an +# incompatible type specification please refer to the comments in the source +# +# Unfortunately, in order to test a condition, we need to restart the +# server. Therefore, here we test only one simple case: changing the data +# type of the 'body' field to blob. +# +# First, let's do a backup to not depend on actual definition of mysql.event +create table event_like like mysql.event; +insert into event_like select * from mysql.event; +# Now let's alter the table and restart the server +alter table mysql.event + change column body body longtext character set utf8 collate utf8_bin; --echo "Now we restart the server" diff --git a/mysql-test/t/events_restart_phase2.test b/mysql-test/t/events_restart_phase2.test index 845472377ba..c3f799634b3 100644 --- a/mysql-test/t/events_restart_phase2.test +++ b/mysql-test/t/events_restart_phase2.test @@ -1,9 +1,41 @@ # Can't test with embedded server that doesn't support grants -- source include/not_embedded.inc -use mysqltest_events_test; ---sleep 1.5 ---echo "Should get 0 rows because the queue aborted run -select distinct name from execution_log order by name; -delete from mysql.event where name like 'bad%'; ---echo "Now restart the server again" +use events_test; +# Event scheduler should be disabled: the system tables are damaged +select @@event_scheduler; +# Try various Event Scheduler operation and check the output. +--error ER_EVENTS_DB_ERROR +show events; +--error ER_EVENTS_DB_ERROR +select event_name from information_schema.events; +--error ER_EVENTS_DB_ERROR +show create event intact_check; +--error ER_EVENTS_DB_ERROR +drop event no_such_event; +--error ER_EVENTS_DB_ERROR +create event intact_check_1 on schedule every 5 hour do select 5; +--error ER_EVENTS_DB_ERROR +alter event intact_check_1 on schedule every 8 hour do select 8; +--error ER_EVENTS_DB_ERROR +alter event intact_check_1 rename to intact_check_2; +--error ER_EVENTS_DB_ERROR +drop event intact_check_1; +--error ER_EVENTS_DB_ERROR +drop event intact_check_2; +--error ER_EVENTS_DB_ERROR +drop event intact_check; +--error ER_EVENTS_DB_ERROR +set global event_scheduler=on; +--error ER_EVENTS_DB_ERROR +set global event_scheduler=off; +show variables like 'event_scheduler'; +--echo Make sure that we still can create and drop databases, +--echo and no warnings are produced. +drop database if exists mysqltest_database_not_exists; +create database mysqltest_db1; +drop database mysqltest_db1; +--echo Restore the original mysql.event table +drop table mysql.event; +rename table event_like to mysql.event; +--echo Now let's restart the server again diff --git a/mysql-test/t/events_restart_phase3.test b/mysql-test/t/events_restart_phase3.test index 76cd9d22752..1be40c72717 100644 --- a/mysql-test/t/events_restart_phase3.test +++ b/mysql-test/t/events_restart_phase3.test @@ -1,14 +1,18 @@ # Can't test with embedded server that doesn't support grants -- source include/not_embedded.inc - -use mysqltest_events_test; ---sleep 2 +# +# We need this file primarily to make sure that the scheduler is restarted +# and enabled after we have restored mysql.event table. +# This is the final step of the "cleanup". +# +# Make sure also that events are executed OK after restart, just in case. +use events_test; +# Make sure the scheduler was started successfully +select @@event_scheduler; +let $wait_condition=select count(distinct name)=3 from execution_log; +--source include/wait_condition.inc --echo "Should get 3 rows : abc1, abc2, abc3 select distinct name from execution_log order by name; - -drop event abc1; -drop event abc2; -drop event abc3; drop table execution_log; - -drop database mysqltest_events_test; +# Will drop all events +drop database events_test; diff --git a/mysql-test/t/events_scheduling.test b/mysql-test/t/events_scheduling.test index e3b55685e65..ff9dfaad927 100644 --- a/mysql-test/t/events_scheduling.test +++ b/mysql-test/t/events_scheduling.test @@ -5,6 +5,8 @@ CREATE DATABASE IF NOT EXISTS events_test; USE events_test; +SET GLOBAL event_scheduler=OFF; +--echo Try agian to make sure it's allowed SET GLOBAL event_scheduler=OFF; SHOW VARIABLES LIKE 'event_scheduler'; SET GLOBAL event_scheduler=1; @@ -12,6 +14,8 @@ SHOW VARIABLES LIKE 'event_scheduler'; SET GLOBAL event_scheduler=0; SHOW VARIABLES LIKE 'event_scheduler'; SET GLOBAL event_scheduler=ON; +--echo Try again to make sure it's allowed +SET GLOBAL event_scheduler=ON; SHOW VARIABLES LIKE 'event_scheduler'; --error ER_WRONG_VALUE_FOR_VAR SET GLOBAL event_scheduler=DISABLED; diff --git a/mysql-test/t/events_time_zone.test b/mysql-test/t/events_time_zone.test index fff84c7a995..5f929e0b07a 100644 --- a/mysql-test/t/events_time_zone.test +++ b/mysql-test/t/events_time_zone.test @@ -20,6 +20,7 @@ let $old_db= `SELECT DATABASE()`; USE mysqltest_db1; SET GLOBAL EVENT_SCHEDULER= OFF; +SET @save_time_zone= @@TIME_ZONE; # @@ -31,176 +32,6 @@ SET GLOBAL EVENT_SCHEDULER= OFF; # WL#3698: Events: execution in local time zone # -SET @save_time_zone= @@TIME_ZONE; - -#---------------------------------------------------------------------- - -# We will use a separate connection because SET TIMESTAMP will stop -# the clock in that connection. - -connect (conn1, localhost, root, , mysqltest_db1); - -SET TIME_ZONE= '+00:00'; -SET TIMESTAMP= UNIX_TIMESTAMP('2005-12-31 23:58:59'); - - -# Test when event time zone is updated on ALTER EVENT. -# - -CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; -SHOW EVENTS; - -# Test storing and updating of the event time zone. -# -SET TIME_ZONE= '-01:00'; -ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2000-01-01 00:00:00'; -SHOW EVENTS; - -# This will update event time zone. -SET TIME_ZONE= '+02:00'; -ALTER EVENT e1 ON SCHEDULE AT '2000-01-02 00:00:00' - ON COMPLETION PRESERVE DISABLE; -SHOW EVENTS; - -# This will update event time zone. -SET TIME_ZONE= '-03:00'; -ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY ENDS '2030-01-03 00:00:00' - ON COMPLETION PRESERVE DISABLE; -SHOW EVENTS; - -# This will not update event time zone, as no time is being adjusted. -SET TIME_ZONE= '+04:00'; -ALTER EVENT e1 DO SELECT 2; -SHOW EVENTS; - -DROP EVENT e1; - -#---------------------------------------------------------------------- - -# Create some events. -SET TIME_ZONE='+05:00'; -CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO - SELECT 1; - -SET TIMESTAMP= @@TIMESTAMP + 1; - -SET TIME_ZONE='-05:00'; -CREATE EVENT e2 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO - SELECT 1; - -SET TIMESTAMP= @@TIMESTAMP + 1; - -SET TIME_ZONE='+00:00'; -CREATE EVENT e3 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO - SELECT 1; - - -# Test INFORMATION_SCHEMA.EVENTS. -# - -SELECT * FROM INFORMATION_SCHEMA.EVENTS; - - -# Test SHOW EVENTS. -# - -SHOW EVENTS; - - -# Test SHOW CREATE EVENT. -# - -SHOW CREATE EVENT e1; -SHOW CREATE EVENT e2; -SHOW CREATE EVENT e3; - -#---------------------------------------------------------------------- - -# Test times in the past. -# - ---echo The following should fail, and nothing should be altered. - ---error ER_EVENT_CANNOT_ALTER_IN_THE_PAST -ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00'; - ---error ER_EVENT_CANNOT_ALTER_IN_THE_PAST -ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' DISABLE; - ---echo The following should give warnings, and nothing should be created. - -CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' -DO - SELECT 1; - -CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' DISABLE -DO - SELECT 1; - -CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DO - SELECT 1; - -CREATE EVENT e4 ON SCHEDULE AT '1999-01-01 00:00:00' DISABLE -DO - SELECT 1; - -SHOW EVENTS; - ---echo The following should succeed giving a warning. - -ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE; - -CREATE EVENT e4 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE -DO - SELECT 1; - -CREATE EVENT e5 ON SCHEDULE AT '1999-01-01 00:00:00' - ON COMPLETION PRESERVE -DO - SELECT 1; - ---echo The following should succeed without warnings. - -ALTER EVENT e2 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00'; - -ALTER EVENT e3 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE; - -CREATE EVENT e6 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' DO - SELECT 1; - -CREATE EVENT e7 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' - ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE -DO - SELECT 1; - -CREATE EVENT e8 ON SCHEDULE AT '1999-01-01 00:00:00' - ON COMPLETION PRESERVE DISABLE -DO - SELECT 1; - -SHOW EVENTS; - - -DROP EVENT e8; -DROP EVENT e7; -DROP EVENT e6; -DROP EVENT e5; -DROP EVENT e4; -DROP EVENT e3; -DROP EVENT e2; -DROP EVENT e1; - - -disconnect conn1; -connection default; - #---------------------------------------------------------------------- # Create rounding function. diff --git a/mysql-test/t/events_trans.test b/mysql-test/t/events_trans.test new file mode 100644 index 00000000000..41044f9975f --- /dev/null +++ b/mysql-test/t/events_trans.test @@ -0,0 +1,159 @@ +# +# Tests that require transactions +# +-- source include/have_innodb.inc +--disable_warnings +drop database if exists events_test; +drop database if exists mysqltest_db2; +drop database if exists mysqltest_no_such_database; +--enable_warnings +create database events_test; +use events_test; + +--echo +--echo Test that Events DDL issue an implicit COMMIT +--echo +--echo +set autocommit=off; +# Sanity check +select @@autocommit; +create table t1 (a varchar(255)) engine=innodb; +# Basic: check that successful Events DDL commits pending transaction +begin work; +insert into t1 (a) values ("OK: create event"); +create event e1 on schedule every 1 day do select 1; +rollback work; +select * from t1; +delete from t1; +commit work; +# +begin work; +insert into t1 (a) values ("OK: alter event"); +alter event e1 on schedule every 2 day do select 2; +rollback work; +select * from t1; +delete from t1; +commit work; +# +begin work; +insert into t1 (a) values ("OK: alter event rename"); +alter event e1 rename to e2; +rollback work; +select * from t1; +delete from t1; +commit work; +# +begin work; +insert into t1 (a) values ("OK: drop event"); +drop event e2; +rollback work; +select * from t1; +delete from t1; +commit work; +# +begin work; +insert into t1 (a) values ("OK: drop event if exists"); +drop event if exists e2; +rollback work; +select * from t1; +delete from t1; +commit work; +# +create event e1 on schedule every 1 day do select 1; +begin work; +insert into t1 (a) values ("OK: create event if not exists"); +create event if not exists e1 on schedule every 2 day do select 2; +rollback work; +select * from t1; +delete from t1; +commit work; +--echo +--echo Now check various error conditions: make sure we issue an +--echo implicit commit anyway +--echo +# +begin work; +insert into t1 (a) values ("OK: create event: event already exists"); +--error ER_EVENT_ALREADY_EXISTS +create event e1 on schedule every 2 day do select 2; +rollback work; +select * from t1; +delete from t1; +commit work; +# +begin work; +insert into t1 (a) values ("OK: alter event rename: rename to same name"); +--error ER_EVENT_SAME_NAME +alter event e1 rename to e1; +rollback work; +select * from t1; +delete from t1; +commit work; +# +create event e2 on schedule every 3 day do select 3; +begin work; +insert into t1 (a) values ("OK: alter event rename: destination exists"); +--error ER_EVENT_ALREADY_EXISTS +alter event e2 rename to e1; +rollback work; +select * from t1; +delete from t1; +commit work; +# +begin work; +insert into t1 (a) values ("OK: create event: database does not exist"); +--error ER_BAD_DB_ERROR +create event mysqltest_no_such_database.e1 on schedule every 1 day do select 1; +rollback work; +select * from t1; +delete from t1; +commit work; +# +# Privilege checks +# +grant create, insert, select, delete on mysqltest_db2.* + to mysqltest_user1@localhost; +create database mysqltest_db2; +connect (conn1,localhost,mysqltest_user1,,mysqltest_db2); +set autocommit=off; +# Sanity check +select @@autocommit; +create table t1 (a varchar(255)) engine=innodb; +# Not enough privileges to CREATE EVENT +begin work; +insert into t1 (a) values ("OK: create event: insufficient privileges"); +--error ER_DBACCESS_DENIED_ERROR +create event e1 on schedule every 1 day do select 1; +rollback work; +select * from t1; +delete from t1; +commit work; +# Not enough privileges to ALTER EVENT +begin work; +insert into t1 (a) values ("OK: alter event: insufficient privileges"); +--error ER_DBACCESS_DENIED_ERROR +alter event e1 on schedule every 1 day do select 1; +rollback work; +select * from t1; +delete from t1; +commit work; +# Not enough privileges to DROP EVENT +begin work; +insert into t1 (a) values ("OK: drop event: insufficient privileges"); +--error ER_DBACCESS_DENIED_ERROR +drop event e1; +rollback work; +select * from t1; +delete from t1; +commit work; +# Cleanup +disconnect conn1; +connection default; +drop user mysqltest_user1@localhost; +drop database mysqltest_db2; + +# +# Cleanup +# +drop database events_test; + diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index e87a78a5e37..95bfba548de 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -20,8 +20,6 @@ #include "event_db_repository.h" #include "sp_head.h" -/* That's a provisional solution */ -extern Event_db_repository events_event_db_repository; #define EVEX_MAX_INTERVAL_VALUE 1000000000L @@ -215,7 +213,7 @@ Event_parse_data::init_body(THD *thd) ++body_begin; --body.length; } - body.str= thd->strmake((char *)body_begin, body.length); + body.str= thd->strmake(body_begin, body.length); DBUG_VOID_RETURN; } @@ -694,7 +692,7 @@ Event_basic::load_string_fields(Field **fields, ...) va_start(args, fields); field_name= (enum enum_events_table_field) va_arg(args, int); - while (field_name != ET_FIELD_COUNT) + while (field_name < ET_FIELD_COUNT) { field_value= va_arg(args, LEX_STRING *); if ((field_value->str= get_field(&mem_root, fields[field_name])) == NullS) @@ -858,13 +856,19 @@ Event_job_data::load_from_row(THD *thd, TABLE *table) if (!table) goto error; - if (table->s->fields != ET_FIELD_COUNT) + if (table->s->fields < ET_FIELD_COUNT) goto error; LEX_STRING tz_name; - load_string_fields(table->field, ET_FIELD_DB, &dbname, ET_FIELD_NAME, &name, - ET_FIELD_BODY, &body, ET_FIELD_DEFINER, &definer, - ET_FIELD_TIME_ZONE, &tz_name, ET_FIELD_COUNT); + if (load_string_fields(table->field, + ET_FIELD_DB, &dbname, + ET_FIELD_NAME, &name, + ET_FIELD_BODY, &body, + ET_FIELD_DEFINER, &definer, + ET_FIELD_TIME_ZONE, &tz_name, + ET_FIELD_COUNT)) + goto error; + if (load_time_zone(thd, tz_name)) goto error; @@ -910,19 +914,24 @@ Event_queue_element::load_from_row(THD *thd, TABLE *table) { char *ptr; TIME time; + LEX_STRING tz_name; DBUG_ENTER("Event_queue_element::load_from_row"); if (!table) goto error; - if (table->s->fields != ET_FIELD_COUNT) + if (table->s->fields < ET_FIELD_COUNT) + goto error; + + if (load_string_fields(table->field, + ET_FIELD_DB, &dbname, + ET_FIELD_NAME, &name, + ET_FIELD_DEFINER, &definer, + ET_FIELD_TIME_ZONE, &tz_name, + ET_FIELD_COUNT)) goto error; - LEX_STRING tz_name; - load_string_fields(table->field, ET_FIELD_DB, &dbname, ET_FIELD_NAME, &name, - ET_FIELD_DEFINER, &definer, - ET_FIELD_TIME_ZONE, &tz_name, ET_FIELD_COUNT); if (load_time_zone(thd, tz_name)) goto error; @@ -1039,7 +1048,11 @@ Event_timed::load_from_row(THD *thd, TABLE *table) if (Event_queue_element::load_from_row(thd, table)) goto error; - load_string_fields(table->field, ET_FIELD_BODY, &body, ET_FIELD_COUNT); + if (load_string_fields(table->field, + ET_FIELD_BODY, &body, + ET_FIELD_COUNT)) + goto error; + ptr= strchr(definer.str, '@'); @@ -1594,10 +1607,8 @@ Event_queue_element::mark_last_executed(THD *thd) bool Event_queue_element::update_timing_fields(THD *thd) { - TABLE *table; - Field **fields; - Open_tables_state backup; - int ret= FALSE; + Event_db_repository *db_repository= Events::get_db_repository(); + int ret; DBUG_ENTER("Event_queue_element::update_timing_fields"); @@ -1607,46 +1618,13 @@ Event_queue_element::update_timing_fields(THD *thd) if (!(status_changed || last_executed_changed)) DBUG_RETURN(0); - thd->reset_n_backup_open_tables_state(&backup); - - if (events_event_db_repository.open_event_table(thd, TL_WRITE, &table)) - { - ret= TRUE; - goto done; - } - fields= table->field; - if ((ret= events_event_db_repository. - find_named_event(thd, dbname, name, table))) - goto done; - - store_record(table,record[1]); - /* Don't update create on row update. */ - table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET; - - if (last_executed_changed) - { - TIME time; - my_tz_UTC->gmt_sec_to_TIME(&time, last_executed); - - fields[ET_FIELD_LAST_EXECUTED]->set_notnull(); - fields[ET_FIELD_LAST_EXECUTED]->store_time(&time, - MYSQL_TIMESTAMP_DATETIME); - last_executed_changed= FALSE; - } - if (status_changed) - { - fields[ET_FIELD_STATUS]->set_notnull(); - fields[ET_FIELD_STATUS]->store((longlong)status, TRUE); - status_changed= FALSE; - } - - if ((table->file->ha_update_row(table->record[1], table->record[0]))) - ret= TRUE; - -done: - close_thread_tables(thd); - thd->restore_backup_open_tables_state(&backup); - + ret= db_repository->update_timing_fields_for_event(thd, + dbname, name, + last_executed_changed, + last_executed, + status_changed, + (ulonglong) status); + last_executed_changed= status_changed= FALSE; DBUG_RETURN(ret); } diff --git a/sql/event_data_objects.h b/sql/event_data_objects.h index 358373889e5..ab9bff176e1 100644 --- a/sql/event_data_objects.h +++ b/sql/event_data_objects.h @@ -18,7 +18,6 @@ #define EVEX_GET_FIELD_FAILED -2 #define EVEX_COMPILE_ERROR -3 -#define EVEX_GENERAL_ERROR -4 #define EVEX_BAD_PARAMS -5 #define EVEX_MICROSECOND_UNSUP -6 @@ -173,8 +172,6 @@ public: ulong sql_mode; - uint execution_count; - Event_job_data(); virtual ~Event_job_data(); diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc index 9e1ce1b4594..859836c72a8 100644 --- a/sql/event_db_repository.cc +++ b/sql/event_db_repository.cc @@ -18,12 +18,6 @@ #include "event_data_objects.h" #include "events.h" #include "sql_show.h" -#include "sp.h" -#include "sp_head.h" - - -static -time_t mysql_event_last_create_time= 0L; static const TABLE_FIELD_W_TYPE event_table_fields[ET_FIELD_COUNT] = @@ -127,26 +121,21 @@ const TABLE_FIELD_W_TYPE event_table_fields[ET_FIELD_COUNT] = }; -/* +/** Puts some data common to CREATE and ALTER EVENT into a row. - SYNOPSIS - mysql_event_fill_row() - thd THD - table The row to fill out - et Event's data - is_update CREATE EVENT or ALTER EVENT + Used both when an event is created and when it is altered. - RETURN VALUE - 0 OK - EVEX_GENERAL_ERROR Bad data - EVEX_GET_FIELD_FAILED Field count does not match. table corrupted? + @param thd THD + @param table The row to fill out + @param et Event's data + @param is_update CREATE EVENT or ALTER EVENT - DESCRIPTION - Used both when an event is created and when it is altered. + @retval FALSE success + @retval TRUE error */ -static int +static bool mysql_event_fill_row(THD *thd, TABLE *table, Event_parse_data *et, my_bool is_update) { @@ -160,6 +149,17 @@ mysql_event_fill_row(THD *thd, TABLE *table, Event_parse_data *et, DBUG_PRINT("info", ("name =[%s]", et->name.str)); DBUG_PRINT("info", ("body =[%s]", et->body.str)); + if (table->s->fields < ET_FIELD_COUNT) + { + /* + Safety: this can only happen if someone started the server + and then altered mysql.event. + */ + my_error(ER_COL_COUNT_DOESNT_MATCH_CORRUPTED, MYF(0), table->alias, + (int) ET_FIELD_COUNT, table->s->fields); + DBUG_RETURN(TRUE); + } + if (fields[f_num= ET_FIELD_DEFINER]-> store(et->definer.str, et->definer.length, scs)) goto err_truncate; @@ -263,11 +263,11 @@ mysql_event_fill_row(THD *thd, TABLE *table, Event_parse_data *et, goto err_truncate; } - DBUG_RETURN(0); + DBUG_RETURN(FALSE); err_truncate: my_error(ER_EVENT_DATA_TOO_LONG, MYF(0), fields[f_num]->field_name); - DBUG_RETURN(EVEX_GENERAL_ERROR); + DBUG_RETURN(TRUE); } @@ -381,40 +381,33 @@ Event_db_repository::table_scan_all_for_i_s(THD *thd, TABLE *schema_table, } -/* +/** Fills I_S.EVENTS with data loaded from mysql.event. Also used by SHOW EVENTS - SYNOPSIS - Event_db_repository::fill_schema_events() - thd Thread - tables The schema table - db If not NULL then get events only from this schema + The reason we reset and backup open tables here is that this + function may be called from any query that accesses + INFORMATION_SCHEMA - including a query that is issued from + a pre-locked statement, one that already has open and locked + tables. - RETURN VALUE - FALSE OK - TRUE Error + @retval FALSE success + @retval TRUE error */ -int +bool Event_db_repository::fill_schema_events(THD *thd, TABLE_LIST *tables, const char *db) { TABLE *schema_table= tables->table; TABLE *event_table= NULL; - Open_tables_state backup; int ret= 0; DBUG_ENTER("Event_db_repository::fill_schema_events"); DBUG_PRINT("info",("db=%s", db? db:"(null)")); - thd->reset_n_backup_open_tables_state(&backup); if (open_event_table(thd, TL_READ, &event_table)) - { - sql_print_error("Table mysql.event is damaged."); - thd->restore_backup_open_tables_state(&backup); - DBUG_RETURN(1); - } + DBUG_RETURN(TRUE); /* 1. SELECT I_S => use table scan. I_S.EVENTS does not guarantee order @@ -431,164 +424,101 @@ Event_db_repository::fill_schema_events(THD *thd, TABLE_LIST *tables, ret= table_scan_all_for_i_s(thd, schema_table, event_table); close_thread_tables(thd); - thd->restore_backup_open_tables_state(&backup); DBUG_PRINT("info", ("Return code=%d", ret)); DBUG_RETURN(ret); } -/* - Open mysql.event table for read +/** + Open mysql.event table for read. - SYNOPSIS - Events::open_event_table() - thd [in] Thread context - lock_type [in] How to lock the table - table [out] We will store the open table here + It's assumed that the caller knows what they are doing: + - whether it was necessary to reset-and-backup the open tables state + - whether the requested lock does not lead to a deadlock + - whether this open mode would work under LOCK TABLES, or inside a + stored function or trigger. - RETURN VALUE - 1 Cannot lock table - 2 The table is corrupted - different number of fields - 0 OK + @param[in] thd Thread context + @param[in] lock_type How to lock the table + @param[out] table We will store the open table here + + @retval TRUE open and lock failed - an error message is pushed into the + stack + @retval FALSE success */ -int +bool Event_db_repository::open_event_table(THD *thd, enum thr_lock_type lock_type, TABLE **table) { TABLE_LIST tables; DBUG_ENTER("Event_db_repository::open_event_table"); - bzero((char*) &tables, sizeof(tables)); - tables.db= (char*) "mysql"; - tables.table_name= tables.alias= (char*) "event"; - tables.lock_type= lock_type; + tables.init_one_table("mysql", "event", lock_type); if (simple_open_n_lock_tables(thd, &tables)) - DBUG_RETURN(1); + DBUG_RETURN(TRUE); - if (table_check_intact(tables.table, ET_FIELD_COUNT, - event_table_fields, - &mysql_event_last_create_time, - ER_CANNOT_LOAD_FROM_TABLE)) - { - close_thread_tables(thd); - DBUG_RETURN(2); - } *table= tables.table; tables.table->use_all_columns(); - DBUG_RETURN(0); + DBUG_RETURN(FALSE); } -/* - Checks parameters which we got from the parsing phase. +/** + Creates an event record in mysql.event table. - SYNOPSIS - check_parse_params() - thd Thread context - parse_data Event's data + Creates an event. Relies on mysql_event_fill_row which is shared with + ::update_event. - RETURN VALUE - FALSE OK - TRUE Error (reported) -*/ + @pre All semantic checks must be performed outside. This function + only creates a record on disk. + @pre The thread handle has no open tables. -static int -check_parse_params(THD *thd, Event_parse_data *parse_data) -{ - DBUG_ENTER("check_parse_params"); + @param[in,out] THD + @param[in] parse_data Parsed event definition + @param[in] create_if_not TRUE if IF NOT EXISTS clause was provided + to CREATE EVENT statement - if (parse_data->check_parse_data(thd)) - DBUG_RETURN(EVEX_BAD_PARAMS); - - if (!parse_data->dbname.str || - (thd->lex->sql_command == SQLCOM_ALTER_EVENT && thd->lex->spname && - !thd->lex->spname->m_db.str)) - { - my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0)); - DBUG_RETURN(EVEX_BAD_PARAMS); - } - - if (check_access(thd, EVENT_ACL, parse_data->dbname.str, 0, 0, 0, - is_schema_db(parse_data->dbname.str)) || - (thd->lex->sql_command == SQLCOM_ALTER_EVENT && thd->lex->spname && - (check_access(thd, EVENT_ACL, thd->lex->spname->m_db.str, 0, 0, 0, - is_schema_db(thd->lex->spname->m_db.str))))) - DBUG_RETURN(EVEX_BAD_PARAMS); - - DBUG_RETURN(0); -} - - -/* - Creates an event in mysql.event - - SYNOPSIS - Event_db_repository::create_event() - thd [in] THD - parse_data [in] Object containing info about the event - create_if_not [in] Whether to generate anwarning in case event exists - - RETURN VALUE - 0 OK - EVEX_GENERAL_ERROR Failure - - DESCRIPTION - Creates an event. Relies on mysql_event_fill_row which is shared with - ::update_event. The name of the event is inside "et". + @retval FALSE success + @retval TRUE error */ bool Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data, my_bool create_if_not) { - int ret= 0; + int ret= 1; TABLE *table= NULL; - char old_db_buf[NAME_LEN+1]; - LEX_STRING old_db= { old_db_buf, sizeof(old_db_buf) }; - bool dbchanged= FALSE; DBUG_ENTER("Event_db_repository::create_event"); - if (check_parse_params(thd, parse_data)) - goto err; - if (parse_data->do_not_create) - goto ok; - DBUG_PRINT("info", ("open mysql.event for update")); + if (open_event_table(thd, TL_WRITE, &table)) - { - my_error(ER_EVENT_OPEN_TABLE_FAILED, MYF(0)); - goto err; - } + goto end; DBUG_PRINT("info", ("name: %.*s", parse_data->name.length, parse_data->name.str)); DBUG_PRINT("info", ("check existance of an event with the same name")); - if (!find_named_event(thd, parse_data->dbname, parse_data->name, table)) + if (!find_named_event(parse_data->dbname, parse_data->name, table)) { if (create_if_not) { push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_EVENT_ALREADY_EXISTS, ER(ER_EVENT_ALREADY_EXISTS), parse_data->name.str); - goto ok; + ret= 0; } - my_error(ER_EVENT_ALREADY_EXISTS, MYF(0), parse_data->name.str); - goto err; + else + my_error(ER_EVENT_ALREADY_EXISTS, MYF(0), parse_data->name.str); + goto end; } - DBUG_PRINT("info", ("non-existant, go forward")); - - if ((ret= sp_use_new_db(thd, parse_data->dbname, &old_db, 0, &dbchanged))) - { - my_error(ER_BAD_DB_ERROR, MYF(0)); - goto err; - } + DBUG_PRINT("info", ("non-existent, go forward")); restore_record(table, s->default_values); // Get default values for fields @@ -598,7 +528,7 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data, table->field[ET_FIELD_DB]->char_length()) { my_error(ER_TOO_LONG_IDENT, MYF(0), parse_data->dbname.str); - goto err; + goto end; } if (system_charset_info->cset-> @@ -607,20 +537,13 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data, table->field[ET_FIELD_NAME]->char_length()) { my_error(ER_TOO_LONG_IDENT, MYF(0), parse_data->name.str); - goto err; + goto end; } if (parse_data->body.length > table->field[ET_FIELD_BODY]->field_length) { my_error(ER_TOO_LONG_BODY, MYF(0), parse_data->name.str); - goto err; - } - - if (!(parse_data->expression) && !(parse_data->execute_at)) - { - DBUG_PRINT("error", ("neither expression nor execute_at are set!")); - my_error(ER_EVENT_NEITHER_M_EXPR_NOR_M_AT, MYF(0)); - goto err; + goto end; } ((Field_timestamp *)table->field[ET_FIELD_CREATED])->set_time(); @@ -629,93 +552,70 @@ Event_db_repository::create_event(THD *thd, Event_parse_data *parse_data, mysql_event_fill_row() calls my_error() in case of error so no need to handle it here */ - if ((ret= mysql_event_fill_row(thd, table, parse_data, FALSE))) - goto err; + if (mysql_event_fill_row(thd, table, parse_data, FALSE)) + goto end; - /* Close active transaction only if We are going to modify disk */ - if (end_active_trans(thd)) - goto err; - if (table->file->ha_write_row(table->record[0])) + if ((ret= table->file->ha_write_row(table->record[0]))) { - my_error(ER_EVENT_STORE_FAILED, MYF(0), parse_data->name.str, ret); - goto err; + table->file->print_error(ret, MYF(0)); + goto end; } + ret= 0; -ok: - if (dbchanged) - (void) mysql_change_db(thd, old_db.str, 1); - /* - This statement may cause a spooky valgrind warning at startup - inside init_key_cache on my system (ahristov, 2006/08/10) - */ - close_thread_tables(thd); - DBUG_RETURN(FALSE); - -err: - if (dbchanged) - (void) mysql_change_db(thd, old_db.str, 1); +end: if (table) close_thread_tables(thd); - DBUG_RETURN(TRUE); + DBUG_RETURN(test(ret)); } -/* +/** Used to execute ALTER EVENT. Pendant to Events::update_event(). - SYNOPSIS - Event_db_repository::update_event() - thd THD - sp_name the name of the event to alter - et event's data + @param[in,out] thd thread handle + @param[in] parse_data parsed event definition + @paran[in[ new_dbname not NULL if ALTER EVENT RENAME + points at a new database name + @param[in] new_name not NULL if ALTER EVENT RENAME + points at a new event name - RETURN VALUE - FALSE OK - TRUE Error (reported) + @pre All semantic checks are performed outside this function, + it only updates the event definition on disk. + @pre We don't have any tables open in the given thread. - NOTES - sp_name is passed since this is the name of the event to - alter in case of RENAME TO. + @retval FALSE success + @retval TRUE error (reported) */ bool Event_db_repository::update_event(THD *thd, Event_parse_data *parse_data, - LEX_STRING *new_dbname, LEX_STRING *new_name) + LEX_STRING *new_dbname, + LEX_STRING *new_name) { CHARSET_INFO *scs= system_charset_info; TABLE *table= NULL; + int ret= 1; DBUG_ENTER("Event_db_repository::update_event"); - if (open_event_table(thd, TL_WRITE, &table)) - { - my_error(ER_EVENT_OPEN_TABLE_FAILED, MYF(0)); - goto err; - } + /* None or both must be set */ + DBUG_ASSERT(new_dbname && new_name || new_dbname == new_name); - if (check_parse_params(thd, parse_data) || parse_data->do_not_create) - goto err; + if (open_event_table(thd, TL_WRITE, &table)) + goto end; DBUG_PRINT("info", ("dbname: %s", parse_data->dbname.str)); DBUG_PRINT("info", ("name: %s", parse_data->name.str)); DBUG_PRINT("info", ("user: %s", parse_data->definer.str)); - if (new_dbname) - DBUG_PRINT("info", ("rename to: %s@%s", new_dbname->str, new_name->str)); /* first look whether we overwrite */ if (new_name) { - if (!sortcmp_lex_string(parse_data->name, *new_name, scs) && - !sortcmp_lex_string(parse_data->dbname, *new_dbname, scs)) - { - my_error(ER_EVENT_SAME_NAME, MYF(0), parse_data->name.str); - goto err; - } - - if (!find_named_event(thd, *new_dbname, *new_name, table)) + DBUG_PRINT("info", ("rename to: %s@%s", new_dbname->str, new_name->str)); + if (!find_named_event(*new_dbname, *new_name, table)) { my_error(ER_EVENT_ALREADY_EXISTS, MYF(0), new_name->str); - goto err; + goto end; } } /* @@ -724,10 +624,10 @@ Event_db_repository::update_event(THD *thd, Event_parse_data *parse_data, overwrite the key and SE will tell us that it cannot find the already found row (copied into record[1] later */ - if (find_named_event(thd, parse_data->dbname, parse_data->name, table)) + if (find_named_event(parse_data->dbname, parse_data->name, table)) { my_error(ER_EVENT_DOES_NOT_EXIST, MYF(0), parse_data->name.str); - goto err; + goto end; } store_record(table,record[1]); @@ -740,7 +640,7 @@ Event_db_repository::update_event(THD *thd, Event_parse_data *parse_data, handle it here */ if (mysql_event_fill_row(thd, table, parse_data, TRUE)) - goto err; + goto end; if (new_dbname) { @@ -748,42 +648,32 @@ Event_db_repository::update_event(THD *thd, Event_parse_data *parse_data, table->field[ET_FIELD_NAME]->store(new_name->str, new_name->length, scs); } - /* Close active transaction only if We are going to modify disk */ - if (end_active_trans(thd)) - goto err; - - int res; - if ((res= table->file->ha_update_row(table->record[1], table->record[0]))) + if ((ret= table->file->ha_update_row(table->record[1], table->record[0]))) { - my_error(ER_EVENT_STORE_FAILED, MYF(0), parse_data->name.str, res); - goto err; + table->file->print_error(ret, MYF(0)); + goto end; } + ret= 0; - /* close mysql.event or we crash later when loading the event from disk */ - close_thread_tables(thd); - DBUG_RETURN(FALSE); - -err: +end: if (table) close_thread_tables(thd); - DBUG_RETURN(TRUE); + DBUG_RETURN(test(ret)); } -/* - Drops an event +/** + Delete event record from mysql.event table. - SYNOPSIS - Event_db_repository::drop_event() - thd [in] THD - db [in] Database name - name [in] Event's name - drop_if_exists [in] If set and the event not existing => warning - onto the stack + @param[in,out] thd thread handle + @param[in] db Database name + @param[in] name Event name + @param[in] drop_if_exists DROP IF EXISTS clause was specified. + If set, and the event does not exist, + the error is downgraded to a warning. - RETURN VALUE - FALSE OK - TRUE Error (reported) + @retval FALSE success + @retval TRUE error (reported) */ bool @@ -791,66 +681,59 @@ Event_db_repository::drop_event(THD *thd, LEX_STRING db, LEX_STRING name, bool drop_if_exists) { TABLE *table= NULL; - Open_tables_state backup; - int ret; + int ret= 1; DBUG_ENTER("Event_db_repository::drop_event"); DBUG_PRINT("enter", ("%s@%s", db.str, name.str)); - thd->reset_n_backup_open_tables_state(&backup); - if ((ret= open_event_table(thd, TL_WRITE, &table))) + if (open_event_table(thd, TL_WRITE, &table)) + goto end; + + if (!find_named_event(db, name, table)) { - my_error(ER_EVENT_OPEN_TABLE_FAILED, MYF(0)); - goto done; + if ((ret= table->file->ha_delete_row(table->record[0]))) + table->file->print_error(ret, MYF(0)); + goto end; } - if (!(ret= find_named_event(thd, db, name, table))) + /* Event not found */ + if (!drop_if_exists) { - /* Close active transaction only if we are actually going to modify disk */ - if (!(ret= end_active_trans(thd)) && - (ret= table->file->ha_delete_row(table->record[0]))) - my_error(ER_EVENT_CANNOT_DELETE, MYF(0)); - } - else - { - if (drop_if_exists) - { - push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, - ER_SP_DOES_NOT_EXIST, ER(ER_SP_DOES_NOT_EXIST), - "Event", name.str); - ret= 0; - } else - my_error(ER_EVENT_DOES_NOT_EXIST, MYF(0), name.str); + my_error(ER_EVENT_DOES_NOT_EXIST, MYF(0), name.str); + goto end; } -done: + push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, + ER_SP_DOES_NOT_EXIST, ER(ER_SP_DOES_NOT_EXIST), + "Event", name.str); + ret= 0; + +end: if (table) close_thread_tables(thd); - thd->restore_backup_open_tables_state(&backup); - DBUG_RETURN(ret); + DBUG_RETURN(test(ret)); } -/* +/** Positions the internal pointer of `table` to the place where (db, name) is stored. - SYNOPSIS - Event_db_repository::find_named_event() - thd Thread - db Schema - name Event name - table Opened mysql.event + In case search succeeded, the table cursor points at the found row. - RETURN VALUE - FALSE OK - TRUE No such event + @param[in] db database name + @param[in] name event name + @param[in,out] table mysql.event table + + + @retval FALSE an event with such db/name key exists + @reval TRUE no record found or an error occured. */ bool -Event_db_repository::find_named_event(THD *thd, LEX_STRING db, LEX_STRING name, - TABLE *table) +Event_db_repository::find_named_event(LEX_STRING db, LEX_STRING name, + TABLE *table) { byte key[MAX_KEY_LENGTH]; DBUG_ENTER("Event_db_repository::find_named_event"); @@ -902,15 +785,15 @@ Event_db_repository::drop_schema_events(THD *thd, LEX_STRING schema) } -/* - Drops all events by field which has specific value of the field +/** + Drops all events which have a specific value of a field. - SYNOPSIS - Event_db_repository::drop_events_by_field() - thd Thread - table mysql.event TABLE - field Which field of the row to use for matching - field_value The value that should match + @pre The thread handle has no open tables. + + @param[in,out] thd Thread + @param[in,out] table mysql.event TABLE + @param[in] field Which field of the row to use for matching + @param[in] field_value The value that should match */ void @@ -925,16 +808,7 @@ Event_db_repository::drop_events_by_field(THD *thd, DBUG_PRINT("enter", ("field=%d field_value=%s", field, field_value.str)); if (open_event_table(thd, TL_WRITE, &table)) - { - /* - Currently being used only for DROP DATABASE - In this case we don't need - error message since the OK packet has been sent. But for DROP USER we - could need it. - - my_error(ER_EVENT_OPEN_TABLE_FAILED, MYF(0)); - */ DBUG_VOID_RETURN; - } /* only enabled events are in memory, so we go now and delete the rest */ init_read_record(&read_record_info, thd, table, NULL, 1, 0); @@ -942,14 +816,20 @@ Event_db_repository::drop_events_by_field(THD *thd, { char *et_field= get_field(thd->mem_root, table->field[field]); - LEX_STRING et_field_lex= { et_field, strlen(et_field) }; - DBUG_PRINT("info", ("Current event %s name=%s", et_field, - get_field(thd->mem_root, table->field[ET_FIELD_NAME]))); - - if (!sortcmp_lex_string(et_field_lex, field_value, system_charset_info)) + /* et_field may be NULL if the table is corrupted or out of memory */ + if (et_field) { - DBUG_PRINT("info", ("Dropping")); - ret= table->file->ha_delete_row(table->record[0]); + LEX_STRING et_field_lex= { et_field, strlen(et_field) }; + DBUG_PRINT("info", ("Current event %s name=%s", et_field, + get_field(thd->mem_root, + table->field[ET_FIELD_NAME]))); + + if (!sortcmp_lex_string(et_field_lex, field_value, system_charset_info)) + { + DBUG_PRINT("info", ("Dropping")); + if ((ret= table->file->ha_delete_row(table->record[0]))) + table->file->print_error(ret, MYF(0)); + } } } end_read_record(&read_record_info); @@ -959,20 +839,14 @@ Event_db_repository::drop_events_by_field(THD *thd, } -/* +/** Looks for a named event in mysql.event and then loads it from - the table, compiles and inserts it into the cache. + the table. - SYNOPSIS - Event_db_repository::load_named_event() - thd [in] Thread context - dbname [in] Event's db name - name [in] Event's name - etn [out] The loaded event + @pre The given thread does not have open tables. - RETURN VALUE - FALSE OK - TRUE Error (reported) + @retval FALSE success + @retval TRUE error */ bool @@ -980,26 +854,169 @@ Event_db_repository::load_named_event(THD *thd, LEX_STRING dbname, LEX_STRING name, Event_basic *etn) { TABLE *table= NULL; - int ret= 0; - Open_tables_state backup; + bool ret; DBUG_ENTER("Event_db_repository::load_named_event"); DBUG_PRINT("enter",("thd: 0x%lx name: %*s", (long) thd, name.length, name.str)); - thd->reset_n_backup_open_tables_state(&backup); + if (!(ret= open_event_table(thd, TL_READ, &table))) + { + if ((ret= find_named_event(dbname, name, table))) + my_error(ER_EVENT_DOES_NOT_EXIST, MYF(0), name.str); + else if ((ret= etn->load_from_row(thd, table))) + my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), "event"); - if ((ret= open_event_table(thd, TL_READ, &table))) - my_error(ER_EVENT_OPEN_TABLE_FAILED, MYF(0)); - else if ((ret= find_named_event(thd, dbname, name, table))) - my_error(ER_EVENT_DOES_NOT_EXIST, MYF(0), name.str); - else if ((ret= etn->load_from_row(thd, table))) - my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), "event"); - - if (table) close_thread_tables(thd); + } - thd->restore_backup_open_tables_state(&backup); - /* In this case no memory was allocated so we don't need to clean */ DBUG_RETURN(ret); } + + +/** + Update the event record in mysql.event table with a changed status + and/or last execution time. + + @pre The thread handle does not have open tables. +*/ + +bool +Event_db_repository:: +update_timing_fields_for_event(THD *thd, + LEX_STRING event_db_name, + LEX_STRING event_name, + bool update_last_executed, + my_time_t last_executed, + bool update_status, + ulonglong status) +{ + TABLE *table= NULL; + Field **fields; + int ret= 1; + + DBUG_ENTER("Event_db_repository::update_timing_fields_for_event"); + + if (open_event_table(thd, TL_WRITE, &table)) + goto end; + + fields= table->field; + + if (find_named_event(event_db_name, event_name, table)) + goto end; + + store_record(table, record[1]); + /* Don't update create on row update. */ + table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET; + + if (update_last_executed) + { + TIME time; + my_tz_UTC->gmt_sec_to_TIME(&time, last_executed); + + fields[ET_FIELD_LAST_EXECUTED]->set_notnull(); + fields[ET_FIELD_LAST_EXECUTED]->store_time(&time, + MYSQL_TIMESTAMP_DATETIME); + } + if (update_status) + { + fields[ET_FIELD_STATUS]->set_notnull(); + fields[ET_FIELD_STATUS]->store(status, TRUE); + } + + if ((ret= table->file->ha_update_row(table->record[1], table->record[0]))) + { + table->file->print_error(ret, MYF(0)); + goto end; + } + + ret= 0; + +end: + if (table) + close_thread_tables(thd); + + DBUG_RETURN(test(ret)); +} + + +/** + Open mysql.db, mysql.user and mysql.event and check whether: + - mysql.db exists and is up to date (or from a newer version of MySQL), + - mysql.user has column Event_priv at an expected position, + - mysql.event exists and is up to date (or from a newer version of + MySQL) + + This function is called only when the server is started. + @pre The passed in thread handle has no open tables. + + @retval FALSE OK + @retval TRUE Error, an error message is output to the error log. +*/ + +bool +Event_db_repository::check_system_tables(THD *thd) +{ + TABLE_LIST tables; + int ret= FALSE; + const unsigned int event_priv_column_position= 29; + + DBUG_ENTER("Event_db_repository::check_system_tables"); + DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd)); + + + /* Check mysql.db */ + tables.init_one_table("mysql", "db", TL_READ); + + if (simple_open_n_lock_tables(thd, &tables)) + { + ret= 1; + sql_print_error("Cannot open mysql.db"); + } + else + { + if (table_check_intact(tables.table, MYSQL_DB_FIELD_COUNT, + mysql_db_table_fields)) + ret= 1; + /* in case of an error, the message is printed inside table_check_intact */ + + close_thread_tables(thd); + } + /* Check mysql.user */ + tables.init_one_table("mysql", "user", TL_READ); + + if (simple_open_n_lock_tables(thd, &tables)) + { + ret= 1; + sql_print_error("Cannot open mysql.user"); + } + else + { + if (tables.table->s->fields < event_priv_column_position || + strncmp(tables.table->field[event_priv_column_position]->field_name, + STRING_WITH_LEN("Event_priv"))) + { + sql_print_error("mysql.user has no `Event_priv` column at position %d", + event_priv_column_position); + ret= 1; + } + close_thread_tables(thd); + } + /* Check mysql.event */ + tables.init_one_table("mysql", "event", TL_READ); + + if (simple_open_n_lock_tables(thd, &tables)) + { + ret= 1; + sql_print_error("Cannot open mysql.event"); + } + else + { + if (table_check_intact(tables.table, ET_FIELD_COUNT, event_table_fields)) + ret= 1; + /* in case of an error, the message is printed inside table_check_intact */ + close_thread_tables(thd); + } + + DBUG_RETURN(test(ret)); +} diff --git a/sql/event_db_repository.h b/sql/event_db_repository.h index 7d609dba860..01de0be3afd 100644 --- a/sql/event_db_repository.h +++ b/sql/event_db_repository.h @@ -15,7 +15,12 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#define EVEX_OPEN_TABLE_FAILED -1 +/* + @file + This is a private header file of Events module. Please do not include it + directly. All public declarations of Events module should be stored in + events.h and event_data_objects.h. +*/ enum enum_events_table_field { @@ -69,17 +74,28 @@ public: drop_schema_events(THD *thd, LEX_STRING schema); bool - find_named_event(THD *thd, LEX_STRING db, LEX_STRING name, TABLE *table); + find_named_event(LEX_STRING db, LEX_STRING name, TABLE *table); bool load_named_event(THD *thd, LEX_STRING dbname, LEX_STRING name, Event_basic *et); - int + bool open_event_table(THD *thd, enum thr_lock_type lock_type, TABLE **table); - int + bool fill_schema_events(THD *thd, TABLE_LIST *tables, const char *db); + bool + update_timing_fields_for_event(THD *thd, + LEX_STRING event_db_name, + LEX_STRING event_name, + bool update_last_executed, + my_time_t last_executed, + bool update_status, + ulonglong status); +public: + static bool + check_system_tables(THD *thd); private: void drop_events_by_field(THD *thd, enum enum_events_table_field field, @@ -91,9 +107,7 @@ private: bool table_scan_all_for_i_s(THD *thd, TABLE *schema_table, TABLE *event_table); - static bool - check_system_tables(THD *thd); - +private: /* Prevent use of these */ Event_db_repository(const Event_db_repository &); void operator=(Event_db_repository &); diff --git a/sql/event_queue.cc b/sql/event_queue.cc index f110bfdd1bf..2fe6e0b87e0 100644 --- a/sql/event_queue.cc +++ b/sql/event_queue.cc @@ -72,39 +72,21 @@ event_queue_element_compare_q(void *vptr, byte* a, byte *b) Event_queue::Event_queue() :mutex_last_unlocked_at_line(0), mutex_last_locked_at_line(0), mutex_last_attempted_lock_at_line(0), - mutex_queue_data_locked(FALSE), mutex_queue_data_attempting_lock(FALSE) + mutex_queue_data_locked(FALSE), + mutex_queue_data_attempting_lock(FALSE), + next_activation_at(0) { mutex_last_unlocked_in_func= mutex_last_locked_in_func= mutex_last_attempted_lock_in_func= ""; - next_activation_at= 0; -} - -/* - Inits mutexes. - - SYNOPSIS - Event_queue::init_mutexes() -*/ - -void -Event_queue::init_mutexes() -{ pthread_mutex_init(&LOCK_event_queue, MY_MUTEX_INIT_FAST); pthread_cond_init(&COND_queue_state, NULL); } -/* - Destroys mutexes. - - SYNOPSIS - Event_queue::deinit_mutexes() -*/ - -void -Event_queue::deinit_mutexes() +Event_queue::~Event_queue() { + deinit_queue(); pthread_mutex_destroy(&LOCK_event_queue); pthread_cond_destroy(&COND_queue_state); } @@ -176,33 +158,47 @@ Event_queue::deinit_queue() /** Adds an event to the queue. - SYNOPSIS - Event_queue::create_event() - dbname The schema of the new event - name The name of the new event + Compute the next execution time for an event, and if it is still + active, add it to the queue. Otherwise delete it. + The object is left intact in case of an error. Otherwise + the queue container assumes ownership of it. + + @param[in] thd thread handle + @param[in] new_element a new element to add to the queue + @param[out] created set to TRUE if no error and the element is + added to the queue, FALSE otherwise + + @retval TRUE an error occured. The value of created is undefined, + the element was not deleted. + @retval FALSE success */ -void -Event_queue::create_event(THD *thd, Event_queue_element *new_element) +bool +Event_queue::create_event(THD *thd, Event_queue_element *new_element, + bool *created) { DBUG_ENTER("Event_queue::create_event"); DBUG_PRINT("enter", ("thd: 0x%lx et=%s.%s", (long) thd, new_element->dbname.str, new_element->name.str)); + /* Will do nothing if the event is disabled */ + new_element->compute_next_execution_time(); if (new_element->status == Event_queue_element::DISABLED) - delete new_element; - else { - new_element->compute_next_execution_time(); - DBUG_PRINT("info", ("new event in the queue: 0x%lx", (long) new_element)); - - LOCK_QUEUE_DATA(); - queue_insert_safe(&queue, (byte *) new_element); - dbug_dump_queue(thd->query_start()); - pthread_cond_broadcast(&COND_queue_state); - UNLOCK_QUEUE_DATA(); + delete new_element; + *created= FALSE; + DBUG_RETURN(FALSE); } - DBUG_VOID_RETURN; + + DBUG_PRINT("info", ("new event in the queue: 0x%lx", (long) new_element)); + + LOCK_QUEUE_DATA(); + *created= (queue_insert_safe(&queue, (byte *) new_element) == FALSE); + dbug_dump_queue(thd->query_start()); + pthread_cond_broadcast(&COND_queue_state); + UNLOCK_QUEUE_DATA(); + + DBUG_RETURN(!*created); } diff --git a/sql/event_queue.h b/sql/event_queue.h index 95f52b7b588..04bb8b93b06 100644 --- a/sql/event_queue.h +++ b/sql/event_queue.h @@ -25,23 +25,16 @@ class Event_queue { public: Event_queue(); - - void - init_mutexes(); - - void - deinit_mutexes(); + ~Event_queue(); bool init_queue(THD *thd); - void - deinit_queue(); - /* Methods for queue management follow */ - void - create_event(THD *thd, Event_queue_element *new_element); + bool + create_event(THD *thd, Event_queue_element *new_element, + bool *created); void update_event(THD *thd, LEX_STRING dbname, LEX_STRING name, @@ -64,9 +57,23 @@ public: void dump_internal_status(); +private: void empty_queue(); -protected: + + void + deinit_queue(); + /* helper functions for working with mutexes & conditionals */ + void + lock_data(const char *func, uint line); + + void + unlock_data(const char *func, uint line); + + void + cond_wait(THD *thd, struct timespec *abstime, const char* msg, + const char *func, uint line); + void find_n_remove_event(LEX_STRING db, LEX_STRING name); @@ -98,16 +105,6 @@ protected: bool mutex_queue_data_attempting_lock; bool waiting_on_cond; - /* helper functions for working with mutexes & conditionals */ - void - lock_data(const char *func, uint line); - - void - unlock_data(const char *func, uint line); - - void - cond_wait(THD *thd, struct timespec *abstime, const char* msg, - const char *func, uint line); }; #endif /* _EVENT_QUEUE_H_ */ diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc index d50ea932596..a9a93cbc74b 100644 --- a/sql/event_scheduler.cc +++ b/sql/event_scheduler.cc @@ -37,7 +37,6 @@ extern pthread_attr_t connection_attrib; Event_db_repository *Event_worker_thread::db_repository; -Events *Event_worker_thread::events_facade; static @@ -80,11 +79,11 @@ Event_worker_thread::print_warnings(THD *thd, Event_job_data *et) prefix.length(0); prefix.append("Event Scheduler: ["); - append_identifier(thd, &prefix, et->definer.str, et->definer.length); + prefix.append(et->definer.str, et->definer.length, system_charset_info); prefix.append("][", 2); - append_identifier(thd,&prefix, et->dbname.str, et->dbname.length); + prefix.append(et->dbname.str, et->dbname.length, system_charset_info); prefix.append('.'); - append_identifier(thd,&prefix, et->name.str, et->name.length); + prefix.append(et->name.str, et->name.length, system_charset_info); prefix.append("] ", 2); List_iterator_fast it(thd->warn_list); @@ -95,7 +94,6 @@ Event_worker_thread::print_warnings(THD *thd, Event_job_data *et) err_msg.length(0); err_msg.append(prefix); err_msg.append(err->msg, strlen(err->msg), system_charset_info); - err_msg.append("]"); DBUG_ASSERT(err->level < 3); (sql_print_message_handlers[err->level])("%*s", err_msg.length(), err_msg.c_ptr()); @@ -239,7 +237,7 @@ event_scheduler_thread(void *arg) } -/* +/** Function that executes an event in a child thread. Setups the environment for the event execution and cleans after that. @@ -266,7 +264,7 @@ event_worker_thread(void *arg) } -/* +/** Function that executes an event in a child thread. Setups the environment for the event execution and cleans after that. @@ -315,17 +313,27 @@ Event_worker_thread::run(THD *thd, Event_queue_element_for_exec *event) print_warnings(thd, job_data); - sql_print_information("Event Scheduler: " - "[%s.%s of %s] executed in thread %lu. " - "RetCode=%d", job_data->dbname.str, job_data->name.str, - job_data->definer.str, thd->thread_id, ret); - if (ret == EVEX_COMPILE_ERROR) + switch (ret) { + case 0: sql_print_information("Event Scheduler: " - "COMPILE ERROR for event %s.%s of %s", + "[%s].[%s.%s] executed successfully in thread %lu.", + job_data->definer.str, job_data->dbname.str, job_data->name.str, - job_data->definer.str); - else if (ret == EVEX_MICROSECOND_UNSUP) - sql_print_information("Event Scheduler: MICROSECOND is not supported"); + thd->thread_id); + break; + case EVEX_COMPILE_ERROR: + sql_print_information("Event Scheduler: " + "[%s].[%s.%s] event compilation failed.", + job_data->definer.str, + job_data->dbname.str, job_data->name.str); + break; + default: + sql_print_information("Event Scheduler: " + "[%s].[%s.%s] event execution failed.", + job_data->definer.str, + job_data->dbname.str, job_data->name.str); + break; + } end: delete job_data; @@ -349,66 +357,34 @@ end: problem. However, this comes at the price of introduction bi-directional association between class Events and class Event_worker_thread. */ - events_facade->drop_event(thd, event->dbname, event->name, FALSE); + Events::drop_event(thd, event->dbname, event->name, FALSE); } DBUG_PRINT("info", ("Done with Event %s.%s", event->dbname.str, event->name.str)); delete event; deinit_event_thread(thd); - pthread_exit(0); + /* + Do not pthread_exit since we want local destructors for stack objects + to be invoked. + */ } -/* - Performs initialization of the scheduler data, outside of the - threading primitives. - - SYNOPSIS - Event_scheduler::init_scheduler() -*/ - -void -Event_scheduler::init_scheduler(Event_queue *q) -{ - LOCK_DATA(); - queue= q; - started_events= 0; - scheduler_thd= NULL; - state= INITIALIZED; - UNLOCK_DATA(); -} - - -void -Event_scheduler::deinit_scheduler() {} - - -/* - Inits scheduler's threading primitives. - - SYNOPSIS - Event_scheduler::init_mutexes() -*/ - -void -Event_scheduler::init_mutexes() +Event_scheduler::Event_scheduler(Event_queue *queue_arg) + :state(UNINITIALIZED), + scheduler_thd(NULL), + queue(queue_arg), + started_events(0) { pthread_mutex_init(&LOCK_scheduler_state, MY_MUTEX_INIT_FAST); pthread_cond_init(&COND_state, NULL); } -/* - Deinits scheduler's threading primitives. - - SYNOPSIS - Event_scheduler::deinit_mutexes() -*/ - -void -Event_scheduler::deinit_mutexes() +Event_scheduler::~Event_scheduler() { + stop(); /* does nothing if not running */ pthread_mutex_destroy(&LOCK_scheduler_state); pthread_cond_destroy(&COND_state); } @@ -639,6 +615,9 @@ Event_scheduler::is_running() Stops the scheduler (again). Waits for acknowledgement from the scheduler that it has stopped - synchronous stopping. + Already running events will not be stopped. If the user needs + them stopped manual intervention is needed. + SYNOPSIS Event_scheduler::stop() diff --git a/sql/event_scheduler.h b/sql/event_scheduler.h index 74d53c4f63d..70635196745 100644 --- a/sql/event_scheduler.h +++ b/sql/event_scheduler.h @@ -15,7 +15,8 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* +/** + @file This file is internal to Events module. Please do not include it directly. All public declarations of Events module are in events.h and event_data_objects.h. @@ -41,10 +42,9 @@ class Event_worker_thread { public: static void - init(Events *events, Event_db_repository *db_repo) + init(Event_db_repository *db_repository_arg) { - db_repository= db_repo; - events_facade= events; + db_repository= db_repository_arg; } void @@ -55,15 +55,15 @@ private: print_warnings(THD *thd, Event_job_data *et); static Event_db_repository *db_repository; - static Events *events_facade; }; class Event_scheduler { public: - Event_scheduler():state(UNINITIALIZED){} - ~Event_scheduler(){} + Event_scheduler(Event_queue *event_queue_arg); + ~Event_scheduler(); + /* State changing methods follow */ @@ -80,17 +80,6 @@ public: bool run(THD *thd); - void - init_scheduler(Event_queue *queue); - - void - deinit_scheduler(); - - void - init_mutexes(); - - void - deinit_mutexes(); /* Information retrieving methods follow */ bool diff --git a/sql/events.cc b/sql/events.cc index fd8160e103c..3182cea25f2 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -19,7 +19,6 @@ #include "event_db_repository.h" #include "event_queue.h" #include "event_scheduler.h" -#include "sp_head.h" /* TODO list : @@ -66,7 +65,7 @@ static const char *opt_event_scheduler_state_names[]= { "OFF", "ON", "0", "1", "DISABLED", NullS }; -TYPELIB Events::opt_typelib= +const TYPELIB Events::opt_typelib= { array_elements(opt_event_scheduler_state_names)-1, "", @@ -82,7 +81,7 @@ TYPELIB Events::opt_typelib= */ static const char *var_event_scheduler_state_names[]= { "OFF", "ON", NullS }; -TYPELIB Events::var_typelib= +const TYPELIB Events::var_typelib= { array_elements(var_event_scheduler_state_names)-1, "", @@ -90,20 +89,13 @@ TYPELIB Events::var_typelib= NULL }; - -static -Event_queue events_event_queue; - -static -Event_scheduler events_event_scheduler; - - -Event_db_repository events_event_db_repository; - -Events Events::singleton; - -enum Events::enum_opt_event_scheduler Events::opt_event_scheduler= - Events::EVENTS_OFF; +Event_queue *Events::event_queue; +Event_scheduler *Events::scheduler; +Event_db_repository *Events::db_repository; +enum Events::enum_opt_event_scheduler +Events::opt_event_scheduler= Events::EVENTS_OFF; +pthread_mutex_t Events::LOCK_event_metadata; +bool Events::check_system_tables_error= FALSE; /* @@ -128,25 +120,89 @@ int sortcmp_lex_string(LEX_STRING s, LEX_STRING t, CHARSET_INFO *cs) } -/* - Accessor for the singleton instance. +/** + @brief Initialize the start up option of the Events scheduler. - SYNOPSIS - Events::get_instance() + Do not initialize the scheduler subsystem yet - the initialization + is split into steps as it has to fit into the common MySQL + initialization framework. + No locking as this is called only at start up. - RETURN VALUE - address + @param[in,out] argument The value of the argument. If this value + is found in the typelib, the argument is + updated. + + @retval TRUE unknown option value + @retval FALSE success */ -Events * -Events::get_instance() +bool +Events::set_opt_event_scheduler(char *argument) { - DBUG_ENTER("Events::get_instance"); - DBUG_RETURN(&singleton); + if (argument == NULL) + opt_event_scheduler= Events::EVENTS_DISABLED; + else + { + int type; + /* + type= 1 2 3 4 5 + (OFF | ON) - (0 | 1) (DISABLE ) + */ + const static enum enum_opt_event_scheduler type2state[]= + { EVENTS_OFF, EVENTS_ON, EVENTS_OFF, EVENTS_ON, EVENTS_DISABLED }; + + type= find_type(argument, &opt_typelib, 1); + + DBUG_ASSERT(type >= 0 && type <= 5); /* guaranteed by find_type */ + + if (type == 0) + { + fprintf(stderr, "Unknown option to event-scheduler: %s\n", argument); + return TRUE; + } + opt_event_scheduler= type2state[type-1]; + } + return FALSE; } -/* +/** + Return a string representation of the current scheduler mode. +*/ + +const char * +Events::get_opt_event_scheduler_str() +{ + const char *str; + + pthread_mutex_lock(&LOCK_event_metadata); + str= opt_typelib.type_names[(int) opt_event_scheduler]; + pthread_mutex_unlock(&LOCK_event_metadata); + + return str; +} + + +/** + Push an error into the error stack if the system tables are + not up to date. +*/ + +bool Events::check_if_system_tables_error() +{ + DBUG_ENTER("Events::check_if_system_tables_error"); + + if (check_system_tables_error) + { + my_error(ER_EVENTS_DB_ERROR, MYF(0)); + DBUG_RETURN(TRUE); + } + + DBUG_RETURN(FALSE); +} + + +/** Reconstructs interval expression from interval type and expression value that is in form of a value of the smalles entity: For @@ -278,56 +334,70 @@ common_1_lev_code: return 0; } -/* - Constructor of Events class. It's called when events.o - is loaded. Assigning addressed of static variables in this - object file. - SYNOPSIS - Events::Events() -*/ +/** + Create a new event. -Events::Events() -{ - scheduler= &events_event_scheduler; - event_queue= &events_event_queue; - db_repository= &events_event_db_repository; -} + @param[in,out] thd THD + @param[in] parse_data Event's data from parsing stage + @param[in] if_not_exists Whether IF NOT EXISTS was + specified + In case there is an event with the same name (db) and + IF NOT EXISTS is specified, an warning is put into the stack. + @sa Events::drop_event for the notes about locking, pre-locking + and Events DDL. - -/* - The function exported to the world for creating of events. - - SYNOPSIS - Events::create_event() - thd [in] THD - parse_data [in] Event's data from parsing stage - if_not_exists [in] Whether IF NOT EXISTS was specified in the DDL - - RETURN VALUE - FALSE OK - TRUE Error (Reported) - - NOTES - In case there is an event with the same name (db) and - IF NOT EXISTS is specified, an warning is put into the stack. + @retval FALSE OK + @retval TRUE Error (reported) */ bool -Events::create_event(THD *thd, Event_parse_data *parse_data, bool if_not_exists) +Events::create_event(THD *thd, Event_parse_data *parse_data, + bool if_not_exists) { int ret; DBUG_ENTER("Events::create_event"); - if (unlikely(check_system_tables_error)) + + /* + Let's commit the transaction first - MySQL manual specifies + that a DDL issues an implicit commit, and it doesn't say "successful + DDL", so that an implicit commit is a property of any successfully + parsed DDL statement. + */ + if (end_active_trans(thd)) + DBUG_RETURN(TRUE); + + if (check_if_system_tables_error()) + DBUG_RETURN(TRUE); + + /* + Perform semantic checks outside of Event_db_repository: + once CREATE EVENT is supported in prepared statements, the + checks will be moved to PREPARE phase. + */ + if (parse_data->check_parse_data(thd)) + DBUG_RETURN(TRUE); + + /* At create, one of them must be set */ + DBUG_ASSERT(parse_data->expression || parse_data->execute_at); + + if (check_access(thd, EVENT_ACL, parse_data->dbname.str, 0, 0, 0, + is_schema_db(parse_data->dbname.str))) + DBUG_RETURN(TRUE); + + if (check_db_dir_existence(parse_data->dbname.str)) { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); + my_error(ER_BAD_DB_ERROR, MYF(0)); DBUG_RETURN(TRUE); } + if (parse_data->do_not_create) + DBUG_RETURN(FALSE); + pthread_mutex_lock(&LOCK_event_metadata); + /* On error conditions my_error() is called so no need to handle here */ - if (!(ret= db_repository->create_event(thd, parse_data, if_not_exists)) && - !parse_data->do_not_create) + if (!(ret= db_repository->create_event(thd, parse_data, if_not_exists))) { Event_queue_element *new_element; @@ -337,11 +407,16 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, bool if_not_exists) parse_data->name, new_element))) { - DBUG_ASSERT(ret == OP_LOAD_ERROR); + db_repository->drop_event(thd, parse_data->dbname, parse_data->name, + TRUE); delete new_element; } - else - event_queue->create_event(thd, new_element); + else if (event_queue) + { + /* TODO: do not ignore the out parameter and a possible OOM error! */ + bool created; + event_queue->create_event(thd, new_element, &created); + } } pthread_mutex_unlock(&LOCK_event_metadata); @@ -349,42 +424,85 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, bool if_not_exists) } -/* - The function exported to the world for alteration of events. +/** + Alter an event. - SYNOPSIS - Events::update_event() - thd [in] THD - parse_data [in] Event's data from parsing stage - rename_to [in] Set in case of RENAME TO. + @param[in,out] thd THD + @param[in] parse_data Event's data from parsing stage + @param[in] new_dbname A new schema name for the event. Set in the case of + ALTER EVENT RENAME, otherwise is NULL. + @param[in] new_name A new name for the event. Set in the case of + ALTER EVENT RENAME - RETURN VALUE - FALSE OK - TRUE Error + Parameter 'et' contains data about dbname and event name. + Parameter 'new_name' is the new name of the event, if not null + this means that RENAME TO was specified in the query + @sa Events::drop_event for the locking notes. - NOTES - et contains data about dbname and event name. - new_name is the new name of the event, if not null this means - that RENAME TO was specified in the query + @retval FALSE OK + @retval TRUE error (reported) */ bool -Events::update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to) +Events::update_event(THD *thd, Event_parse_data *parse_data, + LEX_STRING *new_dbname, LEX_STRING *new_name) { int ret; Event_queue_element *new_element; + DBUG_ENTER("Events::update_event"); - LEX_STRING *new_dbname= rename_to ? &rename_to->m_db : NULL; - LEX_STRING *new_name= rename_to ? &rename_to->m_name : NULL; - if (unlikely(check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); + + /* + For consistency, implicit COMMIT should be the first thing in the + execution chain. + */ + if (end_active_trans(thd)) DBUG_RETURN(TRUE); + + if (check_if_system_tables_error()) + DBUG_RETURN(TRUE); + + if (parse_data->check_parse_data(thd) || parse_data->do_not_create) + DBUG_RETURN(TRUE); + + if (check_access(thd, EVENT_ACL, parse_data->dbname.str, 0, 0, 0, + is_schema_db(parse_data->dbname.str))) + DBUG_RETURN(TRUE); + + if (new_dbname) /* It's a rename */ + { + /* Check that the new and the old names differ. */ + if ( !sortcmp_lex_string(parse_data->dbname, *new_dbname, + system_charset_info) && + !sortcmp_lex_string(parse_data->name, *new_name, + system_charset_info)) + { + my_error(ER_EVENT_SAME_NAME, MYF(0), parse_data->name.str); + DBUG_RETURN(TRUE); + } + + /* + And the user has sufficient privileges to use the target database. + Do it before checking whether the database exists: we don't want + to tell the user that a database doesn't exist if they can not + access it. + */ + if (check_access(thd, EVENT_ACL, new_dbname->str, 0, 0, 0, + is_schema_db(new_dbname->str))) + DBUG_RETURN(TRUE); + + /* Check that the target database exists */ + if (check_db_dir_existence(new_dbname->str)) + { + my_error(ER_BAD_DB_ERROR, MYF(0)); + DBUG_RETURN(TRUE); + } } pthread_mutex_lock(&LOCK_event_metadata); /* On error conditions my_error() is called so no need to handle here */ - if (!(ret= db_repository->update_event(thd, parse_data, new_dbname, new_name))) + if (!(ret= db_repository->update_event(thd, parse_data, + new_dbname, new_name))) { LEX_STRING dbname= new_dbname ? *new_dbname : parse_data->dbname; LEX_STRING name= new_name ? *new_name : parse_data->name; @@ -397,9 +515,17 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to) DBUG_ASSERT(ret == OP_LOAD_ERROR); delete new_element; } - else + else if (event_queue) + { + /* + TODO: check if an update actually has inserted an entry + into the queue. + If not, and the element is ON COMPLETION NOT PRESERVE, delete + it right away. + */ event_queue->update_event(thd, parse_data->dbname, parse_data->name, new_element); + } } pthread_mutex_unlock(&LOCK_event_metadata); @@ -407,20 +533,28 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to) } -/* +/** Drops an event - SYNOPSIS - Events::drop_event() - thd [in] THD - dbname [in] Event's schema - name [in] Event's name - if_exists [in] When set and the event does not exist => - warning onto the stack + @param[in,out] thd THD + @param[in] dbname Event's schema + @param[in] name Event's name + @param[in] if_exists When this is set and the event does not exist + a warning is pushed into the warning stack. + Otherwise the operation produces an error. - RETURN VALUE - FALSE OK - TRUE Error (reported) + @note Similarly to DROP PROCEDURE, we do not allow DROP EVENT + under LOCK TABLES mode, unless table mysql.event is locked. To + ensure that, we do not reset & backup the open tables state in + this function - if in LOCK TABLES or pre-locking mode, this will + lead to an error 'Table mysql.event is not locked with LOCK + TABLES' unless it _is_ locked. In pre-locked mode there is + another barrier - DROP EVENT commits the current transaction, + and COMMIT/ROLLBACK is not allowed in stored functions and + triggers. + + @retval FALSE OK + @retval TRUE Error (reported) */ bool @@ -428,16 +562,35 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) { int ret; DBUG_ENTER("Events::drop_event"); - if (unlikely(check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); + + /* + In MySQL, DDL must always commit: since mysql.* tables are + non-transactional, we must modify them outside a transaction + to not break atomicity. + But the second and more important reason to commit here + regardless whether we're actually changing mysql.event table + or not is replication: end_active_trans syncs the binary log, + and unless we run DDL in it's own transaction it may simply + never appear on the slave in case the outside transaction + rolls back. + */ + if (end_active_trans(thd)) + DBUG_RETURN(TRUE); + + if (check_if_system_tables_error()) + DBUG_RETURN(TRUE); + + if (check_access(thd, EVENT_ACL, dbname.str, 0, 0, 0, + is_schema_db(dbname.str))) DBUG_RETURN(TRUE); - } pthread_mutex_lock(&LOCK_event_metadata); /* On error conditions my_error() is called so no need to handle here */ if (!(ret= db_repository->drop_event(thd, dbname, name, if_exists))) - event_queue->drop_event(thd, dbname, name); + { + if (event_queue) + event_queue->drop_event(thd, dbname, name); + } pthread_mutex_unlock(&LOCK_event_metadata); DBUG_RETURN(ret); } @@ -446,10 +599,12 @@ Events::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists) /** Drops all events from a schema - SYNOPSIS - Events::drop_schema_events() - thd Thread - db ASCIIZ schema name + @note We allow to drop all events in a schema even if the + scheduler is disabled. This is to not produce any warnings + in case of DROP DATABASE and a disabled scheduler. + + @param[in,out] thd Thread + @param[in] db ASCIIZ schema name */ void @@ -459,14 +614,15 @@ Events::drop_schema_events(THD *thd, char *db) DBUG_ENTER("Events::drop_schema_events"); DBUG_PRINT("enter", ("dropping events from %s", db)); - if (unlikely(check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); - DBUG_VOID_RETURN; - } + + /* + sic: no check if the scheduler is disabled or system tables + are damaged, as intended. + */ pthread_mutex_lock(&LOCK_event_metadata); - event_queue->drop_schema_events(thd, db_lex); + if (event_queue) + event_queue->drop_schema_events(thd, db_lex); db_repository->drop_schema_events(thd, db_lex); pthread_mutex_unlock(&LOCK_event_metadata); @@ -474,115 +630,137 @@ Events::drop_schema_events(THD *thd, char *db) } -/* - SHOW CREATE EVENT +/** + A helper function to generate SHOW CREATE EVENT output from + a named event +*/ + +static bool +send_show_create_event(THD *thd, Event_timed *et, Protocol *protocol) +{ + char show_str_buf[10 * STRING_BUFFER_USUAL_SIZE]; + String show_str(show_str_buf, sizeof(show_str_buf), system_charset_info); + List field_list; + LEX_STRING sql_mode; + const String *tz_name; + + DBUG_ENTER("send_show_create_event"); + + show_str.length(0); + if (et->get_create_event(thd, &show_str)) + DBUG_RETURN(TRUE); + + field_list.push_back(new Item_empty_string("Event", NAME_LEN)); + + if (sys_var_thd_sql_mode::symbolic_mode_representation(thd, et->sql_mode, + &sql_mode)) + DBUG_RETURN(TRUE); + + field_list.push_back(new Item_empty_string("sql_mode", sql_mode.length)); + + tz_name= et->time_zone->get_name(); + + field_list.push_back(new Item_empty_string("time_zone", + tz_name->length())); + + field_list.push_back(new Item_empty_string("Create Event", + show_str.length())); + + if (protocol->send_fields(&field_list, + Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF)) + DBUG_RETURN(TRUE); + + protocol->prepare_for_resend(); + + protocol->store(et->name.str, et->name.length, system_charset_info); + protocol->store(sql_mode.str, sql_mode.length, system_charset_info); + protocol->store(tz_name->ptr(), tz_name->length(), system_charset_info); + protocol->store(show_str.c_ptr(), show_str.length(), system_charset_info); + + if (protocol->write()) + DBUG_RETURN(TRUE); + + send_eof(thd); + + DBUG_RETURN(FALSE); +} + + +/** + Implement SHOW CREATE EVENT statement - SYNOPSIS - Events::show_create_event() thd Thread context spn The name of the event (db, name) - RETURN VALUE - FALSE OK - TRUE Error during writing to the wire + @retval FALSE OK + @retval TRUE error (reported) */ bool Events::show_create_event(THD *thd, LEX_STRING dbname, LEX_STRING name) { - CHARSET_INFO *scs= system_charset_info; - int ret; - Event_timed *et= new Event_timed(); + Open_tables_state open_tables_backup; + Event_timed et; + bool ret; DBUG_ENTER("Events::show_create_event"); DBUG_PRINT("enter", ("name: %s@%s", dbname.str, name.str)); - if (unlikely(check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); - DBUG_RETURN(TRUE); - } - ret= db_repository->load_named_event(thd, dbname, name, et); + if (check_if_system_tables_error()) + DBUG_RETURN(TRUE); + + if (check_access(thd, EVENT_ACL, dbname.str, 0, 0, 0, + is_schema_db(dbname.str))) + DBUG_RETURN(TRUE); + + /* + We would like to allow SHOW CREATE EVENT under LOCK TABLES and + in pre-locked mode. mysql.event table is marked as a system table. + This flag reduces the set of its participation scenarios in LOCK TABLES + operation, and therefore an out-of-bound open of this table + for reading like the one below (sic, only for reading) is + more or less deadlock-free. For additional information about when a + deadlock can occur please refer to the description of 'system table' + flag. + */ + thd->reset_n_backup_open_tables_state(&open_tables_backup); + ret= db_repository->load_named_event(thd, dbname, name, &et); + thd->restore_backup_open_tables_state(&open_tables_backup); if (!ret) - { - Protocol *protocol= thd->protocol; - char show_str_buf[10 * STRING_BUFFER_USUAL_SIZE]; - String show_str(show_str_buf, sizeof(show_str_buf), scs); - List field_list; - byte *sql_mode_str; - ulong sql_mode_len=0; + ret= send_show_create_event(thd, &et, thd->protocol); - show_str.length(0); - show_str.set_charset(system_charset_info); - - if (et->get_create_event(thd, &show_str)) - goto err; - - field_list.push_back(new Item_empty_string("Event", NAME_LEN)); - - sql_mode_str= - sys_var_thd_sql_mode::symbolic_mode_representation(thd, et->sql_mode, - &sql_mode_len); - - field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len)); - - const String *tz_name= et->time_zone->get_name(); - field_list.push_back(new Item_empty_string("time_zone", - tz_name->length())); - - field_list.push_back(new Item_empty_string("Create Event", - show_str.length())); - - if (protocol->send_fields(&field_list, Protocol::SEND_NUM_ROWS | - Protocol::SEND_EOF)) - goto err; - - protocol->prepare_for_resend(); - protocol->store(et->name.str, et->name.length, scs); - - protocol->store((char*) sql_mode_str, sql_mode_len, scs); - - protocol->store((char*) tz_name->ptr(), tz_name->length(), scs); - - protocol->store(show_str.c_ptr(), show_str.length(), scs); - ret= protocol->write(); - send_eof(thd); - } - delete et; DBUG_RETURN(ret); -err: - delete et; - DBUG_RETURN(TRUE); } -/* - Proxy for Event_db_repository::fill_schema_events. - Callback for I_S from sql_show.cc +/** + Check access rights and fill INFORMATION_SCHEMA.events table. - SYNOPSIS - Events::fill_schema_events() - thd Thread context - tables The schema table + @param[in,out] thd Thread context + @param[in] table The temporary table to fill. cond Unused - RETURN VALUE - 0 OK - !0 Error + In MySQL INFORMATION_SCHEMA tables are temporary tables that are + created and filled on demand. In this function, we fill + INFORMATION_SCHEMA.events. It is a callback for I_S module, invoked from + sql_show.cc + + @return Has to be integer, as such is the requirement of the I_S API + @retval 0 success + @retval 1 an error, pushed into the error stack */ int Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */) { char *db= NULL; + int ret; + Open_tables_state open_tables_backup; DBUG_ENTER("Events::fill_schema_events"); - Events *myself= get_instance(); - if (unlikely(myself->check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); - DBUG_RETURN(TRUE); - } + + if (check_if_system_tables_error()) + DBUG_RETURN(1); /* If it's SHOW EVENTS then thd->lex->select_lex.db is guaranteed not to @@ -596,7 +774,17 @@ Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */) DBUG_RETURN(1); db= thd->lex->select_lex.db; } - DBUG_RETURN(myself->db_repository->fill_schema_events(thd, tables, db)); + /* + Reset and backup of the currently open tables in this thread + is a way to allow SELECTs from INFORMATION_SCHEMA.events under + LOCK TABLES and in pre-locked mode. See also + Events::show_create_event for additional comments. + */ + thd->reset_n_backup_open_tables_state(&open_tables_backup); + ret= db_repository->fill_schema_events(thd, tables, db); + thd->restore_backup_open_tables_state(&open_tables_backup); + + DBUG_RETURN(ret); } @@ -615,14 +803,17 @@ Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */) */ bool -Events::init() +Events::init(my_bool opt_noacl) { THD *thd; bool res= FALSE; + DBUG_ENTER("Events::init"); - if (opt_event_scheduler == Events::EVENTS_DISABLED) - DBUG_RETURN(FALSE); + /* Disable the scheduler if running with --skip-grant-tables */ + if (opt_noacl) + opt_event_scheduler= EVENTS_DISABLED; + /* We need a temporary THD during boot */ if (!(thd= new THD())) @@ -638,30 +829,67 @@ Events::init() thd->thread_stack= (char*) &thd; thd->store_globals(); - if (check_system_tables(thd)) + /* + We will need Event_db_repository anyway, even if the scheduler is + disabled - to perform events DDL. + */ + if (!(db_repository= new Event_db_repository)) { + res= TRUE; /* fatal error: request unireg_abort */ + goto end; + } + + /* + Since we allow event DDL even if the scheduler is disabled, + check the system tables, as we might need them. + */ + if (Event_db_repository::check_system_tables(thd)) + { + sql_print_error("Event Scheduler: An error occurred when initializing " + "system tables.%s", + opt_event_scheduler == EVENTS_DISABLED ? + "" : " Disabling the Event Scheduler."); + + /* Disable the scheduler since the system tables are not up to date */ + opt_event_scheduler= EVENTS_DISABLED; check_system_tables_error= TRUE; - sql_print_error("Event Scheduler: The system tables are damaged. " - "The scheduler subsystem will be unusable during this run."); - goto end; - } - check_system_tables_error= FALSE; - - if (event_queue->init_queue(thd) || load_events_from_db(thd)) - { - sql_print_error("Event Scheduler: Error while loading from disk."); goto end; } - scheduler->init_scheduler(event_queue); + /* + Was disabled explicitly from the command line, or because we're running + with --skip-grant-tables, or because we have no system tables. + */ + if (opt_event_scheduler == Events::EVENTS_DISABLED) + goto end; + DBUG_ASSERT(opt_event_scheduler == Events::EVENTS_ON || opt_event_scheduler == Events::EVENTS_OFF); - if (opt_event_scheduler == Events::EVENTS_ON) - res= scheduler->start(); - Event_worker_thread::init(this, db_repository); + if (!(event_queue= new Event_queue) || + !(scheduler= new Event_scheduler(event_queue))) + { + res= TRUE; /* fatal error: request unireg_abort */ + goto end; + } + + if (event_queue->init_queue(thd) || load_events_from_db(thd) || + opt_event_scheduler == EVENTS_ON && scheduler->start()) + { + sql_print_error("Event Scheduler: Error while loading from disk."); + res= TRUE; /* fatal error: request unireg_abort */ + goto end; + } + Event_worker_thread::init(db_repository); + end: + if (res) + { + delete db_repository; + delete event_queue; + delete scheduler; + } delete thd; /* Remember that we don't have a THD */ my_pthread_setspecific_ptr(THR_THD, NULL); @@ -684,14 +912,18 @@ void Events::deinit() { DBUG_ENTER("Events::deinit"); - if (likely(!check_system_tables_error)) - { - scheduler->stop(); - scheduler->deinit_scheduler(); - event_queue->deinit_queue(); + if (opt_event_scheduler != EVENTS_DISABLED) + { + delete scheduler; + scheduler= NULL; /* safety */ + delete event_queue; + event_queue= NULL; /* safety */ } + delete db_repository; + db_repository= NULL; /* safety */ + DBUG_VOID_RETURN; } @@ -708,8 +940,6 @@ void Events::init_mutexes() { pthread_mutex_init(&LOCK_event_metadata, MY_MUTEX_INIT_FAST); - event_queue->init_mutexes(); - scheduler->init_mutexes(); } @@ -723,8 +953,6 @@ Events::init_mutexes() void Events::destroy_mutexes() { - event_queue->deinit_mutexes(); - scheduler->deinit_mutexes(); pthread_mutex_destroy(&LOCK_event_metadata); } @@ -747,283 +975,163 @@ Events::dump_internal_status() puts("LLA = Last Locked At LUA = Last Unlocked At"); puts("WOC = Waiting On Condition DL = Data Locked"); - scheduler->dump_internal_status(); - event_queue->dump_internal_status(); + pthread_mutex_lock(&LOCK_event_metadata); + if (opt_event_scheduler == EVENTS_DISABLED) + puts("The Event Scheduler is disabled"); + else + { + scheduler->dump_internal_status(); + event_queue->dump_internal_status(); + } + pthread_mutex_unlock(&LOCK_event_metadata); DBUG_VOID_RETURN; } /** - Starts execution of events by the scheduler + Starts or stops the event scheduler thread. - SYNOPSIS - Events::start_execution_of_events() - - RETURN VALUE - FALSE OK - TRUE Error + @retval FALSE success + @retval TRUE error */ bool -Events::start_execution_of_events() +Events::start_or_stop_event_scheduler(enum_opt_event_scheduler start_or_stop) { - DBUG_ENTER("Events::start_execution_of_events"); - if (unlikely(check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); - DBUG_RETURN(TRUE); - } - DBUG_RETURN(scheduler->start()); -} - - -/* - Stops execution of events by the scheduler. - Already running events will not be stopped. If the user needs - them stopped manual intervention is needed. - - SYNOPSIS - Events::stop_execution_of_events() - - RETURN VALUE - FALSE OK - TRUE Error -*/ - -bool -Events::stop_execution_of_events() -{ - DBUG_ENTER("Events::stop_execution_of_events"); - if (unlikely(check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); - DBUG_RETURN(TRUE); - } - DBUG_RETURN(scheduler->stop()); -} - - -/* - Checks whether the scheduler is running or not. - - SYNOPSIS - Events::is_started() - - RETURN VALUE - TRUE Yes - FALSE No -*/ - -bool -Events::is_execution_of_events_started() -{ - DBUG_ENTER("Events::is_execution_of_events_started"); - if (unlikely(check_system_tables_error)) - { - my_error(ER_EVENTS_DB_ERROR, MYF(0)); - DBUG_RETURN(FALSE); - } - DBUG_RETURN(scheduler->is_running()); -} - - - -/* - Opens mysql.db and mysql.user and checks whether: - 1. mysql.db has column Event_priv at column 20 (0 based); - 2. mysql.user has column Event_priv at column 29 (0 based); - - SYNOPSIS - Events::check_system_tables() - thd Thread - - RETURN VALUE - FALSE OK - TRUE Error -*/ - -bool -Events::check_system_tables(THD *thd) -{ - TABLE_LIST tables; - Open_tables_state backup; bool ret= FALSE; - DBUG_ENTER("Events::check_system_tables"); - DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd)); + DBUG_ENTER("Events::start_or_stop_event_scheduler"); - thd->reset_n_backup_open_tables_state(&backup); + DBUG_ASSERT(start_or_stop == Events::EVENTS_ON || + start_or_stop == Events::EVENTS_OFF); - bzero((char*) &tables, sizeof(tables)); - tables.db= (char*) "mysql"; - tables.table_name= tables.alias= (char*) "db"; - tables.lock_type= TL_READ; + /* + If the scheduler was disabled because there are no/bad + system tables, produce a more meaningful error message + than ER_OPTION_PREVENTS_STATEMENT + */ + if (check_if_system_tables_error()) + DBUG_RETURN(TRUE); - if ((ret= simple_open_n_lock_tables(thd, &tables))) + pthread_mutex_lock(&LOCK_event_metadata); + + if (opt_event_scheduler == EVENTS_DISABLED) { - sql_print_error("Event Scheduler: Cannot open mysql.db"); + my_error(ER_OPTION_PREVENTS_STATEMENT, + MYF(0), "--event-scheduler=DISABLED or --skip-grant-tables"); ret= TRUE; + goto end; } - ret= table_check_intact(tables.table, MYSQL_DB_FIELD_COUNT, - mysql_db_table_fields, &mysql_db_table_last_check, - ER_CANNOT_LOAD_FROM_TABLE); - close_thread_tables(thd); - bzero((char*) &tables, sizeof(tables)); - tables.db= (char*) "mysql"; - tables.table_name= tables.alias= (char*) "user"; - tables.lock_type= TL_READ; - - if (simple_open_n_lock_tables(thd, &tables)) - { - sql_print_error("Event Scheduler: Cannot open mysql.user"); - ret= TRUE; - } + if (start_or_stop == EVENTS_ON) + ret= scheduler->start(); else + ret= scheduler->stop(); + + if (ret) { - if (tables.table->s->fields < 29 || - strncmp(tables.table->field[29]->field_name, - STRING_WITH_LEN("Event_priv"))) - { - sql_print_error("mysql.user has no `Event_priv` column at position %d", - 29); - ret= TRUE; - } - close_thread_tables(thd); + my_error(ER_EVENT_SET_VAR_ERROR, MYF(0)); + goto end; } - thd->restore_backup_open_tables_state(&backup); + opt_event_scheduler= start_or_stop; +end: + pthread_mutex_unlock(&LOCK_event_metadata); DBUG_RETURN(ret); } -/* - Loads all ENABLED events from mysql.event into the prioritized - queue. Called during scheduler main thread initialization. Compiles - the events. Creates Event_queue_element instances for every ENABLED event - from mysql.event. +/** + Loads all ENABLED events from mysql.event into a prioritized + queue. - SYNOPSIS - Events::load_events_from_db() - thd Thread context. Used for memory allocation in some cases. + This function is called during the server start up. It reads + every event, computes the next execution time, and if the event + needs execution, adds it to a prioritized queue. Otherwise, if + ON COMPLETION DROP is specified, the event is automatically + removed from the table. - RETURN VALUE - 0 OK - !0 Error (EVEX_OPEN_TABLE_FAILED, EVEX_MICROSECOND_UNSUP, - EVEX_COMPILE_ERROR) - in all these cases mysql.event was - tampered. + @param[in,out] thd Thread context. Used for memory allocation in some cases. - NOTES - Reports the error to the console + @retval FALSE success + @retval TRUE error, the load is aborted + + @note Reports the error to the console */ -int +bool Events::load_events_from_db(THD *thd) { TABLE *table; READ_RECORD read_record_info; - int ret= -1; + bool ret= TRUE; uint count= 0; - bool clean_the_queue= TRUE; DBUG_ENTER("Events::load_events_from_db"); DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd)); - if ((ret= db_repository->open_event_table(thd, TL_READ, &table))) + if ((ret= db_repository->open_event_table(thd, TL_WRITE, &table))) { - sql_print_error("Event Scheduler: Table mysql.event is damaged. Can not open"); - DBUG_RETURN(EVEX_OPEN_TABLE_FAILED); + sql_print_error("Event Scheduler: Failed to open table mysql.event"); + DBUG_RETURN(TRUE); } - init_read_record(&read_record_info, thd, table ,NULL,1,0); + init_read_record(&read_record_info, thd, table, NULL, 0, 1); while (!(read_record_info.read_record(&read_record_info))) { Event_queue_element *et; + bool created; + bool drop_on_completion; + if (!(et= new Event_queue_element)) - { - DBUG_PRINT("info", ("Out of memory")); - break; - } + goto end; + DBUG_PRINT("info", ("Loading event from row.")); - if ((ret= et->load_from_row(thd, table))) + if (et->load_from_row(thd, table)) { sql_print_error("Event Scheduler: " "Error while reading from mysql.event. " "The table is probably corrupted"); - break; - } - if (et->status != Event_queue_element::ENABLED) - { - DBUG_PRINT("info",("%s is disabled",et->name.str)); - delete et; - continue; - } - - /* let's find when to be executed */ - if (et->compute_next_execution_time()) - { - sql_print_error("Event Scheduler: Error while computing execution time of %s.%s." - " Skipping", et->dbname.str, et->name.str); - continue; - } - - { - Event_job_data temp_job_data; - DBUG_PRINT("info", ("Event %s loaded from row. ", et->name.str)); - - temp_job_data.load_from_row(thd, table); - - /* - We load only on scheduler root just to check whether the body - compiles. - */ - switch (ret= temp_job_data.compile(thd, thd->mem_root)) { - case EVEX_MICROSECOND_UNSUP: - sql_print_error("Event Scheduler: mysql.event is tampered. MICROSECOND is not " - "supported but found in mysql.event"); - break; - case EVEX_COMPILE_ERROR: - sql_print_error("Event Scheduler: Error while compiling %s.%s. Aborting load", - et->dbname.str, et->name.str); - break; - default: - break; - } - thd->end_statement(); - thd->cleanup_after_query(); - } - if (ret) - { delete et; goto end; } + drop_on_completion= (et->on_completion == + Event_queue_element::ON_COMPLETION_DROP); - DBUG_PRINT("load_events_from_db", ("Adding 0x%lx to the exec list.", - (long) et)); - event_queue->create_event(thd, et); - count++; + + if (event_queue->create_event(thd, et, &created)) + { + /* Out of memory */ + delete et; + goto end; + } + if (created) + count++; + else if (drop_on_completion) + { + /* + If not created, a stale event - drop if immediately if + ON COMPLETION NOT PRESERVE + */ + int rc= table->file->ha_delete_row(table->record[0]); + if (rc) + { + table->file->print_error(rc, MYF(0)); + goto end; + } + } } - clean_the_queue= FALSE; + sql_print_information("Event Scheduler: Loaded %d event%s", + count, (count == 1) ? "" : "s"); + ret= FALSE; + end: end_read_record(&read_record_info); - if (clean_the_queue) - { - event_queue->empty_queue(); - ret= -1; - } - else - { - ret= 0; - sql_print_information("Event Scheduler: Loaded %d event%s", - count, (count == 1)?"":"s"); - } - close_thread_tables(thd); - DBUG_PRINT("info", ("Status code %d. Loaded %d event(s)", ret, count)); DBUG_RETURN(ret); } diff --git a/sql/events.h b/sql/events.h index f97a0c5f57e..db0e947ab6c 100644 --- a/sql/events.h +++ b/sql/events.h @@ -15,7 +15,11 @@ along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -class sp_name; +/* + @file + A public interface of Events Scheduler module. +*/ + class Event_parse_data; class Event_db_repository; class Event_queue; @@ -40,6 +44,22 @@ sortcmp_lex_string(LEX_STRING s, LEX_STRING t, CHARSET_INFO *cs); /** @class Events -- a facade to the functionality of the Event Scheduler. + Every public operation against the scheduler has to be executed via the + interface provided by a static method of this class. No instance of this + class is ever created and it has no non-static data members. + + The life cycle of the Events module is the following: + + At server start up: + set_opt_event_scheduler() -> init_mutexes() -> init() + When the server is running: + create_event(), drop_event(), start_or_stop_event_scheduler(), etc + At shutdown: + deinit(), destroy_mutexes(). + + The peculiar initialization and shutdown cycle is an adaptation to the + outside server startup/shutdown framework and mimics the rest of MySQL + subsystems (ACL, time zone tables, etc). */ class Events @@ -53,47 +73,48 @@ public: EVENTS_DISABLED= 4 }; - static enum_opt_event_scheduler opt_event_scheduler; - static TYPELIB opt_typelib; - static TYPELIB var_typelib; + /* Possible values of @@event_scheduler variable */ + static const TYPELIB var_typelib; - bool - init(); + static bool + set_opt_event_scheduler(char *argument); - void + static const char * + get_opt_event_scheduler_str(); + + /* A hack needed for Event_queue_element */ + static Event_db_repository * + get_db_repository() { return db_repository; } + + static bool + init(my_bool opt_noacl); + + static void deinit(); - void + static void init_mutexes(); - void + static void destroy_mutexes(); - bool - start_execution_of_events(); + static bool + start_or_stop_event_scheduler(enum enum_opt_event_scheduler start_or_stop); - bool - stop_execution_of_events(); - - bool - is_execution_of_events_started(); - - static Events * - get_instance(); - - bool + static bool create_event(THD *thd, Event_parse_data *parse_data, bool if_exists); - bool - update_event(THD *thd, Event_parse_data *parse_data, sp_name *rename_to); + static bool + update_event(THD *thd, Event_parse_data *parse_data, + LEX_STRING *new_dbname, LEX_STRING *new_name); - bool + static bool drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name, bool if_exists); - void + static void drop_schema_events(THD *thd, char *db); - bool + static bool show_create_event(THD *thd, LEX_STRING dbname, LEX_STRING name); /* Needed for both SHOW CREATE EVENT and INFORMATION_SCHEMA */ @@ -104,31 +125,28 @@ public: static int fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */); - void + static void dump_internal_status(); private: - bool - check_system_tables(THD *thd); + static bool check_if_system_tables_error(); - int + static bool load_events_from_db(THD *thd); - /* Singleton DP is used */ - Events(); - ~Events(){} - - /* Singleton instance */ - static Events singleton; - - Event_queue *event_queue; - Event_scheduler *scheduler; - Event_db_repository *db_repository; - - pthread_mutex_t LOCK_event_metadata; - - bool check_system_tables_error; +private: + /* Command line option names */ + static const TYPELIB opt_typelib; + static pthread_mutex_t LOCK_event_metadata; + static Event_queue *event_queue; + static Event_scheduler *scheduler; + static Event_db_repository *db_repository; + /* Current state of Event Scheduler */ + static enum enum_opt_event_scheduler opt_event_scheduler; + /* Set to TRUE if an error at start up */ + static bool check_system_tables_error; +private: /* Prevent use of these */ Events(const Events &); void operator=(Events &); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index a0687929de5..6364eed5c57 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -890,7 +890,7 @@ static void close_connections(void) } (void) pthread_mutex_unlock(&LOCK_thread_count); // For unlink from list - Events::get_instance()->deinit(); + Events::deinit(); end_slave(); if (thread_count) @@ -1335,7 +1335,7 @@ static void clean_up_mutexes() (void) pthread_mutex_destroy(&LOCK_bytes_sent); (void) pthread_mutex_destroy(&LOCK_bytes_received); (void) pthread_mutex_destroy(&LOCK_user_conn); - Events::get_instance()->destroy_mutexes(); + Events::destroy_mutexes(); #ifdef HAVE_OPENSSL (void) pthread_mutex_destroy(&LOCK_des_key_file); #ifndef HAVE_YASSL @@ -3062,7 +3062,7 @@ static int init_thread_environment() (void) pthread_mutex_init(&LOCK_server_started, MY_MUTEX_INIT_FAST); (void) pthread_cond_init(&COND_server_started,NULL); sp_cache_init(); - Events::get_instance()->init_mutexes(); + Events::init_mutexes(); /* Parameter for threads created for connections */ (void) pthread_attr_init(&connection_attrib); (void) pthread_attr_setdetachstate(&connection_attrib, @@ -3841,21 +3841,15 @@ we force server id to 2, but this MySQL server will not act as a slave."); create_shutdown_thread(); create_maintenance_thread(); + if (Events::init(opt_noacl)) + unireg_abort(1); + sql_print_information(ER(ER_STARTUP),my_progname,server_version, ((unix_sock == INVALID_SOCKET) ? (char*) "" : mysqld_unix_port), mysqld_port, MYSQL_COMPILATION_COMMENT); - if (!opt_noacl) - { - if (Events::get_instance()->init()) - unireg_abort(1); - } - else - { - Events::opt_event_scheduler = Events::EVENTS_DISABLED; - } /* Signal threads waiting for server to be started */ pthread_mutex_lock(&LOCK_server_started); @@ -7568,32 +7562,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), } #endif case OPT_EVENT_SCHEDULER: - if (!argument) - Events::opt_event_scheduler= Events::EVENTS_DISABLED; - else - { - int type; - /* - type= 5 1 2 3 4 - (DISABLE ) - (OFF | ON) - (0 | 1) - */ - switch ((type=find_type(argument, &Events::opt_typelib, 1))) { - case 0: - fprintf(stderr, "Unknown option to event-scheduler: %s\n",argument); - exit(1); - case 5: /* OPT_DISABLED */ - Events::opt_event_scheduler= Events::EVENTS_DISABLED; - break; - case 2: /* OPT_ON */ - case 4: /* 1 */ - Events::opt_event_scheduler= Events::EVENTS_ON; - break; - case 1: /* OPT_OFF */ - case 3: /* 0 */ - Events::opt_event_scheduler= Events::EVENTS_OFF; - break; - } - } + if (Events::set_opt_event_scheduler(argument)) + exit(1); break; case (int) OPT_SKIP_NEW: opt_specialflag|= SPECIAL_NO_NEW_FUNC; diff --git a/sql/set_var.cc b/sql/set_var.cc index fef6fccfd06..d5bf9ca4bc8 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -1683,7 +1683,7 @@ byte *sys_var_thd_bool::value_ptr(THD *thd, enum_var_type type, } -bool sys_var::check_enum(THD *thd, set_var *var, TYPELIB *enum_names) +bool sys_var::check_enum(THD *thd, set_var *var, const TYPELIB *enum_names) { char buff[STRING_BUFFER_USUAL_SIZE]; const char *value; @@ -3640,21 +3640,18 @@ bool sys_var_thd_table_type::update(THD *thd, set_var *var) SYNOPSIS thd in thread handler val in sql_mode value - len out pointer on length of string - - RETURN - pointer to string with sql_mode representation + rep out pointer pointer to string with sql_mode representation */ -byte *sys_var_thd_sql_mode::symbolic_mode_representation(THD *thd, - ulonglong val, - ulong *len) +bool +sys_var_thd_sql_mode:: +symbolic_mode_representation(THD *thd, ulonglong val, LEX_STRING *rep) { - char buff[256]; + char buff[STRING_BUFFER_USUAL_SIZE*8]; String tmp(buff, sizeof(buff), &my_charset_latin1); - ulong length; tmp.length(0); + for (uint i= 0; val; val>>= 1, i++) { if (val & 1) @@ -3665,20 +3662,25 @@ byte *sys_var_thd_sql_mode::symbolic_mode_representation(THD *thd, } } - if ((length= tmp.length())) - length--; - *len= length; - return (byte*) thd->strmake(tmp.ptr(), length); + if (tmp.length()) + tmp.length(tmp.length() - 1); /* trim the trailing comma */ + + rep->str= thd->strmake(tmp.ptr(), tmp.length()); + + rep->length= rep->str ? tmp.length() : 0; + + return rep->length != tmp.length(); } byte *sys_var_thd_sql_mode::value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { + LEX_STRING sql_mode; ulonglong val= ((type == OPT_GLOBAL) ? global_system_variables.*offset : thd->variables.*offset); - ulong length_unused; - return symbolic_mode_representation(thd, val, &length_unused); + (void) symbolic_mode_representation(thd, val, &sql_mode); + return sql_mode.str; } @@ -4009,24 +4011,13 @@ sys_var_event_scheduler::update(THD *thd, set_var *var) int res; /* here start the thread if not running. */ DBUG_ENTER("sys_var_event_scheduler::update"); - if (Events::opt_event_scheduler == Events::EVENTS_DISABLED) - { - my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--event-scheduler=DISABLED or --skip-grant-tables"); - DBUG_RETURN(TRUE); - } - DBUG_PRINT("info", ("new_value: %d", (int) var->save_result.ulong_value)); - if (var->save_result.ulong_value == Events::EVENTS_ON) - res= Events::get_instance()->start_execution_of_events(); - else if (var->save_result.ulong_value == Events::EVENTS_OFF) - res= Events::get_instance()->stop_execution_of_events(); - else - { - assert(0); // Impossible - } - if (res) - my_error(ER_EVENT_SET_VAR_ERROR, MYF(0)); + enum Events::enum_opt_event_scheduler + new_state= + (enum Events::enum_opt_event_scheduler) var->save_result.ulong_value; + + res= Events::start_or_stop_event_scheduler(new_state); DBUG_RETURN((bool) res); } @@ -4035,15 +4026,7 @@ sys_var_event_scheduler::update(THD *thd, set_var *var) byte *sys_var_event_scheduler::value_ptr(THD *thd, enum_var_type type, LEX_STRING *base) { - int state; - if (Events::opt_event_scheduler == Events::EVENTS_DISABLED) - state= Events::EVENTS_DISABLED; // This should be DISABLED - else if (Events::get_instance()->is_execution_of_events_started()) - state= Events::EVENTS_ON; // This should be ON - else - state= Events::EVENTS_OFF; // This should be OFF - - return (byte*) Events::opt_typelib.type_names[state]; + return (byte *) Events::get_opt_event_scheduler_str(); } diff --git a/sql/set_var.h b/sql/set_var.h index 8887d91ec69..e4284c374bb 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -61,7 +61,7 @@ public: sys_vars++; } virtual bool check(THD *thd, set_var *var); - bool check_enum(THD *thd, set_var *var, TYPELIB *enum_names); + bool check_enum(THD *thd, set_var *var, const TYPELIB *enum_names); bool check_set(THD *thd, set_var *var, TYPELIB *enum_names); virtual bool update(THD *thd, set_var *var)=0; virtual void set_default(THD *thd_arg, enum_var_type type) {} @@ -440,8 +440,8 @@ public: } void set_default(THD *thd, enum_var_type type); byte *value_ptr(THD *thd, enum_var_type type, LEX_STRING *base); - static byte *symbolic_mode_representation(THD *thd, ulonglong sql_mode, - ulong *length); + static bool symbolic_mode_representation(THD *thd, ulonglong sql_mode, + LEX_STRING *rep); }; diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 0a40f2b9ed1..d0d20a9e232 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5884,8 +5884,8 @@ ER_COL_COUNT_DOESNT_MATCH_CORRUPTED eng "Column count of mysql.%s is wrong. Expected %d, found %d. The table is probably corrupted" ger "Spaltenanzahl von mysql.%s falsch. %d erwartet, aber %d gefunden. Tabelle ist wahrscheinlich beschädigt" ER_CANNOT_LOAD_FROM_TABLE - eng "Cannot load from mysql.%s. The table is probably corrupted. Please see the error log for details" - ger "Kann mysql.%s nicht einlesen. Tabelle ist wahrscheinlich beschädigt, siehe Fehlerlog" + eng "Cannot load from mysql.%s. The table is probably corrupted" + ger "Kann mysql.%s nicht einlesen. Tabelle ist wahrscheinlich beschädigt" ER_EVENT_CANNOT_DELETE eng "Failed to delete the event from mysql.event" ger "Löschen des Events aus mysql.event fehlgeschlagen" diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 8eeec741dcf..9bedc6fb38e 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -2104,8 +2104,7 @@ sp_head::show_create_procedure(THD *thd) String buffer(buff, sizeof(buff), system_charset_info); int res; List field_list; - byte *sql_mode_str; - ulong sql_mode_len; + LEX_STRING sql_mode; bool full_access; DBUG_ENTER("sp_head::show_create_procedure"); DBUG_PRINT("info", ("procedure %s", m_name.str)); @@ -2116,12 +2115,10 @@ sp_head::show_create_procedure(THD *thd) if (check_show_routine_access(thd, this, &full_access)) DBUG_RETURN(1); - sql_mode_str= - sys_var_thd_sql_mode::symbolic_mode_representation(thd, - m_sql_mode, - &sql_mode_len); + sys_var_thd_sql_mode::symbolic_mode_representation(thd, m_sql_mode, + &sql_mode); field_list.push_back(new Item_empty_string("Procedure", NAME_LEN)); - field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len)); + field_list.push_back(new Item_empty_string("sql_mode", sql_mode.length)); // 1024 is for not to confuse old clients Item_empty_string *definition= new Item_empty_string("Create Procedure", max(buffer.length(),1024)); @@ -2133,7 +2130,7 @@ sp_head::show_create_procedure(THD *thd) DBUG_RETURN(1); protocol->prepare_for_resend(); protocol->store(m_name.str, m_name.length, system_charset_info); - protocol->store((char*) sql_mode_str, sql_mode_len, system_charset_info); + protocol->store((char*) sql_mode.str, sql_mode.length, system_charset_info); if (full_access) protocol->store(m_defstr.str, m_defstr.length, system_charset_info); else @@ -2176,23 +2173,18 @@ sp_head::show_create_function(THD *thd) String buffer(buff, sizeof(buff), system_charset_info); int res; List field_list; - byte *sql_mode_str; - ulong sql_mode_len; + LEX_STRING sql_mode; bool full_access; DBUG_ENTER("sp_head::show_create_function"); DBUG_PRINT("info", ("procedure %s", m_name.str)); - LINT_INIT(sql_mode_str); - LINT_INIT(sql_mode_len); if (check_show_routine_access(thd, this, &full_access)) DBUG_RETURN(1); - sql_mode_str= - sys_var_thd_sql_mode::symbolic_mode_representation(thd, - m_sql_mode, - &sql_mode_len); + sys_var_thd_sql_mode::symbolic_mode_representation(thd, m_sql_mode, + &sql_mode); field_list.push_back(new Item_empty_string("Function",NAME_LEN)); - field_list.push_back(new Item_empty_string("sql_mode", sql_mode_len)); + field_list.push_back(new Item_empty_string("sql_mode", sql_mode.length)); Item_empty_string *definition= new Item_empty_string("Create Function", max(buffer.length(),1024)); definition->maybe_null= TRUE; @@ -2203,7 +2195,7 @@ sp_head::show_create_function(THD *thd) DBUG_RETURN(1); protocol->prepare_for_resend(); protocol->store(m_name.str, m_name.length, system_charset_info); - protocol->store((char*) sql_mode_str, sql_mode_len, system_charset_info); + protocol->store(sql_mode.str, sql_mode.length, system_charset_info); if (full_access) protocol->store(m_defstr.str, m_defstr.length, system_charset_info); else diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 4fd35b7e6e8..cc9dc4c1fec 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -953,7 +953,7 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent) exit: (void)sp_drop_db_routines(thd, db); /* QQ Ignore errors for now */ - Events::get_instance()->drop_schema_events(thd, db); + Events::drop_schema_events(thd, db); /* If this database was the client's selected database, we silently change the client's selected database to nothing (to have an empty diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 7720f293b10..23ec0fd0128 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -26,7 +26,6 @@ #include "sp.h" #include "sp_cache.h" #include "events.h" -#include "event_data_objects.h" #include "sql_trigger.h" /* Used in error handling only */ @@ -3151,13 +3150,16 @@ end_with_restore_list: switch (lex->sql_command) { case SQLCOM_CREATE_EVENT: - res= Events::get_instance()-> - create_event(thd, lex->event_parse_data, - lex->create_info.options & HA_LEX_CREATE_IF_NOT_EXISTS); + { + bool if_not_exists= (lex->create_info.options & + HA_LEX_CREATE_IF_NOT_EXISTS); + res= Events::create_event(thd, lex->event_parse_data, if_not_exists); break; + } case SQLCOM_ALTER_EVENT: - res= Events::get_instance()->update_event(thd, lex->event_parse_data, - lex->spname); + res= Events::update_event(thd, lex->event_parse_data, + lex->spname ? &lex->spname->m_db : NULL, + lex->spname ? &lex->spname->m_name : NULL); break; default: DBUG_ASSERT(0); @@ -3175,39 +3177,16 @@ end_with_restore_list: } /* lex->unit.cleanup() is called outside, no need to call it here */ break; - case SQLCOM_DROP_EVENT: case SQLCOM_SHOW_CREATE_EVENT: - { - DBUG_ASSERT(lex->spname); - if (! lex->spname->m_db.str) - { - my_message(ER_NO_DB_ERROR, ER(ER_NO_DB_ERROR), MYF(0)); - goto error; - } - if (check_access(thd, EVENT_ACL, lex->spname->m_db.str, 0, 0, 0, - is_schema_db(lex->spname->m_db.str))) - break; - - if (lex->spname->m_name.length > NAME_LEN) - { - my_error(ER_TOO_LONG_IDENT, MYF(0), lex->spname->m_name.str); - /* this jumps to the end of the function and skips own messaging */ - goto error; - } - - if (lex->sql_command == SQLCOM_SHOW_CREATE_EVENT) - res= Events::get_instance()->show_create_event(thd, lex->spname->m_db, - lex->spname->m_name); - else - { - if (!(res= Events::get_instance()->drop_event(thd, - lex->spname->m_db, - lex->spname->m_name, - lex->drop_if_exists))) - send_ok(thd); - } + res= Events::show_create_event(thd, lex->spname->m_db, + lex->spname->m_name); + break; + case SQLCOM_DROP_EVENT: + if (!(res= Events::drop_event(thd, + lex->spname->m_db, lex->spname->m_name, + lex->drop_if_exists))) + send_ok(thd); break; - } case SQLCOM_CREATE_FUNCTION: // UDF function { if (check_access(thd,INSERT_ACL,"mysql",0,1,0,0)) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index ea9b835df4d..613222fcd6e 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -3760,8 +3760,7 @@ static bool store_trigger(THD *thd, TABLE *table, const char *db, LEX_STRING *definer_buffer) { CHARSET_INFO *cs= system_charset_info; - byte *sql_mode_str; - ulong sql_mode_len; + LEX_STRING sql_mode_rep; restore_record(table, s->default_values); table->field[1]->store(db, strlen(db), cs); @@ -3777,11 +3776,9 @@ static bool store_trigger(THD *thd, TABLE *table, const char *db, table->field[14]->store(STRING_WITH_LEN("OLD"), cs); table->field[15]->store(STRING_WITH_LEN("NEW"), cs); - sql_mode_str= - sys_var_thd_sql_mode::symbolic_mode_representation(thd, - sql_mode, - &sql_mode_len); - table->field[17]->store((const char*)sql_mode_str, sql_mode_len, cs); + sys_var_thd_sql_mode::symbolic_mode_representation(thd, sql_mode, + &sql_mode_rep); + table->field[17]->store(sql_mode_rep.str, sql_mode_rep.length, cs); table->field[18]->store((const char *)definer_buffer->str, definer_buffer->length, cs); return schema_table_store_record(thd, table); } @@ -4307,13 +4304,13 @@ copy_event_to_schema_table(THD *thd, TABLE *sch_table, TABLE *event_table) CHARSET_INFO *scs= system_charset_info; TIME time; Event_timed et; - DBUG_ENTER("fill_events_copy_to_schema_tab"); + DBUG_ENTER("copy_event_to_schema_table"); restore_record(sch_table, s->default_values); if (et.load_from_row(thd, event_table)) { - my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0)); + my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), event_table->alias); DBUG_RETURN(1); } @@ -4348,13 +4345,11 @@ copy_event_to_schema_table(THD *thd, TABLE *sch_table, TABLE *event_table) /* SQL_MODE */ { - byte *sql_mode_str; - ulong sql_mode_len= 0; - sql_mode_str= - sys_var_thd_sql_mode::symbolic_mode_representation(thd, et.sql_mode, - &sql_mode_len); + LEX_STRING sql_mode; + sys_var_thd_sql_mode::symbolic_mode_representation(thd, et.sql_mode, + &sql_mode); sch_table->field[ISE_SQL_MODE]-> - store((const char*)sql_mode_str, sql_mode_len, scs); + store(sql_mode.str, sql_mode.length, scs); } int not_used=0; diff --git a/sql/sql_test.cc b/sql/sql_test.cc index 9e30cf5878c..d7573b42c5f 100644 --- a/sql/sql_test.cc +++ b/sql/sql_test.cc @@ -537,6 +537,6 @@ Estimated memory (with thread stack): %ld\n", (long) (thread_count * thread_stack + info.hblkhd + info.arena)); #endif - Events::get_instance()->dump_internal_status(); + Events::dump_internal_status(); puts(""); } diff --git a/sql/table.cc b/sql/table.cc index 71e510bf0ac..5e901318919 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -250,7 +250,7 @@ void free_table_share(TABLE_SHARE *share) Currently these are: help_category, help_keyword, help_relation, help_topic, - proc, + proc, event time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type @@ -283,7 +283,14 @@ inline bool is_system_table_name(const char *name, uint length) my_tolower(ci, name[0]) == 't' && my_tolower(ci, name[1]) == 'i' && my_tolower(ci, name[2]) == 'm' && - my_tolower(ci, name[3]) == 'e' + my_tolower(ci, name[3]) == 'e' || + + /* mysql.event table */ + my_tolower(ci, name[0]) == 'e' && + my_tolower(ci, name[1]) == 'v' && + my_tolower(ci, name[2]) == 'e' && + my_tolower(ci, name[3]) == 'n' && + my_tolower(ci, name[4]) == 't' ) ); } @@ -2432,153 +2439,143 @@ bool check_column_name(const char *name) } -/* +/** Checks whether a table is intact. Should be done *just* after the table has been opened. - - SYNOPSIS - table_check_intact() - table The table to check - table_f_count Expected number of columns in the table - table_def Expected structure of the table (column name and type) - last_create_time The table->file->create_time of the table in memory - we have checked last time - error_num ER_XXXX from the error messages file. When 0 no error - is sent to the client in case types does not match. - If different col number either - ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE or - ER_COL_COUNT_DOESNT_MATCH_CORRUPTED is used - RETURNS - FALSE OK - TRUE There was an error + @param[in] table The table to check + @param[in] table_f_count Expected number of columns in the table + @param[in] table_def Expected structure of the table (column name + and type) + + @retval FALSE OK + @retval TRUE There was an error. An error message is output + to the error log. We do not push an error + message into the error stack because this + function is currently only called at start up, + and such errors never reach the user. */ my_bool table_check_intact(TABLE *table, const uint table_f_count, - const TABLE_FIELD_W_TYPE *table_def, - time_t *last_create_time, int error_num) + const TABLE_FIELD_W_TYPE *table_def) { uint i; my_bool error= FALSE; my_bool fields_diff_count; DBUG_ENTER("table_check_intact"); - DBUG_PRINT("info",("table: %s expected_count: %d last_create_time: %ld", - table->alias, table_f_count, *last_create_time)); - - if ((fields_diff_count= (table->s->fields != table_f_count)) || - (*last_create_time != table->file->stats.create_time)) - { - DBUG_PRINT("info", ("I am suspecting, checking table")); - if (fields_diff_count) - { - /* previous MySQL version */ - error= TRUE; - if (MYSQL_VERSION_ID > table->s->mysql_version) - { - my_error(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE, MYF(0), table->alias, - table_f_count, table->s->fields, table->s->mysql_version, - MYSQL_VERSION_ID); - sql_print_error(ER(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE), - table->alias, table_f_count, table->s->fields, - table->s->mysql_version, MYSQL_VERSION_ID); - DBUG_RETURN(error); + DBUG_PRINT("info",("table: %s expected_count: %d", + table->alias, table_f_count)); - } - else if (MYSQL_VERSION_ID == table->s->mysql_version) - { - my_error(ER_COL_COUNT_DOESNT_MATCH_CORRUPTED,MYF(0), table->alias, - table_f_count, table->s->fields); - sql_print_error(ER(ER_COL_COUNT_DOESNT_MATCH_CORRUPTED), table->alias, - table_f_count, table->s->fields); - } - else - { - /* - Moving from newer mysql to older one -> let's say not an error but - will check the definition afterwards. If a column was added at the - end then we don't care much since it's not in the middle. - */ - error= FALSE; - } - } - /* definitely something has changed */ - char buffer[255]; - for (i=0 ; i < table_f_count; i++, table_def++) - { - String sql_type(buffer, sizeof(buffer), system_charset_info); - sql_type.length(0); - /* - Name changes are not fatal, we use sequence numbers => no problem - for us but this can show tampered table or broken table. - */ - if (i < table->s->fields) - { - Field *field= table->field[i]; - if (strncmp(field->field_name, table_def->name.str, - table_def->name.length)) - { - sql_print_error("(%s) Expected field %s at position %d, found %s", - table->alias, table_def->name.str, i, - field->field_name); - } - - /* - If the type does not match than something is really wrong - Check up to length - 1. Why? - 1. datetime -> datetim -> the same - 2. int(11) -> int(11 -> the same - 3. set('one','two') -> set('one','two' - so for sets if the same prefix is there it's ok if more are - added as part of the set. The same is valid for enum. So a new - table running on a old server will be valid. - */ - field->sql_type(sql_type); - if (strncmp(sql_type.c_ptr_safe(), table_def->type.str, - table_def->type.length - 1)) - { - sql_print_error("(%s) Expected field %s at position %d to have type " - "%s, found %s", table->alias, table_def->name.str, - i, table_def->type.str, sql_type.c_ptr_safe()); - error= TRUE; - } - else if (table_def->cset.str && !field->has_charset()) - { - sql_print_error("(%s) Expected field %s at position %d to have " - "character set '%s' but found no such", table->alias, - table_def->name.str, i, table_def->cset.str); - error= TRUE; - } - else if (table_def->cset.str && - strcmp(field->charset()->csname, table_def->cset.str)) - { - sql_print_error("(%s) Expected field %s at position %d to have " - "character set '%s' but found '%s'", table->alias, - table_def->name.str, i, table_def->cset.str, - field->charset()->csname); - error= TRUE; - } - } - else - { - sql_print_error("(%s) Expected field %s at position %d to have type %s " - " but no field found.", table->alias, - table_def->name.str, i, table_def->type.str); - error= TRUE; - } - } - if (!error) - *last_create_time= table->file->stats.create_time; - else if (!fields_diff_count && error_num) - my_error(error_num,MYF(0), table->alias, table_f_count, table->s->fields); - } - else + fields_diff_count= (table->s->fields != table_f_count); + if (fields_diff_count) { - DBUG_PRINT("info", ("Table seems ok without thorough checking.")); - *last_create_time= table->file->stats.create_time; + DBUG_PRINT("info", ("Column count has changed, checking the definition")); + + /* previous MySQL version */ + if (MYSQL_VERSION_ID > table->s->mysql_version) + { + sql_print_error(ER(ER_COL_COUNT_DOESNT_MATCH_PLEASE_UPDATE), + table->alias, table_f_count, table->s->fields, + table->s->mysql_version, MYSQL_VERSION_ID); + DBUG_RETURN(TRUE); + } + else if (MYSQL_VERSION_ID == table->s->mysql_version) + { + sql_print_error(ER(ER_COL_COUNT_DOESNT_MATCH_CORRUPTED), table->alias, + table_f_count, table->s->fields); + DBUG_RETURN(TRUE); + } + /* + Something has definitely changed, but we're running an older + version of MySQL with new system tables. + Let's check column definitions. If a column was added at + the end of the table, then we don't care much since such change + is backward compatible. + */ } - - DBUG_RETURN(error); + char buffer[STRING_BUFFER_USUAL_SIZE]; + for (i=0 ; i < table_f_count; i++, table_def++) + { + String sql_type(buffer, sizeof(buffer), system_charset_info); + sql_type.length(0); + if (i < table->s->fields) + { + Field *field= table->field[i]; + + if (strncmp(field->field_name, table_def->name.str, + table_def->name.length)) + { + /* + Name changes are not fatal, we use ordinal numbers to access columns. + Still this can be a sign of a tampered table, output an error + to the error log. + */ + sql_print_error("Incorrect definition of table %s.%s: " + "expected column '%s' at position %d, found '%s'.", + table->s->db.str, table->alias, table_def->name.str, i, + field->field_name); + } + field->sql_type(sql_type); + /* + Generally, if column types don't match, then something is + wrong. + + However, we only compare column definitions up to the + length of the original definition, since we consider the + following definitions compatible: + + 1. DATETIME and DATETIM + 2. INT(11) and INT(11 + 3. SET('one', 'two') and SET('one', 'two', 'more') + + For SETs or ENUMs, if the same prefix is there it's OK to + add more elements - they will get higher ordinal numbers and + the new table definition is backward compatible with the + original one. + */ + if (strncmp(sql_type.c_ptr_safe(), table_def->type.str, + table_def->type.length - 1)) + { + sql_print_error("Incorrect definition of table %s.%s: " + "expected column '%s' at position %d to have type " + "%s, found type %s.", table->s->db.str, table->alias, + table_def->name.str, i, table_def->type.str, + sql_type.c_ptr_safe()); + error= TRUE; + } + else if (table_def->cset.str && !field->has_charset()) + { + sql_print_error("Incorrect definition of table %s.%s: " + "expected the type of column '%s' at position %d " + "to have character set '%s' but the type has no " + "character set.", table->s->db.str, table->alias, + table_def->name.str, i, table_def->cset.str); + error= TRUE; + } + else if (table_def->cset.str && + strcmp(field->charset()->csname, table_def->cset.str)) + { + sql_print_error("Incorrect definition of table %s.%s: " + "expected the type of column '%s' at position %d " + "to have character set '%s' but found " + "character set '%s'.", table->s->db.str, table->alias, + table_def->name.str, i, table_def->cset.str, + field->charset()->csname); + error= TRUE; + } + } + else + { + sql_print_error("Incorrect definition of table %s.%s: " + "expected column '%s' at position %d to have type %s " + " but the column is not found.", + table->s->db.str, table->alias, + table_def->name.str, i, table_def->type.str); + error= TRUE; + } + } + DBUG_RETURN(error); } diff --git a/sql/table.h b/sql/table.h index 0eb372e9cca..628341df55d 100644 --- a/sql/table.h +++ b/sql/table.h @@ -684,6 +684,21 @@ class index_hint; typedef struct st_table_list { st_table_list() {} /* Remove gcc warning */ + + /** + Prepare TABLE_LIST that consists of one table instance to use in + simple_open_and_lock_tables + */ + inline void init_one_table(const char *db_name_arg, + const char *table_name_arg, + enum thr_lock_type lock_type_arg) + { + bzero((char*) this, sizeof(*this)); + db= (char*) db_name_arg; + table_name= alias= (char*) table_name_arg; + lock_type= lock_type_arg; + } + /* List of tables local to a subquery (used by SQL_LIST). Considers views as leaves (unlike 'next_leaf' below). Created at parse time @@ -1092,8 +1107,7 @@ typedef struct st_table_field_w_type my_bool table_check_intact(TABLE *table, const uint table_f_count, - const TABLE_FIELD_W_TYPE *table_def, - time_t *last_create_time, int error_num); + const TABLE_FIELD_W_TYPE *table_def); static inline my_bitmap_map *tmp_use_all_columns(TABLE *table, MY_BITMAP *bitmap) From 44ac93108024f802fd91d62dd3076d3c0e66de92 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 15:59:42 +0200 Subject: [PATCH 136/153] ha_ndbcluster.cc: Bug #26591 Cluster handler does not set bits in null bytes correctly: Improved comments ha_ndbcluster_binlog.cc: Bug #26591 Cluster handler does not set bits in null bytes correctly: Using empty_record() instead of bzero sql/ha_ndbcluster.cc: Bug #26591 Cluster handler does not set bits in null bytes correctly: Improved comments sql/ha_ndbcluster_binlog.cc: Bug #26591 Cluster handler does not set bits in null bytes correctly: Using empty_record() instead of bzero --- sql/ha_ndbcluster.cc | 11 +++++++++-- sql/ha_ndbcluster_binlog.cc | 16 ++++++++++------ 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 5fa57b63d90..4f555c543a9 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -3126,11 +3126,18 @@ void ndb_unpack_record(TABLE *table, NdbValue *value, my_bitmap_map *old_map= dbug_tmp_use_all_columns(table, table->write_set); DBUG_ENTER("ndb_unpack_record"); - // Set filler bits + /* + Set the filler bits of the null byte, since they are + not touched in the code below. + + The filler bits are the MSBs in the last null byte + */ if (table->s->null_bytes > 0) buf[table->s->null_bytes - 1]|= 256U - (1U << table->s->last_null_bit_pos); - // Set null flag(s) + /* + Set null flag(s) + */ for ( ; field; p_field++, value++, field= *p_field) { diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc index d1c2ad15894..1c5db73ef6e 100644 --- a/sql/ha_ndbcluster_binlog.cc +++ b/sql/ha_ndbcluster_binlog.cc @@ -2273,9 +2273,11 @@ int ndb_add_ndb_binlog_index(THD *thd, void *_row) break; } - // Set all fields non-null. - if(ndb_binlog_index->s->null_bytes > 0) - bzero(ndb_binlog_index->record[0], ndb_binlog_index->s->null_bytes); + /* + Intialize ndb_binlog_index->record[0] + */ + empty_record(ndb_binlog_index); + ndb_binlog_index->field[0]->store(row.master_log_pos); ndb_binlog_index->field[1]->store(row.master_log_file, strlen(row.master_log_file), @@ -3909,9 +3911,11 @@ restart: IF_DBUG(int ret=) trans.use_table(::server_id, tbl); DBUG_ASSERT(ret == 0); - // Set all fields non-null. - if(table->s->null_bytes > 0) - bzero(table->record[0], table->s->null_bytes); + /* + Intialize table->record[0] + */ + empty_record(table); + table->field[0]->store((longlong)::server_id); table->field[1]->store((longlong)gci); table->field[2]->store("", 0, &my_charset_bin); From ea3afa8d1e1325e621246a17fce30ddd24e74da2 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 20:26:18 +0500 Subject: [PATCH 137/153] bug #26074 Mysql crash creating partition As we have unified paths inside partition engine, we should look for '/' as a path separator mysql-test/r/windows.result: result fixed mysql-test/t/windows.test: testcase sql/ha_partition.cc: check for '/' instead of FN_LIBCHAR --- mysql-test/r/windows.result | 15 +++++++++++++++ mysql-test/t/windows.test | 21 +++++++++++++++++++++ sql/ha_partition.cc | 3 ++- 3 files changed, 38 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/windows.result b/mysql-test/r/windows.result index 7472b724f47..423123692e5 100644 --- a/mysql-test/r/windows.result +++ b/mysql-test/r/windows.result @@ -26,3 +26,18 @@ ERROR HY000: No paths allowed for shared library execute abc; ERROR HY000: No paths allowed for shared library deallocate prepare abc; +CREATE TABLE t1 ( +`pkid` int(11) NOT NULL AUTO_INCREMENT, +`SALES_DATE` date NOT NULL DEFAULT '0000-00-00', +KEY `pkid` (`pkid`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +PARTITION BY RANGE (MONTH(SALES_DATE)) +( +PARTITION p0 VALUES LESS THAN (2) ENGINE=INNODB +data DIRECTORY='c:/tmp/' + index DIRECTORY = 'c:/tmp/', +PARTITION p1 VALUES LESS THAN (3) ENGINE=INNODB +data DIRECTORY='c:/tmp/' + index DIRECTORY = 'c:/tmp/' +); +drop table t1; diff --git a/mysql-test/t/windows.test b/mysql-test/t/windows.test index a10d54b5452..efdf0963b80 100644 --- a/mysql-test/t/windows.test +++ b/mysql-test/t/windows.test @@ -1,5 +1,6 @@ # Windows-specific tests --source include/windows.inc +-- source include/have_innodb.inc # # Bug 9148: Denial of service @@ -49,3 +50,23 @@ execute abc; execute abc; deallocate prepare abc; +# +# Bug #26074 Mysql crash when creating partitions +# + +CREATE TABLE t1 ( + `pkid` int(11) NOT NULL AUTO_INCREMENT, + `SALES_DATE` date NOT NULL DEFAULT '0000-00-00', + KEY `pkid` (`pkid`) +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +PARTITION BY RANGE (MONTH(SALES_DATE)) +( + PARTITION p0 VALUES LESS THAN (2) ENGINE=INNODB + data DIRECTORY='c:/tmp/' + index DIRECTORY = 'c:/tmp/', + PARTITION p1 VALUES LESS THAN (3) ENGINE=INNODB + data DIRECTORY='c:/tmp/' + index DIRECTORY = 'c:/tmp/' +); + +DROP TABLE t1; diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index d3979fa0718..3c25dcd202f 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -1781,7 +1781,8 @@ int ha_partition::set_up_table_before_create(TABLE *table, } table->s->max_rows= part_elem->part_max_rows; table->s->min_rows= part_elem->part_min_rows; - partition_name= strrchr(partition_name_with_path, FN_LIBCHAR); + /* Here we have unified path so should always look for '/', not FN_LIBCHAR */ + partition_name= strrchr(partition_name_with_path, '/'); if ((part_elem->index_file_name && (error= append_file_to_dir(thd, (const char**)&part_elem->index_file_name, From ff452d050a78083b878260f8d2393016503ae0cb Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 20:47:22 +0400 Subject: [PATCH 138/153] Post-merge and post-review fixes for the patch for Bug#23631 "Events: SHOW VARIABLES doesn't work when mysql.event is damaged: mysql-test/r/events.result: Update results (a post-merge fix) mysql-test/r/events_bugs.result: Update results (a post-merge fix) mysql-test/r/events_scheduling.result: Update results (a post-merge fix) mysql-test/t/events_scheduling.test: Make sure this test has no races. sql/event_data_objects.cc: Manual post-merge fix for the events replication patch. sql/event_data_objects.h: A post-merge fix. sql/event_db_repository.cc: A post-merge fix. sql/event_scheduler.cc: We should drop the event inside ::execute since there we have the right credentials to do so (otherwise Events::drop_event returns "access denied" error). sql/events.cc: A post-review fix for: rename start_or_stop_event_scheduler to switch_event_scheduler_state. sql/events.h: A post-review fix for: rename start_or_stop_event_scheduler to switch_event_scheduler_state. sql/set_var.cc: A post-review fix for: rename start_or_stop_event_scheduler to switch_event_scheduler_state. sql/sql_yacc.yy: Remove unused declaratoins. --- mysql-test/r/events.result | 16 +++--- mysql-test/r/events_bugs.result | 62 ++++++++++----------- mysql-test/r/events_scheduling.result | 50 ++++++++++------- mysql-test/t/events_scheduling.test | 77 ++++++++++++++++++++------- sql/event_data_objects.cc | 72 ++++++++++++++++++++++--- sql/event_data_objects.h | 2 +- sql/event_db_repository.cc | 7 +++ sql/event_scheduler.cc | 23 +------- sql/events.cc | 12 ++--- sql/events.h | 2 +- sql/set_var.cc | 2 +- sql/sql_yacc.yy | 2 - 12 files changed, 209 insertions(+), 118 deletions(-) diff --git a/mysql-test/r/events.result b/mysql-test/r/events.result index 7125b13cb88..0b1cd67f559 100644 --- a/mysql-test/r/events.result +++ b/mysql-test/r/events.result @@ -197,7 +197,7 @@ create event SHOW CREATE EVENT ðóóò21; Event sql_mode time_zone Create Event ðóóò21 SYSTEM CREATE EVENT `ðóóò21` ON SCHEDULE EVERY '51 0:0:35' DAY_SECOND STARTS '#' ON COMPLETION NOT PRESERVE ENABLE COMMENT 'òîâà å 1251 êîìåíòàð' DO select 1 -insert into mysql.event (db, name, body, definer, interval_value, interval_field) values (database(), "root22", "select 1", user(), 100, "SECOND_MICROSECOND"); +insert into mysql.event (db, name, body, definer, interval_value, interval_field, originator) values (database(), "root22", "select 1", user(), 100, "SECOND_MICROSECOND", 1); show create event root22; ERROR 42000: This version of MySQL doesn't yet support 'MICROSECOND' SHOW EVENTS; @@ -231,8 +231,8 @@ Create a test event. Only event metadata is relevant, the actual schedule and body are not. CREATE EVENT intact_check ON SCHEDULE EVERY 10 HOUR DO SELECT "nothing"; SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 Try to alter mysql.event: the server should fail to load event information after mysql.event was tampered with. @@ -241,8 +241,8 @@ works as before ALTER TABLE mysql.event ADD dummy INT; SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test intact_check root@localhost SYSTEM RECURRING NULL 10 # # NULL ENABLED 1 SELECT event_name FROM INFORMATION_SCHEMA.events; event_name intact_check @@ -330,7 +330,7 @@ ERROR HY000: Cannot load from mysql.event. The table is probably corrupted DROP EVENT no_such_event; ERROR HY000: Unknown event 'no_such_event' CREATE EVENT intact_check_1 ON SCHEDULE EVERY 5 HOUR DO SELECT 5; -ERROR HY000: Column count of mysql.event is wrong. Expected 17, found 15. The table is probably corrupted +ERROR HY000: Column count of mysql.event is wrong. Expected 18, found 16. The table is probably corrupted ALTER EVENT intact_check_1 ON SCHEDULE EVERY 8 HOUR DO SELECT 8; ERROR HY000: Unknown event 'intact_check_1' ALTER EVENT intact_check_1 RENAME TO intact_check_2; @@ -400,7 +400,7 @@ Restore the original table. CREATE TABLE mysql.event like event_like; DROP TABLE event_like; SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator create event e_26 on schedule at '2017-01-01 00:00:00' disable do set @a = 5; select db, name, body, definer, convert_tz(execute_at, 'UTC', 'SYSTEM'), on_completion from mysql.event; db name body definer convert_tz(execute_at, 'UTC', 'SYSTEM') on_completion @@ -512,7 +512,7 @@ ERROR 42000: Incorrect database name 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa SHOW EVENTS FROM ``; ERROR 42000: Incorrect database name '' SHOW EVENTS FROM `events\\test`; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator LOCK TABLES mode. diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result index ba82a7d7b1b..c4053bcfb47 100644 --- a/mysql-test/r/events_bugs.result +++ b/mysql-test/r/events_bugs.result @@ -390,30 +390,30 @@ SET TIME_ZONE= '+00:00'; SET TIMESTAMP= UNIX_TIMESTAMP('2005-12-31 23:58:59'); CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -events_test e1 root@localhost +00:00 RECURRING NULL 1 DAY 2005-12-31 23:58:59 NULL ENABLED +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost +00:00 RECURRING NULL 1 DAY 2005-12-31 23:58:59 NULL ENABLED 1 SET TIME_ZONE= '-01:00'; ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2000-01-01 00:00:00'; SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -events_test e1 root@localhost -01:00 RECURRING NULL 1 DAY 2000-01-01 00:00:00 NULL ENABLED +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost -01:00 RECURRING NULL 1 DAY 2000-01-01 00:00:00 NULL ENABLED 1 SET TIME_ZONE= '+02:00'; ALTER EVENT e1 ON SCHEDULE AT '2000-01-02 00:00:00' ON COMPLETION PRESERVE DISABLE; SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -events_test e1 root@localhost +02:00 ONE TIME 2000-01-02 00:00:00 NULL NULL NULL NULL DISABLED +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost +02:00 ONE TIME 2000-01-02 00:00:00 NULL NULL NULL NULL DISABLED 1 SET TIME_ZONE= '-03:00'; ALTER EVENT e1 ON SCHEDULE EVERY 1 DAY ENDS '2030-01-03 00:00:00' ON COMPLETION PRESERVE DISABLE; SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -events_test e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 DISABLED +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 DISABLED 1 SET TIME_ZONE= '+04:00'; ALTER EVENT e1 DO SELECT 2; SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -events_test e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 ENABLED +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost -03:00 RECURRING NULL 1 DAY 2005-12-31 20:58:59 2030-01-03 00:00:00 ENABLED 1 DROP EVENT e1; SET TIME_ZONE='+05:00'; CREATE EVENT e1 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO @@ -427,15 +427,15 @@ SET TIME_ZONE='+00:00'; CREATE EVENT e3 ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' DO SELECT 1; SELECT * FROM INFORMATION_SCHEMA.EVENTS ORDER BY event_name; -EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT -NULL events_test e1 root@localhost +05:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:58:59 2005-12-31 23:58:59 NULL -NULL events_test e2 root@localhost -05:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:59:00 2005-12-31 23:59:00 NULL -NULL events_test e3 root@localhost +00:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:59:01 2005-12-31 23:59:01 NULL +EVENT_CATALOG EVENT_SCHEMA EVENT_NAME DEFINER TIME_ZONE EVENT_BODY EVENT_DEFINITION EVENT_TYPE EXECUTE_AT INTERVAL_VALUE INTERVAL_FIELD SQL_MODE STARTS ENDS STATUS ON_COMPLETION CREATED LAST_ALTERED LAST_EXECUTED EVENT_COMMENT ORIGINATOR +NULL events_test e1 root@localhost +05:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:58:59 2005-12-31 23:58:59 NULL 1 +NULL events_test e2 root@localhost -05:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:59:00 2005-12-31 23:59:00 NULL 1 +NULL events_test e3 root@localhost +00:00 SQL SELECT 1 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED NOT PRESERVE 2005-12-31 23:59:01 2005-12-31 23:59:01 NULL 1 SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -events_test e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED -events_test e2 root@localhost -05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED -events_test e3 root@localhost +00:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 +events_test e2 root@localhost -05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 +events_test e3 root@localhost +00:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 SHOW CREATE EVENT e1; Event sql_mode time_zone Create Event e1 +05:00 CREATE EVENT `e1` ON SCHEDULE EVERY 1 DAY STARTS '2006-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 1 @@ -475,10 +475,10 @@ SELECT 1; Warnings: Note 1584 Event execution time is in the past and ON COMPLETION NOT PRESERVE is set. Event has not been created SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -events_test e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED -events_test e2 root@localhost -05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED -events_test e3 root@localhost +00:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost +05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 +events_test e2 root@localhost -05:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 +events_test e3 root@localhost +00:00 RECURRING NULL 1 DAY 2006-01-01 00:00:00 NULL ENABLED 1 The following should succeed giving a warning. ALTER EVENT e1 ON SCHEDULE EVERY 1 HOUR STARTS '1999-01-01 00:00:00' ENDS '1999-01-02 00:00:00' ON COMPLETION PRESERVE; @@ -511,15 +511,15 @@ CREATE EVENT e8 ON SCHEDULE AT '1999-01-01 00:00:00' DO SELECT 1; SHOW EVENTS; -Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status -events_test e1 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED -events_test e2 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 NULL ENABLED -events_test e3 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED -events_test e4 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED -events_test e5 root@localhost +00:00 ONE TIME 1999-01-01 00:00:00 NULL NULL NULL NULL DISABLED -events_test e6 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 NULL ENABLED -events_test e7 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED -events_test e8 root@localhost +00:00 ONE TIME 1999-01-01 00:00:00 NULL NULL NULL NULL DISABLED +Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator +events_test e1 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED 1 +events_test e2 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 NULL ENABLED 1 +events_test e3 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED 1 +events_test e4 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED 1 +events_test e5 root@localhost +00:00 ONE TIME 1999-01-01 00:00:00 NULL NULL NULL NULL DISABLED 1 +events_test e6 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 NULL ENABLED 1 +events_test e7 root@localhost +00:00 RECURRING NULL 1 HOUR 1999-01-01 00:00:00 1999-01-02 00:00:00 DISABLED 1 +events_test e8 root@localhost +00:00 ONE TIME 1999-01-01 00:00:00 NULL NULL NULL NULL DISABLED 1 DROP EVENT e8; DROP EVENT e7; DROP EVENT e6; diff --git a/mysql-test/r/events_scheduling.result b/mysql-test/r/events_scheduling.result index 33c0781d4e7..d45bffcd7ff 100644 --- a/mysql-test/r/events_scheduling.result +++ b/mysql-test/r/events_scheduling.result @@ -44,44 +44,56 @@ CREATE TABLE table_1(a int); CREATE TABLE table_2(a int); CREATE TABLE table_3(a int); CREATE TABLE table_4(a int); -CREATE TABLE T19170(s1 TIMESTAMP); SET GLOBAL event_scheduler=ON; -CREATE EVENT two_sec ON SCHEDULE EVERY 2 SECOND DO INSERT INTO table_1 VALUES(1); -CREATE EVENT start_n_end -ON SCHEDULE EVERY 1 SECOND +CREATE EVENT event_1 ON SCHEDULE EVERY 2 SECOND +DO +INSERT INTO table_1 VALUES (1); +CREATE EVENT event_2 ON SCHEDULE EVERY 1 SECOND ENDS NOW() + INTERVAL 6 SECOND ON COMPLETION PRESERVE -DO INSERT INTO table_2 VALUES(1); -CREATE EVENT only_one_time ON SCHEDULE EVERY 2 SECOND ENDS NOW() + INTERVAL 1 SECOND DO INSERT INTO table_3 VALUES(1); -CREATE EVENT two_time ON SCHEDULE EVERY 1 SECOND ENDS NOW() + INTERVAL 1 SECOND ON COMPLETION PRESERVE DO INSERT INTO table_4 VALUES(1); +DO +INSERT INTO table_2 VALUES (1); +CREATE EVENT event_3 ON SCHEDULE EVERY 2 SECOND ENDS NOW() + INTERVAL 1 SECOND +ON COMPLETION NOT PRESERVE +DO +INSERT INTO table_3 VALUES (1); +CREATE EVENT event_4 ON SCHEDULE EVERY 1 SECOND ENDS NOW() + INTERVAL 1 SECOND +ON COMPLETION PRESERVE +DO +INSERT INTO table_4 VALUES (1); SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_1; IF(SUM(a) >= 4, 'OK', 'ERROR') OK SELECT IF(SUM(a) >= 5, 'OK', 'ERROR') FROM table_2; IF(SUM(a) >= 5, 'OK', 'ERROR') OK -SELECT IF(SUM(a) > 0, 'OK', 'ERROR') FROM table_3; -IF(SUM(a) > 0, 'OK', 'ERROR') +SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_3; +IF(SUM(a) >= 1, 'OK', 'ERROR') OK -SELECT IF(SUM(a) > 0, 'OK', 'ERROR') FROM table_4; -IF(SUM(a) > 0, 'OK', 'ERROR') +SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_4; +IF(SUM(a) >= 1, 'OK', 'ERROR') OK -DROP EVENT two_sec; -SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR') FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='start_n_end' AND ENDS IS NOT NULL; +SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR') +FROM INFORMATION_SCHEMA.EVENTS +WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2'; IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR') OK -SELECT IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR') FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='start_n_end' AND ENDS IS NOT NULL; +SELECT IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR') +FROM INFORMATION_SCHEMA.EVENTS +WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2'; IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR') OK -DROP EVENT IF EXISTS events_test.start_n_end; "Already dropped because ended. Therefore an error." -DROP EVENT only_one_time; -ERROR HY000: Unknown event 'only_one_time' +DROP EVENT event_3; +ERROR HY000: Unknown event 'event_3' +DROP EVENT event_1; "Should be preserved" SELECT EVENT_NAME, STATUS FROM INFORMATION_SCHEMA.EVENTS ORDER BY EVENT_NAME; EVENT_NAME STATUS -two_time DISABLED -DROP EVENT two_time; +event_2 DISABLED +event_4 DISABLED +DROP EVENT event_2; +DROP EVENT event_4; DROP TABLE table_1; DROP TABLE table_2; DROP TABLE table_3; diff --git a/mysql-test/t/events_scheduling.test b/mysql-test/t/events_scheduling.test index b53a548b6ed..5b839e25910 100644 --- a/mysql-test/t/events_scheduling.test +++ b/mysql-test/t/events_scheduling.test @@ -34,34 +34,73 @@ CREATE TABLE table_1(a int); CREATE TABLE table_2(a int); CREATE TABLE table_3(a int); CREATE TABLE table_4(a int); -CREATE TABLE T19170(s1 TIMESTAMP); + SET GLOBAL event_scheduler=ON; # We need to have 2 to make it safe with valgrind. This is probably because # of when we calculate the timestamp value -CREATE EVENT two_sec ON SCHEDULE EVERY 2 SECOND DO INSERT INTO table_1 VALUES(1); -CREATE EVENT start_n_end - ON SCHEDULE EVERY 1 SECOND - ENDS NOW() + INTERVAL 6 SECOND - ON COMPLETION PRESERVE - DO INSERT INTO table_2 VALUES(1); ---sleep 5 -CREATE EVENT only_one_time ON SCHEDULE EVERY 2 SECOND ENDS NOW() + INTERVAL 1 SECOND DO INSERT INTO table_3 VALUES(1); -CREATE EVENT two_time ON SCHEDULE EVERY 1 SECOND ENDS NOW() + INTERVAL 1 SECOND ON COMPLETION PRESERVE DO INSERT INTO table_4 VALUES(1); ---sleep 5 +CREATE EVENT event_1 ON SCHEDULE EVERY 2 SECOND +DO + INSERT INTO table_1 VALUES (1); + +CREATE EVENT event_2 ON SCHEDULE EVERY 1 SECOND +ENDS NOW() + INTERVAL 6 SECOND +ON COMPLETION PRESERVE +DO + INSERT INTO table_2 VALUES (1); + +CREATE EVENT event_3 ON SCHEDULE EVERY 2 SECOND ENDS NOW() + INTERVAL 1 SECOND +ON COMPLETION NOT PRESERVE +DO + INSERT INTO table_3 VALUES (1); + +CREATE EVENT event_4 ON SCHEDULE EVERY 1 SECOND ENDS NOW() + INTERVAL 1 SECOND +ON COMPLETION PRESERVE +DO + INSERT INTO table_4 VALUES (1); + +# Let event_1 insert at least 4 records into the table +let $wait_condition=select count(*) >= 4 from table_1; +--source include/wait_condition.inc + +# Let event_2 reach the end of its execution interval +let $wait_condition=select count(*) = 0 from information_schema.events +where event_name='event_2' and status='enabled'; +--source include/wait_condition.inc + +# Let event_3, which is ON COMPLETION NOT PRESERVE execute and drop itself +let $wait_condition=select count(*) = 0 from information_schema.events +where event_name='event_3'; +--source include/wait_condition.inc + +# Let event_4 reach the end of its execution interval +let $wait_condition=select count(*) = 0 from information_schema.events +where event_name='event_4' and status='enabled'; +--source include/wait_condition.inc + +# check the data + SELECT IF(SUM(a) >= 4, 'OK', 'ERROR') FROM table_1; SELECT IF(SUM(a) >= 5, 'OK', 'ERROR') FROM table_2; -SELECT IF(SUM(a) > 0, 'OK', 'ERROR') FROM table_3; -SELECT IF(SUM(a) > 0, 'OK', 'ERROR') FROM table_4; -DROP EVENT two_sec; -SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR') FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='start_n_end' AND ENDS IS NOT NULL; -SELECT IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR') FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='start_n_end' AND ENDS IS NOT NULL; -DROP EVENT IF EXISTS events_test.start_n_end; +SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_3; +SELECT IF(SUM(a) >= 1, 'OK', 'ERROR') FROM table_4; + +SELECT IF(TIME_TO_SEC(TIMEDIFF(ENDS,STARTS))=6, 'OK', 'ERROR') +FROM INFORMATION_SCHEMA.EVENTS +WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2'; + +SELECT IF(LAST_EXECUTED-ENDS < 3, 'OK', 'ERROR') +FROM INFORMATION_SCHEMA.EVENTS +WHERE EVENT_SCHEMA=DATABASE() AND EVENT_NAME='event_2'; + --echo "Already dropped because ended. Therefore an error." --error ER_EVENT_DOES_NOT_EXIST -DROP EVENT only_one_time; +DROP EVENT event_3; + +DROP EVENT event_1; --echo "Should be preserved" SELECT EVENT_NAME, STATUS FROM INFORMATION_SCHEMA.EVENTS ORDER BY EVENT_NAME; -DROP EVENT two_time; +DROP EVENT event_2; +DROP EVENT event_4; DROP TABLE table_1; DROP TABLE table_2; DROP TABLE table_3; diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index 95bfba548de..1881a3540e4 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -99,7 +99,9 @@ Event_parse_data::new_instance(THD *thd) */ Event_parse_data::Event_parse_data() - :on_completion(ON_COMPLETION_DROP), status(ENABLED), do_not_create(FALSE), + :on_completion(Event_basic::ON_COMPLETION_DROP), + status(Event_basic::ENABLED), + do_not_create(FALSE), item_starts(NULL), item_ends(NULL), item_execute_at(NULL), starts_null(TRUE), ends_null(TRUE), execute_at_null(TRUE), item_expression(NULL), expression(0) @@ -241,7 +243,7 @@ Event_parse_data::check_if_in_the_past(THD *thd, my_time_t ltime_utc) if (ltime_utc >= (my_time_t) thd->query_start()) return; - if (on_completion == ON_COMPLETION_DROP) + if (on_completion == Event_basic::ON_COMPLETION_DROP) { switch (thd->lex->sql_command) { case SQLCOM_CREATE_EVENT: @@ -258,9 +260,9 @@ Event_parse_data::check_if_in_the_past(THD *thd, my_time_t ltime_utc) do_not_create= TRUE; } - else if (status == ENABLED) + else if (status == Event_basic::ENABLED) { - status= DISABLED; + status= Event_basic::DISABLED; push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, ER_EVENT_EXEC_TIME_IN_THE_PAST, ER(ER_EVENT_EXEC_TIME_IN_THE_PAST)); @@ -589,6 +591,7 @@ Event_parse_data::check_parse_data(THD *thd) ret= init_execute_at(thd) || init_interval(thd) || init_starts(thd) || init_ends(thd); + check_originator_id(thd); DBUG_RETURN(ret); } @@ -635,6 +638,31 @@ Event_parse_data::init_definer(THD *thd) } +/** + Set the originator id of the event to the server_id if executing on + the master or set to the server_id of the master if executing on + the slave. If executing on slave, also set status to SLAVESIDE_DISABLED. + + SYNOPSIS + Event_parse_data::check_originator_id() +*/ +void Event_parse_data::check_originator_id(THD *thd) +{ + /* Disable replicated events on slave. */ + if ((thd->system_thread == SYSTEM_THREAD_SLAVE_SQL) || + (thd->system_thread == SYSTEM_THREAD_SLAVE_IO)) + { + DBUG_PRINT("info", ("Invoked object status set to SLAVESIDE_DISABLED.")); + if ((status == Event_basic::ENABLED) || + (status == Event_basic::DISABLED)) + status = Event_basic::SLAVESIDE_DISABLED; + originator = thd->server_id; + } + else + originator = server_id; +} + + /* Constructor @@ -1004,8 +1032,23 @@ Event_queue_element::load_from_row(THD *thd, TABLE *table) goto error; DBUG_PRINT("load_from_row", ("Event [%s] is [%s]", name.str, ptr)); - status= (ptr[0]=='E'? Event_queue_element::ENABLED: - Event_queue_element::DISABLED); + + /* Set event status (ENABLED | SLAVESIDE_DISABLED | DISABLED) */ + switch (ptr[0]) + { + case 'E' : + status = Event_queue_element::ENABLED; + break; + case 'S' : + status = Event_queue_element::SLAVESIDE_DISABLED; + break; + case 'D' : + status = Event_queue_element::DISABLED; + break; + } + if ((ptr= get_field(&mem_root, table->field[ET_FIELD_ORIGINATOR])) == NullS) + goto error; + originator = table->field[ET_FIELD_ORIGINATOR]->val_int(); /* ToDo : Andrey . Find a way not to allocate ptr on event_mem_root */ if ((ptr= get_field(&mem_root, @@ -1356,7 +1399,7 @@ Event_queue_element::compute_next_execution_time() (long) starts, (long) ends, (long) last_executed, (long) this)); - if (status == Event_queue_element::DISABLED) + if (status != Event_queue_element::ENABLED) { DBUG_PRINT("compute_next_execution_time", ("Event %s is DISABLED", name.str)); @@ -1708,6 +1751,8 @@ Event_timed::get_create_event(THD *thd, String *buf) if (status == Event_timed::ENABLED) buf->append(STRING_WITH_LEN("ENABLE")); + else if (status == Event_timed::SLAVESIDE_DISABLED) + buf->append(STRING_WITH_LEN("DISABLE ON SLAVE")); else buf->append(STRING_WITH_LEN("DISABLE")); @@ -1765,7 +1810,7 @@ Event_job_data::get_fake_create_event(String *buf) */ int -Event_job_data::execute(THD *thd) +Event_job_data::execute(THD *thd, bool drop) { Security_context save_ctx; /* this one is local and not needed after exec */ @@ -1805,6 +1850,17 @@ Event_job_data::execute(THD *thd) definer_host.str, dbname.str)); ret= -99; } + if (drop) + { + sql_print_information("Event Scheduler: Dropping %s.%s", + dbname.str, name.str); + /* + We must do it here since here we're under the right authentication + ID of the event definer + */ + if (Events::drop_event(thd, dbname, name, FALSE)) + ret= 1; + } event_restore_security_context(thd, &save_ctx); done: diff --git a/sql/event_data_objects.h b/sql/event_data_objects.h index 4d58484e5c2..eb851c98065 100644 --- a/sql/event_data_objects.h +++ b/sql/event_data_objects.h @@ -184,7 +184,7 @@ public: load_from_row(THD *thd, TABLE *table); int - execute(THD *thd); + execute(THD *thd, bool drop); int compile(THD *thd, MEM_ROOT *mem_root); diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc index cc981c9cb69..fcd48757957 100644 --- a/sql/event_db_repository.cc +++ b/sql/event_db_repository.cc @@ -905,6 +905,13 @@ update_timing_fields_for_event(THD *thd, DBUG_ENTER("Event_db_repository::update_timing_fields_for_event"); + /* + Turn off row binlogging of event timing updates. These are not used + for RBR of events replicated to the slave. + */ + if (thd->current_stmt_binlog_row_based) + thd->clear_current_stmt_binlog_row_based(); + if (open_event_table(thd, TL_WRITE, &table)) goto end; diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc index a9a93cbc74b..fa5cde9a43a 100644 --- a/sql/event_scheduler.cc +++ b/sql/event_scheduler.cc @@ -309,7 +309,7 @@ Event_worker_thread::run(THD *thd, Event_queue_element_for_exec *event) thd->enable_slow_log= TRUE; - ret= job_data->execute(thd); + ret= job_data->execute(thd, event->dropped); print_warnings(thd, job_data); @@ -338,27 +338,6 @@ Event_worker_thread::run(THD *thd, Event_queue_element_for_exec *event) end: delete job_data; - if (event->dropped) - { - sql_print_information("Event Scheduler: Dropping %s.%s", - event->dbname.str, event->name.str); - /* - Using db_repository can lead to a race condition because we access - the table without holding LOCK_metadata. - Scenario: - 1. CREATE EVENT xyz AT ... (conn thread) - 2. execute xyz (worker) - 3. CREATE EVENT XYZ EVERY ... (conn thread) - 4. drop xyz (worker) - 5. XYZ was just created on disk but `drop xyz` of the worker dropped it. - A consequent load to create Event_queue_element will fail. - - If all operations are performed under LOCK_metadata there is no such - problem. However, this comes at the price of introduction bi-directional - association between class Events and class Event_worker_thread. - */ - Events::drop_event(thd, event->dbname, event->name, FALSE); - } DBUG_PRINT("info", ("Done with Event %s.%s", event->dbname.str, event->name.str)); diff --git a/sql/events.cc b/sql/events.cc index 7c44116af55..10a002121a0 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -1041,14 +1041,14 @@ Events::dump_internal_status() */ bool -Events::start_or_stop_event_scheduler(enum_opt_event_scheduler start_or_stop) +Events::switch_event_scheduler_state(enum_opt_event_scheduler new_state) { bool ret= FALSE; - DBUG_ENTER("Events::start_or_stop_event_scheduler"); + DBUG_ENTER("Events::switch_event_scheduler_state"); - DBUG_ASSERT(start_or_stop == Events::EVENTS_ON || - start_or_stop == Events::EVENTS_OFF); + DBUG_ASSERT(new_state == Events::EVENTS_ON || + new_state == Events::EVENTS_OFF); /* If the scheduler was disabled because there are no/bad @@ -1068,7 +1068,7 @@ Events::start_or_stop_event_scheduler(enum_opt_event_scheduler start_or_stop) goto end; } - if (start_or_stop == EVENTS_ON) + if (new_state == EVENTS_ON) ret= scheduler->start(); else ret= scheduler->stop(); @@ -1079,7 +1079,7 @@ Events::start_or_stop_event_scheduler(enum_opt_event_scheduler start_or_stop) goto end; } - opt_event_scheduler= start_or_stop; + opt_event_scheduler= new_state; end: pthread_mutex_unlock(&LOCK_event_metadata); diff --git a/sql/events.h b/sql/events.h index db0e947ab6c..1b99b072fd7 100644 --- a/sql/events.h +++ b/sql/events.h @@ -99,7 +99,7 @@ public: destroy_mutexes(); static bool - start_or_stop_event_scheduler(enum enum_opt_event_scheduler start_or_stop); + switch_event_scheduler_state(enum enum_opt_event_scheduler new_state); static bool create_event(THD *thd, Event_parse_data *parse_data, bool if_exists); diff --git a/sql/set_var.cc b/sql/set_var.cc index 898d47e766e..741969214bd 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -4020,7 +4020,7 @@ sys_var_event_scheduler::update(THD *thd, set_var *var) new_state= (enum Events::enum_opt_event_scheduler) var->save_result.ulong_value; - res= Events::start_or_stop_event_scheduler(new_state); + res= Events::switch_event_scheduler_state(new_state); DBUG_RETURN((bool) res); } diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 0c6ce1d7eeb..50bc81cc13d 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -948,7 +948,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); %token SIGNED_SYM %token SIMPLE_SYM /* SQL-2003-N */ %token SLAVE -%token SLAVESIDE_DISABLE_SYM %token SMALLINT /* SQL-2003-R */ %token SNAPSHOT_SYM %token SOCKET_SYM @@ -10004,7 +10003,6 @@ keyword_sp: | SIMPLE_SYM {} | SHARE_SYM {} | SHUTDOWN {} - | SLAVESIDE_DISABLE_SYM {} | SNAPSHOT_SYM {} | SOUNDS_SYM {} | SQL_CACHE_SYM {} From 923d2d3a0174c29e7232ce637b38a1da1afebfc7 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 21:01:09 +0400 Subject: [PATCH 139/153] Remove a dead file. BitKeeper/deleted/.del-openssl_2.result: Delete: mysql-test/r/openssl_2.result --- mysql-test/r/openssl_2.result | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 mysql-test/r/openssl_2.result diff --git a/mysql-test/r/openssl_2.result b/mysql-test/r/openssl_2.result deleted file mode 100644 index 879c623dd40..00000000000 --- a/mysql-test/r/openssl_2.result +++ /dev/null @@ -1,25 +0,0 @@ -SHOW STATUS LIKE 'Ssl%'; -Variable_name Value -Ssl_accepts 1 -Ssl_finished_accepts 1 -Ssl_finished_connects 0 -Ssl_accept_renegotiates 0 -Ssl_connect_renegotiates 0 -Ssl_callback_cache_hits 0 -Ssl_session_cache_hits 0 -Ssl_session_cache_misses 0 -Ssl_session_cache_timeouts 0 -Ssl_used_session_cache_entries 1 -Ssl_client_connects 0 -Ssl_session_cache_overflows 0 -Ssl_session_cache_size 128 -Ssl_session_cache_mode SERVER -Ssl_sessions_reused 0 -Ssl_ctx_verify_mode 7 -Ssl_ctx_verify_depth 4294967295 -Ssl_verify_mode 7 -Ssl_verify_depth 4294967295 -Ssl_version TLSv1 -Ssl_cipher EDH-RSA-DES-CBC3-SHA -Ssl_cipher_list -Ssl_default_timeout 7200 From aadfe5e7fcd732be86ed620d016621450d496919 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 21:46:25 +0400 Subject: [PATCH 140/153] Fix a compile error with LINT enabled builds. --- sql/sp_head.cc | 3 --- 1 file changed, 3 deletions(-) diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 9bedc6fb38e..cb19e800510 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -2109,9 +2109,6 @@ sp_head::show_create_procedure(THD *thd) DBUG_ENTER("sp_head::show_create_procedure"); DBUG_PRINT("info", ("procedure %s", m_name.str)); - LINT_INIT(sql_mode_str); - LINT_INIT(sql_mode_len); - if (check_show_routine_access(thd, this, &full_access)) DBUG_RETURN(1); From 25677bdc2e385f67f7df13c5fb25d0973e1f00d9 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 5 Apr 2007 23:22:33 +0400 Subject: [PATCH 141/153] Fix a compile failure on Windows. --- sql/set_var.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/set_var.cc b/sql/set_var.cc index 741969214bd..ea2888aec56 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -3683,7 +3683,7 @@ byte *sys_var_thd_sql_mode::value_ptr(THD *thd, enum_var_type type, ulonglong val= ((type == OPT_GLOBAL) ? global_system_variables.*offset : thd->variables.*offset); (void) symbolic_mode_representation(thd, val, &sql_mode); - return sql_mode.str; + return (byte *) sql_mode.str; } From dd0c20ac289b6257c59c4867bb15aafec0db3f22 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Apr 2007 00:38:57 +0400 Subject: [PATCH 142/153] 3d attempt to fix information_schema.test failure on HP-UX. Apparently it's the only platform in pushbuild where we compile without openssl. mysql-test/r/information_schema.result: Update results. mysql-test/r/openssl_1.result: Update results. mysql-test/t/information_schema.test: Move the part of the test case that needs SSL support to openssl_1.test mysql-test/t/openssl_1.test: Add a test case that needs SSL support. --- mysql-test/r/information_schema.result | 11 -------- mysql-test/r/openssl_1.result | 22 +++++++++++++++ mysql-test/t/information_schema.test | 17 ++---------- mysql-test/t/openssl_1.test | 37 ++++++++++++++++++++++++++ 4 files changed, 61 insertions(+), 26 deletions(-) diff --git a/mysql-test/r/information_schema.result b/mysql-test/r/information_schema.result index 3453a486da9..c04b0a0ac47 100644 --- a/mysql-test/r/information_schema.result +++ b/mysql-test/r/information_schema.result @@ -1408,7 +1408,6 @@ select user,db from information_schema.processlist; user db user3148 test drop user user3148@localhost; -DROP TABLE IF EXISTS thread_status; DROP TABLE IF EXISTS server_status; DROP EVENT IF EXISTS event_status; SET GLOBAL event_scheduler=1; @@ -1417,26 +1416,16 @@ ON SCHEDULE AT NOW() ON COMPLETION NOT PRESERVE DO BEGIN -CREATE TABLE thread_status -SELECT variable_name, variable_value -FROM information_schema.session_status -WHERE variable_name LIKE 'SSL_ACCEPTS' OR -variable_name LIKE 'SSL_CALLBACK_CACHE_HITS'; CREATE TABLE server_status SELECT variable_name FROM information_schema.global_status WHERE variable_name LIKE 'ABORTED_CONNECTS' OR variable_name LIKE 'BINLOG_CACHE_DISK_USE'; END$$ -SELECT variable_name, variable_value FROM thread_status; -variable_name variable_value -SSL_ACCEPTS 0.0000000 -SSL_CALLBACK_CACHE_HITS 0.0000000 SELECT variable_name FROM server_status; variable_name ABORTED_CONNECTS BINLOG_CACHE_DISK_USE -DROP TABLE thread_status; DROP TABLE server_status; SET GLOBAL event_scheduler=0; End of 5.1 tests. diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result index 34d8e3ab768..deb25ed1bb6 100644 --- a/mysql-test/r/openssl_1.result +++ b/mysql-test/r/openssl_1.result @@ -51,3 +51,25 @@ SSL error: Unable to get private key from '' mysqltest: Could not open connection 'default': 2026 SSL connection error SSL error: Unable to get certificate from '' mysqltest: Could not open connection 'default': 2026 SSL connection error +End of 5.0 tests +DROP TABLE IF EXISTS thread_status; +DROP EVENT IF EXISTS event_status; +SET GLOBAL event_scheduler=1; +CREATE EVENT event_status +ON SCHEDULE AT NOW() +ON COMPLETION NOT PRESERVE +DO +BEGIN +CREATE TABLE thread_status +SELECT variable_name, variable_value +FROM information_schema.session_status +WHERE variable_name LIKE 'SSL_ACCEPTS' OR +variable_name LIKE 'SSL_CALLBACK_CACHE_HITS'; +END$$ +SELECT variable_name, variable_value FROM thread_status; +variable_name variable_value +SSL_ACCEPTS 0.0000000 +SSL_CALLBACK_CACHE_HITS 0.0000000 +DROP TABLE thread_status; +SET GLOBAL event_scheduler=0; +End of 5.1 tests diff --git a/mysql-test/t/information_schema.test b/mysql-test/t/information_schema.test index ae330f47bc5..a49044e63c1 100644 --- a/mysql-test/t/information_schema.test +++ b/mysql-test/t/information_schema.test @@ -1042,16 +1042,13 @@ select user,db from information_schema.processlist; connection default; drop user user3148@localhost; - - # -# Bug #26174 Server Crash: INSERT ... SELECT ... FROM I_S.GLOBAL_STATUS in Event +# Bug #26174 Server Crash: INSERT ... SELECT ... FROM I_S.GLOBAL_STATUS +# in Event (see also openssl_1.test) # --disable_warnings -DROP TABLE IF EXISTS thread_status; DROP TABLE IF EXISTS server_status; DROP EVENT IF EXISTS event_status; - --enable_warnings SET GLOBAL event_scheduler=1; @@ -1063,12 +1060,6 @@ CREATE EVENT event_status ON COMPLETION NOT PRESERVE DO BEGIN - CREATE TABLE thread_status - SELECT variable_name, variable_value - FROM information_schema.session_status - WHERE variable_name LIKE 'SSL_ACCEPTS' OR - variable_name LIKE 'SSL_CALLBACK_CACHE_HITS'; - CREATE TABLE server_status SELECT variable_name FROM information_schema.global_status @@ -1079,15 +1070,11 @@ END$$ DELIMITER ;$$ let $wait_condition=select count(*) = 0 from information_schema.events where event_name='event_status'; -let $wait_timeout=30; --source include/wait_condition.inc -SELECT variable_name, variable_value FROM thread_status; SELECT variable_name FROM server_status; -DROP TABLE thread_status; DROP TABLE server_status; SET GLOBAL event_scheduler=0; --echo End of 5.1 tests. - diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test index 8772b8157e3..bbbbc7409b6 100644 --- a/mysql-test/t/openssl_1.test +++ b/mysql-test/t/openssl_1.test @@ -96,4 +96,41 @@ drop table t1; --error 1 --exec $MYSQL_TEST --ssl-cert= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1 +--echo End of 5.0 tests +# +# Bug #26174 Server Crash: INSERT ... SELECT ... FROM I_S.GLOBAL_STATUS in +# Event (see also information_schema.test for the other part of test for +# this bug). +# +--disable_warnings +DROP TABLE IF EXISTS thread_status; +DROP EVENT IF EXISTS event_status; +--enable_warnings + +SET GLOBAL event_scheduler=1; + +DELIMITER $$; + +CREATE EVENT event_status + ON SCHEDULE AT NOW() + ON COMPLETION NOT PRESERVE + DO +BEGIN + CREATE TABLE thread_status + SELECT variable_name, variable_value + FROM information_schema.session_status + WHERE variable_name LIKE 'SSL_ACCEPTS' OR + variable_name LIKE 'SSL_CALLBACK_CACHE_HITS'; +END$$ + +DELIMITER ;$$ + +let $wait_condition=select count(*) = 0 from information_schema.events where event_name='event_status'; +--source include/wait_condition.inc + +SELECT variable_name, variable_value FROM thread_status; + +DROP TABLE thread_status; +SET GLOBAL event_scheduler=0; +--echo End of 5.1 tests From a06ff97656cf8882cd87f23b206a92646be4fa0e Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Apr 2007 01:53:15 +0400 Subject: [PATCH 143/153] A fix for events_trans.test failure on many hosts (5.1-runtime) sql/event_data_objects.cc: Disable an event if its data in the table is corrupted. sql/events.cc: A fix for events_trans failure on most of the hosts. A better error message if the event table is old (don't suggest it's corrupted, it may simply have bad data). --- sql/event_data_objects.cc | 1 + sql/events.cc | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc index 1881a3540e4..3d2a5b277fe 100644 --- a/sql/event_data_objects.cc +++ b/sql/event_data_objects.cc @@ -1043,6 +1043,7 @@ Event_queue_element::load_from_row(THD *thd, TABLE *table) status = Event_queue_element::SLAVESIDE_DISABLED; break; case 'D' : + default: status = Event_queue_element::DISABLED; break; } diff --git a/sql/events.cc b/sql/events.cc index 10a002121a0..200f46b7f7a 100644 --- a/sql/events.cc +++ b/sql/events.cc @@ -387,7 +387,7 @@ Events::create_event(THD *thd, Event_parse_data *parse_data, if (check_db_dir_existence(parse_data->dbname.str)) { - my_error(ER_BAD_DB_ERROR, MYF(0)); + my_error(ER_BAD_DB_ERROR, MYF(0), parse_data->dbname.str); DBUG_RETURN(TRUE); } @@ -508,7 +508,7 @@ Events::update_event(THD *thd, Event_parse_data *parse_data, /* Check that the target database exists */ if (check_db_dir_existence(new_dbname->str)) { - my_error(ER_BAD_DB_ERROR, MYF(0)); + my_error(ER_BAD_DB_ERROR, MYF(0), new_dbname->str); DBUG_RETURN(TRUE); } } @@ -1116,7 +1116,7 @@ Events::load_events_from_db(THD *thd) DBUG_ENTER("Events::load_events_from_db"); DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd)); - if ((ret= db_repository->open_event_table(thd, TL_WRITE, &table))) + if (db_repository->open_event_table(thd, TL_WRITE, &table)) { sql_print_error("Event Scheduler: Failed to open table mysql.event"); DBUG_RETURN(TRUE); @@ -1137,8 +1137,8 @@ Events::load_events_from_db(THD *thd) if (et->load_from_row(thd, table)) { sql_print_error("Event Scheduler: " - "Error while reading from mysql.event. " - "The table is probably corrupted"); + "Error while loading events from mysql.event. " + "The table probably contains bad data or is corrupted"); delete et; goto end; } From 93e7a470826e62f2a851d2db435e9f9361b2fb01 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Apr 2007 02:57:38 +0400 Subject: [PATCH 144/153] Fix events.test failure on manu pushbuild hosts (5.1-runtime). sql/event_db_repository.cc: Fix events.test failure on many pushbuild hosts (5.1-runtime). Make sure that when reading mysql.event the key number matches the field number that we're using to read by key. Also, print an error in case of a handler error (to not return 'Unknown error' when a table is corrupted to the user). --- sql/event_db_repository.cc | 52 ++++++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 19 deletions(-) diff --git a/sql/event_db_repository.cc b/sql/event_db_repository.cc index fcd48757957..e3b45d5e0b2 100644 --- a/sql/event_db_repository.cc +++ b/sql/event_db_repository.cc @@ -310,38 +310,52 @@ Event_db_repository::index_read_for_db_for_i_s(THD *thd, TABLE *schema_table, DBUG_PRINT("info", ("Using prefix scanning on PK")); event_table->file->ha_index_init(0, 1); - event_table->field[ET_FIELD_DB]->store(db, strlen(db), scs); key_info= event_table->key_info; + + if (key_info->key_parts == 0 || + key_info->key_part[0].field != event_table->field[ET_FIELD_DB]) + { + /* Corrupted table: no index or index on a wrong column */ + my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0), "event"); + ret= 1; + goto end; + } + + event_table->field[ET_FIELD_DB]->store(db, strlen(db), scs); key_len= key_info->key_part[0].store_length; if (!(key_buf= (byte *)alloc_root(thd->mem_root, key_len))) { - ret= 1; /* Don't send error, it would be done by sql_alloc_error_handler() */ + ret= 1; + goto end; } - else + + key_copy(key_buf, event_table->record[0], key_info, key_len); + if (!(ret= event_table->file->index_read(event_table->record[0], key_buf, + (key_part_map)1, HA_READ_PREFIX))) { - key_copy(key_buf, event_table->record[0], key_info, key_len); - if (!(ret= event_table->file->index_read(event_table->record[0], key_buf, - (key_part_map)1, HA_READ_PREFIX))) + DBUG_PRINT("info",("Found rows. Let's retrieve them. ret=%d", ret)); + do { - DBUG_PRINT("info",("Found rows. Let's retrieve them. ret=%d", ret)); - do - { - ret= copy_event_to_schema_table(thd, schema_table, event_table); - if (ret == 0) - ret= event_table->file->index_next_same(event_table->record[0], - key_buf, key_len); - } while (ret == 0); - } - DBUG_PRINT("info", ("Scan finished. ret=%d", ret)); + ret= copy_event_to_schema_table(thd, schema_table, event_table); + if (ret == 0) + ret= event_table->file->index_next_same(event_table->record[0], + key_buf, key_len); + } while (ret == 0); } - event_table->file->ha_index_end(); + DBUG_PRINT("info", ("Scan finished. ret=%d", ret)); + /* ret is guaranteed to be != 0 */ if (ret == HA_ERR_END_OF_FILE || ret == HA_ERR_KEY_NOT_FOUND) - DBUG_RETURN(FALSE); + ret= 0; + else + event_table->file->print_error(ret, MYF(0)); - DBUG_RETURN(TRUE); +end: + event_table->file->ha_index_end(); + + DBUG_RETURN(test(ret)); } From e739ca87433d358645d06d9eec913c835868e1ef Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Apr 2007 16:06:10 +0500 Subject: [PATCH 145/153] merging fix mysql-test/r/type_set.result: result fixed --- mysql-test/r/type_set.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/r/type_set.result b/mysql-test/r/type_set.result index a75438293f6..877400ab7e1 100644 --- a/mysql-test/r/type_set.result +++ b/mysql-test/r/type_set.result @@ -82,6 +82,6 @@ Note 1291 Column 'f1' has duplicated value '1' in SET show create table t1; Table Create Table t1 CREATE TABLE `t1` ( - `f1` set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','1') default NULL + `f1` set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33','34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49','50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','1') DEFAULT NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; From 9bc5135f81f1ab34175b4c70f660c2ad15fa4711 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Apr 2007 18:56:39 +0400 Subject: [PATCH 146/153] Polishing: add comments. sql/parse_file.cc: Add comments. --- sql/parse_file.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/sql/parse_file.cc b/sql/parse_file.cc index 1351cf66161..aa352433141 100644 --- a/sql/parse_file.cc +++ b/sql/parse_file.cc @@ -719,14 +719,18 @@ nlist_err: /* parse parameters - + SYNOPSIS File_parser::parse() base base address for parameter writing (structure like TABLE) mem_root MEM_ROOT for parameters allocation parameters parameters description - required number of required parameters in above list + required number of parameters in the above list. If the file + contains more parameters than "required", they will + be ignored. If the file contains less parameters + then "required", non-existing parameters will + remain their values. hook hook called for unknown keys hook_data some data specific for the hook @@ -909,6 +913,13 @@ list_err: } } } + + /* + NOTE: if we read less than "required" parameters, it is still Ok. + Probably, we've just read the file of the previous version, which + contains less parameters. + */ + DBUG_RETURN(FALSE); } From c557623a68b2c09ec7fd319b6a58d624dd2c2413 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Apr 2007 19:44:14 +0400 Subject: [PATCH 147/153] Remove a race between Event Scheduler shutdown and SHOW PROCESSLIST. This will hopefully fix events.test failure on vmware-win32, where scheduling is very primitive. mysql-test/t/events_scheduling.test: This test case has no races now and can be enabled under valgrind. sql/event_scheduler.cc: Make Event Scheduler thread shutdown more synchronous: report successful shutdown only after having removed the scheduler thread from the global list of threads. This ensures that after the scheduler has been stopped, its thread is not present in SHOW PROCESSLIST output. --- mysql-test/t/events_scheduling.test | 1 - sql/event_scheduler.cc | 24 +++++++----------------- 2 files changed, 7 insertions(+), 18 deletions(-) diff --git a/mysql-test/t/events_scheduling.test b/mysql-test/t/events_scheduling.test index 5b839e25910..31c09a3d561 100644 --- a/mysql-test/t/events_scheduling.test +++ b/mysql-test/t/events_scheduling.test @@ -1,6 +1,5 @@ # Can't test with embedded server that doesn't support grants -- source include/not_embedded.inc --- source include/not_valgrind.inc CREATE DATABASE IF NOT EXISTS events_test; USE events_test; diff --git a/sql/event_scheduler.cc b/sql/event_scheduler.cc index fa5cde9a43a..0603a299079 100644 --- a/sql/event_scheduler.cc +++ b/sql/event_scheduler.cc @@ -154,8 +154,6 @@ deinit_event_thread(THD *thd) thread_running--; delete thd; pthread_mutex_unlock(&LOCK_thread_count); - - my_thread_end(); } @@ -231,8 +229,7 @@ event_scheduler_thread(void *arg) if (!res) scheduler->run(thd); - deinit_event_thread(thd); - pthread_exit(0); + my_thread_end(); DBUG_RETURN(0); // Against gcc warnings } @@ -260,6 +257,7 @@ event_worker_thread(void *arg) Event_worker_thread worker_thread; worker_thread.run(thd, event); + my_thread_end(); return 0; // Can't return anything here } @@ -494,12 +492,14 @@ Event_scheduler::run(THD *thd) } DBUG_PRINT("info", ("state=%s", scheduler_states_names[state].str)); } + LOCK_DATA(); - DBUG_PRINT("info", ("Signalling back to the stopper COND_state")); + deinit_event_thread(thd); + scheduler_thd= NULL; state= INITIALIZED; + DBUG_PRINT("info", ("Signalling back to the stopper COND_state")); pthread_cond_signal(&COND_state); UNLOCK_DATA(); - sql_print_information("Event Scheduler: Stopped"); DBUG_RETURN(res); } @@ -651,17 +651,7 @@ Event_scheduler::stop() COND_STATE_WAIT(thd, NULL, "Waiting scheduler to stop"); } while (state == STOPPING); DBUG_PRINT("info", ("Scheduler thread has cleaned up. Set state to INIT")); - /* - The rationale behind setting it to NULL here but not destructing it - beforehand is because the THD will be deinited in event_scheduler_thread(). - It's more clear when the post_init and the deinit is done in one function. - Here we just mark that the scheduler doesn't have a THD anymore. Though for - milliseconds the old thread could exist we can't use it anymore. When we - unlock the mutex in this function a little later the state will be - INITIALIZED. Therefore, a connection thread could enter the critical section - and will create a new THD object. - */ - scheduler_thd= NULL; + sql_print_information("Event Scheduler: Stopped"); end: UNLOCK_DATA(); DBUG_RETURN(FALSE); From 52b86a6e0a9be6f3c41f24b9c30d2b6f885ad94f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 6 Apr 2007 20:21:30 +0400 Subject: [PATCH 148/153] Polishing: note added. --- sql/sp_head.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sql/sp_head.cc b/sql/sp_head.cc index 1f44fa6639c..21225d82188 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -954,6 +954,12 @@ sp_head::execute(THD *thd) m_first_instance->m_last_cached_sp == this) || (m_recursion_level + 1 == m_next_cached_sp->m_recursion_level)); + /* + NOTE: The SQL Standard does not specify the context that should be + preserved for stored routines. However, at SAP/Walldorf meeting it was + decided that current database should be preserved. + */ + if (m_db.length && (err_status= sp_use_new_db(thd, m_db, &old_db, 0, &dbchanged))) goto done; From 35a0f4723418eae8b30fb375bfd6a5de9ef85ecf Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 7 Apr 2007 00:13:27 +0400 Subject: [PATCH 149/153] Bug#27586: Wrong autoinc value assigned by LOAD DATA in the NO_AUTO_VALUE_ON_ZERO mode. The table->auto_increment_field_not_null variable wasn't reset after reading a row which may lead to inserting a wrong value to the auto-increment field to the following row. The table->auto_increment_field_not_null variable is reset now right after a row is being written in the read_fixed_length() and the read_sep_field() functions. Removed wrong setting of the table->auto_increment_field_not_null variable in the read_sep_field() function. mysql-test/t/loaddata.test: Added a test case for the bug#27586: Wrong autoinc value assigned by LOAD DATA in the NO_AUTO_VALUE_ON_ZERO mode. mysql-test/r/loaddata.result: Added a test case for the bug#27586: Wrong autoinc value assigned by LOAD DATA in the NO_AUTO_VALUE_ON_ZERO mode. sql/sql_load.cc: Bug#27586: Wrong autoinc value assigned by LOAD DATA in the NO_AUTO_VALUE_ON_ZERO mode. The table->auto_increment_field_not_null variable is reset now right after a row is being written in the read_fixed_length() and the read_sep_field() functions. Remove wrong setting of the table->auto_increment_field_not_null variable in the read_sep_field() function. --- mysql-test/r/loaddata.result | 9 +++++++++ mysql-test/t/loaddata.test | 16 ++++++++++++++++ sql/sql_load.cc | 15 ++++++++------- 3 files changed, 33 insertions(+), 7 deletions(-) diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result index bef483569d4..0478e48025f 100644 --- a/mysql-test/r/loaddata.result +++ b/mysql-test/r/loaddata.result @@ -156,3 +156,12 @@ select load_file("MYSQL_TEST_DIR/t/loaddata.test"); load_file("MYSQL_TEST_DIR/t/loaddata.test") NULL drop table t1, t2; +create table t1(f1 int); +insert into t1 values(1),(null); +create table t2(f2 int auto_increment primary key); +select * from t2; +f2 +1 +2 +SET @@SQL_MODE=@OLD_SQL_MODE; +drop table t1,t2; diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test index 125a65826ca..e6788cd7798 100644 --- a/mysql-test/t/loaddata.test +++ b/mysql-test/t/loaddata.test @@ -136,4 +136,20 @@ eval select load_file("$MYSQL_TEST_DIR/t/loaddata.test"); # cleanup drop table t1, t2; +# +# Bug#27586: Wrong autoinc value assigned by LOAD DATA in the +# NO_AUTO_VALUE_ON_ZERO mode +# +create table t1(f1 int); +insert into t1 values(1),(null); +create table t2(f2 int auto_increment primary key); +disable_query_log; +eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t1' from t1; +SET @OLD_SQL_MODE=@@SQL_MODE, @@SQL_MODE=NO_AUTO_VALUE_ON_ZERO; +eval load data infile '$MYSQLTEST_VARDIR/tmp/t1' into table t2; +enable_query_log; +select * from t2; +--exec rm $MYSQLTEST_VARDIR/tmp/t1 +SET @@SQL_MODE=@OLD_SQL_MODE; +drop table t1,t2; # End of 5.0 tests diff --git a/sql/sql_load.cc b/sql/sql_load.cc index 7a535381c01..e06235847ea 100644 --- a/sql/sql_load.cc +++ b/sql/sql_load.cc @@ -532,7 +532,7 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, Item_field *sql_field; TABLE *table= table_list->table; ulonglong id; - bool no_trans_update; + bool no_trans_update, err; DBUG_ENTER("read_fixed_length"); id= 0; @@ -624,7 +624,9 @@ read_fixed_length(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, DBUG_RETURN(-1); } - if (write_record(thd, table, &info)) + err= write_record(thd, table, &info); + table->auto_increment_field_not_null= FALSE; + if (err) DBUG_RETURN(1); thd->no_trans_update= no_trans_update; @@ -669,7 +671,7 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, TABLE *table= table_list->table; uint enclosed_length; ulonglong id; - bool no_trans_update; + bool no_trans_update, err; DBUG_ENTER("read_sep_field"); enclosed_length=enclosed.length(); @@ -716,8 +718,6 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, DBUG_RETURN(1); } field->set_null(); - if (field == table->next_number_field) - table->auto_increment_field_not_null= TRUE; if (!field->maybe_null()) { if (field->type() == FIELD_TYPE_TIMESTAMP) @@ -803,8 +803,9 @@ read_sep_field(THD *thd, COPY_INFO &info, TABLE_LIST *table_list, DBUG_RETURN(-1); } - - if (write_record(thd, table, &info)) + err= write_record(thd, table, &info); + table->auto_increment_field_not_null= FALSE; + if (err) DBUG_RETURN(1); /* If auto_increment values are used, save the first one for From 375bb35ea144d8268a93b6b7f052aa59c701ad8b Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 7 Apr 2007 00:28:09 +0200 Subject: [PATCH 150/153] disabled test and feature --- mysql-test/t/disabled.def | 2 ++ sql/ha_ndbcluster.cc | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index fd64becbc00..5011fcbb7d4 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -36,3 +36,5 @@ synchronization : Bug#24529 Test 'synchronization' fails on Mac pushb plugin : Bug#25659 memory leak via "plugins" test rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly + +rpl_ndb_stm_innodb : Bug#26783 diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 4f555c543a9..d12f94c6967 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -4166,6 +4166,8 @@ THR_LOCK_DATA **ha_ndbcluster::store_lock(THD *thd, extern MASTER_INFO *active_mi; static int ndbcluster_update_apply_status(THD *thd, int do_update) { + return 0; + Thd_ndb *thd_ndb= get_thd_ndb(thd); Ndb *ndb= thd_ndb->ndb; NDBDICT *dict= ndb->getDictionary(); From 795121926ef797fd9988ee65b97b16af0ace9af8 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 7 Apr 2007 11:31:49 +0500 Subject: [PATCH 151/153] test temporarily disabled --- mysql-test/t/disabled.def | 1 + 1 file changed, 1 insertion(+) diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index fd64becbc00..f536521f830 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -36,3 +36,4 @@ synchronization : Bug#24529 Test 'synchronization' fails on Mac pushb plugin : Bug#25659 memory leak via "plugins" test rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly +ndb_partition_error2 : HF's not sure if the test can work as internded on all the platforms From 3f0c44c605c6e6f9e3bbb92f7a43a598be5d5b1b Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 7 Apr 2007 23:16:03 +0500 Subject: [PATCH 152/153] after-merging fix mysql-test/r/events_trans.result: result fixed mysql-test/r/windows.result: merging fix mysql-test/t/events_trans.test: moved to events_trans_notembedded.test mysql-test/r/events_trans_notembedded.result: New BitKeeper file ``mysql-test/r/events_trans_notembedded.result'' mysql-test/t/events_trans_notembedded.test: New BitKeeper file ``mysql-test/t/events_trans_notembedded.test'' --- mysql-test/r/events_trans.result | 41 ------------- mysql-test/r/events_trans_notembedded.result | 45 +++++++++++++++ mysql-test/r/windows.result | 4 +- mysql-test/t/events_trans.test | 44 -------------- mysql-test/t/events_trans_notembedded.test | 61 ++++++++++++++++++++ 5 files changed, 108 insertions(+), 87 deletions(-) create mode 100644 mysql-test/r/events_trans_notembedded.result create mode 100644 mysql-test/t/events_trans_notembedded.test diff --git a/mysql-test/r/events_trans.result b/mysql-test/r/events_trans.result index 145fb8be084..a9829db0c61 100644 --- a/mysql-test/r/events_trans.result +++ b/mysql-test/r/events_trans.result @@ -1,5 +1,4 @@ drop database if exists events_test; -drop database if exists mysqltest_db2; drop database if exists mysqltest_no_such_database; create database events_test; use events_test; @@ -116,44 +115,4 @@ a OK: create event: database does not exist delete from t1; commit work; -grant create, insert, select, delete on mysqltest_db2.* -to mysqltest_user1@localhost; -create database mysqltest_db2; -set autocommit=off; -select @@autocommit; -@@autocommit -0 -create table t1 (a varchar(255)) engine=innodb; -begin work; -insert into t1 (a) values ("OK: create event: insufficient privileges"); -create event e1 on schedule every 1 day do select 1; -ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2' -rollback work; -select * from t1; -a -OK: create event: insufficient privileges -delete from t1; -commit work; -begin work; -insert into t1 (a) values ("OK: alter event: insufficient privileges"); -alter event e1 on schedule every 1 day do select 1; -ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2' -rollback work; -select * from t1; -a -OK: alter event: insufficient privileges -delete from t1; -commit work; -begin work; -insert into t1 (a) values ("OK: drop event: insufficient privileges"); -drop event e1; -ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2' -rollback work; -select * from t1; -a -OK: drop event: insufficient privileges -delete from t1; -commit work; -drop user mysqltest_user1@localhost; -drop database mysqltest_db2; drop database events_test; diff --git a/mysql-test/r/events_trans_notembedded.result b/mysql-test/r/events_trans_notembedded.result new file mode 100644 index 00000000000..1e3dfffe232 --- /dev/null +++ b/mysql-test/r/events_trans_notembedded.result @@ -0,0 +1,45 @@ +drop database if exists events_test; +drop database if exists mysqltest_db2; +create database events_test; +use events_test; +grant create, insert, select, delete on mysqltest_db2.* +to mysqltest_user1@localhost; +create database mysqltest_db2; +set autocommit=off; +select @@autocommit; +@@autocommit +0 +create table t1 (a varchar(255)) engine=innodb; +begin work; +insert into t1 (a) values ("OK: create event: insufficient privileges"); +create event e1 on schedule every 1 day do select 1; +ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2' +rollback work; +select * from t1; +a +OK: create event: insufficient privileges +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: alter event: insufficient privileges"); +alter event e1 on schedule every 1 day do select 1; +ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2' +rollback work; +select * from t1; +a +OK: alter event: insufficient privileges +delete from t1; +commit work; +begin work; +insert into t1 (a) values ("OK: drop event: insufficient privileges"); +drop event e1; +ERROR 42000: Access denied for user 'mysqltest_user1'@'localhost' to database 'mysqltest_db2' +rollback work; +select * from t1; +a +OK: drop event: insufficient privileges +delete from t1; +commit work; +drop user mysqltest_user1@localhost; +drop database mysqltest_db2; +drop database events_test; diff --git a/mysql-test/r/windows.result b/mysql-test/r/windows.result index 423123692e5..af1977bacbc 100644 --- a/mysql-test/r/windows.result +++ b/mysql-test/r/windows.result @@ -35,9 +35,9 @@ PARTITION BY RANGE (MONTH(SALES_DATE)) ( PARTITION p0 VALUES LESS THAN (2) ENGINE=INNODB data DIRECTORY='c:/tmp/' - index DIRECTORY = 'c:/tmp/', + index DIRECTORY = 'c:/tmp/', PARTITION p1 VALUES LESS THAN (3) ENGINE=INNODB data DIRECTORY='c:/tmp/' - index DIRECTORY = 'c:/tmp/' + index DIRECTORY = 'c:/tmp/' ); drop table t1; diff --git a/mysql-test/t/events_trans.test b/mysql-test/t/events_trans.test index 41044f9975f..77427070cbb 100644 --- a/mysql-test/t/events_trans.test +++ b/mysql-test/t/events_trans.test @@ -4,7 +4,6 @@ -- source include/have_innodb.inc --disable_warnings drop database if exists events_test; -drop database if exists mysqltest_db2; drop database if exists mysqltest_no_such_database; --enable_warnings create database events_test; @@ -108,49 +107,6 @@ rollback work; select * from t1; delete from t1; commit work; -# -# Privilege checks -# -grant create, insert, select, delete on mysqltest_db2.* - to mysqltest_user1@localhost; -create database mysqltest_db2; -connect (conn1,localhost,mysqltest_user1,,mysqltest_db2); -set autocommit=off; -# Sanity check -select @@autocommit; -create table t1 (a varchar(255)) engine=innodb; -# Not enough privileges to CREATE EVENT -begin work; -insert into t1 (a) values ("OK: create event: insufficient privileges"); ---error ER_DBACCESS_DENIED_ERROR -create event e1 on schedule every 1 day do select 1; -rollback work; -select * from t1; -delete from t1; -commit work; -# Not enough privileges to ALTER EVENT -begin work; -insert into t1 (a) values ("OK: alter event: insufficient privileges"); ---error ER_DBACCESS_DENIED_ERROR -alter event e1 on schedule every 1 day do select 1; -rollback work; -select * from t1; -delete from t1; -commit work; -# Not enough privileges to DROP EVENT -begin work; -insert into t1 (a) values ("OK: drop event: insufficient privileges"); ---error ER_DBACCESS_DENIED_ERROR -drop event e1; -rollback work; -select * from t1; -delete from t1; -commit work; -# Cleanup -disconnect conn1; -connection default; -drop user mysqltest_user1@localhost; -drop database mysqltest_db2; # # Cleanup diff --git a/mysql-test/t/events_trans_notembedded.test b/mysql-test/t/events_trans_notembedded.test new file mode 100644 index 00000000000..adc293d7e79 --- /dev/null +++ b/mysql-test/t/events_trans_notembedded.test @@ -0,0 +1,61 @@ +# +# Tests that require transactions +# +-- source include/not_embedded.inc +-- source include/have_innodb.inc +--disable_warnings +drop database if exists events_test; +drop database if exists mysqltest_db2; +--enable_warnings +create database events_test; +use events_test; + +# +# Privilege checks +# +grant create, insert, select, delete on mysqltest_db2.* + to mysqltest_user1@localhost; +create database mysqltest_db2; +connect (conn1,localhost,mysqltest_user1,,mysqltest_db2); +set autocommit=off; +# Sanity check +select @@autocommit; +create table t1 (a varchar(255)) engine=innodb; +# Not enough privileges to CREATE EVENT +begin work; +insert into t1 (a) values ("OK: create event: insufficient privileges"); +--error ER_DBACCESS_DENIED_ERROR +create event e1 on schedule every 1 day do select 1; +rollback work; +select * from t1; +delete from t1; +commit work; +# Not enough privileges to ALTER EVENT +begin work; +insert into t1 (a) values ("OK: alter event: insufficient privileges"); +--error ER_DBACCESS_DENIED_ERROR +alter event e1 on schedule every 1 day do select 1; +rollback work; +select * from t1; +delete from t1; +commit work; +# Not enough privileges to DROP EVENT +begin work; +insert into t1 (a) values ("OK: drop event: insufficient privileges"); +--error ER_DBACCESS_DENIED_ERROR +drop event e1; +rollback work; +select * from t1; +delete from t1; +commit work; +# Cleanup +disconnect conn1; +connection default; +drop user mysqltest_user1@localhost; +drop database mysqltest_db2; + +# +# Cleanup +# +drop database events_test; + From a1576f9209993517cfbbc64e3a7d4ba4edb4dbb5 Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 8 Apr 2007 00:05:34 +0500 Subject: [PATCH 153/153] merging fix mysql-test/r/windows.result: result fixed --- mysql-test/r/windows.result | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/r/windows.result b/mysql-test/r/windows.result index af1977bacbc..9f3828bff61 100644 --- a/mysql-test/r/windows.result +++ b/mysql-test/r/windows.result @@ -40,4 +40,4 @@ PARTITION p1 VALUES LESS THAN (3) ENGINE=INNODB data DIRECTORY='c:/tmp/' index DIRECTORY = 'c:/tmp/' ); -drop table t1; +DROP TABLE t1;