#At file:///export/home/tmp/je159969/mysql-dev/bzr-repos/mysql-5.1-bug56895/ based on revid:john.embretsen@stripped
3554 John H. Embretsen 2011-01-27 [merge]
Merge two patches for bug 56895 into tip of mysql-5.1 branch.
added:
mysql-test/include/restart_slave_sql.inc
mysql-test/include/rpl_connection_master.inc
mysql-test/include/rpl_connection_slave.inc
mysql-test/include/rpl_connection_slave1.inc
modified:
client/mysqladmin.cc
client/mysqldump.c
client/mysqltest.cc
mysql-test/Makefile.am
mysql-test/include/rpl_start_server.inc
mysql-test/include/rpl_stop_server.inc
mysql-test/lib/My/ConfigFactory.pm
mysql-test/lib/My/CoreDump.pm
mysql-test/lib/My/File/Path.pm
mysql-test/lib/My/Find.pm
mysql-test/lib/My/Options.pm
mysql-test/lib/My/Platform.pm
mysql-test/lib/My/SafeProcess.pm
mysql-test/lib/My/SafeProcess/Base.pm
mysql-test/lib/My/SafeProcess/CMakeLists.txt
mysql-test/lib/My/SafeProcess/Makefile.am
mysql-test/lib/My/SafeProcess/safe_kill_win.cc
mysql-test/lib/My/SafeProcess/safe_process.cc
mysql-test/lib/My/SafeProcess/safe_process_win.cc
mysql-test/lib/My/SysInfo.pm
mysql-test/lib/My/Test.pm
mysql-test/lib/mtr_gcov.pl
mysql-test/lib/mtr_gprof.pl
mysql-test/lib/mtr_io.pl
mysql-test/lib/mtr_match.pm
mysql-test/lib/mtr_misc.pl
mysql-test/lib/mtr_report.pm
mysql-test/lib/mtr_stress.pl
mysql-test/lib/mtr_unique.pm
mysql-test/mysql-stress-test.pl
mysql-test/mysql-test-run.pl
mysql-test/r/client_xml.result
mysql-test/r/ctype_many.result
mysql-test/r/func_like.result
mysql-test/r/mysqladmin.result
mysql-test/r/mysqldump.result
mysql-test/r/partition_error.result
mysql-test/r/type_datetime.result
mysql-test/r/xml.result
mysql-test/suite/ndb/r/ndb_basic.result
mysql-test/suite/ndb/t/ndb_basic.test
mysql-test/suite/rpl/r/rpl_stop_slave.result
mysql-test/suite/rpl/t/disabled.def
mysql-test/suite/rpl/t/rpl_packet.test
mysql-test/suite/rpl/t/rpl_stop_slave.test
mysql-test/suite/sys_vars/r/general_log_file_basic.result
mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result
mysql-test/suite/sys_vars/r/log_output_func.result
mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result
mysql-test/suite/sys_vars/t/div_precision_increment_func.test
mysql-test/suite/sys_vars/t/general_log_file_basic.test
mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test
mysql-test/suite/sys_vars/t/log_output_func.test
mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test
mysql-test/t/ctype_many.test
mysql-test/t/func_like.test
mysql-test/t/gis.test
mysql-test/t/mysqladmin.test
mysql-test/t/mysqldump.test
mysql-test/t/partition_error.test
mysql-test/t/type_datetime.test
mysql-test/t/xml.test
mysql-test/valgrind.supp
sql/item_cmpfunc.cc
sql/item_strfunc.cc
sql/item_strfunc.h
sql/item_sum.h
sql/slave.cc
sql/sql_partition.cc
sql/sql_repl.cc
strings/bchange.c
strings/bcopy-duff.c
strings/bfill.c
strings/bmove.c
strings/bmove512.c
strings/bmove_upp.c
strings/conf_to_src.c
strings/ctype-big5.c
strings/ctype-bin.c
strings/ctype-cp932.c
strings/ctype-czech.c
strings/ctype-euc_kr.c
strings/ctype-eucjpms.c
strings/ctype-extra.c
strings/ctype-gb2312.c
strings/ctype-gbk.c
strings/ctype-latin1.c
strings/ctype-mb.c
strings/ctype-simple.c
strings/ctype-sjis.c
strings/ctype-tis620.c
strings/ctype-uca.c
strings/ctype-ucs2.c
strings/ctype-ujis.c
strings/ctype-utf8.c
strings/ctype-win1250ch.c
strings/ctype.c
strings/decimal.c
strings/do_ctype.c
strings/dump_map.c
strings/int2str.c
strings/is_prefix.c
strings/llstr.c
strings/longlong2str.c
strings/longlong2str_asm.c
strings/memcmp.c
strings/memcpy.c
strings/memset.c
strings/my_strchr.c
strings/my_strtoll10.c
strings/my_vsnprintf.c
strings/r_strinstr.c
strings/str2int.c
strings/str_alloc.c
strings/str_test.c
strings/strappend.c
strings/strcat.c
strings/strcend.c
strings/strchr.c
strings/strcmp.c
strings/strcont.c
strings/strend.c
strings/strfill.c
strings/strinstr.c
strings/strlen.c
strings/strmake.c
strings/strmov.c
strings/strnlen.c
strings/strnmov.c
strings/strrchr.c
strings/strstr.c
strings/strto.c
strings/strtod.c
strings/strtol.c
strings/strtoll.c
strings/strtoul.c
strings/strtoull.c
strings/strxmov.c
strings/strxnmov.c
strings/uca-dump.c
strings/uctypedump.c
strings/udiv.c
strings/utr11-dump.c
strings/xml.c
=== modified file 'client/mysqladmin.cc'
--- a/client/mysqladmin.cc 2010-06-10 20:16:43 +0000
+++ b/client/mysqladmin.cc 2011-01-15 20:34:08 +0000
@@ -416,6 +416,9 @@ int main(int argc,char *argv[])
if (interval) /* --sleep=interval given */
{
+ if (opt_count_iterations && --nr_iterations == 0)
+ break;
+
/*
If connection was dropped (unintentionally, or due to SHUTDOWN),
re-establish it if --wait ("retry-connect") was given and user
=== modified file 'client/mysqldump.c'
--- a/client/mysqldump.c 2010-06-10 20:16:43 +0000
+++ b/client/mysqldump.c 2011-01-14 14:20:34 +0000
@@ -2247,6 +2247,15 @@ static uint get_table_structure(char *ta
const char *insert_option;
char name_buff[NAME_LEN+3],table_buff[NAME_LEN*2+3];
char table_buff2[NAME_LEN*2+3], query_buff[QUERY_LENGTH];
+ const char *show_fields_stmt= "SELECT `COLUMN_NAME` AS `Field`, "
+ "`COLUMN_TYPE` AS `Type`, "
+ "`IS_NULLABLE` AS `Null`, "
+ "`COLUMN_KEY` AS `Key`, "
+ "`COLUMN_DEFAULT` AS `Default`, "
+ "`EXTRA` AS `Extra`, "
+ "`COLUMN_COMMENT` AS `Comment` "
+ "FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE "
+ "TABLE_SCHEMA = '%s' AND TABLE_NAME = '%s'";
FILE *sql_file= md_result_file;
int len;
MYSQL_RES *result;
@@ -2514,8 +2523,8 @@ static uint get_table_structure(char *ta
verbose_msg("%s: Warning: Can't set SQL_QUOTE_SHOW_CREATE option (%s)\n",
my_progname, mysql_error(mysql));
- my_snprintf(query_buff, sizeof(query_buff), "show fields from %s",
- result_table);
+ my_snprintf(query_buff, sizeof(query_buff), show_fields_stmt, db, table);
+
if (mysql_query_with_error_report(mysql, &result, query_buff))
DBUG_RETURN(0);
=== modified file 'client/mysqltest.cc'
--- a/client/mysqltest.cc 2011-01-11 09:54:42 +0000
+++ b/client/mysqltest.cc 2011-01-26 15:34:34 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
@@ -11,7 +11,7 @@
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
/*
mysqltest
@@ -7255,8 +7255,12 @@ void run_query_stmt(MYSQL *mysql, struct
mysql_free_result(res); /* Free normal result set with meta data */
- /* Clear prepare warnings */
- dynstr_set(&ds_prepare_warnings, NULL);
+ /*
+ Clear prepare warnings if there are execute warnings,
+ since they are probably duplicated.
+ */
+ if (ds_execute_warnings.length || mysql->warning_count)
+ dynstr_set(&ds_prepare_warnings, NULL);
}
else
{
=== modified file 'mysql-test/Makefile.am'
--- a/mysql-test/Makefile.am 2010-12-28 23:47:05 +0000
+++ b/mysql-test/Makefile.am 2011-01-18 10:03:44 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2006 MySQL AB
+# Copyright (c) 2000, 2010, 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 Library General Public
@@ -10,10 +10,9 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-# MA 02111-1307, USA
+# 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
## Process this file with automake to create Makefile.in
=== added file 'mysql-test/include/restart_slave_sql.inc'
--- a/mysql-test/include/restart_slave_sql.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/restart_slave_sql.inc 2011-01-18 17:23:49 +0000
@@ -0,0 +1,43 @@
+# ==== Purpose ====
+#
+# Provide a earier way to restart SQL thread when you want to stop sql thread
+# and then start it immediately.
+#
+# Sources stop_slave_sql.inc to stop SQL thread on the current connection.
+# Then issues START SLAVE SQL_THREAD and then waits until
+# the SQL threads have started, or until a timeout is reached.
+#
+# Please use this instead of 'STOP|START SLAVE SQL_THREAD', to reduce the risk of
+# test case bugs.
+#
+#
+# ==== Usage ====
+#
+# [--let $slave_timeout= NUMBER]
+# [--let $rpl_debug= 1]
+# --source include/restart_slave_sql.inc
+#
+# Parameters:
+# $slave_timeout
+# See include/wait_for_slave_param.inc
+#
+# $rpl_debug
+# See include/rpl_init.inc
+
+
+--let $include_filename= restart_slave.inc
+--source include/begin_include_file.inc
+
+
+if (!$rpl_debug)
+{
+ --disable_query_log
+}
+
+source include/stop_slave_sql.inc;
+START SLAVE SQL_THREAD;
+source include/wait_for_slave_sql_to_start.inc;
+
+
+--let $include_filename= restart_slave.inc
+--source include/end_include_file.inc
\ No newline at end of file
=== added file 'mysql-test/include/rpl_connection_master.inc'
--- a/mysql-test/include/rpl_connection_master.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/rpl_connection_master.inc 2011-01-18 17:23:49 +0000
@@ -0,0 +1,2 @@
+let $rpl_connection_name= master;
+source include/rpl_connection.inc;
\ No newline at end of file
=== added file 'mysql-test/include/rpl_connection_slave.inc'
--- a/mysql-test/include/rpl_connection_slave.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/rpl_connection_slave.inc 2011-01-18 17:23:49 +0000
@@ -0,0 +1,2 @@
+let $rpl_connection_name= slave;
+source include/rpl_connection.inc;
\ No newline at end of file
=== added file 'mysql-test/include/rpl_connection_slave1.inc'
--- a/mysql-test/include/rpl_connection_slave1.inc 1970-01-01 00:00:00 +0000
+++ b/mysql-test/include/rpl_connection_slave1.inc 2011-01-18 17:23:49 +0000
@@ -0,0 +1,2 @@
+let $rpl_connection_name= slave1;
+source include/rpl_connection.inc;
\ No newline at end of file
=== modified file 'mysql-test/include/rpl_start_server.inc'
--- a/mysql-test/include/rpl_start_server.inc 2011-01-14 10:33:12 +0000
+++ b/mysql-test/include/rpl_start_server.inc 2011-01-18 11:25:07 +0000
@@ -45,15 +45,7 @@ if ($rpl_server_parameters)
--source include/rpl_connection.inc
# Write file to make mysql-test-run.pl start up the server again
---let WRITE_TO_FILE= $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
---let WRITE_TO_VAR= $_rpl_start_server_command
-perl;
-my $file= $ENV{'WRITE_TO_FILE'};
-my $var= $ENV{'WRITE_TO_VAR'};
-open WRITE_FILE, ">> $file" or die "Error opening $file: $!";
-print WRITE_FILE $var, "\n" or die "Error appending to $file: $!";
-close WRITE_FILE or die "Error closing $file: $!";
-EOF
+--exec echo "$_rpl_start_server_command" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
--source include/rpl_reconnect.inc
=== modified file 'mysql-test/include/rpl_stop_server.inc'
--- a/mysql-test/include/rpl_stop_server.inc 2011-01-14 10:33:12 +0000
+++ b/mysql-test/include/rpl_stop_server.inc 2011-01-18 11:25:07 +0000
@@ -44,9 +44,7 @@ if ($rpl_debug)
# Write file to make mysql-test-run.pl expect the "crash", but don't start
# it until it's told to
---append_file $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
-wait
-EOF
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.$rpl_server_number.expect
# Send shutdown to the connected server and give
# it 10 seconds to die before zapping it
=== modified file 'mysql-test/lib/My/ConfigFactory.pm'
--- a/mysql-test/lib/My/ConfigFactory.pm 2010-06-15 09:16:38 +0000
+++ b/mysql-test/lib/My/ConfigFactory.pm 2011-01-18 10:03:44 +0000
@@ -1,4 +1,20 @@
# -*- cperl -*-
+# Copyright (c) 2008, 2010, 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 Library 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
+# Library 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
+
package My::ConfigFactory;
use strict;
=== modified file 'mysql-test/lib/My/CoreDump.pm'
--- a/mysql-test/lib/My/CoreDump.pm 2009-03-24 13:44:21 +0000
+++ b/mysql-test/lib/My/CoreDump.pm 2011-01-18 10:03:44 +0000
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
#
# 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
=== modified file 'mysql-test/lib/My/File/Path.pm'
--- a/mysql-test/lib/My/File/Path.pm 2009-04-01 14:23:10 +0000
+++ b/mysql-test/lib/My/File/Path.pm 2011-01-18 10:03:44 +0000
@@ -1,4 +1,19 @@
# -*- cperl -*-
+# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
+#
+# 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
+
package My::File::Path;
use strict;
=== modified file 'mysql-test/lib/My/Find.pm'
--- a/mysql-test/lib/My/Find.pm 2008-09-20 13:51:31 +0000
+++ b/mysql-test/lib/My/Find.pm 2011-01-18 10:03:44 +0000
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB
#
# 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
=== modified file 'mysql-test/lib/My/Options.pm'
--- a/mysql-test/lib/My/Options.pm 2008-04-24 11:02:53 +0000
+++ b/mysql-test/lib/My/Options.pm 2011-01-18 10:03:44 +0000
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB
#
# 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
=== modified file 'mysql-test/lib/My/Platform.pm'
--- a/mysql-test/lib/My/Platform.pm 2009-08-06 07:30:53 +0000
+++ b/mysql-test/lib/My/Platform.pm 2011-01-18 10:03:44 +0000
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
#
# 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
=== modified file 'mysql-test/lib/My/SafeProcess.pm'
--- a/mysql-test/lib/My/SafeProcess.pm 2010-03-16 09:45:32 +0000
+++ b/mysql-test/lib/My/SafeProcess.pm 2011-01-18 10:03:44 +0000
@@ -1,14 +1,15 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (c) 2008, 2010, 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 free software; you can redistribute it and/or
+# modify it under the terms of the GNU Library 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.
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library 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
=== modified file 'mysql-test/lib/My/SafeProcess/Base.pm'
--- a/mysql-test/lib/My/SafeProcess/Base.pm 2009-04-23 11:35:02 +0000
+++ b/mysql-test/lib/My/SafeProcess/Base.pm 2011-01-18 10:03:44 +0000
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
#
# 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
=== modified file 'mysql-test/lib/My/SafeProcess/CMakeLists.txt'
--- a/mysql-test/lib/My/SafeProcess/CMakeLists.txt 2007-12-19 11:58:06 +0000
+++ b/mysql-test/lib/My/SafeProcess/CMakeLists.txt 2011-01-18 10:03:44 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2006 MySQL AB
+# Copyright (C) 2008 MySQL AB
#
# 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
=== modified file 'mysql-test/lib/My/SafeProcess/Makefile.am'
--- a/mysql-test/lib/My/SafeProcess/Makefile.am 2009-10-13 18:21:42 +0000
+++ b/mysql-test/lib/My/SafeProcess/Makefile.am 2011-01-18 10:03:44 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB
#
# 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
=== modified file 'mysql-test/lib/My/SafeProcess/safe_kill_win.cc'
--- a/mysql-test/lib/My/SafeProcess/safe_kill_win.cc 2009-09-29 22:19:00 +0000
+++ b/mysql-test/lib/My/SafeProcess/safe_kill_win.cc 2011-01-18 10:03:44 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 MySQL AB
+/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
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
=== modified file 'mysql-test/lib/My/SafeProcess/safe_process.cc'
--- a/mysql-test/lib/My/SafeProcess/safe_process.cc 2010-07-02 18:30:47 +0000
+++ b/mysql-test/lib/My/SafeProcess/safe_process.cc 2011-01-18 10:03:44 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2008 MySQL AB
+/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
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
=== modified file 'mysql-test/lib/My/SafeProcess/safe_process_win.cc'
--- a/mysql-test/lib/My/SafeProcess/safe_process_win.cc 2010-01-19 08:48:56 +0000
+++ b/mysql-test/lib/My/SafeProcess/safe_process_win.cc 2011-01-18 10:03:44 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 MySQL AB
+/* Copyright (C) 2008 MySQL AB, 2009 Sun Microsystems, Inc.
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
=== modified file 'mysql-test/lib/My/SysInfo.pm'
--- a/mysql-test/lib/My/SysInfo.pm 2008-10-11 15:30:26 +0000
+++ b/mysql-test/lib/My/SysInfo.pm 2011-01-18 10:03:44 +0000
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2008 MySQL AB
#
# 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
=== modified file 'mysql-test/lib/My/Test.pm'
--- a/mysql-test/lib/My/Test.pm 2008-11-14 10:49:12 +0000
+++ b/mysql-test/lib/My/Test.pm 2011-01-18 10:03:44 +0000
@@ -1,4 +1,18 @@
# -*- cperl -*-
+# Copyright (C) 2008 MySQL AB
+#
+# 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
#
=== modified file 'mysql-test/lib/mtr_gcov.pl'
--- a/mysql-test/lib/mtr_gcov.pl 2009-02-27 11:20:53 +0000
+++ b/mysql-test/lib/mtr_gcov.pl 2011-01-18 11:01:40 +0000
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004, 2006 MySQL AB
+# Copyright (C) 2004, 2006 MySQL AB, 2009 Sun Microsystems, Inc.
#
# 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
=== modified file 'mysql-test/lib/mtr_gprof.pl'
--- a/mysql-test/lib/mtr_gprof.pl 2010-01-05 20:35:50 +0000
+++ b/mysql-test/lib/mtr_gprof.pl 2011-01-18 11:11:52 +0000
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004 MySQL AB
+# Copyright (C) 2004 MySQL AB, 2009 Sun Microsystems, Inc.
#
# 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
=== modified file 'mysql-test/lib/mtr_io.pl'
--- a/mysql-test/lib/mtr_io.pl 2008-11-14 20:35:32 +0000
+++ b/mysql-test/lib/mtr_io.pl 2011-01-18 11:01:40 +0000
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2004-2007 MySQL AB, 2008 Sun Microsystems, Inc.
#
# 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
=== modified file 'mysql-test/lib/mtr_match.pm'
--- a/mysql-test/lib/mtr_match.pm 2008-04-08 14:51:26 +0000
+++ b/mysql-test/lib/mtr_match.pm 2011-01-18 11:01:40 +0000
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
+# Copyright (C) 2004-2008 MySQL AB
#
# 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
=== modified file 'mysql-test/lib/mtr_misc.pl'
--- a/mysql-test/lib/mtr_misc.pl 2010-06-03 08:31:26 +0000
+++ b/mysql-test/lib/mtr_misc.pl 2011-01-18 10:03:44 +0000
@@ -1,15 +1,16 @@
# -*- cperl -*-
-# Copyright (C) 2004-2006 MySQL AB
-#
-# 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.
-#
+# Copyright (c) 2004, 2010, 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 Library 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.
-#
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Library 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
=== modified file 'mysql-test/lib/mtr_report.pm'
--- a/mysql-test/lib/mtr_report.pm 2011-01-11 09:53:22 +0000
+++ b/mysql-test/lib/mtr_report.pm 2011-01-18 10:03:44 +0000
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright 2004-2008 MySQL AB, 2008 Sun Microsystems, Inc.
+# Copyright (c) 2004, 2011, 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
=== modified file 'mysql-test/lib/mtr_stress.pl'
--- a/mysql-test/lib/mtr_stress.pl 2009-11-19 12:19:11 +0000
+++ b/mysql-test/lib/mtr_stress.pl 2011-01-18 11:01:40 +0000
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2006 MySQL AB
+# Copyright (C) 2004-2007 MySQL AB, 2009 Sun Microsystems, Inc.
#
# 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
=== modified file 'mysql-test/lib/mtr_unique.pm'
--- a/mysql-test/lib/mtr_unique.pm 2009-04-23 11:35:02 +0000
+++ b/mysql-test/lib/mtr_unique.pm 2011-01-18 11:01:40 +0000
@@ -1,5 +1,5 @@
# -*- cperl -*-
-# Copyright (C) 2006 MySQL AB
+# Copyright (C) 2006-2008 MySQL AB, 2009 Sun Microsystems, Inc.
#
# 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
=== modified file 'mysql-test/mysql-stress-test.pl'
--- a/mysql-test/mysql-stress-test.pl 2010-12-28 23:47:05 +0000
+++ b/mysql-test/mysql-stress-test.pl 2011-01-18 10:03:44 +0000
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# Copyright (C) 2005, 2006 MySQL AB
+# Copyright (c) 2005, 2010, 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 Library General Public
@@ -12,10 +12,9 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-# MA 02111-1307, USA
+# 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
# ======================================================================
# MySQL server stress test system
=== modified file 'mysql-test/mysql-test-run.pl'
--- a/mysql-test/mysql-test-run.pl 2011-01-14 16:01:13 +0000
+++ b/mysql-test/mysql-test-run.pl 2011-01-27 11:38:13 +0000
@@ -13,10 +13,9 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-# MA 02111-1307, USA
+# 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
#
##############################################################################
@@ -4096,8 +4095,10 @@ sub check_expected_crash_and_restart {
{
mtr_verbose("Crash was expected, file '$expect_file' exists");
- for (my $waits = 0; $waits < 50; $waits++)
+ for (my $waits = 0; $waits < 50; mtr_milli_sleep(100), $waits++)
{
+ # Race condition seen on Windows: try again until file not empty
+ next if -z $expect_file;
# If last line in expect file starts with "wait"
# sleep a little and try again, thus allowing the
# test script to control when the server should start
@@ -4106,10 +4107,11 @@ sub check_expected_crash_and_restart {
if ($last_line =~ /^wait/ )
{
mtr_verbose("Test says wait before restart") if $waits == 0;
- mtr_milli_sleep(100);
next;
}
+ # Ignore any partial or unknown command
+ next unless $last_line =~ /^restart/;
# If last line begins "restart:", the rest of the line is read as
# extra command line options to add to the restarted mysqld.
# Anything other than 'wait' or 'restart:' (with a colon) will
@@ -4474,6 +4476,8 @@ sub mysqld_start ($$) {
my @all_opts= @$extra_opts;
if (exists $mysqld->{'restart_opts'}) {
push (@all_opts, @{$mysqld->{'restart_opts'}});
+ mtr_verbose(My::Options::toStr("mysqld_start restart",
+ @{$mysqld->{'restart_opts'}}));
}
mysqld_arguments($args,$mysqld,\@all_opts);
=== modified file 'mysql-test/r/client_xml.result'
--- a/mysql-test/r/client_xml.result 2008-07-18 12:00:45 +0000
+++ b/mysql-test/r/client_xml.result 2011-01-14 14:20:34 +0000
@@ -21,9 +21,9 @@ insert into t1 values (1, 2, 'a&b a<b a>
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="test">
<table_structure name="t1">
- <field Field="a&b" Type="int(11)" Null="YES" Key="" Extra="" />
- <field Field="a<b" Type="int(11)" Null="YES" Key="" Extra="" />
- <field Field="a>b" Type="text" Null="YES" Key="" Extra="" />
+ <field Field="a&b" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
+ <field Field="a<b" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
+ <field Field="a>b" Type="text" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
<table_data name="t1">
<row>
=== modified file 'mysql-test/r/ctype_many.result'
--- a/mysql-test/r/ctype_many.result 2006-02-22 09:09:59 +0000
+++ b/mysql-test/r/ctype_many.result 2011-01-17 12:11:33 +0000
@@ -1683,3 +1683,18 @@ ARMENIAN CAPIT DA 2
ARMENIAN CAPIT ECH 2
ARMENIAN CAPIT ZA 2
DROP TABLE t1;
+#
+# Start of 5.1 tests
+#
+#
+# Bug#58371 Assertion failed: !s.uses_buffer_owned_by(this) with format string function
+#
+SET NAMES latin1;
+DO CONVERT(CAST(SUBSTRING_INDEX(FORMAT(1,'1111'), FORMAT('','Zpq'),1)
+AS BINARY(0)) USING utf8);
+Warnings:
+Warning 1292 Truncated incorrect INTEGER value: 'Zpq'
+Warning 1292 Truncated incorrect BINARY(0) value: '1.'
+#
+# End of 5.1 tests
+#
=== modified file 'mysql-test/r/func_like.result'
--- a/mysql-test/r/func_like.result 2010-11-08 10:55:43 +0000
+++ b/mysql-test/r/func_like.result 2011-01-17 09:30:22 +0000
@@ -182,4 +182,9 @@ INSERT INTO t2 VALUES (1), (2), (3);
SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a;
1
DROP TABLE t1, t2;
+#
+# Bug#59149 valgrind warnings with "like .. escape .." function
+#
+SELECT '' LIKE '1' ESCAPE COUNT(1);
+ERROR HY000: Incorrect arguments to ESCAPE
End of 5.1 tests
=== modified file 'mysql-test/r/mysqladmin.result'
--- a/mysql-test/r/mysqladmin.result 2006-11-10 12:25:10 +0000
+++ b/mysql-test/r/mysqladmin.result 2011-01-15 20:34:08 +0000
@@ -2,3 +2,11 @@ mysqld is alive
mysqladmin: unknown variable 'database=db1'
Warning: mysqladmin: unknown variable 'loose-database=db2'
mysqld is alive
+#
+# Bug#58221 : mysqladmin --sleep=x --count=x keeps looping
+#
+# Executing mysqladmin with --sleep=1 and --count=2.
+# Done.
+# Displaying the output :
+mysqld is alive
+mysqld is alive
=== modified file 'mysql-test/r/mysqldump.result'
--- a/mysql-test/r/mysqldump.result 2010-05-06 20:41:37 +0000
+++ b/mysql-test/r/mysqldump.result 2011-01-14 14:20:34 +0000
@@ -14,7 +14,7 @@ INSERT INTO t1 VALUES (1), (2);
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="test">
<table_structure name="t1">
- <field Field="a" Type="int(11)" Null="YES" Key="MUL" Extra="" />
+ <field Field="a" Type="int(11)" Null="YES" Key="MUL" Extra="" Comment="" />
<key Table="t1" Non_unique="1" Key_name="a" Seq_in_index="1" Column_name="a" Collation="A" Null="YES" Index_type="BTREE" Comment="" />
</table_structure>
<table_data name="t1">
@@ -150,9 +150,9 @@ INSERT INTO t1 VALUES (1, "test", "tes")
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="test">
<table_structure name="t1">
- <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
- <field Field="b" Type="text" Null="YES" Key="" Extra="" />
- <field Field="c" Type="varchar(3)" Null="YES" Key="" Extra="" />
+ <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
+ <field Field="b" Type="text" Null="YES" Key="" Extra="" Comment="" />
+ <field Field="c" Type="varchar(3)" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
<table_data name="t1">
<row>
@@ -178,7 +178,7 @@ INSERT INTO t1 VALUES ("1\""), ("\"2");
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="test">
<table_structure name="t1">
- <field Field="a"b"" Type="char(2)" Null="YES" Key="" Extra="" />
+ <field Field="a"b"" Type="char(2)" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
<table_data name="t1">
<row>
@@ -1612,10 +1612,10 @@ CREATE TABLE `t2` (
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="mysqldump_test_db">
<table_structure name="t1">
- <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
+ <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
<table_structure name="t2">
- <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
+ <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
</database>
</mysqldump>
@@ -1623,10 +1623,10 @@ CREATE TABLE `t2` (
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="mysqldump_test_db">
<table_structure name="t1">
- <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
+ <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
<table_structure name="t2">
- <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" />
+ <field Field="a" Type="int(11)" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
</database>
</mysqldump>
@@ -3644,8 +3644,8 @@ INSERT INTO t1 VALUES(1,0xff00fef0);
<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<database name="test">
<table_structure name="t1">
- <field Field="f1" Type="int(10)" Null="YES" Key="" Extra="" />
- <field Field="data" Type="mediumblob" Null="YES" Key="" Extra="" />
+ <field Field="f1" Type="int(10)" Null="YES" Key="" Extra="" Comment="" />
+ <field Field="data" Type="mediumblob" Null="YES" Key="" Extra="" Comment="" />
</table_structure>
<table_data name="t1">
<row>
@@ -4576,5 +4576,20 @@ LENGTH(a)
800
DROP TABLE t1, t2;
#
+# Bug #13618 : mysqldump --xml ommit comment on table field
+#
+CREATE TABLE `comment_table` (i INT COMMENT 'FIELD COMMENT') COMMENT = 'TABLE COMMENT';
+<?xml version="1.0"?>
+<mysqldump xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+<database name="test">
+ <table_structure name="comment_table">
+ <field Field="i" Type="int(11)" Null="YES" Key="" Extra="" Comment="FIELD COMMENT" />
+ </table_structure>
+ <table_data name="comment_table">
+ </table_data>
+</database>
+</mysqldump>
+DROP TABLE `comment_table`;
+#
# End of 5.1 tests
#
=== modified file 'mysql-test/r/partition_error.result'
--- a/mysql-test/r/partition_error.result 2010-12-22 09:50:36 +0000
+++ b/mysql-test/r/partition_error.result 2011-01-26 15:50:21 +0000
@@ -1,5 +1,18 @@
drop table if exists t1;
#
+# Bug#57924: crash when creating partitioned table with
+# multiple columns in the partition key
+#
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(a, b, a);
+ERROR HY000: Field in list of fields for partition function not found in table
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(A, b);
+DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(a, b, A);
+ERROR HY000: Field in list of fields for partition function not found in table
+#
# Bug#54483: valgrind errors when making warnings for multiline inserts
# into partition
#
=== modified file 'mysql-test/r/type_datetime.result'
--- a/mysql-test/r/type_datetime.result 2010-03-09 10:36:26 +0000
+++ b/mysql-test/r/type_datetime.result 2011-01-19 14:09:32 +0000
@@ -637,4 +637,15 @@ CAST(CAST('2008-07-29T10:42:51.1234567'
20080729104251.1234560
Warnings:
Warning 1292 Truncated incorrect datetime value: '2008-07-29T10:42:51.1234567'
+#
+# Bug#59173: Failure to handle DATE(TIME) values where Year, Month or
+# Day is ZERO
+#
+CREATE TABLE t1 (dt1 DATETIME);
+INSERT INTO t1 (dt1) VALUES ('0000-00-01 00:00:01');
+DELETE FROM t1 WHERE dt1 = '0000-00-01 00:00:01';
+# Should be empty
+SELECT * FROM t1;
+dt1
+DROP TABLE t1;
End of 5.1 tests
=== modified file 'mysql-test/r/xml.result'
--- a/mysql-test/r/xml.result 2010-11-22 09:21:10 +0000
+++ b/mysql-test/r/xml.result 2011-01-18 06:38:41 +0000
@@ -1113,4 +1113,15 @@ SELECT UPDATEXML(NULL, (LPAD(0.1111E-15,
ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' value found during parsing
SELECT EXTRACTVALUE('', LPAD(0.1111E-15, '2011', 1));
ERROR 22007: Illegal double '111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111' value found during parsing
+#
+# Bug #44332 my_xml_scan reads behind the end of buffer
+#
+SELECT UPDATEXML(CONVERT(_latin1'<' USING utf8),'1','1');
+UPDATEXML(CONVERT(_latin1'<' USING utf8),'1','1')
+NULL
+Warnings:
+Warning 1525 Incorrect XML value: 'parse error at line 1 pos 2: END-OF-INPUT unexpected (ident or '/' wanted)'
+SELECT UPDATEXML(CONVERT(_latin1'<!--' USING utf8),'1','1');
+UPDATEXML(CONVERT(_latin1'<!--' USING utf8),'1','1')
+NULL
End of 5.1 tests
=== modified file 'mysql-test/suite/ndb/r/ndb_basic.result'
--- a/mysql-test/suite/ndb/r/ndb_basic.result 2007-10-26 07:06:18 +0000
+++ b/mysql-test/suite/ndb/r/ndb_basic.result 2011-01-10 15:20:28 +0000
@@ -585,6 +585,8 @@ c127 int,
c128 int,
primary key using hash(c1)) engine=ndb partition by key(c1);
drop table t1;
+create table `t1` (`a` int, b int, primary key (a,b)) engine=ndb partition by key(`a`,`b`,`a`);
+ERROR HY000: Field in list of fields for partition function not found in table
create table t1 (
a1234567890123456789012345678901234567890 int primary key,
a12345678901234567890123456789a1234567890 int,
=== modified file 'mysql-test/suite/ndb/t/ndb_basic.test'
--- a/mysql-test/suite/ndb/t/ndb_basic.test 2007-10-26 06:57:10 +0000
+++ b/mysql-test/suite/ndb/t/ndb_basic.test 2011-01-10 15:20:28 +0000
@@ -548,6 +548,13 @@ primary key using hash(c1)) engine=ndb p
drop table t1;
#
+# test bug#53354 - crash when creating partitioned table with multiple columns in the partition key
+#
+
+--error ER_FIELD_NOT_FOUND_PART_ERROR
+create table `t1` (`a` int, b int, primary key (a,b)) engine=ndb partition by key(`a`,`b`,`a`);
+
+#
# test max size of attribute name and truncation
#
=== modified file 'mysql-test/suite/rpl/r/rpl_stop_slave.result'
--- a/mysql-test/suite/rpl/r/rpl_stop_slave.result 2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/r/rpl_stop_slave.result 2011-01-18 17:23:49 +0000
@@ -128,5 +128,47 @@ START SLAVE SQL_THREAD;
include/wait_for_slave_sql_to_start.inc
# Test end
SET GLOBAL debug= '$debug_save';
+include/restart_slave.inc
+[connection master]
DROP TABLE t1, t2;
+
+# Bug#58546 test rpl_packet timeout failure sporadically on PB
+# ----------------------------------------------------------------------
+# STOP SLAVE stopped IO thread first and then stopped SQL thread. It was
+# possible that IO thread stopped after replicating part of a transaction
+# which SQL thread was executing. SQL thread would be hung if the
+# transaction could not be rolled back safely.
+# It caused some sporadic failures on PB2.
+#
+# This test verifies that when 'STOP SLAVE' is issued by a user, IO
+# thread will continue to fetch the rest events of the transaction which
+# is being executed by SQL thread and is not able to be rolled back safely.
+CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
+CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES(1, 1);
+SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
+[connection slave]
+include/restart_slave.inc
+BEGIN;
+UPDATE t1 SET c2 = 2 WHERE c1 = 1;
+[connection master]
+BEGIN;
+INSERT INTO t1 VALUES(2, 2);
+INSERT INTO t2 VALUES(1);
+UPDATE t1 SET c2 = 3 WHERE c1 = 1;
+COMMIT;
+[connection slave1]
+STOP SLAVE;
+[connection slave]
+ROLLBACK;
+[connection master]
+SET DEBUG_SYNC= 'now SIGNAL signal.continue';
+SET DEBUG_SYNC= 'RESET';
+[connection slave]
+include/wait_for_slave_to_stop.inc
+[connection slave1]
+include/start_slave.inc
+[connection master]
+DROP TABLE t1, t2;
+SET GLOBAL debug= $debug_save;
include/rpl_end.inc
=== modified file 'mysql-test/suite/rpl/t/disabled.def'
--- a/mysql-test/suite/rpl/t/disabled.def 2011-01-05 12:58:05 +0000
+++ b/mysql-test/suite/rpl/t/disabled.def 2011-01-26 12:37:24 +0000
@@ -13,3 +13,5 @@
rpl_row_create_table : Bug#51574 Feb 27 2010 andrei failed different way than earlier with bug#45576
rpl_log_pos : BUG#55675 Sep 10 2010 27 2010 alfranio rpl.rpl_log_pos fails sporadically with error binlog truncated in the middle
rpl_get_master_version_and_clock : Bug#59178 Jan 05 2011 joro Valgrind warnings rpl_get_master_version_and_clock
+rpl_row_until : BUG#59543 Jan 26 2011 alfranio Replication test from eits suite rpl_row_until times out
+rpl_stm_until : BUG#59543 Jan 26 2011 alfranio Replication test from eits suite rpl_row_until times out
=== modified file 'mysql-test/suite/rpl/t/rpl_packet.test'
--- a/mysql-test/suite/rpl/t/rpl_packet.test 2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/t/rpl_packet.test 2011-01-18 17:23:49 +0000
@@ -26,8 +26,8 @@ let $old_net_buffer_length= `SELECT @@gl
SET @@global.max_allowed_packet=1024;
SET @@global.net_buffer_length=1024;
+sync_slave_with_master;
# Restart slave for setting to take effect
-connection slave;
source include/stop_slave.inc;
source include/start_slave.inc;
=== modified file 'mysql-test/suite/rpl/t/rpl_stop_slave.test'
--- a/mysql-test/suite/rpl/t/rpl_stop_slave.test 2010-12-19 17:07:28 +0000
+++ b/mysql-test/suite/rpl/t/rpl_stop_slave.test 2011-01-18 17:23:49 +0000
@@ -54,7 +54,69 @@ source extra/rpl_tests/rpl_stop_slave.te
--echo # Test end
SET GLOBAL debug= '$debug_save';
+source include/restart_slave_sql.inc;
-connection master;
+--source include/rpl_connection_master.inc
DROP TABLE t1, t2;
+
+--echo
+--echo # Bug#58546 test rpl_packet timeout failure sporadically on PB
+--echo # ----------------------------------------------------------------------
+--echo # STOP SLAVE stopped IO thread first and then stopped SQL thread. It was
+--echo # possible that IO thread stopped after replicating part of a transaction
+--echo # which SQL thread was executing. SQL thread would be hung if the
+--echo # transaction could not be rolled back safely.
+--echo # It caused some sporadic failures on PB2.
+--echo #
+--echo # This test verifies that when 'STOP SLAVE' is issued by a user, IO
+--echo # thread will continue to fetch the rest events of the transaction which
+--echo # is being executed by SQL thread and is not able to be rolled back safely.
+
+CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
+CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
+INSERT INTO t1 VALUES(1, 1);
+
+let $debug_save= `SELECT @@GLOBAL.debug`;
+SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
+
+sync_slave_with_master;
+
+--source include/rpl_connection_slave.inc
+source include/restart_slave_sql.inc;
+
+BEGIN;
+UPDATE t1 SET c2 = 2 WHERE c1 = 1;
+
+--source include/rpl_connection_master.inc
+BEGIN;
+INSERT INTO t1 VALUES(2, 2);
+INSERT INTO t2 VALUES(1);
+UPDATE t1 SET c2 = 3 WHERE c1 = 1;
+COMMIT;
+
+--source include/rpl_connection_slave1.inc
+let $show_statement= SHOW PROCESSLIST;
+let $field= Info;
+let $condition= = 'UPDATE t1 SET c2 = 3 WHERE c1 = 1';
+source include/wait_show_condition.inc;
+
+send STOP SLAVE;
+
+--source include/rpl_connection_slave.inc
+ROLLBACK;
+
+--source include/rpl_connection_master.inc
+SET DEBUG_SYNC= 'now SIGNAL signal.continue';
+SET DEBUG_SYNC= 'RESET';
+
+--source include/rpl_connection_slave.inc
+source include/wait_for_slave_to_stop.inc;
+
+--source include/rpl_connection_slave1.inc
+reap;
+source include/start_slave.inc;
+
+--source include/rpl_connection_master.inc
+DROP TABLE t1, t2;
+SET GLOBAL debug= $debug_save;
--source include/rpl_end.inc
=== modified file 'mysql-test/suite/sys_vars/r/general_log_file_basic.result'
--- a/mysql-test/suite/sys_vars/r/general_log_file_basic.result 2010-11-08 15:30:26 +0000
+++ b/mysql-test/suite/sys_vars/r/general_log_file_basic.result 2010-11-11 10:25:03 +0000
@@ -16,4 +16,4 @@ FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='general_log_file';
@@global.general_log_file = VARIABLE_VALUE
1
-SET @@global.general_log_file= 'test.log';
+SET @@global.general_log_file= 'start_value';
=== modified file 'mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result'
--- a/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result 2009-01-30 16:59:10 +0000
+++ b/mysql-test/suite/sys_vars/r/innodb_max_dirty_pages_pct_func.result 2011-01-18 03:54:52 +0000
@@ -64,12 +64,12 @@ SET last = pct;
END IF;
END WHILE;
END//
-CREATE PROCEDURE check_pct(IN num DECIMAL)
+CREATE PROCEDURE check_pct(IN success_on_wait BOOLEAN)
BEGIN
-IF (dirty_pct() < num) THEN
+IF (success_on_wait > 0) THEN
SELECT 'BELOW_MAX' AS PCT_VALUE;
ELSE
-SELECT 'ABOVE_MAX' AS PCT_VALUE;
+SELECT 'ABOVE_MAX or TimeOut Of The Test' AS PCT_VALUE;
END IF;
END//
CREATE TABLE t1(
@@ -83,7 +83,7 @@ CALL add_until(10);
FLUSH TABLES;
CALL add_records(500);
'We expect dirty pages pct to be BELOW_MAX after some time depending on performance'
-CALL check_pct(10);
+CALL check_pct(1);
PCT_VALUE
BELOW_MAX
DROP PROCEDURE add_records;
=== modified file 'mysql-test/suite/sys_vars/r/log_output_func.result'
--- a/mysql-test/suite/sys_vars/r/log_output_func.result 2010-11-08 15:30:26 +0000
+++ b/mysql-test/suite/sys_vars/r/log_output_func.result 2010-11-11 10:25:03 +0000
@@ -52,7 +52,7 @@ count(*)
DROP TABLE t1;
connection default;
SET @@global.general_log= 'OFF';
-SET @@global.general_log_file= '/home/horst/bzr/5.1-52501/mysql-test/var/mysqld.1/mysqld.log';
+SET @@global.general_log_file= 'start_general_log_file';
SET @@global.log_output= @start_value;
SET @@global.general_log= @start_general_log;
SET @@global.general_log= 'ON';
=== modified file 'mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result'
--- a/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result 2010-11-08 15:30:26 +0000
+++ b/mysql-test/suite/sys_vars/r/slow_query_log_file_basic.result 2010-11-11 10:25:03 +0000
@@ -14,4 +14,4 @@ FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='slow_query_log_file';
@@global.slow_query_log_file = VARIABLE_VALUE
1
-SET @@global.slow_query_log_file= 'slowtest.log';
+SET @@global.slow_query_log_file= 'start_value';
=== modified file 'mysql-test/suite/sys_vars/t/div_precision_increment_func.test'
--- a/mysql-test/suite/sys_vars/t/div_precision_increment_func.test 2008-12-19 15:12:15 +0000
+++ b/mysql-test/suite/sys_vars/t/div_precision_increment_func.test 2010-11-11 10:25:03 +0000
@@ -19,7 +19,7 @@
# #
################################################################################
-let $save_div_precision_increment = `SELECT @@global.div_precision_increment`
+let $save_div_precision_increment = `SELECT @@global.div_precision_increment`;
#SET @save_div_precision_increment = @@global.div_precision_increment;
=== modified file 'mysql-test/suite/sys_vars/t/general_log_file_basic.test'
--- a/mysql-test/suite/sys_vars/t/general_log_file_basic.test 2010-11-08 15:30:26 +0000
+++ b/mysql-test/suite/sys_vars/t/general_log_file_basic.test 2010-11-11 10:25:03 +0000
@@ -70,6 +70,7 @@ FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='general_log_file';
#SET @@global.general_log_file= @start_value;
+--replace_result $start_value start_value
eval SET @@global.general_log_file= '$start_value';
#####################################################
=== modified file 'mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test'
--- a/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test 2009-03-20 17:11:22 +0000
+++ b/mysql-test/suite/sys_vars/t/innodb_max_dirty_pages_pct_func.test 2011-01-18 03:54:52 +0000
@@ -117,12 +117,12 @@ BEGIN
END WHILE;
END//
-CREATE PROCEDURE check_pct(IN num DECIMAL)
+CREATE PROCEDURE check_pct(IN success_on_wait BOOLEAN)
BEGIN
- IF (dirty_pct() < num) THEN
+ IF (success_on_wait > 0) THEN
SELECT 'BELOW_MAX' AS PCT_VALUE;
ELSE
- SELECT 'ABOVE_MAX' AS PCT_VALUE;
+ SELECT 'ABOVE_MAX or TimeOut Of The Test' AS PCT_VALUE;
END IF;
END//
@@ -155,7 +155,8 @@ let $wait_condition= SELECT (dirty_pct()
--source include/wait_condition.inc
--echo 'We expect dirty pages pct to be BELOW_MAX after some time depending on performance'
-CALL check_pct(10);
+# Value For $sucess will be set from include/wait_condition.inc file. It can have values 1 or 0. It will be 1 if dirty_pct() <= @@global.innodb_max_dirty_pages_pct else it will be 0.
+eval CALL check_pct($success);
DROP PROCEDURE add_records;
DROP PROCEDURE add_until;
DROP PROCEDURE check_pct;
=== modified file 'mysql-test/suite/sys_vars/t/log_output_func.test'
--- a/mysql-test/suite/sys_vars/t/log_output_func.test 2010-11-08 15:30:26 +0000
+++ b/mysql-test/suite/sys_vars/t/log_output_func.test 2010-11-11 10:25:03 +0000
@@ -115,6 +115,7 @@ file_exists $MYSQLTEST_VARDIR/run/mytest
connection default;
SET @@global.general_log= 'OFF';
#SET @@global.general_log_file= @start_general_log_file;
+--replace_result $start_general_log_file start_general_log_file
eval SET @@global.general_log_file= '$start_general_log_file';
SET @@global.log_output= @start_value;
SET @@global.general_log= @start_general_log;
=== modified file 'mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test'
--- a/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test 2010-11-08 15:30:26 +0000
+++ b/mysql-test/suite/sys_vars/t/slow_query_log_file_basic.test 2010-11-11 10:25:03 +0000
@@ -68,6 +68,7 @@ FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
WHERE VARIABLE_NAME='slow_query_log_file';
#SET @@global.slow_query_log_file= @start_value;
+--replace_result $start_value start_value
eval SET @@global.slow_query_log_file= '$start_value';
#SELECT @start_value;
#####################################################
=== modified file 'mysql-test/t/ctype_many.test'
--- a/mysql-test/t/ctype_many.test 2005-10-13 14:16:19 +0000
+++ b/mysql-test/t/ctype_many.test 2011-01-17 12:11:33 +0000
@@ -211,3 +211,19 @@ SELECT min(comment),count(*) FROM t1 GRO
DROP TABLE t1;
# End of 4.1 tests
+
+
+--echo #
+--echo # Start of 5.1 tests
+--echo #
+
+--echo #
+--echo # Bug#58371 Assertion failed: !s.uses_buffer_owned_by(this) with format string function
+--echo #
+
+SET NAMES latin1;
+DO CONVERT(CAST(SUBSTRING_INDEX(FORMAT(1,'1111'), FORMAT('','Zpq'),1)
+ AS BINARY(0)) USING utf8);
+--echo #
+--echo # End of 5.1 tests
+--echo #
=== modified file 'mysql-test/t/func_like.test'
--- a/mysql-test/t/func_like.test 2010-11-08 10:55:43 +0000
+++ b/mysql-test/t/func_like.test 2011-01-17 09:30:22 +0000
@@ -126,5 +126,10 @@ INSERT INTO t2 VALUES (1), (2), (3);
SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a;
DROP TABLE t1, t2;
+--echo #
+--echo # Bug#59149 valgrind warnings with "like .. escape .." function
+--echo #
+--error ER_WRONG_ARGUMENTS
+SELECT '' LIKE '1' ESCAPE COUNT(1);
--echo End of 5.1 tests
=== modified file 'mysql-test/t/gis.test'
--- a/mysql-test/t/gis.test 2011-01-12 13:02:41 +0000
+++ b/mysql-test/t/gis.test 2011-01-14 20:56:09 +0000
@@ -358,7 +358,7 @@ t1 where object_id=85998;
# Expected result is 36.3310176346905, but IA64 returns 36.3310176346904
# due to fused multiply-add instructions.
---replace_result 36.3310176346904 36.3310176346905
+--replace_result 36.3310176346904 36.3310176346905 -114.87787186923326 -114.87787186923313 36.33101763469053 36.33101763469059 36.33101763469043 36.33101763469059
select object_id, geometrytype(geo), ISSIMPLE(GEO), ASTEXT(centroid(geo)) from
t1 where object_id=85984;
=== modified file 'mysql-test/t/mysqladmin.test'
--- a/mysql-test/t/mysqladmin.test 2007-08-07 09:42:14 +0000
+++ b/mysql-test/t/mysqladmin.test 2011-01-15 20:34:08 +0000
@@ -33,3 +33,15 @@ EOF
--exec $MYSQLADMIN --defaults-file=$MYSQLTEST_VARDIR/tmp/bug10608.cnf -S $MASTER_MYSOCK -P $MASTER_MYPORT -u root --password= ping 2>&1
remove_file $MYSQLTEST_VARDIR/tmp/bug10608.cnf;
+
+--echo #
+--echo # Bug#58221 : mysqladmin --sleep=x --count=x keeps looping
+--echo #
+
+--echo # Executing mysqladmin with --sleep=1 and --count=2.
+--exec $MYSQLADMIN -u root -S $MASTER_MYSOCK -P $MASTER_MYPORT --sleep=1 --count=2 ping > $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp
+--echo # Done.
+--echo # Displaying the output :
+--cat_file $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp
+
+--remove_file $MYSQLTEST_VARDIR/tmp/mysqladmin.tmp
=== modified file 'mysql-test/t/mysqldump.test'
--- a/mysql-test/t/mysqldump.test 2010-05-20 15:38:01 +0000
+++ b/mysql-test/t/mysqldump.test 2011-01-14 14:20:34 +0000
@@ -2164,6 +2164,15 @@ SELECT LENGTH(a) FROM t2;
DROP TABLE t1, t2;
###########################################################################
+
+--echo #
+--echo # Bug #13618 : mysqldump --xml ommit comment on table field
+--echo #
+
+CREATE TABLE `comment_table` (i INT COMMENT 'FIELD COMMENT') COMMENT = 'TABLE COMMENT';
+--exec $MYSQL_DUMP --compact --skip-create --xml test
+DROP TABLE `comment_table`;
+
--echo #
--echo # End of 5.1 tests
--echo #
=== modified file 'mysql-test/t/partition_error.test'
--- a/mysql-test/t/partition_error.test 2010-12-22 09:50:36 +0000
+++ b/mysql-test/t/partition_error.test 2011-01-26 15:50:21 +0000
@@ -11,6 +11,21 @@ drop table if exists t1;
let $MYSQLD_DATADIR= `SELECT @@datadir`;
--echo #
+--echo # Bug#57924: crash when creating partitioned table with
+--echo # multiple columns in the partition key
+--echo #
+--error ER_FIELD_NOT_FOUND_PART_ERROR
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(a, b, a);
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(A, b);
+DROP TABLE t1;
+--error ER_FIELD_NOT_FOUND_PART_ERROR
+CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a,b))
+PARTITION BY KEY(a, b, A);
+
+
+--echo #
--echo # Bug#54483: valgrind errors when making warnings for multiline inserts
--echo # into partition
--echo #
@@ -673,7 +688,6 @@ PARTITION BY HASH (TIME_TO_SEC(a));
CREATE TABLE t1 (a INT)
PARTITION BY HASH (TIME_TO_SEC(a));
-
--echo #
--echo # Bug#49161: Out of memory; restart server and try again (needed 2 bytes)
--echo #
=== modified file 'mysql-test/t/type_datetime.test'
--- a/mysql-test/t/type_datetime.test 2009-02-13 18:07:03 +0000
+++ b/mysql-test/t/type_datetime.test 2011-01-19 14:09:32 +0000
@@ -445,4 +445,15 @@ SELECT CAST(CAST('00000002006-000008-000
# show we truncate microseconds from the right
SELECT CAST(CAST('2008-07-29T10:42:51.1234567' AS DateTime) AS DECIMAL(30,7));
+--echo #
+--echo # Bug#59173: Failure to handle DATE(TIME) values where Year, Month or
+--echo # Day is ZERO
+--echo #
+CREATE TABLE t1 (dt1 DATETIME);
+INSERT INTO t1 (dt1) VALUES ('0000-00-01 00:00:01');
+DELETE FROM t1 WHERE dt1 = '0000-00-01 00:00:01';
+--echo # Should be empty
+SELECT * FROM t1;
+DROP TABLE t1;
+
--echo End of 5.1 tests
=== modified file 'mysql-test/t/xml.test'
--- a/mysql-test/t/xml.test 2010-11-22 09:21:10 +0000
+++ b/mysql-test/t/xml.test 2011-01-18 06:38:41 +0000
@@ -640,5 +640,10 @@ SELECT UPDATEXML(NULL, (LPAD(0.1111E-15,
--error ER_ILLEGAL_VALUE_FOR_TYPE
SELECT EXTRACTVALUE('', LPAD(0.1111E-15, '2011', 1));
+--echo #
+--echo # Bug #44332 my_xml_scan reads behind the end of buffer
+--echo #
+SELECT UPDATEXML(CONVERT(_latin1'<' USING utf8),'1','1');
+SELECT UPDATEXML(CONVERT(_latin1'<!--' USING utf8),'1','1');
--echo End of 5.1 tests
=== modified file 'mysql-test/valgrind.supp'
--- a/mysql-test/valgrind.supp 2010-12-28 23:47:05 +0000
+++ b/mysql-test/valgrind.supp 2011-01-18 10:03:44 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2008 MySQL AB
+# Copyright (c) 2005, 2010, 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 Library General Public
@@ -10,10 +10,9 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
-# You should have received a copy of the GNU Library General Public
-# License along with this library; if not, write to the Free
-# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-# MA 02111-1307, USA
+# 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
#
# Suppress some common (not fatal) errors in system libraries found by valgrind
=== modified file 'sql/item_cmpfunc.cc'
--- a/sql/item_cmpfunc.cc 2010-12-28 23:47:05 +0000
+++ b/sql/item_cmpfunc.cc 2011-01-19 14:09:32 +0000
@@ -913,7 +913,7 @@ int Arg_comparator::set_cmp_func(Item_re
cache_converted_constant can't be used here because it can't
correctly convert a DATETIME value from string to int representation.
*/
- Item_cache_int *cache= new Item_cache_int();
+ Item_cache_int *cache= new Item_cache_int(MYSQL_TYPE_DATETIME);
/* Mark the cache as non-const to prevent re-caching. */
cache->set_used_tables(1);
if (!(*a)->is_datetime())
=== modified file 'sql/item_strfunc.cc'
--- a/sql/item_strfunc.cc 2011-01-13 07:57:15 +0000
+++ b/sql/item_strfunc.cc 2011-01-17 12:11:33 +0000
@@ -2761,22 +2761,16 @@ String *Item_func_conv_charset::val_str(
DBUG_ASSERT(fixed == 1);
if (use_cached_value)
return null_value ? 0 : &str_value;
- /*
- Here we don't pass 'str' as a parameter to args[0]->val_str()
- as 'str' may point to 'str_value' (e.g. see Item::save_in_field()),
- which we use below to convert string.
- Use argument's 'str_value' instead.
- */
- String *arg= args[0]->val_str(&args[0]->str_value);
+ String *arg= args[0]->val_str(str);
uint dummy_errors;
if (!arg)
{
null_value=1;
return 0;
}
- null_value= str_value.copy(arg->ptr(),arg->length(),arg->charset(),
+ null_value= tmp_value.copy(arg->ptr(), arg->length(), arg->charset(),
conv_charset, &dummy_errors);
- return null_value ? 0 : check_well_formed_result(&str_value);
+ return null_value ? 0 : check_well_formed_result(&tmp_value);
}
void Item_func_conv_charset::fix_length_and_dec()
=== modified file 'sql/item_strfunc.h'
--- a/sql/item_strfunc.h 2011-01-13 07:57:15 +0000
+++ b/sql/item_strfunc.h 2011-01-17 12:11:33 +0000
@@ -713,6 +713,7 @@ public:
class Item_func_conv_charset :public Item_str_func
{
bool use_cached_value;
+ String tmp_value;
public:
bool safe;
CHARSET_INFO *conv_charset; // keep it public
=== modified file 'sql/item_sum.h'
--- a/sql/item_sum.h 2010-12-21 11:34:11 +0000
+++ b/sql/item_sum.h 2011-01-17 09:30:22 +0000
@@ -339,6 +339,7 @@ public:
forced_const= TRUE;
}
virtual bool const_item() const { return forced_const; }
+ virtual bool const_during_execution() const { return false; }
virtual void print(String *str, enum_query_type query_type);
void fix_num_length_and_dec();
=== modified file 'sql/slave.cc'
--- a/sql/slave.cc 2010-11-30 23:32:51 +0000
+++ b/sql/slave.cc 2011-01-24 03:48:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2003 MySQL AB
+/* Copyright (C) 2000, 2011, 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
@@ -408,17 +408,6 @@ int terminate_slave_threads(Master_info*
int error,force_all = (thread_mask & SLAVE_FORCE_ALL);
pthread_mutex_t *sql_lock = &mi->rli.run_lock, *io_lock = &mi->run_lock;
- if (thread_mask & (SLAVE_IO|SLAVE_FORCE_ALL))
- {
- DBUG_PRINT("info",("Terminating IO thread"));
- mi->abort_slave=1;
- if ((error=terminate_slave_thread(mi->io_thd, io_lock,
- &mi->stop_cond,
- &mi->slave_running,
- skip_lock)) &&
- !force_all)
- DBUG_RETURN(error);
- }
if (thread_mask & (SLAVE_SQL|SLAVE_FORCE_ALL))
{
DBUG_PRINT("info",("Terminating SQL thread"));
@@ -429,6 +418,17 @@ int terminate_slave_threads(Master_info*
skip_lock)) &&
!force_all)
DBUG_RETURN(error);
+ }
+ if (thread_mask & (SLAVE_IO|SLAVE_FORCE_ALL))
+ {
+ DBUG_PRINT("info",("Terminating IO thread"));
+ mi->abort_slave=1;
+ if ((error=terminate_slave_thread(mi->io_thd, io_lock,
+ &mi->stop_cond,
+ &mi->slave_running,
+ skip_lock)) &&
+ !force_all)
+ DBUG_RETURN(error);
}
DBUG_RETURN(0);
}
=== modified file 'sql/sql_partition.cc'
--- a/sql/sql_partition.cc 2010-12-22 14:45:17 +0000
+++ b/sql/sql_partition.cc 2011-01-26 15:50:21 +0000
@@ -761,6 +761,9 @@ static bool handle_list_of_fields(List_i
bool result;
char *field_name;
bool is_list_empty= TRUE;
+ int fields_handled = 0;
+ char* field_name_array[MAX_KEY];
+
DBUG_ENTER("handle_list_of_fields");
while ((field_name= it++))
@@ -776,6 +779,25 @@ static bool handle_list_of_fields(List_i
result= TRUE;
goto end;
}
+
+ /*
+ Check for duplicate fields in the list.
+ Assuming that there are not many fields in the partition key list.
+ If there were, it would be better to replace the for-loop
+ with a more efficient algorithm.
+ */
+
+ field_name_array[fields_handled] = field_name;
+ for (int i = 0; i < fields_handled; ++i)
+ {
+ if (my_strcasecmp(system_charset_info,
+ field_name_array[i], field_name) == 0)
+ {
+ my_error(ER_FIELD_NOT_FOUND_PART_ERROR, MYF(0));
+ DBUG_RETURN(TRUE);
+ }
+ }
+ fields_handled++;
}
if (is_list_empty)
{
=== modified file 'sql/sql_repl.cc'
--- a/sql/sql_repl.cc 2010-07-26 09:56:30 +0000
+++ b/sql/sql_repl.cc 2011-01-24 03:48:54 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2006 MySQL AB & Sasha
+/* Copyright (C) 2000, 2011, 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
@@ -21,6 +21,7 @@
#include "log_event.h"
#include "rpl_filter.h"
#include <my_dir.h>
+#include "debug_sync.h"
int max_binlog_dump_events = 0; // unlimited
my_bool opt_sporadic_binlog_dump_fail = 0;
@@ -556,6 +557,20 @@ impossible position";
}
#endif
+ DBUG_EXECUTE_IF("dump_thread_wait_before_send_xid",
+ {
+ if ((*packet)[EVENT_TYPE_OFFSET+1] == XID_EVENT)
+ {
+ net_flush(net);
+ const char act[]=
+ "now "
+ "wait_for signal.continue";
+ DBUG_ASSERT(opt_debug_sync_timeout > 0);
+ DBUG_ASSERT(!debug_sync_set_action(current_thd,
+ STRING_WITH_LEN(act)));
+ }
+ });
+
if ((*packet)[EVENT_TYPE_OFFSET+1] == FORMAT_DESCRIPTION_EVENT)
{
binlog_can_be_corrupted= test((*packet)[FLAGS_OFFSET+1] &
@@ -572,6 +587,14 @@ impossible position";
goto err;
}
+ DBUG_EXECUTE_IF("dump_thread_wait_before_send_xid",
+ {
+ if ((*packet)[EVENT_TYPE_OFFSET+1] == XID_EVENT)
+ {
+ net_flush(net);
+ }
+ });
+
DBUG_PRINT("info", ("log event code %d",
(*packet)[LOG_EVENT_OFFSET+1] ));
if ((*packet)[LOG_EVENT_OFFSET+1] == LOAD_EVENT)
=== modified file 'strings/bchange.c'
--- a/strings/bchange.c 2007-05-10 09:59:39 +0000
+++ b/strings/bchange.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/bcopy-duff.c'
--- a/strings/bcopy-duff.c 2006-12-23 19:17:15 +0000
+++ b/strings/bcopy-duff.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/bfill.c'
--- a/strings/bfill.c 2006-12-23 19:17:15 +0000
+++ b/strings/bfill.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 MySQL AB
+/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
=== modified file 'strings/bmove.c'
--- a/strings/bmove.c 2006-12-23 19:17:15 +0000
+++ b/strings/bmove.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 MySQL AB
+/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
=== modified file 'strings/bmove512.c'
--- a/strings/bmove512.c 2007-05-10 09:59:39 +0000
+++ b/strings/bmove512.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/bmove_upp.c'
--- a/strings/bmove_upp.c 2007-05-10 09:59:39 +0000
+++ b/strings/bmove_upp.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/conf_to_src.c'
--- a/strings/conf_to_src.c 2008-11-14 16:29:38 +0000
+++ b/strings/conf_to_src.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
@@ -249,7 +249,7 @@ static void
fprint_copyright(FILE *file)
{
fprintf(file,
-"/* Copyright 2000-2008 MySQL AB, 2008 Sun Microsystems, Inc.\n"
+"/* Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.\n"
"\n"
" This program is free software; you can redistribute it and/or modify\n"
" it under the terms of the GNU General Public License as published by\n"
=== modified file 'strings/ctype-big5.c'
--- a/strings/ctype-big5.c 2010-07-26 05:06:18 +0000
+++ b/strings/ctype-big5.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/ctype-bin.c'
--- a/strings/ctype-bin.c 2007-06-05 22:22:35 +0000
+++ b/strings/ctype-bin.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 MySQL AB & tommy@stripped.
+/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. & tommy@stripped.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
=== modified file 'strings/ctype-cp932.c'
--- a/strings/ctype-cp932.c 2010-07-26 05:06:18 +0000
+++ b/strings/ctype-cp932.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/ctype-czech.c'
--- a/strings/ctype-czech.c 2007-05-10 09:59:39 +0000
+++ b/strings/ctype-czech.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/ctype-euc_kr.c'
--- a/strings/ctype-euc_kr.c 2010-07-26 05:06:18 +0000
+++ b/strings/ctype-euc_kr.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/ctype-eucjpms.c'
--- a/strings/ctype-eucjpms.c 2010-07-26 05:06:18 +0000
+++ b/strings/ctype-eucjpms.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 MySQL AB & tommy@stripped.
+/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. & tommy@stripped.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
=== modified file 'strings/ctype-extra.c'
--- a/strings/ctype-extra.c 2010-11-26 13:58:54 +0000
+++ b/strings/ctype-extra.c 2011-01-19 13:17:52 +0000
@@ -6,7 +6,7 @@
./conf_to_src ../sql/share/charsets/ > FILE
*/
-/* Copyright (C) 2000-2007 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/ctype-gb2312.c'
--- a/strings/ctype-gb2312.c 2010-07-26 05:06:18 +0000
+++ b/strings/ctype-gb2312.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/ctype-gbk.c'
--- a/strings/ctype-gbk.c 2010-07-26 05:06:18 +0000
+++ b/strings/ctype-gbk.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/ctype-latin1.c'
--- a/strings/ctype-latin1.c 2007-05-10 09:59:39 +0000
+++ b/strings/ctype-latin1.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/ctype-mb.c'
--- a/strings/ctype-mb.c 2010-07-26 05:06:18 +0000
+++ b/strings/ctype-mb.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/ctype-simple.c'
--- a/strings/ctype-simple.c 2009-10-12 07:43:15 +0000
+++ b/strings/ctype-simple.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 MySQL AB
+/* Copyright (c) 2002, 2011, 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
=== modified file 'strings/ctype-sjis.c'
--- a/strings/ctype-sjis.c 2010-07-26 05:06:18 +0000
+++ b/strings/ctype-sjis.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/ctype-tis620.c'
--- a/strings/ctype-tis620.c 2007-05-10 09:59:39 +0000
+++ b/strings/ctype-tis620.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2003 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/ctype-uca.c'
--- a/strings/ctype-uca.c 2009-10-20 07:47:00 +0000
+++ b/strings/ctype-uca.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 MySQL AB
+/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
=== modified file 'strings/ctype-ucs2.c'
--- a/strings/ctype-ucs2.c 2010-07-02 18:30:47 +0000
+++ b/strings/ctype-ucs2.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
=== modified file 'strings/ctype-ujis.c'
--- a/strings/ctype-ujis.c 2010-07-26 05:06:18 +0000
+++ b/strings/ctype-ujis.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 MySQL AB & tommy@stripped.
+/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved. & tommy@stripped.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
=== modified file 'strings/ctype-utf8.c'
--- a/strings/ctype-utf8.c 2009-08-28 16:21:54 +0000
+++ b/strings/ctype-utf8.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
=== modified file 'strings/ctype-win1250ch.c'
--- a/strings/ctype-win1250ch.c 2007-05-10 09:59:39 +0000
+++ b/strings/ctype-win1250ch.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 MySQL AB
+/* Copyright (c) 2003, 2011, 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
=== modified file 'strings/ctype.c'
--- a/strings/ctype.c 2009-06-06 13:05:44 +0000
+++ b/strings/ctype.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/decimal.c'
--- a/strings/decimal.c 2010-07-20 18:07:36 +0000
+++ b/strings/decimal.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/do_ctype.c'
--- a/strings/do_ctype.c 2007-05-10 09:59:39 +0000
+++ b/strings/do_ctype.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/dump_map.c'
--- a/strings/dump_map.c 2006-12-31 00:02:27 +0000
+++ b/strings/dump_map.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2004 MySQL AB
+/* Copyright (c) 2003, 2011, 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
=== modified file 'strings/int2str.c'
--- a/strings/int2str.c 2007-10-31 09:34:26 +0000
+++ b/strings/int2str.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/is_prefix.c'
--- a/strings/is_prefix.c 2006-12-23 19:17:15 +0000
+++ b/strings/is_prefix.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/llstr.c'
--- a/strings/llstr.c 2007-11-30 05:32:04 +0000
+++ b/strings/llstr.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/longlong2str.c'
--- a/strings/longlong2str.c 2007-10-31 09:34:26 +0000
+++ b/strings/longlong2str.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/longlong2str_asm.c'
--- a/strings/longlong2str_asm.c 2006-12-23 19:17:15 +0000
+++ b/strings/longlong2str_asm.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/memcmp.c'
--- a/strings/memcmp.c 2006-12-23 19:17:15 +0000
+++ b/strings/memcmp.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/memcpy.c'
--- a/strings/memcpy.c 2006-12-23 19:17:15 +0000
+++ b/strings/memcpy.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/memset.c'
--- a/strings/memset.c 2006-12-23 19:17:15 +0000
+++ b/strings/memset.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/my_strchr.c'
--- a/strings/my_strchr.c 2010-12-01 12:54:50 +0000
+++ b/strings/my_strchr.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005 MySQL AB
+/* Copyright (c) 2005, 2011, 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
=== modified file 'strings/my_strtoll10.c'
--- a/strings/my_strtoll10.c 2007-05-10 09:59:39 +0000
+++ b/strings/my_strtoll10.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003 MySQL AB
+/* Copyright (c) 2003, 2011, 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
=== modified file 'strings/my_vsnprintf.c'
--- a/strings/my_vsnprintf.c 2009-02-13 16:41:47 +0000
+++ b/strings/my_vsnprintf.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/r_strinstr.c'
--- a/strings/r_strinstr.c 2007-05-10 09:59:39 +0000
+++ b/strings/r_strinstr.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/str2int.c'
--- a/strings/str2int.c 2006-12-23 19:17:15 +0000
+++ b/strings/str2int.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/str_alloc.c'
--- a/strings/str_alloc.c 2006-12-23 19:17:15 +0000
+++ b/strings/str_alloc.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/str_test.c'
--- a/strings/str_test.c 2010-07-02 18:30:47 +0000
+++ b/strings/str_test.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2003 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strappend.c'
--- a/strings/strappend.c 2007-05-10 09:59:39 +0000
+++ b/strings/strappend.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strcat.c'
--- a/strings/strcat.c 2006-12-23 19:17:15 +0000
+++ b/strings/strcat.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strcend.c'
--- a/strings/strcend.c 2006-12-23 19:17:15 +0000
+++ b/strings/strcend.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strchr.c'
--- a/strings/strchr.c 2006-12-23 19:17:15 +0000
+++ b/strings/strchr.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strcmp.c'
--- a/strings/strcmp.c 2006-12-23 19:17:15 +0000
+++ b/strings/strcmp.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strcont.c'
--- a/strings/strcont.c 2007-05-10 09:59:39 +0000
+++ b/strings/strcont.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strend.c'
--- a/strings/strend.c 2006-12-23 19:17:15 +0000
+++ b/strings/strend.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 MySQL AB
+/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
=== modified file 'strings/strfill.c'
--- a/strings/strfill.c 2007-05-10 09:59:39 +0000
+++ b/strings/strfill.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strinstr.c'
--- a/strings/strinstr.c 2007-05-10 09:59:39 +0000
+++ b/strings/strinstr.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strlen.c'
--- a/strings/strlen.c 2007-05-10 09:59:39 +0000
+++ b/strings/strlen.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strmake.c'
--- a/strings/strmake.c 2009-07-16 13:17:47 +0000
+++ b/strings/strmake.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strmov.c'
--- a/strings/strmov.c 2009-12-16 17:31:19 +0000
+++ b/strings/strmov.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strnlen.c'
--- a/strings/strnlen.c 2007-05-10 09:59:39 +0000
+++ b/strings/strnlen.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strnmov.c'
--- a/strings/strnmov.c 2007-05-10 09:59:39 +0000
+++ b/strings/strnmov.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strrchr.c'
--- a/strings/strrchr.c 2006-12-23 19:17:15 +0000
+++ b/strings/strrchr.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strstr.c'
--- a/strings/strstr.c 2006-12-23 19:17:15 +0000
+++ b/strings/strstr.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 MySQL AB
+/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
=== modified file 'strings/strto.c'
--- a/strings/strto.c 2007-05-10 09:59:39 +0000
+++ b/strings/strto.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strtod.c'
--- a/strings/strtod.c 2010-12-28 23:47:05 +0000
+++ b/strings/strtod.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2007 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strtol.c'
--- a/strings/strtol.c 2006-12-23 19:17:15 +0000
+++ b/strings/strtol.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strtoll.c'
--- a/strings/strtoll.c 2006-12-23 19:17:15 +0000
+++ b/strings/strtoll.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strtoul.c'
--- a/strings/strtoul.c 2006-12-23 19:17:15 +0000
+++ b/strings/strtoul.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strtoull.c'
--- a/strings/strtoull.c 2006-12-23 19:17:15 +0000
+++ b/strings/strtoull.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/strxmov.c'
--- a/strings/strxmov.c 2006-12-23 19:17:15 +0000
+++ b/strings/strxmov.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 MySQL AB
+/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
=== modified file 'strings/strxnmov.c'
--- a/strings/strxnmov.c 2007-05-10 09:59:39 +0000
+++ b/strings/strxnmov.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002 MySQL AB
+/* Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
=== modified file 'strings/uca-dump.c'
--- a/strings/uca-dump.c 2006-12-31 00:02:27 +0000
+++ b/strings/uca-dump.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 MySQL AB
+/* Copyright (c) 2004, 2011, 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
=== modified file 'strings/uctypedump.c'
--- a/strings/uctypedump.c 2006-12-31 01:29:11 +0000
+++ b/strings/uctypedump.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 MySQL AB
+/* Copyright (c) 2006, 2011, 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
=== modified file 'strings/udiv.c'
--- a/strings/udiv.c 2006-12-23 19:17:15 +0000
+++ b/strings/udiv.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
=== modified file 'strings/utr11-dump.c'
--- a/strings/utr11-dump.c 2006-12-31 00:02:27 +0000
+++ b/strings/utr11-dump.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 MySQL AB
+/* Copyright (c) 2004, 2011, 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
=== modified file 'strings/xml.c'
--- a/strings/xml.c 2010-07-02 18:30:47 +0000
+++ b/strings/xml.c 2011-01-19 13:17:52 +0000
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 MySQL AB
+/* Copyright (c) 2000, 2011, 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
@@ -106,6 +106,13 @@ static void my_xml_norm_text(MY_XML_ATTR
}
+static inline my_bool
+my_xml_parser_prefix_cmp(MY_XML_PARSER *p, const char *s, size_t slen)
+{
+ return (p->cur + slen > p->end) || memcmp(p->cur, s, slen);
+}
+
+
static int my_xml_scan(MY_XML_PARSER *p,MY_XML_ATTR *a)
{
int lex;
@@ -123,16 +130,20 @@ static int my_xml_scan(MY_XML_PARSER *p,
a->beg=p->cur;
a->end=p->cur;
- if ((p->end - p->cur > 3) && !memcmp(p->cur,"<!--",4))
+ if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("<!--")))
{
- for (; (p->cur < p->end) && memcmp(p->cur, "-->", 3); p->cur++)
- {}
- if (!memcmp(p->cur, "-->", 3))
- p->cur+=3;
+ for (; p->cur < p->end; p->cur++)
+ {
+ if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("-->")))
+ {
+ p->cur+= 3;
+ break;
+ }
+ }
a->end=p->cur;
lex=MY_XML_COMMENT;
}
- else if (!memcmp(p->cur, "<![CDATA[",9))
+ else if (!my_xml_parser_prefix_cmp(p, C_STRING_WITH_LEN("<![CDATA[")))
{
p->cur+= 9;
for (; p->cur < p->end - 2 ; p->cur++)
No bundle (reason: revision is a merge).
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (john.embretsen:3554) | John H. Embretsen | 27 Jan |