From f1a1e89f5a16f7b48cbd2b47e9de5d881448fcb4 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov <kgeorge@mysql.com> Date: Fri, 17 Oct 2008 13:55:16 +0300 Subject: [PATCH 01/21] Bug #38637: COUNT DISTINCT prevents NULL testing in HAVING clause IS NULL was not checking the correct row in a HAVING context. At the first row of a new group (where the HAVING clause is evaluated) the column and SELECT list references in the HAVING clause should refer to the last row of the previous group and not to the current one. This was not done for IS NULL, because it was using Item::is_null() doesn't have a Item_is_null_result() counterpart to access the data from the last row of the previous group. Note that all the Item::val_xxx() functions (e.g. Item::val_int()) have their _result counterparts (e.g. Item::val_int_result()). Fixed by implementing a is_null_result() (similarly to int_result()) and calling this instead of is_null() column and SELECT list references inside the HAVING clause. --- mysql-test/r/having.result | 7 +++++++ mysql-test/t/having.test | 11 +++++++++++ sql/item.cc | 19 ++++++++++++++++++- sql/item.h | 3 +++ sql/item_func.cc | 9 +++++++++ sql/item_func.h | 1 + 6 files changed, 49 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result index f113304c767..bc8596100f8 100644 --- a/mysql-test/r/having.result +++ b/mysql-test/r/having.result @@ -424,3 +424,10 @@ select f1 from t1 group by f1 having max(f1)=f1; f1 set session sql_mode=''; drop table t1; +CREATE TABLE t1 ( a INT, b INT); +INSERT INTO t1 VALUES (1, 1), (2,2), (3, NULL); +SELECT b, COUNT(DISTINCT a) FROM t1 GROUP BY b HAVING b is NULL; +b COUNT(DISTINCT a) +NULL 1 +DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/t/having.test b/mysql-test/t/having.test index 827b83f11a0..adabbb711d4 100644 --- a/mysql-test/t/having.test +++ b/mysql-test/t/having.test @@ -432,3 +432,14 @@ select f1 from t1 having max(f1)=f1; select f1 from t1 group by f1 having max(f1)=f1; set session sql_mode=''; drop table t1; + + +# +# Bug #38637: COUNT DISTINCT prevents NULL testing in HAVING clause +# +CREATE TABLE t1 ( a INT, b INT); +INSERT INTO t1 VALUES (1, 1), (2,2), (3, NULL); +SELECT b, COUNT(DISTINCT a) FROM t1 GROUP BY b HAVING b is NULL; +DROP TABLE t1; + +--echo End of 5.0 tests diff --git a/sql/item.cc b/sql/item.cc index 182f4abdfe6..e71268724b4 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -2041,6 +2041,12 @@ bool Item_field::val_bool_result() } +bool Item_field::is_null_result() +{ + return (null_value=result_field->is_null()); +} + + bool Item_field::eq(const Item *item, bool binary_cmp) const { Item *real_item= ((Item *) item)->real_item(); @@ -5626,6 +5632,15 @@ double Item_ref::val_result() } +bool Item_ref::is_null_result() +{ + if (result_field) + return (null_value=result_field->is_null()); + + return is_null(); +} + + longlong Item_ref::val_int_result() { if (result_field) @@ -5731,7 +5746,9 @@ String *Item_ref::val_str(String* tmp) bool Item_ref::is_null() { DBUG_ASSERT(fixed); - return (*ref)->is_null(); + bool tmp=(*ref)->is_null_result(); + null_value=(*ref)->null_value; + return tmp; } diff --git a/sql/item.h b/sql/item.h index 250bb3f67ef..1058cc5dbb8 100644 --- a/sql/item.h +++ b/sql/item.h @@ -652,6 +652,7 @@ public: virtual my_decimal *val_decimal_result(my_decimal *val) { return val_decimal(val); } virtual bool val_bool_result() { return val_bool(); } + virtual bool is_null_result() { return is_null(); } /* bit map of tables used by item */ virtual table_map used_tables() const { return (table_map) 0L; } @@ -1301,6 +1302,7 @@ public: String *str_result(String* tmp); my_decimal *val_decimal_result(my_decimal *); bool val_bool_result(); + bool is_null_result(); bool send(Protocol *protocol, String *str_arg); void reset_field(Field *f); bool fix_fields(THD *, Item **); @@ -1942,6 +1944,7 @@ public: String *str_result(String* tmp); my_decimal *val_decimal_result(my_decimal *); bool val_bool_result(); + bool is_null_result(); bool send(Protocol *prot, String *tmp); void make_field(Send_field *field); bool fix_fields(THD *, Item **); diff --git a/sql/item_func.cc b/sql/item_func.cc index e663e1fcf83..382fea6dfe2 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -4283,6 +4283,15 @@ my_decimal *Item_func_set_user_var::val_decimal_result(my_decimal *val) } +bool Item_func_set_user_var::is_null_result() +{ + DBUG_ASSERT(fixed == 1); + check(TRUE); + update(); // Store expression + return is_null(); +} + + void Item_func_set_user_var::print(String *str) { str->append(STRING_WITH_LEN("(@")); diff --git a/sql/item_func.h b/sql/item_func.h index 6dcf32cba07..8c7becb681b 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -1299,6 +1299,7 @@ public: longlong val_int_result(); String *str_result(String *str); my_decimal *val_decimal_result(my_decimal *); + bool is_null_result(); bool update_hash(void *ptr, uint length, enum Item_result type, CHARSET_INFO *cs, Derivation dv, bool unsigned_arg); bool send(Protocol *protocol, String *str_arg); From 0e44a4e94c0ddf2572384ed5daf3e5dc2c37a4e7 Mon Sep 17 00:00:00 2001 From: Chad MILLER <chad@mysql.com> Date: Wed, 26 Nov 2008 10:51:59 -0500 Subject: [PATCH 02/21] Bug#32136: mysqld_multi --defaults-file not respected while using \ --mysqld=mysqld_safe The server run didn't know the correct section to read in a configuration file, and would read from "[mysqld]" even though mysqld_multi had already read the defaults and made them into explicit parameters. Worse, the "defaults-file" parameter says that it means "Read only this configuration file, do not read the standard system-wide and user-specific files", which should apply not only to mysql-multi, but to the server also. So, now if "defaults-file" is given, put "no-defaults" before all the explicit parameters we read from the defaults-file and feed to the mysqld or mysqld_safe. --- scripts/mysqld_multi.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh index 3cb4665eb1c..631e1e38cc7 100644 --- a/scripts/mysqld_multi.sh +++ b/scripts/mysqld_multi.sh @@ -293,7 +293,12 @@ sub start_mysqlds() @groups = &find_groups($groupids); for ($i = 0; defined($groups[$i]); $i++) { + # Defaults are made explicit parameters to server execution... @options = defaults_for_group($groups[$i]); + # ...so server MUST NOT try to read again from some config file, especially + # as the "right" file may be unknown to the server if we are using + # --defaults-file=... params in here. + unshift(@options,"--no-defaults"); $mysqld_found= 1; # The default $mysqld_found= 0 if (!length($mysqld)); From 83823a14771d7e607fe86ce3bc4d61f6cb1ea544 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov <joro@sun.com> Date: Tue, 13 Jan 2009 13:09:12 +0200 Subject: [PATCH 03/21] Bug #38795: Automatic search depth and nested join's results in server crash The greedy optimizer tracks the current level of nested joins and the position inside these by setting and maintaining a state that's global for the whole FROM clause. This state was correctly maintained inside the selection of the next partial plan table (in best_extension_by_limited_search()). greedy_search() also moves the current position by adding the last partial match table when there's not enough tables in the partial plan found by best_extension_by_limited_search(). This may require update of the global state variables that describe the current position in the plan if the last table placed by greedy_search is not a top-level join table. Fixed by updating the state after placing the partial plan table in greedy_search() in the same way this is done on entering the best_extension_by_limited_search(). Fixed the signature of the function called to update the state : check_interleaving_with_nj --- mysql-test/r/greedy_optimizer.result | 77 ++++++++++++++++++++++++++++ mysql-test/t/greedy_optimizer.test | 73 ++++++++++++++++++++++++++ sql/sql_select.cc | 27 ++++++---- 3 files changed, 168 insertions(+), 9 deletions(-) diff --git a/mysql-test/r/greedy_optimizer.result b/mysql-test/r/greedy_optimizer.result index 1da49fbedb0..534038ee626 100644 --- a/mysql-test/r/greedy_optimizer.result +++ b/mysql-test/r/greedy_optimizer.result @@ -655,3 +655,80 @@ show status like 'Last_query_cost'; Variable_name Value Last_query_cost 794.837037 drop table t1,t2,t3,t4,t5,t6,t7; +CREATE TABLE t1 (a int, b int, d int, i int); +INSERT INTO t1 VALUES (1,1,1,1); +CREATE TABLE t2 (b int, c int, j int); +INSERT INTO t2 VALUES (1,1,1); +CREATE TABLE t2_1 (j int); +INSERT INTO t2_1 VALUES (1); +CREATE TABLE t3 (c int, f int); +INSERT INTO t3 VALUES (1,1); +CREATE TABLE t3_1 (f int); +INSERT INTO t3_1 VALUES (1); +CREATE TABLE t4 (d int, e int, k int); +INSERT INTO t4 VALUES (1,1,1); +CREATE TABLE t4_1 (k int); +INSERT INTO t4_1 VALUES (1); +CREATE TABLE t5 (g int, d int, h int, l int); +INSERT INTO t5 VALUES (1,1,1,1); +CREATE TABLE t5_1 (l int); +INSERT INTO t5_1 VALUES (1); +SET optimizer_search_depth = 3; +SELECT 1 +FROM t1 +LEFT JOIN ( +t2 JOIN t3 ON t3.c = t2.c +) ON t2.b = t1.b +LEFT JOIN ( +t4 JOIN t5 ON t5.d = t4.d +) ON t4.d = t1.d +; +1 +1 +SELECT 1 +FROM t1 +LEFT JOIN ( +t2 LEFT JOIN (t3 JOIN t3_1 ON t3.f = t3_1.f) ON t3.c = t2.c +) ON t2.b = t1.b +LEFT JOIN ( +t4 JOIN t5 ON t5.d = t4.d +) ON t4.d = t1.d +; +1 +1 +SELECT 1 +FROM t1 +LEFT JOIN ( +(t2 JOIN t2_1 ON t2.j = t2_1.j) JOIN t3 ON t3.c = t2.c +) ON t2.b = t1.b +LEFT JOIN ( +t4 JOIN t5 ON t5.d = t4.d +) ON t4.d = t1.d +; +1 +1 +SELECT 1 +FROM t1 +LEFT JOIN ( +t2 JOIN t3 ON t3.c = t2.c +) ON t2.b = t1.b +LEFT JOIN ( +(t4 JOIN t4_1 ON t4.k = t4_1.k) LEFT JOIN t5 ON t5.d = t4.d +) ON t4.d = t1.d +; +1 +1 +SELECT 1 +FROM t1 +LEFT JOIN ( +t2 JOIN t3 ON t3.c = t2.c +) ON t2.b = t1.b +LEFT JOIN ( +t4 LEFT JOIN (t5 JOIN t5_1 ON t5.l = t5_1.l) ON t5.d = t4.d +) ON t4.d = t1.d +; +1 +1 +SET optimizer_search_depth = DEFAULT; +DROP TABLE t1,t2,t2_1,t3,t3_1,t4,t4_1,t5,t5_1; +End of 5.0 tests diff --git a/mysql-test/t/greedy_optimizer.test b/mysql-test/t/greedy_optimizer.test index b73f70c6a3e..5131c97f122 100644 --- a/mysql-test/t/greedy_optimizer.test +++ b/mysql-test/t/greedy_optimizer.test @@ -311,3 +311,76 @@ explain select t1.c11 from t7, t6, t5, t4, t3, t2, t1 where t1.c11 = t2.c21 and show status like 'Last_query_cost'; drop table t1,t2,t3,t4,t5,t6,t7; + + +# +# Bug # 38795: Automatic search depth and nested join's results in server +# crash +# + +CREATE TABLE t1 (a int, b int, d int, i int); INSERT INTO t1 VALUES (1,1,1,1); +CREATE TABLE t2 (b int, c int, j int); INSERT INTO t2 VALUES (1,1,1); +CREATE TABLE t2_1 (j int); INSERT INTO t2_1 VALUES (1); +CREATE TABLE t3 (c int, f int); INSERT INTO t3 VALUES (1,1); +CREATE TABLE t3_1 (f int); INSERT INTO t3_1 VALUES (1); +CREATE TABLE t4 (d int, e int, k int); INSERT INTO t4 VALUES (1,1,1); +CREATE TABLE t4_1 (k int); INSERT INTO t4_1 VALUES (1); +CREATE TABLE t5 (g int, d int, h int, l int); INSERT INTO t5 VALUES (1,1,1,1); +CREATE TABLE t5_1 (l int); INSERT INTO t5_1 VALUES (1); + +SET optimizer_search_depth = 3; + +SELECT 1 +FROM t1 +LEFT JOIN ( + t2 JOIN t3 ON t3.c = t2.c +) ON t2.b = t1.b +LEFT JOIN ( + t4 JOIN t5 ON t5.d = t4.d +) ON t4.d = t1.d +; + +SELECT 1 +FROM t1 +LEFT JOIN ( + t2 LEFT JOIN (t3 JOIN t3_1 ON t3.f = t3_1.f) ON t3.c = t2.c +) ON t2.b = t1.b +LEFT JOIN ( + t4 JOIN t5 ON t5.d = t4.d +) ON t4.d = t1.d +; + +SELECT 1 +FROM t1 +LEFT JOIN ( + (t2 JOIN t2_1 ON t2.j = t2_1.j) JOIN t3 ON t3.c = t2.c +) ON t2.b = t1.b +LEFT JOIN ( + t4 JOIN t5 ON t5.d = t4.d +) ON t4.d = t1.d +; + +SELECT 1 +FROM t1 +LEFT JOIN ( + t2 JOIN t3 ON t3.c = t2.c +) ON t2.b = t1.b +LEFT JOIN ( + (t4 JOIN t4_1 ON t4.k = t4_1.k) LEFT JOIN t5 ON t5.d = t4.d +) ON t4.d = t1.d +; + +SELECT 1 +FROM t1 +LEFT JOIN ( + t2 JOIN t3 ON t3.c = t2.c +) ON t2.b = t1.b +LEFT JOIN ( + t4 LEFT JOIN (t5 JOIN t5_1 ON t5.l = t5_1.l) ON t5.d = t4.d +) ON t4.d = t1.d +; + +SET optimizer_search_depth = DEFAULT; +DROP TABLE t1,t2,t2_1,t3,t3_1,t4,t4_1,t5,t5_1; + +--echo End of 5.0 tests diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 9723dd8c4e4..c49b0f0b723 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -100,7 +100,7 @@ static COND* substitute_for_best_equal_field(COND *cond, void *table_join_idx); static COND *simplify_joins(JOIN *join, List<TABLE_LIST> *join_list, COND *conds, bool top); -static bool check_interleaving_with_nj(JOIN_TAB *last, JOIN_TAB *next); +static bool check_interleaving_with_nj(JOIN_TAB *next); static void restore_prev_nj_state(JOIN_TAB *last); static void reset_nj_counters(List<TABLE_LIST> *join_list); static uint build_bitmap_for_nested_joins(List<TABLE_LIST> *join_list, @@ -4705,6 +4705,18 @@ greedy_search(JOIN *join, */ join->positions[idx]= best_pos; + /* + Update the interleaving state after extending the current partial plan + with a new table. + We are doing this here because best_extension_by_limited_search reverts + the interleaving state to the one of the non-extended partial plan + on exit. + */ + IF_DBUG(bool is_interleave_error= ) + check_interleaving_with_nj (best_table); + /* This has been already checked by best_extension_by_limited_search */ + DBUG_ASSERT(!is_interleave_error); + /* find the position of 'best_table' in 'join->best_ref' */ best_idx= idx; JOIN_TAB *pos= join->best_ref[best_idx]; @@ -4722,7 +4734,7 @@ greedy_search(JOIN *join, --size_remain; ++idx; - DBUG_EXECUTE("opt", print_plan(join, join->tables, + DBUG_EXECUTE("opt", print_plan(join, idx, record_count, read_time, read_time, "extended");); } while (TRUE); @@ -4873,7 +4885,7 @@ best_extension_by_limited_search(JOIN *join, table_map real_table_bit= s->table->map; if ((remaining_tables & real_table_bit) && !(remaining_tables & s->dependent) && - (!idx || !check_interleaving_with_nj(join->positions[idx-1].table, s))) + (!idx || !check_interleaving_with_nj(s))) { double current_record_count, current_read_time; @@ -5018,7 +5030,7 @@ find_best(JOIN *join,table_map rest_tables,uint idx,double record_count, { table_map real_table_bit=s->table->map; if ((rest_tables & real_table_bit) && !(rest_tables & s->dependent) && - (!idx|| !check_interleaving_with_nj(join->positions[idx-1].table, s))) + (!idx|| !check_interleaving_with_nj(s))) { double records, best; best_access_path(join, s, thd, rest_tables, idx, record_count, @@ -8380,9 +8392,6 @@ static void reset_nj_counters(List<TABLE_LIST> *join_list) SYNOPSIS check_interleaving_with_nj() - join Join being processed - last_tab Last table in current partial join order (this function is - not called for empty partial join orders) next_tab Table we're going to extend the current partial join with DESCRIPTION @@ -8467,10 +8476,10 @@ static void reset_nj_counters(List<TABLE_LIST> *join_list) TRUE Requested join order extension not allowed. */ -static bool check_interleaving_with_nj(JOIN_TAB *last_tab, JOIN_TAB *next_tab) +static bool check_interleaving_with_nj(JOIN_TAB *next_tab) { TABLE_LIST *next_emb= next_tab->table->pos_in_table_list->embedding; - JOIN *join= last_tab->join; + JOIN *join= next_tab->join; if (join->cur_embedding_map & ~next_tab->embedding_map) { From 918a0381655a5b34f3ac8a976bb53137bd1ff209 Mon Sep 17 00:00:00 2001 From: Davi Arnaut <Davi.Arnaut@Sun.COM> Date: Tue, 13 Jan 2009 20:07:06 -0200 Subject: [PATCH 04/21] Bug#36326: nested transaction and select The problem is that the query cache stores packets containing the server status of the time when the cached statement was run. This might lead to a wrong transaction status in the client side if a statement is cached during a transaction and is later served outside a transaction context (and vice-versa). The solution is to take into account the transaction status when storing in and serving from the query cache. --- mysql-test/r/innodb_cache.result | 10 +++--- mysql-test/r/query_cache.result | 51 +++++++++++++++++++++++++++ mysql-test/t/query_cache.test | 27 ++++++++++++++ sql/mysql_priv.h | 2 ++ sql/sql_cache.cc | 17 ++++++--- tests/mysql_client_test.c | 60 ++++++++++++++++++++++++++++++++ 6 files changed, 158 insertions(+), 9 deletions(-) diff --git a/mysql-test/r/innodb_cache.result b/mysql-test/r/innodb_cache.result index 5e8611655a2..36fa3c5c352 100644 --- a/mysql-test/r/innodb_cache.result +++ b/mysql-test/r/innodb_cache.result @@ -66,10 +66,10 @@ a 2 show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 3 +Qcache_queries_in_cache 6 show status like "Qcache_hits"; Variable_name Value -Qcache_hits 3 +Qcache_hits 0 insert into t1 values (3); insert into t2 values (3); insert into t1 values (4); @@ -90,14 +90,14 @@ a 2 show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 1 +Qcache_queries_in_cache 2 show status like "Qcache_hits"; Variable_name Value -Qcache_hits 4 +Qcache_hits 1 commit; show status like "Qcache_queries_in_cache"; Variable_name Value -Qcache_queries_in_cache 1 +Qcache_queries_in_cache 2 drop table t3,t2,t1; CREATE TABLE t1 (id int(11) NOT NULL auto_increment, PRIMARY KEY (id)) ENGINE=InnoDB; select count(*) from t1; diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index fa80a44c177..a2b73db77a9 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -1681,3 +1681,54 @@ Qcache_hits 1 DROP TABLE t1; SET GLOBAL concurrent_insert= @save_concurrent_insert; SET GLOBAL query_cache_size= default; +DROP TABLE IF EXISTS t1; +FLUSH STATUS; +SET GLOBAL query_cache_size=1048576; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3),(4),(5); +SHOW STATUS LIKE 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 0 +SELECT * FROM t1; +a +1 +2 +3 +4 +5 +BEGIN; +SELECT * FROM t1; +a +1 +2 +3 +4 +5 +COMMIT; +SHOW STATUS LIKE 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 2 +SHOW STATUS LIKE "Qcache_hits"; +Variable_name Value +Qcache_hits 0 +SELECT * FROM t1; +a +1 +2 +3 +4 +5 +BEGIN; +SELECT * FROM t1; +a +1 +2 +3 +4 +5 +COMMIT; +SHOW STATUS LIKE "Qcache_hits"; +Variable_name Value +Qcache_hits 2 +DROP TABLE t1; +SET GLOBAL query_cache_size= default; diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index ebd24bf2b89..2dd70f415a1 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -1276,4 +1276,31 @@ DROP TABLE t1; SET GLOBAL concurrent_insert= @save_concurrent_insert; SET GLOBAL query_cache_size= default; +# +# Bug#36326: nested transaction and select +# + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +FLUSH STATUS; +SET GLOBAL query_cache_size=1048576; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3),(4),(5); +SHOW STATUS LIKE 'Qcache_queries_in_cache'; +SELECT * FROM t1; +BEGIN; +SELECT * FROM t1; +COMMIT; +SHOW STATUS LIKE 'Qcache_queries_in_cache'; +SHOW STATUS LIKE "Qcache_hits"; +SELECT * FROM t1; +BEGIN; +SELECT * FROM t1; +COMMIT; +SHOW STATUS LIKE "Qcache_hits"; +DROP TABLE t1; +SET GLOBAL query_cache_size= default; + # End of 5.0 tests diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h index 8a8513ac745..b855af9a8d3 100644 --- a/sql/mysql_priv.h +++ b/sql/mysql_priv.h @@ -651,6 +651,8 @@ struct Query_cache_query_flags unsigned int client_long_flag:1; unsigned int client_protocol_41:1; unsigned int more_results_exists:1; + unsigned int in_trans:1; + unsigned int autocommit:1; unsigned int pkt_nr; uint character_set_client_num; uint character_set_results_num; diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index b487f092f75..4a521d83192 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -859,6 +859,8 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) CLIENT_PROTOCOL_41); flags.more_results_exists= test(thd->server_status & SERVER_MORE_RESULTS_EXISTS); + flags.in_trans= test(thd->server_status & SERVER_STATUS_IN_TRANS); + flags.autocommit= test(thd->server_status & SERVER_STATUS_AUTOCOMMIT); flags.pkt_nr= net->pkt_nr; flags.character_set_client_num= thd->variables.character_set_client->number; @@ -879,7 +881,7 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used) DBUG_PRINT("qcache", ("long %d, 4.1: %d, more results %d, pkt_nr: %d, \ CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \ sql mode: 0x%lx, sort len: %lu, conncat len: %lu, div_precision: %lu, \ -def_week_frmt: %lu", +def_week_frmt: %lu, in_trans: %d, autocommit: %d", (int)flags.client_long_flag, (int)flags.client_protocol_41, (int)flags.more_results_exists, @@ -893,7 +895,10 @@ def_week_frmt: %lu", flags.max_sort_length, flags.group_concat_max_len, flags.div_precision_increment, - flags.default_week_format)); + flags.default_week_format, + (int)flags.in_trans, + (int)flags.autocommit)); + /* Make InnoDB to release the adaptive hash index latch before acquiring the query cache mutex. @@ -1144,6 +1149,8 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) CLIENT_PROTOCOL_41); flags.more_results_exists= test(thd->server_status & SERVER_MORE_RESULTS_EXISTS); + flags.in_trans= test(thd->server_status & SERVER_STATUS_IN_TRANS); + flags.autocommit= test(thd->server_status & SERVER_STATUS_AUTOCOMMIT); flags.pkt_nr= thd->net.pkt_nr; flags.character_set_client_num= thd->variables.character_set_client->number; flags.character_set_results_num= @@ -1162,7 +1169,7 @@ Query_cache::send_result_to_client(THD *thd, char *sql, uint query_length) DBUG_PRINT("qcache", ("long %d, 4.1: %d, more results %d, pkt_nr: %d, \ CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \ sql mode: 0x%lx, sort len: %lu, conncat len: %lu, div_precision: %lu, \ -def_week_frmt: %lu", +def_week_frmt: %lu, in_trans: %d, autocommit: %d", (int)flags.client_long_flag, (int)flags.client_protocol_41, (int)flags.more_results_exists, @@ -1176,7 +1183,9 @@ def_week_frmt: %lu", flags.max_sort_length, flags.group_concat_max_len, flags.div_precision_increment, - flags.default_week_format)); + flags.default_week_format, + (int)flags.in_trans, + (int)flags.autocommit)); memcpy((void *)(sql + (tot_length - QUERY_CACHE_FLAGS_SIZE)), &flags, QUERY_CACHE_FLAGS_SIZE); query_block = (Query_cache_block *) hash_search(&queries, (byte*) sql, diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c index 50f03a1a086..0fddffebf82 100644 --- a/tests/mysql_client_test.c +++ b/tests/mysql_client_test.c @@ -16354,6 +16354,63 @@ static void test_bug40365(void) DBUG_VOID_RETURN; } + + +/** + Bug#36326: nested transaction and select +*/ + +#ifdef HAVE_QUERY_CACHE + +static void test_bug36326() +{ + int rc; + + DBUG_ENTER("test_bug36326"); + myheader("test_bug36326"); + + rc= mysql_autocommit(mysql, TRUE); + myquery(rc); + rc= mysql_query(mysql, "DROP TABLE IF EXISTS t1"); + myquery(rc); + rc= mysql_query(mysql, "CREATE TABLE t1 (a INTEGER)"); + myquery(rc); + rc= mysql_query(mysql, "INSERT INTO t1 VALUES (1)"); + myquery(rc); + rc= mysql_query(mysql, "SET GLOBAL query_cache_type = 1"); + myquery(rc); + rc= mysql_query(mysql, "SET GLOBAL query_cache_size = 1048576"); + myquery(rc); + DIE_UNLESS(!(mysql->server_status & SERVER_STATUS_IN_TRANS)); + DIE_UNLESS(mysql->server_status & SERVER_STATUS_AUTOCOMMIT); + rc= mysql_query(mysql, "BEGIN"); + myquery(rc); + DIE_UNLESS(mysql->server_status & SERVER_STATUS_IN_TRANS); + rc= mysql_query(mysql, "SELECT * FROM t1"); + myquery(rc); + rc= my_process_result(mysql); + DIE_UNLESS(rc == 1); + rc= mysql_rollback(mysql); + myquery(rc); + rc= mysql_query(mysql, "ROLLBACK"); + myquery(rc); + DIE_UNLESS(!(mysql->server_status & SERVER_STATUS_IN_TRANS)); + rc= mysql_query(mysql, "SELECT * FROM t1"); + myquery(rc); + DIE_UNLESS(!(mysql->server_status & SERVER_STATUS_IN_TRANS)); + rc= my_process_result(mysql); + DIE_UNLESS(rc == 1); + rc= mysql_query(mysql, "DROP TABLE t1"); + myquery(rc); + rc= mysql_query(mysql, "SET GLOBAL query_cache_size = 0"); + myquery(rc); + + DBUG_VOID_RETURN; +} + +#endif + + /* Read and parse arguments and MySQL options from my.cnf */ @@ -16652,6 +16709,9 @@ static struct my_tests_st my_tests[]= { { "test_bug40365", test_bug40365 }, #ifdef HAVE_SPATIAL { "test_bug37956", test_bug37956 }, +#endif +#ifdef HAVE_QUERY_CACHE + { "test_bug36326", test_bug36326 }, #endif { 0, 0 } }; From 6ab0034f5a5c8d6cb0e0a91e8053cf0642a10e49 Mon Sep 17 00:00:00 2001 From: Chad MILLER <chad@mysql.com> Date: Wed, 14 Jan 2009 11:10:36 -0500 Subject: [PATCH 05/21] Fix comment. Boolean function returns true/false, not zero/one. --- sql/unireg.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/unireg.cc b/sql/unireg.cc index b581ad4655a..0aac7873d11 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -63,8 +63,8 @@ static bool make_empty_rec(THD *thd, int file, enum db_type table_type, db_file Handler to use. May be zero, in which case we use create_info->db_type RETURN - 0 ok - 1 error + false ok + true error */ bool mysql_create_frm(THD *thd, my_string file_name, From 8c9e81e8afd64a2f80fc4c622169145432b3a895 Mon Sep 17 00:00:00 2001 From: Chad MILLER <chad@mysql.com> Date: Wed, 14 Jan 2009 11:11:31 -0500 Subject: [PATCH 06/21] Bug#38145: .frm file isn't sync'd with sync_frm enabled Views weren't sync()d the same way other structures were. In creating the FRM for views, obey the same rules for variable "sync_frm" as for everything else. --- sql/parse_file.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sql/parse_file.cc b/sql/parse_file.cc index 2b947fcac4f..c9bbdfd417e 100644 --- a/sql/parse_file.cc +++ b/sql/parse_file.cc @@ -263,6 +263,11 @@ sql_create_definition_file(const LEX_STRING *dir, const LEX_STRING *file_name, if (end_io_cache(&file)) goto err_w_file; + if (opt_sync_frm) { + if (my_sync(handler, MYF(MY_WME))) + goto err_w_file; + } + if (my_close(handler, MYF(MY_WME))) { DBUG_RETURN(TRUE); From 333aa975ec53edc69b7ee8265c6cfbde06e15750 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin <alik@sun.com> Date: Thu, 15 Jan 2009 12:36:34 +0300 Subject: [PATCH 07/21] Backport patch for Bug#31222 (com_% global status counters behave randomly with mysql_change_user) to 5.0. --- mysql-test/r/not_embedded_server.result | 7 +++++++ mysql-test/t/not_embedded_server.test | 28 +++++++++++++++++++++++++ sql/sql_class.cc | 4 ++++ 3 files changed, 39 insertions(+) diff --git a/mysql-test/r/not_embedded_server.result b/mysql-test/r/not_embedded_server.result index e471b5a3afa..edb698ade83 100644 --- a/mysql-test/r/not_embedded_server.result +++ b/mysql-test/r/not_embedded_server.result @@ -3,3 +3,10 @@ execute stmt1; Id User Host db Command Time State Info number root localhost test Query time NULL show full processlist deallocate prepare stmt1; +FLUSH STATUS; +SHOW GLOBAL STATUS LIKE 'com_select'; +Variable_name Value +Com_select 101 +SHOW GLOBAL STATUS LIKE 'com_select'; +Variable_name Value +Com_select 101 diff --git a/mysql-test/t/not_embedded_server.test b/mysql-test/t/not_embedded_server.test index 83ec03d6706..044d8665a18 100644 --- a/mysql-test/t/not_embedded_server.test +++ b/mysql-test/t/not_embedded_server.test @@ -16,3 +16,31 @@ execute stmt1; deallocate prepare stmt1; # End of 4.1 tests + +# +# Bug#31222: com_% global status counters behave randomly with +# mysql_change_user. +# + +FLUSH STATUS; + +--disable_result_log +--disable_query_log + +let $i = 100; + +while ($i) +{ + dec $i; + + SELECT 1; +} + +--enable_query_log +--enable_result_log + +SHOW GLOBAL STATUS LIKE 'com_select'; + +--change_user + +SHOW GLOBAL STATUS LIKE 'com_select'; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 883291ec460..91c0aa66761 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -391,6 +391,10 @@ void THD::init_for_queries() void THD::change_user(void) { + pthread_mutex_lock(&LOCK_status); + add_to_status(&global_status_var, &status_var); + pthread_mutex_unlock(&LOCK_status); + cleanup(); cleanup_done= 0; init(); From 6a834d1f4f8d41ef664c38f41408911080afebef Mon Sep 17 00:00:00 2001 From: Davi Arnaut <Davi.Arnaut@Sun.COM> Date: Thu, 22 Jan 2009 08:28:01 -0200 Subject: [PATCH 08/21] Bug#40264: Aborted cached query causes query to hang indefinitely on next cache hit The problem is that the query cache was storing partial results if the statement failed when sending the results to the client. This could cause clients to hang when trying to read the results from the cache as they would, for example, wait indefinitely for a eof packet that wasn't saved. The solution is to always discard the caching of a query that failed to send its results to the associated client. --- mysql-test/r/query_cache_notembedded.result | 16 +++++++++++ mysql-test/t/query_cache_notembedded.test | 31 +++++++++++++++++++++ sql/sql_cache.cc | 7 ++++- 3 files changed, 53 insertions(+), 1 deletion(-) diff --git a/mysql-test/r/query_cache_notembedded.result b/mysql-test/r/query_cache_notembedded.result index 8e5df012cfb..bf582bfaec6 100644 --- a/mysql-test/r/query_cache_notembedded.result +++ b/mysql-test/r/query_cache_notembedded.result @@ -345,3 +345,19 @@ id drop table t1; drop function f1; set GLOBAL query_cache_size=0; +DROP TABLE IF EXISTS t1; +FLUSH STATUS; +SET GLOBAL query_cache_size=1048576; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3),(4),(5); +SHOW STATUS LIKE 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 0 +LOCK TABLES t1 WRITE; +SELECT * FROM t1; +UNLOCK TABLES; +SHOW STATUS LIKE 'Qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 0 +DROP TABLE t1; +SET GLOBAL query_cache_size= default; diff --git a/mysql-test/t/query_cache_notembedded.test b/mysql-test/t/query_cache_notembedded.test index a4f4144d9c6..c427e0d1afc 100644 --- a/mysql-test/t/query_cache_notembedded.test +++ b/mysql-test/t/query_cache_notembedded.test @@ -222,3 +222,34 @@ disconnect con2; connection default; set GLOBAL query_cache_size=0; + +# +# Bug#40264: Aborted cached query causes query to hang indefinitely on next cache hit +# + +--disable_warnings +DROP TABLE IF EXISTS t1; +--enable_warnings + +FLUSH STATUS; +SET GLOBAL query_cache_size=1048576; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1),(2),(3),(4),(5); +SHOW STATUS LIKE 'Qcache_queries_in_cache'; +LOCK TABLES t1 WRITE; +connect(con1,localhost,root,,); +--send SELECT * FROM t1 +connection default; +let $show_type= open tables where `table`='t1' and in_use=2; +let $show_pattern= '%t1%2%'; +--source include/wait_show_pattern.inc +dirty_close con1; +UNLOCK TABLES; +let $show_type= open tables where `table`='t1' and in_use=0; +let $show_pattern= '%t1%0%'; +--source include/wait_show_pattern.inc +SHOW STATUS LIKE 'Qcache_queries_in_cache'; +DROP TABLE t1; +SET GLOBAL query_cache_size= default; + +# End of 5.0 tests diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc index 4a521d83192..b55fa148e24 100644 --- a/sql/sql_cache.cc +++ b/sql/sql_cache.cc @@ -710,7 +710,12 @@ void query_cache_end_of_result(THD *thd) if (thd->net.query_cache_query == 0) DBUG_VOID_RETURN; - if (thd->killed) + /* + Check if the NET layer raised a unreported error -- my_error() and + as a consequence query_cache_abort() haven't been called. Abort the + cached result as it might be only partially complete. + */ + if (thd->killed || thd->net.report_error) { query_cache_abort(&thd->net); DBUG_VOID_RETURN; From 7234ca1a44a00e98052c0835bfd7e8ba4953f1b0 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov <joro@sun.com> Date: Wed, 28 Jan 2009 16:18:50 +0200 Subject: [PATCH 09/21] Bug #42366: server-cert.pem expired: "Not After : Jan 27 08:54:13 2009 GMT" Re-generated the PKI files needed. Removed the ones that are not needed. Updated the tests to reference the correct SSL subject. --- mysql-test/r/openssl_1.result | 4 +- mysql-test/std_data/cacert.pem | 24 +-- mysql-test/std_data/client-cert.pem | 75 +++++---- mysql-test/std_data/client-key.pem | 14 +- mysql-test/std_data/server-cert-des.pem | 16 -- mysql-test/std_data/server-cert.pem | 73 +++++---- mysql-test/std_data/server-key-des.pem | 18 --- mysql-test/std_data/server-key.pem | 14 +- mysql-test/std_data/server8k-cert.pem | 185 ++++++++++++++++------ mysql-test/std_data/server8k-key.pem | 194 ++++++++++++------------ mysql-test/t/openssl_1.test | 4 +- 11 files changed, 350 insertions(+), 271 deletions(-) delete mode 100644 mysql-test/std_data/server-cert-des.pem delete mode 100644 mysql-test/std_data/server-key-des.pem diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result index 9c6c29eea47..3e87b5b76b3 100644 --- a/mysql-test/r/openssl_1.result +++ b/mysql-test/r/openssl_1.result @@ -3,8 +3,8 @@ create table t1(f1 int); insert into t1 values (5); grant select on test.* to ssl_user1@localhost require SSL; grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA"; -grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer@mysql.com"; -grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer@mysql.com" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB"; +grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer@mysql.com"; +grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer@mysql.com" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB"; grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx"; flush privileges; connect(localhost,ssl_user5,,test,MASTER_PORT,MASTER_SOCKET); diff --git a/mysql-test/std_data/cacert.pem b/mysql-test/std_data/cacert.pem index b445e77d7c4..5473e4b153e 100644 --- a/mysql-test/std_data/cacert.pem +++ b/mysql-test/std_data/cacert.pem @@ -1,17 +1,17 @@ -----BEGIN CERTIFICATE----- -MIICrTCCAhagAwIBAgIJAIAO/Ybiptv1MA0GCSqGSIb3DQEBBAUAMEQxCzAJBgNV +MIICrTCCAhagAwIBAgIJAJXpePU0UOTVMA0GCSqGSIb3DQEBBQUAMEQxCzAJBgNV BAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxhMREwDwYD -VQQKEwhNeVNRTCBBQjAeFw0wNjA1MDMwODQ4NTRaFw0wOTAxMjcwODQ4NTRaMEQx +VQQKEwhNeVNRTCBBQjAeFw0wOTAxMjgxMDQ5NDZaFw0xNDAxMjcxMDQ5NDZaMEQx CzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxh MREwDwYDVQQKEwhNeVNRTCBBQjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA -+C46EQl1u7tQ6gb9eqc8V079gr8YmDPCEqtjO8bCIbchpjOpDITx0WZz36Sn9E72 -GPJwNip4FxLaPRIA3xNQHM5cE5U53qznlRx1Fc4O3hcWCvyCqNDl/vzPAh3pI6Bl -Ku9hfHXpp93W812smVPe9haShEXGgbEPYGzvOfVdu/MCAwEAAaOBpjCBozAdBgNV -HQ4EFgQUjIy/6OCTmqtPHBFha6/qzVk3yTcwdAYDVR0jBG0wa4AUjIy/6OCTmqtP -HBFha6/qzVk3yTehSKRGMEQxCzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxh -MRAwDgYDVQQHEwdVcHBzYWxhMREwDwYDVQQKEwhNeVNRTCBBQoIJAIAO/Ybiptv1 -MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEA8lD9zyB820Oq1aj7ZafX -De/hbdt9RIl2tzgw2K3r1KZGdXJVL0vSt5fZ51Nq9lg7OPJy3iXf+caBJEp0IJpB -uf4Gfr6zfXw+UlY6ZthRtHQHoXKcbskECjH5/ps/Uaa+dpVQ9O+Ii1rPzmgo6ztM -s+xZ46ESBt4WiHXm8kwbU9Y= +4XQHAe5R1+TXC8noZtWf+d5E0v1C59FWpn9SWEUCBjE5UiIwuJvi4Y+7xWGOXLAI +/JzJx5gNXLBiTsE/zh0uX9fKlajLhxB0GN+QU0ZlpQ1BeYipEcNXeI/7cT499f6v +XWabnTflivdCgHSWUOQ20/Lzs6kP6/e6OoZd/DPSjPECAwEAAaOBpjCBozAdBgNV +HQ4EFgQU8uLqVWWkmuKsnZf1RWz294wRrd8wdAYDVR0jBG0wa4AU8uLqVWWkmuKs +nZf1RWz294wRrd+hSKRGMEQxCzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxh +MRAwDgYDVQQHEwdVcHBzYWxhMREwDwYDVQQKEwhNeVNRTCBBQoIJAJXpePU0UOTV +MAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEFBQADgYEAMMTE5sDN+Z0ZlV7KvH3g +6+aKvql8dTpRT3hYukeQlWua0nq74WPGVw0c4e/M/vbiMwmJcCYpB9pd4+dHqzSw +aPyoenjY6UF8n7B4quWy3SIUk2LSHeJLW+kzJn2afN9gvipFhdVh/uU2TIyLGOur +Z/vmJX2W7hF1uqPnbfa8Lrw= -----END CERTIFICATE----- diff --git a/mysql-test/std_data/client-cert.pem b/mysql-test/std_data/client-cert.pem index fdd5c86a23f..9300520793e 100644 --- a/mysql-test/std_data/client-cert.pem +++ b/mysql-test/std_data/client-cert.pem @@ -1,42 +1,55 @@ Certificate: Data: - Version: 1 (0x0) - Serial Number: 1 (0x1) - Signature Algorithm: md5WithRSAEncryption + Version: 3 (0x2) + Serial Number: 3 (0x3) + Signature Algorithm: sha1WithRSAEncryption Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB Validity - Not Before: May 3 08:55:39 2006 GMT - Not After : Jan 27 08:55:39 2009 GMT - Subject: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB/emailAddress=abstract.mysql.developer@mysql.com + Not Before: Jan 28 11:04:39 2009 GMT + Not After : Jan 28 11:04:39 2010 GMT + Subject: C=SE, ST=Uppsala, O=MySQL AB/emailAddress=abstract.mysql.developer@mysql.com Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (512 bit) Modulus (512 bit): - 00:d8:db:68:28:49:84:4d:d6:0f:5c:bc:3d:9a:ab: - 70:d5:3e:f5:b5:17:ba:ef:e1:f8:87:54:30:22:1f: - 81:07:bf:f9:24:7f:8a:54:10:e9:5f:e6:99:50:04: - d4:3b:55:a9:f1:52:ad:12:2b:5a:da:5c:be:8c:3e: - 5b:9e:b0:5a:19 + 00:e1:52:30:2c:d9:be:64:28:91:5d:7a:fd:d9:e9: + 14:35:7a:d2:94:4e:91:46:e0:db:9f:6b:79:f4:4c: + ac:6e:07:61:34:86:74:62:a7:a8:44:af:fa:87:87: + a8:7d:42:61:ff:ab:50:d4:7b:bf:75:fa:d5:d5:b3: + 74:fb:56:1e:37 Exponent: 65537 (0x10001) - Signature Algorithm: md5WithRSAEncryption - 07:57:bf:07:92:c2:8e:86:24:6b:0a:bf:e5:31:21:44:c3:60: - 02:a6:ac:9e:f7:db:7a:6e:fc:4f:d4:7b:54:18:80:47:d2:4a: - 63:0e:e3:f8:af:6e:58:e3:97:5a:2b:82:5d:76:20:d1:33:a0: - f5:43:a1:d1:51:f4:ca:c8:b3:1a:66:4e:0e:55:df:d2:e8:fa: - 83:18:42:f5:ec:66:40:f0:39:e8:f9:d7:cf:f6:dd:e4:7b:69: - dd:0c:92:d8:52:95:43:6f:29:3d:f0:8d:4c:dd:52:ea:6b:a0: - 39:0f:dc:59:a7:5c:37:6b:8b:05:44:b7:69:ea:a3:58:e0:4e: - ce:d6 + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + 58:30:B5:9B:2C:05:94:06:BA:3D:3C:F0:B2:CD:1D:67:65:E3:7F:85 + X509v3 Authority Key Identifier: + keyid:F2:E2:EA:55:65:A4:9A:E2:AC:9D:97:F5:45:6C:F6:F7:8C:11:AD:DF + DirName:/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB + serial:95:E9:78:F5:34:50:E4:D5 + + Signature Algorithm: sha1WithRSAEncryption + 05:19:e3:13:14:fc:c5:28:bf:69:f8:00:b3:25:cb:bd:ca:9f: + 2f:4c:b3:a8:04:11:f0:74:27:bd:82:2c:b4:49:9b:a7:59:f0: + f7:87:d1:e0:ba:99:a2:fe:4b:1d:10:6f:e4:a2:b3:cd:7f:8b: + 68:31:46:ee:cd:9e:e2:47:e1:4c:fa:74:d1:e2:8b:cc:a0:4b: + a8:24:d1:a4:c3:6b:2a:c6:28:cd:41:e0:06:48:e6:cf:f2:3c: + ca:37:95:d7:29:64:6b:91:91:83:e7:ac:c8:0b:87:bc:da:a6: + aa:f1:44:43:c8:74:7b:15:26:91:2e:03:c4:71:50:6c:f8:68: + dc:8c -----BEGIN CERTIFICATE----- -MIIB5jCCAU8CAQEwDQYJKoZIhvcNAQEEBQAwRDELMAkGA1UEBhMCU0UxEDAOBgNV -BAgTB1VwcHNhbGExEDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFC -MB4XDTA2MDUwMzA4NTUzOVoXDTA5MDEyNzA4NTUzOVowdzELMAkGA1UEBhMCU0Ux -EDAOBgNVBAgTB1VwcHNhbGExEDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoTCE15 -U1FMIEFCMTEwLwYJKoZIhvcNAQkBFiJhYnN0cmFjdC5teXNxbC5kZXZlbG9wZXJA -bXlzcWwuY29tMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBANjbaChJhE3WD1y8PZqr -cNU+9bUXuu/h+IdUMCIfgQe/+SR/ilQQ6V/mmVAE1DtVqfFSrRIrWtpc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SaRLgPEcVBs+GjcjA== -----END CERTIFICATE----- diff --git a/mysql-test/std_data/client-key.pem b/mysql-test/std_data/client-key.pem index 22f8e23ab2a..9ef464d0875 100644 --- a/mysql-test/std_data/client-key.pem +++ b/mysql-test/std_data/client-key.pem @@ -1,9 +1,9 @@ -----BEGIN RSA PRIVATE KEY----- -MIIBOgIBAAJBANjbaChJhE3WD1y8PZqrcNU+9bUXuu/h+IdUMCIfgQe/+SR/ilQQ -6V/mmVAE1DtVqfFSrRIrWtpcvow+W56wWhkCAwEAAQJAK27WT6tZylUjQomZNQ89 -TBiOEbUtBbqWklQ0R8FTkH9uKV+8KYQ+k+tMkoAEGFfChB0YfofNQ2KZYWWw4yOB -WQIhAPXXDQt73aou10s+cmKM3C3WzLmIZtrvm9wNBXWDGxgTAiEA4dG4cXrZfa1M -TTbjzNU1/Jf50/M8SvZDWMPQWxJ8oqMCIH6zBpYUkHlVCsBMvsbrsc4uFfTIx7mu -I7WVQGr/1sbhAiBf4uFirjtztgZUMx5/d3k5DH80lG/hlLf8FQl/4lWx6QIhAPHw -CXfPUbUFl4r/i9Br5+exGol50qX4F3aP5Sh5EnZT +MIIBOQIBAAJBAOFSMCzZvmQokV16/dnpFDV60pROkUbg259refRMrG4HYTSGdGKn +qESv+oeHqH1CYf+rUNR7v3X61dWzdPtWHjcCAwEAAQJAXYooM8ZlcuEgj+VKU1ee +qyEFIMqJJxqcMk+E/nWCM96WxCP3zHNSrqNfSpI3ld7QzMwhdRz+gFLxT2gGNpIw +MQIhAPxzM/lDihe67X3ADYtDl9ZjA8Pm430x9sXlcxI17tCZAiEA5H1SyFl4mUee +9VnfSC2XGW7lwz72ZygfVX+b7tLWF08CIEh40gzW5MfXM+KLxdea+fXjyursV5ZT +R6KcMiKiNQLRAiAcmHqlzFzFgisotai2Fc6VRkXHG7gmzOSvBJt1VjmpDQIge6jf +2N7whTdvC4ferB+zUlgWQdyvx1c3T4gnt6PYdaY= -----END RSA PRIVATE KEY----- diff --git a/mysql-test/std_data/server-cert-des.pem b/mysql-test/std_data/server-cert-des.pem deleted file mode 100644 index 3b93d865d5b..00000000000 --- a/mysql-test/std_data/server-cert-des.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICljCCAX4CAQEwDQYJKoZIhvcNAQEEBQAwUTELMAkGA1UEBhMCU0UxEDAOBgNV -BAgTB1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFCMRAwDgYDVQQLEwdTdXBwb3J0 -MQswCQYDVQQDEwJDQTAeFw0wNjA4MjgxMTA4NTlaFw0wOTA1MjQxMTA4NTlaMFUx -CzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMREwDwYDVQQKEwhNeVNRTCBB -QjEQMA4GA1UECxMHU3VwcG9ydDEPMA0GA1UEAxMGc2VydmVyMIGfMA0GCSqGSIb3 -DQEBAQUAA4GNADCBiQKBgQDEiOVZcWYzZe7I8xhhUwCzvmkZifAXeMTH+8XKGLHX -NWF3FLduAmeAad9oOZgBKb+oWTdRDWXqwu6nYYUBfrUpaY27/wLkgWRgewL3LZnw -W2FjhNsjx3gI2NK+Pix47q9d+a+5T4AW5+lK499l0K0k2cvyFdIerhDW8R0t8Uru -twIDAQABMA0GCSqGSIb3DQEBBAUAA4IBAQC2LQcqLg52RbelWrKutlJ5E6rzugnJ -ZAlbN9sM98O2xFiIGDA3tb5j9LAEjE0E+RqdptEYnvy9b3szhLYXtIILZTkClf9r -Uwu1nUYPTyp+9ZYCa4fovOU5h1Ogv+9UZPds/LPDwWEn8K+lvscB4X57wJyuoEck -1Mu41OA6h77181MydSdgZo0oquJDWhdCsYHXVFVs0F6naMm2uPMCTDiQVlhHJuTO -VQMNIwxRFtvsv2tpsXsaP/8sT32d5CFebfxxSVnqQvJ4ZdIrphl6L43XU01rsEcE -K8KYujZQ6SKws+HVcGqsr7TPgJfJE6D+5RazvvIQISPvx4eduebqzqdC ------END CERTIFICATE----- diff --git a/mysql-test/std_data/server-cert.pem b/mysql-test/std_data/server-cert.pem index f420b4f3124..cab54db8b23 100644 --- a/mysql-test/std_data/server-cert.pem +++ b/mysql-test/std_data/server-cert.pem @@ -1,42 +1,55 @@ Certificate: Data: - Version: 1 (0x0) + Version: 3 (0x2) Serial Number: 1 (0x1) - Signature Algorithm: md5WithRSAEncryption + Signature Algorithm: sha1WithRSAEncryption Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB Validity - Not Before: May 3 08:54:13 2006 GMT - Not After : Jan 27 08:54:13 2009 GMT - Subject: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB, CN=localhost/emailAddress=abstract.mysql.developer@mysql.com + Not Before: Jan 28 10:55:13 2009 GMT + Not After : Jan 28 10:55:13 2010 GMT + Subject: C=SE, ST=Uppsala, O=MySQL AB, CN=localhost/emailAddress=abstract.mysql.developer@mysql.com Subject Public Key Info: Public Key Algorithm: rsaEncryption RSA Public Key: (512 bit) Modulus (512 bit): - 00:d9:fd:da:b3:fb:7c:e0:b0:03:be:97:c6:a4:36: - ac:71:af:bb:2d:e5:84:ed:f3:8f:2b:eb:11:e5:aa: - 66:ed:bf:62:6b:e3:ce:fa:80:ed:90:ff:b9:4a:39: - 20:40:b6:f2:99:bf:2f:33:b5:f2:ec:3a:90:60:1d: - 9e:94:7e:a4:1b + 00:b6:8f:e5:b7:b4:86:83:13:8a:f9:bf:63:cb:64: + 2d:b9:51:d1:de:ab:7b:45:1f:aa:b5:66:73:13:f9: + a6:07:d5:ba:7c:fa:92:bd:37:e2:ad:87:db:3e:b6: + 6a:12:64:f8:ee:17:e3:15:06:2f:a8:82:68:bf:57: + 8d:c3:04:98:27 Exponent: 65537 (0x10001) - Signature Algorithm: md5WithRSAEncryption - de:5e:35:cd:7b:11:e6:7c:c5:7c:d6:27:4e:72:12:49:42:eb: - 6f:2c:96:f3:f4:00:78:a7:4f:9f:2d:7b:d7:30:39:af:49:4d: - df:b1:55:0d:30:be:23:6f:06:67:fd:dd:ba:98:66:36:c6:32: - b7:ed:63:fc:aa:49:cd:4f:72:98:3b:13:0e:f6:28:d7:d4:eb: - 04:6b:dc:e8:c7:04:80:92:e4:04:86:0b:ed:32:25:76:1d:a9: - 5c:a9:2c:18:2c:bd:bc:15:ed:e1:76:96:4d:bb:0d:41:44:06: - 2c:ad:45:bb:db:61:ad:17:11:cb:49:70:67:eb:c6:27:d3:91: - c8:f2 + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + D9:9A:B8:5F:22:EA:04:10:C8:25:7D:82:57:E6:2E:FD:19:29:E7:DA + X509v3 Authority Key Identifier: + keyid:F2:E2:EA:55:65:A4:9A:E2:AC:9D:97:F5:45:6C:F6:F7:8C:11:AD:DF + DirName:/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB + serial:95:E9:78:F5:34:50:E4:D5 + + Signature Algorithm: sha1WithRSAEncryption + 54:07:2d:21:0b:a5:af:3b:58:23:32:5e:56:7f:ab:58:63:48: + 91:aa:38:90:89:16:f9:cc:bf:a4:0e:78:2b:9f:c5:1b:58:a6: + e6:08:8f:2e:ae:97:03:21:9b:f1:cd:c0:26:8f:1d:d7:28:27: + a0:8e:81:09:1b:1c:0f:c9:a5:41:3a:2d:44:3f:9c:fa:87:ff: + c8:4c:2b:44:f7:1b:c1:3e:4f:01:7f:e9:26:cc:9f:1c:06:b5: + 0b:27:d1:10:90:be:93:0c:9c:e7:b0:d1:ea:27:99:4e:06:14: + 0c:7a:e9:c1:52:c5:33:68:bc:61:0d:db:81:3b:57:48:57:bf: + 42:9a -----BEGIN CERTIFICATE----- -MIIB+zCCAWQCAQEwDQYJKoZIhvcNAQEEBQAwRDELMAkGA1UEBhMCU0UxEDAOBgNV -BAgTB1VwcHNhbGExEDAOBgNVBAcTB1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFC -MB4XDTA2MDUwMzA4NTQxM1oXDTA5MDEyNzA4NTQxM1owgYsxCzAJBgNVBAYTAlNF -MRAwDgYDVQQIEwdVcHBzY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h +SKRGMEQxCzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdV +cHBzYWxhMREwDwYDVQQKEwhNeVNRTCBBQoIJAJXpePU0UOTVMA0GCSqGSIb3DQEB +BQUAA4GBAFQHLSELpa87WCMyXlZ/q1hjSJGqOJCJFvnMv6QOeCufxRtYpuYIjy6u +lwMhm/HNwCaPHdcoJ6COgQkbHA/JpUE6LUQ/nPqH/8hMK0T3G8E+TwF/6SbMnxwG +tQsn0RCQvpMMnOew0eonmU4GFAx66cFSxTNovGEN24E7V0hXv0Ka -----END CERTIFICATE----- diff --git a/mysql-test/std_data/server-key-des.pem b/mysql-test/std_data/server-key-des.pem deleted file mode 100644 index b35d4ab223b..00000000000 --- a/mysql-test/std_data/server-key-des.pem +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -Proc-Type: 4,ENCRYPTED -DEK-Info: DES-EDE3-CBC,D2BE7598C7E3BDA5 - -1W3qPgw5ut80OhaAGVZZe/tfFiBAlwpX1SohdApWj+QYP+dK/mdEBhgI3BXTFNLW -pJqDTzGlKtft7hHN6QDFEdZMKxej5+2iLu14V62o+5yQgUoqswoXcmmqJCJ7AvyJ -yMBmGAzxRFlQsT8lf6o5TS1/efBvjvWhh3NG2Zq2LpyhWRRqA3kNhzktzt2WjDZe -ZkKmZJJnArr/Aw7jEBC4sH+nmgxoR18GzDddRG12hv1AWyHc3+VisTBpyNzeBy17 -rxuQtqLzkAJmId723ddw83RVNSvBUUS3G0rx5O3HPobvZK89UqVxcXtIgc11WTVU -N3DbcJq5it43Loo0W3gAngtESDm2E3rTadrmdUSDGv2wQ5dNFl6cQ1f397Sdd/WC -A0grn1tKjJ6COp80Ymdyvn+stjv/+Rl1/KHSeG0lNeZxqjPPOJ7NHaKv7qjYsJ6W -LT35/Xc3oCo5qk9FOlq/0tGjHxf6RcFr5U7k5ILKZs+RmvJ4Sv/VYShLfLTcfGbJ -wBNfRKvcHZBQJQBb1+s/kRrjFFtvhrUwLz4+c9kskp+t4qRVYywUAnGGGsMs/GPm -wYsLQZO6Bs5/taaVUyaJQW015J7FGGv+/7/A1dIhu73S/Xl/YcFbX/CMEVq2Lxxd -hZdFIuaZ7LE+0MDQWsvYMYPDPLDH11diczb/jeKBdLPOzk/FUqVx3Fin1PpcaBxY -b+7oZJhYdg/rAWDeQ/nji9qnEG8waK6x1hdkYPOrqqWQPfgM/LPsSrgWeuTSdx2B -Ixi01UlBb5UP4K7UrjyddPobmcVjXaQLNe7zaq0+OS3UnIG85GtHrQ== ------END RSA PRIVATE KEY----- diff --git a/mysql-test/std_data/server-key.pem b/mysql-test/std_data/server-key.pem index a4842624c0c..0d8274b77f6 100644 --- a/mysql-test/std_data/server-key.pem +++ b/mysql-test/std_data/server-key.pem @@ -1,9 +1,9 @@ -----BEGIN RSA PRIVATE KEY----- -MIIBOgIBAAJBANn92rP7fOCwA76XxqQ2rHGvuy3lhO3zjyvrEeWqZu2/YmvjzvqA -7ZD/uUo5IEC28pm/LzO18uw6kGAdnpR+pBsCAwEAAQJBAMieYdpmRoUaODf9wqh6 -ULXH/sG8i1vaXRcUHcJ50oRVfVK8/tGGvUuTDu6MeINTdahNDlYfjwOjKWVXys1w -h6ECIQDs6s7DfczK2bKCLt0zqg24mZL3rOpGmDU+TatwN1yVgwIhAOuMzdVTX39p -328+5WxJvBOFfxmSmqdDhIFpnRMvgguJAiByvKjT/km+970+1OllyvaIL0AA2OpA -tBgdC0p6tyUMdwIgKuHAWzTJbu28UolVxQgLaFZmVCZ/ZzIAfnrWsLZ2a1kCIBq/ -ywJ2cpyFlgazu8AH6KCQa0ok9s70ElaB6FEC85Al +MIIBOQIBAAJBALaP5be0hoMTivm/Y8tkLblR0d6re0UfqrVmcxP5pgfVunz6kr03 +4q2H2z62ahJk+O4X4xUGL6iCaL9XjcMEmCcCAwEAAQJASA5VwgNb0CKHiPm0ntOk +hG+54SRX3DmafEy6gRjZIl/bZ/asSLhXUZ+CeohyrQh7BZgYWvykd8pRISL9eKsU +GQIhAOXkUrOtP/EtjyqNluEqZdG+RZi/7p61JS3Ce13Myu+LAiEAy0uMlV34AJpM +b40FPKqlHxw8DD/Dt1iKhNVAg8+LDVUCIFjv7fbJDbW2VG63/Cj8CAwOukoP5rbL +iaicVrHBKrllAiB9+MiaXeopZXNrxDS0jQFYr8Q9yt1aJVFgUkxx4Q9HKQIgZPs0 +KlF3NNNWw78INaAEkyf0IEssnLMsuoCWw0DIOak= -----END RSA PRIVATE KEY----- diff --git a/mysql-test/std_data/server8k-cert.pem b/mysql-test/std_data/server8k-cert.pem index a0750f9e69e..3b86effd699 100644 --- a/mysql-test/std_data/server8k-cert.pem +++ b/mysql-test/std_data/server8k-cert.pem @@ -1,51 +1,138 @@ +Certificate: + Data: + Version: 3 (0x2) + Serial Number: 4 (0x4) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB + Validity + Not Before: Jan 28 11:12:27 2009 GMT + Not After : Jan 28 11:12:27 2010 GMT + Subject: C=SE, ST=Uppsala, O=MySQL AB, CN=server + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + RSA Public Key: (8192 bit) + Modulus (8192 bit): + 00:c0:8f:22:03:24:59:67:46:14:d6:8f:60:09:58: + 06:07:45:f1:78:71:55:f1:ea:b9:30:8a:cd:c3:3c: + b9:bf:65:6e:18:ed:a0:b8:c9:19:56:6f:c4:90:19: + c8:65:09:db:ff:bf:82:a1:08:ad:01:4f:5a:a3:d4: + 3d:78:7e:4b:4a:01:a4:7d:e8:7b:05:3e:7d:d8:b9: + 55:58:60:d6:1c:ce:e8:32:62:2c:19:60:f3:ed:05: + 99:6d:c9:77:07:2e:11:6d:0b:9a:c7:68:38:46:e8: + fa:31:80:df:e8:79:f0:f1:fd:a9:94:c3:fa:0d:f5: + 78:ac:49:7e:d5:17:fd:e1:ee:44:f3:c7:0e:30:32: + 5d:a9:19:25:e4:bb:21:1d:fe:3c:84:48:40:f5:58: + f4:bf:13:8c:85:68:bb:ec:f5:dd:c6:38:d1:b0:77: + 1f:a6:8e:4f:8d:e2:6f:49:74:f5:3f:90:65:8e:99: + 1e:59:9c:1c:b5:26:24:c4:b1:de:1e:fb:96:65:c4: + 31:14:1a:53:b8:5e:62:8a:c7:04:f7:b4:36:a4:af: + 07:c8:27:06:ed:dd:e6:f4:8c:62:f1:65:40:d0:9f: + 9f:a9:14:c8:8e:8b:74:d6:67:5a:d0:c9:4d:35:a1: + d5:7b:39:3a:42:9f:e4:d0:f4:c6:0f:2e:42:30:4b: + 56:b2:3d:6d:8e:2d:58:c5:69:99:35:49:95:95:99: + b6:87:29:2b:32:d1:50:08:cd:25:14:48:6d:10:99: + 85:61:3c:41:26:21:55:cc:1f:cf:ad:b0:2f:b9:89: + d8:4e:a0:18:ff:75:1d:b6:97:7c:c5:fa:8b:dc:93: + 17:86:0a:64:d4:09:35:d5:83:34:6d:5c:6d:c6:8c: + cd:b9:ec:c2:93:c6:c1:b7:cc:04:6f:22:e0:07:bf: + e0:d9:9b:2f:d5:a0:50:cc:f9:f0:95:83:8f:f4:30: + 83:72:94:d7:b5:4b:da:cc:9f:54:3b:8d:78:77:0b: + 24:6c:0f:c2:96:61:96:2f:b8:5f:b5:7a:ab:7a:5b: + 97:7a:a9:ad:40:8b:f2:d6:c6:8d:81:d9:94:61:8f: + 9d:03:c5:b9:10:03:68:83:bf:04:81:cc:ac:bd:34: + 89:e8:d4:8d:43:20:e2:b6:a4:11:3d:15:2a:82:0c: + d6:3a:6a:8c:62:d4:93:bc:c3:80:bf:1b:b4:2b:0a: + 7a:34:f0:cd:1e:82:3f:25:0f:d1:04:a8:0a:05:19: + b0:d6:16:83:39:af:0b:45:7d:cb:14:7e:4d:aa:aa: + c2:39:a8:46:38:ab:bd:ab:2a:bd:34:43:7f:da:25: + de:2b:fb:69:3b:fe:3b:87:fd:98:94:76:4a:bf:04: + a3:31:e3:3a:ff:6f:04:fa:fa:24:e4:2a:89:e9:0e: + bf:44:4c:72:85:82:3c:89:4a:03:63:01:41:92:53: + d0:82:60:6e:d8:ff:8c:a2:b4:1a:3b:20:6d:ae:74: + 92:30:4e:48:e3:51:a6:cb:73:97:06:13:03:32:23: + 9b:7d:a2:c7:3a:a9:af:97:8c:51:ed:fe:fa:b4:b4: + 1a:a3:87:fc:cf:8c:8e:e6:80:15:03:fd:fe:7d:bd: + b1:76:f1:5f:b3:09:2b:4c:4d:a7:7c:b5:72:b1:d6: + db:38:c0:67:a4:54:bc:87:09:a5:39:ba:1a:7e:3f: + 74:60:ad:3d:4b:be:94:53:f3:64:16:c7:33:35:ec: + 41:00:95:b6:de:99:62:a2:7a:28:9a:45:4d:fa:cd: + a6:77:f6:de:58:72:50:c8:7d:69:38:db:07:04:84: + d8:4d:39:f7:50:13:43:ae:2d:af:45:a4:2a:39:56: + 3c:b8:b7:d8:26:a4:36:c9:23:aa:aa:b8:49:0b:21: + ba:9e:7a:2b:7f:4d:29:9f:0e:00:1e:b4:5e:a6:fa: + 49:fe:8d:e5:74:57:d8:ba:d9:92:2c:d2:ac:84:1d: + f2:a6:a4:44:1c:bf:88:41:32:7e:d1:c3:2f:6e:bc: + 0f:5d:19:a6:8f:74:2b:67:ba:dd:a9:db:68:b5:ce: + 9d:25:48:df:54:08:d0:1d:4f:2e:5b:24:bc:05:0f: + fb:58:46:fa:02:ca:53:93:29:cf:10:27:c2:a0:18: + d0:f5:d4:b9:3c:5e:df:8e:6c:f5:7c:b9:b4:54:cc: + 39:16:5d:3c:da:96:b3:c3:6c:d4:70:5d:d3:30:a7: + a6:bd:6f:dd:41:bc:a8:de:42:60:59:9a:85:25:0d: + 2a:45:c3:05:b4:6e:7a:4a:4d:ca:8c:0a:e5:6c:34: + bc:20:9b:6d:4a:ca:ca:b6:a6:3a:a0:db:c3:0e:20: + 1a:12:1b:77:dd:cb:1d:7f:c3:0d:0d:e7:c1:fd:96: + d2:c7:68:80:99:a0:d9:8a:33:21:a3:8b:a2:5a:a7: + 7e:27:06:02:7f:ed:60:11:37:34:54:17:7f:4d:90: + 14:1e:69:37:0d:ba:f0:2b:f0:a3:2d:62:79:c8:76: + a8:ea:c8:e7:3b:1f:c6:4f:c2:0c:d7:ac:f0:77:53: + 5d:f0:50:b4:df:9b:03:ca:4d:41:e1:18:b2:25:30: + 86:1d:63:e5:67:b1:53:cd:6b:4e:83:1a:b9:5e:2d: + 05:15:6b:d4:8e:b1:97:fc:31:03:57:cb:bf:27:7f: + cd:5f:27:7e:66:e7:3c:17:09:b6:11:2a:4f:33:cd: + eb:1a:d3:6f:d5:15:8b:8b:ce:68:6b:7e:9a:95:e5: + 74:7f:17:57:d9 + Exponent: 65537 (0x10001) + X509v3 extensions: + X509v3 Basic Constraints: + CA:FALSE + X509v3 Subject Key Identifier: + 58:12:24:59:A7:3C:29:15:89:5A:C2:12:DB:E7:A5:42:10:21:B7:BA + X509v3 Authority Key Identifier: + keyid:F2:E2:EA:55:65:A4:9A:E2:AC:9D:97:F5:45:6C:F6:F7:8C:11:AD:DF + DirName:/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB + serial:95:E9:78:F5:34:50:E4:D5 + + Signature Algorithm: sha1WithRSAEncryption + cd:cb:5c:83:35:ea:cb:cb:c3:a8:c3:95:e2:e6:6f:4d:d8:e4: + ee:41:dd:3f:35:82:ac:2f:fd:63:89:4f:3a:19:d7:81:75:b3: + a3:fc:36:b2:12:d5:c6:56:bc:13:60:37:33:6e:a0:d8:ae:7c: + 88:f9:4b:ee:7b:1f:c8:f0:56:19:07:4d:bb:45:52:1c:78:81: + 07:7c:13:86:b8:86:70:85:e4:71:25:58:78:d1:be:de:22:82: + 6d:1a:4b:06:ac:f0:e8:50:87:c7:69:64:c2:61:43:cd:96:06: + a6:7e:09:a9:02:01:2a:a2:40:f3:cd:10:80:48:d0:34:55:40: + b9:ce -----BEGIN CERTIFICATE----- -MIIJHDCCBQQCAQEwDQYJKoZIhvcNAQEEBQAwTjELMAkGA1UEBhMCU0UxEDAO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JK0xNp3y1crHW2zjAZ6RUvIcJpTm6Gn4/ +dGCtPUu+lFPzZBbHMzXsQQCVtt6ZYqJ6KJpFTfrNpnf23lhyUMh9aTjbBwSE2E05 +91ATQ64tr0WkKjlWPLi32CakNskjqqq4SQshup56K39NKZ8OAB60Xqb6Sf6N5XRX +2LrZkizSrIQd8qakRBy/iEEyftHDL268D10Zpo90K2e63anbaLXOnSVI31QI0B1P +LlskvAUP+1hG+gLKU5MpzxAnwqAY0PXUuTxe345s9Xy5tFTMORZdPNqWs8Ns1HBd +0zCnpr1v3UG8qN5CYFmahSUNKkXDBbRuekpNyowK5Ww0vCCbbUrKyramOqDbww4g +GhIbd93LHX/DDQ3nwf2W0sdogJmg2YozIaOLolqnficGAn/tYBE3NFQXf02QFB5p +Nw268Cvwoy1iech2qOrI5zsfxk/CDNes8HdTXfBQtN+bA8pNQeEYsiUwhh1j5Wex +U81rToMauV4tBRVr1I6xl/wxA1fLvyd/zV8nfmbnPBcJthEqTzPN6xrTb9UVi4vO +aGt+mpXldH8XV9kCAwEAAaOBozCBoDAJBgNVHRMEAjAAMB0GA1UdDgQWBBRYEiRZ +pzwpFYlawhLb56VCECG3ujB0BgNVHSMEbTBrgBTy4upVZaSa4qydl/VFbPb3jBGt +36FIpEYwRDELMAkGA1UEBhMCU0UxEDAOBgNVBAgTB1VwcHNhbGExEDAOBgNVBAcT +B1VwcHNhbGExETAPBgNVBAoTCE15U1FMIEFCggkAlel49TRQ5NUwDQYJKoZIhvcN +AQEFBQADgYEAzctcgzXqy8vDqMOV4uZvTdjk7kHdPzWCrC/9Y4lPOhnXgXWzo/w2 +shLVxla8E2A3M26g2K58iPlL7nsfyPBWGQdNu0VSHHiBB3wThriGcIXkcSVYeNG+ +3iKCbRpLBqzw6FCHx2lkwmFDzZYGpn4JqQIBKqJA880QgEjQNFVAuc4= -----END CERTIFICATE----- diff --git a/mysql-test/std_data/server8k-key.pem b/mysql-test/std_data/server8k-key.pem index 608593a5096..493ad2350c8 100644 --- a/mysql-test/std_data/server8k-key.pem +++ b/mysql-test/std_data/server8k-key.pem @@ -1,99 +1,99 @@ -----BEGIN RSA PRIVATE KEY----- -MIISKQIBAAKCBAEA1BZYf95sKL+WGiAhVznSV4B1f7g5E41wevaMZYqbIUGmD1/C -w0+b4SN4D3IktWdbERNnU3AuDJNiuCw1CI6d1pHk3xQB2T1dxGPtzh/37R+DekhC -AUyhOBGOmodJybVPfDNCYcToecx43us0KdUpAZ4RDkGHsWEaozrRpaGfUchdIhQF -3MrtgKdeLt+5eWJWtHMj872aj+JhWJXF8GkXwGnCZqjDNb7kLxcdSSE1EwboDBd1 -RmdRdLcOtxCFB/xVv1lp3D6rxtfJ2uNKpb/WZAcNBYWXikvHCiSGOcuCd9I5/3lf -KdZUzuyvgEk7hmVpnUQ4I1BtGPThrirDz6GhOppdB05zAbAUkH11KvV5MBrfA04D -4qAChwR4y2yCxMuBTGFq5U2ZT08zasoWsnnP9k9eaA5WnTUreyaQy6V+9FBAlxYX -RBsbBsbV3SmyAbzZtsk+F9p8VvSLbBAo0koA/veE4BqGvECg8K6ZoKvlqqZueAmd -bzdaKsjFMNbIzRF/4iwchwI0gC28tin35OXJeZp7Eenf5OI7InN0LHIsJHfq0Lf/ -FTIUtp7N55Hs/wStxb0ANjLPMSYRS37M1awYZ43BUUzU9vvyjJa9aE+UNV2Si+6l -V06Wmzy+dSZVQS+Qkh5dUEZH37Kn6nICZHBwavpCo1IhbOJWnYU67zQQl2GufjZA -NkKiH3TqTcJetv4HRO/+81NboeNL5FSssy/gD5Cz8sDxFwTqUMiAzZIKF5ktdPiT -A+OCu7mclJsWS+1u124t9DbhBa1Ts6FJlV4WqT26UJ5EB8Z/J7aij2F3QXL13Ais -ieou/R9lZPXzOqwWIsDXBO0Mlqn3dkDI86++r3hdOLF5D0frRuWNZaxfWad72mxV -0INkSbhgN61ejEdhhTV7goSGLuNdL4SITzbZnShFaCFWbBbLoPnbZ9Dwwha0fFRH -f7LIadJ2jWvQHdZWPpmq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Ggrsrr5IlI39gZi9jwG85qe3Spavq3ILKdfL1N8UrFGD +/xIN0TVPtilede7vjKTK79tZu8JYaDWGc+g/mo/M1wmawLrqGNGzOwoVRruKl2In +m9PU9wBZ1HuphDQ4DRdC/AU8qkGhmDOx4bDWEQ/R3KKFHNvhnamyfyR7xqt79gyS +NGNIElnJuskCggIARFaK6yAVmaL74Qu3iiELj8FU9Cw8kPP5HeWUfGxCjlegdH3R +FBtoQlDcQjYzO2uZR94Itg3yk3Dt+xbf7KxUsODwlgLj1UhV4eOXUDTosBFTrbTG +v9gnRVH0Eyu9tF+CMUcCXhq6tnIrQOVv1ozcdXfIpk9gvIbfh4rlo6X0iM8Xge2t +Vo7awq05t4wJBkO1xUtOaw9HabaszK/CU1iNV7cIBmaFF3AEP/KVfOs+kjubc9AF +mqC+LVVClvJPNzm1YA5JZlxmQ0u1xXFqZv0OMoibgY+gSzaiAQz3eKB6vEv4Xv4U +kaF9nEUTEjowpTE6uX9X0mGkXXT2wXmlTjosZFnxRX5IIrRNug30plRra5CNYPGp +3uTmD/D7Nzi1iYitJg3yhrTQmCWiJY3x4Z0xophLkio2nlJ9WoTKf1AwTIATY7fa +pX9bxEKldYXrYZNFlbqBPFgA/36v+JDVfMf2E9yRMCt0LAJ0HUM6zP0ngMv+S1TP +Pu6X0WXR9JeuoaF4uJSty/xwdpST/CkHflFLVsk5n3tNQfWGjqoTSOJMgL9NRY9e +Pc/OshHZHeCVFUSXtcf1pfmmBtT6FHX0L4cgVqA5xO8RYapnLDAFLXq2/dRv3NwW +W9CzZcZKh7jmJw4iSIY5IU1+ThgugWoxlkcmjs/egjBclL8BBfqRIwx/vOE= -----END RSA PRIVATE KEY----- diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test index a752e990846..14c14fca0c6 100644 --- a/mysql-test/t/openssl_1.test +++ b/mysql-test/t/openssl_1.test @@ -11,8 +11,8 @@ insert into t1 values (5); grant select on test.* to ssl_user1@localhost require SSL; grant select on test.* to ssl_user2@localhost require cipher "DHE-RSA-AES256-SHA"; -grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer@mysql.com"; -grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer@mysql.com" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB"; +grant select on test.* to ssl_user3@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer@mysql.com"; +grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB/emailAddress=abstract.mysql.developer@mysql.com" ISSUER "/C=SE/ST=Uppsala/L=Uppsala/O=MySQL AB"; grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx"; flush privileges; From d94e00a0ed731b3597ec596f438cfbe446f78b79 Mon Sep 17 00:00:00 2001 From: Davi Arnaut <Davi.Arnaut@Sun.COM> Date: Wed, 28 Jan 2009 14:33:33 -0200 Subject: [PATCH 10/21] Remove test case for bug 40264. Dirty close tricky does not work on Windows. --- mysql-test/r/query_cache_notembedded.result | 16 ------------ mysql-test/t/query_cache_notembedded.test | 29 --------------------- 2 files changed, 45 deletions(-) diff --git a/mysql-test/r/query_cache_notembedded.result b/mysql-test/r/query_cache_notembedded.result index bf582bfaec6..8e5df012cfb 100644 --- a/mysql-test/r/query_cache_notembedded.result +++ b/mysql-test/r/query_cache_notembedded.result @@ -345,19 +345,3 @@ id drop table t1; drop function f1; set GLOBAL query_cache_size=0; -DROP TABLE IF EXISTS t1; -FLUSH STATUS; -SET GLOBAL query_cache_size=1048576; -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1),(2),(3),(4),(5); -SHOW STATUS LIKE 'Qcache_queries_in_cache'; -Variable_name Value -Qcache_queries_in_cache 0 -LOCK TABLES t1 WRITE; -SELECT * FROM t1; -UNLOCK TABLES; -SHOW STATUS LIKE 'Qcache_queries_in_cache'; -Variable_name Value -Qcache_queries_in_cache 0 -DROP TABLE t1; -SET GLOBAL query_cache_size= default; diff --git a/mysql-test/t/query_cache_notembedded.test b/mysql-test/t/query_cache_notembedded.test index c427e0d1afc..421ec913e5d 100644 --- a/mysql-test/t/query_cache_notembedded.test +++ b/mysql-test/t/query_cache_notembedded.test @@ -223,33 +223,4 @@ connection default; set GLOBAL query_cache_size=0; -# -# Bug#40264: Aborted cached query causes query to hang indefinitely on next cache hit -# - ---disable_warnings -DROP TABLE IF EXISTS t1; ---enable_warnings - -FLUSH STATUS; -SET GLOBAL query_cache_size=1048576; -CREATE TABLE t1 (a INT); -INSERT INTO t1 VALUES (1),(2),(3),(4),(5); -SHOW STATUS LIKE 'Qcache_queries_in_cache'; -LOCK TABLES t1 WRITE; -connect(con1,localhost,root,,); ---send SELECT * FROM t1 -connection default; -let $show_type= open tables where `table`='t1' and in_use=2; -let $show_pattern= '%t1%2%'; ---source include/wait_show_pattern.inc -dirty_close con1; -UNLOCK TABLES; -let $show_type= open tables where `table`='t1' and in_use=0; -let $show_pattern= '%t1%0%'; ---source include/wait_show_pattern.inc -SHOW STATUS LIKE 'Qcache_queries_in_cache'; -DROP TABLE t1; -SET GLOBAL query_cache_size= default; - # End of 5.0 tests From b41c1a45f11b4b8b644c1969986ea48d898e7334 Mon Sep 17 00:00:00 2001 From: Gleb Shchepa <gshchepa@mysql.com> Date: Wed, 28 Jan 2009 22:46:45 +0400 Subject: [PATCH 11/21] Bug #39069: <row constructor> IN <table-subquery> seriously messed up "ROW(...) IN (SELECT ... FROM DUAL)" always returned TRUE. Item_in_subselect::row_value_transformer rewrites "ROW(...) IN SELECT" conditions into the "EXISTS (SELECT ... HAVING ...)" form. For a subquery from the DUAL pseudotable resulting HAVING condition is an expression on constant values, so further transformation with optimize_cond() eliminates this HAVING condition and resets JOIN::having to NULL. Then JOIN::exec treated that NULL as an always-true-HAVING and that caused a bug. To distinguish an optimized out "HAVING TRUE" clause from "HAVING FALSE" we already have the JOIN::having_value flag. However, JOIN::exec() ignored JOIN::having_value as described above as if it always set to COND_TRUE. The JOIN::exec method has been modified to take into account the value of the JOIN::having_value field. --- mysql-test/r/subselect3.result | 54 ++++++++++++++++++++++++++++++++++ mysql-test/t/subselect3.test | 29 ++++++++++++++++++ sql/sql_select.cc | 5 ++++ 3 files changed, 88 insertions(+) diff --git a/mysql-test/r/subselect3.result b/mysql-test/r/subselect3.result index 97479418bec..9a6f4436ff0 100644 --- a/mysql-test/r/subselect3.result +++ b/mysql-test/r/subselect3.result @@ -795,4 +795,58 @@ WHERE INNR.varchar_key > 'n{' ); varchar_nokey DROP TABLE t1; +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (11); +# 2nd and 3rd columns should be same +SELECT a, ROW(11, 12) = (SELECT a, 22), ROW(11, 12) IN (SELECT a, 22) FROM t1 GROUP BY t1.a; +a ROW(11, 12) = (SELECT a, 22) ROW(11, 12) IN (SELECT a, 22) +1 0 0 +2 0 0 +11 0 0 +SELECT a, ROW(11, 12) = (SELECT a, 12), ROW(11, 12) IN (SELECT a, 12) FROM t1 GROUP BY t1.a; +a ROW(11, 12) = (SELECT a, 12) ROW(11, 12) IN (SELECT a, 12) +1 0 0 +2 0 0 +11 1 1 +SELECT a, ROW(11, 12) = (SELECT a, 22), ROW(11, 12) IN (SELECT a, 22) FROM t1; +a ROW(11, 12) = (SELECT a, 22) ROW(11, 12) IN (SELECT a, 22) +1 0 0 +2 0 0 +11 0 0 +SELECT a, ROW(11, 12) = (SELECT a, 12), ROW(11, 12) IN (SELECT a, 12) FROM t1; +a ROW(11, 12) = (SELECT a, 12) ROW(11, 12) IN (SELECT a, 12) +1 0 0 +2 0 0 +11 1 1 +SELECT a AS x, ROW(11, 12) = (SELECT MAX(x), 22), ROW(11, 12) IN (SELECT MAX(x), 22) FROM t1; +x ROW(11, 12) = (SELECT MAX(x), 22) ROW(11, 12) IN (SELECT MAX(x), 22) +1 0 0 +2 0 0 +11 0 0 +# 2nd and 3rd columns should be same for x == 11 only +SELECT a AS x, ROW(11, 12) = (SELECT MAX(x), 12), ROW(11, 12) IN (SELECT MAX(x), 12) FROM t1; +x ROW(11, 12) = (SELECT MAX(x), 12) ROW(11, 12) IN (SELECT MAX(x), 12) +1 0 1 +2 0 1 +11 1 1 +DROP TABLE t1; +# both columns should be same +SELECT ROW(1,2) = (SELECT NULL, NULL), ROW(1,2) IN (SELECT NULL, NULL); +ROW(1,2) = (SELECT NULL, NULL) ROW(1,2) IN (SELECT NULL, NULL) +NULL NULL +SELECT ROW(1,2) = (SELECT 1, NULL), ROW(1,2) IN (SELECT 1, NULL); +ROW(1,2) = (SELECT 1, NULL) ROW(1,2) IN (SELECT 1, NULL) +NULL NULL +SELECT ROW(1,2) = (SELECT NULL, 2), ROW(1,2) IN (SELECT NULL, 2); +ROW(1,2) = (SELECT NULL, 2) ROW(1,2) IN (SELECT NULL, 2) +NULL NULL +SELECT ROW(1,2) = (SELECT NULL, 1), ROW(1,2) IN (SELECT NULL, 1); +ROW(1,2) = (SELECT NULL, 1) ROW(1,2) IN (SELECT NULL, 1) +0 0 +SELECT ROW(1,2) = (SELECT 1, 1), ROW(1,2) IN (SELECT 1, 1); +ROW(1,2) = (SELECT 1, 1) ROW(1,2) IN (SELECT 1, 1) +0 0 +SELECT ROW(1,2) = (SELECT 1, 2), ROW(1,2) IN (SELECT 1, 2); +ROW(1,2) = (SELECT 1, 2) ROW(1,2) IN (SELECT 1, 2) +1 1 End of 5.0 tests diff --git a/mysql-test/t/subselect3.test b/mysql-test/t/subselect3.test index 7e9aa1554c0..2d88d1660b0 100644 --- a/mysql-test/t/subselect3.test +++ b/mysql-test/t/subselect3.test @@ -640,4 +640,33 @@ WHERE NULL NOT IN ( DROP TABLE t1; +# +# Bug #39069: <row constructor> IN <table-subquery> seriously messed up +# + +CREATE TABLE t1 (a INT); +INSERT INTO t1 VALUES (1), (2), (11); + +--echo # 2nd and 3rd columns should be same +SELECT a, ROW(11, 12) = (SELECT a, 22), ROW(11, 12) IN (SELECT a, 22) FROM t1 GROUP BY t1.a; +SELECT a, ROW(11, 12) = (SELECT a, 12), ROW(11, 12) IN (SELECT a, 12) FROM t1 GROUP BY t1.a; +SELECT a, ROW(11, 12) = (SELECT a, 22), ROW(11, 12) IN (SELECT a, 22) FROM t1; +SELECT a, ROW(11, 12) = (SELECT a, 12), ROW(11, 12) IN (SELECT a, 12) FROM t1; + +# The x alias is used below to workaround bug #40674. +# Regression tests for sum function on outer column in subselect from dual: +SELECT a AS x, ROW(11, 12) = (SELECT MAX(x), 22), ROW(11, 12) IN (SELECT MAX(x), 22) FROM t1; +--echo # 2nd and 3rd columns should be same for x == 11 only +SELECT a AS x, ROW(11, 12) = (SELECT MAX(x), 12), ROW(11, 12) IN (SELECT MAX(x), 12) FROM t1; + +DROP TABLE t1; + +--echo # both columns should be same +SELECT ROW(1,2) = (SELECT NULL, NULL), ROW(1,2) IN (SELECT NULL, NULL); +SELECT ROW(1,2) = (SELECT 1, NULL), ROW(1,2) IN (SELECT 1, NULL); +SELECT ROW(1,2) = (SELECT NULL, 2), ROW(1,2) IN (SELECT NULL, 2); +SELECT ROW(1,2) = (SELECT NULL, 1), ROW(1,2) IN (SELECT NULL, 1); +SELECT ROW(1,2) = (SELECT 1, 1), ROW(1,2) IN (SELECT 1, 1); +SELECT ROW(1,2) = (SELECT 1, 2), ROW(1,2) IN (SELECT 1, 2); + --echo End of 5.0 tests diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 53e24414f01..74d1158d8b7 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1608,8 +1608,13 @@ JOIN::exec() We have to test for 'conds' here as the WHERE may not be constant even if we don't have any tables for prepared statements or if conds uses something like 'rand()'. + If the HAVING clause is either impossible or always true, then + JOIN::having is set to NULL by optimize_cond. + In this case JOIN::exec must check for JOIN::having_value, in the + same way it checks for JOIN::cond_value. */ if (cond_value != Item::COND_FALSE && + having_value != Item::COND_FALSE && (!conds || conds->val_int()) && (!having || having->val_int())) { From 63ed1e4964a27730623d87c19f07542eb70e15a7 Mon Sep 17 00:00:00 2001 From: Georgi Kodinov <joro@sun.com> Date: Thu, 29 Jan 2009 14:40:48 +0200 Subject: [PATCH 12/21] Bug #35396: Abnormal query times in slow query log If the system time is adjusted back during a query execution (resulting in the end time being earlier than the start time) the code that prints to the slow query log gets confused and prints unsigned negative numbers. Fixed by not logging the statements that would have negative execution time due to time shifts. No test case since this would involve changing the system time. --- sql/sql_parse.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 91c5cacc4d0..1d3632fd468 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -2333,8 +2333,9 @@ void log_slow_statement(THD *thd) { thd->proc_info="logging slow query"; - if ((ulong) (thd->start_time - thd->time_after_lock) > - thd->variables.long_query_time || + if ((thd->start_time > thd->time_after_lock && + (ulong) (thd->start_time - thd->time_after_lock) > + thd->variables.long_query_time) || (thd->server_status & (SERVER_QUERY_NO_INDEX_USED | SERVER_QUERY_NO_GOOD_INDEX_USED)) && opt_log_queries_not_using_indexes && From 1fcf891629c1eebb437ec38a5716cc5fd0b5e705 Mon Sep 17 00:00:00 2001 From: "Tatiana A. Nurnberg" <azundris@mysql.com> Date: Fri, 30 Jan 2009 17:12:24 +0100 Subject: [PATCH 13/21] Bug#41370: TIMESTAMP field does not accepts NULL from FROM_UNIXTIME() When storing a NULL to a TIMESTAMP NOT NULL DEFAULT ..., NULL returned from some functions threw a 'cannot be NULL error.' NULL-returns now correctly result in the timestamp-field being assigned its default value. --- mysql-test/r/type_timestamp.result | 19 +++++++++++++++++++ mysql-test/t/type_timestamp.test | 20 +++++++++++++++++++- sql/item.cc | 4 ++-- 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result index 445ada578d0..59900fe4a77 100644 --- a/mysql-test/r/type_timestamp.result +++ b/mysql-test/r/type_timestamp.result @@ -492,6 +492,7 @@ a b c 5 NULL 2001-09-09 04:46:59 6 NULL 2006-06-06 06:06:06 drop table t1; +End of 4.1 tests set time_zone= @@global.time_zone; CREATE TABLE t1 ( `id` int(11) NOT NULL auto_increment, @@ -508,3 +509,21 @@ select is_nullable from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='t1' and COL is_nullable NO drop table t1; +CREATE TABLE t1 ( f1 INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, +f2 TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, +f3 TIMESTAMP); +INSERT INTO t1 (f2,f3) VALUES (NOW(), "0000-00-00 00:00:00"); +INSERT INTO t1 (f2,f3) VALUES (NOW(), NULL); +INSERT INTO t1 (f2,f3) VALUES (NOW(), ASCII(NULL)); +INSERT INTO t1 (f2,f3) VALUES (NOW(), FROM_UNIXTIME('9999999999')); +INSERT INTO t1 (f2,f3) VALUES (NOW(), TIME(NULL)); +UPDATE t1 SET f2=NOW(), f3=FROM_UNIXTIME('9999999999') WHERE f1=1; +SELECT f1,f2-f3 FROM t1; +f1 f2-f3 +1 0 +2 0 +3 0 +4 0 +5 0 +DROP TABLE t1; +End of 5.0 tests diff --git a/mysql-test/t/type_timestamp.test b/mysql-test/t/type_timestamp.test index 7b4af9e0c69..ce1d3f21ff5 100644 --- a/mysql-test/t/type_timestamp.test +++ b/mysql-test/t/type_timestamp.test @@ -324,7 +324,7 @@ insert into t1 (a, c) values (4, '2004-04-04 00:00:00'), select * from t1; drop table t1; -# End of 4.1 tests +--echo End of 4.1 tests # Restore timezone to default set time_zone= @@global.time_zone; @@ -339,3 +339,21 @@ PRIMARY KEY (`id`) show fields from t1; select is_nullable from INFORMATION_SCHEMA.COLUMNS where TABLE_NAME='t1' and COLUMN_NAME='posted_on'; drop table t1; + +# +# Bug#41370: TIMESTAMP field does not accepts NULL from FROM_UNIXTIME() +# + +CREATE TABLE t1 ( f1 INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, + f2 TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, + f3 TIMESTAMP); +INSERT INTO t1 (f2,f3) VALUES (NOW(), "0000-00-00 00:00:00"); +INSERT INTO t1 (f2,f3) VALUES (NOW(), NULL); +INSERT INTO t1 (f2,f3) VALUES (NOW(), ASCII(NULL)); +INSERT INTO t1 (f2,f3) VALUES (NOW(), FROM_UNIXTIME('9999999999')); +INSERT INTO t1 (f2,f3) VALUES (NOW(), TIME(NULL)); +UPDATE t1 SET f2=NOW(), f3=FROM_UNIXTIME('9999999999') WHERE f1=1; +SELECT f1,f2-f3 FROM t1; +DROP TABLE t1; + +--echo End of 5.0 tests diff --git a/sql/item.cc b/sql/item.cc index 2a89c86cd88..977c5f0b7c0 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -321,7 +321,7 @@ int Item::save_time_in_field(Field *field) { MYSQL_TIME ltime; if (get_time(<ime)) - return set_field_to_null(field); + return set_field_to_null_with_conversions(field, 0); field->set_notnull(); return field->store_time(<ime, MYSQL_TIMESTAMP_TIME); } @@ -331,7 +331,7 @@ int Item::save_date_in_field(Field *field) { MYSQL_TIME ltime; if (get_date(<ime, TIME_FUZZY_DATE)) - return set_field_to_null(field); + return set_field_to_null_with_conversions(field, 0); field->set_notnull(); return field->store_time(<ime, MYSQL_TIMESTAMP_DATETIME); } From 7da691c9f860b59e071d84b375415f57a31df5bc Mon Sep 17 00:00:00 2001 From: Matthias Leich <Matthias.Leich@sun.com> Date: Mon, 2 Feb 2009 22:20:25 +0100 Subject: [PATCH 14/21] 1. Slice of fix for Bug#42003 tests missing the disconnect of connections <> default - If missing: add "disconnect <session>" - If physical disconnect of non "default" sessions is not finished at test end: add routine which waits till this happened + additional improvements like - remove superfluous files created by the test - replace error numbers by error names - remove trailing spaces, replace tabs by spaces - unify writing of bugs within comments - correct comments - minor changes of formatting Modifications according to the code review are included. Fixed tests: grant2 grant3 lock_tables_lost_commit mysqldump openssl_1 outfile --- mysql-test/include/count_sessions.inc | 21 ++ .../include/wait_until_count_sessions.inc | 112 +++++++++ mysql-test/r/grant2.result | 23 +- mysql-test/r/lock_tables_lost_commit.result | 12 +- mysql-test/r/mysqldump.result | 166 ++++++------- mysql-test/r/outfile.result | Bin 2135 -> 2134 bytes mysql-test/t/grant2.test | 123 +++++----- mysql-test/t/grant3.test | 16 +- mysql-test/t/lock_tables_lost_commit.test | 27 ++- mysql-test/t/mysqldump.test | 223 +++++++++++------- mysql-test/t/openssl_1.test | 26 +- mysql-test/t/outfile.test | 16 +- 12 files changed, 499 insertions(+), 266 deletions(-) create mode 100644 mysql-test/include/count_sessions.inc create mode 100644 mysql-test/include/wait_until_count_sessions.inc diff --git a/mysql-test/include/count_sessions.inc b/mysql-test/include/count_sessions.inc new file mode 100644 index 00000000000..4728e39ce74 --- /dev/null +++ b/mysql-test/include/count_sessions.inc @@ -0,0 +1,21 @@ +# include/count_sessions.inc +# +# SUMMARY +# +# Stores the number of current sessions in $count_sessions. +# +# +# USAGE +# +# Please look into include/wait_until_count_sessions.inc +# for examples of typical usage. +# +# +# EXAMPLE +# backup.test, grant3.test +# +# +# Created: 2009-01-14 mleich +# + +let $count_sessions= query_get_value(SHOW STATUS LIKE 'Threads_connected', Value, 1); diff --git a/mysql-test/include/wait_until_count_sessions.inc b/mysql-test/include/wait_until_count_sessions.inc new file mode 100644 index 00000000000..36fa9accafe --- /dev/null +++ b/mysql-test/include/wait_until_count_sessions.inc @@ -0,0 +1,112 @@ +# include/wait_until_count_sessions.inc +# +# SUMMARY +# +# Waits until the passed number ($count_sessions) of concurrent sessions was +# observed via +# SHOW STATUS LIKE 'Threads_connected' +# or the operation times out. +# Note: Starting with 5.1 we could also use +# SELECT COUNT(*) FROM information_schema.processlist +# I stay with "SHOW STATUS LIKE 'Threads_connected'" because this +# runs in all versions 5.0+ +# +# +# USAGE +# +# let $count_sessions= 3; +# --source include/wait_until_count_sessions.inc +# +# OR typical example of a test which uses more than one session +# Such a test could harm successing tests if there is no server shutdown +# and start between.cw +# +# If the testing box is slow than the disconnect of sessions belonging to +# the current test might happen when the successing test gets executed. +# This means the successing test might see activities like unexpected +# rows within the general log or the PROCESSLIST. +# Example from bug http://bugs.mysql.com/bug.php?id=40377 +# --- bzr_mysql-6.0-rpl/.../r/log_state.result +# +++ bzr_mysql-6.0-rpl/.../r/log_state.reject +# @@ -25,6 +25,7 @@ +# event_time user_host ... command_type argument +# TIMESTAMP USER_HOST ... Query create table t1(f1 int) +# TIMESTAMP USER_HOST ... Query select * from mysql.general_log +# +TIMESTAMP USER_HOST ... Quit +# .... +# +# What to do? +# ----------- +# <start of test> +# # Determine initial number of connections (set $count_sessions) +# --source include/count_sessions.inc +# ... +# connect (con1,.....) +# ... +# connection default; +# ... +# disconnect con1; +# ... +# # Wait until we have reached the initial number of connections +# # or more than the sleep time above (10 seconds) has passed. +# # $count_sessions +# --source include/wait_until_count_sessions.inc +# <end of test> +# +# Important note about tests with unfortunate (= not cooperative +# to successing tests) architecture: +# connection con1; +# send SELECT ..., sleep(10) +# connection default; +# ... +# disconnect con1; +# <end of test> +# should be fixed by +# connection con1; +# send SELECT ..., sleep(10) +# connection default; +# ... +# connect con1; +# reap; +# connection default; +# disconnect con1; +# <end of test> +# and not only by appending include/wait_until_count_sessions.inc etc. +# +# +# EXAMPLE +# +# backup.test, grant3.test +# +# +# Created: 2009-01-14 mleich +# + +let $wait_counter= 50; +if ($wait_timeout) +{ + let $wait_counter= `SELECT $wait_timeout * 10`; +} +# Reset $wait_timeout so that its value won't be used on subsequent +# calls, and default will be used instead. +let $wait_timeout= 0; +while ($wait_counter) +{ + let $current_sessions= query_get_value(SHOW STATUS LIKE 'Threads_connected', Value, 1); + let $success= `SELECT $current_sessions = $count_sessions`; + if ($success) + { + let $wait_counter= 0; + } + if (!$success) + { + real_sleep 0.1; + dec $wait_counter; + } +} +if (!$success) +{ + --echo # Timeout in wait_until_count_sessions.inc + --echo # Number of sessions expected: $count_sessions found: $current_sessions +} + diff --git a/mysql-test/r/grant2.result b/mysql-test/r/grant2.result index e3c92ecc7c8..95748c89103 100644 --- a/mysql-test/r/grant2.result +++ b/mysql-test/r/grant2.result @@ -366,20 +366,20 @@ insert into mysql.user select * from t1; drop table t1, t2; drop database TESTDB; flush privileges; -grant all privileges on test.* to `a@`@localhost; -grant execute on * to `a@`@localhost; -create table t2 (s1 int); -insert into t2 values (1); -drop function if exists f2; -create function f2 () returns int begin declare v int; select s1 from t2 -into v; return v; end// -select f2(); +GRANT ALL PRIVILEGES ON test.* TO `a@`@localhost; +GRANT EXECUTE ON * TO `a@`@localhost; +CREATE TABLE t2 (s1 INT); +INSERT INTO t2 VALUES (1); +DROP FUNCTION IF EXISTS f2; +CREATE FUNCTION f2 () RETURNS INT +BEGIN DECLARE v INT; SELECT s1 FROM t2 INTO v; RETURN v; END// +SELECT f2(); f2() 1 -drop function f2; -drop table t2; +DROP FUNCTION f2; +DROP TABLE t2; REVOKE ALL PRIVILEGES, GRANT OPTION FROM `a@`@localhost; -drop user `a@`@localhost; +DROP USER `a@`@localhost; drop database if exists mysqltest_1; drop database if exists mysqltest_2; drop user mysqltest_u1@localhost; @@ -436,6 +436,7 @@ SELECT * FROM t2; ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 't2' SELECT * FROM t1 JOIN t2 USING (b); ERROR 42000: SELECT command denied to user 'mysqltest1'@'localhost' for column 'c' in table 't2' +USE test; DROP TABLE db1.t1, db1.t2; DROP USER mysqltest1@localhost; DROP DATABASE db1; diff --git a/mysql-test/r/lock_tables_lost_commit.result b/mysql-test/r/lock_tables_lost_commit.result index 22885d93d40..df4b6eff5cf 100644 --- a/mysql-test/r/lock_tables_lost_commit.result +++ b/mysql-test/r/lock_tables_lost_commit.result @@ -1,8 +1,8 @@ -drop table if exists t1; -create table t1(a int) engine=innodb; -lock tables t1 write; -insert into t1 values(10); -select * from t1; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1(a INT) ENGINE=innodb; +LOCK TABLES t1 WRITE; +INSERT INTO t1 VALUES(10); +SELECT * FROM t1; a 10 -drop table t1; +DROP TABLE t1; diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result index 08a18d8de75..76e553dea42 100644 --- a/mysql-test/r/mysqldump.result +++ b/mysql-test/r/mysqldump.result @@ -1,6 +1,6 @@ -Bug#37938 - Test "mysqldump" lacks various insert statements -Turn off concurrent inserts to avoid random errors -NOTE: We reset the variable back to saved value at the end of test +# Bug#37938 Test "mysqldump" lacks various insert statements +# Turn off concurrent inserts to avoid random errors +# NOTE: We reset the variable back to saved value at the end of test SET @OLD_CONCURRENT_INSERT = @@GLOBAL.CONCURRENT_INSERT; SET @@GLOBAL.CONCURRENT_INSERT = 0; DROP TABLE IF EXISTS t1, `"t"1`, t1aa, t2, t2aa, t3; @@ -8,7 +8,7 @@ drop database if exists mysqldump_test_db; drop database if exists db1; drop database if exists db2; drop view if exists v1, v2, v3; -CREATE TABLE t1(a int); +CREATE TABLE t1(a INT); INSERT INTO t1 VALUES (1), (2); <?xml version="1.0"?> <mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> @@ -28,7 +28,7 @@ INSERT INTO t1 VALUES (1), (2); </mysqldump> DROP TABLE t1; # -# Bug #2005 +# Bug#2005 Long decimal comparison bug. # CREATE TABLE t1 (a decimal(64, 20)); INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"), @@ -42,7 +42,7 @@ SET character_set_client = @saved_cs_client; INSERT INTO `t1` VALUES ('1234567890123456789012345678901234567890.00000000000000000000'),('987654321098765432109876543210987654321.00000000000000000000'); DROP TABLE t1; # -# Bug #2055 +# Bug#2055 mysqldump should replace "-inf" numeric field values with "NULL" # CREATE TABLE t1 (a double); INSERT INTO t1 VALUES ('-9e999999'); @@ -57,7 +57,7 @@ SET character_set_client = @saved_cs_client; INSERT INTO `t1` VALUES (RES); DROP TABLE t1; # -# Bug #3361 mysqldump quotes DECIMAL values inconsistently +# Bug#3361 mysqldump quotes DECIMAL values inconsistently # CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT); INSERT INTO t1 VALUES (1.2345, 2.3456); @@ -169,7 +169,7 @@ INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES"); </mysqldump> DROP TABLE t1; # -# Bug #1707 +# Bug#1707 mysqldump -X does't quote field and table names # CREATE TABLE t1 (`a"b"` char(2)); INSERT INTO t1 VALUES ("1\""), ("\"2"); @@ -191,8 +191,8 @@ INSERT INTO t1 VALUES ("1\""), ("\"2"); </mysqldump> DROP TABLE t1; # -# Bug #1994 -# Bug #4261 +# Bug#1994 mysqldump does not correctly dump UCS2 data +# Bug#4261 mysqldump 10.7 (mysql 4.1.2) --skip-extended-insert drops NULL from inserts # CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r; INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL); @@ -233,7 +233,7 @@ UNLOCK TABLES; DROP TABLE t1; # -# Bug #2634 +# Bug#2634 mysqldump in --compatible=mysql4 # CREATE TABLE t1 (a int) ENGINE=MYISAM; INSERT INTO t1 VALUES (1), (2); @@ -291,7 +291,7 @@ UNLOCK TABLES; DROP TABLE t1; # -# Bug #2592 'mysqldump doesn't quote "tricky" names correctly' +# Bug#2592 mysqldump doesn't quote "tricky" names correctly # create table ```a` (i int); SET @saved_cs_client = @@character_set_client; @@ -302,7 +302,7 @@ CREATE TABLE ```a` ( SET character_set_client = @saved_cs_client; drop table ```a`; # -# Bug #2591 "mysqldump quotes names inconsistently" +# Bug#2591 mysqldump quotes names inconsistently # create table t1(a int); @@ -425,7 +425,7 @@ UNLOCK TABLES; set global sql_mode=''; drop table t1; # -# Bug #2705 'mysqldump --tab extra output' +# Bug#2705 mysqldump --tab extra output # create table t1(a int); insert into t1 values (1),(2),(3); @@ -459,7 +459,7 @@ SET character_set_client = @saved_cs_client; 3 drop table t1; # -# Bug #6101: create database problem +# Bug#6101 create database problem # /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; @@ -514,7 +514,7 @@ USE `mysqldump_test_db`; drop database mysqldump_test_db; # -# Bug #7020 +# Bug#7020 mysqldump --compatible=mysql40 should set --skip-set-charset --default-char... # Check that we don't dump in UTF8 in compatible mode by default, # but use the default compiled values, or the values given in # --default-character-set=xxx. However, we should dump in UTF8 @@ -556,8 +556,8 @@ UNLOCK TABLES; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; # -# Bug#8063: make test mysqldump [ fail ] -# We cannot tes this command because its output depends +# Bug#8063 make test mysqldump [ fail ] +# We cannot test this command because its output depends # on --default-character-set incompiled into "mysqldump" program. # If the future we can move this command into a separate test with # checking that "mysqldump" is compiled with "latin1" @@ -642,7 +642,7 @@ UNLOCK TABLES; DROP TABLE t1; # -# WL #2319: Exclude Tables from dump +# WL#2319 Exclude Tables from dump # CREATE TABLE t1 (a int); CREATE TABLE t2 (a int); @@ -685,7 +685,7 @@ UNLOCK TABLES; DROP TABLE t1; DROP TABLE t2; # -# Bug #8830 +# Bug#8830 mysqldump --skip-extended-insert causes --hex-blob to dump wrong values # CREATE TABLE t1 (`b` blob); INSERT INTO `t1` VALUES (0x602010000280100005E71A); @@ -727,7 +727,7 @@ DROP TABLE t1; # # Test for --insert-ignore # -CREATE TABLE t1 (a int); +CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t1 VALUES (4),(5),(6); @@ -798,9 +798,9 @@ INSERT DELAYED IGNORE INTO `t1` VALUES (1),(2),(3),(4),(5),(6); DROP TABLE t1; # -# Bug #10286: mysqldump -c crashes on table that has many fields with long -# names -# +# Bug#10286 mysqldump -c crashes on table that has many fields with long +# names +# create table t1 ( F_c4ca4238a0b923820dcc509a6f75849b int, F_c81e728d9d4c2f636f067f89cc14862c int, @@ -1544,7 +1544,7 @@ UNLOCK TABLES; DROP TABLE t1; # -# Bug #9558 mysqldump --no-data db t1 t2 format still dumps data +# Bug#9558 mysqldump --no-data db t1 t2 format still dumps data # CREATE DATABASE mysqldump_test_db; USE mysqldump_test_db; @@ -1649,7 +1649,7 @@ DROP DATABASE mysqldump_test_db; # # Testing with tables and databases that don't exists # or contains illegal characters -# (Bug #9358 mysqldump crashes if tablename starts with \) +# (Bug#9358 mysqldump crashes if tablename starts with \) # create database mysqldump_test_db; use mysqldump_test_db; @@ -1678,7 +1678,7 @@ drop table t1, t2, t3; drop database mysqldump_test_db; use test; # -# Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly +# Bug#9657 mysqldump xml ( -x ) does not format NULL fields correctly # create table t1 (a int(10)); create table t2 (pk int primary key auto_increment, @@ -1737,7 +1737,7 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir </mysqldump> drop table t1, t2; # -# BUG #12123 +# Bug#12123 mysqldump --tab results in text file which can't be imported # create table t1 (a text character set utf8, b text character set latin1); insert t1 values (0x4F736E616272C3BC636B, 0x4BF66C6E); @@ -1750,11 +1750,11 @@ a b Osnabr�ck K�ln drop table t1; # -# BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence +# Bug#15328 Segmentation fault occured if my.cnf is invalid for escape sequence # --fields-optionally-enclosed-by=" # -# BUG #19025 mysqldump doesn't correctly dump "auto_increment = [int]" +# Bug#19025 mysqldump doesn't correctly dump "auto_increment = [int]" # create table `t1` ( t1_name varchar(255) default null, @@ -1794,7 +1794,7 @@ t1 CREATE TABLE `t1` ( ) ENGINE=MyISAM AUTO_INCREMENT=1003 DEFAULT CHARSET=latin1 drop table `t1`; # -# Bug #18536: wrong table order +# Bug#18536 wrong table order # create table t1(a int); create table t2(a int); @@ -1843,7 +1843,7 @@ SET character_set_client = @saved_cs_client; drop table t1, t2, t3; # -# Bug #21288: mysqldump segmentation fault when using --where +# Bug#21288 mysqldump segmentation fault when using --where # create table t1 (a int); mysqldump: Couldn't execute 'SELECT /*!40001 SQL_NO_CACHE */ * FROM `t1` WHERE xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx': You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' at line 1 (1064) @@ -1879,7 +1879,7 @@ SET character_set_client = @saved_cs_client; drop table t1; # -# BUG#13926: --order-by-primary fails if PKEY contains quote character +# Bug#13926 --order-by-primary fails if PKEY contains quote character # DROP TABLE IF EXISTS `t1`; CREATE TABLE `t1` ( @@ -1958,7 +1958,7 @@ UNLOCK TABLES; DROP TABLE `t1`; End of 4.1 tests # -# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X) +# Bug#10213 mysqldump crashes when dumping VIEWs(on MacOS X) # create database db1; use db1; @@ -2023,7 +2023,7 @@ drop view v2; drop database db1; use test; # -# Bug 10713 mysqldump includes database in create view and referenced tables +# Bug#10713 mysqldump includes database in create view and referenced tables # create database db2; use db2; @@ -2102,7 +2102,7 @@ DROP TABLE IF EXISTS `v1`; drop view v1; drop table t1; # -# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X) +# Bug#10213 mysqldump crashes when dumping VIEWs(on MacOS X) # create database mysqldump_test_db; use mysqldump_test_db; @@ -2167,7 +2167,7 @@ drop view v2; drop database mysqldump_test_db; use test; # -# Bug #9756 +# Bug#9756 mysql client failing on dumps containing certain \ sequences # CREATE TABLE t1 (a char(10)); INSERT INTO t1 VALUES ('\''); @@ -2207,7 +2207,7 @@ UNLOCK TABLES; DROP TABLE t1; # -# Bug #10927 mysqldump: Can't reload dump with view that consist of other view +# Bug#10927 mysqldump: Can't reload dump with view that consist of other view # create table t1(a int, b int, c varchar(30)); insert into t1 values(1, 2, "one"), (2, 4, "two"), (3, 6, "three"); @@ -2505,12 +2505,14 @@ end if; end BEFORE # STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER root@localhost DROP TABLE t1, t2; # -# Bugs #9136, #12917: problems with --defaults-extra-file option +# Bug#9136 my_print_defaults changed behaviour between 4.1.7 and 4.1.10a +# Bug#12917 The --defaults-extra-file option is ignored by the 5.0 client binaries +# (Problems with --defaults-extra-file option) # --port=1234 --port=1234 # -# Test of fix to BUG 12597 +# Test of fix to Bug#12597 mysqldump dumps triggers wrongly # DROP TABLE IF EXISTS `test1`; Warnings: @@ -2544,7 +2546,7 @@ DROP TRIGGER testref; DROP TABLE test1; DROP TABLE test2; # -# BUG#9056 - mysqldump does not dump routines +# Bug#9056 mysqldump does not dump routines # DROP TABLE IF EXISTS t1; DROP FUNCTION IF EXISTS bug9056_func1; @@ -2562,9 +2564,9 @@ begin set f1= concat( 'hello', f1 ); return f1; end // -CREATE PROCEDURE bug9056_proc2(OUT a INT) -BEGIN -select sum(id) from t1 into a; +CREATE PROCEDURE bug9056_proc2(OUT a INT) +BEGIN +select sum(id) from t1 into a; END // set sql_mode='ansi'; create procedure `a'b` () select 1; @@ -2624,8 +2626,8 @@ BEGIN SELECT a+b INTO c; end */;; /*!50003 DROP PROCEDURE IF EXISTS `bug9056_proc2` */;; /*!50003 SET SESSION SQL_MODE=""*/;; /*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `bug9056_proc2`(OUT a INT) -BEGIN -select sum(id) from t1 into a; +BEGIN +select sum(id) from t1 into a; END */;; /*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;; DELIMITER ; @@ -2646,7 +2648,7 @@ DROP PROCEDURE bug9056_proc2; DROP PROCEDURE `a'b`; drop table t1; # -# BUG# 13052 - mysqldump timestamp reloads broken +# Bug#13052 mysqldump timestamp reloads broken # drop table if exists t1; create table t1 (`d` timestamp, unique (`d`)); @@ -2741,7 +2743,7 @@ drop table t1; set global time_zone=default; set time_zone=default; # -# Test of fix to BUG 13146 - ansi quotes break loading of triggers +# Test of fix to Bug#13146 ansi quotes break loading of triggers # DROP TABLE IF EXISTS `t1 test`; DROP TABLE IF EXISTS `t2 test`; @@ -2814,7 +2816,7 @@ DROP TRIGGER `test trig`; DROP TABLE `t1 test`; DROP TABLE `t2 test`; # -# BUG# 12838 mysqldump -x with views exits with error +# Bug#12838 mysqldump -x with views exits with error # drop table if exists t1; create table t1 (a int, b varchar(32), c varchar(32)); @@ -2912,7 +2914,7 @@ drop view v0; drop view v1; drop table t1; # -# BUG#14554 - mysqldump does not separate words "ROW" and "BEGIN" +# Bug#14554 mysqldump does not separate words "ROW" and "BEGIN" # for tables with trigger created in the IGNORE_SPACE sql mode. # SET @old_sql_mode = @@SQL_MODE; @@ -2975,8 +2977,8 @@ DELIMITER ; DROP TRIGGER tr1; DROP TABLE t1; # -# Bug #13318: Bad result with empty field and --hex-blob -# +# Bug#13318 Bad result with empty field and --hex-blob +# create table t1 (a binary(1), b blob); insert into t1 values ('',''); @@ -3051,7 +3053,7 @@ UNLOCK TABLES; drop table t1; # -# Bug 14871 Invalid view dump output +# Bug#14871 Invalid view dump output # create table t1 (a int); insert into t1 values (289), (298), (234), (456), (789); @@ -3080,7 +3082,7 @@ a drop table t1; drop view v1, v2, v3, v4, v5; # -# Bug #16878 dump of trigger +# Bug#16878 dump of trigger # create table t1 (a int, created datetime); create table t2 (b int, created datetime); @@ -3130,7 +3132,7 @@ drop view v2; drop table t; # # Bug#14857 Reading dump files with single statement stored routines fails. -# fixed by patch for bug#16878 +# fixed by patch for Bug#16878 # /*!50003 CREATE FUNCTION `f`() RETURNS bigint(20) return 42 */| @@ -3147,7 +3149,7 @@ select 42 drop function f; drop procedure p; # -# Bug #17371 Unable to dump a schema with invalid views +# Bug#17371 Unable to dump a schema with invalid views # create table t1 ( id serial ); create view v1 as select * from t1; @@ -3158,7 +3160,7 @@ mysqldump { } mysqldump drop view v1; -# BUG#17201 Spurious 'DROP DATABASE' in output, +# Bug#17201 Spurious 'DROP DATABASE' in output, # also confusion between tables and views. # Example code from Markus Popp create database mysqldump_test_db; @@ -3225,7 +3227,7 @@ drop view v1; drop table t1; drop database mysqldump_test_db; # -# Bug21014 Segmentation fault of mysqldump on view +# Bug#21014 Segmentation fault of mysqldump on view # create database mysqldump_tables; use mysqldump_tables; @@ -3265,7 +3267,7 @@ drop database mysqldump_views; drop table mysqldump_tables.basetable; drop database mysqldump_tables; # -# Bug20221 Dumping of multiple databases containing view(s) yields maleformed dumps +# Bug#20221 Dumping of multiple databases containing view(s) yields maleformed dumps # create database mysqldump_dba; use mysqldump_dba; @@ -3322,10 +3324,10 @@ SET character_set_client = @saved_cs_client; drop table t1; drop user mysqltest_1@localhost; # -# Bug #21527 mysqldump incorrectly tries to LOCK TABLES on the -# information_schema database. +# Bug#21527 mysqldump incorrectly tries to LOCK TABLES on the +# information_schema database. # -# Bug #21424 mysqldump failing to export/import views +# Bug#21424 mysqldump failing to export/import views # create database mysqldump_myDB; use mysqldump_myDB; @@ -3345,8 +3347,8 @@ revoke all privileges on mysqldump_myDB.* from myDB_User@localhost; drop user myDB_User@localhost; drop database mysqldump_myDB; flush privileges; -# Bug #21424 continues from here. -# Restore. Flush Privileges test ends. +# Bug#21424 continues from here. +# Restore. Flush Privileges test ends. # use mysqldump_myDB; select * from mysqldump_myDB.v1; @@ -3364,7 +3366,7 @@ drop user myDB_User@localhost; drop database mysqldump_myDB; use test; # -# Bug #19745: mysqldump --xml produces invalid xml +# Bug#19745 mysqldump --xml produces invalid xml # DROP TABLE IF EXISTS t1; CREATE TABLE t1 (f1 int(10), data MEDIUMBLOB); @@ -3386,15 +3388,15 @@ INSERT INTO t1 VALUES(1,0xff00fef0); </mysqldump> DROP TABLE t1; # -# Bug#26346: stack + buffer overrun in mysqldump +# Bug#26346 stack + buffer overrun in mysqldump # CREATE TABLE t1(a int); INSERT INTO t1 V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REATE TABLE t3 (a int); -CREATE TABLE t1 (a int) ENGINE=merge UNION=(t2, t3); +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 */; @@ -3449,7 +3451,7 @@ UNLOCK TABLES; DROP TABLE t1, t2, t3; # -# Bug #23491: MySQLDump prefix function call in a view by database name +# Bug#23491 MySQLDump prefix function call in a view by database name # create database bug23491_original; create database bug23491_restore; @@ -3471,12 +3473,12 @@ v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VI drop database bug23491_original; drop database bug23491_restore; use test; -# -# Bug 27293: mysqldump crashes when dumping routines -# defined by a different user # -# Bug #22761: mysqldump reports no errors when using -# --routines without mysql.proc privileges +# Bug#27293 mysqldump crashes when dumping routines +# defined by a different user +# +# Bug#22761 mysqldump reports no errors when using +# --routines without mysql.proc privileges # create database mysqldump_test_db; grant all privileges on mysqldump_test_db.* to user1; @@ -3503,7 +3505,7 @@ drop user user1; drop user user2; drop database mysqldump_test_db; # -# Bug #28522: buffer overrun by '\0' byte using --hex-blob. +# Bug#28522 buffer overrun by '\0' byte using --hex-blob. # CREATE TABLE t1 (c1 INT, c2 LONGBLOB); INSERT INTO t1 SET c1=11, c2=REPEAT('q',509); @@ -3517,8 +3519,8 @@ SET character_set_client = @saved_cs_client; INSERT INTO `t1` VALUES (11,0x7171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171); DROP TABLE t1; # -# Bug #28524: mysqldump --skip-add-drop-table is not -# compatible with views +# Bug#28524 mysqldump --skip-add-drop-table is not +# compatible with views # CREATE VIEW v1 AS SELECT 1; DROP VIEW v1; @@ -3527,8 +3529,8 @@ SELECT * FROM v1; 1 DROP VIEW v1; # -# Bug #29788: mysqldump discards the NO_AUTO_VALUE_ON_ZERO value of -# the SQL_MODE variable after the dumping of triggers. +# Bug#29788 mysqldump discards the NO_AUTO_VALUE_ON_ZERO value of +# the SQL_MODE variable after the dumping of triggers. # CREATE TABLE t1 (c1 INT); CREATE TRIGGER t1bd BEFORE DELETE ON t1 FOR EACH ROW BEGIN END; @@ -3549,8 +3551,8 @@ c1 2 DROP TABLE t1,t2; # -# Bug#29815: new option for suppressing last line of mysqldump: -# "Dump completed on" +# Bug#29815 new option for suppressing last line of mysqldump: +# "Dump completed on" # # --skip-dump-date: -- diff --git a/mysql-test/r/outfile.result b/mysql-test/r/outfile.result index 8503df545d2d0bfc67d5c8aa9e6e8a51ca23d5ca..e8c62098f95925a2ad465b451b4f275b67f9dc5a 100644 GIT binary patch delta 12 TcmcaEa7|!C8T00H<_9bQBd`Ss delta 14 Vcmca6a9v<S88f58<}&67EC4EB1t<Uj diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test index e2d92ee58d4..8f83c365170 100644 --- a/mysql-test/t/grant2.test +++ b/mysql-test/t/grant2.test @@ -1,6 +1,10 @@ # Grant tests not performed with embedded server -- source include/not_embedded.inc +# Save the initial number of concurrent sessions +--source include/count_sessions.inc + + SET NAMES binary; # @@ -27,7 +31,7 @@ create user mysqltest_2@localhost; connect (user_a,localhost,mysqltest_1,,); connection user_a; grant select on `my\_1`.* to mysqltest_2@localhost; ---error 1132 +--error ER_PASSWORD_NOT_ALLOWED grant select on `my\_1`.* to mysqltest_2@localhost identified by 'pass'; disconnect user_a; connection default; @@ -61,7 +65,7 @@ connect (user1,localhost,mysqltest_1,,); connection user1; select current_user(); grant all privileges on `my\_1`.* to mysqltest_2@localhost with grant option; ---error 1044 +--error ER_DBACCESS_DENIED_ERROR grant all privileges on `my_%`.* to mysqltest_3@localhost with grant option; # @@ -72,7 +76,7 @@ select @@sql_mode; # # GRANT without IDENTIFIED BY does not create new users # ---error 1133 +--error ER_PASSWORD_NO_MATCH grant select on `my\_1`.* to mysqltest_4@localhost with grant option; grant select on `my\_1`.* to mysqltest_4@localhost identified by 'mypass' with grant option; @@ -80,7 +84,7 @@ disconnect user1; connection default; show grants for mysqltest_1@localhost; show grants for mysqltest_2@localhost; ---error 1141 +--error ER_NONEXISTING_GRANT show grants for mysqltest_3@localhost; delete from mysql.user where user like 'mysqltest\_%'; delete from mysql.db where user like 'mysqltest\_%'; @@ -95,7 +99,7 @@ connect (user2,localhost,mysqltest_1,,); connection user2; select current_user(); show databases; ---error 1044 +--error ER_DBACCESS_DENIED_ERROR grant all privileges on `mysqltest_1`.* to mysqltest_1@localhost with grant option; disconnect user2; connection default; @@ -106,8 +110,8 @@ drop database mysqltest_1; flush privileges; # -# Bug #6173: One can circumvent missing UPDATE privilege if he has SELECT -# and INSERT privilege for table with primary key +# Bug#6173 One can circumvent missing UPDATE privilege if he has SELECT and +# INSERT privilege for table with primary key # create database mysqltest; grant INSERT, SELECT on mysqltest.* to mysqltest_1@localhost; @@ -119,10 +123,10 @@ connect (mrbad, localhost, mysqltest_1,,mysqltest); connection mrbad; show grants for current_user(); insert into t1 values (1, 'I can''t change it!'); ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR update t1 set data='I can change it!' where id = 1; # This should not be allowed since it too require UPDATE privilege. ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR insert into t1 values (1, 'XXX') on duplicate key update data= 'I can change it!'; select * from t1; disconnect mrbad; @@ -138,9 +142,9 @@ create table t1 (a int, b int); grant select (a) on t1 to mysqltest_1@localhost with grant option; connect (mrugly, localhost, mysqltest_1,,mysqltest); connection mrugly; ---error 1143 +--error ER_COLUMNACCESS_DENIED_ERROR grant select (a,b) on t1 to mysqltest_2@localhost; ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR grant select on t1 to mysqltest_3@localhost; disconnect mrugly; @@ -157,7 +161,7 @@ use test; # -# Bug #15775: "drop user" command does not refresh acl_check_hosts +# Bug#15775 "drop user" command does not refresh acl_check_hosts # # Create some test users @@ -188,15 +192,15 @@ disconnect con9; connection default; # -# Bug# 16180 - Setting SQL_LOG_OFF without SUPER privilege is silently ignored +# Bug#16180 Setting SQL_LOG_OFF without SUPER privilege is silently ignored # create database mysqltest_1; grant select, insert, update on `mysqltest\_1`.* to mysqltest_1@localhost; connect (con10,localhost,mysqltest_1,,); connection con10; ---error 1227 +--error ER_SPECIFIC_ACCESS_DENIED_ERROR set sql_log_off = 1; ---error 1227 +--error ER_SPECIFIC_ACCESS_DENIED_ERROR set sql_log_bin = 0; disconnect con10; connection default; @@ -217,7 +221,7 @@ create table t2(c1 int, c2 int); # # Three forms of CREATE USER create user 'mysqltest_1'; ---error 1396 +--error ER_CANNOT_USER create user 'mysqltest_1'; create user 'mysqltest_2' identified by 'Mysqltest-2'; create user 'mysqltest_3' identified by password 'fffffffffffffffffffffffffffffffffffffffff'; @@ -238,7 +242,7 @@ select host,user,password from mysql.user where user like 'mysqltest_%' order by select host,db,user from mysql.db where user like 'mysqltest_%' order by host,db,user; select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest_%' order by host,db,user,table_name; select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name; ---error 1141 +--error ER_NONEXISTING_GRANT show grants for 'mysqltest_1'; # # Rename @@ -249,7 +253,7 @@ select host,db,user,table_name from mysql.tables_priv where user like 'mysqltest select host,db,user,table_name,column_name from mysql.columns_priv where user like 'mysqltest_%' order by host,db,user,table_name,column_name; show grants for 'mysqltest_1'; drop user 'mysqltest_1', 'mysqltest_3'; ---error 1396 +--error ER_CANNOT_USER drop user 'mysqltest_1'; # # Cleanup @@ -258,9 +262,9 @@ drop table t1, t2; # Add a stray record insert into mysql.db set user='mysqltest_1', db='%', host='%'; flush privileges; ---error 1141 +--error ER_NONEXISTING_GRANT show grants for 'mysqltest_1'; ---error 1269 +--error ER_REVOKE_GRANTS revoke all privileges, grant option from 'mysqltest_1'; drop user 'mysqltest_1'; select host,db,user from mysql.db where user = 'mysqltest_1' order by host,db,user; @@ -268,7 +272,7 @@ select host,db,user from mysql.db where user = 'mysqltest_1' order by host,db,us # Add a stray record insert into mysql.tables_priv set host='%', db='test', user='mysqltest_1', table_name='t1'; flush privileges; ---error 1141 +--error ER_NONEXISTING_GRANT show grants for 'mysqltest_1'; drop user 'mysqltest_1'; select host,db,user,table_name from mysql.tables_priv where user = 'mysqltest_1' order by host,db,user,table_name; @@ -276,7 +280,7 @@ select host,db,user,table_name from mysql.tables_priv where user = 'mysqltest_1' # Add a stray record insert into mysql.columns_priv set host='%', db='test', user='mysqltest_1', table_name='t1', column_name='c1'; flush privileges; ---error 1141 +--error ER_NONEXISTING_GRANT show grants for 'mysqltest_1'; drop user 'mysqltest_1'; select host,db,user,table_name,column_name from mysql.columns_priv where user = 'mysqltest_1' order by host,db,user,table_name,column_name; @@ -286,23 +290,23 @@ create user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3'; drop user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3'; create user 'mysqltest_1', 'mysqltest_2' identified by 'Mysqltest-2', 'mysqltest_3' identified by password 'fffffffffffffffffffffffffffffffffffffffff'; rename user 'mysqltest_1' to 'mysqltest_1a', 'mysqltest_2' TO 'mysqltest_2a', 'mysqltest_3' TO 'mysqltest_3a'; ---error 1396 +--error ER_CANNOT_USER drop user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3'; drop user 'mysqltest_1a', 'mysqltest_2a', 'mysqltest_3a'; # # Let one of multiple users fail create user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3'; ---error 1396 +--error ER_CANNOT_USER create user 'mysqltest_1a', 'mysqltest_2', 'mysqltest_3a'; ---error 1396 +--error ER_CANNOT_USER rename user 'mysqltest_1a' to 'mysqltest_1b', 'mysqltest_2a' TO 'mysqltest_2b', 'mysqltest_3a' TO 'mysqltest_3b'; drop user 'mysqltest_1', 'mysqltest_2', 'mysqltest_3'; ---error 1396 +--error ER_CANNOT_USER drop user 'mysqltest_1b', 'mysqltest_2b', 'mysqltest_3b'; # # Obsolete syntax has been dropped create user 'mysqltest_2' identified by 'Mysqltest-2'; ---error 1064 +--error ER_PARSE_ERROR drop user 'mysqltest_2' identified by 'Mysqltest-2'; drop user 'mysqltest_2'; # @@ -312,7 +316,7 @@ show grants for '%@b'@'b'; grant select on mysql.* to '%@b'@'b'; show grants for '%@b'@'b'; rename user '%@b'@'b' to '%@a'@'a'; ---error 1141 +--error ER_NONEXISTING_GRANT show grants for '%@b'@'b'; show grants for '%@a'@'a'; drop user '%@a'@'a'; @@ -323,7 +327,7 @@ create user mysqltest_2@localhost; grant create user on *.* to mysqltest_2@localhost; connect (user3,localhost,mysqltest_2,,); connection user3; ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; create user mysqltest_A@'%'; rename user mysqltest_A@'%' to mysqltest_B@'%'; @@ -338,7 +342,7 @@ grant INSERT,DELETE,UPDATE on mysql.* to mysqltest_3@localhost; connect (user4,localhost,mysqltest_3,,); connection user4; show grants; ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR select host,user,password from mysql.user where user like 'mysqltest_%' order by host,user,password; insert into mysql.user set host='%', user='mysqltest_B'; create user mysqltest_A@'%'; @@ -349,7 +353,7 @@ disconnect user4; connection default; drop user mysqltest_3@localhost; # -# Bug #3309: Test IP addresses with netmask +# Bug#3309 Test IP addresses with netmask set @@sql_mode=''; create database mysqltest_1; create table mysqltest_1.t1 (i int); @@ -367,7 +371,8 @@ flush privileges; drop table mysqltest_1.t1; # -# Bug #12302: 'SET PASSWORD = ...' didn't work if connecting hostname != +# Bug#12302 Hostname resolution preventing password changes +# 'SET PASSWORD = ...' didn't work if connecting hostname != # hostname the current user is authenticated as. Note that a test for this # was also added to the test above. # @@ -400,7 +405,7 @@ drop database mysqltest_1; # But anonymous users can't change their password connect (n5,localhost,test,,test,$MASTER_MYPORT,$MASTER_MYSOCK); connection n5; ---error 1044 +--error ER_DBACCESS_DENIED_ERROR set password = password("changed"); disconnect n5; connection default; @@ -408,7 +413,7 @@ connection default; --source include/delete_anonymous_users.inc -# Bug #12423 "Deadlock when doing FLUSH PRIVILEGES and GRANT in +# Bug#12423 "Deadlock when doing FLUSH PRIVILEGES and GRANT in # multi-threaded environment". We should be able to execute FLUSH # PRIVILEGES and SET PASSWORD simultaneously with other account # management commands (such as GRANT and REVOKE) without causing @@ -474,12 +479,13 @@ connect (con1,localhost,mysqltest_1,password,TESTDB); # The user mysqltest_1 should only be allowed access to # database TESTDB, not TEStdb -# On system with "lowercase names" we get error "1007: Can't create db..." ---error 1044, 1007 +# On system with "lowercase names" we get error "ER_DB_CREATE_EXISTS: Can't create db..." +--error ER_DBACCESS_DENIED_ERROR, ER_DB_CREATE_EXISTS create database TEStdb; # Clean-up connection default; +disconnect con1; delete from mysql.user; delete from mysql.db where host='%' and user='mysqltest_1' and db='TESTDB'; insert into mysql.user select * from t1; @@ -488,35 +494,34 @@ drop database TESTDB; flush privileges; # -# BUG#13310 incorrect user parsing by SP +# Bug#13310 incorrect user parsing by SP # -grant all privileges on test.* to `a@`@localhost; -grant execute on * to `a@`@localhost; +GRANT ALL PRIVILEGES ON test.* TO `a@`@localhost; +GRANT EXECUTE ON * TO `a@`@localhost; connect (bug13310,localhost,'a@',,test); connection bug13310; -create table t2 (s1 int); -insert into t2 values (1); +CREATE TABLE t2 (s1 INT); +INSERT INTO t2 VALUES (1); --disable_warnings -drop function if exists f2; +DROP FUNCTION IF EXISTS f2; --enable_warnings delimiter //; -create function f2 () returns int begin declare v int; select s1 from t2 -into v; return v; end// +CREATE FUNCTION f2 () RETURNS INT +BEGIN DECLARE v INT; SELECT s1 FROM t2 INTO v; RETURN v; END// delimiter ;// -select f2(); +SELECT f2(); -drop function f2; -drop table t2; +DROP FUNCTION f2; +DROP TABLE t2; disconnect bug13310; - connection default; REVOKE ALL PRIVILEGES, GRANT OPTION FROM `a@`@localhost; -drop user `a@`@localhost; +DROP USER `a@`@localhost; # -# Bug#25578 "CREATE TABLE LIKE does not require any privileges on source table" +# Bug#25578 CREATE TABLE LIKE does not require any privileges on source table # --disable_warnings drop database if exists mysqltest_1; @@ -535,7 +540,7 @@ create table t1 (i int); connect (user1,localhost,mysqltest_u1,,mysqltest_1); connection user1; # As expected error is emitted ---error ER_TABLEACCESS_DENIED_ERROR +--error ER_TABLEACCESS_DENIED_ERROR show create table mysqltest_2.t1; # This should emit error as well --error ER_TABLEACCESS_DENIED_ERROR @@ -550,14 +555,16 @@ create table t1 like mysqltest_2.t1; # Clean-up connection default; +disconnect user1; use test; drop database mysqltest_1; drop database mysqltest_2; drop user mysqltest_u1@localhost; + # # Bug#18660 Can't grant any privileges on single table in database -# with underscore char +# with underscore char # grant all on `mysqltest\_%`.* to mysqltest_1@localhost with grant option; grant usage on *.* to mysqltest_2@localhost; @@ -571,7 +578,7 @@ grant create on `mysqltest\_1`.* to mysqltest_2@localhost; grant select on mysqltest_1.t1 to mysqltest_2@localhost; connect (con3,localhost,mysqltest_2,,); connection con3; ---error 1044 +--error ER_DBACCESS_DENIED_ERROR create database mysqltest_3; use mysqltest_1; create table t2(f1 int); @@ -579,6 +586,9 @@ select * from t1; connection default; drop database mysqltest_1; +connection default; +disconnect con3; +disconnect con18600_1; revoke all privileges, grant option from mysqltest_1@localhost; revoke all privileges, grant option from mysqltest_2@localhost; drop user mysqltest_1@localhost; @@ -586,7 +596,7 @@ drop user mysqltest_2@localhost; # -# Bug #30468: column level privileges not respected when joining tables +# Bug#30468 column level privileges not respected when joining tables # CREATE DATABASE db1; @@ -597,7 +607,7 @@ INSERT INTO t1 VALUES (1,1),(2,2); CREATE TABLE t2 (b INT, c INT); INSERT INTO t2 VALUES (1,100),(2,200); -GRANT SELECT ON t1 TO mysqltest1@localhost; +GRANT SELECT ON t1 TO mysqltest1@localhost; GRANT SELECT (b) ON t2 TO mysqltest1@localhost; connect (conn1,localhost,mysqltest1,,); @@ -612,6 +622,7 @@ SELECT * FROM t1 JOIN t2 USING (b); connection default; disconnect conn1; +USE test; DROP TABLE db1.t1, db1.t2; DROP USER mysqltest1@localhost; DROP DATABASE db1; @@ -619,3 +630,5 @@ DROP DATABASE db1; --echo End of 5.0 tests +# Wait till we reached the initial number of concurrent sessions +--source include/wait_until_count_sessions.inc diff --git a/mysql-test/t/grant3.test b/mysql-test/t/grant3.test index 8eceb851c29..9a635048774 100644 --- a/mysql-test/t/grant3.test +++ b/mysql-test/t/grant3.test @@ -1,6 +1,10 @@ -# Can't run with embedded server +# Can't run with embedded server because we use GRANT -- source include/not_embedded.inc +# Save the initial number of concurrent sessions +--source include/count_sessions.inc + + # Test of GRANT commands SET NAMES binary; @@ -23,10 +27,11 @@ grant create user on *.* to mysqltest_1@localhost; grant select on `my\_1`.* to mysqltest_1@localhost with grant option; connect (user_a,localhost,mysqltest_1,,); connection user_a; ---error 1410 +--error ER_CANT_CREATE_USER_WITH_GRANT grant select on `my\_1`.* to mysqltest_2@localhost; create user mysqltest_2@localhost; disconnect user_a; +disconnect master; connection default; delete from mysql.user where user like 'mysqltest\_%'; @@ -36,7 +41,7 @@ delete from mysql.columns_priv where user like 'mysqltest\_%'; flush privileges; # -# Bug: #19828 Case sensitivity in Grant/Revoke +# Bug#19828 Case sensitivity in Grant/Revoke # grant select on test.* to CUser@localhost; @@ -137,7 +142,7 @@ DROP USER CUser2@LOCALHOST; # -# Bug#31194: Privilege ordering does not order properly for wildcard values +# Bug#31194 Privilege ordering does not order properly for wildcard values # CREATE DATABASE mysqltest_1; @@ -160,3 +165,6 @@ DROP DATABASE mysqltest_1; --echo End of 5.0 tests + +# Wait till we reached the initial number of concurrent sessions +--source include/wait_until_count_sessions.inc diff --git a/mysql-test/t/lock_tables_lost_commit.test b/mysql-test/t/lock_tables_lost_commit.test index d31b4b7dfb5..754c8f3c378 100644 --- a/mysql-test/t/lock_tables_lost_commit.test +++ b/mysql-test/t/lock_tables_lost_commit.test @@ -1,24 +1,33 @@ -# This is a test for bug 578 +# Test for Bug#578 mysqlimport -l silently fails when binlog-ignore-db is set --- source include/have_innodb.inc +--source include/have_innodb.inc + +# Save the initial number of concurrent sessions +--source include/count_sessions.inc connect (con1,localhost,root,,); connect (con2,localhost,root,,); connection con1; --disable_warnings -drop table if exists t1; -create table t1(a int) engine=innodb; +DROP TABLE IF EXISTS t1; +CREATE TABLE t1(a INT) ENGINE=innodb; --enable_warnings -lock tables t1 write; -insert into t1 values(10); +LOCK TABLES t1 WRITE; +INSERT INTO t1 VALUES(10); disconnect con1; connection con2; # The bug was that, because of the LOCK TABLES, the handler "forgot" to commit, # and the other commit when we write to the binlog was not done because of -# binlog-ignore-db -select * from t1; -drop table t1; +# binlog-ignore-db +SELECT * FROM t1; +DROP TABLE t1; + +connection default; +disconnect con2; # End of 4.1 tests + +# Wait till we reached the initial number of concurrent sessions +--source include/wait_until_count_sessions.inc diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index 2f11685385f..5cd9c17e2ac 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -5,10 +5,13 @@ # Binlog is required --source include/have_log_bin.inc +# Save the initial number of concurrent sessions +--source include/count_sessions.inc ---echo Bug#37938 - Test "mysqldump" lacks various insert statements ---echo Turn off concurrent inserts to avoid random errors ---echo NOTE: We reset the variable back to saved value at the end of test + +--echo # Bug#37938 Test "mysqldump" lacks various insert statements +--echo # Turn off concurrent inserts to avoid random errors +--echo # NOTE: We reset the variable back to saved value at the end of test SET @OLD_CONCURRENT_INSERT = @@GLOBAL.CONCURRENT_INSERT; SET @@GLOBAL.CONCURRENT_INSERT = 0; @@ -23,13 +26,13 @@ drop view if exists v1, v2, v3; # XML output -CREATE TABLE t1(a int); +CREATE TABLE t1(a INT); INSERT INTO t1 VALUES (1), (2); --exec $MYSQL_DUMP --skip-create --skip-comments -X test t1 DROP TABLE t1; --echo # ---echo # Bug #2005 +--echo # Bug#2005 Long decimal comparison bug. --echo # CREATE TABLE t1 (a decimal(64, 20)); @@ -39,7 +42,7 @@ INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"), DROP TABLE t1; --echo # ---echo # Bug #2055 +--echo # Bug#2055 mysqldump should replace "-inf" numeric field values with "NULL" --echo # CREATE TABLE t1 (a double); @@ -51,7 +54,7 @@ INSERT INTO t1 VALUES ('-9e999999'); DROP TABLE t1; --echo # ---echo # Bug #3361 mysqldump quotes DECIMAL values inconsistently +--echo # Bug#3361 mysqldump quotes DECIMAL values inconsistently --echo # CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT); @@ -65,7 +68,7 @@ INSERT INTO t1 VALUES ("1.2345", 2.3456); SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ANSI_QUOTES'; INSERT INTO t1 VALUES (1.2345, 2.3456); INSERT INTO t1 VALUES ('1.2345', 2.3456); ---error 1054 +--error ER_BAD_FIELD_ERROR INSERT INTO t1 VALUES ("1.2345", 2.3456); SET SQL_MODE=@OLD_SQL_MODE; @@ -82,7 +85,7 @@ INSERT INTO t1 VALUES (1, "test", "tes"), (2, "TEST", "TES"); DROP TABLE t1; --echo # ---echo # Bug #1707 +--echo # Bug#1707 mysqldump -X does't quote field and table names --echo # CREATE TABLE t1 (`a"b"` char(2)); @@ -91,8 +94,8 @@ INSERT INTO t1 VALUES ("1\""), ("\"2"); DROP TABLE t1; --echo # ---echo # Bug #1994 ---echo # Bug #4261 +--echo # Bug#1994 mysqldump does not correctly dump UCS2 data +--echo # Bug#4261 mysqldump 10.7 (mysql 4.1.2) --skip-extended-insert drops NULL from inserts --echo # CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r; @@ -101,7 +104,7 @@ INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL); DROP TABLE t1; --echo # ---echo # Bug #2634 +--echo # Bug#2634 mysqldump in --compatible=mysql4 --echo # CREATE TABLE t1 (a int) ENGINE=MYISAM; @@ -111,7 +114,7 @@ INSERT INTO t1 VALUES (1), (2); DROP TABLE t1; --echo # ---echo # Bug #2592 'mysqldump doesn't quote "tricky" names correctly' +--echo # Bug#2592 mysqldump doesn't quote "tricky" names correctly --echo # create table ```a` (i int); @@ -119,7 +122,7 @@ create table ```a` (i int); drop table ```a`; --echo # ---echo # Bug #2591 "mysqldump quotes names inconsistently" +--echo # Bug#2591 mysqldump quotes names inconsistently --echo # create table t1(a int); @@ -132,7 +135,7 @@ set global sql_mode=''; drop table t1; --echo # ---echo # Bug #2705 'mysqldump --tab extra output' +--echo # Bug#2705 mysqldump --tab extra output --echo # create table t1(a int); @@ -148,7 +151,7 @@ insert into t1 values (1),(2),(3); drop table t1; --echo # ---echo # Bug #6101: create database problem +--echo # Bug#6101 create database problem --echo # --exec $MYSQL_DUMP --skip-comments --databases test @@ -158,7 +161,7 @@ create database mysqldump_test_db character set latin2 collate latin2_bin; drop database mysqldump_test_db; --echo # ---echo # Bug #7020 +--echo # Bug#7020 mysqldump --compatible=mysql40 should set --skip-set-charset --default-char... --echo # Check that we don't dump in UTF8 in compatible mode by default, --echo # but use the default compiled values, or the values given in --echo # --default-character-set=xxx. However, we should dump in UTF8 @@ -169,8 +172,8 @@ INSERT INTO t1 VALUES (_latin1 ' --exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --skip-comments test t1 --echo # ---echo # Bug#8063: make test mysqldump [ fail ] ---echo # We cannot tes this command because its output depends +--echo # Bug#8063 make test mysqldump [ fail ] +--echo # We cannot test this command because its output depends --echo # on --default-character-set incompiled into "mysqldump" program. --echo # If the future we can move this command into a separate test with --echo # checking that "mysqldump" is compiled with "latin1" @@ -183,7 +186,7 @@ INSERT INTO t1 VALUES (_latin1 ' DROP TABLE t1; --echo # ---echo # WL #2319: Exclude Tables from dump +--echo # WL#2319 Exclude Tables from dump --echo # CREATE TABLE t1 (a int); @@ -195,7 +198,7 @@ DROP TABLE t1; DROP TABLE t2; --echo # ---echo # Bug #8830 +--echo # Bug#8830 mysqldump --skip-extended-insert causes --hex-blob to dump wrong values --echo # CREATE TABLE t1 (`b` blob); @@ -207,7 +210,7 @@ DROP TABLE t1; --echo # Test for --insert-ignore --echo # -CREATE TABLE t1 (a int); +CREATE TABLE t1 (a INT); INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t1 VALUES (4),(5),(6); --exec $MYSQL_DUMP --skip-comments --insert-ignore test t1 @@ -215,9 +218,9 @@ INSERT INTO t1 VALUES (4),(5),(6); DROP TABLE t1; --echo # ---echo # Bug #10286: mysqldump -c crashes on table that has many fields with long ---echo # names ---echo # +--echo # Bug#10286 mysqldump -c crashes on table that has many fields with long +--echo # names +--echo # create table t1 ( F_c4ca4238a0b923820dcc509a6f75849b int, F_c81e728d9d4c2f636f067f89cc14862c int, @@ -563,7 +566,7 @@ INSERT INTO t1 VALUES (1),(2),(3); DROP TABLE t1; --echo # ---echo # Bug #9558 mysqldump --no-data db t1 t2 format still dumps data +--echo # Bug#9558 mysqldump --no-data db t1 t2 format still dumps data --echo # CREATE DATABASE mysqldump_test_db; @@ -582,7 +585,7 @@ DROP DATABASE mysqldump_test_db; --echo # --echo # Testing with tables and databases that don't exists --echo # or contains illegal characters ---echo # (Bug #9358 mysqldump crashes if tablename starts with \) +--echo # (Bug#9358 mysqldump crashes if tablename starts with \) --echo # create database mysqldump_test_db; use mysqldump_test_db; @@ -601,7 +604,7 @@ select '------ Testing with illegal table names ------' as test_sequence ; --error 6 --exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\\t1" 2>&1 - + --error 6 --exec $MYSQL_DUMP --compact --skip-comments mysqldump_test_db "\\\\t1" 2>&1 @@ -644,7 +647,7 @@ use test; --echo # ---echo # Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly +--echo # Bug#9657 mysqldump xml ( -x ) does not format NULL fields correctly --echo # create table t1 (a int(10)); @@ -655,8 +658,9 @@ insert into t2 (a, b) values (NULL, NULL),(10, NULL),(NULL, "twenty"),(30, "thir --exec $MYSQL_DUMP --skip-comments --xml --no-create-info test drop table t1, t2; + --echo # ---echo # BUG #12123 +--echo # Bug#12123 mysqldump --tab results in text file which can't be imported --echo # create table t1 (a text character set utf8, b text character set latin1); @@ -669,14 +673,15 @@ select * from t1; drop table t1; + --echo # ---echo # BUG#15328 Segmentation fault occured if my.cnf is invalid for escape sequence +--echo # Bug#15328 Segmentation fault occured if my.cnf is invalid for escape sequence --echo # --exec $MYSQL_MY_PRINT_DEFAULTS --config-file=$MYSQL_TEST_DIR/std_data/bug15328.cnf mysqldump --echo # ---echo # BUG #19025 mysqldump doesn't correctly dump "auto_increment = [int]" +--echo # Bug#19025 mysqldump doesn't correctly dump "auto_increment = [int]" --echo # create table `t1` ( @@ -704,9 +709,11 @@ select * from t1; show create table `t1`; drop table `t1`; +--remove_file $MYSQLTEST_VARDIR/tmp/bug19025.sql + --echo # ---echo # Bug #18536: wrong table order +--echo # Bug#18536 wrong table order --echo # create table t1(a int); @@ -716,8 +723,9 @@ create table t3(a int); --exec $MYSQL_DUMP --skip-comments --force --no-data test t3 t1 non_existing t2 drop table t1, t2, t3; + --echo # ---echo # Bug #21288: mysqldump segmentation fault when using --where +--echo # Bug#21288 mysqldump segmentation fault when using --where --echo # create table t1 (a int); @@ -725,8 +733,9 @@ create table t1 (a int); --exec $MYSQL_DUMP --skip-comments --force test t1 --where="xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 2>&1 drop table t1; + --echo # ---echo # BUG#13926: --order-by-primary fails if PKEY contains quote character +--echo # Bug#13926 --order-by-primary fails if PKEY contains quote character --echo # --disable_warnings @@ -746,8 +755,9 @@ DROP TABLE `t1`; --echo End of 4.1 tests + --echo # ---echo # Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X) +--echo # Bug#10213 mysqldump crashes when dumping VIEWs(on MacOS X) --echo # create database db1; @@ -770,8 +780,9 @@ drop view v2; drop database db1; use test; + --echo # ---echo # Bug 10713 mysqldump includes database in create view and referenced tables +--echo # Bug#10713 mysqldump includes database in create view and referenced tables --echo # # create table and views in db2 @@ -805,18 +816,21 @@ select * from t2 order by a; drop table t1, t2; drop database db1; use test; +--remove_file $MYSQLTEST_VARDIR/tmp/bug10713.sql # # dump of view # + create table t1(a int); create view v1 as select * from t1; --exec $MYSQL_DUMP --skip-comments test drop view v1; drop table t1; + --echo # ---echo # Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X) +--echo # Bug#10213 mysqldump crashes when dumping VIEWs(on MacOS X) --echo # create database mysqldump_test_db; @@ -840,7 +854,7 @@ drop database mysqldump_test_db; use test; --echo # ---echo # Bug #9756 +--echo # Bug#9756 mysql client failing on dumps containing certain \ sequences --echo # CREATE TABLE t1 (a char(10)); @@ -849,7 +863,7 @@ INSERT INTO t1 VALUES ('\''); DROP TABLE t1; --echo # ---echo # Bug #10927 mysqldump: Can't reload dump with view that consist of other view +--echo # Bug#10927 mysqldump: Can't reload dump with view that consist of other view --echo # create table t1(a int, b int, c varchar(30)); @@ -921,7 +935,9 @@ show triggers; DROP TABLE t1, t2; --echo # ---echo # Bugs #9136, #12917: problems with --defaults-extra-file option +--echo # Bug#9136 my_print_defaults changed behaviour between 4.1.7 and 4.1.10a +--echo # Bug#12917 The --defaults-extra-file option is ignored by the 5.0 client binaries +--echo # (Problems with --defaults-extra-file option) --echo # --write_file $MYSQLTEST_VARDIR/tmp/tmp.cnf @@ -933,7 +949,7 @@ EOF --remove_file $MYSQLTEST_VARDIR/tmp/tmp.cnf --echo # ---echo # Test of fix to BUG 12597 +--echo # Test of fix to Bug#12597 mysqldump dumps triggers wrongly --echo # DROP TABLE IF EXISTS `test1`; @@ -969,9 +985,11 @@ SELECT * FROM `test2`; DROP TRIGGER testref; DROP TABLE test1; DROP TABLE test2; +--remove_file $MYSQLTEST_VARDIR/tmp/mysqldump.sql + --echo # ---echo # BUG#9056 - mysqldump does not dump routines +--echo # Bug#9056 mysqldump does not dump routines --echo # --disable_warnings @@ -997,9 +1015,9 @@ begin return f1; end // -CREATE PROCEDURE bug9056_proc2(OUT a INT) -BEGIN - select sum(id) from t1 into a; +CREATE PROCEDURE bug9056_proc2(OUT a INT) +BEGIN + select sum(id) from t1 into a; END // DELIMITER ;// @@ -1008,7 +1026,7 @@ set sql_mode='ansi'; create procedure `a'b` () select 1; # to fix syntax highlighting :') set sql_mode=''; -# Dump the DB and ROUTINES +# Dump the DB and ROUTINES --exec $MYSQL_DUMP --skip-comments --routines --databases test # ok, now blow it all away @@ -1019,8 +1037,9 @@ DROP PROCEDURE bug9056_proc2; DROP PROCEDURE `a'b`; drop table t1; + --echo # ---echo # BUG# 13052 - mysqldump timestamp reloads broken +--echo # Bug#13052 mysqldump timestamp reloads broken --echo # --disable_warnings @@ -1043,7 +1062,7 @@ set global time_zone=default; set time_zone=default; --echo # ---echo # Test of fix to BUG 13146 - ansi quotes break loading of triggers +--echo # Test of fix to Bug#13146 ansi quotes break loading of triggers --echo # --disable_warnings @@ -1068,7 +1087,7 @@ INSERT INTO `t1 test` VALUES (1); INSERT INTO `t1 test` VALUES (2); INSERT INTO `t1 test` VALUES (3); SELECT * FROM `t2 test`; -# dump with compatible=ansi. Everything except triggers should be double +# dump with compatible=ansi. Everything except triggers should be double # quoted --exec $MYSQL_DUMP --skip-comments --compatible=ansi --triggers test @@ -1077,7 +1096,7 @@ DROP TABLE `t1 test`; DROP TABLE `t2 test`; --echo # ---echo # BUG# 12838 mysqldump -x with views exits with error +--echo # Bug#12838 mysqldump -x with views exits with error --echo # --disable_warnings @@ -1101,7 +1120,7 @@ drop view v1; drop table t1; --echo # ---echo # BUG#14554 - mysqldump does not separate words "ROW" and "BEGIN" +--echo # Bug#14554 mysqldump does not separate words "ROW" and "BEGIN" --echo # for tables with trigger created in the IGNORE_SPACE sql mode. --echo # @@ -1125,8 +1144,8 @@ DROP TRIGGER tr1; DROP TABLE t1; --echo # ---echo # Bug #13318: Bad result with empty field and --hex-blob ---echo # +--echo # Bug#13318 Bad result with empty field and --hex-blob +--echo # create table t1 (a binary(1), b blob); insert into t1 values ('',''); @@ -1135,7 +1154,7 @@ insert into t1 values ('',''); drop table t1; --echo # ---echo # Bug 14871 Invalid view dump output +--echo # Bug#14871 Invalid view dump output --echo # create table t1 (a int); @@ -1162,9 +1181,11 @@ select * from v3 order by a; drop table t1; drop view v1, v2, v3, v4, v5; +--remove_file $MYSQLTEST_VARDIR/tmp/bug14871.sql + --echo # ---echo # Bug #16878 dump of trigger +--echo # Bug#16878 dump of trigger --echo # create table t1 (a int, created datetime); @@ -1192,6 +1213,8 @@ show triggers; drop trigger tr1; drop trigger tr2; drop table t1, t2; +--remove_file $MYSQLTEST_VARDIR/tmp/bug16878.sql + --echo # --echo # Bug#18462 mysqldump does not dump view structures correctly @@ -1211,11 +1234,15 @@ create view v2 as select qty from v1; drop view v1; drop view v2; drop table t; +--remove_file $MYSQLTEST_VARDIR/tmp/v1.sql +--remove_file $MYSQLTEST_VARDIR/tmp/v2.sql +--remove_file $MYSQLTEST_VARDIR/tmp/t.sql +--remove_file $MYSQLTEST_VARDIR/tmp/t.txt --echo # --echo # Bug#14857 Reading dump files with single statement stored routines fails. ---echo # fixed by patch for bug#16878 +--echo # fixed by patch for Bug#16878 --echo # DELIMITER |; @@ -1230,7 +1257,7 @@ drop function f; drop procedure p; --echo # ---echo # Bug #17371 Unable to dump a schema with invalid views +--echo # Bug#17371 Unable to dump a schema with invalid views --echo # create table t1 ( id serial ); @@ -1243,7 +1270,8 @@ drop table t1; --echo } mysqldump drop view v1; ---echo # BUG#17201 Spurious 'DROP DATABASE' in output, + +--echo # Bug#17201 Spurious 'DROP DATABASE' in output, --echo # also confusion between tables and views. --echo # Example code from Markus Popp @@ -1260,8 +1288,9 @@ drop view v1; drop table t1; drop database mysqldump_test_db; + --echo # ---echo # Bug21014 Segmentation fault of mysqldump on view +--echo # Bug#21014 Segmentation fault of mysqldump on view --echo # create database mysqldump_tables; @@ -1280,7 +1309,7 @@ drop table mysqldump_tables.basetable; drop database mysqldump_tables; --echo # ---echo # Bug20221 Dumping of multiple databases containing view(s) yields maleformed dumps +--echo # Bug#20221 Dumping of multiple databases containing view(s) yields maleformed dumps --echo # create database mysqldump_dba; @@ -1318,6 +1347,7 @@ use mysqldump_dbb; drop view v1; drop table t1; drop database mysqldump_dbb; +--remove_file $MYSQLTEST_VARDIR/tmp/bug20221_backup use test; --echo # @@ -1363,11 +1393,12 @@ grant REPLICATION CLIENT on *.* to mysqltest_1@localhost; drop table t1; drop user mysqltest_1@localhost; + --echo # ---echo # Bug #21527 mysqldump incorrectly tries to LOCK TABLES on the ---echo # information_schema database. +--echo # Bug#21527 mysqldump incorrectly tries to LOCK TABLES on the +--echo # information_schema database. --echo # ---echo # Bug #21424 mysqldump failing to export/import views +--echo # Bug#21424 mysqldump failing to export/import views --echo # # Do as root @@ -1388,7 +1419,7 @@ create table u1 (f1 int); insert into u1 values (4); create view v1 (c1) as select * from t1; -# Backup should not fail for Bug #21527. Flush priviliges test begins. +# Backup should not fail for Bug#21527. Flush priviliges test begins. --exec $MYSQL_DUMP --skip-comments --add-drop-table --flush-privileges --ignore-table=mysql.general_log --ignore-table=mysql.slow_log --databases mysqldump_myDB mysql > $MYSQLTEST_VARDIR/tmp/bug21527.sql # Clean up @@ -1402,8 +1433,9 @@ drop user myDB_User@localhost; drop database mysqldump_myDB; flush privileges; ---echo # Bug #21424 continues from here. ---echo # Restore. Flush Privileges test ends. + +--echo # Bug#21424 continues from here. +--echo # Restore. Flush Privileges test ends. --echo # --exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21527.sql @@ -1416,8 +1448,9 @@ use mysqldump_myDB; select * from mysqldump_myDB.v1; select * from mysqldump_myDB.u1; -#Final cleanup. +# Final cleanup. connection root; +disconnect user1; use mysqldump_myDB; drop view v1; drop table t1; @@ -1425,10 +1458,14 @@ drop table u1; revoke all privileges on mysqldump_myDB.* from myDB_User@localhost; drop user myDB_User@localhost; drop database mysqldump_myDB; +connection default; +disconnect root; +--remove_file $MYSQLTEST_VARDIR/tmp/bug21527.sql use test; + --echo # ---echo # Bug #19745: mysqldump --xml produces invalid xml +--echo # Bug#19745 mysqldump --xml produces invalid xml --echo # --disable_warnings @@ -1443,9 +1480,8 @@ INSERT INTO t1 VALUES(1,0xff00fef0); DROP TABLE t1; - --echo # ---echo # Bug#26346: stack + buffer overrun in mysqldump +--echo # Bug#26346 stack + buffer overrun in mysqldump --echo # CREATE TABLE t1(a int); @@ -1466,18 +1502,20 @@ INSERT INTO t1 VALUES (1), (2); DROP TABLE t1; + # -# Bug #25993: crashe with a merge table and -c +# Bug#25993 crashes 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); +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 # Bug #23491: MySQLDump prefix function call in a view by database name +--echo # Bug#23491 MySQLDump prefix function call in a view by database name --echo # # Setup @@ -1507,15 +1545,16 @@ show create view bug23491_restore.v3; drop database bug23491_original; drop database bug23491_restore; use test; +--remove_file $MYSQLTEST_VARDIR/tmp/bug23491_backup.sql ---echo # ---echo # Bug 27293: mysqldump crashes when dumping routines ---echo # defined by a different user --echo # ---echo # Bug #22761: mysqldump reports no errors when using ---echo # --routines without mysql.proc privileges +--echo # Bug#27293 mysqldump crashes when dumping routines +--echo # defined by a different user +--echo # +--echo # Bug#22761 mysqldump reports no errors when using +--echo # --routines without mysql.proc privileges --echo # create database mysqldump_test_db; @@ -1536,13 +1575,14 @@ create procedure mysqldump_test_db.sp1() select 'hello'; drop procedure sp1; connection default; +disconnect user27293; drop user user1; drop user user2; drop database mysqldump_test_db; --echo # ---echo # Bug #28522: buffer overrun by '\0' byte using --hex-blob. +--echo # Bug#28522 buffer overrun by '\0' byte using --hex-blob. --echo # CREATE TABLE t1 (c1 INT, c2 LONGBLOB); @@ -1551,8 +1591,8 @@ INSERT INTO t1 SET c1=11, c2=REPEAT('q',509); DROP TABLE t1; --echo # ---echo # Bug #28524: mysqldump --skip-add-drop-table is not ---echo # compatible with views +--echo # Bug#28524 mysqldump --skip-add-drop-table is not +--echo # compatible with views --echo # CREATE VIEW v1 AS SELECT 1; @@ -1562,10 +1602,12 @@ DROP VIEW v1; --exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug28524.sql SELECT * FROM v1; DROP VIEW v1; +--remove_file $MYSQLTEST_VARDIR/tmp/bug28524.sql + --echo # ---echo # Bug #29788: mysqldump discards the NO_AUTO_VALUE_ON_ZERO value of ---echo # the SQL_MODE variable after the dumping of triggers. +--echo # Bug#29788 mysqldump discards the NO_AUTO_VALUE_ON_ZERO value of +--echo # the SQL_MODE variable after the dumping of triggers. --echo # CREATE TABLE t1 (c1 INT); @@ -1584,10 +1626,12 @@ SELECT * FROM t2; SELECT * FROM t2; DROP TABLE t1,t2; +--remove_file $MYSQLTEST_VARDIR/tmp/bug29788.sql + --echo # ---echo # Bug#29815: new option for suppressing last line of mysqldump: ---echo # "Dump completed on" +--echo # Bug#29815 new option for suppressing last line of mysqldump: +--echo # "Dump completed on" --echo # --echo # --skip-dump-date: @@ -1609,3 +1653,6 @@ SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT; --echo # --echo # End of 5.0 tests --echo # + +# Wait till we reached the initial number of concurrent sessions +--source include/wait_until_count_sessions.inc diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test index 14c14fca0c6..ad051503fd6 100644 --- a/mysql-test/t/openssl_1.test +++ b/mysql-test/t/openssl_1.test @@ -3,6 +3,10 @@ -- source include/have_ssl.inc +# Save the initial number of concurrent sessions +--source include/count_sessions.inc + + --disable_warnings drop table if exists t1; --enable_warnings @@ -21,38 +25,42 @@ connect (con2,localhost,ssl_user2,,,,,SSL); connect (con3,localhost,ssl_user3,,,,,SSL); connect (con4,localhost,ssl_user4,,,,,SSL); --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT ---error 1045 +--error ER_ACCESS_DENIED_ERROR connect (con5,localhost,ssl_user5,,,,,SSL); connection con1; # Check ssl turned on SHOW STATUS LIKE 'Ssl_cipher'; select * from t1; ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR delete from t1; connection con2; # Check ssl turned on SHOW STATUS LIKE 'Ssl_cipher'; select * from t1; ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR delete from t1; connection con3; # Check ssl turned on SHOW STATUS LIKE 'Ssl_cipher'; select * from t1; ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR delete from t1; connection con4; # Check ssl turned on SHOW STATUS LIKE 'Ssl_cipher'; select * from t1; ---error 1142 +--error ER_TABLEACCESS_DENIED_ERROR delete from t1; connection default; +disconnect con1; +disconnect con2; +disconnect con3; +disconnect con4; drop user ssl_user1@localhost, ssl_user2@localhost, ssl_user3@localhost, ssl_user4@localhost, ssl_user5@localhost; @@ -97,7 +105,7 @@ drop table t1; --exec $MYSQL_TEST --ssl-cert= --max-connect-retries=1 < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1 # -# BUG#21611 Slave can't connect when master-ssl-cipher specified +# Bug#21611 Slave can't connect when master-ssl-cipher specified # - Apparently selecting a cipher doesn't work at all # - Usa a cipher that both yaSSL and OpenSSL supports # @@ -133,7 +141,7 @@ drop table t1; --exec $MYSQL_TEST --ssl-cipher=UNKNOWN-CIPHER < $MYSQLTEST_VARDIR/tmp/test.sql 2>&1 # -# Bug #27669 mysqldump: SSL connection error when trying to connect +# Bug#27669 mysqldump: SSL connection error when trying to connect # CREATE TABLE t1(a int); @@ -152,3 +160,7 @@ INSERT INTO t1 VALUES (1), (2); --exec $MYSQL_DUMP --skip-create --skip-comments --ssl --ssl-cert=$MYSQL_TEST_DIR/std_data/client-cert.pem test 2>&1 DROP TABLE t1; +--remove_file $MYSQLTEST_VARDIR/tmp/test.sql + +# Wait till we reached the initial number of concurrent sessions +--source include/wait_until_count_sessions.inc diff --git a/mysql-test/t/outfile.test b/mysql-test/t/outfile.test index 527a4d398d8..4398f9fa741 100644 --- a/mysql-test/t/outfile.test +++ b/mysql-test/t/outfile.test @@ -5,6 +5,10 @@ eval set @tmpdir="../tmp"; enable_query_log; -- source include/have_outfile.inc +# Save the initial number of concurrent sessions +--source include/count_sessions.inc + + # # test of into outfile|dumpfile # @@ -46,7 +50,7 @@ select load_file(concat(@tmpdir,"/outfile-test.not-exist")); --remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.3 drop table t1; -# Bug#8191 +# Bug#8191 SELECT INTO OUTFILE insists on FROM clause disable_query_log; eval select 1 into outfile "../tmp/outfile-test.4"; enable_query_log; @@ -54,11 +58,11 @@ select load_file(concat(@tmpdir,"/outfile-test.4")); --remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4 # -# Bug #5382: 'explain select into outfile' crashes the server +# Bug#5382 'explain select into outfile' crashes the server # CREATE TABLE t1 (a INT); -EXPLAIN +EXPLAIN SELECT * INTO OUTFILE '/tmp/t1.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY '\r\n' @@ -68,7 +72,7 @@ DROP TABLE t1; # End of 4.1 tests # -# Bug#13202 SELECT * INTO OUTFILE ... FROM information_schema.schemata now fails +# Bug#13202 SELECT * INTO OUTFILE ... FROM information_schema.schemata now fails # disable_query_log; eval SELECT * INTO OUTFILE "../tmp/outfile-test.4" @@ -114,6 +118,7 @@ from information_schema.schemata where schema_name like 'mysqltest'; connection default; +disconnect con28181_1; grant file on *.* to user_1@localhost; connect (con28181_2,localhost,user_1,,mysqltest); @@ -125,9 +130,12 @@ from information_schema.schemata where schema_name like 'mysqltest'; connection default; +disconnect con28181_2; --remove_file $MYSQLTEST_VARDIR/tmp/outfile-test.4 use test; revoke all privileges on *.* from user_1@localhost; drop user user_1@localhost; drop database mysqltest; +# Wait till we reached the initial number of concurrent sessions +--source include/wait_until_count_sessions.inc From ed5ee58bfc070698ba4259bf94ff251ecc57a890 Mon Sep 17 00:00:00 2001 From: Patrick Crews <patrick.crews@sun.com> Date: Mon, 2 Feb 2009 17:30:02 -0500 Subject: [PATCH 15/21] Bug#39369: execution of "variables.test" with "check-testcases" show differences. The original symptoms of this bug have been fixed as a consequence of other bug fixes. Taking this time to correct some formatting, such as replacing error numbers with names. Beginning this with 5.0 --- mysql-test/t/variables.test | 92 ++++++++++++++++++------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test index 1748b63ceb9..60254ad9a1d 100644 --- a/mysql-test/t/variables.test +++ b/mysql-test/t/variables.test @@ -6,7 +6,7 @@ drop table if exists t1,t2; --enable_warnings # -# Bug #19263: variables.test doesn't clean up after itself (I/II -- save) +# Bug#19263: variables.test doesn't clean up after itself (I/II -- save) # set @my_binlog_cache_size =@@global.binlog_cache_size; set @my_connect_timeout =@@global.connect_timeout; @@ -172,46 +172,46 @@ SELECT @@version_compile_os LIKE 'non-existent'; # The following should give errors ---error 1231 +--error ER_WRONG_VALUE_FOR_VAR set big_tables=OFFF; ---error 1231 +--error ER_WRONG_VALUE_FOR_VAR set big_tables="OFFF"; ---error 1193 +--error ER_UNKNOWN_SYSTEM_VARIABLE set unknown_variable=1; ---error 1232 +--error ER_WRONG_TYPE_FOR_VAR set max_join_size="hello"; ---error 1286 +--error ER_UNKNOWN_STORAGE_ENGINE set storage_engine=UNKNOWN_TABLE_TYPE; ---error 1231 +--error ER_WRONG_VALUE_FOR_VAR set storage_engine=MERGE, big_tables=2; show local variables like 'storage_engine'; ---error 1229 +--error ER_GLOBAL_VARIABLE set SESSION query_cache_size=10000; ---error 1230 +--error ER_NO_DEFAULT set GLOBAL storage_engine=DEFAULT; ---error 1115 +--error ER_UNKNOWN_CHARACTER_SET set character_set_client=UNKNOWN_CHARACTER_SET; ---error 1273 +--error ER_UNKNOWN_COLLATION set collation_connection=UNKNOWN_COLLATION; ---error 1231 +--error ER_WRONG_VALUE_FOR_VAR set character_set_client=NULL; ---error 1231 +--error ER_WRONG_VALUE_FOR_VAR set collation_connection=NULL; ---error 1228 +--error ER_LOCAL_VARIABLE set global autocommit=1; ---error 1238 +--error ER_INCORRECT_GLOBAL_LOCAL_VAR select @@global.timestamp; ---error 1238 +--error ER_INCORRECT_GLOBAL_LOCAL_VAR set @@version=''; ---error 1229 +--error ER_GLOBAL_VARIABLE set @@concurrent_insert=1; ---error 1228 +--error ER_LOCAL_VARIABLE set @@global.sql_auto_is_null=1; ---error 1238 +--error ER_INCORRECT_GLOBAL_LOCAL_VAR select @@global.sql_auto_is_null; ---error 1229 +--error ER_GLOBAL_VARIABLE set myisam_max_sort_file_size=100; ---error 1231 +--error ER_WRONG_VALUE_FOR_VAR set @@SQL_WARNINGS=NULL; # Test setting all variables @@ -338,23 +338,23 @@ drop table t1,t2; # error conditions # ---error 1193 +--error ER_UNKNOWN_SYSTEM_VARIABLE select @@xxxxxxxxxx; select 1; ---error 1238 +--error ER_INCORRECT_GLOBAL_LOCAL_VAR select @@session.key_buffer_size; ---error 1229 +--error ER_GLOBAL_VARIABLE set ft_boolean_syntax = @@init_connect; ---error 1231 +--error ER_WRONG_VALUE_FOR_VAR set global ft_boolean_syntax = @@init_connect; ---error 1229 +--error ER_GLOBAL_VARIABLE set init_connect = NULL; set global init_connect = NULL; ---error 1229 +--error ER_GLOBAL_VARIABLE set ft_boolean_syntax = @@init_connect; ---error 1231 +--error ER_WRONG_VALUE_FOR_VAR set global ft_boolean_syntax = @@init_connect; # Bug#3754 SET GLOBAL myisam_max_sort_file_size doesn't work as @@ -385,15 +385,15 @@ select @a, @b; # # Bug#2586:Disallow global/session/local as structured var. instance names # ---error 1064 +--error ER_PARSE_ERROR set @@global.global.key_buffer_size= 1; ---error 1064 +--error ER_PARSE_ERROR set GLOBAL global.key_buffer_size= 1; ---error 1064 +--error ER_PARSE_ERROR SELECT @@global.global.key_buffer_size; ---error 1064 +--error ER_PARSE_ERROR SELECT @@global.session.key_buffer_size; ---error 1064 +--error ER_PARSE_ERROR SELECT @@global.local.key_buffer_size; # BUG#5135: cannot turn on log_warnings with SET in 4.1 (and 4.0) @@ -478,27 +478,27 @@ select @@lc_time_names; --echo *** LC_TIME_NAMES: testing with string expressions set lc_time_names=concat('de','_','DE'); select @@lc_time_names; ---error 1105 +--error ER_UNKNOWN_ERROR set lc_time_names=concat('de','+','DE'); select @@lc_time_names; --echo LC_TIME_NAMES: testing with numeric expressions set @@lc_time_names=1+2; select @@lc_time_names; ---error 1232 +--error ER_WRONG_TYPE_FOR_VAR set @@lc_time_names=1/0; select @@lc_time_names; set lc_time_names=en_US; --echo LC_TIME_NAMES: testing NULL and a negative number: ---error 1231 +--error ER_WRONG_VALUE_FOR_VAR set lc_time_names=NULL; ---error 1105 +--error ER_UNKNOWN_ERROR set lc_time_names=-1; select @@lc_time_names; --echo LC_TIME_NAMES: testing locale with the last ID: set lc_time_names=108; select @@lc_time_names; --echo LC_TIME_NAMES: testing a number beyond the valid ID range: ---error 1105 +--error ER_UNKNOWN_ERROR set lc_time_names=109; select @@lc_time_names; --echo LC_TIME_NAMES: testing that 0 is en_US: @@ -540,7 +540,7 @@ select @@query_prealloc_size = @test; # Bug#31588 buffer overrun when setting variables # # Buffer-size Off By One. Should throw valgrind-warning without fix #31588. ---error 1231 +--error ER_WRONG_VALUE_FOR_VAR set global sql_mode=repeat('a',80); --echo End of 4.1 tests @@ -558,9 +558,9 @@ drop table t1; # Bug #10339: read only variables. # ---error 1238 +--error ER_INCORRECT_GLOBAL_LOCAL_VAR set @@warning_count=1; ---error 1238 +--error ER_INCORRECT_GLOBAL_LOCAL_VAR set @@global.error_count=1; # @@ -578,9 +578,9 @@ select @@max_heap_table_size > 0; # Bug #11775 Variable character_set_system does not exist (sometimes) # select @@character_set_system; ---error 1238 +--error ER_INCORRECT_GLOBAL_LOCAL_VAR set global character_set_system = latin1; ---error 1238 +--error ER_INCORRECT_GLOBAL_LOCAL_VAR set @@global.version_compile_os='234'; # @@ -677,7 +677,7 @@ select @@@; # Don't actually output, since it depends on the system --replace_column 1 # select @@hostname; ---error 1238 +--error ER_INCORRECT_GLOBAL_LOCAL_VAR set @@hostname= "anothername"; --replace_column 2 # show variables like 'hostname'; @@ -688,12 +688,12 @@ show variables like 'hostname'; SHOW VARIABLES LIKE 'log'; SELECT @@log; ---error 1238 +--error ER_INCORRECT_GLOBAL_LOCAL_VAR SET GLOBAL log=0; SHOW VARIABLES LIKE 'log_slow_queries'; SELECT @@log_slow_queries; ---error 1238 +--error ER_INCORRECT_GLOBAL_LOCAL_VAR SET GLOBAL log_slow_queries=0; --echo End of 5.0 tests From 78d80a882a3b7bed9feefaa5b19e9a3c933e3f6d Mon Sep 17 00:00:00 2001 From: Georgi Kodinov <joro@sun.com> Date: Tue, 3 Feb 2009 11:04:22 +0200 Subject: [PATCH 16/21] changed the version in .bzr-mysql/default.conf --- .bzr-mysql/default.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bzr-mysql/default.conf b/.bzr-mysql/default.conf index 557df1b1ffe..f79c1cd6319 100644 --- a/.bzr-mysql/default.conf +++ b/.bzr-mysql/default.conf @@ -1,4 +1,4 @@ [MYSQL] post_commit_to = "commits@lists.mysql.com" post_push_to = "commits@lists.mysql.com" -tree_name = "mysql-5.0-bugteam" +tree_name = "mysql-5.0" From 887d1493fa45b528ed9aa93c6b1e50c2ab0c13dc Mon Sep 17 00:00:00 2001 From: Alexey Kopytov <Alexey.Kopytov@sun.com> Date: Tue, 3 Feb 2009 20:19:01 +0300 Subject: [PATCH 17/21] Fix for bug #41868: crash or memory overrun with concat + upper, date_format functions String::realloc() did not check whether the existing string data fits in the newly allocated buffer for cases when reallocating a String object with external buffer (i.e.alloced == FALSE). This could lead to memory overruns in some cases. --- client/sql_string.cc | 20 ++++++++++---------- mysql-test/r/func_str.result | 6 ++++++ mysql-test/t/func_str.test | 9 +++++++++ sql/sql_class.cc | 5 +++++ sql/sql_string.cc | 20 ++++++++++---------- 5 files changed, 40 insertions(+), 20 deletions(-) diff --git a/client/sql_string.cc b/client/sql_string.cc index 9d887ff031c..eb80e29ed49 100644 --- a/client/sql_string.cc +++ b/client/sql_string.cc @@ -72,26 +72,26 @@ bool String::realloc(uint32 alloc_length) if (alloced) { if ((new_ptr= (char*) my_realloc(Ptr,len,MYF(MY_WME)))) - { - Ptr=new_ptr; - Alloced_length=len; - } + new_ptr[alloc_length]= 0; else - return TRUE; // Signal error + return TRUE; // Signal error } else if ((new_ptr= (char*) my_malloc(len,MYF(MY_WME)))) { + if (str_length > len - 1) + str_length= 0; if (str_length) // Avoid bugs in memcpy on AIX - memcpy(new_ptr,Ptr,str_length); - new_ptr[str_length]=0; - Ptr=new_ptr; - Alloced_length=len; + memcpy(new_ptr, Ptr, str_length); + new_ptr[str_length]= 0; alloced=1; } else return TRUE; // Signal error + Ptr= new_ptr; + Alloced_length= len; } - Ptr[alloc_length]=0; // This make other funcs shorter + else + Ptr[alloc_length]= 0; return FALSE; } diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index c121c8937d7..d7fd8c5c887 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -2181,4 +2181,10 @@ def format(a, 2) 253 20 4 Y 0 2 8 format(a, 2) 1.33 drop table t1; +CREATE TABLE t1 (c DATE, aa VARCHAR(30)); +INSERT INTO t1 VALUES ('2008-12-31','aaaaaa'); +SELECT DATE_FORMAT(c, GET_FORMAT(DATE, 'eur')) h, CONCAT(UPPER(aa),', ', aa) i FROM t1; +h i +31.12.2008 AAAAAA, aaaaaa +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 8298a50c277..389538c4cc0 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -1159,4 +1159,13 @@ select format(a, 2) from t1; --disable_metadata drop table t1; +# +# Bug #41868: crash or memory overrun with concat + upper, date_format functions +# + +CREATE TABLE t1 (c DATE, aa VARCHAR(30)); +INSERT INTO t1 VALUES ('2008-12-31','aaaaaa'); +SELECT DATE_FORMAT(c, GET_FORMAT(DATE, 'eur')) h, CONCAT(UPPER(aa),', ', aa) i FROM t1; +DROP TABLE t1; + --echo End of 5.0 tests diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 91c0aa66761..9ff602bb62e 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1047,6 +1047,11 @@ bool select_send::send_data(List<Item> &items) my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); break; } + /* + Reset buffer to its original state, as it may have been altered in + Item::send(). + */ + buffer.set(buff, sizeof(buff), &my_charset_bin); } thd->sent_row_count++; if (!thd->vio_ok()) diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 75e47dd0c8e..b6ce4d8dc8d 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -72,26 +72,26 @@ bool String::realloc(uint32 alloc_length) if (alloced) { if ((new_ptr= (char*) my_realloc(Ptr,len,MYF(MY_WME)))) - { - Ptr=new_ptr; - Alloced_length=len; - } + new_ptr[alloc_length]= 0; else - return TRUE; // Signal error + return TRUE; // Signal error } else if ((new_ptr= (char*) my_malloc(len,MYF(MY_WME)))) { + if (str_length > len - 1) + str_length= 0; if (str_length) // Avoid bugs in memcpy on AIX - memcpy(new_ptr,Ptr,str_length); - new_ptr[str_length]=0; - Ptr=new_ptr; - Alloced_length=len; + memcpy(new_ptr, Ptr, str_length); + new_ptr[str_length]= 0; alloced=1; } else return TRUE; // Signal error + Ptr= new_ptr; + Alloced_length= len; } - Ptr[alloc_length]=0; // This make other funcs shorter + else + Ptr[alloc_length]= 0; return FALSE; } From 8745e368b7ca9d6b14fa09275f6a199cf6e37524 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich <svoj@mysql.com> Date: Wed, 4 Feb 2009 15:46:23 +0400 Subject: [PATCH 18/21] BUG#32047 - 'Spurious' errors while opening MERGE tables Accessing well defined MERGE table may return an error stating that the merge table is incorrectly defined. This happens if MERGE child tables were accessed before and we failed to open another incorrectly defined MERGE table in this connection. myrg_open() internally used my_errno as a variable for determining failure, and thus could be tricked into a wrong decision by other uses of my_errno. With this fix we use function local boolean flag instead of my_errno to determine failure. --- myisammrg/myrg_open.c | 17 ++++++++++------- mysql-test/r/merge.result | 11 +++++++++++ mysql-test/t/merge.test | 13 +++++++++++++ 3 files changed, 34 insertions(+), 7 deletions(-) diff --git a/myisammrg/myrg_open.c b/myisammrg/myrg_open.c index 0e82e429afd..4e61f42efce 100644 --- a/myisammrg/myrg_open.c +++ b/myisammrg/myrg_open.c @@ -40,6 +40,7 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking) IO_CACHE file; MI_INFO *isam=0; uint found_merge_insert_method= 0; + my_bool bad_children= FALSE; DBUG_ENTER("myrg_open"); LINT_INIT(key_parts); @@ -89,13 +90,13 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking) fn_format(buff, buff, "", "", 0); if (!(isam=mi_open(buff,mode,(handle_locking?HA_OPEN_WAIT_IF_LOCKED:0)))) { - my_errno= HA_ERR_WRONG_MRG_TABLE_DEF; if (handle_locking & HA_OPEN_FOR_REPAIR) { myrg_print_wrong_table(buff); + bad_children= TRUE; continue; } - goto err; + goto bad_children; } if (!m_info) /* First file */ { @@ -122,13 +123,13 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking) files++; if (m_info->reclength != isam->s->base.reclength) { - my_errno=HA_ERR_WRONG_MRG_TABLE_DEF; if (handle_locking & HA_OPEN_FOR_REPAIR) { myrg_print_wrong_table(buff); + bad_children= TRUE; continue; } - goto err; + goto bad_children; } m_info->options|= isam->s->options; m_info->records+= isam->state->records; @@ -141,8 +142,8 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking) m_info->tables); } - if (my_errno == HA_ERR_WRONG_MRG_TABLE_DEF) - goto err; + if (bad_children) + goto bad_children; if (!m_info && !(m_info= (MYRG_INFO*) my_malloc(sizeof(MYRG_INFO), MYF(MY_WME | MY_ZEROFILL)))) goto err; @@ -170,12 +171,14 @@ MYRG_INFO *myrg_open(const char *name, int mode, int handle_locking) pthread_mutex_unlock(&THR_LOCK_open); DBUG_RETURN(m_info); +bad_children: + my_errno= HA_ERR_WRONG_MRG_TABLE_DEF; err: save_errno=my_errno; switch (errpos) { case 3: while (files) - mi_close(m_info->open_tables[--files].table); + (void) mi_close(m_info->open_tables[--files].table); my_free((char*) m_info,MYF(0)); /* Fall through */ case 2: diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result index f8ef4f23180..3f2ac3e08ec 100644 --- a/mysql-test/r/merge.result +++ b/mysql-test/r/merge.result @@ -940,4 +940,15 @@ m1 CREATE TABLE `m1` ( `a` int(11) default NULL ) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1, m1; +CREATE TABLE t1(a INT); +CREATE TABLE t2(a VARCHAR(10)); +CREATE TABLE m1(a INT) ENGINE=MERGE UNION=(t1, t2); +CREATE TABLE m2(a INT) ENGINE=MERGE UNION=(t1); +SELECT * FROM t1; +a +SELECT * FROM m1; +ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist +SELECT * FROM m2; +a +DROP TABLE t1, t2, m1, m2; End of 5.0 tests diff --git a/mysql-test/t/merge.test b/mysql-test/t/merge.test index e5cc4d703f2..341296dbe8e 100644 --- a/mysql-test/t/merge.test +++ b/mysql-test/t/merge.test @@ -556,4 +556,17 @@ ALTER TABLE m1 UNION=(); SHOW CREATE TABLE m1; DROP TABLE t1, m1; +# +# BUG#32047 - 'Spurious' errors while opening MERGE tables +# +CREATE TABLE t1(a INT); +CREATE TABLE t2(a VARCHAR(10)); +CREATE TABLE m1(a INT) ENGINE=MERGE UNION=(t1, t2); +CREATE TABLE m2(a INT) ENGINE=MERGE UNION=(t1); +SELECT * FROM t1; +--error ER_WRONG_MRG_TABLE +SELECT * FROM m1; +SELECT * FROM m2; +DROP TABLE t1, t2, m1, m2; + --echo End of 5.0 tests From 909d29ee05a61b919ac0caaee8ddbff527d679de Mon Sep 17 00:00:00 2001 From: Ramil Kalimullin <ramil@mysql.com> Date: Thu, 5 Feb 2009 11:43:39 +0400 Subject: [PATCH 19/21] Fix for bug#42014: Crash, name_const with collate Problem: some queries using NAME_CONST(.. COLLATE ...) lead to server crash due to failed type cast. Fix: return the underlying item's type in case of NAME_CONST(.. COLLATE ...) to avoid wrong casting. --- mysql-test/r/func_misc.result | 5 +++++ mysql-test/t/func_misc.test | 9 +++++++++ sql/item.cc | 25 +++++++++++++++++++------ 3 files changed, 33 insertions(+), 6 deletions(-) diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result index ce177b511b9..e57d46c006a 100644 --- a/mysql-test/r/func_misc.result +++ b/mysql-test/r/func_misc.result @@ -319,4 +319,9 @@ select @my_uuid_date - @my_uuid_synthetic; @my_uuid_date - @my_uuid_synthetic 0 set @@session.time_zone=@save_tz; +CREATE TABLE t1 (a DATE); +SELECT * FROM t1 WHERE a = NAME_CONST('reportDate', +_binary'2009-01-09' COLLATE 'binary'); +a +DROP TABLE t1; End of 5.0 tests diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test index 93fe94ec94f..c8075c42fc7 100644 --- a/mysql-test/t/func_misc.test +++ b/mysql-test/t/func_misc.test @@ -436,5 +436,14 @@ select @my_uuid_date - @my_uuid_synthetic; set @@session.time_zone=@save_tz; + +# +# Bug#42014: Crash, name_const with collate +# +CREATE TABLE t1 (a DATE); +SELECT * FROM t1 WHERE a = NAME_CONST('reportDate', + _binary'2009-01-09' COLLATE 'binary'); +DROP TABLE t1; + --echo End of 5.0 tests diff --git a/sql/item.cc b/sql/item.cc index fc5ee3d4d6a..bc1ae683e93 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1243,13 +1243,26 @@ Item::Type Item_name_const::type() const valid_args guarantees value_item->basic_const_item(); if type is FUNC_ITEM, then we have a fudged item_func_neg() on our hands and return the underlying type. + For Item_func_set_collation() + e.g. NAME_CONST('name', 'value' COLLATE collation) we return its + 'value' argument type. */ - return valid_args ? - (((value_item->type() == FUNC_ITEM) && - (((Item_func *) value_item)->functype() == Item_func::NEG_FUNC)) ? - ((Item_func *) value_item)->key_item()->type() : - value_item->type()) : - NULL_ITEM; + if (!valid_args) + return NULL_ITEM; + Item::Type value_type= value_item->type(); + if (value_type == FUNC_ITEM) + { + /* + The second argument of NAME_CONST('name', 'value') must be + a simple constant item or a NEG_FUNC/COLLATE_FUNC. + */ + DBUG_ASSERT(((Item_func *) value_item)->functype() == + Item_func::NEG_FUNC || + ((Item_func *) value_item)->functype() == + Item_func::COLLATE_FUNC); + return ((Item_func *) value_item)->key_item()->type(); + } + return value_type; } From 23fb47a3ad314a05c4edee77d5af0b21c2c31526 Mon Sep 17 00:00:00 2001 From: Gleb Shchepa <gshchepa@mysql.com> Date: Thu, 5 Feb 2009 13:30:39 +0400 Subject: [PATCH 20/21] Bug #42037: Queries containing a subquery with DISTINCT and ORDER BY could cause a server crash Dependent subqueries like SELECT COUNT(*) FROM t1, t2 WHERE t2.b IN (SELECT DISTINCT t2.b FROM t2 WHERE t2.b = t1.a) caused a memory leak proportional to the number of outer rows. The make_simple_join() function has been modified to JOIN class method to store join_tab_reexec and table_reexec values in the parent join only (make_simple_join of tmp_join may access these values via 'this' pointer of the parent JOIN). NOTE: this patch doesn't include standard test case (this is "out of memory" bug). See bug #42037 page for test cases. --- sql/sql_select.cc | 71 +++++++++++++++++++++-------------------------- sql/sql_select.h | 9 ++++-- 2 files changed, 39 insertions(+), 41 deletions(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 74d1158d8b7..a341cf5e0e9 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -78,7 +78,6 @@ static store_key *get_store_key(THD *thd, KEYUSE *keyuse, table_map used_tables, KEY_PART_INFO *key_part, char *key_buff, uint maybe_null); -static bool make_simple_join(JOIN *join,TABLE *tmp_table); static void make_outerjoin_info(JOIN *join); static bool make_join_select(JOIN *join,SQL_SELECT *select,COND *item); static void make_join_readinfo(JOIN *join, ulonglong options); @@ -1809,7 +1808,7 @@ JOIN::exec() /* Free first data from old join */ curr_join->join_free(); - if (make_simple_join(curr_join, curr_tmp_table)) + if (curr_join->make_simple_join(this, curr_tmp_table)) DBUG_VOID_RETURN; calc_group_buffer(curr_join, group_list); count_field_types(select_lex, &curr_join->tmp_table_param, @@ -1929,7 +1928,7 @@ JOIN::exec() curr_join->select_distinct=0; } curr_tmp_table->reginfo.lock_type= TL_UNLOCK; - if (make_simple_join(curr_join, curr_tmp_table)) + if (curr_join->make_simple_join(this, curr_tmp_table)) DBUG_VOID_RETURN; calc_group_buffer(curr_join, curr_join->group_list); count_field_types(select_lex, &curr_join->tmp_table_param, @@ -5431,48 +5430,42 @@ store_val_in_field(Field *field, Item *item, enum_check_fields check_flag) } -static bool -make_simple_join(JOIN *join,TABLE *tmp_table) +/** + @details Initialize a JOIN as a query execution plan + that accesses a single table via a table scan. + + @param parent contains JOIN_TAB and TABLE object buffers for this join + @param tmp_table temporary table + + @retval FALSE success + @retval TRUE error occurred +*/ +bool +JOIN::make_simple_join(JOIN *parent, TABLE *tmp_table) { - TABLE **tableptr; - JOIN_TAB *join_tab; - DBUG_ENTER("make_simple_join"); + DBUG_ENTER("JOIN::make_simple_join"); /* Reuse TABLE * and JOIN_TAB if already allocated by a previous call to this function through JOIN::exec (may happen for sub-queries). */ - if (!join->table_reexec) - { - if (!(join->table_reexec= (TABLE**) join->thd->alloc(sizeof(TABLE*)))) - DBUG_RETURN(TRUE); /* purecov: inspected */ - if (join->tmp_join) - join->tmp_join->table_reexec= join->table_reexec; - } - if (!join->join_tab_reexec) - { - if (!(join->join_tab_reexec= - (JOIN_TAB*) join->thd->alloc(sizeof(JOIN_TAB)))) - DBUG_RETURN(TRUE); /* purecov: inspected */ - if (join->tmp_join) - join->tmp_join->join_tab_reexec= join->join_tab_reexec; - } - tableptr= join->table_reexec; - join_tab= join->join_tab_reexec; + if (!parent->join_tab_reexec && + !(parent->join_tab_reexec= (JOIN_TAB*) thd->alloc(sizeof(JOIN_TAB)))) + DBUG_RETURN(TRUE); /* purecov: inspected */ - join->join_tab=join_tab; - join->table=tableptr; tableptr[0]=tmp_table; - join->tables=1; - join->const_tables=0; - join->const_table_map=0; - join->tmp_table_param.field_count= join->tmp_table_param.sum_func_count= - join->tmp_table_param.func_count=0; - join->tmp_table_param.copy_field=join->tmp_table_param.copy_field_end=0; - join->first_record=join->sort_and_group=0; - join->send_records=(ha_rows) 0; - join->group=0; - join->row_limit=join->unit->select_limit_cnt; - join->do_send_rows = (join->row_limit) ? 1 : 0; + join_tab= parent->join_tab_reexec; + table= &parent->table_reexec[0]; parent->table_reexec[0]= tmp_table; + tables= 1; + const_tables= 0; + const_table_map= 0; + tmp_table_param.field_count= tmp_table_param.sum_func_count= + tmp_table_param.func_count= 0; + tmp_table_param.copy_field= tmp_table_param.copy_field_end=0; + first_record= sort_and_group=0; + send_records= (ha_rows) 0; + group= 0; + row_limit= unit->select_limit_cnt; + do_send_rows= row_limit ? 1 : 0; join_tab->cache.buff=0; /* No caching */ join_tab->table=tmp_table; @@ -5489,7 +5482,7 @@ make_simple_join(JOIN *join,TABLE *tmp_table) join_tab->ref.key = -1; join_tab->not_used_in_distinct=0; join_tab->read_first_record= join_init_read_record; - join_tab->join=join; + join_tab->join= this; join_tab->ref.key_parts= 0; bzero((char*) &join_tab->read_record,sizeof(join_tab->read_record)); tmp_table->status=0; diff --git a/sql/sql_select.h b/sql/sql_select.h index 8ece01d3286..75a905043d2 100644 --- a/sql/sql_select.h +++ b/sql/sql_select.h @@ -352,9 +352,12 @@ public: cleared only at the end of the execution of the whole query and not caching allocations that occur in repetition at execution time will result in excessive memory usage. + Note: make_simple_join always creates an execution plan that accesses + a single table, thus it is sufficient to have a one-element array for + table_reexec. */ SORT_FIELD *sortorder; // make_unireg_sortorder() - TABLE **table_reexec; // make_simple_join() + TABLE *table_reexec[1]; // make_simple_join() JOIN_TAB *join_tab_reexec; // make_simple_join() /* end of allocation caching storage */ @@ -384,7 +387,7 @@ public: exec_tmp_table1= 0; exec_tmp_table2= 0; sortorder= 0; - table_reexec= 0; + table_reexec[0]= 0; join_tab_reexec= 0; thd= thd_arg; sum_funcs= sum_funcs2= 0; @@ -476,6 +479,8 @@ public: return (unit == &thd->lex->unit && (unit->fake_select_lex == 0 || select_lex == unit->fake_select_lex)); } +private: + bool make_simple_join(JOIN *join, TABLE *tmp_table); }; From 0a6c553510640be7df2d6c40a858061fa9cc8ed3 Mon Sep 17 00:00:00 2001 From: Alexey Kopytov <Alexey.Kopytov@sun.com> Date: Fri, 6 Feb 2009 12:51:11 +0300 Subject: [PATCH 21/21] Temporarily reverted patch for bug #41868 as it was causing problems in PB. --- client/sql_string.cc | 20 ++++++++++---------- mysql-test/r/func_str.result | 6 ------ mysql-test/t/func_str.test | 9 --------- sql/sql_class.cc | 5 ----- sql/sql_string.cc | 20 ++++++++++---------- 5 files changed, 20 insertions(+), 40 deletions(-) diff --git a/client/sql_string.cc b/client/sql_string.cc index eb80e29ed49..9d887ff031c 100644 --- a/client/sql_string.cc +++ b/client/sql_string.cc @@ -72,26 +72,26 @@ bool String::realloc(uint32 alloc_length) if (alloced) { if ((new_ptr= (char*) my_realloc(Ptr,len,MYF(MY_WME)))) - new_ptr[alloc_length]= 0; + { + Ptr=new_ptr; + Alloced_length=len; + } else - return TRUE; // Signal error + return TRUE; // Signal error } else if ((new_ptr= (char*) my_malloc(len,MYF(MY_WME)))) { - if (str_length > len - 1) - str_length= 0; if (str_length) // Avoid bugs in memcpy on AIX - memcpy(new_ptr, Ptr, str_length); - new_ptr[str_length]= 0; + memcpy(new_ptr,Ptr,str_length); + new_ptr[str_length]=0; + Ptr=new_ptr; + Alloced_length=len; alloced=1; } else return TRUE; // Signal error - Ptr= new_ptr; - Alloced_length= len; } - else - Ptr[alloc_length]= 0; + Ptr[alloc_length]=0; // This make other funcs shorter return FALSE; } diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index d7fd8c5c887..c121c8937d7 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -2181,10 +2181,4 @@ def format(a, 2) 253 20 4 Y 0 2 8 format(a, 2) 1.33 drop table t1; -CREATE TABLE t1 (c DATE, aa VARCHAR(30)); -INSERT INTO t1 VALUES ('2008-12-31','aaaaaa'); -SELECT DATE_FORMAT(c, GET_FORMAT(DATE, 'eur')) h, CONCAT(UPPER(aa),', ', aa) i FROM t1; -h i -31.12.2008 AAAAAA, aaaaaa -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 389538c4cc0..8298a50c277 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -1159,13 +1159,4 @@ select format(a, 2) from t1; --disable_metadata drop table t1; -# -# Bug #41868: crash or memory overrun with concat + upper, date_format functions -# - -CREATE TABLE t1 (c DATE, aa VARCHAR(30)); -INSERT INTO t1 VALUES ('2008-12-31','aaaaaa'); -SELECT DATE_FORMAT(c, GET_FORMAT(DATE, 'eur')) h, CONCAT(UPPER(aa),', ', aa) i FROM t1; -DROP TABLE t1; - --echo End of 5.0 tests diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 9ff602bb62e..91c0aa66761 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -1047,11 +1047,6 @@ bool select_send::send_data(List<Item> &items) my_message(ER_OUT_OF_RESOURCES, ER(ER_OUT_OF_RESOURCES), MYF(0)); break; } - /* - Reset buffer to its original state, as it may have been altered in - Item::send(). - */ - buffer.set(buff, sizeof(buff), &my_charset_bin); } thd->sent_row_count++; if (!thd->vio_ok()) diff --git a/sql/sql_string.cc b/sql/sql_string.cc index b6ce4d8dc8d..75e47dd0c8e 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -72,26 +72,26 @@ bool String::realloc(uint32 alloc_length) if (alloced) { if ((new_ptr= (char*) my_realloc(Ptr,len,MYF(MY_WME)))) - new_ptr[alloc_length]= 0; + { + Ptr=new_ptr; + Alloced_length=len; + } else - return TRUE; // Signal error + return TRUE; // Signal error } else if ((new_ptr= (char*) my_malloc(len,MYF(MY_WME)))) { - if (str_length > len - 1) - str_length= 0; if (str_length) // Avoid bugs in memcpy on AIX - memcpy(new_ptr, Ptr, str_length); - new_ptr[str_length]= 0; + memcpy(new_ptr,Ptr,str_length); + new_ptr[str_length]=0; + Ptr=new_ptr; + Alloced_length=len; alloced=1; } else return TRUE; // Signal error - Ptr= new_ptr; - Alloced_length= len; } - else - Ptr[alloc_length]= 0; + Ptr[alloc_length]=0; // This make other funcs shorter return FALSE; }