From cd81a719430d493bdffc8c2132fdad4c351c0f02 Mon Sep 17 00:00:00 2001 From: Vishal Chaudhary Date: Tue, 24 Feb 2015 12:09:58 +0100 Subject: [PATCH 01/38] Raise version number after cloning 5.5.43 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index dbfc5f823c9..fa5486099ce 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 -MYSQL_VERSION_PATCH=43 +MYSQL_VERSION_PATCH=44 MYSQL_VERSION_EXTRA= From 2e3c2cd3625598d6de940b51675dd6a979676ed9 Mon Sep 17 00:00:00 2001 From: Mithun C Y Date: Wed, 25 Feb 2015 11:44:19 +0530 Subject: [PATCH 02/38] Bug #20049521: CRASH IN MERGE_BUFFERS FILESORT.C WHEN INNODB WITH ORDER BY. ISSUE: ------ There can be up to MERGEBUFF2 number of sorted merge chunks, We need enough buffer space for at least one record from each merge chunks. If estimates are wrong(very low) and we allocate buffer space for less than MERGEBUFF2, then we will have issue in merge_buffers, if actual number of rows to be sorted is bigger than estimate and external filesort is chosen. SOLUTION: --------- Set number of rows to sort to be at least MERGEBUFF2. --- sql/filesort.cc | 9 ++++++++- storage/innobase/handler/ha_innodb.cc | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/sql/filesort.cc b/sql/filesort.cc index 1414be2af45..98900efb0d5 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -203,6 +203,13 @@ ha_rows filesort(THD *thd, TABLE *table, SORT_FIELD *sortorder, uint s_length, const ulong min_sort_memory= max(MIN_SORT_MEMORY, ALIGN_SIZE(MERGEBUFF2 * (param.rec_length + sizeof(uchar*)))); + /* + Cannot depend on num_rows. For external sort, space for upto MERGEBUFF2 + rows is required. + */ + if (num_rows < MERGEBUFF2) + num_rows= MERGEBUFF2; + while (memory_available >= min_sort_memory) { ulong keys= memory_available / (param.rec_length + sizeof(char*)); diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 676a20fa372..6ec7586779a 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 2000, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 2000, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, 2009 Google Inc. Copyright (c) 2009, Percona Inc. @@ -7906,6 +7906,13 @@ ha_innobase::estimate_rows_upper_bound(void) estimate = 2 * local_data_file_length / dict_index_calc_min_rec_len(index); + /* Set num_rows less than MERGEBUFF to simulate the case where we do + not have enough space to merge the externally sorted file blocks. */ + DBUG_EXECUTE_IF("set_num_rows_lt_MERGEBUFF", + estimate = 2; + DBUG_SET("-d,set_num_rows_lt_MERGEBUFF"); + ); + prebuilt->trx->op_info = (char*)""; DBUG_RETURN((ha_rows) estimate); From 08763096cb8e8b1497d33a0bf29babfa67f6817a Mon Sep 17 00:00:00 2001 From: Chaithra Gopalareddy Date: Thu, 26 Feb 2015 09:59:00 +0530 Subject: [PATCH 03/38] Bug #19814337 - SERVER CRASHES IN ITEM_FUNC_GROUP_CONCAT::FIX_FIELDS ON 3RD EXECUTION OF PS Problem: When order by is by a column number for a group concat function which has an outer reference, server fails in case of prepared statements on the third execution Analysis: When a group concat function has order by, the fields in order by are not resolved until execution if the input is a column number. During execution they get resolved after the temp table gets created. As a result they will be pointing to temp table fields which are runtime created objects. This results in dangling pointers leading to server failure. Solution: Reset the pointers for the order by fields to point to the original arguments after execution as they are invalid. Done in Item_func_group_concat::cleanup. --- sql/item_sum.cc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sql/item_sum.cc b/sql/item_sum.cc index c9ef2505d3d..f491795c449 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. rights reserved. This program is free software; you can redistribute it and/or modify @@ -3174,6 +3174,19 @@ void Item_func_group_concat::cleanup() } DBUG_ASSERT(tree == 0); } + /* + As the ORDER structures pointed to by the elements of the + 'order' array may be modified in find_order_in_list() called + from Item_func_group_concat::setup() to point to runtime + created objects, we need to reset them back to the original + arguments of the function. + */ + ORDER **order_ptr= order; + for (uint i= 0; i < arg_count_order; i++) + { + (*order_ptr)->item= &args[arg_count_field + i]; + order_ptr++; + } DBUG_VOID_RETURN; } From 96348ab821d6e504fc56f0771af974d90d4d70d8 Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Sun, 1 Mar 2015 17:56:49 +0100 Subject: [PATCH 04/38] BUG#20477758 CONFLICTS WHILE INSTALLING COMMUNITY PACKAGES Due to large version numbers used libmysqlclient-devel packages was not considered for install. Fixed by removing version check. --- packaging/rpm-sles/mysql.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/rpm-sles/mysql.spec.in b/packaging/rpm-sles/mysql.spec.in index 75ed42a1cae..883763412f2 100644 --- a/packaging/rpm-sles/mysql.spec.in +++ b/packaging/rpm-sles/mysql.spec.in @@ -1,4 +1,4 @@ -# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -265,7 +265,7 @@ Requires: mysql-community-libs = %{version}-%{release} Obsoletes: MySQL-devel < %{version}-%{release} Obsoletes: mysql-devel < %{version}-%{release} Obsoletes: mariadb-devel -Obsoletes: libmysqlclient-devel < %{version}-%{release} +Obsoletes: libmysqlclient-devel Provides: mysql-devel = %{version}-%{release} Provides: libmysqlclient-devel = %{version}-%{release} From ffa7ae1c6ec228a90e666c2b303f4441009bd6a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Terje=20R=C3=B8sten?= Date: Thu, 26 Feb 2015 18:58:36 +0100 Subject: [PATCH 05/38] BUG#19811871 VERSION NUMBR NOT SHOWN IN LOG WHEN [RE]STARTING 5.6.21 SERVICE WITH SLES11 REPO MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Log file directory had too strict access rights, server not able to write to log file. Signed-off-by: Terje Røsten --- packaging/rpm-sles/mysql.spec.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packaging/rpm-sles/mysql.spec.in b/packaging/rpm-sles/mysql.spec.in index 883763412f2..23c076332b0 100644 --- a/packaging/rpm-sles/mysql.spec.in +++ b/packaging/rpm-sles/mysql.spec.in @@ -420,7 +420,7 @@ MBD=$RPM_BUILD_DIR/%{src_dir} # Ensure that needed directories exists install -d -m 0755 %{buildroot}/var/lib/mysql install -d -m 0755 %{buildroot}/var/run/mysql -install -d -m 0660 %{buildroot}/var/log/mysql +install -d -m 0750 %{buildroot}/var/log/mysql # Install all binaries cd $MBD/release @@ -632,7 +632,7 @@ fi %attr(644, root, root) %config(noreplace,missingok) %{_sysconfdir}/logrotate.d/mysql %dir %attr(755, mysql, mysql) /var/lib/mysql %dir %attr(755, mysql, mysql) /var/run/mysql -%dir %attr(660, mysql, mysql) /var/log/mysql +%dir %attr(750, mysql, mysql) /var/log/mysql %files common %defattr(-, root, root, -) From 98b18c5971c78ecb18ad90e7d1a71d7108ce4074 Mon Sep 17 00:00:00 2001 From: Annamalai Gurusami Date: Tue, 3 Mar 2015 17:57:08 +0530 Subject: [PATCH 06/38] Bug #20442523 CRASH WHEN CREATE TABLE VIOLATES FOREIGN KEY CONSTRAINT Problem: This is a coding mistake during error handling. When the specified foreign key constraint is wrong because of data type mismatch, the resulting foreign key object will not have valid foreign->id (it will be NULL.) Solution: While removing the foreign key object from dictionary cache during error handling, ensure that foreign->id is not null before using it. rb#8204 approved by Sunny. --- storage/innobase/dict/dict0dict.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c index c298f867ae3..56baceb7a4b 100644 --- a/storage/innobase/dict/dict0dict.c +++ b/storage/innobase/dict/dict0dict.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -2530,7 +2530,7 @@ dict_foreign_remove_from_cache( rbt = foreign->referenced_table->referenced_rbt; - if (rbt != NULL) { + if (rbt != NULL && foreign->id != NULL) { const ib_rbt_node_t* node = rbt_lookup(rbt, foreign->id); dict_foreign_t* val = *(dict_foreign_t**) node->value; @@ -2549,7 +2549,7 @@ dict_foreign_remove_from_cache( foreign); rbt = foreign->foreign_table->foreign_rbt; - if (rbt != NULL) { + if (rbt != NULL && foreign->id != NULL) { const ib_rbt_node_t* node = rbt_lookup(rbt, foreign->id); dict_foreign_t* val = *(dict_foreign_t**) node->value; From 54d23eceb704af2e56ee5d8d2bbfe1beba462ce9 Mon Sep 17 00:00:00 2001 From: Sreeharsha Ramanavarapu Date: Wed, 11 Mar 2015 11:18:52 +0530 Subject: [PATCH 07/38] Bug #19573096: LOADING CORRUPTED GEOMETRY DATA INTO A MYISAM TABLE CAUSES THE SERVER TO CRASH Issue: ----- During index maintanence, R-tree node might need a split. In some cases the square of mbr could be calculated to infinite (as in this case) or to NaN. This is currently not handled. This is specific to MyISAM. SOLUTION: --------- If the calculated value in "mbr_join_square" is infinite or NaN, set it to max double value. Initialization of output parameters of "pick_seeds" is required if calculation is infinite (or negative infinite). Similar to the fix made for INNODB as part of Bug#19533996. --- storage/myisam/rt_split.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/storage/myisam/rt_split.c b/storage/myisam/rt_split.c index 48f9b82a0b5..d37084f79b8 100644 --- a/storage/myisam/rt_split.c +++ b/storage/myisam/rt_split.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -68,6 +68,10 @@ static double mbr_join_square(const double *a, const double *b, int n_dim) b += 2; }while (a != end); + /* Check for infinity or NaN */ + if (my_isinf(square) || isnan(square)) + square = DBL_MAX; + return square; } @@ -102,6 +106,9 @@ static void pick_seeds(SplitStruct *node, int n_entries, double max_d = -DBL_MAX; double d; + *seed_a = node; + *seed_b = node + 1; + for (cur1 = node; cur1 < lim1; ++cur1) { for (cur2=cur1 + 1; cur2 < lim2; ++cur2) From 48869fceba5b30ef359a1f1b660a50424ea2bfa2 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Wed, 11 Mar 2015 15:17:35 +0530 Subject: [PATCH 08/38] Bug #20417397 MYSQL SHOW ENGINE INNODB STATUS SHOWING NEGATIVE RESERVATION AND SIGNAL COUNT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: Reservation and Signal count value shows negative value for show engine innodb statement. Solution: This is happening due to counter overflow error. Reservation and Signal count values are defined as unsigned long but these variables are converted to long while printing it. Change Reservation and Signal count values as unsigned long datatype while printing it. Reviewed-by: Marko Mäkelä Approved in bug page. --- storage/innobase/sync/sync0arr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/storage/innobase/sync/sync0arr.c b/storage/innobase/sync/sync0arr.c index f7d1af24bca..901c1e9a706 100644 --- a/storage/innobase/sync/sync0arr.c +++ b/storage/innobase/sync/sync0arr.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2011, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -1027,8 +1027,9 @@ sync_array_output_info( ulint i; fprintf(file, - "OS WAIT ARRAY INFO: reservation count %ld, signal count %ld\n", - (long) arr->res_count, (long) arr->sg_count); + "OS WAIT ARRAY INFO: reservation count " ULINTPF + ", signal count " ULINTPF "\n", + arr->res_count, arr->sg_count); i = 0; count = 0; From 96974ea7ca2539e342d5e732a80e919a59f1d162 Mon Sep 17 00:00:00 2001 From: Sreeharsha Ramanavarapu Date: Wed, 11 Mar 2015 16:07:49 +0530 Subject: [PATCH 09/38] Revert "Bug #19573096: LOADING CORRUPTED GEOMETRY DATA INTO A" This reverts commit c7de768ec20f5167cff2c69a255d95ca2eded46a. --- storage/myisam/rt_split.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/storage/myisam/rt_split.c b/storage/myisam/rt_split.c index d37084f79b8..955a69c6588 100644 --- a/storage/myisam/rt_split.c +++ b/storage/myisam/rt_split.c @@ -68,10 +68,6 @@ static double mbr_join_square(const double *a, const double *b, int n_dim) b += 2; }while (a != end); - /* Check for infinity or NaN */ - if (my_isinf(square) || isnan(square)) - square = DBL_MAX; - return square; } @@ -106,9 +102,6 @@ static void pick_seeds(SplitStruct *node, int n_entries, double max_d = -DBL_MAX; double d; - *seed_a = node; - *seed_b = node + 1; - for (cur1 = node; cur1 < lim1; ++cur1) { for (cur2=cur1 + 1; cur2 < lim2; ++cur2) From 151b8ec4d11abbb3bf1fb55e10df3e3e7449fe1c Mon Sep 17 00:00:00 2001 From: Venkatesh Duggirala Date: Fri, 13 Mar 2015 12:32:44 +0530 Subject: [PATCH 10/38] Bug #20439913 CREATE TABLE DB.TABLE LIKE TMPTABLE IS BINLOGGED INCORRECTLY - BREAKS A SLAVE Analysis: In row based replication, Master does not send temp table information to Slave. If there are any DDLs that involves in regular table that needs to be sent to Slave and a temp tables (which will not be available at Slave), the Master rewrites the query replacing temp table with it's defintion. Eg: create table regular_table like temptable. In rewrite logic, server is ignoring the database of regular table which can cause problems mentioned in this bug. Fix: dont ignore database information (if available) while rewriting the query --- mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result | 3 +++ mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test | 8 ++++++++ sql/sql_table.cc | 3 ++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result index 550b3f596e5..e66110af947 100644 --- a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result +++ b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result @@ -182,6 +182,9 @@ DROP USER test_3@localhost; ERROR HY000: Table 'user' was not locked with LOCK TABLES INSERT INTO t2 VALUES ("DROP USER test_3@localhost with table locked"); UNLOCK TABLE; +CREATE DATABASE db; +CREATE TABLE db.t1 LIKE t2; +DROP DATABASE db; DROP USER test_3@localhost; DROP FUNCTION f2; DROP PROCEDURE p2; diff --git a/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test index aa22b23925c..d253b7b7175 100644 --- a/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test +++ b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test @@ -150,6 +150,14 @@ DROP USER test_3@localhost; INSERT INTO t2 VALUES ("DROP USER test_3@localhost with table locked"); UNLOCK TABLE; + +# Bug #20439913 CREATE TABLE DB.TABLE LIKE TMPTABLE IS +# BINLOGGED INCORRECTLY - BREAKS A SLAVE +CREATE DATABASE db; +CREATE TABLE db.t1 LIKE t2; +DROP DATABASE db; +# end of Bug #20439913 test + DROP USER test_3@localhost; DROP FUNCTION f2; DROP PROCEDURE p2; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 096e3d6be0f..b0547a16050 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4720,7 +4720,8 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table, int result __attribute__((unused))= store_create_info(thd, table, &query, - create_info, FALSE /* show_database */); + create_info, + table->db ? TRUE : FALSE/* show_database */); DBUG_ASSERT(result == 0); // store_create_info() always return 0 if (write_bin_log(thd, TRUE, query.ptr(), query.length())) From 59142d9a279339f766a23e35a0f7b183406e43c0 Mon Sep 17 00:00:00 2001 From: Venkatesh Duggirala Date: Fri, 13 Mar 2015 13:13:48 +0530 Subject: [PATCH 11/38] Bug #20439913 CREATE TABLE DB.TABLE LIKE TMPTABLE IS BINLOGGED INCORRECTLY - BREAKS A SLAVE Submitted a incomplete patch with my previous push, re submitting the extra changes the required to make the patch complete. --- mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result | 2 ++ mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test | 2 ++ sql/sql_show.cc | 7 ++++++- sql/sql_table.cc | 3 +-- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result index e66110af947..0264c9421fc 100644 --- a/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result +++ b/mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result @@ -184,6 +184,8 @@ INSERT INTO t2 VALUES ("DROP USER test_3@localhost with table locked"); UNLOCK TABLE; CREATE DATABASE db; CREATE TABLE db.t1 LIKE t2; +CREATE TABLE t3 LIKE t2; +DROP TABLE t3; DROP DATABASE db; DROP USER test_3@localhost; DROP FUNCTION f2; diff --git a/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test index d253b7b7175..d722a15f255 100644 --- a/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test +++ b/mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test @@ -155,6 +155,8 @@ UNLOCK TABLE; # BINLOGGED INCORRECTLY - BREAKS A SLAVE CREATE DATABASE db; CREATE TABLE db.t1 LIKE t2; +CREATE TABLE t3 LIKE t2; +DROP TABLE t3; DROP DATABASE db; # end of Bug #20439913 test diff --git a/sql/sql_show.cc b/sql/sql_show.cc index ccbf1f41126..24e7d92d1ad 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1139,6 +1139,11 @@ static bool get_field_default_value(THD *thd, Field *timestamp_field, to tailor the format of the statement. Can be NULL, in which case only SQL_MODE is considered when building the statement. + show_database If true, then print the database before the table + name. The database name is only printed in the event + that it is different from the current database. + If false, then do not print the database before + the table name. NOTE Currently always return 0, but might return error code in the diff --git a/sql/sql_table.cc b/sql/sql_table.cc index b0547a16050..b8858cffce6 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -4720,8 +4720,7 @@ bool mysql_create_like_table(THD* thd, TABLE_LIST* table, TABLE_LIST* src_table, int result __attribute__((unused))= store_create_info(thd, table, &query, - create_info, - table->db ? TRUE : FALSE/* show_database */); + create_info, TRUE /* show_database */); DBUG_ASSERT(result == 0); // store_create_info() always return 0 if (write_bin_log(thd, TRUE, query.ptr(), query.length())) From c7581bb5a11c4fef01da75e30153ee4260febbf3 Mon Sep 17 00:00:00 2001 From: Jon Olav Hauglid Date: Thu, 22 Jan 2015 14:19:56 +0100 Subject: [PATCH 12/38] Bug#20730053: BACKPORT BUG#19770858 TO 5.1 Backport from mysql-5.5 to mysql-5.1 of: Bug19770858: MYSQLD CAN BE DRIVEN TO OOM WITH TWO SIMPLE SESSION VARS The problem was that the maximum value of the transaction_prealloc_size session system variable was ULONG_MAX which meant that it was possible to cause the server to allocate excessive amounts of memory. This patch fixes the problem by reducing the maxmimum value of transaction_prealloc_size and transaction_alloc_block_size down to 128K. Note that transactions will still be able to allocate more than 128K if needed, this patch just reduces the amount that can be preallocated - as well as the maximum size of the incremental allocation blocks. (cherry picked from commit 540c9f7ebb428bbf9ec028feabe1f7f919fdefd9) Conflicts: mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result mysql-test/suite/sys_vars/t/disabled.def mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test sql/sys_vars.cc --- ...transaction_alloc_block_size_basic.result} | 32 ++- ...ansaction_alloc_block_size_basic_32.result | 186 ------------------ ...=> transaction_prealloc_size_basic.result} | 22 +-- .../transaction_prealloc_size_basic_32.result | 172 ---------------- .../transaction_alloc_block_size_basic.test} | 25 +-- ...transaction_alloc_block_size_basic_32.test | 9 - ...transaction_alloc_block_size_basic_64.test | 9 - .../transaction_prealloc_size_basic.test} | 23 +-- .../t/transaction_prealloc_size_basic_32.test | 9 - .../t/transaction_prealloc_size_basic_64.test | 9 - mysql-test/t/variables-big.test | 5 +- sql/mysqld.cc | 4 +- 12 files changed, 45 insertions(+), 460 deletions(-) rename mysql-test/suite/sys_vars/r/{transaction_alloc_block_size_basic_64.result => transaction_alloc_block_size_basic.result} (90%) delete mode 100644 mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_32.result rename mysql-test/suite/sys_vars/r/{transaction_prealloc_size_basic_64.result => transaction_prealloc_size_basic.result} (92%) delete mode 100644 mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_32.result rename mysql-test/suite/sys_vars/{inc/transaction_alloc_block_size_basic.inc => t/transaction_alloc_block_size_basic.test} (93%) delete mode 100644 mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_32.test delete mode 100644 mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_64.test rename mysql-test/suite/sys_vars/{inc/transaction_prealloc_size_basic.inc => t/transaction_prealloc_size_basic.test} (94%) delete mode 100644 mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_32.test delete mode 100644 mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_64.test diff --git a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result b/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result similarity index 90% rename from mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result rename to mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result index 749df56c60b..008fa06d730 100644 --- a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_64.result +++ b/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic.result @@ -39,20 +39,12 @@ SET @@global.transaction_alloc_block_size = 60020; SELECT @@global.transaction_alloc_block_size; @@global.transaction_alloc_block_size 59392 -SET @@global.transaction_alloc_block_size = 4294967295; -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -4294966272 'Bug# 34877: Invalid Values are coming in variable on assigning valid values'; '#--------------------FN_DYNVARS_005_04-------------------------#' SET @@session.transaction_alloc_block_size = 1024; SELECT @@session.transaction_alloc_block_size; @@session.transaction_alloc_block_size 1024 -SET @@session.transaction_alloc_block_size =4294967295; -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -4294966272 SET @@session.transaction_alloc_block_size = 65535; SELECT @@session.transaction_alloc_block_size; @@session.transaction_alloc_block_size @@ -71,10 +63,12 @@ Warning 1292 Truncated incorrect transaction_alloc_block_size value: '-1024' SELECT @@global.transaction_alloc_block_size; @@global.transaction_alloc_block_size 1024 -SET @@global.transaction_alloc_block_size = 123456789201; +SET @@global.transaction_alloc_block_size = 135217728; +Warnings: +Warning 1292 Truncated incorrect transaction_alloc_block_size value: '135217728' SELECT @@global.transaction_alloc_block_size; @@global.transaction_alloc_block_size -123456788480 +131072 'Bug # 34837: Errors are not coming on assigning invalid values to variable'; SET @@global.transaction_alloc_block_size = ON; ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' @@ -102,10 +96,12 @@ Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1000' SELECT @@global.transaction_alloc_block_size; @@global.transaction_alloc_block_size 1024 -SET @@session.transaction_alloc_block_size = 12345678901; +SET @@session.transaction_alloc_block_size = 135217728; +Warnings: +Warning 1292 Truncated incorrect transaction_alloc_block_size value: '135217728' SELECT @@session.transaction_alloc_block_size; @@session.transaction_alloc_block_size -12345678848 +131072 'Bug # 34837: Errors are not coming on assigning invalid values to variable'; SET @@session.transaction_alloc_block_size = ON; ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' @@ -128,20 +124,22 @@ ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' SET @@session.transaction_alloc_block_size = 'test'; ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' '#------------------FN_DYNVARS_005_06-----------------------#' -SELECT @@global.transaction_alloc_block_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +SELECT @@global.transaction_alloc_block_size = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='transaction_alloc_block_size'; @@global.transaction_alloc_block_size = VARIABLE_VALUE 1 '#------------------FN_DYNVARS_005_07-----------------------#' -SELECT @@session.transaction_alloc_block_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES +SELECT @@session.transaction_alloc_block_size = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='transaction_alloc_block_size'; @@session.transaction_alloc_block_size = VARIABLE_VALUE 1 '#---------------------FN_DYNVARS_001_08----------------------#' SET @@transaction_alloc_block_size = 1024; -SET @@global.transaction_alloc_block_size = 4294967295; +SET @@global.transaction_alloc_block_size = 134217728; +Warnings: +Warning 1292 Truncated incorrect transaction_alloc_block_size value: '134217728' SELECT @@transaction_alloc_block_size = @@global.transaction_alloc_block_size; @@transaction_alloc_block_size = @@global.transaction_alloc_block_size 0 diff --git a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_32.result b/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_32.result deleted file mode 100644 index 8c6a788862d..00000000000 --- a/mysql-test/suite/sys_vars/r/transaction_alloc_block_size_basic_32.result +++ /dev/null @@ -1,186 +0,0 @@ -SET @start_global_value = @@global.transaction_alloc_block_size; -SELECT @start_global_value; -@start_global_value -8192 -SET @start_session_value = @@session.transaction_alloc_block_size; -SELECT @start_session_value; -@start_session_value -8192 -'#--------------------FN_DYNVARS_005_01-------------------------#' -SET @@global.transaction_alloc_block_size = 100; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '100' -SET @@global.transaction_alloc_block_size = DEFAULT; -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -8192 -SET @@session.transaction_alloc_block_size = 200; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '200' -SET @@session.transaction_alloc_block_size = DEFAULT; -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -8192 -'#--------------------FN_DYNVARS_005_02-------------------------#' -SET @@global.transaction_alloc_block_size = DEFAULT; -SELECT @@global.transaction_alloc_block_size = 8192; -@@global.transaction_alloc_block_size = 8192 -1 -SET @@session.transaction_alloc_block_size = DEFAULT; -SELECT @@session.transaction_alloc_block_size = 8192; -@@session.transaction_alloc_block_size = 8192 -1 -'#--------------------FN_DYNVARS_005_03-------------------------#' -SET @@global.transaction_alloc_block_size = 1024; -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -1024 -SET @@global.transaction_alloc_block_size = 60020; -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -59392 -SET @@global.transaction_alloc_block_size = 4294967295; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -4294966272 -'Bug# 34877: Invalid Values are coming in variable on assigning valid values'; -'#--------------------FN_DYNVARS_005_04-------------------------#' -SET @@session.transaction_alloc_block_size = 1024; -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -1024 -SET @@session.transaction_alloc_block_size =4294967295; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295' -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -4294966272 -SET @@session.transaction_alloc_block_size = 65535; -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -64512 -'Bug# 34877: Invalid Values are coming in variable on assigning valid values'; -'#------------------FN_DYNVARS_005_05-----------------------#' -SET @@global.transaction_alloc_block_size = 0; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '0' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -1024 -SET @@global.transaction_alloc_block_size = -1024; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '-1024' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -1024 -SET @@global.transaction_alloc_block_size = 123456789201; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '123456789201' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -4294966272 -'Bug # 34837: Errors are not coming on assigning invalid values to variable'; -SET @@global.transaction_alloc_block_size = ON; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -SET @@global.transaction_alloc_block_size = OFF; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -SET @@global.transaction_alloc_block_size = True; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -1024 -SET @@global.transaction_alloc_block_size = False; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '0' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -1024 -SET @@global.transaction_alloc_block_size = 65530.34; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -SET @@global.transaction_alloc_block_size ="Test"; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -SET @@global.transaction_alloc_block_size = 1000; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1000' -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -1024 -SET @@session.transaction_alloc_block_size = 12345678901; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '12345678901' -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -4294966272 -'Bug # 34837: Errors are not coming on assigning invalid values to variable'; -SET @@session.transaction_alloc_block_size = ON; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -SET @@session.transaction_alloc_block_size = OFF; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -SET @@session.transaction_alloc_block_size = True; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '1' -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -1024 -SET @@session.transaction_alloc_block_size = False; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '0' -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -1024 -SET @@session.transaction_alloc_block_size = "Test"; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -SET @@session.transaction_alloc_block_size = 'test'; -ERROR 42000: Incorrect argument type to variable 'transaction_alloc_block_size' -'#------------------FN_DYNVARS_005_06-----------------------#' -SELECT @@global.transaction_alloc_block_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='transaction_alloc_block_size'; -@@global.transaction_alloc_block_size = VARIABLE_VALUE -1 -'#------------------FN_DYNVARS_005_07-----------------------#' -SELECT @@session.transaction_alloc_block_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES -WHERE VARIABLE_NAME='transaction_alloc_block_size'; -@@session.transaction_alloc_block_size = VARIABLE_VALUE -1 -'#---------------------FN_DYNVARS_001_08----------------------#' -SET @@transaction_alloc_block_size = 1024; -SET @@global.transaction_alloc_block_size = 4294967295; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '4294967295' -SELECT @@transaction_alloc_block_size = @@global.transaction_alloc_block_size; -@@transaction_alloc_block_size = @@global.transaction_alloc_block_size -0 -'#---------------------FN_DYNVARS_001_09----------------------#' -SET @@transaction_alloc_block_size = 100; -Warnings: -Warning 1292 Truncated incorrect transaction_alloc_block_size value: '100' -SELECT @@transaction_alloc_block_size = @@local.transaction_alloc_block_size; -@@transaction_alloc_block_size = @@local.transaction_alloc_block_size -1 -SELECT @@local.transaction_alloc_block_size = @@session.transaction_alloc_block_size; -@@local.transaction_alloc_block_size = @@session.transaction_alloc_block_size -1 -'#---------------------FN_DYNVARS_001_10----------------------#' -SET transaction_alloc_block_size = 1027; -SELECT @@transaction_alloc_block_size; -@@transaction_alloc_block_size -1024 -SELECT local.transaction_alloc_block_size; -ERROR 42S02: Unknown table 'local' in field list -SELECT session.transaction_alloc_block_size; -ERROR 42S02: Unknown table 'session' in field list -SELECT transaction_alloc_block_size = @@session.transaction_alloc_block_size; -ERROR 42S22: Unknown column 'transaction_alloc_block_size' in 'field list' -SET @@global.transaction_alloc_block_size = @start_global_value; -SELECT @@global.transaction_alloc_block_size; -@@global.transaction_alloc_block_size -8192 -SET @@session.tmp_table_size = @start_session_value; -SELECT @@session.transaction_alloc_block_size; -@@session.transaction_alloc_block_size -1024 diff --git a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result b/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result similarity index 92% rename from mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result rename to mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result index 3455b9479c0..8efb979b592 100644 --- a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_64.result +++ b/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic.result @@ -40,19 +40,11 @@ SET @@global.transaction_prealloc_size = 60020; SELECT @@global.transaction_prealloc_size; @@global.transaction_prealloc_size 59392 -SET @@global.transaction_prealloc_size = 4294966272; -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -4294966272 '#--------------------FN_DYNVARS_005_04-------------------------#' SET @@session.transaction_prealloc_size = 1024; SELECT @@session.transaction_prealloc_size; @@session.transaction_prealloc_size 1024 -SET @@session.transaction_prealloc_size =4294966272; -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -4294966272 SET @@session.transaction_prealloc_size = 65535; SELECT @@session.transaction_prealloc_size; @@session.transaction_prealloc_size @@ -115,19 +107,21 @@ SELECT @@session.transaction_prealloc_size; 1024 SET @@session.transaction_prealloc_size = "Test"; ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@session.transaction_prealloc_size = 123456789031; +SET @@session.transaction_prealloc_size = 135217728; +Warnings: +Warning 1292 Truncated incorrect transaction_prealloc_size value: '135217728' SELECT @@session.transaction_prealloc_size; @@session.transaction_prealloc_size -123456788480 +131072 '#------------------FN_DYNVARS_005_06-----------------------#' -SELECT @@global.transaction_prealloc_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +SELECT @@global.transaction_prealloc_size = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='transaction_prealloc_size'; @@global.transaction_prealloc_size = VARIABLE_VALUE 1 '#------------------FN_DYNVARS_005_07-----------------------#' -SELECT @@session.transaction_prealloc_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES +SELECT @@session.transaction_prealloc_size = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='transaction_prealloc_size'; @@session.transaction_prealloc_size = VARIABLE_VALUE 1 diff --git a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_32.result b/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_32.result deleted file mode 100644 index 4912653a8e5..00000000000 --- a/mysql-test/suite/sys_vars/r/transaction_prealloc_size_basic_32.result +++ /dev/null @@ -1,172 +0,0 @@ -SET @start_global_value = @@global.transaction_prealloc_size; -SELECT @start_global_value; -@start_global_value -4096 -SET @start_session_value = @@session.transaction_prealloc_size; -SELECT @start_session_value; -@start_session_value -4096 -'Bug# 34876: This variable has invalid default value as compared to documentation'; -'#--------------------FN_DYNVARS_005_01-------------------------#' -SET @@global.transaction_prealloc_size = 100; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '100' -SET @@global.transaction_prealloc_size = DEFAULT; -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -4096 -SET @@session.transaction_prealloc_size = 200; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '200' -SET @@session.transaction_prealloc_size = DEFAULT; -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -4096 -'#--------------------FN_DYNVARS_005_02-------------------------#' -SET @@global.transaction_prealloc_size = DEFAULT; -SELECT @@global.transaction_prealloc_size = 4096; -@@global.transaction_prealloc_size = 4096 -1 -SET @@session.transaction_prealloc_size = DEFAULT; -SELECT @@session.transaction_prealloc_size = 4096; -@@session.transaction_prealloc_size = 4096 -1 -'#--------------------FN_DYNVARS_005_03-------------------------#' -SET @@global.transaction_prealloc_size = 1024; -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -1024 -SET @@global.transaction_prealloc_size = 60020; -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -59392 -SET @@global.transaction_prealloc_size = 4294966272; -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -4294966272 -'#--------------------FN_DYNVARS_005_04-------------------------#' -SET @@session.transaction_prealloc_size = 1024; -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -1024 -SET @@session.transaction_prealloc_size =4294966272; -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -4294966272 -SET @@session.transaction_prealloc_size = 65535; -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -64512 -'#------------------FN_DYNVARS_005_05-----------------------#' -SET @@global.transaction_prealloc_size = 0; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '0' -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -1024 -SET @@global.transaction_prealloc_size = -1024; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '-1024' -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -1024 -'Bug # 34837: Errors are not coming on assigning invalid values to variable'; -SET @@global.transaction_prealloc_size = ON; -ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@global.transaction_prealloc_size = OFF; -ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@global.transaction_prealloc_size = True; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '1' -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -1024 -SET @@global.transaction_prealloc_size = False; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '0' -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -1024 -SET @@global.transaction_prealloc_size = 65530.34; -ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@global.transaction_prealloc_size ="Test"; -ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@global.transaction_prealloc_size = 1000; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '1000' -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -1024 -SET @@session.transaction_prealloc_size = ON; -ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@session.transaction_prealloc_size = OFF; -ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@session.transaction_prealloc_size = True; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '1' -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -1024 -SET @@session.transaction_prealloc_size = False; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '0' -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -1024 -SET @@session.transaction_prealloc_size = "Test"; -ERROR 42000: Incorrect argument type to variable 'transaction_prealloc_size' -SET @@session.transaction_prealloc_size = 123456789031; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '123456789031' -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -4294966272 -'#------------------FN_DYNVARS_005_06-----------------------#' -SELECT @@global.transaction_prealloc_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES -WHERE VARIABLE_NAME='transaction_prealloc_size'; -@@global.transaction_prealloc_size = VARIABLE_VALUE -1 -'#------------------FN_DYNVARS_005_07-----------------------#' -SELECT @@session.transaction_prealloc_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES -WHERE VARIABLE_NAME='transaction_prealloc_size'; -@@session.transaction_prealloc_size = VARIABLE_VALUE -1 -'#---------------------FN_DYNVARS_001_09----------------------#' -SET @@global.transaction_prealloc_size = 1024; -SET @@global.transaction_prealloc_size = 10; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '10' -SELECT @@transaction_prealloc_size = @@global.transaction_prealloc_size; -@@transaction_prealloc_size = @@global.transaction_prealloc_size -0 -'#---------------------FN_DYNVARS_001_10----------------------#' -SET @@transaction_prealloc_size = 100; -Warnings: -Warning 1292 Truncated incorrect transaction_prealloc_size value: '100' -SELECT @@transaction_prealloc_size = @@local.transaction_prealloc_size; -@@transaction_prealloc_size = @@local.transaction_prealloc_size -1 -SELECT @@local.transaction_prealloc_size = @@session.transaction_prealloc_size; -@@local.transaction_prealloc_size = @@session.transaction_prealloc_size -1 -'#---------------------FN_DYNVARS_001_11----------------------#' -SET transaction_prealloc_size = 1027; -SELECT @@transaction_prealloc_size; -@@transaction_prealloc_size -1024 -SELECT local.transaction_prealloc_size; -ERROR 42S02: Unknown table 'local' in field list -SELECT session.transaction_prealloc_size; -ERROR 42S02: Unknown table 'session' in field list -SELECT transaction_prealloc_size = @@session.transaction_prealloc_size; -ERROR 42S22: Unknown column 'transaction_prealloc_size' in 'field list' -SET @@global.transaction_prealloc_size = @start_global_value; -SELECT @@global.transaction_prealloc_size; -@@global.transaction_prealloc_size -4096 -SET @@session.transaction_prealloc_size = @start_session_value; -SELECT @@session.transaction_prealloc_size; -@@session.transaction_prealloc_size -4096 diff --git a/mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test similarity index 93% rename from mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc rename to mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test index c14383b86c6..6f950e8724f 100644 --- a/mysql-test/suite/sys_vars/inc/transaction_alloc_block_size_basic.inc +++ b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic.test @@ -5,7 +5,7 @@ # Access Type: Dynamic # # Data Type: numeric # # Default Value: 8192 # -# Range: 1024-4294967295 # +# Range: 1024-134217728 # # # # # # Creation Date: 2008-02-14 # @@ -80,19 +80,14 @@ SELECT @@global.transaction_alloc_block_size; SET @@global.transaction_alloc_block_size = 60020; SELECT @@global.transaction_alloc_block_size; -SET @@global.transaction_alloc_block_size = 4294967295; -SELECT @@global.transaction_alloc_block_size; --echo 'Bug# 34877: Invalid Values are coming in variable on assigning valid values'; --echo '#--------------------FN_DYNVARS_005_04-------------------------#' ################################################################### # Change the value of variable to a valid value for SESSION Scope # ################################################################### - -SET @@session.transaction_alloc_block_size = 1024; -SELECT @@session.transaction_alloc_block_size; -SET @@session.transaction_alloc_block_size =4294967295; +SET @@session.transaction_alloc_block_size = 1024; SELECT @@session.transaction_alloc_block_size; SET @@session.transaction_alloc_block_size = 65535; @@ -112,7 +107,7 @@ SET @@global.transaction_alloc_block_size = -1024; SELECT @@global.transaction_alloc_block_size; -SET @@global.transaction_alloc_block_size = 123456789201; +SET @@global.transaction_alloc_block_size = 135217728; SELECT @@global.transaction_alloc_block_size; --echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable'; @@ -140,7 +135,7 @@ SET @@global.transaction_alloc_block_size ="Test"; SET @@global.transaction_alloc_block_size = 1000; SELECT @@global.transaction_alloc_block_size; -SET @@session.transaction_alloc_block_size = 12345678901; +SET @@session.transaction_alloc_block_size = 135217728; SELECT @@session.transaction_alloc_block_size; --echo 'Bug # 34837: Errors are not coming on assigning invalid values to variable'; @@ -171,8 +166,8 @@ SET @@session.transaction_alloc_block_size = 'test'; #################################################################### -SELECT @@global.transaction_alloc_block_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +SELECT @@global.transaction_alloc_block_size = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='transaction_alloc_block_size'; --echo '#------------------FN_DYNVARS_005_07-----------------------#' @@ -180,8 +175,8 @@ WHERE VARIABLE_NAME='transaction_alloc_block_size'; # Check if the value in SESSION Table matches value in variable # #################################################################### -SELECT @@session.transaction_alloc_block_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES +SELECT @@session.transaction_alloc_block_size = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='transaction_alloc_block_size'; @@ -191,9 +186,9 @@ WHERE VARIABLE_NAME='transaction_alloc_block_size'; ########################################################################### SET @@transaction_alloc_block_size = 1024; -SET @@global.transaction_alloc_block_size = 4294967295; +SET @@global.transaction_alloc_block_size = 134217728; SELECT @@transaction_alloc_block_size = @@global.transaction_alloc_block_size; - + --echo '#---------------------FN_DYNVARS_001_09----------------------#' ######################################################################## diff --git a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_32.test b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_32.test deleted file mode 100644 index b9fbf429220..00000000000 --- a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_32.test +++ /dev/null @@ -1,9 +0,0 @@ -################################################################################ -# Created by Horst Hunger 2008-05-07 # -# # -# Wrapper for 32 bit machines # -################################################################################ - ---source include/have_32bit.inc ---source suite/sys_vars/inc/transaction_alloc_block_size_basic.inc - diff --git a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_64.test b/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_64.test deleted file mode 100644 index fb68245ee62..00000000000 --- a/mysql-test/suite/sys_vars/t/transaction_alloc_block_size_basic_64.test +++ /dev/null @@ -1,9 +0,0 @@ -################################################################################ -# Created by Horst Hunger 2008-05-07 # -# # -# Wrapper for 64 bit machines # -################################################################################ - ---source include/have_64bit.inc ---source suite/sys_vars/inc/transaction_alloc_block_size_basic.inc - diff --git a/mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test similarity index 94% rename from mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc rename to mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test index 1ca302a19e0..718fe56a02f 100644 --- a/mysql-test/suite/sys_vars/inc/transaction_prealloc_size_basic.inc +++ b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic.test @@ -5,7 +5,7 @@ # Access Type: Dynamic # # Data Type: numeric # # Default Value: 4096 # -# Range: # +# Range: 1024-134217728 # # # # # # Creation Date: 2008-02-14 # @@ -77,20 +77,14 @@ SELECT @@global.transaction_prealloc_size; SET @@global.transaction_prealloc_size = 60020; SELECT @@global.transaction_prealloc_size; -SET @@global.transaction_prealloc_size = 4294966272; -SELECT @@global.transaction_prealloc_size; - - --echo '#--------------------FN_DYNVARS_005_04-------------------------#' ################################################################### # Change the value of variable to a valid value for SESSION Scope # ################################################################### - + SET @@session.transaction_prealloc_size = 1024; SELECT @@session.transaction_prealloc_size; -SET @@session.transaction_prealloc_size =4294966272; -SELECT @@session.transaction_prealloc_size; SET @@session.transaction_prealloc_size = 65535; SELECT @@session.transaction_prealloc_size; @@ -148,7 +142,7 @@ SELECT @@session.transaction_prealloc_size; --Error ER_WRONG_TYPE_FOR_VAR SET @@session.transaction_prealloc_size = "Test"; -SET @@session.transaction_prealloc_size = 123456789031; +SET @@session.transaction_prealloc_size = 135217728; SELECT @@session.transaction_prealloc_size; @@ -158,8 +152,8 @@ SELECT @@session.transaction_prealloc_size; #################################################################### -SELECT @@global.transaction_prealloc_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES +SELECT @@global.transaction_prealloc_size = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE VARIABLE_NAME='transaction_prealloc_size'; --echo '#------------------FN_DYNVARS_005_07-----------------------#' @@ -167,8 +161,8 @@ WHERE VARIABLE_NAME='transaction_prealloc_size'; # Check if the value in SESSION Table matches value in variable # #################################################################### -SELECT @@session.transaction_prealloc_size = VARIABLE_VALUE -FROM INFORMATION_SCHEMA.SESSION_VARIABLES +SELECT @@session.transaction_prealloc_size = VARIABLE_VALUE +FROM INFORMATION_SCHEMA.SESSION_VARIABLES WHERE VARIABLE_NAME='transaction_prealloc_size'; @@ -183,7 +177,7 @@ SET @@global.transaction_prealloc_size = 1024; SET @@global.transaction_prealloc_size = 10; SELECT @@transaction_prealloc_size = @@global.transaction_prealloc_size; - + --echo '#---------------------FN_DYNVARS_001_10----------------------#' ######################################################################## @@ -226,4 +220,3 @@ SELECT @@session.transaction_prealloc_size; ############################################################# # END OF transaction_prealloc_size TESTS # ############################################################# - diff --git a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_32.test b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_32.test deleted file mode 100644 index 23ea53334ff..00000000000 --- a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_32.test +++ /dev/null @@ -1,9 +0,0 @@ -################################################################################ -# Created by Horst Hunger 2008-05-07 # -# # -# Wrapper for 32 bit machines # -################################################################################ - ---source include/have_32bit.inc ---source suite/sys_vars/inc/transaction_prealloc_size_basic.inc - diff --git a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_64.test b/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_64.test deleted file mode 100644 index 79a18585e80..00000000000 --- a/mysql-test/suite/sys_vars/t/transaction_prealloc_size_basic_64.test +++ /dev/null @@ -1,9 +0,0 @@ -################################################################################ -# Created by Horst Hunger 2008-05-07 # -# # -# Wrapper for 64 bit machines # -################################################################################ - ---source include/have_64bit.inc ---source suite/sys_vars/inc/transaction_prealloc_size_basic.inc - diff --git a/mysql-test/t/variables-big.test b/mysql-test/t/variables-big.test index 6c357bb6e54..024c5bae813 100644 --- a/mysql-test/t/variables-big.test +++ b/mysql-test/t/variables-big.test @@ -8,10 +8,9 @@ # Bug#27322 failure to allocate transaction_prealloc_size causes crash # # -# Manual (6.0): +# Manual (5.1): # Platform Bit Size Range Default -# 32 1024-4294967295 (4 Gi - 1) 4096 -# 64 1024-18446744073709547520 4096 +# 32/64 1024-128k 4096 # # Observation(mleich): # 1. - Linux 64 Bit, MySQL 64 Bit, 4 GiB RAM, 8 GiB swap diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 024ad659d89..77fdbe6b498 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -7115,12 +7115,12 @@ thread is in the relay logs.", "Allocation block size for transactions to be stored in binary log.", &global_system_variables.trans_alloc_block_size, &max_system_variables.trans_alloc_block_size, 0, GET_ULONG, - REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, ULONG_MAX, 0, 1024, 0}, + REQUIRED_ARG, QUERY_ALLOC_BLOCK_SIZE, 1024, 128 * 1024, 0, 1024, 0}, {"transaction_prealloc_size", OPT_TRANS_PREALLOC_SIZE, "Persistent buffer for transactions to be stored in binary log.", &global_system_variables.trans_prealloc_size, &max_system_variables.trans_prealloc_size, 0, GET_ULONG, - REQUIRED_ARG, TRANS_ALLOC_PREALLOC_SIZE, 1024, ULONG_MAX, 0, 1024, 0}, + REQUIRED_ARG, TRANS_ALLOC_PREALLOC_SIZE, 1024, 128 * 1024, 0, 1024, 0}, {"thread_handling", OPT_THREAD_HANDLING, "Define threads usage for handling queries: " "one-thread-per-connection or no-threads.", 0, 0, From b7bdea944d6336a810608d183ecb9c8f2100cd05 Mon Sep 17 00:00:00 2001 From: Sreeharsha Ramanavarapu Date: Mon, 23 Mar 2015 08:49:26 +0530 Subject: [PATCH 13/38] Bug# 19573096: LOADING CORRUPTED GEOMETRY DATA INTO A MYISAM TABLE CAUSES THE SERVER TO CRASH Issue: ----- During index maintanence, R-tree node might need a split. In some cases the square of mbr could be calculated to infinite (as in this case) or to NaN. This is currently not handled. This is specific to MyISAM. SOLUTION: --------- If the calculated value in "mbr_join_square" is infinite or NaN, set it to max double value. Initialization of output parameters of "pick_seeds" is required if calculation is infinite (or negative infinite). Similar to the fix made for INNODB as part of Bug#19533996. --- storage/myisam/rt_split.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/storage/myisam/rt_split.c b/storage/myisam/rt_split.c index 955a69c6588..d37084f79b8 100644 --- a/storage/myisam/rt_split.c +++ b/storage/myisam/rt_split.c @@ -68,6 +68,10 @@ static double mbr_join_square(const double *a, const double *b, int n_dim) b += 2; }while (a != end); + /* Check for infinity or NaN */ + if (my_isinf(square) || isnan(square)) + square = DBL_MAX; + return square; } @@ -102,6 +106,9 @@ static void pick_seeds(SplitStruct *node, int n_entries, double max_d = -DBL_MAX; double d; + *seed_a = node; + *seed_b = node + 1; + for (cur1 = node; cur1 < lim1; ++cur1) { for (cur2=cur1 + 1; cur2 < lim2; ++cur2) From a2cd622f3aeeed7ae720b14fd1a51bd0798a3a27 Mon Sep 17 00:00:00 2001 From: Chaithra Gopalareddy Date: Mon, 23 Mar 2015 12:05:55 +0530 Subject: [PATCH 14/38] Bug #20730129: BACKPORT BUG#19612819 TO 5.1 Backport from mysql-5.5 to mysql-5.1 Bug #19612819 : FILESORT: ASSERTION FAILED: POS->FIELD != 0 || POS->ITEM != 0 Problem: While getting the temp table field for a REF_ITEM make_sortorder is using the real_item. As a result server fails later with an assert. Solution: Do not use real_item to get the temp table field. Instead use the REF_ITEM itself as temp table fields are created for REF_ITEM not the real_item. --- sql/sql_select.cc | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 7507f430eb7..03054020d57 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -14428,18 +14428,33 @@ SORT_FIELD *make_unireg_sortorder(ORDER *order, uint *length, for (;order;order=order->next,pos++) { - Item *item= order->item[0]->real_item(); + Item *const item= order->item[0], *const real_item= item->real_item(); pos->field= 0; pos->item= 0; - if (item->type() == Item::FIELD_ITEM) - pos->field= ((Item_field*) item)->field; - else if (item->type() == Item::SUM_FUNC_ITEM && !item->const_item()) - pos->field= ((Item_sum*) item)->get_tmp_table_field(); - else if (item->type() == Item::COPY_STR_ITEM) - { // Blob patch - pos->item= ((Item_copy*) item)->get_item(); + if (real_item->type() == Item::FIELD_ITEM) + { + // Could be a field, or Item_direct_view_ref wrapping a field + DBUG_ASSERT(item->type() == Item::FIELD_ITEM || + (item->type() == Item::REF_ITEM && + static_cast(item)->ref_type() == + Item_ref::VIEW_REF)); + pos->field= static_cast(real_item)->field; + } + else if (real_item->type() == Item::SUM_FUNC_ITEM && + !real_item->const_item()) + { + // Aggregate, or Item_aggregate_ref + DBUG_ASSERT(item->type() == Item::SUM_FUNC_ITEM || + (item->type() == Item::REF_ITEM && + static_cast(item)->ref_type() == + Item_ref::AGGREGATE_REF)); + pos->field= item->get_tmp_table_field(); + } + else if (real_item->type() == Item::COPY_STR_ITEM) + {// Blob patch + pos->item= static_cast(real_item)->get_item(); } else - pos->item= *order->item; + pos->item= item; pos->reverse=! order->asc; } *length=count; From 044060fe164bfbe3666fc18351c2b6795267d2ea Mon Sep 17 00:00:00 2001 From: Chaithra Gopalareddy Date: Mon, 23 Mar 2015 14:31:28 +0530 Subject: [PATCH 15/38] Bug #20730220 : BACKPORT BUG#19880368 TO 5.1 Backport from mysql-5.5 to mysql-5.1 Bug#19880368 : GROUP_CONCAT CRASHES AFTER DUMP_LEAF_KEY Problem: find_order_by_list does not update the address of order_item correctly after resolving. Solution: Change the ref_by address for a order_by field if its SUM_FUNC_ITEM to the address of the field present in all_fields. --- sql/sql_select.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 03054020d57..21b84cbca54 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -14937,6 +14937,17 @@ find_order_in_list(THD *thd, Item **ref_pointer_array, TABLE_LIST *tables, uint el= all_fields.elements; all_fields.push_front(order_item); /* Add new field to field list. */ ref_pointer_array[el]= order_item; + /* + If the order_item is a SUM_FUNC_ITEM, when fix_fields is called + ref_by is set to order->item which is the address of order_item. + But this needs to be address of order_item in the all_fields list. + As a result, when it gets replaced with Item_aggregate_ref + object in Item::split_sum_func2, we will be able to retrieve the + newly created object. + */ + if (order_item->type() == Item::SUM_FUNC_ITEM) + ((Item_sum *)order_item)->ref_by= all_fields.head_ref(); + order->item= ref_pointer_array + el; return FALSE; } From f8eacccf2a56e86ed5c6413481d5ea918b9eca1d Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Tue, 24 Mar 2015 14:09:18 +0530 Subject: [PATCH 16/38] Bug#20422680 BUF_POOL_WATCH_SET WOULD CRASH TRYING TO USE A SECOND WATCH PAGE PER INSTANCE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description: BUF_POOL_WATCH_SIZE is also initialized to number of purge threads. so BUF_POOL_WATCH_SIZE will never be lesser than number of purge threads. From the code, there is no scope for purge thread to skip buf_pool_watch_unset. So there can be at most one buffer pool watch active per purge thread. In other words, there is no chance for purge thread instance to hold a watch when setting another watch. Solution: Adding code comments to clarify the issue. Reviewed-by: Marko Mäkelä Approved via Bug page. --- storage/innobase/buf/buf0buf.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c index b6bfcc3dbc0..4963f1c30c3 100644 --- a/storage/innobase/buf/buf0buf.c +++ b/storage/innobase/buf/buf0buf.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1995, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1995, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2008, Google Inc. Portions of this file contain modifications contributed and copyrighted by @@ -1528,6 +1528,9 @@ buf_pool_watch_set( return(NULL); } + /* The maximum number of purge threads should never exceed + BUF_POOL_WATCH_SIZE. So there is no way for purge thread + instance to hold a watch when setting another watch. */ for (i = 0; i < BUF_POOL_WATCH_SIZE; i++) { bpage = &buf_pool->watch[i]; From 4409bc9d9ed20c9253263d8758a425bdfeecd965 Mon Sep 17 00:00:00 2001 From: Balasubramanian Kandasamy Date: Tue, 24 Mar 2015 12:55:43 +0100 Subject: [PATCH 17/38] Bug#20734434 - SPELLING ERROR \"EMDEDDED\" IN RPM SPEC FILES - Updated emdedded to embedded --- packaging/rpm-oel/mysql.spec.in | 4 ++-- support-files/mysql.spec.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packaging/rpm-oel/mysql.spec.in b/packaging/rpm-oel/mysql.spec.in index d8cf49fe993..bb232fb404d 100644 --- a/packaging/rpm-oel/mysql.spec.in +++ b/packaging/rpm-oel/mysql.spec.in @@ -1,4 +1,4 @@ -# Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -370,7 +370,7 @@ Obsoletes: mariadb-embedded Obsoletes: MySQL-embedded < %{version}-%{release} Obsoletes: mysql-embedded < %{version}-%{release} Provides: mysql-embedded = %{version}-%{release} -Provides: mysql-emdedded%{?_isa} = %{version}-%{release} +Provides: mysql-embedded%{?_isa} = %{version}-%{release} %description embedded This package contains the MySQL server as an embedded library. diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh index e45573a6d77..aaeed444e2f 100644 --- a/support-files/mysql.spec.sh +++ b/support-files/mysql.spec.sh @@ -1,4 +1,4 @@ -# Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -427,7 +427,7 @@ Obsoletes: MySQL-embedded-pro Obsoletes: MySQL-embedded-classic MySQL-embedded-community MySQL-embedded-enterprise Obsoletes: MySQL-embedded-advanced-gpl MySQL-embedded-enterprise-gpl Provides: mysql-embedded = %{version}-%{release} -Provides: mysql-emdedded%{?_isa} = %{version}-%{release} +Provides: mysql-embedded%{?_isa} = %{version}-%{release} %description -n MySQL-embedded%{product_suffix} This package contains the MySQL server as an embedded library. From 3c02e6ec2efdb03b055d317ae596fc0c2da31e04 Mon Sep 17 00:00:00 2001 From: Vamsikrishna Bhagi Date: Wed, 25 Mar 2015 15:28:55 +0530 Subject: [PATCH 18/38] Bug# 20730103 BACKPORT 19688008 TO 5.1 Problem: UDF doesn't handle the arguments properly when they are of string type due to a misplaced break. The length of arguments is also not set properly when the argument is NULL. Solution: Fixed the code by putting the break at right place and setting the argument length to zero when the argument is NULL. --- sql/item_func.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sql/item_func.cc b/sql/item_func.cc index fd098f347d1..2c3094596eb 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -3029,8 +3029,12 @@ bool udf_handler::get_arguments() { f_args.args[i]= (char*) res->ptr(); f_args.lengths[i]= res->length(); - break; } + else + { + f_args.lengths[i]= 0; + } + break; } case INT_RESULT: *((longlong*) to) = args[i]->val_int(); From c788e693e678c83e094cc4e80f265014287ec1a3 Mon Sep 17 00:00:00 2001 From: Sreeharsha Ramanavarapu Date: Thu, 26 Mar 2015 07:40:35 +0530 Subject: [PATCH 19/38] Bug #20730155: BACKPORT BUG#19699237 TO 5.1 Backport from mysql-5.5 to mysql-5.1 Bug# 19699237: UNINITIALIZED VARIABLE IN ITEM_FIELD::STR_RESULT LEADS TO INCORRECT BEHAVIOR ISSUE: ------ When the following conditions are satisfied in a query, a server crash occurs: a) Two rows are compared using a NULL-safe equal-to operator. b) Each of these rows belong to different charsets. SOLUTION: --------- When one charset is converted to another for comparision, the constructor of "Item_func_conv_charset" is called. This will attempt to use the Item_cache if the string is a constant. This check succeeds because the "used_table_map" of the Item_cache class is never set to the correct value. Since it is mistakenly assumed to be a constant, it tries to fetch the relevant null value related fields which are yet to be initialized. This results in valgrind issues and wrong results. The fix is to update the "used_table_map" of "Item_cache". This will allow "Item_func_conv_charset" to realise that this is not a constant. --- sql/item.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sql/item.h b/sql/item.h index 1c7cf7e6db5..c82d23b6d5a 100644 --- a/sql/item.h +++ b/sql/item.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -3024,7 +3024,11 @@ public: collation.set(item->collation); unsigned_flag= item->unsigned_flag; if (item->type() == FIELD_ITEM) + { cached_field= ((Item_field *)item)->field; + if (cached_field->table) + used_table_map= cached_field->table->map; + } return 0; }; enum Type type() const { return CACHE_ITEM; } From 85b128985362b1c98bc9122cfe0ca645d97daf0a Mon Sep 17 00:00:00 2001 From: V S Murthy Sidagam Date: Mon, 30 Mar 2015 19:20:14 +0530 Subject: [PATCH 20/38] Bug #20767962 5.1 SSL TESTS FAILING , GENERATE NEW CERTIFICATES Description: SSL tests are failing in mysql-5.1 pb2 Analysis: The SSL certificates are ended by jan 2015. Hence the SSL tests are failing. Fix: We have generated new certificates with SHA1 algorithm. --- mysql-test/r/openssl_1.result | 4 +- mysql-test/std_data/cacert.pem | 35 +++-- mysql-test/std_data/client-cert.pem | 95 ++++++++----- mysql-test/std_data/client-key.pem | 38 +++-- mysql-test/std_data/server-cert.pem | 90 ++++++++---- mysql-test/std_data/server-key.pem | 32 ++++- mysql-test/std_data/server8k-cert.pem | 183 +++++++++++++++++------- mysql-test/std_data/server8k-key.pem | 194 +++++++++++++------------- mysql-test/t/openssl_1.test | 4 +- 9 files changed, 423 insertions(+), 252 deletions(-) diff --git a/mysql-test/r/openssl_1.result b/mysql-test/r/openssl_1.result index b95c4bb0e76..4eb865c763c 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/O=MySQL AB"; -grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB" 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=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=Client"; +grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=Client" ISSUER "/C=SE/ST=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=CA"; 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 e44341384e4..b42a05dc87a 100644 --- a/mysql-test/std_data/cacert.pem +++ b/mysql-test/std_data/cacert.pem @@ -1,17 +1,22 @@ -----BEGIN CERTIFICATE----- -MIICrTCCAhagAwIBAgIJAMI7xZKjhrDbMA0GCSqGSIb3DQEBBAUAMEQxCzAJBgNV -BAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxhMREwDwYD -VQQKEwhNeVNRTCBBQjAeFw0xMDAxMjkxMTQ3MTBaFw0xNTAxMjgxMTQ3MTBaMEQx -CzAJBgNVBAYTAlNFMRAwDgYDVQQIEwdVcHBzYWxhMRAwDgYDVQQHEwdVcHBzYWxh -MREwDwYDVQQKEwhNeVNRTCBBQjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA -wQYsOEfrN4ESP3FjsI8cghE+tZVuyK2gck61lwieVxjgFMtBd65mI5a1y9pmlOI1 -yM4SB2Ppqcuw7/e1CdV1y7lvHrGNt5yqEHbN4QX1gvsN8TQauP/2WILturk4R4Hq -rKg0ZySu7f1Xhl0ed9a48LpaEHD17IcxWEGMMJwAxF0CAwEAAaOBpjCBozA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l6KZ6oYj +VEWSbLfmcMhUFQJdo/PXsJBl/SICWURP0pvRoZ/5Qic/VBdHmdltM+pfu15n0Wpd +7zAQo0Uo95i4lR2pDknPvD3EJjz5dRvPhq024pHo+n72DwIDAQABo1AwTjAdBgNV +HQ4EFgQUay8Rmt8Sh5YOKLDso0bNCBHnoHEwHwYDVR0jBBgwFoAUay8Rmt8Sh5YO +KLDso0bNCBHnoHEwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAKLCl +4lVEQyBpWuzAPE6xsayrbmGyO5mEzL8B4MWIiPkjVEemjGMNTa8mV7VUl/rgttru +hz3VhlWpw6tQTrExTqVWOafVOva4XiJ54hnshkqU2KXc4eX7PIG/eyAAphnj6hnX +QSWzDx+PKvidrJmyAqylVva3ApOO+5Sh5f/qw57id/Vy8xjtjeW2uWLG84iEVlPp ++sBWPjrM0EXGCZ470g19D35/JY6Gy+7e0Bk4RZuXITP+V7CdrjkDGu6w/zip7ukA +32snXHeaUwrp8mbDY0c9t5SVM8RlaqrtzUYid2+5RBCo3LYIypCBOYM2BMVFoy16 +T4B8hWXZ/t+ylnp+Mw== -----END CERTIFICATE----- diff --git a/mysql-test/std_data/client-cert.pem b/mysql-test/std_data/client-cert.pem index ee7f2ab281e..af298005f17 100644 --- a/mysql-test/std_data/client-cert.pem +++ b/mysql-test/std_data/client-cert.pem @@ -1,46 +1,69 @@ Certificate: Data: Version: 1 (0x0) - Serial Number: 1048577 (0x100001) - Signature Algorithm: md5WithRSAEncryption - Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=CA Validity - Not Before: Jan 29 11:50:22 2010 GMT - Not After : Jan 28 11:50:22 2015 GMT - Subject: C=SE, ST=Uppsala, O=MySQL AB + Not Before: Mar 27 13:59:18 2015 GMT + Not After : Feb 2 13:59:18 2025 GMT + Subject: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=Client Subject Public Key Info: Public Key Algorithm: rsaEncryption - Public-Key: (1024 bit) + Public-Key: (2048 bit) Modulus: - 00:cc:9a:37:49:13:66:dc:cf:e3:0b:13:a1:23:ed: - 78:db:4e:bd:11:f6:8c:0d:76:f9:a3:32:56:9a:f8: - a1:21:6a:55:4e:4d:3f:e6:67:9d:26:99:b2:cd:a4: - 9a:d2:2b:59:5c:d7:8a:d3:60:68:f8:18:bd:c5:be: - 15:e1:2a:3c:a3:d4:61:cb:f5:11:94:17:81:81:f7: - 87:8c:f6:6a:d2:ee:d8:e6:77:f6:62:66:4d:2e:16: - 8d:08:81:4a:c9:c6:4b:31:e5:b9:c7:8a:84:96:48: - a7:47:8c:0d:26:90:56:4e:e6:a5:6e:8c:b3:f2:9f: - fc:3d:78:9b:49:6e:86:83:77 + 00:9d:39:e4:6d:ce:1c:e0:7c:77:aa:9a:2b:94:db: + 53:48:2d:b5:77:6c:d3:63:73:b6:ff:b0:31:89:56: + 56:dd:fb:ce:ed:d8:94:f5:72:3d:4d:bf:a6:8b:43: + 64:f6:2d:66:5d:5a:77:3f:ae:cd:55:f0:02:03:0d: + ac:72:bf:7c:b6:a9:12:d7:fe:66:d6:ca:53:4e:95: + 0c:f2:a2:c1:2d:b2:d5:b0:d8:01:4e:07:89:ee:c8: + 9a:16:f5:1f:0b:4f:04:e3:dc:00:3a:2f:c4:20:ab: + 0f:f4:81:f1:e3:2e:ba:8f:4b:3d:cc:b2:7f:62:3a: + 3e:e9:ef:dd:2b:40:99:b5:98:2d:8f:2a:00:20:34: + de:6a:7a:66:fa:c8:8c:b2:c3:ad:7d:4d:31:d0:ba: + 35:ee:9d:c7:e3:25:48:02:6d:72:07:d0:ce:db:3b: + 7d:83:60:07:39:1a:76:4f:69:23:f3:45:30:07:bd: + eb:c9:b9:ca:91:dd:21:65:ac:e4:53:ad:10:08:71: + bd:74:15:56:a7:d6:d7:d8:fc:91:ac:53:c3:50:86: + 9f:53:1e:a7:f3:c5:bd:17:bd:fd:0f:6c:b4:c0:c8: + 7b:e6:dd:69:c2:f6:07:09:e4:a1:6f:a7:c7:03:b9: + b8:d9:aa:eb:95:b5:37:2f:cb:8e:fc:55:f0:ad:c7: + 33:f3 Exponent: 65537 (0x10001) - Signature Algorithm: md5WithRSAEncryption - 5e:1f:a3:53:5f:24:13:1c:f8:28:32:b0:7f:69:69:f3:0e:c0: - 34:87:10:03:7d:da:15:8b:bd:19:b8:1a:56:31:e7:85:49:81: - c9:7f:45:20:74:3e:89:c0:e0:26:84:51:cc:04:16:ce:69:99: - 01:e1:26:99:b3:e3:f5:bd:ec:5f:a0:84:e4:38:da:75:78:7b: - 89:9c:d2:cd:60:95:20:ba:8e:e3:7c:e6:df:76:3a:7c:89:77: - 02:94:86:11:3a:c4:61:7d:6f:71:83:21:8a:17:fb:17:e2:ee: - 02:6b:61:c1:b4:52:63:d7:d8:46:b2:c5:9c:6f:38:91:8a:35: - 32:0b + Signature Algorithm: sha1WithRSAEncryption + 2b:f5:95:a5:83:87:9b:c3:77:57:10:e0:64:0f:3a:6a:a6:5f: + 9a:dd:16:b3:71:b1:0c:d7:59:93:ff:89:9f:d0:50:de:cd:c8: + d5:a3:2a:1c:6e:e1:0b:82:e4:ae:57:1b:13:c9:c6:ea:09:21: + 7f:5b:ff:3d:8d:77:25:a8:ed:a8:7c:9d:95:b0:55:60:fc:19: + f3:4f:3f:73:1f:72:d8:2e:c7:c6:bb:16:1d:33:07:bf:ea:6b: + dc:5f:5d:d0:53:2e:b2:96:ad:ea:64:5f:cb:f4:8c:7a:16:bb: + cf:42:b8:f0:9e:33:cb:29:f5:a7:4e:af:b2:a2:a6:4f:8e:6d: + 85:a1:63:43:aa:dd:11:1d:b2:80:ae:22:6a:b2:4b:0c:27:3c: + b4:59:d1:b4:77:48:69:ff:3b:e0:48:e8:3c:3f:df:14:43:80: + 68:97:06:fa:56:d6:dd:a3:7c:d0:0d:06:3a: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CQYDVQQDDAJDQTAeFw0xNTAzMjcxMzU5MTha +Fw0yNTAyMDIxMzU5MThaMGcxCzAJBgNVBAYTAlNFMRIwEAYDVQQIDAlTdG9ja2hv +bG0xEjAQBgNVBAcMCVN0b2NraG9sbTEPMA0GA1UECgwGT3JhY2xlMQ4wDAYDVQQL +DAVNeVNRTDEPMA0GA1UEAwwGQ2xpZW50MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A +MIIBCgKCAQEAnTnkbc4c4Hx3qporlNtTSC21d2zTY3O2/7AxiVZW3fvO7diU9XI9 +Tb+mi0Nk9i1mXVp3P67NVfACAw2scr98tqkS1/5m1spTTpUM8qLBLbLVsNgBTgeJ +7siaFvUfC08E49wAOi/EIKsP9IHx4y66j0s9zLJ/Yjo+6e/dK0CZtZgtjyoAIDTe +anpm+siMssOtfU0x0Lo17p3H4yVIAm1yB9DO2zt9g2AHORp2T2kj80UwB73rybnK +kd0hZazkU60QCHG9dBVWp9bX2PyRrFPDUIafUx6n88W9F739D2y0wMh75t1pwvYH +CeShb6fHA7m42arrlbU3L8uO/FXwrccz8wIDAQABMA0GCSqGSIb3DQEBBQUAA4IB +AQAr9ZWlg4ebw3dXEOBkDzpqpl+a3RazcbEM11mT/4mf0FDezcjVoyocbuELguSu +VxsTycbqCSF/W/89jXclqO2ofJ2VsFVg/BnzTz9zH3LYLsfGuxYdMwe/6mvcX13Q +Uy6ylq3qZF/L9Ix6FrvPQrjwnjPLKfWnTq+yoqZPjm2FoWNDqt0RHbKAriJqsksM +Jzy0WdG0d0hp/zvgSOg8P98UQ4Bolwb6Vtbdo3zQDQY6oxNv0AnSLolbuCI/1drn +TGnqVQPvXlVJGKUatL4baLRl0GSrKZ2BXwUxCA8Sucluji61j9TpVZQw5RPUhK1O +FWJ5MjboZ7ASFHPAvJlEz7L7 -----END CERTIFICATE----- diff --git a/mysql-test/std_data/client-key.pem b/mysql-test/std_data/client-key.pem index 205b5f31cb9..116e5324e3d 100644 --- a/mysql-test/std_data/client-key.pem +++ b/mysql-test/std_data/client-key.pem @@ -1,15 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIICXQIBAAKBgQDMmjdJE2bcz+MLE6Ej7XjbTr0R9owNdvmjMlaa+KEhalVOTT/m -Z50mmbLNpJrSK1lc14rTYGj4GL3FvhXhKjyj1GHL9RGUF4GB94eM9mrS7tjmd/Zi -Zk0uFo0IgUrJxksx5bnHioSWSKdHjA0mkFZO5qVujLPyn/w9eJtJboaDdwIDAQAB -AoGASqk/4We2En+93y3jkIO4pXafIe3w/3zZ7caRue1ehx4RUQh5d+95djuB9u7J -HEZ7TpjM7QNyao5EueL6gvbxt0LXFvqAMni7yM9tt/HUYtHHPqYiRtUny9bKYFTm -l8szCCMal/wD9GZU9ByHDNHm7tHUMyMhARNTYSgx+SERFmECQQD/6jJocC4SXf6f -T3LqimWR02lbJ7qCoDgRglsUXh0zjrG+IIiAyE+QOCCx1GMe3Uw6bsIuYwdHT6as -WcdPs04xAkEAzKulvEvLVvN5zfa/DTYRTV7jh6aDleOxjsD5oN/oJXoACnPzVuUL -qQQMNtuAXm6Q1QItrRxpQsSKbY0UQka6JwJBAOSgoNoG5lIIYTKIMvzwGV+XBLeo -HYsXgh+6Wo4uql3mLErUG78ZtWL9kc/tE4R+ZdyKGLaCR/1gXmH5bwN4B/ECQEBb -uUH8k3REG4kojesZlVc+/00ojzgS4UKCa/yqa9VdB6ZBz8MDQydinnShkTwgiGpy -xOoqhO753o2UT0qH8wECQQC99IEJWUnwvExVMkLaZH5NjAFJkb22sjkmuT11tAgU -RQgOMoDOm6driojnOnDWOkx1r1Gy9NgMLooduja4v6cx +MIIEowIBAAKCAQEAnTnkbc4c4Hx3qporlNtTSC21d2zTY3O2/7AxiVZW3fvO7diU +9XI9Tb+mi0Nk9i1mXVp3P67NVfACAw2scr98tqkS1/5m1spTTpUM8qLBLbLVsNgB +TgeJ7siaFvUfC08E49wAOi/EIKsP9IHx4y66j0s9zLJ/Yjo+6e/dK0CZtZgt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JsAcoyR5zZ6Sdgzmv34B7Rr1Go+x+2b +gWjtphEbvLr1bAjYFgX1zZwL6XMsdJjVh0KikfqLwNQpxCJNctUxjkENsfUCiKNG +6zLuVNP3p8qGS56OkkDsS8Lpq92YkObmCUNAn6DXDZG//dcP6qSR5z71X68MiH4b +208OQQKBgD4jDHG/+nZnxdv3cpzqzkkIZv51uShqa5S+0kiMOEM4ry35RMmdMtko +4yh+KNa5aZDMKRGZxBCRfTUQZd779YbRtRVzfoewXXrDyhIhD1E4O691+vTTj9sD +LdsbyJ03r+moqTtQVDXEZeueapLLGeMsQp9QtIviLclbJRDpiolR -----END RSA PRIVATE KEY----- diff --git a/mysql-test/std_data/server-cert.pem b/mysql-test/std_data/server-cert.pem index 5922fe7ded7..cf6a4e1ee80 100644 --- a/mysql-test/std_data/server-cert.pem +++ b/mysql-test/std_data/server-cert.pem @@ -1,41 +1,69 @@ Certificate: Data: Version: 1 (0x0) - Serial Number: 1048578 (0x100002) - Signature Algorithm: md5WithRSAEncryption - Issuer: C=SE, ST=Uppsala, L=Uppsala, O=MySQL AB + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=CA Validity - Not Before: Jan 29 11:56:49 2010 GMT - Not After : Jan 28 11:56:49 2015 GMT - Subject: C=SE, ST=Uppsala, O=MySQL AB, CN=localhost + Not Before: Mar 27 13:57:20 2015 GMT + Not After : Feb 2 13:57:20 2025 GMT + Subject: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=localhost Subject Public Key Info: Public Key Algorithm: rsaEncryption - Public-Key: (512 bit) + Public-Key: (2048 bit) Modulus: - 00:cd:e4:87:51:9d:72:11:a0:d1:fa:f3:92:8b:13: - 1c:eb:f7:e2:9a:2f:72:a8:d6:65:48:d1:69:af:1b: - c0:4c:13:e5:60:60:51:41:e9:ab:a6:bc:13:bb:0c: - 5e:32:7c:d9:6c:9e:cd:05:24:84:78:db:80:91:2e: - d8:88:2b:c2:ed + 00:f0:b9:fc:2f:f1:39:66:9c:4a:cd:04:95:80:67: + 48:03:6b:af:04:51:a6:80:94:13:ff:24:98:e6:38: + 5a:37:da:70:26:1a:32:d2:0f:65:3f:79:82:a1:ad: + f8:79:02:e1:35:bc:2e:51:c5:f1:e6:21:5b:9f:74: + 67:5a:54:e2:f9:3f:8c:cd:67:ae:f4:d3:ba:13:24: + 7f:8b:45:09:df:25:a5:c1:31:e8:d4:a2:07:f3:3c: + 9c:9e:cb:fd:a4:1a:d2:ed:9f:de:c7:1e:e8:0b:d9: + 42:15:52:96:f8:1d:ca:bd:ab:92:e7:7c:15:23:af: + 82:2e:dd:d3:e6:66:96:6e:89:75:01:51:d8:28:73: + cb:9e:a1:25:2e:f1:fe:b4:d4:87:61:5e:96:14:22: + 05:6a:22:1d:02:30:e9:27:5d:85:a8:23:e2:88:52: + e8:3d:5a:7f:16:53:b9:7c:d9:58:bc:fb:fd:2a:2c: + 7c:68:0b:c2:3a:2e:0c:27:81:41:ce:66:cd:36:ac: + 11:2a:fb:cc:e1:a4:d4:1f:4e:0a:e5:7b:26:ef:4e: + 21:cd:ab:59:79:50:06:bb:54:a6:b1:37:1f:bd:87: + 5c:ab:eb:50:c0:b7:b9:60:a8:ce:1c:24:a1:47:51: + e9:1a:fa:72:1e:53:fe:ad:68:3b:a7:29:58:96:bb: + 24:1d Exponent: 65537 (0x10001) - Signature Algorithm: md5WithRSAEncryption - 73:ce:9c:6e:39:46:b4:14:be:da:3f:f3:1b:ba:90:bc:23:43: - d7:82:2a:70:4e:a6:d9:5a:65:5c:b7:df:71:df:75:77:c5:80: - a4:af:fa:d2:59:e2:fd:c9:9c:f0:98:95:8e:69:a9:8c:7c:d8: - 6f:48:d2:e3:36:e0:cd:ff:3f:d1:a5:e6:ab:75:09:c4:50:10: - c4:96:dd:bf:3b:de:32:46:da:ca:4a:f1:d6:52:8a:33:2f:ab: - f5:2e:70:3f:d4:9c:be:00:c8:03:f9:39:8a:df:5b:70:3c:40: - ef:03:be:7c:3d:1d:32:32:f3:51:81:e2:83:30:6e:3d:38:9b: - fb:3c + Signature Algorithm: sha1WithRSAEncryption + 95:6f:51:cb:fe:5e:c5:bc:49:49:4f:c8:e9:db:35:80:34:b2: + 9c:e1:66:63:7b:48:19:b6:14:53:7d:fd:e4:80:f9:63:cd:a6: + 75:77:c4:80:6c:6b:8e:25:6f:be:d1:d1:1c:4b:6b:6e:3d:e2: + db:99:f5:0e:a9:df:59:1d:f9:9a:06:70:52:19:e8:b2:5f:95: + 3c:e3:75:f8:0c:1e:58:d5:ba:c0:99:9f:b1:ac:b8:74:8e:fd: + 95:85:0b:2d:29:e7:70:32:d8:b2:b8:e4:47:cd:b6:59:78:85: + e1:f0:ab:89:3e:c5:82:f2:b1:6e:e5:0f:90:3e:6e:9d:62:53: + b2:77:7e:54:62:fd:a5:0a:29:3c:65:3c:43:0c:49:95:a4:61: + ef:55:79:f3:72:0b:5d:0d:1f:a0:ac:04:4c:f5:38:34:6c:c3: + 9e:e4:e5:ef:56:01:29:b1:96:fe:fe:a1:9c:ea:88:84:ff:1f: + 26:d0:38:59:65:cf:33:86:11:10:51:5c:19:ef:c6:2a:39:91: + 5e:4c:d2:8c:30:cb:1f:07:f7:c5:c7:dc:1d:4b:4c:6e:c7:74: + 63:2f:a0:de:bf:13:b6:6b:bd:07:3e:60:62:5f:37:ed:f5:69: + 4a:4d:b1:80:02:1d:dc:b7:8a:b8:ba:14:f6:da:86:08:69:af: + 9f:d9:d8:1a -----BEGIN CERTIFICATE----- -MIIBtzCCASACAxAAAjANBgkqhkiG9w0BAQQFADBEMQswCQYDVQQGEwJTRTEQMA4G -A1UECBMHVXBwc2FsYTEQMA4GA1UEBxMHVXBwc2FsYTERMA8GA1UEChMITXlTUUwg -QUIwHhcNMTAwMTI5MTE1NjQ5WhcNMTUwMTI4MTE1NjQ5WjBGMQswCQYDVQQGEwJT -RTEQMA4GA1UECBMHVXBwc2FsYTER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TUH04K5Xsm704hzatZeVAGu1SmsTcfvYdcq+tQ +wLe5YKjOHCShR1HpGvpyHlP+rWg7pylYlrskHQIDAQABMA0GCSqGSIb3DQEBBQUA +A4IBAQCVb1HL/l7FvElJT8jp2zWANLKc4WZje0gZthRTff3kgPljzaZ1d8SAbGuO +JW++0dEcS2tuPeLbmfUOqd9ZHfmaBnBSGeiyX5U843X4DB5Y1brAmZ+xrLh0jv2V +hQstKedwMtiyuORHzbZZeIXh8KuJPsWC8rFu5Q+QPm6dYlOyd35UYv2lCik8ZTxD +DEmVpGHvVXnzcgtdDR+grARM9Tg0bMOe5OXvVgEpsZb+/qGc6oiE/x8m0DhZZc8z +hhEQUVwZ78YqOZFeTNKMMMsfB/fFx9wdS0xux3RjL6DevxO2a70HPmBiXzft9WlK +TbGAAh3ct4q4uhT22oYIaa+f2dga -----END CERTIFICATE----- diff --git a/mysql-test/std_data/server-key.pem b/mysql-test/std_data/server-key.pem index 1083495cb96..9f50d5479e1 100644 --- a/mysql-test/std_data/server-key.pem +++ b/mysql-test/std_data/server-key.pem @@ -1,9 +1,27 @@ -----BEGIN RSA PRIVATE KEY----- -MIIBOwIBAAJBAM3kh1GdchGg0frzkosTHOv34povcqjWZUjRaa8bwEwT5WBgUUHp -q6a8E7sMXjJ82WyezQUkhHjbgJEu2Igrwu0CAwEAAQJBAJuwhFbF3NzRpBbEmnqJ -4GPa1UJMQMLFJF+04tqj/HxJcAIVhOJhGmmtYNw1yjz/ZsPnfJCMz4eFOtdjvGtf -peECIQDmFFg2WLvYo+2m9w9V7z4ZIkg7ixYkI/ObUUctfZkPOQIhAOUWnrvjFrAX -bIvYT/YR50+3ZDLEc51XxNgJnWqWYl1VAiEAnTOFWgyivFC1DgF8PvDp8u5TgCt2 -A1d1GMgd490O+TECIC/WMl0/hTxOF9930vKqOGf//o9PUGkZq8QE9fcM4gtlAiAE -iOcFpnLjtWj57jrhuw214ucnB5rklkQQe+AtcARNkg== +MIIEowIBAAKCAQEA8Ln8L/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4E1KncqJbzFsRwQIk ++XGiCtUAulbfINxWbO76Ao5F3CO55YudM1qp9f0IVMo/olKcK2CNmPItO6wWAXZq +vSSeTkyB7NYWNsKaKUfjJw2NRSvRkeGgDc5yud02ZCoPSHrYl//npVq1x+KsA8DM +BnfISgYFaTodEoWfdt8ivQKBgHnYk5nMMZ4yGpQfin3zooJmaTUHGZP3BP3aPVMo +zxXl2g3qXB1WN/eKx3Syn7qo5rfWx3NiagPPSjyPvDu1qn2AD/zxgDGbOlZCnlwY +BeOH39SJsrGc8b9OfcIM+tRA6oyOcH/h9To9GcJoZoGEaMpvprxCqw8uCUa3VXDr +opChAoGBANSzQ/rRwKhd7nMu5LyAFuP8AnpPQj99psWfIvsVtW7CCUm+lhaYAoKm +qffCX2FmXbiZVqF9oEwTTGkjmxQ0uwphiNowQqeWaf4P3khsA57Fon1EoZnYj/f+ +5j7FlBwBZLFEx66bW18B8YdiZ7r5ufmE4XlfG1pkYi8ki0rPRwZR -----END RSA PRIVATE KEY----- diff --git a/mysql-test/std_data/server8k-cert.pem b/mysql-test/std_data/server8k-cert.pem index e71ba5722b9..1634513c6c9 100644 --- a/mysql-test/std_data/server8k-cert.pem +++ b/mysql-test/std_data/server8k-cert.pem @@ -1,51 +1,136 @@ +Certificate: + Data: + Version: 1 (0x0) + Serial Number: 1 (0x1) + Signature Algorithm: sha1WithRSAEncryption + Issuer: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=CA + Validity + Not Before: Mar 30 07:11:43 2015 GMT + Not After : Feb 5 07:11:43 2025 GMT + Subject: C=SE, ST=Stockholm, L=Stockholm, O=Oracle, OU=MySQL, CN=Server + Subject Public Key Info: + Public Key Algorithm: rsaEncryption + Public-Key: (8192 bit) + Modulus: + 00:cb:27:2b:78:87:51:ee:f3:8e:4f:f8:34:dc:08: + 72:4a:5b:6d:dd:85:9a:b9:12:47:4f:31:0f:00:78: + d6:a3:c8:1f:e4:fa:45:48:af:fc:12:0b:f0:0e:0f: + 34:d7:c9:2d:cb:db:20:a5:5c:9e:79:ea:56:bb:0f: + 28:11:8d:1e:a9:21:2e:0d:97:87:db:ac:e8:8d:78: + b9:67:c2:d6:2b:b0:3d:92:60:83:7f:05:1a:0c:f3: + 89:d7:73:46:3b:d4:db:76:0a:4b:d6:59:45:72:55: + 56:84:06:0c:59:bb:fe:7c:34:78:2f:9a:b3:06:50: + 96:26:ae:79:d5:28:2f:c2:01:c7:de:73:fc:51:42: + 7d:9f:3c:f1:88:d8:6c:23:c1:7f:e7:40:62:72:fa: + 9a:f9:49:b5:af:48:77:5e:7c:64:54:37:5f:1e:17: + 2e:42:4b:e1:77:4f:2e:38:ef:fc:d1:16:92:4f:18: + 39:7b:18:9b:a3:76:d0:59:7f:6c:0d:fc:d6:06:8b: + e4:dc:0a:11:5b:9b:da:02:d2:72:eb:5e:ae:e8:22: + 76:40:5e:18:ab:f9:28:09:3a:06:fa:1d:84:a1:50: + 17:04:5d:e2:c0:41:4e:3f:44:08:07:24:59:a8:6c: + 4e:e0:f5:32:a6:90:eb:75:80:a0:dd:f3:b7:02:9d: + ab:7a:58:03:db:4a:d7:86:9f:9f:7c:45:ea:20:df: + 25:4a:63:09:0d:12:95:53:d2:03:4a:02:80:62:5e: + 42:ec:3e:d5:b3:5d:d4:98:7b:22:a1:87:df:13:7f: + 77:c8:f7:35:db:e8:b9:39:f6:a0:75:83:8e:34:3f: + 3c:6f:37:3d:00:7d:bc:67:02:b1:76:ae:1e:ce:8b: + be:c6:ae:8e:dd:f5:f6:e4:f3:71:58:8d:1e:b9:8d: + 3d:15:79:a0:34:86:61:fb:f0:ca:14:05:44:c0:96: + b2:cc:26:61:4d:61:cb:d5:a4:62:fb:3e:30:04:9a: + ba:90:4e:78:2f:c4:25:98:be:56:f6:f9:72:3f:3a: + df:24:c0:d0:07:1a:51:94:31:8e:5f:0b:d9:56:5e: + f0:b0:59:2a:ee:31:b1:4e:f9:62:df:6a:2e:07:55: + 31:7c:54:76:31:c7:96:84:9b:91:6d:51:a0:2e:2c: + db:3a:9c:78:f3:28:db:90:4d:94:e5:d7:71:da:e4: + 6b:97:06:a3:9b:ae:09:a4:3d:2b:3c:c8:9d:d5:b9: + dd:88:e2:6f:70:7d:b7:b9:e2:e8:97:52:65:ea:96: + 25:50:c2:41:10:81:3c:2a:fd:05:66:70:e0:61:97: + 04:fd:b2:97:42:d0:5d:86:69:4d:7e:45:eb:7a:de: + 68:ba:81:10:08:e8:fe:cd:aa:28:7d:8d:7d:e1:88: + 62:6b:ae:f0:1e:1b:59:e8:73:2d:62:8c:8b:69:b7: + 32:d8:ed:53:10:c3:c0:1c:c6:ca:7a:80:48:7f:9e: + 43:96:8b:e6:44:3b:20:57:86:d0:43:c5:e5:d4:cd: + ae:48:34:1a:fe:92:4e:e1:d4:15:5e:e0:32:be:c3: + 6c:d6:e7:2d:40:b9:3f:30:f8:4f:2f:35:8a:69:9a: + 6e:58:0f:09:32:a1:e1:cb:10:87:e5:36:80:d6:b1: + 92:c7:d0:ff:3a:6e:c7:60:c7:05:f7:be:8a:f9:d7: + a1:7f:39:32:90:61:59:cf:56:49:94:aa:93:37:75: + 0a:80:9e:bd:aa:28:25:15:88:8c:4c:41:21:f9:e0: + ce:52:3d:79:4a:fe:a5:7f:33:09:0d:6d:d0:2b:26: + 44:5d:4f:84:88:1a:68:11:04:89:65:f3:89:7f:99: + a3:e8:00:bd:11:ac:28:20:7e:2b:c3:a4:7e:8c:97: + 44:f0:cf:fd:4d:ae:1c:6c:27:08:30:a6:5b:90:b8: + 97:a0:c0:6e:de:83:cf:1a:63:48:1b:9c:fb:98:51: + 04:77:86:86:d3:b8:8a:de:31:b9:62:7a:19:be:0a: + 26:4c:b8:d7:c8:f5:0d:37:2a:c5:c0:25:e0:36:5d: + f8:a2:78:05:ca:1b:cb:dd:79:e8:df:83:ff:ff:02: + ab:30:c6:2f:4c:ce:7e:00:e4:85:1a:b5:db:40:12: + 70:e2:24:f2:4c:8c:95:66:20:a4:25:b1:e5:1a:a2: + e3:4f:1b:09:9e:8c:02:24:af:ed:a5:97:f6:35:e4: + 76:85:c8:a3:36:b3:a3:b1:eb:da:94:0b:c9:40:3e: + 4e:79:04:08:c0:f5:01:a4:5a:91:3b:4a:48:42:c6: + 37:29:13:f6:22:8a:f7:50:7d:57:c4:72:c3:10:8a: + 9e:20:d7:96:c1:02:5e:59:00:a5:cf:85:b3:59:93: + 23:68:5d:a3:cc:a6:8f:6b:c8:16:e5:ba:6d:31:1e: + 1b:f4:3d:8a:10:3f:87:f8:73:8e:9a:9c:1f:74:18: + ab:96:ba:48:7c:25:5c:d5:71:42:48:ff:c5:96:d5: + 20:94:3f:f2:15:ad:a0:ae:de:7b:93:bb:45:e9:8e: + b8:da:10:64:8f:6b:c8:e4:68:6d:85:6d:d6:b1:09: + 7c:60:7d:dc:5f:ef:6a:f1:ea:c4:ee:28:33:be:45: + a1:d0:b3:f9:81:a9:39:e6:ac:c8:17:39:2a:51:3a: + b2:52:88:b7:10:38:ad:5d:58:ab:69:5a:6a:4e:f1: + 1f:13:e3:ce:0d:e8:cb:14:41:72:fd:eb:e7:58:53: + 5c:6f:c7:d0:1d + Exponent: 65537 (0x10001) + Signature Algorithm: sha1WithRSAEncryption + ac:c4:13:9a:ff:83:5c:31:27:b8:57:eb:20:7b:51:34:e9:91: + 6c:52:14:9d:91:1f:75:bc:e1:08:7c:7f:e0:ff:88:20:06:78: + 8c:84:2a:af:c4:85:9c:63:40:c2:3f:39:10:65:f3:41:a5:22: + f6:e2:ec:58:ff:cd:ab:60:cb:89:a9:6a:90:26:18:06:b9:85: + 9f:7c:99:f9:cf:6b:93:b7:d4:1d:89:6d:17:90:fa:b3:55:a6: + d0:9e:4e:51:e4:17:1f:6e:c3:fb:c3:a1:a2:15:35:77:f0:da: + 71:31:61:ee:1f:00:54:8d:2f:24:0a:cc:93:d2:9e:42:23:c6: + 5b:57:cb:39:b6:be:c0:dd:3a:8f:57:1a:10:b3:48:5a:1b:ea: + e7:7d:16:b2:1e:b5:86:be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Y/82rYMuJqWqQJhgGuYWffJn5z2uTt9QdiW0XkPqzVabQnk5R +5BcfbsP7w6GiFTV38NpxMWHuHwBUjS8kCsyT0p5CI8ZbV8s5tr7A3TqPVxoQs0ha +G+rnfRayHrWGvsm1jOimYlKZ9Ya/454SMt1aIcgg3FjlZjzBXjMbNtf8S0gIISur +xRlipEaQVWyEfSCpIZyumho/G/gfNkLjQ4lhyNLGkVt1JJfsckEwgKrS0TdgqGws +2/5KUG2L1dqGTFryis/9IYqU -----END CERTIFICATE----- diff --git a/mysql-test/std_data/server8k-key.pem b/mysql-test/std_data/server8k-key.pem index 99e7417733e..5e504c116e4 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----- -MIISKQIBAAKCBAEA6h3v1OWb9I9U/Z8diBu/xYGS8NCTD3ZESboHxVI2qSECPgxN -NcG8Lh0ktQdgYcOe64MnDTZX0Bibm47hoDldrAlTSffFxQhylqBBoXxDF+LrhXIq -Cz7K0PsK+bYusL9ezJ7PETDnCT7oy95q4GXbKsutbNsm9if4ZE41gs2KnoU2DA7k -vMmkKojrMIL4+BqTXA20LLo0iSbgvUTvpSJw4u96BeyzMNnxK2wP5vvTtUo5hACb -fU87YjaSKs+q2VXCzfyYGZk1L1xk5GUI0bP+jutf1dDzNttW2/q2Nf5rxx09Gh/G -wmOnEk1O7cOZ8VQCsOHirIM39NuSARsY6Y3G5XM4k2W4nxyR/RtdG9bvs/33aGsZ -5V5yp7WSs8s9HHwaCPSsUiLKckQ7uA0TTRgbeweMrrLKovG57jsbBBB8pQD4PRd3 -1qgxCdstWXHiWwRyI8vOLWENPXPFqA/rJwwqNdWTogy38aqVXxGYR8PIwjA2OaIw -FjwGZcsPNLqw6bgAN8O2UBqZHWiMF8mi7brvioDvAIufZuqa2SqT/At45H83psQ6 -R4FsxZt6SAK7EsdPo8OYTrY1i4iPZd/eKhnEu2srEZgsKRwY5H1m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pzOb7PcHMFqvmm03bY5Dt80hh2pfG6n0K1E2pFVNA8NY087j9Y +tZcG7uDHU2erOFP3h0B6iwhvDj3znu859BzBIW4oaz/RKepIpkFTL0wwPGs= -----END RSA PRIVATE KEY----- diff --git a/mysql-test/t/openssl_1.test b/mysql-test/t/openssl_1.test index d5fbde1d9d4..0e1277e5b82 100644 --- a/mysql-test/t/openssl_1.test +++ b/mysql-test/t/openssl_1.test @@ -15,8 +15,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/O=MySQL AB"; -grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Uppsala/O=MySQL AB" 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=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=Client"; +grant select on test.* to ssl_user4@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "/C=SE/ST=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=Client" ISSUER "/C=SE/ST=Stockholm/L=Stockholm/O=Oracle/OU=MySQL/CN=CA"; grant select on test.* to ssl_user5@localhost require cipher "DHE-RSA-AES256-SHA" AND SUBJECT "xxx"; flush privileges; From 232d8bbdb165260ba8eca51565067a93659bea6f Mon Sep 17 00:00:00 2001 From: aditya Date: Mon, 6 Apr 2015 12:27:12 +0530 Subject: [PATCH 21/38] Bug #17299181 CREATE_TIME AND UPDATE_TIME ARE WRONG FOR PARTITIONED TABLES PROBLEM Create time is calculated as last status change time of .frm file. The first problem was that innodb was passing file name as "table_name#po#p0.frm" to the stat() call which calculates the create time. Since there is no frm file with this name create_time will be stored as NULL. The second problem is ha_partition::info() updates stats for create time when HA_STATUS_CONST flag was set ,where as innodb calculates this statistic when HA_STATUS_TIME is set,which causes create_time to be set as NULL. Fix Pass proper .frm name to stat() call and calculate create time when HA_STATUS_CONST flag is set. --- mysql-test/r/partition_innodb.result | 23 +++++++++++++++++------ mysql-test/t/partition_innodb.test | 24 ++++++++++++++++++------ storage/innobase/handler/ha_innodb.cc | 25 ++++++++++++++----------- 3 files changed, 49 insertions(+), 23 deletions(-) diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result index 516d824b343..f2f66a86c7d 100644 --- a/mysql-test/r/partition_innodb.result +++ b/mysql-test/r/partition_innodb.result @@ -365,33 +365,33 @@ DROP TABLE t1; create table t1 (a int) engine=innodb partition by hash(a) ; show table status like 't1'; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL NULL NULL NULL latin1_swedish_ci NULL partitioned +t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned drop table t1; create table t1 (a int) engine = innodb partition by key (a); show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL NULL NULL NULL latin1_swedish_ci NULL partitioned +t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned insert into t1 values (0), (1), (2), (3); show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 InnoDB 10 Compact 4 4096 16384 0 0 # NULL NULL NULL NULL latin1_swedish_ci NULL partitioned +t1 InnoDB 10 Compact 4 4096 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned drop table t1; create table t1 (a int auto_increment primary key) engine = innodb partition by key (a); show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 InnoDB 10 Compact 2 8192 16384 0 0 # 1 NULL NULL NULL latin1_swedish_ci NULL partitioned +t1 InnoDB 10 Compact 2 8192 16384 0 0 # 1 # NULL NULL latin1_swedish_ci NULL partitioned insert into t1 values (NULL), (NULL), (NULL), (NULL); show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 InnoDB 10 Compact 4 4096 16384 0 0 # 5 NULL NULL NULL latin1_swedish_ci NULL partitioned +t1 InnoDB 10 Compact 4 4096 16384 0 0 # 5 # NULL NULL latin1_swedish_ci NULL partitioned insert into t1 values (NULL), (NULL), (NULL), (NULL); show table status; Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment -t1 InnoDB 10 Compact 8 2048 16384 0 0 # 9 NULL NULL NULL latin1_swedish_ci NULL partitioned +t1 InnoDB 10 Compact 8 2048 16384 0 0 # 9 # NULL NULL latin1_swedish_ci NULL partitioned drop table t1; create table t1 (a int) partition by key (a) @@ -572,3 +572,14 @@ a b 1 2 0 1 DROP TABLE t1; +# +# Bug #17299181 CREATE_TIME AND UPDATE_TIME ARE +# WRONG FOR PARTITIONED TABLES +# +CREATE TABLE t1 (a int, PRIMARY KEY (a)) ENGINE=InnoDB +PARTITION BY HASH (a) PARTITIONS 2; +SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE +CREATE_TIME IS NOT NULL AND TABLE_NAME='t1'; +COUNT(*) +1 +DROP TABLE t1; diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test index ceb06cb2f12..a290edf9094 100644 --- a/mysql-test/t/partition_innodb.test +++ b/mysql-test/t/partition_innodb.test @@ -387,7 +387,7 @@ DROP TABLE t1; create table t1 (a int) engine=innodb partition by hash(a) ; # Data_free for InnoDB tablespace varies depending on which # tests have been run before this one ---replace_column 10 # +--replace_column 10 # 12 # show table status like 't1'; drop table t1; @@ -399,12 +399,12 @@ engine = innodb partition by key (a); # Data_free for InnoDB tablespace varies depending on which # tests have been run before this one ---replace_column 10 # +--replace_column 10 # 12 # show table status; insert into t1 values (0), (1), (2), (3); # Data_free for InnoDB tablespace varies depending on which # tests have been run before this one ---replace_column 10 # +--replace_column 10 # 12 # show table status; drop table t1; @@ -413,17 +413,17 @@ engine = innodb partition by key (a); # Data_free for InnoDB tablespace varies depending on which # tests have been run before this one ---replace_column 10 # +--replace_column 10 # 12 # show table status; insert into t1 values (NULL), (NULL), (NULL), (NULL); # Data_free for InnoDB tablespace varies depending on which # tests have been run before this one ---replace_column 10 # +--replace_column 10 # 12 # show table status; insert into t1 values (NULL), (NULL), (NULL), (NULL); # Data_free for InnoDB tablespace varies depending on which # tests have been run before this one ---replace_column 10 # +--replace_column 10 # 12 # show table status; drop table t1; @@ -660,3 +660,15 @@ ALTER TABLE t1 ADD UNIQUE KEY (b); SHOW CREATE TABLE t1; SELECT * FROM t1; DROP TABLE t1; +--echo # +--echo # Bug #17299181 CREATE_TIME AND UPDATE_TIME ARE +--echo # WRONG FOR PARTITIONED TABLES +--echo # + +CREATE TABLE t1 (a int, PRIMARY KEY (a)) ENGINE=InnoDB +PARTITION BY HASH (a) PARTITIONS 2; + +SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE +CREATE_TIME IS NOT NULL AND TABLE_NAME='t1'; + +DROP TABLE t1; diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 6ec7586779a..b8ec8f60f28 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -8172,17 +8172,6 @@ ha_innobase::info_low( prebuilt->trx->op_info = "returning various info to MySQL"; } - my_snprintf(path, sizeof(path), "%s/%s%s", - mysql_data_home, ib_table->name, reg_ext); - - unpack_filename(path,path); - - /* Note that we do not know the access time of the table, - nor the CHECK TABLE time, nor the UPDATE or INSERT time. */ - - if (os_file_get_status(path,&stat_info)) { - stats.create_time = (ulong) stat_info.ctime; - } } if (flag & HA_STATUS_VARIABLE) { @@ -8379,6 +8368,20 @@ ha_innobase::info_low( } dict_table_stats_unlock(ib_table, RW_S_LATCH); + + my_snprintf(path, sizeof(path), "%s/%s%s", + mysql_data_home, + table->s->normalized_path.str, + reg_ext); + + unpack_filename(path,path); + + /* Note that we do not know the access time of the table, + nor the CHECK TABLE time, nor the UPDATE or INSERT time. */ + + if (os_file_get_status(path,&stat_info)) { + stats.create_time = (ulong) stat_info.ctime; + } } if (srv_force_recovery >= SRV_FORCE_NO_IBUF_MERGE) { From e65f3f6f2e35d92fd1395f7c5b02184c739c5fc7 Mon Sep 17 00:00:00 2001 From: Nisha Date: Mon, 6 Apr 2015 14:12:15 +0530 Subject: [PATCH 22/38] BUG#20754369: BACKPORT BUG#20007583 TO 5.1 Backporting the patch to 5.1 and 5.5 --- sql/sql_show.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 2ee074db884..970301f15a2 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1828,7 +1828,8 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) Security_context *tmp_sctx= tmp->security_ctx; struct st_my_thread_var *mysys_var; if ((tmp->vio_ok() || tmp->system_thread) && - (!user || (tmp_sctx->user && !strcmp(tmp_sctx->user, user)))) + (!user || (!tmp->system_thread && tmp_sctx->user && + !strcmp(tmp_sctx->user, user)))) { thread_info *thd_info= new thread_info; @@ -1940,7 +1941,8 @@ int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond) const char *val, *db; if ((!tmp->vio_ok() && !tmp->system_thread) || - (user && (!tmp_sctx->user || strcmp(tmp_sctx->user, user)))) + (user && (tmp->system_thread || !tmp_sctx->user || + strcmp(tmp_sctx->user, user)))) continue; restore_record(table, s->default_values); From 195062883527917fc50c6fba5aaed201b8fe4446 Mon Sep 17 00:00:00 2001 From: aditya Date: Tue, 7 Apr 2015 09:56:28 +0530 Subject: [PATCH 23/38] Bug #17299181 CREATE_TIME AND UPDATE_TIME ARE WRONG FOR PARTITIONED TABLES Posty push fix for test case --- .../suite/parts/r/partition_debug_sync_innodb.result | 11 +++++++---- .../suite/parts/t/partition_debug_sync_innodb.test | 5 ++++- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/mysql-test/suite/parts/r/partition_debug_sync_innodb.result b/mysql-test/suite/parts/r/partition_debug_sync_innodb.result index 268db30bda0..77129d6bebb 100644 --- a/mysql-test/suite/parts/r/partition_debug_sync_innodb.result +++ b/mysql-test/suite/parts/r/partition_debug_sync_innodb.result @@ -58,7 +58,10 @@ t1.frm t1.par SET DEBUG_SYNC='before_open_in_get_all_tables SIGNAL parked WAIT_FOR open'; SET DEBUG_SYNC='partition_open_error SIGNAL alter WAIT_FOR finish'; -SELECT * FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test'; +SELECT TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME, PARTITION_ORDINAL_POSITION, +PARTITION_DESCRIPTION, TABLE_ROWS +FROM INFORMATION_SCHEMA.PARTITIONS +WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test'; SET DEBUG_SYNC = 'now WAIT_FOR parked'; # When waiting for the name lock in get_all_tables in sql_show.cc # this will not be concurrent any more, thus the TIMEOUT @@ -70,9 +73,9 @@ ALTER TABLE t1 REORGANIZE PARTITION p0 INTO PARTITION p10 VALUES LESS THAN MAXVALUE); Warnings: Warning 1639 debug sync point wait timed out -TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PARTITION_NAME SUBPARTITION_NAME PARTITION_ORDINAL_POSITION SUBPARTITION_ORDINAL_POSITION PARTITION_METHOD SUBPARTITION_METHOD PARTITION_EXPRESSION SUBPARTITION_EXPRESSION PARTITION_DESCRIPTION TABLE_ROWS AVG_ROW_LENGTH DATA_LENGTH MAX_DATA_LENGTH INDEX_LENGTH DATA_FREE CREATE_TIME UPDATE_TIME CHECK_TIME CHECKSUM PARTITION_COMMENT NODEGROUP TABLESPACE_NAME -def test t1 p0 NULL 1 NULL RANGE NULL a NULL 10 1 16384 16384 NULL 0 0 NULL NULL NULL NULL default NULL -def test t1 p10 NULL 2 NULL RANGE NULL a NULL MAXVALUE 3 5461 16384 NULL 0 0 NULL NULL NULL NULL default NULL +TABLE_SCHEMA TABLE_NAME PARTITION_NAME PARTITION_ORDINAL_POSITION PARTITION_DESCRIPTION TABLE_ROWS +test t1 p0 1 10 1 +test t1 p10 2 MAXVALUE 3 t1#P#p0.ibd t1#P#p10.ibd t1.frm diff --git a/mysql-test/suite/parts/t/partition_debug_sync_innodb.test b/mysql-test/suite/parts/t/partition_debug_sync_innodb.test index fce26132030..df9c06011c2 100644 --- a/mysql-test/suite/parts/t/partition_debug_sync_innodb.test +++ b/mysql-test/suite/parts/t/partition_debug_sync_innodb.test @@ -62,7 +62,10 @@ SHOW CREATE TABLE t1; SET DEBUG_SYNC='before_open_in_get_all_tables SIGNAL parked WAIT_FOR open'; SET DEBUG_SYNC='partition_open_error SIGNAL alter WAIT_FOR finish'; send -SELECT * FROM INFORMATION_SCHEMA.PARTITIONS WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test'; +SELECT TABLE_SCHEMA, TABLE_NAME, PARTITION_NAME, PARTITION_ORDINAL_POSITION, + PARTITION_DESCRIPTION, TABLE_ROWS +FROM INFORMATION_SCHEMA.PARTITIONS +WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test'; connect (con1, localhost, root,,); SET DEBUG_SYNC = 'now WAIT_FOR parked'; From 7285b4c49558e79072907642df63290748e45667 Mon Sep 17 00:00:00 2001 From: Marc Alff Date: Wed, 8 Apr 2015 07:01:39 +0200 Subject: [PATCH 24/38] Bug#20788853 MUTEX ISSUE IN SQL/SQL_SHOW.CC RESULTING IN SIG6. SOURCE LIKELY FILL_VARIABLES Prevent mutexes used in SHOW VARIABLES from being locked twice. --- sql/sql_class.cc | 1 + sql/sql_class.h | 1 + sql/sql_show.cc | 12 ++++++++++-- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sql/sql_class.cc b/sql/sql_class.cc index cc57ba726b4..cbdaca0fac5 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -802,6 +802,7 @@ THD::THD() rli_fake(0), rli_slave(NULL), user_time(0), in_sub_stmt(0), fill_status_recursion_level(0), + fill_variables_recursion_level(0), binlog_unsafe_warning_flags(0), binlog_table_maps(0), table_map_for_update(0), diff --git a/sql/sql_class.h b/sql/sql_class.h index 22b4eabac13..5a5e8b48754 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1603,6 +1603,7 @@ public: decremented each time before it returns from the function. */ uint fill_status_recursion_level; + uint fill_variables_recursion_level; /* container for handler's private per-connection data */ Ha_data ha_data[MAX_HA]; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 51f5d75e49b..4c9811cea2d 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -6317,7 +6317,11 @@ int fill_variables(THD *thd, TABLE_LIST *tables, COND *cond) Lock LOCK_plugin_delete to avoid deletion of any plugins while creating SHOW_VAR array and hold it until all variables are stored in the table. */ - mysql_mutex_lock(&LOCK_plugin_delete); + if (thd->fill_variables_recursion_level++ == 0) + { + mysql_mutex_lock(&LOCK_plugin_delete); + } + // Lock LOCK_system_variables_hash to prepare SHOW_VARs array. mysql_rwlock_rdlock(&LOCK_system_variables_hash); DEBUG_SYNC(thd, "acquired_LOCK_system_variables_hash"); @@ -6327,7 +6331,11 @@ int fill_variables(THD *thd, TABLE_LIST *tables, COND *cond) res= show_status_array(thd, wild, sys_var_array, option_type, NULL, "", tables->table, upper_case_names, cond); - mysql_mutex_unlock(&LOCK_plugin_delete); + if (thd->fill_variables_recursion_level-- == 1) + { + mysql_mutex_unlock(&LOCK_plugin_delete); + } + DBUG_RETURN(res); } From 25323de2a4397d9ab37ebdfddf4442c8d0dd22c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 9 Apr 2015 08:13:07 +0300 Subject: [PATCH 25/38] Bug#20816223 InnoDB crash on shutdown if XA PREPARE transactions hold explicit locks. innobase_shutdown_for_mysql(): Call trx_sys_close() before lock_sys_close() (and dict_close()) so that trx_free_prepared() will see all locks intact. RB: 8561 Reviewed-by: Vasil Dimov --- mysql-test/suite/innodb/r/xa_recovery.result | 17 ++++++++ mysql-test/suite/innodb/t/xa_recovery.test | 41 ++++++++++++++++++++ storage/innobase/srv/srv0start.c | 4 +- 3 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 mysql-test/suite/innodb/r/xa_recovery.result create mode 100644 mysql-test/suite/innodb/t/xa_recovery.test diff --git a/mysql-test/suite/innodb/r/xa_recovery.result b/mysql-test/suite/innodb/r/xa_recovery.result new file mode 100644 index 00000000000..84cb37ef7c9 --- /dev/null +++ b/mysql-test/suite/innodb/r/xa_recovery.result @@ -0,0 +1,17 @@ +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +XA START 'x'; +UPDATE t1 set a=2; +XA END 'x'; +XA PREPARE 'x'; +call mtr.add_suppression("Found 1 prepared XA transactions"); +SELECT * FROM t1 LOCK IN SHARE MODE; +SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT * FROM t1; +a +2 +XA ROLLBACK 'x'; +SELECT * FROM t1; +a +1 +DROP TABLE t1; diff --git a/mysql-test/suite/innodb/t/xa_recovery.test b/mysql-test/suite/innodb/t/xa_recovery.test new file mode 100644 index 00000000000..d62206d57bb --- /dev/null +++ b/mysql-test/suite/innodb/t/xa_recovery.test @@ -0,0 +1,41 @@ +--source include/have_innodb.inc + +CREATE TABLE t1 (a INT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (1); +connect (con1,localhost,root); +XA START 'x'; UPDATE t1 set a=2; XA END 'x'; XA PREPARE 'x'; +connection default; + +call mtr.add_suppression("Found 1 prepared XA transactions"); + +# Kill and restart the server. +-- exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +-- shutdown_server 0 +-- source include/wait_until_disconnected.inc + +-- exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect +-- enable_reconnect +-- source include/wait_until_connected_again.inc +-- disable_reconnect + +disconnect con1; +connect (con1,localhost,root); +--send SELECT * FROM t1 LOCK IN SHARE MODE + +connection default; +let $wait_condition= + select count(*) = 1 from information_schema.processlist + where state = 'Sending data' and + info = 'SELECT * FROM t1 LOCK IN SHARE MODE'; +--source include/wait_condition.inc + +--source include/restart_mysqld.inc + +disconnect con1; + +SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED; +SELECT * FROM t1; +XA ROLLBACK 'x'; +SELECT * FROM t1; + +DROP TABLE t1; diff --git a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c index d64f64fc934..45f8c6d53ab 100644 --- a/storage/innobase/srv/srv0start.c +++ b/storage/innobase/srv/srv0start.c @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved. +Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2008, Google Inc. Copyright (c) 2009, Percona Inc. @@ -2230,9 +2230,9 @@ innobase_shutdown_for_mysql(void) ibuf_close(); log_shutdown(); - lock_sys_close(); trx_sys_file_format_close(); trx_sys_close(); + lock_sys_close(); mutex_free(&srv_monitor_file_mutex); mutex_free(&srv_dict_tmpfile_mutex); From a3e80aeac83565b0f09c213258c2fb6e742e4b9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Thu, 9 Apr 2015 16:43:33 +0300 Subject: [PATCH 26/38] Bug#20816223 test fix. Embedded server does not support restarting and needs to skip the test. --- mysql-test/suite/innodb/t/xa_recovery.test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mysql-test/suite/innodb/t/xa_recovery.test b/mysql-test/suite/innodb/t/xa_recovery.test index d62206d57bb..62683a2250b 100644 --- a/mysql-test/suite/innodb/t/xa_recovery.test +++ b/mysql-test/suite/innodb/t/xa_recovery.test @@ -1,4 +1,6 @@ --source include/have_innodb.inc +# Embedded server does not support restarting. +--source include/not_embedded.inc CREATE TABLE t1 (a INT) ENGINE=InnoDB; INSERT INTO t1 VALUES (1); From d2a5d9716a675ea3e54aee807ba4f1f90eacc2eb Mon Sep 17 00:00:00 2001 From: Sreeharsha Ramanavarapu Date: Fri, 10 Apr 2015 08:45:57 +0530 Subject: [PATCH 27/38] Bug# 19573096: LOADING CORRUPTED GEOMETRY DATA INTO A MYISAM TABLE CAUSES THE SERVER TO CRASH Backport to mysql-5.1 --- storage/myisam/rt_split.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/storage/myisam/rt_split.c b/storage/myisam/rt_split.c index 60f6a199778..bd31621e0e0 100644 --- a/storage/myisam/rt_split.c +++ b/storage/myisam/rt_split.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2002, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -70,6 +70,10 @@ static double mbr_join_square(const double *a, const double *b, int n_dim) b += 2; }while (a != end); + /* Check for infinity or NaN */ + if (my_isinf(square) || isnan(square)) + square = DBL_MAX; + return square; } @@ -104,6 +108,9 @@ static void pick_seeds(SplitStruct *node, int n_entries, double max_d = -DBL_MAX; double d; + *seed_a = node; + *seed_b = node + 1; + for (cur1 = node; cur1 < lim1; ++cur1) { for (cur2=cur1 + 1; cur2 < lim2; ++cur2) From 3300823ca36810835c38389f3f8ea248d8895ebb Mon Sep 17 00:00:00 2001 From: Bjorn Munch Date: Mon, 13 Apr 2015 13:34:27 +0200 Subject: [PATCH 28/38] Raised version after tagging 5.1.74 (some commits skipped) --- configure.in | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 90422026122..492821b0b57 100644 --- a/configure.in +++ b/configure.in @@ -1,6 +1,23 @@ dnl -*- ksh -*- dnl Process this file with autoconf to produce a configure script. +# +# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +# + # Minimum Autoconf version required. AC_PREREQ(2.59) @@ -12,7 +29,7 @@ dnl dnl When changing the major version number please also check the switch dnl statement in mysqlbinlog::check_master_version(). You may also need dnl to update version.c in ndb. -AC_INIT([MySQL Server], [5.1.74], [], [mysql]) +AC_INIT([MySQL Server], [5.1.75], [], [mysql]) AC_CONFIG_SRCDIR([sql/mysqld.cc]) AC_CANONICAL_SYSTEM From 51d04c4cd9b1c408dd503213963cfbf3520e3096 Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Wed, 15 Apr 2015 13:17:43 +0200 Subject: [PATCH 29/38] Bug#20872436 MAKE DIST BY MISTAKE COPIES FILES WITH VARIABLE EXPANSION Fix typo: s/COPY_ONLY/COPYONLY/g (cherry picked from commit 034046b4dfe3e6f83e0cf73310884334e0507f06) Conflicts: cmake/make_dist.cmake.in --- cmake/make_dist.cmake.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cmake/make_dist.cmake.in b/cmake/make_dist.cmake.in index 8b845b92f1e..768e08741d3 100644 --- a/cmake/make_dist.cmake.in +++ b/cmake/make_dist.cmake.in @@ -1,4 +1,4 @@ -# Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -93,9 +93,9 @@ IF(NOT GIT_EXECUTABLE) # Save bison output first. CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.cc - ${CMAKE_BINARY_DIR}/sql_yacc.cc COPY_ONLY) + ${CMAKE_BINARY_DIR}/sql_yacc.cc COPYONLY) CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql/sql_yacc.h - ${CMAKE_BINARY_DIR}/sql_yacc.h COPY_ONLY) + ${CMAKE_BINARY_DIR}/sql_yacc.h COPYONLY) IF(CMAKE_GENERATOR MATCHES "Makefiles") # make clean @@ -107,9 +107,9 @@ IF(NOT GIT_EXECUTABLE) # Restore bison output CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql_yacc.cc - ${CMAKE_BINARY_DIR}/sql/sql_yacc.cc COPY_ONLY) + ${CMAKE_BINARY_DIR}/sql/sql_yacc.cc COPYONLY) CONFIGURE_FILE(${CMAKE_BINARY_DIR}/sql_yacc.h - ${CMAKE_BINARY_DIR}/sql/sql_yacc.h COPY_ONLY) + ${CMAKE_BINARY_DIR}/sql/sql_yacc.h COPYONLY) FILE(REMOVE ${CMAKE_BINARY_DIR}/sql_yacc.cc) FILE(REMOVE ${CMAKE_BINARY_DIR}/sql_yacc.h) ENDIF() From 30c14893c7f0e8a9086eccf74ca9534ac8f7c5db Mon Sep 17 00:00:00 2001 From: Mauritz Sundell Date: Fri, 17 Apr 2015 13:57:55 +0200 Subject: [PATCH 30/38] Bug#20814396 PB2 IS SECRET ABOUT WHAT UNIT TESTS IT RUN One can not see in PB2 test logs which unit tests have been run and passed. This patchs adds an option --unit-tests-report to mtr which include the ctest report in mtr output. It will also turn on unit testing if not explicitly turned off with --no-unit-tests or equivalent. In manual runs one can always look in the ctest.log file in mtr vardir. --unit-tests are replaced with --unit-tests-report in files under mysql-test/collections/ to activate report in PB2. --- mysql-test/mysql-test-run.pl | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index f82e67ef5b6..02ff577c7bf 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -1,7 +1,7 @@ #!/usr/bin/perl # -*- cperl -*- -# Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -201,6 +201,7 @@ our @opt_cases; # The test cases names in argv our $opt_embedded_server; # -1 indicates use default, override with env.var. our $opt_ctest= env_or_val(MTR_UNIT_TESTS => -1); +our $opt_ctest_report; # Unit test report stored here for delayed printing my $ctest_report; @@ -1168,6 +1169,7 @@ sub command_line_setup { 'report-times' => \$opt_report_times, 'result-file' => \$opt_resfile, 'unit-tests!' => \$opt_ctest, + 'unit-tests-report!' => \$opt_ctest_report, 'stress=s' => \$opt_stress, 'help|h' => \$opt_usage, @@ -1606,12 +1608,21 @@ sub command_line_setup { } # -------------------------------------------------------------------------- - # Don't run ctest if tests or suites named + # Set default values for opt_ctest (--unit-tests) # -------------------------------------------------------------------------- - $opt_ctest= 0 if $opt_ctest == -1 && ($opt_suites || @opt_cases); - # Override: disable if running in the PB test environment - $opt_ctest= 0 if $opt_ctest == -1 && defined $ENV{PB2WORKDIR}; + if ($opt_ctest == -1) { + if (defined $opt_ctest_report && $opt_ctest_report) { + # Turn on --unit-tests by default if --unit-tests-report is used + $opt_ctest= 1; + } elsif ($opt_suites || @opt_cases) { + # Don't run ctest if tests or suites named + $opt_ctest= 0; + } elsif (defined $ENV{PB2WORKDIR}) { + # Override: disable if running in the PB test environment + $opt_ctest= 0; + } + } # -------------------------------------------------------------------------- # Check use of wait-all @@ -6079,6 +6090,8 @@ sub run_ctest() { open (CTEST, " > $ctfile") or die ("Could not open output file $ctfile"); + $ctest_report .= $ctest_out if $opt_ctest_report; + # Put ctest output in log file, while analyzing results for (split ('\n', $ctest_out)) { print CTEST "$_\n"; @@ -6335,6 +6348,7 @@ Misc options nounit-tests Do not run unit tests. Normally run if configured and if not running named tests/suites unit-tests Run unit tests even if they would otherwise not be run + unit-tests-report Include report of every test included in unit tests. stress=ARGS Run stress test, providing options to mysql-stress-test.pl. Options are separated by comma. From e7ad7f050e2d0887f2587e5801356ac411a67ed3 Mon Sep 17 00:00:00 2001 From: V S Murthy Sidagam Date: Mon, 20 Apr 2015 16:46:36 +0530 Subject: [PATCH 31/38] Bug #16861371 SSL_OP_NO_COMPRESSION NOT DEFINED Description: Can't build mysql-5.5 latest source with openssl 0.9.8e. Analysis: Older OpenSSL versions(prior to openssl 1.0) doesn't have 'SSL_OP_NO_COMPRESSION' defined. Hence the build is failing with SSL_OP_NO_COMPRESSION undeclared. Fix: Added a conditonal compilation for 'SSL_OP_NO_COMPRESSION'. i.e if 'SSL_OP_NO_COMPRESSION' is defined then have the SSL_set_options call for OpenSSL 1.0 versions. Have sk_SSL_COMP_zero() call for OpenSSL 0.9.8 version --- vio/viossl.c | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/vio/viossl.c b/vio/viossl.c index a7370d3cc58..5960ab9ad4c 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -171,8 +171,27 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, SSL_clear(ssl); SSL_SESSION_set_timeout(SSL_get_session(ssl), timeout); SSL_set_fd(ssl, vio->sd); -#ifndef HAVE_YASSL - SSL_set_options(ssl, SSL_OP_NO_COMPRESSION); +#if !defined(HAVE_YASSL) && defined(SSL_OP_NO_COMPRESSION) + SSL_set_options(ssl, SSL_OP_NO_COMPRESSION); /* OpenSSL >= 1.0 only */ +#elif OPENSSL_VERSION_NUMBER >= 0x00908000L /* workaround for OpenSSL 0.9.8 */ + sk_SSL_COMP_zero(SSL_COMP_get_compression_methods()); +#endif + +#if !defined(HAVE_YASSL) && !defined(DBUG_OFF) + { + STACK_OF(SSL_COMP) *ssl_comp_methods = NULL; + ssl_comp_methods = SSL_COMP_get_compression_methods(); + DBUG_PRINT("info", ("Available compression methods:\n")); + int j, n = sk_SSL_COMP_num(ssl_comp_methods); + if (n == 0) + fprintf(stderr, " NONE\n"); + else + for (j = 0; j < n; j++) + { + SSL_COMP *c = sk_SSL_COMP_value(ssl_comp_methods, j); + DBUG_PRINT("info", (" %d: %s\n", c->id, c->name)); + } + } #endif if ((r= connect_accept_func(ssl)) < 1) From f07d9957994c0c21f36511035215c83653097908 Mon Sep 17 00:00:00 2001 From: V S Murthy Sidagam Date: Mon, 20 Apr 2015 19:41:50 +0530 Subject: [PATCH 32/38] Bug #16861371 SSL_OP_NO_COMPRESSION NOT DEFINED post push change: missed the change in mysql-5.5 (Fixing compiler warning/error) --- vio/viossl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vio/viossl.c b/vio/viossl.c index 5960ab9ad4c..86bd94260e4 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -152,6 +152,10 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, SSL *ssl; my_bool unused; my_bool was_blocking; + /* Declared here to make compiler happy */ +#if !defined(HAVE_YASSL) && !defined(DBUG_OFF) + int j, n; +#endif DBUG_ENTER("ssl_do"); DBUG_PRINT("enter", ("ptr: 0x%lx, sd: %d ctx: 0x%lx", @@ -181,8 +185,8 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, { STACK_OF(SSL_COMP) *ssl_comp_methods = NULL; ssl_comp_methods = SSL_COMP_get_compression_methods(); + n= sk_SSL_COMP_num(ssl_comp_methods); DBUG_PRINT("info", ("Available compression methods:\n")); - int j, n = sk_SSL_COMP_num(ssl_comp_methods); if (n == 0) fprintf(stderr, " NONE\n"); else From 6c11fedb5e81bfdcc9e71475d265a4686daa917f Mon Sep 17 00:00:00 2001 From: V S Murthy Sidagam Date: Tue, 21 Apr 2015 09:24:41 +0530 Subject: [PATCH 33/38] Bug #16861371 SSL_OP_NO_COMPRESSION NOT DEFINED post push change: fixing valgrind failures --- vio/viossl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vio/viossl.c b/vio/viossl.c index 86bd94260e4..f68e20ff64c 100644 --- a/vio/viossl.c +++ b/vio/viossl.c @@ -188,7 +188,7 @@ static int ssl_do(struct st_VioSSLFd *ptr, Vio *vio, long timeout, n= sk_SSL_COMP_num(ssl_comp_methods); DBUG_PRINT("info", ("Available compression methods:\n")); if (n == 0) - fprintf(stderr, " NONE\n"); + DBUG_PRINT("info", ("NONE\n")); else for (j = 0; j < n; j++) { From eb79ead4f01c60456977a2d27909b4aca6c29336 Mon Sep 17 00:00:00 2001 From: Arun Kuruvila Date: Fri, 24 Apr 2015 11:30:13 +0530 Subject: [PATCH 34/38] Bug#20318154 : NEGATIVE ARRAY INDEX WRITE V2 Description:- There is a possibility of negative array index write associated with the function "terminal_writec()". This is due to the assumption that there is a possibility of getting -1 return value from the function call "ct_visual_char()". Analysis:- The function "terminal_writec()" is called only from "em_delete_or_list()" and "vi_list_or_eof()" and both these functions deal with the "^D" (ctrl+D) signal. So the "size_t len" and "Char c" passed to "ct_visual_char()" (when called from "terminal_writec()") is always 8 (macro VISUAL_WIDTH_MAX is passed whose value is 8) and 4 (ASCII value for "^D"/"ctrl+D") respectively. Since the value of "c" is 4, "ct_chr_class()" returns -1 (macro CHTYPE_ASCIICTL is associated with -1 value). And since value of "len" is 8, "ct_visual_char()" will always return 2 when it is called from "terminal_writec()". So there is no possible case so that we encounter a negative array index write in "terminal_writec()". But since there is a rare posibility of using "terminal_writec()" in future enhancements, it is good handle the error case as well. Fix:- A condition is added in "terminal_writec()" to check whether "ct_visual_char()" is returning -1 or not. If the return value is -1, then value 0 is returned to its calling function "em_delete_or_list()" or "vi_list_or_eof()", which in turn will return CC_ERROR. NOTE:- No testcase is added since currently there is no possible scenario to encounter this error case. --- cmd-line-utils/libedit/el_terminal.h | 4 ++-- cmd-line-utils/libedit/emacs.c | 8 +++++--- cmd-line-utils/libedit/terminal.c | 15 ++++++++++----- cmd-line-utils/libedit/vi.c | 8 +++++--- 4 files changed, 22 insertions(+), 13 deletions(-) diff --git a/cmd-line-utils/libedit/el_terminal.h b/cmd-line-utils/libedit/el_terminal.h index 807c651783e..db0bb94fa93 100644 --- a/cmd-line-utils/libedit/el_terminal.h +++ b/cmd-line-utils/libedit/el_terminal.h @@ -1,7 +1,7 @@ /* $NetBSD: terminal.h,v 1.3 2011/07/29 23:44:45 christos Exp $ */ /*- - * Copyright (c) 1992, 1993 + * Copyright (c) 1992, 2015 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by @@ -103,7 +103,7 @@ protected int terminal_settc(EditLine *, int, const Char **); protected int terminal_gettc(EditLine *, int, char **); protected int terminal_telltc(EditLine *, int, const Char **); protected int terminal_echotc(EditLine *, int, const Char **); -protected void terminal_writec(EditLine *, Int); +protected int terminal_writec(EditLine *, Int); protected int terminal__putc(EditLine *, Int); protected void terminal__flush(EditLine *); diff --git a/cmd-line-utils/libedit/emacs.c b/cmd-line-utils/libedit/emacs.c index 554d3970485..1f1033a1cb7 100644 --- a/cmd-line-utils/libedit/emacs.c +++ b/cmd-line-utils/libedit/emacs.c @@ -1,7 +1,7 @@ /* $NetBSD: emacs.c,v 1.25 2011/07/29 15:16:33 christos Exp $ */ /*- - * Copyright (c) 1992, 1993 + * Copyright (c) 1992, 2015 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by @@ -58,8 +58,10 @@ em_delete_or_list(EditLine *el, Int c) /* if I'm at the end */ if (el->el_line.cursor == el->el_line.buffer) { /* and the beginning */ - terminal_writec(el, c); /* then do an EOF */ - return CC_EOF; + if(!(terminal_writec(el, c))) /* then do an EOF */ + return CC_EOF; + else + return CC_ERROR; } else { /* * Here we could list completions, but it is an diff --git a/cmd-line-utils/libedit/terminal.c b/cmd-line-utils/libedit/terminal.c index 8cfbeac7c52..e1f45ca1464 100644 --- a/cmd-line-utils/libedit/terminal.c +++ b/cmd-line-utils/libedit/terminal.c @@ -1,7 +1,7 @@ /* $NetBSD: terminal.c,v 1.10 2011/10/04 15:27:04 christos Exp $ */ /*- - * Copyright (c) 1992, 1993 + * Copyright (c) 1992, 2015 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by @@ -1271,14 +1271,19 @@ terminal__flush(EditLine *el) /* terminal_writec(): * Write the given character out, in a human readable form */ -protected void +protected int terminal_writec(EditLine *el, Int c) { Char visbuf[VISUAL_WIDTH_MAX +1]; ssize_t vcnt = ct_visual_char(visbuf, VISUAL_WIDTH_MAX, c); - visbuf[vcnt] = '\0'; - terminal_overwrite(el, visbuf, (size_t)vcnt); - terminal__flush(el); + if(vcnt == -1) + return 1; /* Error due to insufficient space */ + else { + visbuf[vcnt] = '\0'; + terminal_overwrite(el, visbuf, (size_t)vcnt); + terminal__flush(el); + return 0; + } } diff --git a/cmd-line-utils/libedit/vi.c b/cmd-line-utils/libedit/vi.c index 9a4b97a977e..41242030a98 100644 --- a/cmd-line-utils/libedit/vi.c +++ b/cmd-line-utils/libedit/vi.c @@ -1,7 +1,7 @@ /* $NetBSD: vi.c,v 1.41 2011/10/04 15:27:04 christos Exp $ */ /*- - * Copyright (c) 1992, 1993 + * Copyright (c) 1992, 2015 * The Regents of the University of California. All rights reserved. * * This code is derived from software contributed to Berkeley by @@ -607,8 +607,10 @@ vi_list_or_eof(EditLine *el, Int c) if (el->el_line.cursor == el->el_line.lastchar) { if (el->el_line.cursor == el->el_line.buffer) { - terminal_writec(el, c); /* then do a EOF */ - return CC_EOF; + if(!(terminal_writec(el, c))) /* then do a EOF */ + return CC_EOF; + else + return CC_ERROR; } else { /* * Here we could list completions, but it is an From c655515d1b52a16d5d074cd29a50c267c6c3db49 Mon Sep 17 00:00:00 2001 From: V S Murthy Sidagam Date: Mon, 27 Apr 2015 14:33:25 +0530 Subject: [PATCH 35/38] Bug #20683237 BACKPORT 19817663 TO 5.1 and 5.5 Restrict when user table hashes can be viewed. Require SUPER privileges. --- mysql-test/r/ps_grant.result | 6 ++-- .../suite/funcs_1/r/innodb_trig_03.result | 28 +++++++++---------- .../suite/funcs_1/r/innodb_trig_03e.result | 6 ++-- .../suite/funcs_1/r/memory_trig_03.result | 28 +++++++++---------- .../suite/funcs_1/r/memory_trig_03e.result | 6 ++-- .../suite/funcs_1/r/myisam_trig_03.result | 28 +++++++++---------- .../suite/funcs_1/r/myisam_trig_03e.result | 6 ++-- .../funcs_1/r/processlist_priv_no_prot.result | 18 ++++++------ .../funcs_1/r/processlist_priv_ps.result | 18 ++++++------ sql/sql_acl.cc | 23 +++++++++------ 10 files changed, 87 insertions(+), 80 deletions(-) diff --git a/mysql-test/r/ps_grant.result b/mysql-test/r/ps_grant.result index 672db74d9c0..fd1bcaa48c9 100644 --- a/mysql-test/r/ps_grant.result +++ b/mysql-test/r/ps_grant.result @@ -18,7 +18,7 @@ current_user() second_user@localhost show grants for current_user(); Grants for second_user@localhost -GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' +GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' prepare s_t9 from 'select c1 as my_col from t9 where c1= 1' ; @@ -42,7 +42,7 @@ GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost' show grants for second_user@localhost ; Grants for second_user@localhost -GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' +GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost' prepare s_t1 from 'select a as my_col from t1' ; @@ -63,7 +63,7 @@ GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' show grants for second_user@localhost ; Grants for second_user@localhost -GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' +GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost' execute s_t1 ; ERROR 42000: SELECT command denied to user 'second_user'@'localhost' for table 't1' diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03.result b/mysql-test/suite/funcs_1/r/innodb_trig_03.result index a7fce94c91d..e89159f4da6 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_03.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_03.result @@ -189,7 +189,7 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD create trigger trg4a_2 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-2a'; insert into t1 (f1) values ('insert 3.5.3.7-2b'); @@ -220,7 +220,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49 GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' show grants; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' use priv_db; create trigger trg4b_1 before UPDATE on t1 for each row @@ -247,7 +247,7 @@ trig 3.5.3.7-2a drop trigger trg4b_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg4b_2 before UPDATE on t1 for each row @@ -292,7 +292,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49 GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; create trigger trg4c_1 before INSERT on t1 for each row @@ -311,7 +311,7 @@ trig 3.5.3.7-2b drop trigger trg4c_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg4c_2 before INSERT on t1 for each row @@ -345,7 +345,7 @@ Grants for test_noprivs@% GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; create trigger trg4d_1 before INSERT on t1 for each row @@ -365,7 +365,7 @@ trig 3.5.3.7-2c drop trigger trg4d_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg4d_2 before INSERT on t1 for each row @@ -422,7 +422,7 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD create trigger trg5a_2 before INSERT on t1 for each row set @test_var= new.f1; set @test_var= 'before trig 3.5.3.8-2a'; @@ -454,7 +454,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49 GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' use priv_db; create trigger trg5b_1 before UPDATE on t1 for each row @@ -472,7 +472,7 @@ before trig 3.5.3.8-1b drop trigger trg5b_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg5b_2 before UPDATE on t1 for each row @@ -507,7 +507,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49 GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; create trigger trg5c_1 before INSERT on t1 for each row @@ -521,7 +521,7 @@ before trig 3.5.3.8-1c drop trigger trg5c_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg5c_2 before INSERT on t1 for each row @@ -551,7 +551,7 @@ GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C497 GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; create trigger trg5d_1 before INSERT on t1 for each row @@ -565,7 +565,7 @@ before trig 3.5.3.8-1d drop trigger trg5d_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg5d_2 before INSERT on t1 for each row diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result index 5b760116801..7a4ac93f4f8 100644 --- a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result @@ -139,7 +139,7 @@ current_user test_yesprivs@localhost show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' drop trigger trg1_2; ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' @@ -387,7 +387,7 @@ current_user test_yesprivs@localhost show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' drop trigger trg1_2; select current_user; @@ -1265,7 +1265,7 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' WITH GRANT OPTION GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' create definer=not_ex_user@localhost trigger trg1_3 diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03.result b/mysql-test/suite/funcs_1/r/memory_trig_03.result index 0d622915dca..2370b899b83 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_03.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_03.result @@ -190,7 +190,7 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD create trigger trg4a_2 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-2a'; insert into t1 (f1) values ('insert 3.5.3.7-2b'); @@ -221,7 +221,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49 GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' show grants; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' use priv_db; create trigger trg4b_1 before UPDATE on t1 for each row @@ -248,7 +248,7 @@ trig 3.5.3.7-2a drop trigger trg4b_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg4b_2 before UPDATE on t1 for each row @@ -293,7 +293,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49 GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; create trigger trg4c_1 before INSERT on t1 for each row @@ -312,7 +312,7 @@ trig 3.5.3.7-2b drop trigger trg4c_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg4c_2 before INSERT on t1 for each row @@ -346,7 +346,7 @@ Grants for test_noprivs@% GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; create trigger trg4d_1 before INSERT on t1 for each row @@ -366,7 +366,7 @@ trig 3.5.3.7-2c drop trigger trg4d_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg4d_2 before INSERT on t1 for each row @@ -423,7 +423,7 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD create trigger trg5a_2 before INSERT on t1 for each row set @test_var= new.f1; set @test_var= 'before trig 3.5.3.8-2a'; @@ -455,7 +455,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49 GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' use priv_db; create trigger trg5b_1 before UPDATE on t1 for each row @@ -473,7 +473,7 @@ before trig 3.5.3.8-1b drop trigger trg5b_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg5b_2 before UPDATE on t1 for each row @@ -508,7 +508,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49 GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; create trigger trg5c_1 before INSERT on t1 for each row @@ -522,7 +522,7 @@ before trig 3.5.3.8-1c drop trigger trg5c_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg5c_2 before INSERT on t1 for each row @@ -552,7 +552,7 @@ GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C497 GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; create trigger trg5d_1 before INSERT on t1 for each row @@ -566,7 +566,7 @@ before trig 3.5.3.8-1d drop trigger trg5d_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg5d_2 before INSERT on t1 for each row diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03e.result b/mysql-test/suite/funcs_1/r/memory_trig_03e.result index 95c833b90c3..4dc6395a42a 100644 --- a/mysql-test/suite/funcs_1/r/memory_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/memory_trig_03e.result @@ -140,7 +140,7 @@ current_user test_yesprivs@localhost show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' drop trigger trg1_2; ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' @@ -388,7 +388,7 @@ current_user test_yesprivs@localhost show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' drop trigger trg1_2; select current_user; @@ -1266,7 +1266,7 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' WITH GRANT OPTION GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' create definer=not_ex_user@localhost trigger trg1_3 diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03.result b/mysql-test/suite/funcs_1/r/myisam_trig_03.result index 0d622915dca..2370b899b83 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_03.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_03.result @@ -190,7 +190,7 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD create trigger trg4a_2 before INSERT on t1 for each row set new.f1 = 'trig 3.5.3.7-2a'; insert into t1 (f1) values ('insert 3.5.3.7-2b'); @@ -221,7 +221,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49 GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' show grants; Grants for test_noprivs@localhost -GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' use priv_db; create trigger trg4b_1 before UPDATE on t1 for each row @@ -248,7 +248,7 @@ trig 3.5.3.7-2a drop trigger trg4b_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg4b_2 before UPDATE on t1 for each row @@ -293,7 +293,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49 GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; create trigger trg4c_1 before INSERT on t1 for each row @@ -312,7 +312,7 @@ trig 3.5.3.7-2b drop trigger trg4c_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg4c_2 before INSERT on t1 for each row @@ -346,7 +346,7 @@ Grants for test_noprivs@% GRANT TRIGGER ON *.* TO 'test_noprivs'@'%' show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; create trigger trg4d_1 before INSERT on t1 for each row @@ -366,7 +366,7 @@ trig 3.5.3.7-2c drop trigger trg4d_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg4d_2 before INSERT on t1 for each row @@ -423,7 +423,7 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD create trigger trg5a_2 before INSERT on t1 for each row set @test_var= new.f1; set @test_var= 'before trig 3.5.3.8-2a'; @@ -455,7 +455,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49 GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost' use priv_db; create trigger trg5b_1 before UPDATE on t1 for each row @@ -473,7 +473,7 @@ before trig 3.5.3.8-1b drop trigger trg5b_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg5b_2 before UPDATE on t1 for each row @@ -508,7 +508,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49 GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; create trigger trg5c_1 before INSERT on t1 for each row @@ -522,7 +522,7 @@ before trig 3.5.3.8-1c drop trigger trg5c_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg5c_2 before INSERT on t1 for each row @@ -552,7 +552,7 @@ GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C497 GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' show grants; Grants for test_noprivs@localhost -GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost' use priv_db; create trigger trg5d_1 before INSERT on t1 for each row @@ -566,7 +566,7 @@ before trig 3.5.3.8-1d drop trigger trg5d_1; show grants; Grants for test_yesprivs@localhost -GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' use priv_db; create trigger trg5d_2 before INSERT on t1 for each row diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result index 9e0811d29fd..b4efd685506 100644 --- a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result +++ b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result @@ -140,7 +140,7 @@ current_user test_yesprivs@localhost show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' drop trigger trg1_2; ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1' @@ -388,7 +388,7 @@ current_user test_yesprivs@localhost show grants for test_yesprivs@localhost; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' drop trigger trg1_2; select current_user; @@ -1266,7 +1266,7 @@ current_user test_yesprivs@localhost show grants; Grants for test_yesprivs@localhost -GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576' +GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' WITH GRANT OPTION GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost' create definer=not_ex_user@localhost trigger trg1_3 diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result index 3d341292be1..a227070257c 100644 --- a/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result +++ b/mysql-test/suite/funcs_1/r/processlist_priv_no_prot.result @@ -131,7 +131,7 @@ GRANT INSERT,UPDATE ON processlist TO current_user; ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema' SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD CREATE INDEX i_processlist ON processlist (user); ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema' DROP TABLE processlist; @@ -165,7 +165,7 @@ SHOW/SELECT shows only the processes (1) of the user. #################################################################################### SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD SHOW processlist; Id User Host db Command Time State Info ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist @@ -178,7 +178,7 @@ SHOW/SELECT shows all processes/threads. #################################################################################### SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD SHOW processlist; Id User Host db Command Time State Info ID root HOST_NAME information_schema Sleep TIME NULL @@ -226,7 +226,7 @@ ddicttestuser1 are visible. #################################################################################### SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD SHOW processlist; Id User Host db Command Time State Info ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL @@ -290,7 +290,7 @@ Only the processes of ddicttestuser1 are visible. #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD SHOW processlist; Id User Host db Command Time State Info ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL @@ -338,7 +338,7 @@ ddicttestuser2 has now the PROCESS privilege and sees all connections #################################################################################### SHOW GRANTS FOR 'ddicttestuser2'@'localhost'; Grants for ddicttestuser2@localhost -GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD SHOW processlist; Id User Host db Command Time State Info ID root HOST_NAME information_schema Sleep TIME NULL @@ -376,7 +376,7 @@ ddicttestuser2 has no more the PROCESS privilege and can only see own connects #################################################################################### SHOW GRANTS; Grants for ddicttestuser2@localhost -GRANT USAGE ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD SHOW processlist; Id User Host db Command Time State Info ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL @@ -397,7 +397,7 @@ He is also unable to GRANT the PROCESS privilege to ddicttestuser2 #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost'; ERROR 28000: Access denied for user 'ddicttestuser1'@'localhost' (using password: YES) SHOW processlist; @@ -434,7 +434,7 @@ Therefore the missing SELECT privilege does not affect SELECTs on PROCESSLIST. #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD SHOW processlist; Id User Host db Command Time State Info ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL diff --git a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result index 2932467be2a..d6e8fc94584 100644 --- a/mysql-test/suite/funcs_1/r/processlist_priv_ps.result +++ b/mysql-test/suite/funcs_1/r/processlist_priv_ps.result @@ -131,7 +131,7 @@ GRANT INSERT,UPDATE ON processlist TO current_user; ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema' SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD CREATE INDEX i_processlist ON processlist (user); ERROR 42000: Access denied for user 'ddicttestuser1'@'localhost' to database 'information_schema' DROP TABLE processlist; @@ -165,7 +165,7 @@ SHOW/SELECT shows only the processes (1) of the user. #################################################################################### SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD SHOW processlist; Id User Host db Command Time State Info ID ddicttestuser1 HOST_NAME information_schema Query TIME NULL SHOW processlist @@ -178,7 +178,7 @@ SHOW/SELECT shows all processes/threads. #################################################################################### SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT PROCESS ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD SHOW processlist; Id User Host db Command Time State Info ID root HOST_NAME information_schema Sleep TIME NULL @@ -226,7 +226,7 @@ ddicttestuser1 are visible. #################################################################################### SHOW GRANTS; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD SHOW processlist; Id User Host db Command Time State Info ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL @@ -290,7 +290,7 @@ Only the processes of ddicttestuser1 are visible. #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD SHOW processlist; Id User Host db Command Time State Info ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL @@ -338,7 +338,7 @@ ddicttestuser2 has now the PROCESS privilege and sees all connections #################################################################################### SHOW GRANTS FOR 'ddicttestuser2'@'localhost'; Grants for ddicttestuser2@localhost -GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD SHOW processlist; Id User Host db Command Time State Info ID root HOST_NAME information_schema Sleep TIME NULL @@ -376,7 +376,7 @@ ddicttestuser2 has no more the PROCESS privilege and can only see own connects #################################################################################### SHOW GRANTS; Grants for ddicttestuser2@localhost -GRANT USAGE ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO 'ddicttestuser2'@'localhost' IDENTIFIED BY PASSWORD SHOW processlist; Id User Host db Command Time State Info ID ddicttestuser2 HOST_NAME information_schema Sleep TIME NULL @@ -397,7 +397,7 @@ He is also unable to GRANT the PROCESS privilege to ddicttestuser2 #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD GRANT PROCESS ON *.* TO 'ddicttestuser2'@'localhost'; ERROR 28000: Access denied for user 'ddicttestuser1'@'localhost' (using password: YES) SHOW processlist; @@ -434,7 +434,7 @@ Therefore the missing SELECT privilege does not affect SELECTs on PROCESSLIST. #################################################################################### SHOW GRANTS FOR 'ddicttestuser1'@'localhost'; Grants for ddicttestuser1@localhost -GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD '*22DA61451703738F203CDB9DB041ACBA1F4760B1' +GRANT USAGE ON *.* TO 'ddicttestuser1'@'localhost' IDENTIFIED BY PASSWORD SHOW processlist; Id User Host db Command Time State Info ID ddicttestuser1 HOST_NAME information_schema Sleep TIME NULL diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index cf150439391..05a31b85d00 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -4698,14 +4698,21 @@ bool mysql_show_grants(THD *thd,LEX_USER *lex_user) global.append ('\''); if (acl_user->salt_len) { - char passwd_buff[SCRAMBLED_PASSWORD_CHAR_LENGTH+1]; - if (acl_user->salt_len == SCRAMBLE_LENGTH) - make_password_from_salt(passwd_buff, acl_user->salt); + global.append(STRING_WITH_LEN(" IDENTIFIED BY PASSWORD")); + if ((thd->security_ctx->master_access & SUPER_ACL) == SUPER_ACL) + { + char passwd_buff[SCRAMBLED_PASSWORD_CHAR_LENGTH+1]; + if (acl_user->salt_len == SCRAMBLE_LENGTH) + make_password_from_salt(passwd_buff, acl_user->salt); + else + make_password_from_salt_323(passwd_buff, (ulong *) acl_user->salt); + + global.append(" \'"); + global.append(passwd_buff); + global.append('\''); + } else - make_password_from_salt_323(passwd_buff, (ulong *) acl_user->salt); - global.append(STRING_WITH_LEN(" IDENTIFIED BY PASSWORD '")); - global.append(passwd_buff); - global.append('\''); + global.append(" "); } /* "show grants" SSL related stuff */ if (acl_user->ssl_type == SSL_TYPE_ANY) From c3870e089a0f9ba50adcf17c8795871132e81697 Mon Sep 17 00:00:00 2001 From: V S Murthy Sidagam Date: Mon, 27 Apr 2015 23:50:13 +0530 Subject: [PATCH 36/38] Bug #18592390 QUERY TO I_S.TABLES AND I_S.COLUMNS LEADS TO HUGE MEMORY USAGE Description: On an example MySQL instance with 28k empty InnoDB tables, a specific query to information_schema.tables and information_schema.columns leads to memory consumption over 38GB RSS. Analysis: In get_all_tables() call, we fill the I_S tables from frm files and storage engine. As part of that process we call make_table_name_list() and allocate memory for all the 28k frm file names in the THD mem_root through make_lex_string_root(). Since it has been called around 28k * 28k times there is a huge memory getting hogged in THD mem_root. This causes the RSS to grow to 38GB. Fix: As part of fix we are creating a temporary mem_root in get_all_tables and passing it to fill_fiels(). There we replace the THD mem_root with the temporary mem_root and allocates the file names in temporary mem_root and frees it once we fill the I_S tables in get_all_tables and re-assign the original mem_root back to THD mem_root. Note: Checked the massif out put with the fix now the memory growth is just around 580MB at peak. --- sql/sql_show.cc | 67 ++++++++++++++++++++++++++++++++++++++++--------- sql/sql_show.h | 5 ++-- 2 files changed, 58 insertions(+), 14 deletions(-) diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 4c9811cea2d..5da9f43d793 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -404,13 +404,14 @@ bool mysqld_show_privileges(THD *thd) find_files_result find_files(THD *thd, List *files, const char *db, - const char *path, const char *wild, bool dir) + const char *path, const char *wild, bool dir, MEM_ROOT *tmp_mem_root) { uint i; char *ext; MY_DIR *dirp; FILEINFO *file; LEX_STRING *file_name= 0; + MEM_ROOT **root_ptr= NULL, *old_root= NULL; uint file_name_len; #ifndef NO_EMBEDDED_ACCESS_CHECKS uint col_access=thd->col_access; @@ -440,6 +441,13 @@ find_files(THD *thd, List *files, const char *db, DBUG_RETURN(FIND_FILES_DIR); } + if (tmp_mem_root) + { + root_ptr= my_pthread_getspecific_ptr(MEM_ROOT**, THR_MALLOC); + old_root= *root_ptr; + *root_ptr= tmp_mem_root; + } + for (i=0 ; i < (uint) dirp->number_off_files ; i++) { char uname[NAME_LEN + 1]; /* Unencoded name */ @@ -519,8 +527,11 @@ find_files(THD *thd, List *files, const char *db, continue; } #endif - if (!(file_name= - thd->make_lex_string(file_name, uname, file_name_len, TRUE)) || + if (!(file_name= tmp_mem_root ? + make_lex_string_root(tmp_mem_root, file_name, uname, + file_name_len, TRUE) : + thd->make_lex_string(file_name, uname, + file_name_len, TRUE)) || files->push_back(file_name)) { my_dirend(dirp); @@ -532,6 +543,9 @@ find_files(THD *thd, List *files, const char *db, (void) ha_find_files(thd, db, path, wild, dir, files); + if (tmp_mem_root) + *root_ptr= old_root; + DBUG_RETURN(FIND_FILES_OK); } @@ -2882,7 +2896,7 @@ enum enum_schema_tables get_schema_table_idx(ST_SCHEMA_TABLE *schema_table) int make_db_list(THD *thd, List *files, LOOKUP_FIELD_VALUES *lookup_field_vals, - bool *with_i_schema) + bool *with_i_schema, MEM_ROOT *tmp_mem_root) { LEX_STRING *i_s_name_copy= 0; i_s_name_copy= thd->make_lex_string(i_s_name_copy, @@ -2906,7 +2920,8 @@ int make_db_list(THD *thd, List *files, return 1; } return (find_files(thd, files, NullS, mysql_data_home, - lookup_field_vals->db_value.str, 1) != FIND_FILES_OK); + lookup_field_vals->db_value.str, 1, tmp_mem_root) != + FIND_FILES_OK); } @@ -2948,7 +2963,7 @@ int make_db_list(THD *thd, List *files, return 1; *with_i_schema= 1; return (find_files(thd, files, NullS, - mysql_data_home, NullS, 1) != FIND_FILES_OK); + mysql_data_home, NullS, 1, tmp_mem_root) != FIND_FILES_OK); } @@ -3056,7 +3071,8 @@ int schema_tables_add(THD *thd, List *files, const char *wild) static int make_table_name_list(THD *thd, List *table_names, LEX *lex, LOOKUP_FIELD_VALUES *lookup_field_vals, - bool with_i_schema, LEX_STRING *db_name) + bool with_i_schema, LEX_STRING *db_name, + MEM_ROOT *tmp_mem_root) { char path[FN_REFLEN + 1]; build_table_filename(path, sizeof(path) - 1, db_name->str, "", "", 0); @@ -3110,7 +3126,8 @@ make_table_name_list(THD *thd, List *table_names, LEX *lex, lookup_field_vals->table_value.str)); find_files_result res= find_files(thd, table_names, db_name->str, path, - lookup_field_vals->table_value.str, 0); + lookup_field_vals->table_value.str, 0, + tmp_mem_root); if (res != FIND_FILES_OK) { /* @@ -3776,6 +3793,9 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond) bool can_deadlock; DBUG_ENTER("get_all_tables"); + MEM_ROOT tmp_mem_root; + init_sql_alloc(&tmp_mem_root, TABLE_ALLOC_BLOCK_SIZE, 0); + /* In cases when SELECT from I_S table being filled by this call is part of statement which also uses other tables or is being executed @@ -3867,7 +3887,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond) goto err; } - if (make_db_list(thd, &db_names, &lookup_field_vals, &with_i_schema)) + if (make_db_list(thd, &db_names, &lookup_field_vals, &with_i_schema, &tmp_mem_root)) goto err; it.rewind(); /* To get access to new elements in basis list */ while ((db_name= it++)) @@ -3885,7 +3905,7 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond) List table_names; int res= make_table_name_list(thd, &table_names, lex, &lookup_field_vals, - with_i_schema, db_name); + with_i_schema, db_name, &tmp_mem_root); if (res == 2) /* Not fatal error, continue */ continue; if (res) @@ -3972,9 +3992,10 @@ int get_all_tables(THD *thd, TABLE_LIST *tables, COND *cond) with_i_schema= 0; } } - error= 0; err: + + free_root(&tmp_mem_root, MYF(0)); thd->restore_backup_open_tables_state(&open_tables_state_backup); DBUG_RETURN(error); @@ -4000,6 +4021,27 @@ int fill_schema_schemata(THD *thd, TABLE_LIST *tables, COND *cond) Returning error status in this case leads to client hangup. */ + /* + * A temporary class is created to free tmp_mem_root when we return from + * this function, since we have 'return' from this function from many + * places. This is just to avoid goto. + */ + class free_tmp_mem_root + { + public: + free_tmp_mem_root() + { + init_sql_alloc(&tmp_mem_root, TABLE_ALLOC_BLOCK_SIZE, 0); + } + ~free_tmp_mem_root() + { + free_root(&tmp_mem_root, MYF(0)); + } + MEM_ROOT tmp_mem_root; + }; + + free_tmp_mem_root dummy_member; + LOOKUP_FIELD_VALUES lookup_field_vals; List db_names; LEX_STRING *db_name; @@ -4013,11 +4055,12 @@ int fill_schema_schemata(THD *thd, TABLE_LIST *tables, COND *cond) if (get_lookup_field_values(thd, cond, tables, &lookup_field_vals)) DBUG_RETURN(0); + DBUG_PRINT("INDEX VALUES",("db_name='%s', table_name='%s'", lookup_field_vals.db_value.str, lookup_field_vals.table_value.str)); if (make_db_list(thd, &db_names, &lookup_field_vals, - &with_i_schema)) + &with_i_schema, &dummy_member.tmp_mem_root)) DBUG_RETURN(1); /* diff --git a/sql/sql_show.h b/sql/sql_show.h index b6d520441c7..16bfc5cdb69 100644 --- a/sql/sql_show.h +++ b/sql/sql_show.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -82,7 +82,8 @@ enum find_files_result { #define IS_FILES_EXTRA 37 find_files_result find_files(THD *thd, List *files, const char *db, - const char *path, const char *wild, bool dir); + const char *path, const char *wild, bool dir, + MEM_ROOT *tmp_mem_root); int store_create_info(THD *thd, TABLE_LIST *table_list, String *packet, HA_CREATE_INFO *create_info_arg, bool show_database); From fdae90dd11b6f1230f66d530f2d213599f58c760 Mon Sep 17 00:00:00 2001 From: Arun Kuruvila Date: Tue, 28 Apr 2015 14:56:55 +0530 Subject: [PATCH 37/38] Bug #20181776 :- ACCESS CONTROL DOESN'T MATCH MOST SPECIFIC HOST WHEN IT CONTAINS WILDCARD Description :- Incorrect access privileges are provided to a user due to wrong sorting of users when wildcard characters is present in the hostname. Analysis :- Function "get_sorts()" is used to sort the strings of user name, hostname, database name. It is used to arrange the users in the access privilege matching order. When a user connects, it checks in the sorted user access privilege list and finds a corresponding matching entry for the user. Algorithm used in "get_sort()" sorts the strings inappropriately. As a result, when a user connects to the server, it is mapped to incorrect user access privileges. Algorithm used in "get_sort()" counts the number of characters before the first occurence of any one of the wildcard characters (single-wildcard character '_' or multi-wildcard character '%') and sorts in that order. As a result of inconnect sorting it treats hostname "%" and "%.mysql.com" as equally-specific values and therefore the order is indeterminate. Fix:- The "get_sort()" algorithm has been modified to treat "%" seperately. Now "get_sort()" returns a number which, if sorted in descending order, puts strings in the following order:- * strings with no wildcards * strings containg wildcards and non-wildcard characters * single muilt-wildcard character('%') * empty string. --- sql/sql_acl.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc index 05a31b85d00..b061a8bc2cf 100644 --- a/sql/sql_acl.cc +++ b/sql/sql_acl.cc @@ -801,7 +801,8 @@ static ulong get_access(TABLE *form, uint fieldnr, uint *next_field) /* Return a number which, if sorted 'desc', puts strings in this order: no wildcards - wildcards + strings containg wildcards and non-wildcard characters + single muilt-wildcard character('%') empty string */ @@ -818,7 +819,16 @@ static ulong get_sort(uint count,...) { char *start, *str= va_arg(args,char*); uint chars= 0; - uint wild_pos= 0; /* first wildcard position */ + uint wild_pos= 0; + + /* + wild_pos + 0 if string is empty + 1 if string is a single muilt-wildcard + character('%') + first wildcard position + 1 if string containg wildcards and + non-wildcard characters + */ if ((start= str)) { @@ -829,6 +839,8 @@ static ulong get_sort(uint count,...) else if (*str == wild_many || *str == wild_one) { wild_pos= (uint) (str - start) + 1; + if (!(wild_pos == 1 && *str == wild_many && *(++str) == '\0')) + wild_pos++; break; } chars= 128; // Marker that chars existed From 31c803e8d0543b330aa8e61ef878da43fe1f68f7 Mon Sep 17 00:00:00 2001 From: V S Murthy Sidagam Date: Wed, 29 Apr 2015 13:51:29 +0530 Subject: [PATCH 38/38] Bug #18592390 QUERY TO I_S.TABLES AND I_S.COLUMNS LEADS TO HUGE MEMORY USAGE As part of the fix find_files() prototype has been modified and mysql-cluster uses find_files() function. Hence modified find_files() call in ha_ndbcluster_binlog.cc file to make mysql-cluster build successful. --- sql/ha_ndbcluster_binlog.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc index 15e0b068826..b921a5a6747 100644 --- a/sql/ha_ndbcluster_binlog.cc +++ b/sql/ha_ndbcluster_binlog.cc @@ -1,5 +1,5 @@ /* - Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved. + Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -2542,7 +2542,8 @@ ndbcluster_check_if_local_tables_in_db(THD *thd, const char *dbname) char path[FN_REFLEN + 1]; build_table_filename(path, sizeof(path) - 1, dbname, "", "", 0); - if (find_files(thd, &files, dbname, path, NullS, 0) != FIND_FILES_OK) + if (find_files(thd, &files, dbname, path, NullS, 0, NULL) != + FIND_FILES_OK) { DBUG_PRINT("info", ("Failed to find files")); DBUG_RETURN(true);