summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <baker@bk-internal.mysql.com>2007-01-21 02:21:23 +0100
committerunknown <baker@bk-internal.mysql.com>2007-01-21 02:21:23 +0100
commit04da114c479613298d4047bdd835ed1e3288daa6 (patch)
tree693839b43ead35febf80e83b4773f6422efd6f75
parentaf23ddf6d2730649429763f690287ccf263f63d7 (diff)
parent10f4f15e83f19d85cae4bff9240973c216ea98c7 (diff)
downloadmariadb-git-04da114c479613298d4047bdd835ed1e3288daa6.tar.gz
Merge bk-internal.mysql.com:/data0/bk/mysql-5.1
into bk-internal.mysql.com:/data0/bk/mysql-5.1-arch mysql-test/r/archive.result: Auto merged mysql-test/t/archive.test: Auto merged
-rwxr-xr-xBUILD/SETUP.sh2
-rwxr-xr-xBUILD/check-cpu2
-rw-r--r--BitKeeper/etc/collapsed4
-rw-r--r--Makefile.am16
-rw-r--r--client/mysql_upgrade.c77
-rw-r--r--client/mysqlbinlog.cc59
-rw-r--r--client/mysqlimport.c4
-rw-r--r--client/mysqltest.c54
-rw-r--r--config/ac-macros/ha_ndbcluster.m45
-rw-r--r--config/ac-macros/replication.m430
-rw-r--r--configure.in6
-rw-r--r--extra/yassl/src/ssl.cpp4
-rw-r--r--include/config-win.h2
-rw-r--r--include/my_global.h39
-rw-r--r--include/my_pthread.h98
-rw-r--r--include/my_sys.h2
-rw-r--r--include/mysql.h2
-rw-r--r--include/mysql_h.ic20
-rw-r--r--include/typelib.h3
-rw-r--r--libmysql/libmysql.c14
-rw-r--r--libmysqld/CMakeLists.txt3
-rw-r--r--mysql-test/extra/binlog_tests/ctype_ucs_binlog.test1
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_basic.test1
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_tabledefs.test40
-rw-r--r--mysql-test/extra/rpl_tests/rpl_stm_charset.test1
-rw-r--r--mysql-test/extra/rpl_tests/rpl_truncate.test1
-rw-r--r--mysql-test/include/have_example_plugin.inc16
-rw-r--r--mysql-test/include/have_multi_ndb.inc4
-rw-r--r--mysql-test/include/have_ndb.inc2
-rw-r--r--mysql-test/include/have_row_based.inc4
-rw-r--r--mysql-test/include/have_udf.inc2
-rw-r--r--mysql-test/include/ndb_not_readonly.inc31
-rw-r--r--mysql-test/include/not_row_based.inc4
-rw-r--r--mysql-test/lib/mtr_cases.pl10
-rw-r--r--mysql-test/lib/mtr_process.pl3
-rw-r--r--mysql-test/mysql-test-run-shell.sh2
-rwxr-xr-xmysql-test/mysql-test-run.pl79
-rw-r--r--mysql-test/r/archive.result1223
-rw-r--r--mysql-test/r/binlog_row_ctype_ucs.result5
-rw-r--r--mysql-test/r/binlog_row_mix_innodb_myisam.result5
-rw-r--r--mysql-test/r/binlog_stm_ctype_ucs.result21
-rw-r--r--mysql-test/r/binlog_stm_mix_innodb_myisam.result5
-rw-r--r--mysql-test/r/ctype_cp932_binlog_stm.result6
-rw-r--r--mysql-test/r/ctype_hebrew.result11
-rw-r--r--mysql-test/r/ctype_utf8.result24
-rw-r--r--mysql-test/r/events_logs_tests.result11
-rw-r--r--mysql-test/r/func_group.result267
-rw-r--r--mysql-test/r/func_in.result4
-rw-r--r--mysql-test/r/have_dynamic_loading.require (renamed from mysql-test/r/have_udf.require)0
-rw-r--r--mysql-test/r/have_example_plugin.require2
-rw-r--r--mysql-test/r/have_row_based.require2
-rw-r--r--mysql-test/r/myisam.result15
-rw-r--r--mysql-test/r/mysqlbinlog.result263
-rw-r--r--mysql-test/r/mysqlbinlog2.result1087
-rw-r--r--mysql-test/r/mysqlbinlog_base64.result1
-rw-r--r--mysql-test/r/mysqldump.result144
-rw-r--r--mysql-test/r/ndb_binlog_ignore_db.result1
-rw-r--r--mysql-test/r/ndb_lock.result35
-rw-r--r--mysql-test/r/ndb_types.result1
-rw-r--r--mysql-test/r/not_row_based.require2
-rw-r--r--mysql-test/r/plugin.result15
-rw-r--r--mysql-test/r/range.result4
-rw-r--r--mysql-test/r/rpl_charset_sjis.result26
-rw-r--r--mysql-test/r/rpl_do_grant.result11
-rw-r--r--mysql-test/r/rpl_locale.result20
-rw-r--r--mysql-test/r/rpl_row_create_table.result191
-rw-r--r--mysql-test/r/rpl_row_delayed_ins.result10
-rw-r--r--mysql-test/r/rpl_row_mysqlbinlog.result94
-rw-r--r--mysql-test/r/rpl_row_tabledefs_2myisam.result52
-rw-r--r--mysql-test/r/rpl_row_tabledefs_3innodb.result52
-rw-r--r--mysql-test/r/rpl_sp.result263
-rw-r--r--mysql-test/r/rpl_stm_charset.result159
-rw-r--r--mysql-test/r/rpl_switch_stm_row_mixed.result16
-rw-r--r--mysql-test/r/select.result23
-rw-r--r--mysql-test/r/sp.result24
-rw-r--r--mysql-test/r/sp_gis.result4
-rw-r--r--mysql-test/r/symlink.result23
-rw-r--r--mysql-test/r/type_bit.result2
-rw-r--r--mysql-test/r/type_bit_innodb.result2
-rw-r--r--mysql-test/r/udf.result2
-rw-r--r--mysql-test/r/user_var-binlog.result29
-rw-r--r--mysql-test/r/variables.result57
-rw-r--r--mysql-test/r/view.result23
-rw-r--r--mysql-test/r/warnings.result7
-rw-r--r--mysql-test/r/warnings_engine_disabled.result7
-rw-r--r--mysql-test/r/windows.result6
-rw-r--r--mysql-test/t/archive.test11
-rw-r--r--mysql-test/t/binlog_row_mix_innodb_myisam.test3
-rw-r--r--mysql-test/t/binlog_stm_mix_innodb_myisam.test3
-rw-r--r--mysql-test/t/ctype_hebrew.test16
-rw-r--r--mysql-test/t/ctype_utf8.test20
-rw-r--r--mysql-test/t/disabled.def1
-rw-r--r--mysql-test/t/events_logs_tests.test7
-rw-r--r--mysql-test/t/func_group.test92
-rw-r--r--mysql-test/t/func_in.test7
-rw-r--r--mysql-test/t/information_schema_chmod.test4
-rw-r--r--mysql-test/t/kill.test5
-rw-r--r--mysql-test/t/myisam.test39
-rw-r--r--mysql-test/t/mysql.test25
-rw-r--r--mysql-test/t/mysqlbinlog.test53
-rw-r--r--mysql-test/t/mysqlbinlog2.test1
-rw-r--r--mysql-test/t/mysqlbinlog_base64.test1
-rw-r--r--mysql-test/t/mysqldump.test41
-rw-r--r--mysql-test/t/mysqltest.test3
-rw-r--r--mysql-test/t/ndb_binlog_ignore_db.test1
-rw-r--r--mysql-test/t/ndb_lock.test49
-rw-r--r--mysql-test/t/ndb_types.test10
-rw-r--r--mysql-test/t/plugin.test26
-rw-r--r--mysql-test/t/ps.test2
-rw-r--r--mysql-test/t/range.test4
-rw-r--r--mysql-test/t/rpl_charset_sjis.test25
-rw-r--r--mysql-test/t/rpl_do_grant.test16
-rw-r--r--mysql-test/t/rpl_locale.test24
-rw-r--r--mysql-test/t/rpl_rbr_to_sbr.test1
-rw-r--r--mysql-test/t/rpl_rotate_logs.test8
-rw-r--r--mysql-test/t/rpl_row_basic_11bugs.test1
-rw-r--r--mysql-test/t/rpl_row_basic_8partition.test1
-rw-r--r--mysql-test/t/rpl_row_create_table-slave.opt1
-rw-r--r--mysql-test/t/rpl_row_create_table.test125
-rw-r--r--mysql-test/t/rpl_row_max_relay_size.test1
-rw-r--r--mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt1
-rw-r--r--mysql-test/t/rpl_sp.test53
-rw-r--r--mysql-test/t/rpl_switch_stm_row_mixed.test1
-rw-r--r--mysql-test/t/select.test33
-rw-r--r--mysql-test/t/sp.test24
-rw-r--r--mysql-test/t/symlink.test41
-rw-r--r--mysql-test/t/trigger.test14
-rw-r--r--mysql-test/t/user_var-binlog.test1
-rw-r--r--mysql-test/t/varbinary.test4
-rw-r--r--mysql-test/t/variables.test44
-rw-r--r--mysql-test/t/view.test22
-rw-r--r--mysql-test/t/warnings.test6
-rw-r--r--mysql-test/t/warnings_engine_disabled-master.opt1
-rw-r--r--mysql-test/t/warnings_engine_disabled.test19
-rw-r--r--mysql-test/t/windows.test9
-rw-r--r--mysys/default.c10
-rw-r--r--mysys/mf_iocache.c7
-rw-r--r--mysys/my_thr_init.c39
-rw-r--r--mysys/my_wincond.c35
-rw-r--r--mysys/string.c50
-rw-r--r--mysys/typelib.c51
-rw-r--r--scripts/make_binary_distribution.sh2
-rw-r--r--scripts/mysqlbug.sh8
-rw-r--r--scripts/mysqld_multi.sh18
-rw-r--r--scripts/mysqld_safe.sh1
-rw-r--r--scripts/mysqldumpslow.sh10
-rw-r--r--server-tools/instance-manager/Makefile.am2
-rw-r--r--server-tools/instance-manager/guardian.cc3
-rw-r--r--sql/CMakeLists.txt3
-rw-r--r--sql/event_queue.cc69
-rw-r--r--sql/field.cc22
-rw-r--r--sql/field.h8
-rw-r--r--sql/handler.cc8
-rw-r--r--sql/item.cc25
-rw-r--r--sql/item_create.cc4
-rw-r--r--sql/item_sum.cc366
-rw-r--r--sql/item_sum.h20
-rw-r--r--sql/item_timefunc.cc84
-rw-r--r--sql/log.cc186
-rw-r--r--sql/log.h4
-rw-r--r--sql/log_event.cc202
-rw-r--r--sql/log_event.h40
-rw-r--r--sql/mysql_priv.h75
-rw-r--r--sql/mysqld.cc50
-rw-r--r--sql/net_serv.cc5
-rw-r--r--sql/opt_range.cc3
-rw-r--r--sql/rpl_injector.cc3
-rw-r--r--sql/rpl_injector.h2
-rw-r--r--sql/set_var.cc43
-rw-r--r--sql/set_var.h14
-rw-r--r--sql/share/charsets/hebrew.xml4
-rw-r--r--sql/share/errmsg.txt21
-rw-r--r--sql/slave.cc5
-rw-r--r--sql/sp_head.cc15
-rw-r--r--sql/sp_head.h2
-rw-r--r--sql/sql_acl.cc2
-rw-r--r--sql/sql_base.cc6
-rw-r--r--sql/sql_class.cc17
-rw-r--r--sql/sql_class.h17
-rw-r--r--sql/sql_insert.cc105
-rw-r--r--sql/sql_lex.cc2
-rw-r--r--sql/sql_lex.h2
-rw-r--r--sql/sql_load.cc2
-rw-r--r--sql/sql_locale.cc1354
-rw-r--r--sql/sql_parse.cc7
-rw-r--r--sql/sql_select.cc1
-rw-r--r--sql/sql_string.cc4
-rw-r--r--sql/sql_view.cc2
-rw-r--r--sql/table.cc5
-rw-r--r--storage/federated/ha_federated.cc2
-rw-r--r--storage/myisam/mi_packrec.c3
-rw-r--r--strings/conf_to_src.c9
-rw-r--r--strings/ctype-extra.c27
-rw-r--r--tests/mysql_client_test.c92
-rw-r--r--unittest/mysys/my_atomic-t.c12
-rw-r--r--vio/viossl.c14
197 files changed, 5508 insertions, 3504 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index dfbf1547517..1f62ffe7c26 100755
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -183,7 +183,7 @@ fi
# (http://samba.org/ccache) is installed, use it.
# We use 'grep' and hope 'grep' will work as expected
# (returns 0 if finds lines)
-if ccache -V > /dev/null 2>&1 && test "$CCACHE_GCOV_VERSION_ENABLED" == "1"
+if ccache -V > /dev/null 2>&1 && test "$CCACHE_GCOV_VERSION_ENABLED" = "1"
then
echo "$CC" | grep "ccache" > /dev/null || CC="ccache $CC"
echo "$CXX" | grep "ccache" > /dev/null || CXX="ccache $CXX"
diff --git a/BUILD/check-cpu b/BUILD/check-cpu
index b4f5fd41b06..042e6b9856d 100755
--- a/BUILD/check-cpu
+++ b/BUILD/check-cpu
@@ -28,7 +28,7 @@ check_cpu () {
fi
# parse CPU flags
- for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //'`; do
+ for flag in `$cpuinfo | grep '^flags' | sed -e 's/^flags.*: //' -e 's/[^a-zA-Z0-9_ ]/_/g'`; do
eval cpu_flag_$flag=yes
done
else
diff --git a/BitKeeper/etc/collapsed b/BitKeeper/etc/collapsed
index a10f87c8529..96fa1623269 100644
--- a/BitKeeper/etc/collapsed
+++ b/BitKeeper/etc/collapsed
@@ -15,6 +15,8 @@
45214442pBGT9KuZEGixBH71jTzbOA
45214a07hVsIGwvwa-WrO-jpeaSwVw
452a92d0-31-8wSzSfZi165fcGcXPA
+452c6c6dAjuNghfc1ObZ_UQ5SCl85g
+4538a7b0EbDHHkWPbIwxO6ZIDdg6Dg
454a7ef8gdvE_ddMlJyghvOAkKPNOQ
454bb488ijVLOUK_GFjcoISE0GxPUA
454bb9a8AwlGRC_wWLS2sNMoRBMRGw
@@ -30,3 +32,5 @@
4561b2ecZbhuAc0TTDdCdultxUYaMw
4561bde4qWhz1I8tkItXKex5uniipA
4562ba016dYH0JzszOqZ8p6psbKfnQ
+45771031yRCoM_ZfONdYchPvVEgLRg
+45ae6628gqKTsUFfnoNExadETVIkbA
diff --git a/Makefile.am b/Makefile.am
index 7c80ea24326..21d070a3416 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -102,8 +102,10 @@ dist-hook:
tags:
support-files/build-tags
-.PHONY: init-db bin-dist test test-full test-ps test-nr \
- test-ns test-pr test-unit
+.PHONY: init-db bin-dist \
+ test test-force test-full test-force-full test-force-mem \
+ test-pl test-force-pl test-full-pl test-force-full-pl test-force-pl-mem \
+ test-unit test-ps test-nr test-pr test-ns test-binlog-statement
# Target 'test' will run the regression test suite using the built server.
#
@@ -118,23 +120,23 @@ test-unit:
test-ps:
cd mysql-test ; \
- ./mysql-test-run.pl $(force) --ps-protocol --mysqld=--binlog-format=mixed
+ @PERL@ ./mysql-test-run.pl $(force) --ps-protocol --mysqld=--binlog-format=mixed
test-nr:
cd mysql-test ; \
- ./mysql-test-run.pl $(force) --mysqld=--binlog-format=row
+ @PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=row
test-pr:
cd mysql-test ; \
- ./mysql-test-run.pl $(force) --ps-protocol --mysqld=--binlog-format=row
+ @PERL@ ./mysql-test-run.pl $(force) --ps-protocol --mysqld=--binlog-format=row
test-ns:
cd mysql-test ; \
- ./mysql-test-run.pl $(force) --mysqld=--binlog-format=mixed
+ @PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=mixed
test-binlog-statement:
cd mysql-test ; \
- ./mysql-test-run.pl $(force) --mysqld=--binlog-format=statement
+ @PERL@ ./mysql-test-run.pl $(force) --mysqld=--binlog-format=statement
test: test-unit test-ns test-pr
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index e1372b2dbbd..15f105fd8fe 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -470,7 +470,12 @@ int main(int argc, char **argv)
load_defaults("my", load_default_groups, &argc, &argv);
- if (handle_options(&argc, &argv, my_long_options, get_one_option))
+ /*
+ Must init_dynamic_string before handle_options because string is freed
+ at error label.
+ */
+ if (init_dynamic_string(&cmdline, NULL, 2 * FN_REFLEN + 128, FN_REFLEN) ||
+ handle_options(&argc, &argv, my_long_options, get_one_option))
{
ret= 1;
goto error;
@@ -478,11 +483,6 @@ int main(int argc, char **argv)
if (tty_password)
opt_password= get_tty_password(NullS);
- if (init_dynamic_string(&cmdline, NULL, 2 * FN_REFLEN + 128, FN_REFLEN))
- {
- ret= 1;
- goto error;
- }
if (!basedir)
{
my_getwd(path, sizeof(path), MYF(0));
@@ -565,17 +565,34 @@ int main(int argc, char **argv)
goto error;
}
else
- dynstr_set(&cmdline, path);
+ {
+#ifdef __WIN__
+ /* Windows requires an extra pair of quotes around the entire string. */
+ dynstr_set(&cmdline, "\"");
+#else
+ dynstr_set(&cmdline, "");
+#endif /* __WIN__ */
+ dynstr_append_os_quoted(&cmdline, path, NullS);
+ }
if (defaults_to_use)
{
- dynstr_append(&cmdline, " --defaults-extra-file=");
- dynstr_append(&cmdline, defaults_to_use);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--defaults-extra-file=",
+ defaults_to_use, NullS);
}
-
- dynstr_append(&cmdline, " --check-upgrade --all-databases"
- " --auto-repair --user=");
- dynstr_append(&cmdline, user);
+
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--check-upgrade", NullS);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--all-databases", NullS);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--auto-repair", NullS);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--user=", user, NullS);
+#ifdef __WIN__
+ dynstr_append(&cmdline, "\"");
+#endif /* __WIN__ */
if (opt_verbose)
printf("Running %s\n", cmdline.str);
@@ -604,7 +621,15 @@ fix_priv_tables:
goto error;
}
else
- dynstr_set(&cmdline, path);
+ {
+#ifdef __WIN__
+ /* Windows requires an extra pair of quotes around the entire string. */
+ dynstr_set(&cmdline, "\"");
+#else
+ dynstr_set(&cmdline, "");
+#endif /* __WIN__ */
+ dynstr_append_os_quoted(&cmdline, path, NullS);
+ }
if (find_file(MYSQL_FIX_PRIV_TABLES_NAME, basedir, MYF(0),
path, sizeof(path),
@@ -626,13 +651,25 @@ fix_priv_tables:
if (defaults_to_use)
{
- dynstr_append(&cmdline, " --defaults-extra-file=");
- dynstr_append(&cmdline, defaults_to_use);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--defaults-extra-file=",
+ defaults_to_use, NullS);
}
- dynstr_append(&cmdline, " --force --no-auto-rehash --batch --user=");
- dynstr_append(&cmdline, user);
- dynstr_append(&cmdline, " mysql < ");
- dynstr_append(&cmdline, script_line);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--force", NullS);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--no-auto-rehash", NullS);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--batch", NullS);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--user=", user, NullS);
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--database=mysql", NullS);
+ dynstr_append(&cmdline, " < ");
+ dynstr_append_os_quoted(&cmdline, script_line, NullS);
+#ifdef __WIN__
+ dynstr_append(&cmdline, "\"");
+#endif /* __WIN__ */
if (opt_verbose)
printf("Running %s\n", cmdline.str);
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index a95f3d3b836..8242a481c5b 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -66,6 +66,7 @@ static bool opt_hexdump= 0;
static bool opt_base64_output= 0;
static const char* database= 0;
static my_bool force_opt= 0, short_form= 0, remote_opt= 0, info_flag;
+static my_bool force_if_open_opt= 1;
static ulonglong offset = 0;
static const char* host = 0;
static int port= 0;
@@ -85,6 +86,7 @@ static short binlog_flags = 0;
static MYSQL* mysql = NULL;
static const char* dirname_for_local_load= 0;
static bool stop_passed= 0;
+static my_bool file_not_closed_error= 0;
/*
check_header() will set the pointer below.
@@ -94,8 +96,10 @@ static bool stop_passed= 0;
*/
Format_description_log_event* description_event;
-static int dump_local_log_entries(const char* logname);
-static int dump_remote_log_entries(const char* logname);
+static int dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
+ const char* logname);
+static int dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
+ const char* logname);
static int dump_log_entries(const char* logname);
static int dump_remote_file(NET* net, const char* fname);
static void die(const char* fmt, ...);
@@ -645,6 +649,12 @@ Create_file event for file_id: %u\n",exv->file_id);
later.
*/
ev= 0;
+ if (!force_if_open_opt &&
+ (description_event->flags & LOG_EVENT_BINLOG_IN_USE_F))
+ {
+ file_not_closed_error= 1;
+ DBUG_RETURN(1);
+ }
break;
case BEGIN_LOAD_QUERY_EVENT:
ev->print(result_file, print_event_info);
@@ -724,6 +734,9 @@ static struct my_option my_long_options[] =
"already have. NOTE: you will need a SUPER privilege to use this option.",
(gptr*) &disable_log_bin, (gptr*) &disable_log_bin, 0, GET_BOOL,
NO_ARG, 0, 0, 0, 0, 0, 0},
+ {"force-if-open", 'F', "Force if binlog was not closed properly.",
+ (gptr*) &force_if_open_opt, (gptr*) &force_if_open_opt, 0, GET_BOOL, NO_ARG,
+ 1, 0, 0, 0, 0, 0},
{"force-read", 'f', "Force reading unknown binlog events.",
(gptr*) &force_opt, (gptr*) &force_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
0, 0},
@@ -1001,8 +1014,22 @@ static MYSQL* safe_connect()
static int dump_log_entries(const char* logname)
{
- return (remote_opt ? dump_remote_log_entries(logname) :
- dump_local_log_entries(logname));
+ int rc;
+ PRINT_EVENT_INFO print_event_info;
+ /*
+ Set safe delimiter, to dump things
+ like CREATE PROCEDURE safely
+ */
+ fprintf(result_file, "DELIMITER /*!*/;\n");
+ strcpy(print_event_info.delimiter, "/*!*/;");
+
+ rc= (remote_opt ? dump_remote_log_entries(&print_event_info, logname) :
+ dump_local_log_entries(&print_event_info, logname));
+
+ /* Set delimiter back to semicolon */
+ fprintf(result_file, "DELIMITER ;\n");
+ strcpy(print_event_info.delimiter, ";");
+ return rc;
}
@@ -1067,11 +1094,11 @@ static int check_master_version(MYSQL* mysql,
}
-static int dump_remote_log_entries(const char* logname)
+static int dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
+ const char* logname)
{
char buf[128];
- PRINT_EVENT_INFO print_event_info;
ulong len;
uint logname_len;
NET* net;
@@ -1194,7 +1221,7 @@ could be out of memory");
len= 1; // fake Rotate, so don't increment old_off
}
}
- if ((error= process_event(&print_event_info, ev, old_off)))
+ if ((error= process_event(print_event_info, ev, old_off)))
{
error= ((error < 0) ? 0 : 1);
goto err;
@@ -1213,7 +1240,7 @@ could be out of memory");
goto err;
}
- if ((error= process_event(&print_event_info, ev, old_off)))
+ if ((error= process_event(print_event_info, ev, old_off)))
{
my_close(file,MYF(MY_WME));
error= ((error < 0) ? 0 : 1);
@@ -1339,11 +1366,11 @@ at offset %lu ; this could be a log format error or read error",
}
-static int dump_local_log_entries(const char* logname)
+static int dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
+ const char* logname)
{
File fd = -1;
IO_CACHE cache,*file= &cache;
- PRINT_EVENT_INFO print_event_info;
byte tmp_buff[BIN_LOG_HEADER_SIZE];
int error= 0;
@@ -1430,7 +1457,7 @@ static int dump_local_log_entries(const char* logname)
// file->error == 0 means EOF, that's OK, we break in this case
break;
}
- if ((error= process_event(&print_event_info, ev, old_off)))
+ if ((error= process_event(print_event_info, ev, old_off)))
{
if (error < 0)
error= 0;
@@ -1547,6 +1574,16 @@ int main(int argc, char** argv)
my_free_open_file_info();
/* We cannot free DBUG, it is used in global destructors after exit(). */
my_end((info_flag ? MY_CHECK_ERROR : 0) | MY_DONT_FREE_DBUG);
+
+ if (file_not_closed_error)
+ {
+ fprintf(stderr,
+"\nError: attempting to dump binlog '%s' which was not closed properly.\n"
+"Most probably mysqld is still writting it, or crashed.\n"
+"Your current options specify --disable-force-if-open\n"
+"which means to abort on this problem.\n"
+"You can rerun using --force-if-open to ignore this problem.\n\n", argv[-1]);
+ }
exit(exit_value);
DBUG_RETURN(exit_value); // Keep compilers happy
}
diff --git a/client/mysqlimport.c b/client/mysqlimport.c
index 2d0c0188cb0..c9e21de1b2a 100644
--- a/client/mysqlimport.c
+++ b/client/mysqlimport.c
@@ -49,8 +49,8 @@ static char *add_load_option(char *ptr,const char *object,
static my_bool verbose=0,lock_tables=0,ignore_errors=0,opt_delete=0,
replace=0,silent=0,ignore=0,opt_compress=0,
opt_low_priority= 0, tty_password= 0;
-static my_bool opt_use_threads= 0, info_flag= 0;
-static uint opt_local_file=0;
+static my_bool info_flag= 0;
+static uint opt_use_threads=0, opt_local_file=0;
static char *opt_password=0, *current_user=0,
*current_host=0, *current_db=0, *fields_terminated=0,
*lines_terminated=0, *enclosed=0, *opt_enclosed=0,
diff --git a/client/mysqltest.c b/client/mysqltest.c
index cd417ea66c7..1dc04d008e7 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -725,6 +725,20 @@ void close_connections()
}
+void close_statements()
+{
+ struct st_connection *con;
+ DBUG_ENTER("close_statements");
+ for (con= connections; con < next_con; con++)
+ {
+ if (con->stmt)
+ mysql_stmt_close(con->stmt);
+ con->stmt= 0;
+ }
+ DBUG_VOID_RETURN;
+}
+
+
void close_files()
{
DBUG_ENTER("close_files");
@@ -1246,7 +1260,9 @@ void var_set(const char *var_name, const char *var_name_end,
v->int_dirty= 0;
v->str_val_len= strlen(v->str_val);
}
- strxmov(buf, v->name, "=", v->str_val, NullS);
+ my_snprintf(buf, sizeof(buf), "%.*s=%.*s",
+ v->name_len, v->name,
+ v->str_val_len, v->str_val);
if (!(v->env_s= my_strdup(buf, MYF(MY_WME))))
die("Out of memory");
putenv(v->env_s);
@@ -2906,6 +2922,10 @@ void do_close_connection(struct st_command *command)
}
}
#endif
+ if (next_con->stmt)
+ mysql_stmt_close(next_con->stmt);
+ next_con->stmt= 0;
+
mysql_close(&con->mysql);
if (con->util_mysql)
mysql_close(con->util_mysql);
@@ -2974,7 +2994,12 @@ void safe_connect(MYSQL* mysql, const char *name, const char *host,
if ((mysql_errno(mysql) == CR_CONN_HOST_ERROR ||
mysql_errno(mysql) == CR_CONNECTION_ERROR) &&
failed_attempts < opt_max_connect_retries)
+ {
+ verbose_msg("Connect attempt %d/%d failed: %d: %s", failed_attempts,
+ opt_max_connect_retries, mysql_errno(mysql),
+ mysql_error(mysql));
my_sleep(connection_retry_sleep);
+ }
else
{
if (failed_attempts > 0)
@@ -4691,10 +4716,9 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
}
/*
- Store the result. If res is NULL, use mysql_field_count to
- determine if that was expected
+ Store the result of the query if it will return any fields
*/
- if (!(res= mysql_store_result(mysql)) && mysql_field_count(mysql))
+ if (mysql_field_count(mysql) && ((res= mysql_store_result(mysql)) == 0))
{
handle_error(command, mysql_errno(mysql), mysql_error(mysql),
mysql_sqlstate(mysql), ds);
@@ -4746,7 +4770,10 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
}
if (res)
+ {
mysql_free_result(res);
+ res= 0;
+ }
counter++;
} while (!(err= mysql_next_result(mysql)));
if (err > 0)
@@ -4813,7 +4840,7 @@ void handle_error(struct st_command *command,
err_errno, err_error);
/* Abort the run of this test, pass the failed query as reason */
- abort_not_supported_test("Query '%s' failed, required functionality" \
+ abort_not_supported_test("Query '%s' failed, required functionality " \
"not supported", command->query);
}
@@ -5103,6 +5130,14 @@ end:
dynstr_free(&ds_execute_warnings);
}
+
+ /* Close the statement if - no reconnect, need new prepare */
+ if (mysql->reconnect)
+ {
+ mysql_stmt_close(stmt);
+ cur_con->stmt= NULL;
+ }
+
/*
We save the return code (mysql_stmt_errno(stmt)) from the last call sent
to the server into the mysqltest builtin variable $mysql_errno. This
@@ -5110,10 +5145,7 @@ end:
*/
var_set_errno(mysql_stmt_errno(stmt));
-#ifndef BUG15518_FIXED
- mysql_stmt_close(stmt);
- cur_con->stmt= NULL;
-#endif
+
DBUG_VOID_RETURN;
}
@@ -5900,6 +5932,8 @@ int main(int argc, char **argv)
break;
case Q_DISABLE_PS_PROTOCOL:
ps_protocol_enabled= 0;
+ /* Close any open statements */
+ close_statements();
break;
case Q_ENABLE_PS_PROTOCOL:
ps_protocol_enabled= ps_protocol;
@@ -5909,6 +5943,8 @@ int main(int argc, char **argv)
break;
case Q_ENABLE_RECONNECT:
set_reconnect(&cur_con->mysql, 1);
+ /* Close any open statements - no reconnect, need new prepare */
+ close_statements();
break;
case Q_DISABLE_PARSING:
if (parsing_disabled == 0)
diff --git a/config/ac-macros/ha_ndbcluster.m4 b/config/ac-macros/ha_ndbcluster.m4
index 26cb0394583..86bd16487eb 100644
--- a/config/ac-macros/ha_ndbcluster.m4
+++ b/config/ac-macros/ha_ndbcluster.m4
@@ -229,10 +229,7 @@ AC_DEFUN([MYSQL_SETUP_NDBCLUSTER], [
if test X"$ndb_binlog" = Xdefault ||
test X"$ndb_binlog" = Xyes
then
- if test X"$have_row_based" = Xyes
- then
- have_ndb_binlog="yes"
- fi
+ have_ndb_binlog="yes"
fi
if test X"$have_ndb_binlog" = Xyes
diff --git a/config/ac-macros/replication.m4 b/config/ac-macros/replication.m4
deleted file mode 100644
index babfa000a82..00000000000
--- a/config/ac-macros/replication.m4
+++ /dev/null
@@ -1,30 +0,0 @@
-dnl This file contains configuration parameters for replication.
-
-dnl ---------------------------------------------------------------------------
-dnl Macro: MYSQL_CHECK_REPLICATION
-dnl Sets HAVE_ROW_BASED_REPLICATION if --with-row-based-replication is used
-dnl ---------------------------------------------------------------------------
-
-AC_DEFUN([MYSQL_CHECK_REPLICATION], [
- AC_ARG_WITH([row-based-replication],
- AC_HELP_STRING([--without-row-based-replication],
- [Don't include row-based replication]),
- [row_based="$withval"],
- [row_based=yes])
- AC_MSG_CHECKING([for row-based replication])
-
- case "$row_based" in
- yes )
- AC_DEFINE([WITH_ROW_BASED_REPLICATION], [1], [Define to have row-based replication])
- AC_MSG_RESULT([-- including row-based replication])
- [have_row_based=yes]
- ;;
- * )
- AC_MSG_RESULT([-- not including row-based replication])
- [have_row_based=no]
- ;;
- esac
-])
-dnl ---------------------------------------------------------------------------
-dnl END OF MYSQL_CHECK_REPLICATION
-dnl ---------------------------------------------------------------------------
diff --git a/configure.in b/configure.in
index 2a238a1f221..17a9714c16c 100644
--- a/configure.in
+++ b/configure.in
@@ -35,7 +35,6 @@ sinclude(config/ac-macros/ha_ndbcluster.m4)
sinclude(config/ac-macros/large_file.m4)
sinclude(config/ac-macros/misc.m4)
sinclude(config/ac-macros/readline.m4)
-sinclude(config/ac-macros/replication.m4)
sinclude(config/ac-macros/ssl.m4)
sinclude(config/ac-macros/zlib.m4)
@@ -2172,7 +2171,6 @@ AC_MSG_RESULT("$netinet_inc")
MYSQL_CHECK_BIG_TABLES
MYSQL_CHECK_MAX_INDEXES
-MYSQL_CHECK_REPLICATION
MYSQL_CHECK_VIO
MYSQL_CHECK_SSL
@@ -2438,9 +2436,9 @@ AM_CONDITIONAL(THREAD_SAFE_CLIENT, test "$THREAD_SAFE_CLIENT" != "no")
if test "$THREAD_SAFE_CLIENT" = "no"
then
- sql_client_dirs="strings regex mysys extra libmysql client"
+ sql_client_dirs="strings regex mysys dbug extra libmysql client"
else
- sql_client_dirs="strings regex mysys extra libmysql libmysql_r client"
+ sql_client_dirs="strings regex mysys dbug extra libmysql libmysql_r client"
linked_client_targets="$linked_client_targets linked_libmysql_r_sources"
AC_CONFIG_FILES(libmysql_r/Makefile)
AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should the client be thread safe])
diff --git a/extra/yassl/src/ssl.cpp b/extra/yassl/src/ssl.cpp
index ec2e99adecb..aa98465069c 100644
--- a/extra/yassl/src/ssl.cpp
+++ b/extra/yassl/src/ssl.cpp
@@ -122,7 +122,7 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
EVP_BytesToKey(info.name, "MD5", info.iv, (byte*)password,
passwordSz, 1, key, iv);
- STL::auto_ptr<BulkCipher> cipher;
+ mySTL::auto_ptr<BulkCipher> cipher;
if (strncmp(info.name, "DES-CBC", 7) == 0)
cipher.reset(NEW_YS DES);
else if (strncmp(info.name, "DES-EDE3-CBC", 13) == 0)
@@ -138,7 +138,7 @@ int read_file(SSL_CTX* ctx, const char* file, int format, CertType type)
return SSL_BAD_FILE;
}
cipher->set_decryptKey(key, info.iv);
- STL::auto_ptr<x509> newx(NEW_YS x509(x->get_length()));
+ mySTL::auto_ptr<x509> newx(NEW_YS x509(x->get_length()));
cipher->decrypt(newx->use_buffer(), x->get_buffer(),
x->get_length());
ysDelete(x);
diff --git a/include/config-win.h b/include/config-win.h
index edecf8d2fc8..d8ae471266f 100644
--- a/include/config-win.h
+++ b/include/config-win.h
@@ -248,7 +248,6 @@ inline double ulonglong2double(ulonglong value)
#define tell(A) _telli64(A)
#endif
-#define set_timespec(ABSTIME,SEC) { (ABSTIME).tv_sec=time((time_t*)0) + (time_t) (SEC); (ABSTIME).tv_nsec=0; }
#define STACK_DIRECTION -1
@@ -435,7 +434,6 @@ inline double ulonglong2double(ulonglong value)
#define HAVE_SPATIAL 1
#define HAVE_RTREE_KEYS 1
-#define HAVE_ROW_BASED_REPLICATION 1
#define HAVE_OPENSSL 1
#define HAVE_YASSL 1
diff --git a/include/my_global.h b/include/my_global.h
index dad6ea46604..f758352b46c 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -78,9 +78,6 @@
#endif /* _WIN32... */
#ifndef EMBEDDED_LIBRARY
-#ifdef WITH_ROW_BASED_REPLICATION
-#define HAVE_ROW_BASED_REPLICATION 1
-#endif
#ifdef WITH_NDB_BINLOG
#define HAVE_NDB_BINLOG 1
#endif
@@ -1141,41 +1138,7 @@ typedef char bool; /* Ordinary boolean values 0 1 */
#define MY_HOW_OFTEN_TO_ALARM 2 /* How often we want info on screen */
#define MY_HOW_OFTEN_TO_WRITE 1000 /* How often we want info on screen */
-#ifdef HAVE_TIMESPEC_TS_SEC
-#ifndef set_timespec
-#define set_timespec(ABSTIME,SEC) \
-{ \
- (ABSTIME).ts_sec=time(0) + (time_t) (SEC); \
- (ABSTIME).ts_nsec=0; \
-}
-#endif /* !set_timespec */
-#ifndef set_timespec_nsec
-#define set_timespec_nsec(ABSTIME,NSEC) \
-{ \
- ulonglong now= my_getsystime() + (NSEC/100); \
- (ABSTIME).ts_sec= (now / ULL(10000000)); \
- (ABSTIME).ts_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
-}
-#endif /* !set_timespec_nsec */
-#else
-#ifndef set_timespec
-#define set_timespec(ABSTIME,SEC) \
-{\
- struct timeval tv;\
- gettimeofday(&tv,0);\
- (ABSTIME).tv_sec=tv.tv_sec+(time_t) (SEC);\
- (ABSTIME).tv_nsec=tv.tv_usec*1000;\
-}
-#endif /* !set_timespec */
-#ifndef set_timespec_nsec
-#define set_timespec_nsec(ABSTIME,NSEC) \
-{\
- ulonglong now= my_getsystime() + (NSEC/100); \
- (ABSTIME).tv_sec= (time_t) (now / ULL(10000000)); \
- (ABSTIME).tv_nsec= (long) (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
-}
-#endif /* !set_timespec_nsec */
-#endif /* HAVE_TIMESPEC_TS_SEC */
+
/*
Define-funktions for reading and storing in machine independent format
diff --git a/include/my_pthread.h b/include/my_pthread.h
index 17b7b98da02..8ae8e7f9512 100644
--- a/include/my_pthread.h
+++ b/include/my_pthread.h
@@ -30,8 +30,26 @@ extern "C" {
#define EXTERNC
#endif /* __cplusplus */
-#if defined(__WIN__)
+/*
+ BUG#24507: Race conditions inside current NPTL pthread_exit() implementation.
+
+ If macro NPTL_PTHREAD_EXIT_HACK is defined then a hack described in the bug
+ report will be implemented inside my_thread_global_init() in my_thr_init.c.
+
+ This amounts to spawning a dummy thread which does nothing but executes
+ pthread_exit(0).
+
+ This bug is fixed in version 2.5 of glibc library.
+
+ TODO: Remove this code when fixed versions of glibc6 are in common use.
+ */
+
+#if defined(TARGET_OS_LINUX) && defined(HAVE_NPTL) && \
+ defined(__GLIBC__) && ( __GLIBC__ < 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ < 5 )
+#define NPTL_PTHREAD_EXIT_BUG 1
+#endif
+#if defined(__WIN__)
typedef CRITICAL_SECTION pthread_mutex_t;
typedef HANDLE pthread_t;
typedef struct thread_attr {
@@ -55,16 +73,41 @@ typedef struct {
} pthread_cond_t;
-struct timespec { /* For pthread_cond_timedwait() */
- time_t tv_sec;
- long tv_nsec;
-};
-
typedef int pthread_mutexattr_t;
#define win_pthread_self my_thread_var->pthread_self
#define pthread_handler_t EXTERNC void * __cdecl
typedef void * (__cdecl *pthread_handler)(void *);
+/*
+ Struct and macros to be used in combination with the
+ windows implementation of pthread_cond_timedwait
+*/
+
+/*
+ Declare a union to make sure FILETIME is properly aligned
+ so it can be used directly as a 64 bit value. The value
+ stored is in 100ns units.
+ */
+ union ft64 {
+ FILETIME ft;
+ __int64 i64;
+ };
+struct timespec {
+ union ft64 tv;
+ /* The max timeout value in millisecond for pthread_cond_timedwait */
+ long max_timeout_msec;
+};
+#define set_timespec(ABSTIME,SEC) { \
+ GetSystemTimeAsFileTime(&((ABSTIME).tv.ft)); \
+ (ABSTIME).tv.i64+= (__int64)(SEC)*10000000; \
+ (ABSTIME).max_timeout_msec= (long)((SEC)*1000); \
+}
+#define set_timespec_nsec(ABSTIME,NSEC) { \
+ GetSystemTimeAsFileTime(&((ABSTIME).tv.ft)); \
+ (ABSTIME).tv.i64+= (__int64)(NSEC)/100; \
+ (ABSTIME).max_timeout_msec= (long)((NSEC)/1000000); \
+}
+
void win_pthread_init(void);
int win_pthread_setspecific(void *A,void *B,uint length);
int pthread_create(pthread_t *,pthread_attr_t *,pthread_handler,void *);
@@ -140,8 +183,6 @@ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
#define pthread_condattr_init(A)
#define pthread_condattr_destroy(A)
-/*Irena: compiler does not like this: */
-/*#define my_pthread_getprio(pthread_t thread_id) pthread_dummy(0) */
#define my_pthread_getprio(thread_id) pthread_dummy(0)
#else /* Normal threads */
@@ -366,6 +407,47 @@ void my_pthread_attr_getstacksize(pthread_attr_t *attrib, size_t *size);
int my_pthread_mutex_trylock(pthread_mutex_t *mutex);
#endif
+/*
+ The defines set_timespec and set_timespec_nsec should be used
+ for calculating an absolute time at which
+ pthread_cond_timedwait should timeout
+*/
+#ifdef HAVE_TIMESPEC_TS_SEC
+#ifndef set_timespec
+#define set_timespec(ABSTIME,SEC) \
+{ \
+ (ABSTIME).ts_sec=time(0) + (time_t) (SEC); \
+ (ABSTIME).ts_nsec=0; \
+}
+#endif /* !set_timespec */
+#ifndef set_timespec_nsec
+#define set_timespec_nsec(ABSTIME,NSEC) \
+{ \
+ ulonglong now= my_getsystime() + (NSEC/100); \
+ (ABSTIME).ts_sec= (now / ULL(10000000)); \
+ (ABSTIME).ts_nsec= (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
+}
+#endif /* !set_timespec_nsec */
+#else
+#ifndef set_timespec
+#define set_timespec(ABSTIME,SEC) \
+{\
+ struct timeval tv;\
+ gettimeofday(&tv,0);\
+ (ABSTIME).tv_sec=tv.tv_sec+(time_t) (SEC);\
+ (ABSTIME).tv_nsec=tv.tv_usec*1000;\
+}
+#endif /* !set_timespec */
+#ifndef set_timespec_nsec
+#define set_timespec_nsec(ABSTIME,NSEC) \
+{\
+ ulonglong now= my_getsystime() + (NSEC/100); \
+ (ABSTIME).tv_sec= (time_t) (now / ULL(10000000)); \
+ (ABSTIME).tv_nsec= (long) (now % ULL(10000000) * 100 + ((NSEC) % 100)); \
+}
+#endif /* !set_timespec_nsec */
+#endif /* HAVE_TIMESPEC_TS_SEC */
+
/* safe_mutex adds checking to mutex for easier debugging */
#if defined(__NETWARE__) && !defined(SAFE_MUTEX_DETECT_DESTROY)
diff --git a/include/my_sys.h b/include/my_sys.h
index 77367c1f246..aa8cef1a25a 100644
--- a/include/my_sys.h
+++ b/include/my_sys.h
@@ -782,6 +782,8 @@ extern my_bool init_dynamic_string(DYNAMIC_STRING *str, const char *init_str,
extern my_bool dynstr_append(DYNAMIC_STRING *str, const char *append);
my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append,
uint length);
+extern my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append,
+ ...);
extern my_bool dynstr_set(DYNAMIC_STRING *str, const char *init_str);
extern my_bool dynstr_realloc(DYNAMIC_STRING *str, ulong additional_size);
extern my_bool dynstr_trunc(DYNAMIC_STRING *str, int n);
diff --git a/include/mysql.h b/include/mysql.h
index 451fe01a6ba..8e23421a2ee 100644
--- a/include/mysql.h
+++ b/include/mysql.h
@@ -64,9 +64,9 @@ typedef int my_socket;
#endif /* my_socket_defined */
#endif /* _global_h */
+#include "mysql_version.h"
#include "mysql_com.h"
#include "mysql_time.h"
-#include "mysql_version.h"
#include "typelib.h"
#include "my_list.h" /* for LISTs used in 'MYSQL' and 'MYSQL_STMT' */
diff --git a/include/mysql_h.ic b/include/mysql_h.ic
index 51cbb1fb7eb..44c51b34c1d 100644
--- a/include/mysql_h.ic
+++ b/include/mysql_h.ic
@@ -36,6 +36,8 @@ enum mysql_status;
typedef struct st_mysql_rows MYSQL_ROWS;
# 24 "my_list.h"
typedef struct st_list LIST;
+# 35 "my_alloc.h"
+typedef struct st_mem_root MEM_ROOT;
# 251 "mysql.h"
typedef struct st_mysql MYSQL;
# 653 "mysql.h"
@@ -60,7 +62,7 @@ typedef struct st_mysql_stmt MYSQL_STMT;
typedef struct character_set MY_CHARSET_INFO;
# 184 "mysql_com.h"
typedef struct st_net NET;
-# 21 "typelib.h"
+# 23 "typelib.h"
typedef struct st_typelib TYPELIB;
# 174 "mysql_com.h"
typedef struct st_vio Vio;
@@ -76,8 +78,6 @@ typedef int my_socket;
typedef unsigned long long int my_ulonglong;
# 144 "mysql.h"
typedef struct embedded_query_result EMBEDDED_QUERY_RESULT;
-# 35 "my_alloc.h"
-typedef struct st_mem_root MEM_ROOT;
# 145 "mysql.h"
typedef struct st_mysql_data MYSQL_DATA;
# 750 "mysql.h"
@@ -172,6 +172,7 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned
struct st_mysql_methods const * methods;
void * thd;
my_bool * unbuffered_fetch_owner;
+ char * info_buffer;
};
# 653 "mysql.h"
struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned long int)))) st_mysql_bind
@@ -419,7 +420,7 @@ struct __attribute__((aligned(__alignof__(void *)), aligned(__alignof__(unsigned
my_bool report_error;
my_bool return_errno;
};
-# 21 "typelib.h"
+# 23 "typelib.h"
struct __attribute__((aligned(__alignof__(unsigned int)), aligned(__alignof__(void *)))) st_typelib
{
unsigned int count;
@@ -576,6 +577,7 @@ enum mysql_enum_shutdown_level
SHUTDOWN_WAIT_UPDATES = (unsigned char)((1 << 3)),
SHUTDOWN_WAIT_ALL_BUFFERS = ((unsigned char)((1 << 3)) << 1),
SHUTDOWN_WAIT_CRITICAL_BUFFERS = (((unsigned char)((1 << 3)) << 1) + 1),
+ KILL_QUERY = 254,
KILL_CONNECTION = 255,
};
# 154 "mysql.h"
@@ -631,9 +633,11 @@ enum mysql_status
extern my_bool check_scramble(char const * reply, char const * message, unsigned char const * hash_stage2);
# 420 "mysql_com.h"
extern my_bool check_scramble_323(char const *, char const * message, unsigned long int * salt);
+# 33 "typelib.h"
+extern TYPELIB * copy_typelib(MEM_ROOT * root, TYPELIB * from);
# 415 "mysql_com.h"
extern void create_random_string(char * to, unsigned int, struct rand_struct * rand_st);
-# 28 "typelib.h"
+# 30 "typelib.h"
extern int find_type(char * x, TYPELIB * typelib, unsigned int);
# 429 "mysql_com.h"
extern void get_salt_from_password(unsigned char * res, char const * password);
@@ -641,7 +645,7 @@ extern void get_salt_from_password(unsigned char * res, char const * password);
extern void get_salt_from_password_323(unsigned long int * res, char const * password);
# 435 "mysql_com.h"
extern char * get_tty_password(char const * opt_message);
-# 30 "typelib.h"
+# 32 "typelib.h"
extern char const * get_type(TYPELIB * typelib, unsigned int);
# 417 "mysql_com.h"
extern void hash_password(unsigned long int * to, char const * password, unsigned int);
@@ -667,7 +671,7 @@ extern void make_password_from_salt_323(char * to, unsigned long int const * sal
extern void make_scrambled_password(char * to, char const * password);
# 418 "mysql_com.h"
extern void make_scrambled_password_323(char * to, char const * password);
-# 29 "typelib.h"
+# 31 "typelib.h"
extern void make_type(char * to, unsigned int, TYPELIB * typelib);
# 358 "mysql_com.h"
extern int my_connect(my_socket, struct sockaddr const * name, unsigned int, unsigned int);
@@ -957,5 +961,5 @@ extern void randominit(struct rand_struct *, unsigned long int, unsigned long in
extern void scramble(char * to, char const * message, char const * password);
# 419 "mysql_com.h"
extern void scramble_323(char * to, char const * message, char const * password);
-# 32 "typelib.h"
+# 35 "typelib.h"
extern TYPELIB sql_protocol_typelib;
diff --git a/include/typelib.h b/include/typelib.h
index 28554f739d3..75d170e59d3 100644
--- a/include/typelib.h
+++ b/include/typelib.h
@@ -17,6 +17,8 @@
#ifndef _typelib_h
#define _typelib_h
+#include "my_alloc.h"
+
typedef struct st_typelib { /* Different types saved here */
unsigned int count; /* How many types */
const char *name; /* Name of typelib */
@@ -27,6 +29,7 @@ typedef struct st_typelib { /* Different types saved here */
extern int find_type(char *x,TYPELIB *typelib,unsigned int full_name);
extern void make_type(char *to,unsigned int nr,TYPELIB *typelib);
extern const char *get_type(TYPELIB *typelib,unsigned int nr);
+extern TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from);
extern TYPELIB sql_protocol_typelib;
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 89460d7099d..0c1f28ab7ec 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -2036,6 +2036,13 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
DBUG_RETURN(1);
}
+ /*
+ Reset the last error in any case: that would clear the statement
+ if the previous prepare failed.
+ */
+ stmt->last_errno= 0;
+ stmt->last_error[0]= '\0';
+
if ((int) stmt->state > (int) MYSQL_STMT_INIT_DONE)
{
/* This is second prepare with another statement */
@@ -2049,23 +2056,24 @@ mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query, ulong length)
*/
stmt->bind_param_done= stmt->bind_result_done= FALSE;
stmt->param_count= stmt->field_count= 0;
- stmt->last_errno= 0;
- stmt->last_error[0]= '\0';
free_root(&stmt->mem_root, MYF(MY_KEEP_PREALLOC));
int4store(buff, stmt->stmt_id);
+
/*
+ Close statement in server
+
If there was a 'use' result from another statement, or from
mysql_use_result it won't be freed in mysql_stmt_free_result and
we should get 'Commands out of sync' here.
*/
+ stmt->state= MYSQL_STMT_INIT_DONE;
if (stmt_command(mysql, COM_STMT_CLOSE, buff, 4, stmt))
{
set_stmt_errmsg(stmt, mysql->net.last_error, mysql->net.last_errno,
mysql->net.sqlstate);
DBUG_RETURN(1);
}
- stmt->state= MYSQL_STMT_INIT_DONE;
}
if (stmt_command(mysql, COM_STMT_PREPARE, query, length, stmt))
diff --git a/libmysqld/CMakeLists.txt b/libmysqld/CMakeLists.txt
index 87b1b4d37a3..b0b32fab76b 100644
--- a/libmysqld/CMakeLists.txt
+++ b/libmysqld/CMakeLists.txt
@@ -18,8 +18,7 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
# Need to set USE_TLS, since __declspec(thread) approach to thread local
# storage does not work properly in DLLs.
-ADD_DEFINITIONS(-DUSE_TLS -DHAVE_ROW_BASED_REPLICATION -DMYSQL_SERVER
- -DEMBEDDED_LIBRARY)
+ADD_DEFINITIONS(-DUSE_TLS -DMYSQL_SERVER -DEMBEDDED_LIBRARY)
# The old Windows build method used renamed (.cc -> .cpp) source files, fails
# in #include in lib_sql.cc. So disable that using the USING_CMAKE define.
diff --git a/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test b/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test
index afe594b8d36..fcf39e38163 100644
--- a/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test
+++ b/mysql-test/extra/binlog_tests/ctype_ucs_binlog.test
@@ -14,6 +14,7 @@ show binlog events from 102;
# more important than SHOW BINLOG EVENTS, mysqlbinlog (where we
# absolutely need variables names to be quoted and strings to be
# escaped).
+flush logs;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000001
drop table t2;
diff --git a/mysql-test/extra/rpl_tests/rpl_row_basic.test b/mysql-test/extra/rpl_tests/rpl_row_basic.test
index ea2c4c1688c..c2001091b45 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_basic.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test
@@ -1,4 +1,3 @@
---source include/have_row_based.inc
--source include/have_binlog_format_row.inc
--source include/master-slave.inc
diff --git a/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test b/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test
index 2059717b225..0e235f8838f 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test
@@ -7,7 +7,9 @@
connection master;
let $VERSION=`select version()`;
eval create table t1(a int not null primary key) engine=$engine_type;
-insert delayed into t1 values (1),(2),(3);
+insert delayed into t1 values (1);
+insert delayed into t1 values (2);
+insert delayed into t1 values (3);
flush tables;
SELECT * FROM t1 ORDER BY a;
sync_slave_with_master;
diff --git a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
index 54c14594cf4..c50a5613386 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
@@ -80,28 +80,28 @@ INSERT INTO t1_bit VALUES (1,2);
INSERT INTO t1_bit VALUES (2,5);
INSERT INTO t1_char VALUES (1,2);
INSERT INTO t1_char VALUES (2,5);
-SELECT * FROM t1_int;
-SELECT * FROM t1_bit;
-SELECT * FROM t1_char;
+SELECT * FROM t1_int ORDER BY a;
+SELECT * FROM t1_bit ORDER BY a;
+SELECT * FROM t1_char ORDER BY a;
--echo **** On Slave ****
sync_slave_with_master;
-SELECT a,b,x FROM t1_int;
-SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
-SELECT a,b,x FROM t1_char;
+SELECT a,b,x FROM t1_int ORDER BY a;
+SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a;
+SELECT a,b,x FROM t1_char ORDER BY a;
--echo **** On Master ****
connection master;
UPDATE t1_int SET b=2*b WHERE a=2;
UPDATE t1_char SET b=2*b WHERE a=2;
UPDATE t1_bit SET b=2*b WHERE a=2;
-SELECT * FROM t1_int;
-SELECT * FROM t1_bit;
-SELECT * FROM t1_char;
+SELECT * FROM t1_int ORDER BY a;
+SELECT * FROM t1_bit ORDER BY a;
+SELECT * FROM t1_char ORDER BY a;
--echo **** On Slave ****
sync_slave_with_master;
-SELECT a,b,x FROM t1_int;
-SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
-SELECT a,b,x FROM t1_char;
+SELECT a,b,x FROM t1_int ORDER BY a;
+SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a;
+SELECT a,b,x FROM t1_char ORDER BY a;
# Each of these inserts should generate an error and stop the slave
@@ -188,11 +188,11 @@ sync_slave_with_master;
connection master;
INSERT INTO t7 VALUES (1),(2),(3);
INSERT INTO t8 VALUES (1),(2),(3);
-SELECT * FROM t7;
-SELECT * FROM t8;
+SELECT * FROM t7 ORDER BY a;
+SELECT * FROM t8 ORDER BY a;
sync_slave_with_master;
-SELECT * FROM t7;
-SELECT * FROM t8;
+SELECT * FROM t7 ORDER BY a;
+SELECT * FROM t8 ORDER BY a;
# We will now try to update and then delete a row on the master where
# the extra field on the slave does not have a default value. This
@@ -216,20 +216,20 @@ INSERT INTO t1_nodef VALUES (2,4,6);
--echo **** On Master ****
connection master;
UPDATE t1_nodef SET b=2*b WHERE a=1;
-SELECT * FROM t1_nodef;
+SELECT * FROM t1_nodef ORDER BY a;
--echo **** On Slave ****
sync_slave_with_master;
-SELECT * FROM t1_nodef;
+SELECT * FROM t1_nodef ORDER BY a;
--echo **** On Master ****
connection master;
DELETE FROM t1_nodef WHERE a=2;
-SELECT * FROM t1_nodef;
+SELECT * FROM t1_nodef ORDER BY a;
--echo **** On Slave ****
sync_slave_with_master;
-SELECT * FROM t1_nodef;
+SELECT * FROM t1_nodef ORDER BY a;
--echo **** Cleanup ****
connection master;
diff --git a/mysql-test/extra/rpl_tests/rpl_stm_charset.test b/mysql-test/extra/rpl_tests/rpl_stm_charset.test
index 10b4310127f..5657b06e88f 100644
--- a/mysql-test/extra/rpl_tests/rpl_stm_charset.test
+++ b/mysql-test/extra/rpl_tests/rpl_stm_charset.test
@@ -156,6 +156,7 @@ select hex(c1), hex(c2) from t1;
connection master;
# Let's have a look at generated SETs.
+flush logs;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000001
drop table t1;
diff --git a/mysql-test/extra/rpl_tests/rpl_truncate.test b/mysql-test/extra/rpl_tests/rpl_truncate.test
index 37fd9fbc064..bca53336514 100644
--- a/mysql-test/extra/rpl_tests/rpl_truncate.test
+++ b/mysql-test/extra/rpl_tests/rpl_truncate.test
@@ -7,7 +7,6 @@
#
# Author(s): Mats Kindahl
---source include/have_row_based.inc
--source include/master-slave.inc
let $format = STATEMENT;
diff --git a/mysql-test/include/have_example_plugin.inc b/mysql-test/include/have_example_plugin.inc
new file mode 100644
index 00000000000..b84f6d2f161
--- /dev/null
+++ b/mysql-test/include/have_example_plugin.inc
@@ -0,0 +1,16 @@
+#
+# Check if server has support for loading udf's
+# i.e it will support dlopen
+#
+--require r/have_dynamic_loading.require
+disable_query_log;
+show variables like "have_dynamic_loading";
+enable_query_log;
+
+#
+# Check if the variable EXAMPLE_PLUGIN is set
+#
+--require r/have_example_plugin.require
+disable_query_log;
+eval select LENGTH("$EXAMPLE_PLUGIN") > 0 as "have_example_plugin";
+enable_query_log;
diff --git a/mysql-test/include/have_multi_ndb.inc b/mysql-test/include/have_multi_ndb.inc
index 218a6852c41..819518b2674 100644
--- a/mysql-test/include/have_multi_ndb.inc
+++ b/mysql-test/include/have_multi_ndb.inc
@@ -24,5 +24,9 @@ flush tables;
select support = 'Enabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster';
enable_query_log;
+# Check should be here as well...
+# # Check that second master mysqld has come out of redonly mode
+# --source include/ndb_not_readonly.inc
+
# Set the default connection to 'server1'
connection server1;
diff --git a/mysql-test/include/have_ndb.inc b/mysql-test/include/have_ndb.inc
index 8cbeab07a4f..c9603634508 100644
--- a/mysql-test/include/have_ndb.inc
+++ b/mysql-test/include/have_ndb.inc
@@ -5,3 +5,5 @@ select support = 'Enabled' as `TRUE` from information_schema.engines where engin
enable_query_log;
+
+
diff --git a/mysql-test/include/have_row_based.inc b/mysql-test/include/have_row_based.inc
deleted file mode 100644
index 23771fde5cc..00000000000
--- a/mysql-test/include/have_row_based.inc
+++ /dev/null
@@ -1,4 +0,0 @@
--- require r/have_row_based.require
-disable_query_log;
-show variables like "have_row_based_replication";
-enable_query_log;
diff --git a/mysql-test/include/have_udf.inc b/mysql-test/include/have_udf.inc
index 42b9942f74d..068ce9026e0 100644
--- a/mysql-test/include/have_udf.inc
+++ b/mysql-test/include/have_udf.inc
@@ -2,7 +2,7 @@
# Check if server has support for loading udf's
# i.e it will support dlopen
#
---require r/have_udf.require
+--require r/have_dynamic_loading.require
disable_query_log;
show variables like "have_dynamic_loading";
enable_query_log;
diff --git a/mysql-test/include/ndb_not_readonly.inc b/mysql-test/include/ndb_not_readonly.inc
new file mode 100644
index 00000000000..df67dced8ab
--- /dev/null
+++ b/mysql-test/include/ndb_not_readonly.inc
@@ -0,0 +1,31 @@
+# Check that server has come out ot readonly mode
+--disable_query_log
+let $counter= 100;
+let $mysql_errno= 1;
+while ($mysql_errno)
+{
+ --error 0, 1005
+ create table check_read_only(a int) engine=NDB;
+ sleep 0.1;
+ if (!$counter)
+ {
+ die("Failed while waiting for mysqld to come out of readonly mode");
+ }
+ dec $counter;
+}
+
+let $counter= 100;
+let $mysql_errno= 1;
+while ($mysql_errno)
+{
+ --error 0, 1036
+ insert into check_read_only values(1);
+ sleep 0.1;
+ if (!$counter)
+ {
+ die("Failed while waiting for mysqld to come out of readonly mode");
+ }
+ dec $counter;
+}
+drop table check_read_only;
+--enable_query_log
diff --git a/mysql-test/include/not_row_based.inc b/mysql-test/include/not_row_based.inc
deleted file mode 100644
index 22f40bdceb0..00000000000
--- a/mysql-test/include/not_row_based.inc
+++ /dev/null
@@ -1,4 +0,0 @@
--- require r/not_row_based.require
-disable_query_log;
-show variables like "have_row_based_replication";
-enable_query_log;
diff --git a/mysql-test/lib/mtr_cases.pl b/mysql-test/lib/mtr_cases.pl
index 26842f50e68..22290a88d39 100644
--- a/mysql-test/lib/mtr_cases.pl
+++ b/mysql-test/lib/mtr_cases.pl
@@ -302,6 +302,7 @@ sub collect_one_test_case($$$$$$$) {
$tinfo->{'timezone'}= "GMT-3"; # for UNIX_TIMESTAMP tests to work
$tinfo->{'slave_num'}= 0; # Default, no slave
+ $tinfo->{'master_num'}= 1; # Default, 1 master
if ( defined mtr_match_prefix($tname,"rpl") )
{
if ( $::opt_skip_rpl )
@@ -311,13 +312,8 @@ sub collect_one_test_case($$$$$$$) {
return;
}
-
$tinfo->{'slave_num'}= 1; # Default for rpl* tests, use one slave
- if ( $tname eq 'rpl_failsafe' or $tname eq 'rpl_chain_temp_table' )
- {
- # $tinfo->{'slave_num'}= 3; # Not 3 ? Check old code, strange
- }
}
if ( defined mtr_match_prefix($tname,"federated") )
@@ -555,6 +551,8 @@ sub collect_one_test_case($$$$$$$) {
$tinfo->{'comment'}= "No ndbcluster tests(--skip-ndbcluster)";
return;
}
+ # Ndb tests run with two mysqld masters
+ $tinfo->{'master_num'}= 2;
}
else
{
@@ -570,7 +568,7 @@ sub collect_one_test_case($$$$$$$) {
if ( $tinfo->{'innodb_test'} )
{
- # This is a test that need inndob
+ # This is a test that need innodb
if ( $::mysqld_variables{'innodb'} eq "FALSE" )
{
# innodb is not supported, skip it
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl
index 4e34dbae3f4..f63009cd24c 100644
--- a/mysql-test/lib/mtr_process.pl
+++ b/mysql-test/lib/mtr_process.pl
@@ -234,7 +234,8 @@ sub spawn_parent_impl {
my $ret_pid= waitpid($pid,0);
if ( $ret_pid != $pid )
{
- mtr_error("$path ($pid) got lost somehow");
+ mtr_error("waitpid($pid, 0) returned $ret_pid " .
+ "when waiting for '$path'");
}
return mtr_process_exit_status($?);
diff --git a/mysql-test/mysql-test-run-shell.sh b/mysql-test/mysql-test-run-shell.sh
index c6da525c159..953478fa9f4 100644
--- a/mysql-test/mysql-test-run-shell.sh
+++ b/mysql-test/mysql-test-run-shell.sh
@@ -2160,7 +2160,7 @@ then
$MYSQLADMIN --no-defaults --socket=$MASTER_MYSOCK1 -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
$MYSQLADMIN --no-defaults --socket=$SLAVE_MYSOCK -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
$MYSQLADMIN --no-defaults --host=$hostname --port=$MASTER_MYPORT --protocol=tcp -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
- $MYSQLADMIN --no-defaults --host=$hostname --protocol=tcp --port=`expr $MASTER_MYPORT+1` -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
+ $MYSQLADMIN --no-defaults --host=$hostname --protocol=tcp --port=`expr $MASTER_MYPORT + 1` -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
$MYSQLADMIN --no-defaults --host=$hostname --protocol=tcp --port=$SLAVE_MYPORT -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
$MYSQLADMIN --no-defaults --host=$hostname --protocol=tcp --port=`expr $SLAVE_MYPORT + 1` -u root -O connect_timeout=5 -O shutdown_timeout=20 shutdown > /dev/null 2>&1
sleep_until_file_deleted 0 $MASTER_MYPID
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index b26c1eb6ca0..f99a2467ba0 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -160,6 +160,7 @@ our $exe_im;
our $exe_my_print_defaults;
our $exe_perror;
our $lib_udf_example;
+our $lib_example_plugin;
our $exe_libtool;
our $opt_bench= 0;
@@ -231,10 +232,12 @@ our $opt_ndbconnectstring_slave;
our $opt_record;
my $opt_report_features;
our $opt_check_testcases;
+our $opt_mark_progress;
our $opt_skip;
our $opt_skip_rpl;
our $max_slave_num= 0;
+our $max_master_num= 1;
our $use_innodb;
our $opt_skip_test;
our $opt_skip_im;
@@ -413,6 +416,15 @@ sub main () {
$max_slave_num= $test->{slave_num};
mtr_error("Too many slaves") if $max_slave_num > 3;
}
+
+ # Count max number of masters used by a test case
+ if ( $test->{master_num} > $max_master_num)
+ {
+ $max_master_num= $test->{master_num};
+ mtr_error("Too many masters") if $max_master_num > 2;
+ mtr_error("Too few masters") if $max_master_num < 1;
+ }
+
$use_innodb||= $test->{'innodb_test'};
}
@@ -536,6 +548,7 @@ sub command_line_setup () {
# Test case authoring
'record' => \$opt_record,
'check-testcases' => \$opt_check_testcases,
+ 'mark-progress' => \$opt_mark_progress,
# Extra options used when starting mysqld
'mysqld=s' => \@opt_extra_mysqld_opt,
@@ -1211,6 +1224,19 @@ sub command_line_setup () {
$path_ndb_testrun_log= "$opt_vardir/log/ndb_testrun.log";
$path_snapshot= "$opt_tmpdir/snapshot_$opt_master_myport/";
+
+ if ( $opt_valgrind and $opt_debug )
+ {
+ # When both --valgrind and --debug is selected, send
+ # all output to the trace file, making it possible to
+ # see the exact location where valgrind complains
+ foreach my $mysqld (@{$master}, @{$slave})
+ {
+ my $sidx= $mysqld->{idx} ? "$mysqld->{idx}" : "";
+ $mysqld->{path_myerr}=
+ "$opt_vardir/log/" . $mysqld->{type} . "$sidx.trace";
+ }
+ }
}
#
@@ -1259,9 +1285,10 @@ sub set_mtr_build_thread_ports($) {
sub datadir_list_setup () {
# Make a list of all data_dirs
- @data_dir_lst = (
- $master->[0]->{'path_myddir'},
- $master->[1]->{'path_myddir'});
+ for (my $idx= 0; $idx < $max_master_num; $idx++)
+ {
+ push(@data_dir_lst, $master->[$idx]->{'path_myddir'});
+ }
for (my $idx= 0; $idx < $max_slave_num; $idx++)
{
@@ -1499,6 +1526,11 @@ sub executable_setup () {
mtr_file_exists(vs_config_dirs('sql', 'udf_example.dll'),
"$glob_basedir/sql/.libs/udf_example.so",);
+ # Look for the ha_example library
+ $lib_example_plugin=
+ mtr_file_exists(vs_config_dirs('storage/example', 'ha_example.dll'),
+ "$glob_basedir/storage/example/.libs/ha_example.so",);
+
# Look for mysqltest executable
if ( $glob_use_embedded_server )
{
@@ -1655,6 +1687,14 @@ sub environment_setup () {
}
# --------------------------------------------------------------------------
+ # Add the path where mysqld will find ha_example.so
+ # --------------------------------------------------------------------------
+ if ( $lib_example_plugin )
+ {
+ push(@ld_library_paths, dirname($lib_example_plugin));
+ }
+
+ # --------------------------------------------------------------------------
# Valgrind need to be run with debug libraries otherwise it's almost
# impossible to add correct supressions, that means if "/usr/lib/debug"
# is available, it should be added to
@@ -1855,7 +1895,7 @@ sub environment_setup () {
# ----------------------------------------------------
my $cmdline_mysqlbinlog=
"$exe_mysqlbinlog" .
- " --no-defaults --debug-info --local-load=$opt_tmpdir";
+ " --no-defaults --disable-force-if-open --debug-info --local-load=$opt_tmpdir";
if ( $mysql_version_id >= 50000 )
{
$cmdline_mysqlbinlog .=" --character-sets-dir=$path_charsetsdir";
@@ -1928,10 +1968,11 @@ sub environment_setup () {
$ENV{'UDF_EXAMPLE_LIB'}=
($lib_udf_example ? basename($lib_udf_example) : "");
- $ENV{'LD_LIBRARY_PATH'}=
- ($lib_udf_example ? dirname($lib_udf_example) : "") .
- ($ENV{'LD_LIBRARY_PATH'} ? ":$ENV{'LD_LIBRARY_PATH'}" : "");
-
+ # ----------------------------------------------------
+ # Add the path where mysqld will find ha_example.so
+ # ----------------------------------------------------
+ $ENV{'EXAMPLE_PLUGIN'}=
+ ($lib_example_plugin ? basename($lib_example_plugin) : "");
# ----------------------------------------------------
# We are nice and report a bit about our settings
@@ -2730,8 +2771,10 @@ sub mysql_install_db () {
install_db('master', $master->[0]->{'path_myddir'});
- # FIXME check if testcase really is using second master
- copy_install_db('master', $master->[1]->{'path_myddir'});
+ if ($max_master_num)
+ {
+ copy_install_db('master', $master->[1]->{'path_myddir'});
+ }
# Install the number of slave databses needed
for (my $idx= 0; $idx < $max_slave_num; $idx++)
@@ -3540,11 +3583,10 @@ sub mysqld_arguments ($$$$$) {
if ( $glob_use_embedded_server )
{
$prefix= "--server-arg=";
- } else {
- # We can't pass embedded server --no-defaults
- mtr_add_arg($args, "--no-defaults");
}
+ mtr_add_arg($args, "%s--no-defaults", $prefix);
+
mtr_add_arg($args, "%s--console", $prefix);
mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir);
mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir);
@@ -3623,6 +3665,9 @@ sub mysqld_arguments ($$$$$) {
# Turn on logging, will be sent to tables
mtr_add_arg($args, "%s--log=", $prefix);
}
+
+ mtr_add_arg($args, "%s--plugin_dir=%s", $prefix,
+ dirname($lib_example_plugin));
}
if ( $type eq 'slave' )
@@ -4273,7 +4318,8 @@ sub run_testcase_start_servers($) {
}
- if ( $clusters->[0]->{'pid'} and ! $master->[1]->{'pid'} )
+ if ( $clusters->[0]->{'pid'} and ! $master->[1]->{'pid'} and
+ $tinfo->{'master_num'} > 1 )
{
# Test needs cluster, start an extra mysqld connected to cluster
@@ -4485,6 +4531,10 @@ sub run_mysqltest ($) {
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
mtr_add_arg($args, "--logdir=%s/log", $opt_vardir);
+ # Log line number and time for each line in .test file
+ mtr_add_arg($args, "--mark-progress")
+ if $opt_mark_progress;
+
if ($tinfo->{'component_id'} eq 'im')
{
mtr_add_arg($args, "--socket=%s", $instance_manager->{'path_sock'});
@@ -4940,6 +4990,7 @@ Options for test case authoring
record TESTNAME (Re)genereate the result file for TESTNAME
check-testcases Check testcases for sideeffects
+ mark-progress Log line number and elapsed time to <testname>.progress
Options that pass on options
diff --git a/mysql-test/r/archive.result b/mysql-test/r/archive.result
index 0d931e83dce..257b22908d4 100644
--- a/mysql-test/r/archive.result
+++ b/mysql-test/r/archive.result
@@ -11120,1224 +11120,13 @@ auto fld1 companynr fld3 fld4 fld5 fld6
2 011401 37 breaking dreaded Steinberg W
3 011402 37 Romans scholastics jarring
4 011403 37 intercepted audiology tinily
+SELECT COUNT(auto) FROM t2;
+COUNT(auto)
+1213
INSERT DELAYED INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily','');
-FLUSH TABLE t2;
-SELECT * FROM t2;
-auto fld1 companynr fld3 fld4 fld5 fld6
-1 000001 00 Omaha teethe neat
-2 011401 37 breaking dreaded Steinberg W
-3 011402 37 Romans scholastics jarring
-4 011403 37 intercepted audiology tinily
-5 011501 37 bewilderingly wallet balled
-6 011701 37 astound parters persist W
-7 011702 37 admonishing eschew attainments
-8 011703 37 sumac quitter fanatic
-9 012001 37 flanking neat measures FAS
-10 012003 37 combed Steinberg rightfulness
-11 012004 37 subjective jarring capably
-12 012005 37 scatterbrain tinily impulsive
-13 012301 37 Eulerian balled starlet
-14 012302 36 dubbed persist terminators
-15 012303 37 Kane attainments untying
-16 012304 37 overlay fanatic announces FAS
-17 012305 37 perturb measures featherweight FAS
-18 012306 37 goblins rightfulness pessimist FAS
-19 012501 37 annihilates capably daughter
-20 012602 37 Wotan impulsive decliner FAS
-21 012603 37 snatching starlet lawgiver
-22 012604 37 concludes terminators stated
-23 012605 37 laterally untying readable
-24 012606 37 yelped announces attrition
-25 012701 37 grazing featherweight cascade FAS
-26 012702 37 Baird pessimist motors FAS
-27 012703 37 celery daughter interrogate
-28 012704 37 misunderstander decliner pests W
-29 013601 37 handgun lawgiver stairway
-30 013602 37 foldout stated dopers FAS
-31 013603 37 mystic readable testicle W
-32 013604 37 succumbed attrition Parsifal W
-33 013605 37 Nabisco cascade leavings
-34 013606 37 fingerings motors postulation W
-35 013607 37 aging interrogate squeaking
-36 013608 37 afield pests contrasted
-37 013609 37 ammonium stairway leftover
-38 013610 37 boat dopers whiteners
-39 013801 37 intelligibility testicle erases W
-40 013802 37 Augustine Parsifal Punjab W
-41 013803 37 teethe leavings Merritt
-42 013804 37 dreaded postulation Quixotism
-43 013901 37 scholastics squeaking sweetish FAS
-44 016001 37 audiology contrasted dogging FAS
-45 016201 37 wallet leftover scornfully FAS
-46 016202 37 parters whiteners bellow
-47 016301 37 eschew erases bills
-48 016302 37 quitter Punjab cupboard FAS
-49 016303 37 neat Merritt sureties FAS
-50 016304 37 Steinberg Quixotism puddings
-51 018001 37 jarring sweetish tapestry
-52 018002 37 tinily dogging fetters
-53 018003 37 balled scornfully bivalves
-54 018004 37 persist bellow incurring
-55 018005 37 attainments bills Adolph
-56 018007 37 fanatic cupboard pithed
-57 018008 37 measures sureties emergency
-58 018009 37 rightfulness puddings Miles
-59 018010 37 capably tapestry trimmings
-60 018012 37 impulsive fetters tragedies W
-61 018013 37 starlet bivalves skulking W
-62 018014 37 terminators incurring flint
-63 018015 37 untying Adolph flopping W
-64 018016 37 announces pithed relaxing FAS
-65 018017 37 featherweight emergency offload FAS
-66 018018 37 pessimist Miles suites W
-67 018019 37 daughter trimmings lists FAS
-68 018020 37 decliner tragedies animized FAS
-69 018021 37 lawgiver skulking multilayer W
-70 018022 37 stated flint standardizes FAS
-71 018023 37 readable flopping Judas
-72 018024 37 attrition relaxing vacuuming W
-73 018025 37 cascade offload dentally W
-74 018026 37 motors suites humanness W
-75 018027 37 interrogate lists inch W
-76 018028 37 pests animized Weissmuller W
-77 018029 37 stairway multilayer irresponsibly W
-78 018030 37 dopers standardizes luckily FAS
-79 018032 37 testicle Judas culled W
-80 018033 37 Parsifal vacuuming medical FAS
-81 018034 37 leavings dentally bloodbath FAS
-82 018035 37 postulation humanness subschema W
-83 018036 37 squeaking inch animals W
-84 018037 37 contrasted Weissmuller Micronesia
-85 018038 37 leftover irresponsibly repetitions
-86 018039 37 whiteners luckily Antares
-87 018040 37 erases culled ventilate W
-88 018041 37 Punjab medical pityingly
-89 018042 37 Merritt bloodbath interdependent
-90 018043 37 Quixotism subschema Graves FAS
-91 018044 37 sweetish animals neonatal
-92 018045 37 dogging Micronesia scribbled FAS
-93 018046 37 scornfully repetitions chafe W
-94 018048 37 bellow Antares honoring
-95 018049 37 bills ventilate realtor
-96 018050 37 cupboard pityingly elite
-97 018051 37 sureties interdependent funereal
-98 018052 37 puddings Graves abrogating
-99 018053 50 tapestry neonatal sorters
-100 018054 37 fetters scribbled Conley
-101 018055 37 bivalves chafe lectured
-102 018056 37 incurring honoring Abraham
-103 018057 37 Adolph realtor Hawaii W
-104 018058 37 pithed elite cage
-105 018059 36 emergency funereal hushes
-106 018060 37 Miles abrogating Simla
-107 018061 37 trimmings sorters reporters
-108 018101 37 tragedies Conley Dutchman FAS
-109 018102 37 skulking lectured descendants FAS
-110 018103 37 flint Abraham groupings FAS
-111 018104 37 flopping Hawaii dissociate
-112 018201 37 relaxing cage coexist W
-113 018202 37 offload hushes Beebe
-114 018402 37 suites Simla Taoism
-115 018403 37 lists reporters Connally
-116 018404 37 animized Dutchman fetched FAS
-117 018405 37 multilayer descendants checkpoints FAS
-118 018406 37 standardizes groupings rusting
-119 018409 37 Judas dissociate galling
-120 018601 37 vacuuming coexist obliterates
-121 018602 37 dentally Beebe traitor
-122 018603 37 humanness Taoism resumes FAS
-123 018801 37 inch Connally analyzable FAS
-124 018802 37 Weissmuller fetched terminator FAS
-125 018803 37 irresponsibly checkpoints gritty FAS
-126 018804 37 luckily rusting firearm W
-127 018805 37 culled galling minima
-128 018806 37 medical obliterates Selfridge
-129 018807 37 bloodbath traitor disable
-130 018808 37 subschema resumes witchcraft W
-131 018809 37 animals analyzable betroth W
-132 018810 37 Micronesia terminator Manhattanize
-133 018811 37 repetitions gritty imprint
-134 018812 37 Antares firearm peeked
-135 019101 37 ventilate minima swelling
-136 019102 37 pityingly Selfridge interrelationships W
-137 019103 37 interdependent disable riser
-138 019201 37 Graves witchcraft Gandhian W
-139 030501 37 neonatal betroth peacock A
-140 030502 50 scribbled Manhattanize bee A
-141 030503 37 chafe imprint kanji
-142 030504 37 honoring peeked dental
-143 031901 37 realtor swelling scarf FAS
-144 036001 37 elite interrelationships chasm A
-145 036002 37 funereal riser insolence A
-146 036004 37 abrogating Gandhian syndicate
-147 036005 37 sorters peacock alike
-148 038001 37 Conley bee imperial A
-149 038002 37 lectured kanji convulsion A
-150 038003 37 Abraham dental railway A
-151 038004 37 Hawaii scarf validate A
-152 038005 37 cage chasm normalizes A
-153 038006 37 hushes insolence comprehensive
-154 038007 37 Simla syndicate chewing
-155 038008 37 reporters alike denizen
-156 038009 37 Dutchman imperial schemer
-157 038010 37 descendants convulsion chronicle
-158 038011 37 groupings railway Kline
-159 038012 37 dissociate validate Anatole
-160 038013 37 coexist normalizes partridges
-161 038014 37 Beebe comprehensive brunch
-162 038015 37 Taoism chewing recruited
-163 038016 37 Connally denizen dimensions W
-164 038017 37 fetched schemer Chicana W
-165 038018 37 checkpoints chronicle announced
-166 038101 37 rusting Kline praised FAS
-167 038102 37 galling Anatole employing
-168 038103 37 obliterates partridges linear
-169 038104 37 traitor brunch quagmire
-170 038201 37 resumes recruited western A
-171 038202 37 analyzable dimensions relishing
-172 038203 37 terminator Chicana serving A
-173 038204 37 gritty announced scheduling
-174 038205 37 firearm praised lore
-175 038206 37 minima employing eventful
-176 038208 37 Selfridge linear arteriole A
-177 042801 37 disable quagmire disentangle
-178 042802 37 witchcraft western cured A
-179 046101 37 betroth relishing Fenton W
-180 048001 37 Manhattanize serving avoidable A
-181 048002 37 imprint scheduling drains A
-182 048003 37 peeked lore detectably FAS
-183 048004 37 swelling eventful husky
-184 048005 37 interrelationships arteriole impelling
-185 048006 37 riser disentangle undoes
-186 048007 37 Gandhian cured evened
-187 048008 37 peacock Fenton squeezes
-188 048101 37 bee avoidable destroyer FAS
-189 048102 37 kanji drains rudeness
-190 048201 37 dental detectably beaner FAS
-191 048202 37 scarf husky boorish
-192 048203 37 chasm impelling Everhart
-193 048204 37 insolence undoes encompass A
-194 048205 37 syndicate evened mushrooms
-195 048301 37 alike squeezes Alison A
-196 048302 37 imperial destroyer externally FAS
-197 048303 37 convulsion rudeness pellagra
-198 048304 37 railway beaner cult
-199 048305 37 validate boorish creek A
-200 048401 37 normalizes Everhart Huffman
-201 048402 37 comprehensive encompass Majorca FAS
-202 048403 37 chewing mushrooms governing A
-203 048404 37 denizen Alison gadfly FAS
-204 048405 37 schemer externally reassigned FAS
-205 048406 37 chronicle pellagra intentness W
-206 048407 37 Kline cult craziness
-207 048408 37 Anatole creek psychic
-208 048409 37 partridges Huffman squabbled
-209 048410 37 brunch Majorca burlesque
-210 048411 37 recruited governing capped
-211 048412 37 dimensions gadfly extracted A
-212 048413 37 Chicana reassigned DiMaggio
-213 048601 37 announced intentness exclamation FAS
-214 048602 37 praised craziness subdirectory
-215 048603 37 employing psychic fangs
-216 048604 37 linear squabbled buyer A
-217 048801 37 quagmire burlesque pithing A
-218 050901 37 western capped transistorizing A
-219 051201 37 relishing extracted nonbiodegradable
-220 056002 37 serving DiMaggio dislocate
-221 056003 37 scheduling exclamation monochromatic FAS
-222 056004 37 lore subdirectory batting
-223 056102 37 eventful fangs postcondition A
-224 056203 37 arteriole buyer catalog FAS
-225 056204 37 disentangle pithing Remus
-226 058003 37 cured transistorizing devices A
-227 058004 37 Fenton nonbiodegradable bike A
-228 058005 37 avoidable dislocate qualify
-229 058006 37 drains monochromatic detained
-230 058007 37 detectably batting commended
-231 058101 37 husky postcondition civilize
-232 058102 37 impelling catalog Elmhurst
-233 058103 37 undoes Remus anesthetizing
-234 058105 37 evened devices deaf
-235 058111 37 squeezes bike Brigham
-236 058112 37 destroyer qualify title
-237 058113 37 rudeness detained coarse
-238 058114 37 beaner commended combinations
-239 058115 37 boorish civilize grayness
-240 058116 37 Everhart Elmhurst innumerable FAS
-241 058117 37 encompass anesthetizing Caroline A
-242 058118 37 mushrooms deaf fatty FAS
-243 058119 37 Alison Brigham eastbound
-244 058120 37 externally title inexperienced
-245 058121 37 pellagra coarse hoarder A
-246 058122 37 cult combinations scotch W
-247 058123 37 creek grayness passport A
-248 058124 37 Huffman innumerable strategic FAS
-249 058125 37 Majorca Caroline gated
-250 058126 37 governing fatty flog
-251 058127 37 gadfly eastbound Pipestone
-252 058128 37 reassigned inexperienced Dar
-253 058201 37 intentness hoarder Corcoran
-254 058202 37 craziness scotch flyers A
-255 058303 37 psychic passport competitions W
-256 058304 37 squabbled strategic suppliers FAS
-257 058602 37 burlesque gated skips
-258 058603 37 capped flog institutes
-259 058604 37 extracted Pipestone troop A
-260 058605 37 DiMaggio Dar connective W
-261 058606 37 exclamation Corcoran denies
-262 058607 37 subdirectory flyers polka
-263 060401 36 fangs competitions observations FAS
-264 061701 36 buyer suppliers askers
-265 066201 36 pithing skips homeless FAS
-266 066501 36 transistorizing institutes Anna
-267 068001 36 nonbiodegradable troop subdirectories W
-268 068002 36 dislocate connective decaying FAS
-269 068005 36 monochromatic denies outwitting W
-270 068006 36 batting polka Harpy W
-271 068007 36 postcondition observations crazed
-272 068008 36 catalog askers suffocate
-273 068009 36 Remus homeless provers FAS
-274 068010 36 devices Anna technically
-275 068011 36 bike subdirectories Franklinizations
-276 068202 36 qualify decaying considered
-277 068302 36 detained outwitting tinnily
-278 068303 36 commended Harpy uninterruptedly
-279 068401 36 civilize crazed whistled A
-280 068501 36 Elmhurst suffocate automate
-281 068502 36 anesthetizing provers gutting W
-282 068503 36 deaf technically surreptitious
-283 068602 36 Brigham Franklinizations Choctaw
-284 068603 36 title considered cooks
-285 068701 36 coarse tinnily millivolt FAS
-286 068702 36 combinations uninterruptedly counterpoise
-287 068703 36 grayness whistled Gothicism
-288 076001 36 innumerable automate feminine
-289 076002 36 Caroline gutting metaphysically W
-290 076101 36 fatty surreptitious sanding A
-291 076102 36 eastbound Choctaw contributorily
-292 076103 36 inexperienced cooks receivers FAS
-293 076302 36 hoarder millivolt adjourn
-294 076303 36 scotch counterpoise straggled A
-295 076304 36 passport Gothicism druggists
-296 076305 36 strategic feminine thanking FAS
-297 076306 36 gated metaphysically ostrich
-298 076307 36 flog sanding hopelessness FAS
-299 076402 36 Pipestone contributorily Eurydice
-300 076501 36 Dar receivers excitation W
-301 076502 36 Corcoran adjourn presumes FAS
-302 076701 36 flyers straggled imaginable FAS
-303 078001 36 competitions druggists concoct W
-304 078002 36 suppliers thanking peering W
-305 078003 36 skips ostrich Phelps FAS
-306 078004 36 institutes hopelessness ferociousness FAS
-307 078005 36 troop Eurydice sentences
-308 078006 36 connective excitation unlocks
-309 078007 36 denies presumes engrossing W
-310 078008 36 polka imaginable Ruth
-311 078101 36 observations concoct tying
-312 078103 36 askers peering exclaimers
-313 078104 36 homeless Phelps synergy
-314 078105 36 Anna ferociousness Huey W
-315 082101 36 subdirectories sentences merging
-316 083401 36 decaying unlocks judges A
-317 084001 36 outwitting engrossing Shylock W
-318 084002 36 Harpy Ruth Miltonism
-319 086001 36 crazed tying hen W
-320 086102 36 suffocate exclaimers honeybee FAS
-321 086201 36 provers synergy towers
-322 088001 36 technically Huey dilutes W
-323 088002 36 Franklinizations merging numerals FAS
-324 088003 36 considered judges democracy FAS
-325 088004 36 tinnily Shylock Ibero-
-326 088101 36 uninterruptedly Miltonism invalids
-327 088102 36 whistled hen behavior
-328 088103 36 automate honeybee accruing
-329 088104 36 gutting towers relics A
-330 088105 36 surreptitious dilutes rackets
-331 088106 36 Choctaw numerals Fischbein W
-332 088201 36 cooks democracy phony W
-333 088203 36 millivolt Ibero- cross FAS
-334 088204 36 counterpoise invalids cleanup
-335 088302 37 Gothicism behavior conspirator
-336 088303 37 feminine accruing label FAS
-337 088305 37 metaphysically relics university
-338 088402 37 sanding rackets cleansed FAS
-339 088501 36 contributorily Fischbein ballgown
-340 088502 36 receivers phony starlet
-341 088503 36 adjourn cross aqueous
-342 098001 58 straggled cleanup portrayal A
-343 098002 58 druggists conspirator despising W
-344 098003 58 thanking label distort W
-345 098004 58 ostrich university palmed
-346 098005 58 hopelessness cleansed faced
-347 098006 58 Eurydice ballgown silverware
-348 141903 29 excitation starlet assessor
-349 098008 58 presumes aqueous spiders
-350 098009 58 imaginable portrayal artificially
-351 098010 58 concoct despising reminiscence
-352 098011 58 peering distort Mexican
-353 098012 58 Phelps palmed obnoxious
-354 098013 58 ferociousness faced fragile
-355 098014 58 sentences silverware apprehensible
-356 098015 58 unlocks assessor births
-357 098016 58 engrossing spiders garages
-358 098017 58 Ruth artificially panty
-359 098018 58 tying reminiscence anteater
-360 098019 58 exclaimers Mexican displacement A
-361 098020 58 synergy obnoxious drovers A
-362 098021 58 Huey fragile patenting A
-363 098022 58 merging apprehensible far A
-364 098023 58 judges births shrieks
-365 098024 58 Shylock garages aligning W
-366 098025 37 Miltonism panty pragmatism
-367 106001 36 hen anteater fevers W
-368 108001 36 honeybee displacement reexamines A
-369 108002 36 towers drovers occupancies
-370 108003 36 dilutes patenting sweats FAS
-371 108004 36 numerals far modulators
-372 108005 36 democracy shrieks demand W
-373 108007 36 Ibero- aligning Madeira
-374 108008 36 invalids pragmatism Viennese W
-375 108009 36 behavior fevers chillier W
-376 108010 36 accruing reexamines wildcats FAS
-377 108011 36 relics occupancies gentle
-378 108012 36 rackets sweats Angles W
-379 108101 36 Fischbein modulators accuracies
-380 108102 36 phony demand toggle
-381 108103 36 cross Madeira Mendelssohn W
-382 108111 50 cleanup Viennese behaviorally
-383 108105 36 conspirator chillier Rochford
-384 108106 36 label wildcats mirror W
-385 108107 36 university gentle Modula
-386 108108 50 cleansed Angles clobbering
-387 108109 36 ballgown accuracies chronography
-388 108110 36 starlet toggle Eskimoizeds
-389 108201 36 aqueous Mendelssohn British W
-390 108202 36 portrayal behaviorally pitfalls
-391 108203 36 despising Rochford verify W
-392 108204 36 distort mirror scatter FAS
-393 108205 36 palmed Modula Aztecan
-394 108301 36 faced clobbering acuity W
-395 108302 36 silverware chronography sinking W
-396 112101 36 assessor Eskimoizeds beasts FAS
-397 112102 36 spiders British Witt W
-398 113701 36 artificially pitfalls physicists FAS
-399 116001 36 reminiscence verify folksong A
-400 116201 36 Mexican scatter strokes FAS
-401 116301 36 obnoxious Aztecan crowder
-402 116302 36 fragile acuity merry
-403 116601 36 apprehensible sinking cadenced
-404 116602 36 births beasts alimony A
-405 116603 36 garages Witt principled A
-406 116701 36 panty physicists golfing
-407 116702 36 anteater folksong undiscovered
-408 118001 36 displacement strokes irritates
-409 118002 36 drovers crowder patriots A
-410 118003 36 patenting merry rooms FAS
-411 118004 36 far cadenced towering W
-412 118005 36 shrieks alimony displease
-413 118006 36 aligning principled photosensitive
-414 118007 36 pragmatism golfing inking
-415 118008 36 fevers undiscovered gainers
-416 118101 36 reexamines irritates leaning A
-417 118102 36 occupancies patriots hydrant A
-418 118103 36 sweats rooms preserve
-419 118202 36 modulators towering blinded A
-420 118203 36 demand displease interactions A
-421 118204 36 Madeira photosensitive Barry
-422 118302 36 Viennese inking whiteness A
-423 118304 36 chillier gainers pastimes W
-424 118305 36 wildcats leaning Edenization
-425 118306 36 gentle hydrant Muscat
-426 118307 36 Angles preserve assassinated
-427 123101 36 accuracies blinded labeled
-428 123102 36 toggle interactions glacial A
-429 123301 36 Mendelssohn Barry implied W
-430 126001 36 behaviorally whiteness bibliographies W
-431 126002 36 Rochford pastimes Buchanan
-432 126003 36 mirror Edenization forgivably FAS
-433 126101 36 Modula Muscat innuendo A
-434 126301 36 clobbering assassinated den FAS
-435 126302 36 chronography labeled submarines W
-436 126402 36 Eskimoizeds glacial mouthful A
-437 126601 36 British implied expiring
-438 126602 36 pitfalls bibliographies unfulfilled FAS
-439 126702 36 verify Buchanan precession
-440 128001 36 scatter forgivably nullified
-441 128002 36 Aztecan innuendo affects
-442 128003 36 acuity den Cynthia
-443 128004 36 sinking submarines Chablis A
-444 128005 36 beasts mouthful betterments FAS
-445 128007 36 Witt expiring advertising
-446 128008 36 physicists unfulfilled rubies A
-447 128009 36 folksong precession southwest FAS
-448 128010 36 strokes nullified superstitious A
-449 128011 36 crowder affects tabernacle W
-450 128012 36 merry Cynthia silk A
-451 128013 36 cadenced Chablis handsomest A
-452 128014 36 alimony betterments Persian A
-453 128015 36 principled advertising analog W
-454 128016 36 golfing rubies complex W
-455 128017 36 undiscovered southwest Taoist
-456 128018 36 irritates superstitious suspend
-457 128019 36 patriots tabernacle relegated
-458 128020 36 rooms silk awesome W
-459 128021 36 towering handsomest Bruxelles
-460 128022 36 displease Persian imprecisely A
-461 128023 36 photosensitive analog televise
-462 128101 36 inking complex braking
-463 128102 36 gainers Taoist true FAS
-464 128103 36 leaning suspend disappointing FAS
-465 128104 36 hydrant relegated navally W
-466 128106 36 preserve awesome circus
-467 128107 36 blinded Bruxelles beetles
-468 128108 36 interactions imprecisely trumps
-469 128202 36 Barry televise fourscore W
-470 128203 36 whiteness braking Blackfoots
-471 128301 36 pastimes true Grady
-472 128302 36 Edenization disappointing quiets FAS
-473 128303 36 Muscat navally floundered FAS
-474 128304 36 assassinated circus profundity W
-475 128305 36 labeled beetles Garrisonian W
-476 128307 36 glacial trumps Strauss
-477 128401 36 implied fourscore cemented FAS
-478 128502 36 bibliographies Blackfoots contrition A
-479 128503 36 Buchanan Grady mutations
-480 128504 36 forgivably quiets exhibits W
-481 128505 36 innuendo floundered tits
-482 128601 36 den profundity mate A
-483 128603 36 submarines Garrisonian arches
-484 128604 36 mouthful Strauss Moll
-485 128702 36 expiring cemented ropers
-486 128703 36 unfulfilled contrition bombast
-487 128704 36 precession mutations difficultly A
-488 138001 36 nullified exhibits adsorption
-489 138002 36 affects tits definiteness FAS
-490 138003 36 Cynthia mate cultivation A
-491 138004 36 Chablis arches heals A
-492 138005 36 betterments Moll Heusen W
-493 138006 36 advertising ropers target FAS
-494 138007 36 rubies bombast cited A
-495 138008 36 southwest difficultly congresswoman W
-496 138009 36 superstitious adsorption Katherine
-497 138102 36 tabernacle definiteness titter A
-498 138103 36 silk cultivation aspire A
-499 138104 36 handsomest heals Mardis
-500 138105 36 Persian Heusen Nadia W
-501 138201 36 analog target estimating FAS
-502 138302 36 complex cited stuck A
-503 138303 36 Taoist congresswoman fifteenth A
-504 138304 36 suspend Katherine Colombo
-505 138401 29 relegated titter survey A
-506 140102 29 awesome aspire staffing
-507 140103 29 Bruxelles Mardis obtain
-508 140104 29 imprecisely Nadia loaded
-509 140105 29 televise estimating slaughtered
-510 140201 29 braking stuck lights A
-511 140701 29 true fifteenth circumference
-512 141501 29 disappointing Colombo dull A
-513 141502 29 navally survey weekly A
-514 141901 29 circus staffing wetness
-515 141902 29 beetles obtain visualized
-516 142101 29 trumps loaded Tannenbaum
-517 142102 29 fourscore slaughtered moribund
-518 142103 29 Blackfoots lights demultiplex
-519 142701 29 Grady circumference lockings
-520 143001 29 quiets dull thugs FAS
-521 143501 29 floundered weekly unnerves
-522 143502 29 profundity wetness abut
-523 148001 29 Garrisonian visualized Chippewa A
-524 148002 29 Strauss Tannenbaum stratifications A
-525 148003 29 cemented moribund signaled
-526 148004 29 contrition demultiplex Italianizes A
-527 148005 29 mutations lockings algorithmic A
-528 148006 29 exhibits thugs paranoid FAS
-529 148007 29 tits unnerves camping A
-530 148009 29 mate abut signifying A
-531 148010 29 arches Chippewa Patrice W
-532 148011 29 Moll stratifications search A
-533 148012 29 ropers signaled Angeles A
-534 148013 29 bombast Italianizes semblance
-535 148023 36 difficultly algorithmic taxed
-536 148015 29 adsorption paranoid Beatrice
-537 148016 29 definiteness camping retrace
-538 148017 29 cultivation signifying lockout
-539 148018 29 heals Patrice grammatic
-540 148019 29 Heusen search helmsman
-541 148020 29 target Angeles uniform W
-542 148021 29 cited semblance hamming
-543 148022 29 congresswoman taxed disobedience
-544 148101 29 Katherine Beatrice captivated A
-545 148102 29 titter retrace transferals A
-546 148201 29 aspire lockout cartographer A
-547 148401 29 Mardis grammatic aims FAS
-548 148402 29 Nadia helmsman Pakistani
-549 148501 29 estimating uniform burglarized FAS
-550 148502 29 stuck hamming saucepans A
-551 148503 29 fifteenth disobedience lacerating A
-552 148504 29 Colombo captivated corny
-553 148601 29 survey transferals megabytes FAS
-554 148602 29 staffing cartographer chancellor
-555 150701 29 obtain aims bulk A
-556 152101 29 loaded Pakistani commits A
-557 152102 29 slaughtered burglarized meson W
-558 155202 36 lights saucepans deputies
-559 155203 29 circumference lacerating northeaster A
-560 155204 29 dull corny dipole
-561 155205 29 weekly megabytes machining 0
-562 156001 29 wetness chancellor therefore
-563 156002 29 visualized bulk Telefunken
-564 156102 29 Tannenbaum commits salvaging
-565 156301 29 moribund meson Corinthianizes A
-566 156302 29 demultiplex deputies restlessly A
-567 156303 29 lockings northeaster bromides
-568 156304 29 thugs dipole generalized A
-569 156305 29 unnerves machining mishaps
-570 156306 29 abut therefore quelling
-571 156501 29 Chippewa Telefunken spiritual A
-572 158001 29 stratifications salvaging beguiles FAS
-573 158002 29 signaled Corinthianizes Trobriand FAS
-574 158101 29 Italianizes restlessly fleeing A
-575 158102 29 algorithmic bromides Armour A
-576 158103 29 paranoid generalized chin A
-577 158201 29 camping mishaps provers A
-578 158202 29 signifying quelling aeronautic A
-579 158203 29 Patrice spiritual voltage W
-580 158204 29 search beguiles sash
-581 158301 29 Angeles Trobriand anaerobic A
-582 158302 29 semblance fleeing simultaneous A
-583 158303 29 taxed Armour accumulating A
-584 158304 29 Beatrice chin Medusan A
-585 158305 29 retrace provers shouted A
-586 158306 29 lockout aeronautic freakish
-587 158501 29 grammatic voltage index FAS
-588 160301 29 helmsman sash commercially
-589 166101 50 uniform anaerobic mistiness A
-590 166102 50 hamming simultaneous endpoint
-591 168001 29 disobedience accumulating straight A
-592 168002 29 captivated Medusan flurried
-593 168003 29 transferals shouted denotative A
-594 168101 29 cartographer freakish coming FAS
-595 168102 29 aims index commencements FAS
-596 168103 29 Pakistani commercially gentleman
-597 168104 29 burglarized mistiness gifted
-598 168202 29 saucepans endpoint Shanghais
-599 168301 29 lacerating straight sportswriting A
-600 168502 29 corny flurried sloping A
-601 168503 29 megabytes denotative navies
-602 168601 29 chancellor coming leaflet A
-603 173001 40 bulk commencements shooter
-604 173701 40 commits gentleman Joplin FAS
-605 173702 40 meson gifted babies
-606 176001 40 deputies Shanghais subdivision FAS
-607 176101 40 northeaster sportswriting burstiness W
-608 176201 40 dipole sloping belted FAS
-609 176401 40 machining navies assails FAS
-610 176501 40 therefore leaflet admiring W
-611 176601 40 Telefunken shooter swaying 0
-612 176602 40 salvaging Joplin Goldstine FAS
-613 176603 40 Corinthianizes babies fitting
-614 178001 40 restlessly subdivision Norwalk W
-615 178002 40 bromides burstiness weakening W
-616 178003 40 generalized belted analogy FAS
-617 178004 40 mishaps assails deludes
-618 178005 40 quelling admiring cokes
-619 178006 40 spiritual swaying Clayton
-620 178007 40 beguiles Goldstine exhausts
-621 178008 40 Trobriand fitting causality
-622 178101 40 fleeing Norwalk sating FAS
-623 178102 40 Armour weakening icon
-624 178103 40 chin analogy throttles
-625 178201 40 provers deludes communicants FAS
-626 178202 40 aeronautic cokes dehydrate FAS
-627 178301 40 voltage Clayton priceless FAS
-628 178302 40 sash exhausts publicly
-629 178401 40 anaerobic causality incidentals FAS
-630 178402 40 simultaneous sating commonplace
-631 178403 40 accumulating icon mumbles
-632 178404 40 Medusan throttles furthermore W
-633 178501 40 shouted communicants cautioned W
-634 186002 37 freakish dehydrate parametrized A
-635 186102 37 index priceless registration A
-636 186201 40 commercially publicly sadly FAS
-637 186202 40 mistiness incidentals positioning
-638 186203 40 endpoint commonplace babysitting
-639 186302 37 straight mumbles eternal A
-640 188007 37 flurried furthermore hoarder
-641 188008 37 denotative cautioned congregates
-642 188009 37 coming parametrized rains
-643 188010 37 commencements registration workers W
-644 188011 37 gentleman sadly sags A
-645 188012 37 gifted positioning unplug W
-646 188013 37 Shanghais babysitting garage A
-647 188014 37 sportswriting eternal boulder A
-648 188015 37 sloping hoarder hollowly A
-649 188016 37 navies congregates specifics
-650 188017 37 leaflet rains Teresa
-651 188102 37 shooter workers Winsett
-652 188103 37 Joplin sags convenient A
-653 188202 37 babies unplug buckboards FAS
-654 188301 40 subdivision garage amenities
-655 188302 40 burstiness boulder resplendent FAS
-656 188303 40 belted hollowly priding FAS
-657 188401 37 assails specifics configurations
-658 188402 37 admiring Teresa untidiness A
-659 188503 37 swaying Winsett Brice W
-660 188504 37 Goldstine convenient sews FAS
-661 188505 37 fitting buckboards participated
-662 190701 37 Norwalk amenities Simon FAS
-663 190703 50 weakening resplendent certificates
-664 191701 37 analogy priding Fitzpatrick
-665 191702 37 deludes configurations Evanston A
-666 191703 37 cokes untidiness misted
-667 196001 37 Clayton Brice textures A
-668 196002 37 exhausts sews save
-669 196003 37 causality participated count
-670 196101 37 sating Simon rightful A
-671 196103 37 icon certificates chaperone
-672 196104 37 throttles Fitzpatrick Lizzy A
-673 196201 37 communicants Evanston clenched A
-674 196202 37 dehydrate misted effortlessly
-675 196203 37 priceless textures accessed
-676 198001 37 publicly save beaters A
-677 198003 37 incidentals count Hornblower FAS
-678 198004 37 commonplace rightful vests A
-679 198005 37 mumbles chaperone indulgences FAS
-680 198006 37 furthermore Lizzy infallibly A
-681 198007 37 cautioned clenched unwilling FAS
-682 198008 37 parametrized effortlessly excrete FAS
-683 198009 37 registration accessed spools A
-684 198010 37 sadly beaters crunches FAS
-685 198011 37 positioning Hornblower overestimating FAS
-686 198012 37 babysitting vests ineffective
-687 198013 37 eternal indulgences humiliation A
-688 198014 37 hoarder infallibly sophomore
-689 198015 37 congregates unwilling star
-690 198017 37 rains excrete rifles
-691 198018 37 workers spools dialysis
-692 198019 37 sags crunches arriving
-693 198020 37 unplug overestimating indulge
-694 198021 37 garage ineffective clockers
-695 198022 37 boulder humiliation languages
-696 198023 50 hollowly sophomore Antarctica A
-697 198024 37 specifics star percentage
-698 198101 37 Teresa rifles ceiling A
-699 198103 37 Winsett dialysis specification
-700 198105 37 convenient arriving regimented A
-701 198106 37 buckboards indulge ciphers
-702 198201 37 amenities clockers pictures A
-703 198204 37 resplendent languages serpents A
-704 198301 53 priding Antarctica allot A
-705 198302 53 configurations percentage realized A
-706 198303 53 untidiness ceiling mayoral A
-707 198304 53 Brice specification opaquely A
-708 198401 37 sews regimented hostess FAS
-709 198402 37 participated ciphers fiftieth
-710 198403 37 Simon pictures incorrectly
-711 202101 37 certificates serpents decomposition FAS
-712 202301 37 Fitzpatrick allot stranglings
-713 202302 37 Evanston realized mixture FAS
-714 202303 37 misted mayoral electroencephalography FAS
-715 202304 37 textures opaquely similarities FAS
-716 202305 37 save hostess charges W
-717 202601 37 count fiftieth freest FAS
-718 202602 37 rightful incorrectly Greenberg FAS
-719 202605 37 chaperone decomposition tinting
-720 202606 37 Lizzy stranglings expelled W
-721 202607 37 clenched mixture warm
-722 202901 37 effortlessly electroencephalography smoothed
-723 202902 37 accessed similarities deductions FAS
-724 202903 37 beaters charges Romano W
-725 202904 37 Hornblower freest bitterroot
-726 202907 37 vests Greenberg corset
-727 202908 37 indulgences tinting securing
-728 203101 37 infallibly expelled environing FAS
-729 203103 37 unwilling warm cute
-730 203104 37 excrete smoothed Crays
-731 203105 37 spools deductions heiress FAS
-732 203401 37 crunches Romano inform FAS
-733 203402 37 overestimating bitterroot avenge
-734 203404 37 ineffective corset universals
-735 203901 37 humiliation securing Kinsey W
-736 203902 37 sophomore environing ravines FAS
-737 203903 37 star cute bestseller
-738 203906 37 rifles Crays equilibrium
-739 203907 37 dialysis heiress extents 0
-740 203908 37 arriving inform relatively
-741 203909 37 indulge avenge pressure FAS
-742 206101 37 clockers universals critiques FAS
-743 206201 37 languages Kinsey befouled
-744 206202 37 Antarctica ravines rightfully FAS
-745 206203 37 percentage bestseller mechanizing FAS
-746 206206 37 ceiling equilibrium Latinizes
-747 206207 37 specification extents timesharing
-748 206208 37 regimented relatively Aden
-749 208001 37 ciphers pressure embassies
-750 208002 37 pictures critiques males FAS
-751 208003 37 serpents befouled shapelessly FAS
-752 208004 37 allot rightfully genres FAS
-753 208008 37 realized mechanizing mastering
-754 208009 37 mayoral Latinizes Newtonian
-755 208010 37 opaquely timesharing finishers FAS
-756 208011 37 hostess Aden abates
-757 208101 37 fiftieth embassies teem
-758 208102 37 incorrectly males kiting FAS
-759 208103 37 decomposition shapelessly stodgy FAS
-760 208104 37 stranglings genres scalps FAS
-761 208105 37 mixture mastering feed FAS
-762 208110 37 electroencephalography Newtonian guitars
-763 208111 37 similarities finishers airships
-764 208112 37 charges abates store
-765 208113 37 freest teem denounces
-766 208201 37 Greenberg kiting Pyle FAS
-767 208203 37 tinting stodgy Saxony
-768 208301 37 expelled scalps serializations FAS
-769 208302 37 warm feed Peruvian FAS
-770 208305 37 smoothed guitars taxonomically FAS
-771 208401 37 deductions airships kingdom A
-772 208402 37 Romano store stint A
-773 208403 37 bitterroot denounces Sault A
-774 208404 37 corset Pyle faithful
-775 208501 37 securing Saxony Ganymede FAS
-776 208502 37 environing serializations tidiness FAS
-777 208503 37 cute Peruvian gainful FAS
-778 208504 37 Crays taxonomically contrary FAS
-779 208505 37 heiress kingdom Tipperary FAS
-780 210101 37 inform stint tropics W
-781 210102 37 avenge Sault theorizers
-782 210103 37 universals faithful renew 0
-783 210104 37 Kinsey Ganymede already
-784 210105 37 ravines tidiness terminal
-785 210106 37 bestseller gainful Hegelian
-786 210107 37 equilibrium contrary hypothesizer
-787 210401 37 extents Tipperary warningly FAS
-788 213201 37 relatively tropics journalizing FAS
-789 213203 37 pressure theorizers nested
-790 213204 37 critiques renew Lars
-791 213205 37 befouled already saplings
-792 213206 37 rightfully terminal foothill
-793 213207 37 mechanizing Hegelian labeled
-794 216101 37 Latinizes hypothesizer imperiously FAS
-795 216103 37 timesharing warningly reporters FAS
-796 218001 37 Aden journalizing furnishings FAS
-797 218002 37 embassies nested precipitable FAS
-798 218003 37 males Lars discounts FAS
-799 218004 37 shapelessly saplings excises FAS
-800 143503 50 genres foothill Stalin
-801 218006 37 mastering labeled despot FAS
-802 218007 37 Newtonian imperiously ripeness FAS
-803 218008 37 finishers reporters Arabia
-804 218009 37 abates furnishings unruly
-805 218010 37 teem precipitable mournfulness
-806 218011 37 kiting discounts boom FAS
-807 218020 37 stodgy excises slaughter A
-808 218021 50 scalps Stalin Sabine
-809 218022 37 feed despot handy FAS
-810 218023 37 guitars ripeness rural
-811 218024 37 airships Arabia organizer
-812 218101 37 store unruly shipyard FAS
-813 218102 37 denounces mournfulness civics FAS
-814 218103 37 Pyle boom inaccuracy FAS
-815 218201 37 Saxony slaughter rules FAS
-816 218202 37 serializations Sabine juveniles FAS
-817 218203 37 Peruvian handy comprised W
-818 218204 37 taxonomically rural investigations
-819 218205 37 kingdom organizer stabilizes A
-820 218301 37 stint shipyard seminaries FAS
-821 218302 37 Sault civics Hunter A
-822 218401 37 faithful inaccuracy sporty FAS
-823 218402 37 Ganymede rules test FAS
-824 218403 37 tidiness juveniles weasels
-825 218404 37 gainful comprised CERN
-826 218407 37 contrary investigations tempering
-827 218408 37 Tipperary stabilizes afore FAS
-828 218409 37 tropics seminaries Galatean
-829 218410 37 theorizers Hunter techniques W
-830 226001 37 renew sporty error
-831 226002 37 already test veranda
-832 226003 37 terminal weasels severely
-833 226004 37 Hegelian CERN Cassites FAS
-834 226005 37 hypothesizer tempering forthcoming
-835 226006 37 warningly afore guides
-836 226007 37 journalizing Galatean vanish FAS
-837 226008 37 nested techniques lied A
-838 226203 37 Lars error sawtooth FAS
-839 226204 37 saplings veranda fated FAS
-840 226205 37 foothill severely gradually
-841 226206 37 labeled Cassites widens
-842 226207 37 imperiously forthcoming preclude
-843 226208 37 reporters guides Jobrel
-844 226209 37 furnishings vanish hooker
-845 226210 37 precipitable lied rainstorm
-846 226211 37 discounts sawtooth disconnects
-847 228001 37 excises fated cruelty
-848 228004 37 Stalin gradually exponentials A
-849 228005 37 despot widens affective A
-850 228006 37 ripeness preclude arteries
-851 228007 37 Arabia Jobrel Crosby FAS
-852 228008 37 unruly hooker acquaint
-853 228009 37 mournfulness rainstorm evenhandedly
-854 228101 37 boom disconnects percentage
-855 228108 37 slaughter cruelty disobedience
-856 228109 37 Sabine exponentials humility
-857 228110 37 handy affective gleaning A
-858 228111 37 rural arteries petted A
-859 228112 37 organizer Crosby bloater A
-860 228113 37 shipyard acquaint minion A
-861 228114 37 civics evenhandedly marginal A
-862 228115 37 inaccuracy percentage apiary A
-863 228116 37 rules disobedience measures
-864 228117 37 juveniles humility precaution
-865 228118 37 comprised gleaning repelled
-866 228119 37 investigations petted primary FAS
-867 228120 37 stabilizes bloater coverings
-868 228121 37 seminaries minion Artemia A
-869 228122 37 Hunter marginal navigate
-870 228201 37 sporty apiary spatial
-871 228206 37 test measures Gurkha
-872 228207 37 weasels precaution meanwhile A
-873 228208 37 CERN repelled Melinda A
-874 228209 37 tempering primary Butterfield
-875 228210 37 afore coverings Aldrich A
-876 228211 37 Galatean Artemia previewing A
-877 228212 37 techniques navigate glut A
-878 228213 37 error spatial unaffected
-879 228214 37 veranda Gurkha inmate
-880 228301 37 severely meanwhile mineral
-881 228305 37 Cassites Melinda impending A
-882 228306 37 forthcoming Butterfield meditation A
-883 228307 37 guides Aldrich ideas
-884 228308 37 vanish previewing miniaturizes W
-885 228309 37 lied glut lewdly
-886 228310 37 sawtooth unaffected title
-887 228311 37 fated inmate youthfulness
-888 228312 37 gradually mineral creak FAS
-889 228313 37 widens impending Chippewa
-890 228314 37 preclude meditation clamored
-891 228401 65 Jobrel ideas freezes
-892 228402 65 hooker miniaturizes forgivably FAS
-893 228403 65 rainstorm lewdly reduce FAS
-894 228404 65 disconnects title McGovern W
-895 228405 65 cruelty youthfulness Nazis W
-896 228406 65 exponentials creak epistle W
-897 228407 65 affective Chippewa socializes W
-898 228408 65 arteries clamored conceptions
-899 228409 65 Crosby freezes Kevin
-900 228410 65 acquaint forgivably uncovering
-901 230301 37 evenhandedly reduce chews FAS
-902 230302 37 percentage McGovern appendixes FAS
-903 230303 37 disobedience Nazis raining
-904 018062 37 humility epistle infest
-905 230501 37 gleaning socializes compartment
-906 230502 37 petted conceptions minting
-907 230503 37 bloater Kevin ducks
-908 230504 37 minion uncovering roped A
-909 230505 37 marginal chews waltz
-910 230506 37 apiary appendixes Lillian
-911 230507 37 measures raining repressions A
-912 230508 37 precaution infest chillingly
-913 230509 37 repelled compartment noncritical
-914 230901 37 primary minting lithograph
-915 230902 37 coverings ducks spongers
-916 230903 37 Artemia roped parenthood
-917 230904 37 navigate waltz posed
-918 230905 37 spatial Lillian instruments
-919 230906 37 Gurkha repressions filial
-920 230907 37 meanwhile chillingly fixedly
-921 230908 37 Melinda noncritical relives
-922 230909 37 Butterfield lithograph Pandora
-923 230910 37 Aldrich spongers watering A
-924 230911 37 previewing parenthood ungrateful
-925 230912 37 glut posed secures
-926 230913 37 unaffected instruments chastisers
-927 230914 37 inmate filial icon
-928 231304 37 mineral fixedly reuniting A
-929 231305 37 impending relives imagining A
-930 231306 37 meditation Pandora abiding A
-931 231307 37 ideas watering omnisciently
-932 231308 37 miniaturizes ungrateful Britannic
-933 231309 37 lewdly secures scholastics A
-934 231310 37 title chastisers mechanics A
-935 231311 37 youthfulness icon humidly A
-936 231312 37 creak reuniting masterpiece
-937 231313 37 Chippewa imagining however
-938 231314 37 clamored abiding Mendelian
-939 231315 37 freezes omnisciently jarred
-940 232102 37 forgivably Britannic scolds
-941 232103 37 reduce scholastics infatuate
-942 232104 37 McGovern mechanics willed A
-943 232105 37 Nazis humidly joyfully
-944 232106 37 epistle masterpiece Microsoft
-945 232107 37 socializes however fibrosities
-946 232108 37 conceptions Mendelian Baltimorean
-947 232601 37 Kevin jarred equestrian
-948 232602 37 uncovering scolds Goodrich
-949 232603 37 chews infatuate apish A
-950 232605 37 appendixes willed Adlerian
-5950 1232605 37 appendixes willed Adlerian
-5951 1232606 37 appendixes willed Adlerian
-5952 1232607 37 appendixes willed Adlerian
-5953 1232608 37 appendixes willed Adlerian
-5954 1232609 37 appendixes willed Adlerian
-951 232606 37 raining joyfully Tropez
-952 232607 37 infest Microsoft nouns
-953 232608 37 compartment fibrosities distracting
-954 232609 37 minting Baltimorean mutton
-955 236104 37 ducks equestrian bridgeable A
-956 236105 37 roped Goodrich stickers A
-957 236106 37 waltz apish transcontinental A
-958 236107 37 Lillian Adlerian amateurish
-959 236108 37 repressions Tropez Gandhian
-960 236109 37 chillingly nouns stratified
-961 236110 37 noncritical distracting chamberlains
-962 236111 37 lithograph mutton creditably
-963 236112 37 spongers bridgeable philosophic
-964 236113 37 parenthood stickers ores
-965 238005 37 posed transcontinental Carleton
-966 238006 37 instruments amateurish tape A
-967 238007 37 filial Gandhian afloat A
-968 238008 37 fixedly stratified goodness A
-969 238009 37 relives chamberlains welcoming
-970 238010 37 Pandora creditably Pinsky FAS
-971 238011 37 watering philosophic halting
-972 238012 37 ungrateful ores bibliography
-973 238013 37 secures Carleton decoding
-974 240401 41 chastisers tape variance A
-975 240402 41 icon afloat allowed A
-976 240901 41 reuniting goodness dire A
-977 240902 41 imagining welcoming dub A
-978 241801 41 abiding Pinsky poisoning
-979 242101 41 omnisciently halting Iraqis A
-980 242102 41 Britannic bibliography heaving
-981 242201 41 scholastics decoding population A
-982 242202 41 mechanics variance bomb A
-983 242501 41 humidly allowed Majorca A
-984 242502 41 masterpiece dire Gershwins
-985 246201 41 however dub explorers
-986 246202 41 Mendelian poisoning libretto A
-987 246203 41 jarred Iraqis occurred
-988 246204 41 scolds heaving Lagos
-989 246205 41 infatuate population rats
-990 246301 41 willed bomb bankruptcies A
-991 246302 41 joyfully Majorca crying
-992 248001 41 Microsoft Gershwins unexpected
-993 248002 41 fibrosities explorers accessed A
-994 248003 41 Baltimorean libretto colorful A
-995 248004 41 equestrian occurred versatility A
-996 248005 41 Goodrich Lagos cosy
-997 248006 41 apish rats Darius A
-998 248007 41 Adlerian bankruptcies mastering A
-999 248008 41 Tropez crying Asiaticizations A
-1000 248009 41 nouns unexpected offerers A
-1001 248010 41 distracting accessed uncles A
-1002 248011 41 mutton colorful sleepwalk
-1003 248012 41 bridgeable versatility Ernestine
-1004 248013 41 stickers cosy checksumming
-1005 248014 41 transcontinental Darius stopped
-1006 248015 41 amateurish mastering sicker
-1007 248016 41 Gandhian Asiaticizations Italianization
-1008 248017 41 stratified offerers alphabetic
-1009 248018 41 chamberlains uncles pharmaceutic
-1010 248019 41 creditably sleepwalk creator
-1011 248020 41 philosophic Ernestine chess
-1012 248021 41 ores checksumming charcoal
-1013 248101 41 Carleton stopped Epiphany A
-1014 248102 41 tape sicker bulldozes A
-1015 248201 41 afloat Italianization Pygmalion A
-1016 248202 41 goodness alphabetic caressing A
-1017 248203 41 welcoming pharmaceutic Palestine A
-1018 248204 41 Pinsky creator regimented A
-1019 248205 41 halting chess scars A
-1020 248206 41 bibliography charcoal realest A
-1021 248207 41 decoding Epiphany diffusing A
-1022 248208 41 variance bulldozes clubroom A
-1023 248209 41 allowed Pygmalion Blythe A
-1024 248210 41 dire caressing ahead
-1025 248211 50 dub Palestine reviver
-1026 250501 34 poisoning regimented retransmitting A
-1027 250502 34 Iraqis scars landslide
-1028 250503 34 heaving realest Eiffel
-1029 250504 34 population diffusing absentee
-1030 250505 34 bomb clubroom aye
-1031 250601 34 Majorca Blythe forked A
-1032 250602 34 Gershwins ahead Peruvianizes
-1033 250603 34 explorers reviver clerked
-1034 250604 34 libretto retransmitting tutor
-1035 250605 34 occurred landslide boulevard
-1036 251001 34 Lagos Eiffel shuttered
-1037 251002 34 rats absentee quotes A
-1038 251003 34 bankruptcies aye Caltech
-1039 251004 34 crying forked Mossberg
-1040 251005 34 unexpected Peruvianizes kept
-1041 251301 34 accessed clerked roundly
-1042 251302 34 colorful tutor features A
-1043 251303 34 versatility boulevard imaginable A
-1044 251304 34 cosy shuttered controller
-1045 251305 34 Darius quotes racial
-1046 251401 34 mastering Caltech uprisings A
-1047 251402 34 Asiaticizations Mossberg narrowed A
-1048 251403 34 offerers kept cannot A
-1049 251404 34 uncles roundly vest
-1050 251405 34 sleepwalk features famine
-1051 251406 34 Ernestine imaginable sugars
-1052 251801 34 checksumming controller exterminated A
-1053 251802 34 stopped racial belays
-1054 252101 34 sicker uprisings Hodges A
-1055 252102 34 Italianization narrowed translatable
-1056 252301 34 alphabetic cannot duality A
-1057 252302 34 pharmaceutic vest recording A
-1058 252303 34 creator famine rouses A
-1059 252304 34 chess sugars poison
-1060 252305 34 charcoal exterminated attitude
-1061 252306 34 Epiphany belays dusted
-1062 252307 34 bulldozes Hodges encompasses
-1063 252308 34 Pygmalion translatable presentation
-1064 252309 34 caressing duality Kantian
-1065 256001 34 Palestine recording imprecision A
-1066 256002 34 regimented rouses saving
-1067 256003 34 scars poison maternal
-1068 256004 34 realest attitude hewed
-1069 256005 34 diffusing dusted kerosene
-1070 258001 34 clubroom encompasses Cubans
-1071 258002 34 Blythe presentation photographers
-1072 258003 34 ahead Kantian nymph A
-1073 258004 34 reviver imprecision bedlam A
-1074 258005 34 retransmitting saving north A
-1075 258006 34 landslide maternal Schoenberg A
-1076 258007 34 Eiffel hewed botany A
-1077 258008 34 absentee kerosene curs
-1078 258009 34 aye Cubans solidification
-1079 258010 34 forked photographers inheritresses
-1080 258011 34 Peruvianizes nymph stiller
-1081 258101 68 clerked bedlam t1 A
-1082 258102 68 tutor north suite A
-1083 258103 34 boulevard Schoenberg ransomer
-1084 258104 68 shuttered botany Willy
-1085 258105 68 quotes curs Rena A
-1086 258106 68 Caltech solidification Seattle A
-1087 258107 68 Mossberg inheritresses relaxes A
-1088 258108 68 kept stiller exclaim
-1089 258109 68 roundly t1 implicated A
-1090 258110 68 features suite distinguish
-1091 258111 68 imaginable ransomer assayed
-1092 258112 68 controller Willy homeowner
-1093 258113 68 racial Rena and
-1094 258201 34 uprisings Seattle stealth
-1095 258202 34 narrowed relaxes coinciding A
-1096 258203 34 cannot exclaim founder A
-1097 258204 34 vest implicated environing
-1098 258205 34 famine distinguish jewelry
-1099 258301 34 sugars assayed lemons A
-1100 258401 34 exterminated homeowner brokenness A
-1101 258402 34 belays and bedpost A
-1102 258403 34 Hodges stealth assurers A
-1103 258404 34 translatable coinciding annoyers
-1104 258405 34 duality founder affixed
-1105 258406 34 recording environing warbling
-1106 258407 34 rouses jewelry seriously
-1107 228123 37 poison lemons boasted
-1108 250606 34 attitude brokenness Chantilly
-1109 208405 37 dusted bedpost Iranizes
-1110 212101 37 encompasses assurers violinist
-1111 218206 37 presentation annoyers extramarital
-1112 150401 37 Kantian affixed spates
-1113 248212 41 imprecision warbling cloakroom
-1114 128026 00 saving seriously gazer
-1115 128024 00 maternal boasted hand
-1116 128027 00 hewed Chantilly tucked
-1117 128025 00 kerosene Iranizes gems
-1118 128109 00 Cubans violinist clinker
-1119 128705 00 photographers extramarital refiner
-1120 126303 00 nymph spates callus
-1121 128308 00 bedlam cloakroom leopards
-1122 128204 00 north gazer comfortingly
-1123 128205 00 Schoenberg hand generically
-1124 128206 00 botany tucked getters
-1125 128207 00 curs gems sexually
-1126 118205 00 solidification clinker spear
-1127 116801 00 inheritresses refiner serums
-1128 116803 00 stiller callus Italianization
-1129 116804 00 t1 leopards attendants
-1130 116802 00 suite comfortingly spies
-1131 128605 00 ransomer generically Anthony
-1132 118308 00 Willy getters planar
-1133 113702 00 Rena sexually cupped
-1134 113703 00 Seattle spear cleanser
-1135 112103 00 relaxes serums commuters
-1136 118009 00 exclaim Italianization honeysuckle
-5136 1118009 00 exclaim Italianization honeysuckle
-1137 138011 00 implicated attendants orphanage
-1138 138010 00 distinguish spies skies
-1139 138012 00 assayed Anthony crushers
-1140 068304 00 homeowner planar Puritan
-1141 078009 00 and cupped squeezer
-1142 108013 00 stealth cleanser bruises
-1143 084004 00 coinciding commuters bonfire
-1144 083402 00 founder honeysuckle Colombo
-1145 084003 00 environing orphanage nondecreasing
-1146 088504 00 jewelry skies innocents
-1147 088005 00 lemons crushers masked
-1148 088007 00 brokenness Puritan file
-1149 088006 00 bedpost squeezer brush
-1150 148025 00 assurers bruises mutilate
-1151 148024 00 annoyers bonfire mommy
-1152 138305 00 affixed Colombo bulkheads
-1153 138306 00 warbling nondecreasing undeclared
-1154 152701 00 seriously innocents displacements
-1155 148505 00 boasted masked nieces
-1156 158003 00 Chantilly file coeducation
-1157 156201 00 Iranizes brush brassy
-1158 156202 00 violinist mutilate authenticator
-1159 158307 00 extramarital mommy Washoe
-1160 158402 00 spates bulkheads penny
-1161 158401 00 cloakroom undeclared Flagler
-1162 068013 00 gazer displacements stoned
-1163 068012 00 hand nieces cranes
-1164 068203 00 tucked coeducation masterful
-1165 088205 00 gems brassy biracial
-1166 068704 00 clinker authenticator steamships
-1167 068604 00 refiner Washoe windmills
-1168 158502 00 callus penny exploit
-1169 123103 00 leopards Flagler riverfront
-1170 148026 00 comfortingly stoned sisterly
-1171 123302 00 generically cranes sharpshoot
-1172 076503 00 getters masterful mittens
-1173 126304 00 sexually biracial interdependency
-1174 068306 00 spear steamships policy
-1175 143504 00 serums windmills unleashing
-1176 160201 00 Italianization exploit pretenders
-1177 148028 00 attendants riverfront overstatements
-1178 148027 00 spies sisterly birthed
-1179 143505 00 Anthony sharpshoot opportunism
-1180 108014 00 planar mittens showroom
-1181 076104 00 cupped interdependency compromisingly
-1182 078106 00 cleanser policy Medicare
-1183 126102 00 commuters unleashing corresponds
-1184 128029 00 honeysuckle pretenders hardware
-1185 128028 00 orphanage overstatements implant
-1186 018410 00 skies birthed Alicia
-1187 128110 00 crushers opportunism requesting
-1188 148506 00 Puritan showroom produced
-1189 123303 00 squeezer compromisingly criticizes
-1190 123304 00 bruises Medicare backer
-1191 068504 00 bonfire corresponds positively
-1192 068305 00 Colombo hardware colicky
-1193 000000 00 nondecreasing implant thrillingly
-1 000001 00 Omaha teethe neat
-2 011401 37 breaking dreaded Steinberg W
-3 011402 37 Romans scholastics jarring
-4 011403 37 intercepted audiology tinily
-2 011401 37 breaking dreaded Steinberg W
-3 011402 37 Romans scholastics jarring
-4 011403 37 intercepted audiology tinily
-1 000001 00 Omaha teethe neat
-2 011401 37 breaking dreaded Steinberg W
-3 011402 37 Romans scholastics jarring
-4 011403 37 intercepted audiology tinily
-2 011401 37 breaking dreaded Steinberg W
-3 011402 37 Romans scholastics jarring
-4 011403 37 intercepted audiology tinily
-4 011403 37 intercepted audiology tinily
+SELECT COUNT(auto) FROM t2;
+COUNT(auto)
+1214
ALTER TABLE t2 DROP COLUMN fld6;
SHOW CREATE TABLE t2;
Table Create Table
diff --git a/mysql-test/r/binlog_row_ctype_ucs.result b/mysql-test/r/binlog_row_ctype_ucs.result
index 5feb17cde13..4eeff79e13a 100644
--- a/mysql-test/r/binlog_row_ctype_ucs.result
+++ b/mysql-test/r/binlog_row_ctype_ucs.result
@@ -7,9 +7,12 @@ show binlog events from 102;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 102 Table_map 1 141 table_id: # (test.t2)
master-bin.000001 141 Write_rows 1 231 table_id: # flags: STMT_END_F
+flush logs;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
diff --git a/mysql-test/r/binlog_row_mix_innodb_myisam.result b/mysql-test/r/binlog_row_mix_innodb_myisam.result
index e063d7371a9..185ca33d4db 100644
--- a/mysql-test/r/binlog_row_mix_innodb_myisam.result
+++ b/mysql-test/r/binlog_row_mix_innodb_myisam.result
@@ -400,6 +400,7 @@ insert into t2 select * from t1;
select get_lock("a",10);
get_lock("a",10)
1
+flush logs;
select
(@a:=load_file("MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output"))
is not null;
@@ -407,8 +408,8 @@ is not null;
is not null
1
select
-@a like "%#%error_code=0%ROLLBACK;%ROLLBACK /* added by mysqlbinlog */;%",
+@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%",
@a not like "%#%error_code=%error_code=%";
-@a like "%#%error_code=0%ROLLBACK;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%"
+@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%"
1 1
drop table t1, t2;
diff --git a/mysql-test/r/binlog_stm_ctype_ucs.result b/mysql-test/r/binlog_stm_ctype_ucs.result
index 61ca21d4058..76f3a3b06b9 100644
--- a/mysql-test/r/binlog_stm_ctype_ucs.result
+++ b/mysql-test/r/binlog_stm_ctype_ucs.result
@@ -7,17 +7,20 @@ show binlog events from 102;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 102 User var 1 142 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci
master-bin.000001 142 Query 1 231 use `test`; insert into t2 values (@v)
+flush logs;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`;
-use test;
-SET TIMESTAMP=10000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t2 values (@v);
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`/*!*/;
+use test/*!*/;
+SET TIMESTAMP=10000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t2 values (@v)/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
diff --git a/mysql-test/r/binlog_stm_mix_innodb_myisam.result b/mysql-test/r/binlog_stm_mix_innodb_myisam.result
index 8ab6840d441..23f4e50826a 100644
--- a/mysql-test/r/binlog_stm_mix_innodb_myisam.result
+++ b/mysql-test/r/binlog_stm_mix_innodb_myisam.result
@@ -367,6 +367,7 @@ insert into t2 select * from t1;
select get_lock("a",10);
get_lock("a",10)
1
+flush logs;
select
(@a:=load_file("MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output"))
is not null;
@@ -374,8 +375,8 @@ is not null;
is not null
1
select
-@a like "%#%error_code=0%ROLLBACK;%ROLLBACK /* added by mysqlbinlog */;%",
+@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%",
@a not like "%#%error_code=%error_code=%";
-@a like "%#%error_code=0%ROLLBACK;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%"
+@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%"
1 1
drop table t1, t2;
diff --git a/mysql-test/r/ctype_cp932_binlog_stm.result b/mysql-test/r/ctype_cp932_binlog_stm.result
index d354a8b99f7..ef1067e7c5d 100644
--- a/mysql-test/r/ctype_cp932_binlog_stm.result
+++ b/mysql-test/r/ctype_cp932_binlog_stm.result
@@ -41,6 +41,6 @@ IN ind DECIMAL(10,2))
BEGIN
INSERT INTO t4 VALUES (ins1, ins2, ind);
END
-master-bin.000001 805 Query 1 1010 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1'Foo\'s a Bar'), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93))
-master-bin.000001 1010 Query 1 1096 use `test`; DROP PROCEDURE bug18293
-master-bin.000001 1096 Query 1 1172 use `test`; DROP TABLE t4
+master-bin.000001 805 Query 1 1021 use `test`; INSERT INTO t4 VALUES ( NAME_CONST('ins1',_latin1 0x466F6F2773206120426172), NAME_CONST('ins2',_cp932 0xED40ED41ED42), NAME_CONST('ind',47.93))
+master-bin.000001 1021 Query 1 1107 use `test`; DROP PROCEDURE bug18293
+master-bin.000001 1107 Query 1 1183 use `test`; DROP TABLE t4
diff --git a/mysql-test/r/ctype_hebrew.result b/mysql-test/r/ctype_hebrew.result
new file mode 100644
index 00000000000..d938b2e47f3
--- /dev/null
+++ b/mysql-test/r/ctype_hebrew.result
@@ -0,0 +1,11 @@
+DROP TABLE IF EXISTS t1;
+SET NAMES hebrew;
+CREATE TABLE t1 (a char(1)) DEFAULT CHARSET=hebrew;
+INSERT INTO t1 VALUES (0xFD),(0xFE);
+ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
+SELECT HEX(a) FROM t1;
+HEX(a)
+E2808E
+E2808F
+DROP TABLE t1;
+End of 4.1 tests
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 4aa22944b9b..37ef5e2756f 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -124,12 +124,34 @@ create table t1 select date_format("2004-01-19 10:10:10", "%Y-%m-%d");
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `date_format("2004-01-19 10:10:10", "%Y-%m-%d")` varbinary(10) DEFAULT NULL
+ `date_format("2004-01-19 10:10:10", "%Y-%m-%d")` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t1;
date_format("2004-01-19 10:10:10", "%Y-%m-%d")
2004-01-19
drop table t1;
+set names utf8;
+set LC_TIME_NAMES='fr_FR';
+create table t1 (s1 char(20) character set latin1);
+insert into t1 values (date_format('2004-02-02','%M'));
+select hex(s1) from t1;
+hex(s1)
+66E97672696572
+drop table t1;
+create table t1 (s1 char(20) character set koi8r);
+set LC_TIME_NAMES='ru_RU';
+insert into t1 values (date_format('2004-02-02','%M'));
+insert into t1 values (date_format('2004-02-02','%b'));
+insert into t1 values (date_format('2004-02-02','%W'));
+insert into t1 values (date_format('2004-02-02','%a'));
+select hex(s1), s1 from t1;
+hex(s1) s1
+E6C5D7D2C1CCD1 ФевралÑ
+E6C5D7 Фев
+F0CFCEC5C4C5CCD8CEC9CB Понедельник
+F0CEC4 Пнд
+drop table t1;
+set LC_TIME_NAMES='en_US';
set names koi8r;
create table t1 (s1 char(1) character set utf8);
insert into t1 values (_koi8r'ÁÂ');
diff --git a/mysql-test/r/events_logs_tests.result b/mysql-test/r/events_logs_tests.result
index 335ca848387..1efd3fa602e 100644
--- a/mysql-test/r/events_logs_tests.result
+++ b/mysql-test/r/events_logs_tests.result
@@ -59,6 +59,7 @@ SELECT * FROM slow_event_test;
slo_val val
SET SESSION long_query_time=1;
SET GLOBAL event_scheduler=on;
+SET GLOBAL long_query_time=20;
CREATE EVENT long_event ON SCHEDULE EVERY 1 MINUTE DO INSERT INTO slow_event_test SELECT @@long_query_time, SLEEP(1.5);
"Sleep some more time than the actual event run will take"
SHOW VARIABLES LIKE 'event_scheduler';
@@ -67,20 +68,22 @@ event_scheduler ON
"Check our table. Should see 1 row"
SELECT * FROM slow_event_test;
slo_val val
-4 0
-"Check slow log. Should not see anything because 1.5 is under the threshold of 300 for GLOBAL, though over SESSION which is 2"
+20 0
+"Check slow log. Should not see anything because 1.5 is under the threshold of 20 for GLOBAL, though over SESSION which is 1"
+"This should show that the GLOBAL value is regarded and not the SESSION one of the current connection"
SELECT user_host, query_time, db, sql_text FROM mysql.slow_log;
user_host query_time db sql_text
+"Another test to show that GLOBAL is regarded and not SESSION."
"This should go to the slow log"
-DROP EVENT long_event;
SET SESSION long_query_time=10;
+DROP EVENT long_event;
SET GLOBAL long_query_time=1;
CREATE EVENT long_event2 ON SCHEDULE EVERY 1 MINUTE DO INSERT INTO slow_event_test SELECT @@long_query_time, SLEEP(2);
"Sleep some more time than the actual event run will take"
"Check our table. Should see 2 rows"
SELECT * FROM slow_event_test;
slo_val val
-4 0
+20 0
1 0
"Check slow log. Should see 1 row because 4 is over the threshold of 3 for GLOBAL, though under SESSION which is 10"
SELECT user_host, query_time, db, sql_text FROM mysql.slow_log;
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index 8158cab4323..64324b57fe3 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -1020,6 +1020,273 @@ t1 CREATE TABLE `t1` (
`stddev(0)` double(8,4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+create table bug22555 (i smallint primary key auto_increment, s1 smallint, s2 smallint, e decimal(30,10), o double);
+insert into bug22555 (s1, s2, e, o) values (53, 78, 11.4276528, 6.828112), (17, 78, 5.916793, 1.8502951), (18, 76, 2.679231, 9.17975591), (31, 62, 6.07831, 0.1), (19, 41, 5.37463, 15.1), (83, 73, 14.567426, 7.959222), (92, 53, 6.10151, 13.1856852), (7, 12, 13.92272, 3.442007), (92, 35, 11.95358909, 6.01376678), (38, 84, 2.572, 7.904571);
+select std(s1/s2) from bug22555 group by i;
+std(s1/s2)
+0.00000000
+0.00000000
+0.00000000
+0.00000000
+0.00000000
+0.00000000
+0.00000000
+0.00000000
+0.00000000
+0.00000000
+select std(e) from bug22555 group by i;
+std(e)
+0.00000000000000
+0.00000000000000
+0.00000000000000
+0.00000000000000
+0.00000000000000
+0.00000000000000
+0.00000000000000
+0.00000000000000
+0.00000000000000
+0.00000000000000
+select std(o) from bug22555 group by i;
+std(o)
+0
+0
+0
+0
+0
+0
+0
+0
+0
+0
+drop table bug22555;
+create table bug22555 (i smallint, s1 smallint, s2 smallint, o1 double, o2 double, e1 decimal, e2 decimal);
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+select i, count(*) from bug22555 group by i;
+i count(*)
+1 1
+2 1
+3 1
+select std(s1/s2) from bug22555 where i=1;
+std(s1/s2)
+0.00000000
+select std(s1/s2) from bug22555 where i=2;
+std(s1/s2)
+0.00000000
+select std(s1/s2) from bug22555 where i=3;
+std(s1/s2)
+0.00000000
+select std(s1/s2) from bug22555 where i=1 group by i;
+std(s1/s2)
+0.00000000
+select std(s1/s2) from bug22555 where i=2 group by i;
+std(s1/s2)
+0.00000000
+select std(s1/s2) from bug22555 where i=3 group by i;
+std(s1/s2)
+0.00000000
+select std(s1/s2) from bug22555 group by i order by i;
+std(s1/s2)
+0.00000000
+0.00000000
+0.00000000
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+i count(*) std(o1/o2)
+1 1 0
+2 1 0
+3 1 0
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+i count(*) std(e1/e2)
+1 1 0.00000000
+2 1 0.00000000
+3 1 0.00000000
+set @saved_div_precision_increment=@@div_precision_increment;
+set div_precision_increment=19;
+select i, count(*), variance(s1/s2) from bug22555 group by i order by i;
+i count(*) variance(s1/s2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+select i, count(*), variance(o1/o2) from bug22555 group by i order by i;
+i count(*) variance(o1/o2)
+1 1 0
+2 1 0
+3 1 0
+select i, count(*), variance(e1/e2) from bug22555 group by i order by i;
+i count(*) variance(e1/e2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+i count(*) std(s1/s2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+i count(*) std(o1/o2)
+1 1 0
+2 1 0
+3 1 0
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+i count(*) std(e1/e2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+set div_precision_increment=20;
+select i, count(*), variance(s1/s2) from bug22555 group by i order by i;
+i count(*) variance(s1/s2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+select i, count(*), variance(o1/o2) from bug22555 group by i order by i;
+i count(*) variance(o1/o2)
+1 1 0
+2 1 0
+3 1 0
+select i, count(*), variance(e1/e2) from bug22555 group by i order by i;
+i count(*) variance(e1/e2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+i count(*) std(s1/s2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+i count(*) std(o1/o2)
+1 1 0
+2 1 0
+3 1 0
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+i count(*) std(e1/e2)
+1 1 0.000000000000000000000000000000
+2 1 0.000000000000000000000000000000
+3 1 0.000000000000000000000000000000
+set @@div_precision_increment=@saved_div_precision_increment;
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+i count(*) std(s1/s2)
+1 4 0.00000000
+2 4 0.00000000
+3 4 0.00000000
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+i count(*) std(o1/o2)
+1 4 0
+2 4 0
+3 4 0
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+i count(*) std(e1/e2)
+1 4 0.00000000
+2 4 0.00000000
+3 4 0.00000000
+select std(s1/s2) from bug22555;
+std(s1/s2)
+0.21325764
+select std(o1/o2) from bug22555;
+std(o1/o2)
+0.21325763586649
+select std(e1/e2) from bug22555;
+std(e1/e2)
+0.21325764
+set @saved_div_precision_increment=@@div_precision_increment;
+set div_precision_increment=19;
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+i count(*) std(s1/s2)
+1 4 0.000000000000000000000000000000
+2 4 0.000000000000000000000000000000
+3 4 0.000000000000000000000000000000
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+i count(*) std(o1/o2)
+1 4 0
+2 4 0
+3 4 0
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+i count(*) std(e1/e2)
+1 4 0.000000000000000000000000000000
+2 4 0.000000000000000000000000000000
+3 4 0.000000000000000000000000000000
+select round(std(s1/s2), 17) from bug22555;
+round(std(s1/s2), 17)
+0.21325763586649341
+select std(o1/o2) from bug22555;
+std(o1/o2)
+0.21325763586649
+select round(std(e1/e2), 17) from bug22555;
+round(std(e1/e2), 17)
+0.21325763586649341
+set div_precision_increment=20;
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+i count(*) std(s1/s2)
+1 4 0.000000000000000000000000000000
+2 4 0.000000000000000000000000000000
+3 4 0.000000000000000000000000000000
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+i count(*) std(o1/o2)
+1 4 0
+2 4 0
+3 4 0
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+i count(*) std(e1/e2)
+1 4 0.000000000000000000000000000000
+2 4 0.000000000000000000000000000000
+3 4 0.000000000000000000000000000000
+select round(std(s1/s2), 17) from bug22555;
+round(std(s1/s2), 17)
+0.21325763586649341
+select std(o1/o2) from bug22555;
+std(o1/o2)
+0.21325763586649
+select round(std(e1/e2), 17) from bug22555;
+round(std(e1/e2), 17)
+0.21325763586649341
+set @@div_precision_increment=@saved_div_precision_increment;
+drop table bug22555;
+create table bug22555 (s smallint, o double, e decimal);
+insert into bug22555 values (1,1,1),(2,2,2),(3,3,3),(6,6,6),(7,7,7);
+select var_samp(s), var_pop(s) from bug22555;
+var_samp(s) var_pop(s)
+6.7000 5.3600
+select var_samp(o), var_pop(o) from bug22555;
+var_samp(o) var_pop(o)
+6.7 5.36
+select var_samp(e), var_pop(e) from bug22555;
+var_samp(e) var_pop(e)
+6.7000 5.3600
+drop table bug22555;
+create table bug22555 (s smallint, o double, e decimal);
+insert into bug22555 values (null,null,null),(null,null,null);
+select var_samp(s) as 'null', var_pop(s) as 'null' from bug22555;
+null null
+NULL NULL
+select var_samp(o) as 'null', var_pop(o) as 'null' from bug22555;
+null null
+NULL NULL
+select var_samp(e) as 'null', var_pop(e) as 'null' from bug22555;
+null null
+NULL NULL
+insert into bug22555 values (1,1,1);
+select var_samp(s) as 'null', var_pop(s) as '0' from bug22555;
+null 0
+NULL 0.0000
+select var_samp(o) as 'null', var_pop(o) as '0' from bug22555;
+null 0
+NULL 0
+select var_samp(e) as 'null', var_pop(e) as '0' from bug22555;
+null 0
+NULL 0.0000
+insert into bug22555 values (2,2,2);
+select var_samp(s) as '0.5', var_pop(s) as '0.25' from bug22555;
+0.5 0.25
+0.5000 0.2500
+select var_samp(o) as '0.5', var_pop(o) as '0.25' from bug22555;
+0.5 0.25
+0.5 0.25
+select var_samp(e) as '0.5', var_pop(e) as '0.25' from bug22555;
+0.5 0.25
+0.5000 0.2500
+drop table bug22555;
CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,1),(1,2),(1,3),(1,4),(1,5),(1,6),(1,7),(1,8);
INSERT INTO t1 SELECT a, b+8 FROM t1;
diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result
index 16f285f0275..7336665fa40 100644
--- a/mysql-test/r/func_in.result
+++ b/mysql-test/r/func_in.result
@@ -350,6 +350,10 @@ select some_id from t1 where some_id not in(-4,-1,3423534,2342342);
some_id
1
2
+select some_id from t1 where some_id not in('-1', '0');
+some_id
+1
+2
drop table t1;
End of 5.0 tests
create table t1(f1 char(1));
diff --git a/mysql-test/r/have_udf.require b/mysql-test/r/have_dynamic_loading.require
index 2d21f65e4ac..2d21f65e4ac 100644
--- a/mysql-test/r/have_udf.require
+++ b/mysql-test/r/have_dynamic_loading.require
diff --git a/mysql-test/r/have_example_plugin.require b/mysql-test/r/have_example_plugin.require
new file mode 100644
index 00000000000..291b8231cbb
--- /dev/null
+++ b/mysql-test/r/have_example_plugin.require
@@ -0,0 +1,2 @@
+have_example_plugin
+1
diff --git a/mysql-test/r/have_row_based.require b/mysql-test/r/have_row_based.require
deleted file mode 100644
index c71451a95c3..00000000000
--- a/mysql-test/r/have_row_based.require
+++ /dev/null
@@ -1,2 +0,0 @@
-Variable_name Value
-have_row_based_replication YES
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 8a0273666b4..5a506a010df 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -922,6 +922,7 @@ SET @@myisam_repair_threads=1;
SHOW VARIABLES LIKE 'myisam_repair%';
Variable_name Value
myisam_repair_threads 1
+End of 4.1 tests
set storage_engine=MyISAM;
drop table if exists t1,t2,t3;
--- Testing varchar ---
@@ -1590,20 +1591,6 @@ show keys from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 1 a 1 a A 8 NULL NULL YES BTREE
drop table t1;
-show create table t1;
-show create table t1;
-create table t1 (a int) engine=myisam select 42 a;
-select * from t1;
-a
-9
-select * from t1;
-a
-99
-select * from t1;
-a
-42
-drop table t1;
-End of 4.1 tests
create table t1 (c1 int) engine=myisam pack_keys=0;
create table t2 (c1 int) engine=myisam pack_keys=1;
create table t3 (c1 int) engine=myisam pack_keys=default;
diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result
index c3be791b523..4163ad1b4f7 100644
--- a/mysql-test/r/mysqlbinlog.result
+++ b/mysql-test/r/mysqlbinlog.result
@@ -15,31 +15,33 @@ flush logs;
--- Local --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-drop table if exists t1,t2;
-SET TIMESTAMP=1000000000;
-create table t1 (word varchar(20));
-SET TIMESTAMP=1000000000;
-create table t2 (id int auto_increment not null primary key);
-SET TIMESTAMP=1000000000;
-insert into t1 values ("abirvalg");
-SET INSERT_ID=1;
-SET TIMESTAMP=1000000000;
-insert into t2 values ();
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-0' INTO table t1;
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-0' INTO table t1;
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-0' INTO table t1;
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-0' INTO table t1;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+drop table if exists t1,t2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+create table t1 (word varchar(20))/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+create table t2 (id int auto_increment not null primary key)/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 values ("abirvalg")/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t2 values ()/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-0' INTO table t1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-0' INTO table t1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-0' INTO table t1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-0' INTO table t1/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -47,13 +49,15 @@ ROLLBACK /* added by mysqlbinlog */;
--- Broken LOAD DATA --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values ("Alas");
+DELIMITER /*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values ("Alas")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -61,8 +65,10 @@ ROLLBACK /* added by mysqlbinlog */;
--- --database --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=1;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=1/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -70,13 +76,15 @@ ROLLBACK /* added by mysqlbinlog */;
--- --position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values ("Alas");
+DELIMITER /*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values ("Alas")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -84,31 +92,33 @@ ROLLBACK /* added by mysqlbinlog */;
--- Remote --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-drop table if exists t1,t2;
-SET TIMESTAMP=1000000000;
-create table t1 (word varchar(20));
-SET TIMESTAMP=1000000000;
-create table t2 (id int auto_increment not null primary key);
-SET TIMESTAMP=1000000000;
-insert into t1 values ("abirvalg");
-SET INSERT_ID=1;
-SET TIMESTAMP=1000000000;
-insert into t2 values ();
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-2' INTO table t1;
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-2' INTO table t1;
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-2' INTO table t1;
-SET TIMESTAMP=1000000000;
-load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-2' INTO table t1;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+drop table if exists t1,t2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+create table t1 (word varchar(20))/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+create table t2 (id int auto_increment not null primary key)/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 values ("abirvalg")/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t2 values ()/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-1-2' INTO table t1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-2-2' INTO table t1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-3-2' INTO table t1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+load data LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/SQL_LOAD_MB-4-2' INTO table t1/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -116,13 +126,15 @@ ROLLBACK /* added by mysqlbinlog */;
--- Broken LOAD DATA --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values ("Alas");
+DELIMITER /*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values ("Alas")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -130,8 +142,10 @@ ROLLBACK /* added by mysqlbinlog */;
--- --database --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=1;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=1/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -139,13 +153,15 @@ ROLLBACK /* added by mysqlbinlog */;
--- --position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values ("Alas");
+DELIMITER /*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values ("Alas")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -153,22 +169,26 @@ ROLLBACK /* added by mysqlbinlog */;
--- reading stdin --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1108844556;
-BEGIN;
-SET TIMESTAMP=1108844555;
-insert t1 values (1);
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1108844556/*!*/;
+BEGIN/*!*/;
+SET TIMESTAMP=1108844555/*!*/;
+insert t1 values (1)/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-use test;
-SET TIMESTAMP=1108844556;
-BEGIN;
-SET TIMESTAMP=1108844555;
-insert t1 values (1);
+DELIMITER /*!*/;
+use test/*!*/;
+SET TIMESTAMP=1108844556/*!*/;
+BEGIN/*!*/;
+SET TIMESTAMP=1108844555/*!*/;
+insert t1 values (1)/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -190,8 +210,65 @@ select HEX(f) from t4;
HEX(f)
835C
flush logs;
+flush logs;
select * from t5 /* must be (1),(1) */;
a
1
1
+flush logs;
+drop table if exists t5;
+create table t5 (c1 int, c2 varchar(128) character set latin1 not null);
+insert into t5 values (1, date_format('2001-01-01','%W'));
+set lc_time_names=de_DE;
+insert into t5 values (2, date_format('2001-01-01','%W'));
+set lc_time_names=en_US;
+insert into t5 values (3, date_format('2001-01-01','%W'));
+select * from t5 order by c1;
+c1 c2
+1 Monday
+2 Montag
+3 Monday
+flush logs;
+drop table t5;
+select * from t5 order by c1;
+c1 c2
+1 Monday
+2 Montag
+3 Monday
+drop procedure if exists p1;
+flush logs;
+create procedure p1()
+begin
+select 1;
+end;
+//
+flush logs;
+call p1();
+1
+1
+drop procedure p1;
+call p1();
+ERROR 42000: PROCEDURE test.p1 does not exist
+/*!40019 SET @@session.max_insert_delayed_threads=0*/;
+/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
+DELIMITER /*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+CREATE DEFINER=`root`@`localhost` procedure p1()
+begin
+select 1;
+end/*!*/;
+DELIMITER ;
+# End of log file
+ROLLBACK /* added by mysqlbinlog */;
+/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
+call p1();
+1
+1
+drop procedure p1;
drop table t1, t2, t03, t04, t3, t4, t5;
+flush logs;
diff --git a/mysql-test/r/mysqlbinlog2.result b/mysql-test/r/mysqlbinlog2.result
index 4d6be811037..e76ab71fd54 100644
--- a/mysql-test/r/mysqlbinlog2.result
+++ b/mysql-test/r/mysqlbinlog2.result
@@ -17,29 +17,31 @@ insert into t1 values(null, "f");
--- Local --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -47,27 +49,29 @@ ROLLBACK /* added by mysqlbinlog */;
--- offset --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=1;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=1/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -75,17 +79,19 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-SET INSERT_ID=4;
-use test;
-SET TIMESTAMP=1579609946;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+SET INSERT_ID=4/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -93,23 +99,25 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -117,21 +125,23 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=3;
-use test;
-SET TIMESTAMP=1579609944;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=3/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -139,58 +149,65 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
--- Local with 2 binlogs on command line --
+flush logs;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -198,35 +215,39 @@ ROLLBACK /* added by mysqlbinlog */;
--- offset --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=1;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=1/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -234,25 +255,29 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-SET INSERT_ID=4;
-use test;
-SET TIMESTAMP=1579609946;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+SET INSERT_ID=4/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -260,30 +285,34 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -291,29 +320,33 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=3;
-use test;
-SET TIMESTAMP=1579609944;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=3/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -321,20 +354,22 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -342,29 +377,31 @@ ROLLBACK /* added by mysqlbinlog */;
--- Remote --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -372,27 +409,29 @@ ROLLBACK /* added by mysqlbinlog */;
--- offset --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=1;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=1/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -400,17 +439,19 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-SET INSERT_ID=4;
-use test;
-SET TIMESTAMP=1579609946;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+SET INSERT_ID=4/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -418,23 +459,25 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -442,21 +485,23 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=3;
-use test;
-SET TIMESTAMP=1579609944;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=3/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -464,20 +509,22 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -485,37 +532,41 @@ ROLLBACK /* added by mysqlbinlog */;
--- Remote with 2 binlogs on command line --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -523,35 +574,39 @@ ROLLBACK /* added by mysqlbinlog */;
--- offset --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=1;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=1/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -559,25 +614,29 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-SET INSERT_ID=4;
-use test;
-SET TIMESTAMP=1579609946;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+SET INSERT_ID=4/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -585,30 +644,34 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -616,29 +679,33 @@ ROLLBACK /* added by mysqlbinlog */;
--- start-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET INSERT_ID=3;
-use test;
-SET TIMESTAMP=1579609944;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-use test;
-SET TIMESTAMP=1579609943;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET INSERT_ID=3/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+DELIMITER ;
+DELIMITER /*!*/;
+SET INSERT_ID=6/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -646,20 +713,22 @@ ROLLBACK /* added by mysqlbinlog */;
--- stop-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -667,32 +736,34 @@ ROLLBACK /* added by mysqlbinlog */;
--- to-last-log --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1579609942;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-create table t1 (a int auto_increment not null primary key, b char(3));
-SET INSERT_ID=1;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "a");
-SET INSERT_ID=2;
-SET TIMESTAMP=1579609942;
-insert into t1 values(null, "b");
-SET INSERT_ID=3;
-SET TIMESTAMP=1579609944;
-insert into t1 values(null, "c");
-SET INSERT_ID=4;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "d");
-SET INSERT_ID=5;
-SET TIMESTAMP=1579609946;
-insert into t1 values(null, "e");
-SET INSERT_ID=6;
-SET TIMESTAMP=1579609943;
-insert into t1 values(null, "f");
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "a")/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1579609942/*!*/;
+insert into t1 values(null, "b")/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1579609944/*!*/;
+insert into t1 values(null, "c")/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "d")/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1579609946/*!*/;
+insert into t1 values(null, "e")/*!*/;
+SET INSERT_ID=6/*!*/;
+SET TIMESTAMP=1579609943/*!*/;
+insert into t1 values(null, "f")/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
diff --git a/mysql-test/r/mysqlbinlog_base64.result b/mysql-test/r/mysqlbinlog_base64.result
index c31dbee56c6..33047a8774d 100644
--- a/mysql-test/r/mysqlbinlog_base64.result
+++ b/mysql-test/r/mysqlbinlog_base64.result
@@ -6,6 +6,7 @@ update t1 set a=a+2 where a=2;
update t1 set a=a+2 where a=3;
create table t2 (word varchar(20));
load data infile '../std_data_ln/words.dat' into table t2;
+flush logs;
drop table t1;
drop table t2;
select * from t1;
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index 4ac1dfc938f..0190094f0ba 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -1787,6 +1787,78 @@ CREATE TABLE `t1` (
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
drop table t1;
+#
+# BUG#13926: --order-by-primary fails if PKEY contains quote character
+#
+DROP TABLE IF EXISTS `t1`;
+CREATE TABLE `t1` (
+`a b` INT,
+`c"d` INT,
+`e``f` INT,
+PRIMARY KEY (`a b`, `c"d`, `e``f`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+insert into t1 values (0815, 4711, 2006);
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+DROP TABLE IF EXISTS "t1";
+CREATE TABLE "t1" (
+ "a b" int(11) NOT NULL DEFAULT '0',
+ "c""d" int(11) NOT NULL DEFAULT '0',
+ "e`f" int(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY ("a b","c""d","e`f")
+);
+
+LOCK TABLES "t1" WRITE;
+/*!40000 ALTER TABLE "t1" DISABLE KEYS */;
+INSERT INTO "t1" VALUES (815,4711,2006);
+/*!40000 ALTER TABLE "t1" ENABLE KEYS */;
+UNLOCK TABLES;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+DROP TABLE IF EXISTS `t1`;
+CREATE TABLE `t1` (
+ `a b` int(11) NOT NULL DEFAULT '0',
+ `c"d` int(11) NOT NULL DEFAULT '0',
+ `e``f` int(11) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`a b`,`c"d`,`e``f`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+
+LOCK TABLES `t1` WRITE;
+/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
+INSERT INTO `t1` VALUES (815,4711,2006);
+/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
+UNLOCK TABLES;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+DROP TABLE `t1`;
End of 4.1 tests
#
# Bug #10213 mysqldump crashes when dumping VIEWs(on MacOS X)
@@ -3123,78 +3195,6 @@ drop user myDB_User@localhost;
drop database mysqldump_myDB;
use test;
#
-# BUG#13926: --order-by-primary fails if PKEY contains quote character
-#
-DROP TABLE IF EXISTS `t1`;
-CREATE TABLE `t1` (
-`a b` INT,
-`c"d` INT,
-`e``f` INT,
-PRIMARY KEY (`a b`, `c"d`, `e``f`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-insert into t1 values (0815, 4711, 2006);
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-DROP TABLE IF EXISTS "t1";
-CREATE TABLE "t1" (
- "a b" int(11) NOT NULL DEFAULT '0',
- "c""d" int(11) NOT NULL DEFAULT '0',
- "e`f" int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY ("a b","c""d","e`f")
-);
-
-LOCK TABLES "t1" WRITE;
-/*!40000 ALTER TABLE "t1" DISABLE KEYS */;
-INSERT INTO "t1" VALUES (815,4711,2006);
-/*!40000 ALTER TABLE "t1" ENABLE KEYS */;
-UNLOCK TABLES;
-/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
-
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-DROP TABLE IF EXISTS `t1`;
-CREATE TABLE `t1` (
- `a b` int(11) NOT NULL DEFAULT '0',
- `c"d` int(11) NOT NULL DEFAULT '0',
- `e``f` int(11) NOT NULL DEFAULT '0',
- PRIMARY KEY (`a b`,`c"d`,`e``f`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-
-LOCK TABLES `t1` WRITE;
-/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
-INSERT INTO `t1` VALUES (815,4711,2006);
-/*!40000 ALTER TABLE `t1` ENABLE KEYS */;
-UNLOCK TABLES;
-/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
-DROP TABLE `t1`;
-#
# Bug #19745: mysqldump --xml produces invalid xml
#
DROP TABLE IF EXISTS t1;
diff --git a/mysql-test/r/ndb_binlog_ignore_db.result b/mysql-test/r/ndb_binlog_ignore_db.result
index 8dc2c1ff1f8..952d048ad8d 100644
--- a/mysql-test/r/ndb_binlog_ignore_db.result
+++ b/mysql-test/r/ndb_binlog_ignore_db.result
@@ -1,3 +1,4 @@
+reset master;
drop table if exists t1;
drop database if exists mysqltest;
create database mysqltest;
diff --git a/mysql-test/r/ndb_lock.result b/mysql-test/r/ndb_lock.result
index 668c26aad03..44eb5c8b3f3 100644
--- a/mysql-test/r/ndb_lock.result
+++ b/mysql-test/r/ndb_lock.result
@@ -87,11 +87,27 @@ x y z
rollback;
commit;
begin;
+select * from t1 where y = 'one' or y = 'three' for update;
+x y z
+# # #
+# # #
+begin;
+select * from t1 where x = 2 for update;
+x y z
+2 two 2
+select * from t1 where x = 1 for update;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+rollback;
+commit;
+begin;
select * from t1 where y = 'one' or y = 'three' order by x for update;
x y z
1 one 1
3 three 3
begin;
+select * from t1 where x = 2 for update;
+x y z
+2 two 2
select * from t1 where x = 1 for update;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback;
@@ -124,6 +140,22 @@ ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback;
commit;
begin;
+select * from t1 where y = 'one' or y = 'three' lock in share mode;
+x y z
+# # #
+# # #
+begin;
+select * from t1 where y = 'one' lock in share mode;
+x y z
+1 one 1
+select * from t1 where x = 2 for update;
+x y z
+2 two 2
+select * from t1 where x = 1 for update;
+ERROR HY000: Lock wait timeout exceeded; try restarting transaction
+rollback;
+commit;
+begin;
select * from t1 where y = 'one' or y = 'three' order by x lock in share mode;
x y z
1 one 1
@@ -132,6 +164,9 @@ begin;
select * from t1 where y = 'one' lock in share mode;
x y z
1 one 1
+select * from t1 where x = 2 for update;
+x y z
+2 two 2
select * from t1 where x = 1 for update;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback;
diff --git a/mysql-test/r/ndb_types.result b/mysql-test/r/ndb_types.result
index 6938277f01d..ec2858d818a 100644
--- a/mysql-test/r/ndb_types.result
+++ b/mysql-test/r/ndb_types.result
@@ -73,3 +73,4 @@ select time_stamp>@now from t1;
time_stamp>@now
1
drop table t1;
+End of 4.1 tests
diff --git a/mysql-test/r/not_row_based.require b/mysql-test/r/not_row_based.require
deleted file mode 100644
index e30e73320fb..00000000000
--- a/mysql-test/r/not_row_based.require
+++ /dev/null
@@ -1,2 +0,0 @@
-Variable_name Value
-have_row_based_replication NO
diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result
new file mode 100644
index 00000000000..44641858fca
--- /dev/null
+++ b/mysql-test/r/plugin.result
@@ -0,0 +1,15 @@
+CREATE TABLE t1(a int) ENGINE=EXAMPLE;
+Warnings:
+Error 1286 Unknown table engine 'EXAMPLE'
+DROP TABLE t1;
+INSTALL PLUGIN example SONAME 'ha_example.so';
+INSTALL PLUGIN EXAMPLE SONAME 'ha_example.so';
+ERROR HY000: Function 'EXAMPLE' already exists
+UNINSTALL PLUGIN example;
+INSTALL PLUGIN example SONAME 'ha_example.so';
+CREATE TABLE t1(a int) ENGINE=EXAMPLE;
+SELECT * FROM t1;
+a
+DROP TABLE t1;
+UNINSTALL PLUGIN non_exist;
+ERROR 42000: PLUGIN non_exist does not exist
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result
index 04923c9e24c..7a280c2201c 100644
--- a/mysql-test/r/range.result
+++ b/mysql-test/r/range.result
@@ -521,8 +521,8 @@ select count(*) from t1 where x = 18446744073709551601;
count(*)
1
create table t2 (x bigint not null);
-insert into t2(x) values (cast(0xfffffffffffffff0+0 as signed));
-insert into t2(x) values (cast(0xfffffffffffffff1+0 as signed));
+insert into t2(x) values (-16);
+insert into t2(x) values (-15);
select * from t2;
x
-16
diff --git a/mysql-test/r/rpl_charset_sjis.result b/mysql-test/r/rpl_charset_sjis.result
new file mode 100644
index 00000000000..770ad0588d1
--- /dev/null
+++ b/mysql-test/r/rpl_charset_sjis.result
@@ -0,0 +1,26 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+drop table if exists t1;
+drop procedure if exists p1;
+create table t1 (a varchar(255) character set sjis);
+create procedure p1 (in a varchar(255) character set sjis) insert into t1 values (a);
+SET NAMES binary;
+CALL p1 ('–\\');
+select "--- on master ---";
+--- on master ---
+--- on master ---
+select hex(a) from t1 ;
+hex(a)
+965C
+select "--- on slave ---";
+--- on slave ---
+--- on slave ---
+select hex(a) from t1;
+hex(a)
+965C
+drop table t1;
+drop procedure p1;
diff --git a/mysql-test/r/rpl_do_grant.result b/mysql-test/r/rpl_do_grant.result
index 50d181be0ca..f7f1ce66656 100644
--- a/mysql-test/r/rpl_do_grant.result
+++ b/mysql-test/r/rpl_do_grant.result
@@ -20,6 +20,17 @@ set password for rpl_do_grant@localhost=password("does it work?");
select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
password<>_binary''
1
+update mysql.user set password='' where user='rpl_do_grant';
+flush privileges;
+select password<>'' from mysql.user where user='rpl_do_grant';
+password<>''
+0
+set sql_mode='ANSI_QUOTES';
+set password for rpl_do_grant@localhost=password('does it work?');
+set sql_mode='';
+select password<>'' from mysql.user where user='rpl_do_grant';
+password<>''
+1
delete from mysql.user where user=_binary'rpl_do_grant';
delete from mysql.db where user=_binary'rpl_do_grant';
flush privileges;
diff --git a/mysql-test/r/rpl_locale.result b/mysql-test/r/rpl_locale.result
new file mode 100644
index 00000000000..b7396084663
--- /dev/null
+++ b/mysql-test/r/rpl_locale.result
@@ -0,0 +1,20 @@
+stop slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+reset master;
+reset slave;
+drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
+start slave;
+create table t1 (s1 char(10));
+set lc_time_names= 'de_DE';
+insert into t1 values (date_format('2001-01-01','%W'));
+set lc_time_names= 'en_US';
+insert into t1 values (date_format('2001-01-01','%W'));
+select * from t1;
+s1
+Montag
+Monday
+select * from t1;
+s1
+Montag
+Monday
+drop table t1;
diff --git a/mysql-test/r/rpl_row_create_table.result b/mysql-test/r/rpl_row_create_table.result
index 03388f59b8c..8f587fb5796 100644
--- a/mysql-test/r/rpl_row_create_table.result
+++ b/mysql-test/r/rpl_row_create_table.result
@@ -127,7 +127,7 @@ NULL 5 10
NULL 6 12
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
ERROR 23000: Duplicate entry '2' for key 'b'
-SHOW BINLOG EVENTS FROM 1256;
+SHOW BINLOG EVENTS FROM 1118;
Log_name Pos Event_type Server_id End_log_pos Info
CREATE TABLE t7 (a INT, b INT UNIQUE);
INSERT INTO t7 SELECT a,b FROM tt3;
@@ -212,3 +212,192 @@ Create Table CREATE TABLE `t9` (
`a` int(11) DEFAULT NULL,
`b` int(11) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
+DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9;
+STOP SLAVE;
+SET GLOBAL storage_engine=@storage_engine;
+START SLAVE;
+================ BUG#22864 ================
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+SET AUTOCOMMIT=0;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+CREATE TABLE t2 ENGINE=INNODB SELECT * FROM t1;
+ROLLBACK;
+CREATE TABLE t3 ENGINE=INNODB SELECT * FROM t1;
+INSERT INTO t3 VALUES (4),(5),(6);
+ROLLBACK;
+CREATE TABLE t4 ENGINE=INNODB SELECT * FROM t1;
+INSERT INTO t1 VALUES (4),(5),(6);
+ROLLBACK;
+Warnings:
+Warning 1196 Some non-transactional changed tables couldn't be rolled back
+SHOW TABLES;
+Tables_in_test
+t1
+t2
+t3
+t4
+SELECT TABLE_NAME,ENGINE
+FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME LIKE 't_'
+ORDER BY TABLE_NAME;
+TABLE_NAME ENGINE
+t1 MyISAM
+t2 InnoDB
+t3 InnoDB
+t4 InnoDB
+SELECT * FROM t1 ORDER BY a;
+a
+1
+2
+3
+4
+5
+6
+SELECT * FROM t2 ORDER BY a;
+a
+1
+2
+3
+SELECT * FROM t3 ORDER BY a;
+a
+1
+2
+3
+SELECT * FROM t4 ORDER BY a;
+a
+1
+2
+3
+SHOW BINLOG EVENTS;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 4 Format_desc 1 102 Server ver: #, Binlog ver: #
+master-bin.000001 102 Query 1 188 use `test`; CREATE TABLE t1 (a INT)
+master-bin.000001 188 Table_map 1 227 table_id: # (test.t1)
+master-bin.000001 227 Write_rows 1 271 table_id: # flags: STMT_END_F
+master-bin.000001 271 Query 1 339 use `test`; BEGIN
+master-bin.000001 339 Query 1 125 use `test`; CREATE TABLE `t2` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=InnoDB
+master-bin.000001 464 Table_map 1 164 table_id: # (test.t2)
+master-bin.000001 503 Write_rows 1 208 table_id: # flags: STMT_END_F
+master-bin.000001 547 Xid 1 574 COMMIT /* XID */
+master-bin.000001 574 Query 1 642 use `test`; BEGIN
+master-bin.000001 642 Query 1 125 use `test`; CREATE TABLE `t3` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=InnoDB
+master-bin.000001 767 Table_map 1 164 table_id: # (test.t3)
+master-bin.000001 806 Write_rows 1 208 table_id: # flags: STMT_END_F
+master-bin.000001 850 Xid 1 877 COMMIT /* XID */
+master-bin.000001 877 Query 1 945 use `test`; BEGIN
+master-bin.000001 945 Query 1 125 use `test`; CREATE TABLE `t4` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=InnoDB
+master-bin.000001 1070 Table_map 1 164 table_id: # (test.t4)
+master-bin.000001 1109 Write_rows 1 208 table_id: # flags: STMT_END_F
+master-bin.000001 1153 Xid 1 1180 COMMIT /* XID */
+master-bin.000001 1180 Table_map 1 1219 table_id: # (test.t1)
+master-bin.000001 1219 Write_rows 1 1263 table_id: # flags: STMT_END_F
+SHOW TABLES;
+Tables_in_test
+t1
+t2
+t3
+t4
+SELECT TABLE_NAME,ENGINE
+FROM INFORMATION_SCHEMA.TABLES
+WHERE TABLE_NAME LIKE 't_'
+ORDER BY TABLE_NAME;
+TABLE_NAME ENGINE
+t1 MyISAM
+t2 InnoDB
+t3 InnoDB
+t4 InnoDB
+SELECT * FROM t1 ORDER BY a;
+a
+1
+2
+3
+4
+5
+6
+SELECT * FROM t2 ORDER BY a;
+a
+1
+2
+3
+SELECT * FROM t3 ORDER BY a;
+a
+1
+2
+3
+SELECT * FROM t4 ORDER BY a;
+a
+1
+2
+3
+DROP TABLE IF EXISTS t1,t2,t3,t4;
+SET AUTOCOMMIT=1;
+STOP SLAVE;
+RESET SLAVE;
+RESET MASTER;
+START SLAVE;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+CREATE TABLE t2 (a INT) ENGINE=INNODB;
+BEGIN;
+INSERT INTO t2 SELECT a*a FROM t1;
+CREATE TEMPORARY TABLE tt1
+SELECT a+1 AS a
+FROM t1
+WHERE a MOD 2 = 1;
+INSERT INTO t2 SELECT a+2 FROM tt1;
+COMMIT;
+SELECT * FROM t2 ORDER BY a;
+a
+1
+4
+4
+6
+9
+SHOW BINLOG EVENTS;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 4 Format_desc 1 102 Server ver: #, Binlog ver: #
+master-bin.000001 102 Query 1 188 use `test`; CREATE TABLE t1 (a INT)
+master-bin.000001 188 Table_map 1 227 table_id: # (test.t1)
+master-bin.000001 227 Write_rows 1 271 table_id: # flags: STMT_END_F
+master-bin.000001 271 Query 1 371 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB
+master-bin.000001 371 Query 1 439 use `test`; BEGIN
+master-bin.000001 439 Table_map 1 39 table_id: # (test.t2)
+master-bin.000001 478 Write_rows 1 83 table_id: # flags: STMT_END_F
+master-bin.000001 522 Table_map 1 122 table_id: # (test.t2)
+master-bin.000001 561 Write_rows 1 161 table_id: # flags: STMT_END_F
+master-bin.000001 600 Xid 1 627 COMMIT /* XID */
+SELECT * FROM t2 ORDER BY a;
+a
+1
+4
+4
+6
+9
+TRUNCATE TABLE t2;
+BEGIN;
+INSERT INTO t2 SELECT a*a FROM t1;
+CREATE TEMPORARY TABLE tt2
+SELECT a+1 AS a
+FROM t1
+WHERE a MOD 2 = 1;
+INSERT INTO t2 SELECT a+2 FROM tt2;
+ROLLBACK;
+SELECT * FROM t2 ORDER BY a;
+a
+SHOW BINLOG EVENTS FROM 627;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 627 Query 1 80 use `test`; TRUNCATE TABLE t2
+master-bin.000001 707 Xid 1 734 COMMIT /* XID */
+SELECT * FROM t2 ORDER BY a;
+a
+DROP TABLE t1,t2;
diff --git a/mysql-test/r/rpl_row_delayed_ins.result b/mysql-test/r/rpl_row_delayed_ins.result
index 31fffeb59cc..21b251db193 100644
--- a/mysql-test/r/rpl_row_delayed_ins.result
+++ b/mysql-test/r/rpl_row_delayed_ins.result
@@ -5,7 +5,9 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create table t1(a int not null primary key) engine=myisam;
-insert delayed into t1 values (1),(2),(3);
+insert delayed into t1 values (1);
+insert delayed into t1 values (2);
+insert delayed into t1 values (3);
flush tables;
SELECT * FROM t1 ORDER BY a;
a
@@ -19,8 +21,10 @@ master-bin.000001 102 Query 1 222 use `test`; create table t1(a int not null pri
master-bin.000001 222 Table_map 1 261 table_id: # (test.t1)
master-bin.000001 261 Write_rows 1 295 table_id: # flags: STMT_END_F
master-bin.000001 295 Table_map 1 334 table_id: # (test.t1)
-master-bin.000001 334 Write_rows 1 373 table_id: # flags: STMT_END_F
-master-bin.000001 373 Query 1 448 use `test`; flush tables
+master-bin.000001 334 Write_rows 1 368 table_id: # flags: STMT_END_F
+master-bin.000001 368 Table_map 1 407 table_id: # (test.t1)
+master-bin.000001 407 Write_rows 1 441 table_id: # flags: STMT_END_F
+master-bin.000001 441 Query 1 516 use `test`; flush tables
SELECT * FROM t1 ORDER BY a;
a
1
diff --git a/mysql-test/r/rpl_row_mysqlbinlog.result b/mysql-test/r/rpl_row_mysqlbinlog.result
index 374f2d3ee82..c9f46e73cfd 100644
--- a/mysql-test/r/rpl_row_mysqlbinlog.result
+++ b/mysql-test/r/rpl_row_mysqlbinlog.result
@@ -154,13 +154,15 @@ c1 c3 c4 c5
--- Test 2 position test --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT);
+DELIMITER /*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -168,20 +170,22 @@ ROLLBACK /* added by mysqlbinlog */;
--- Test 3 First Remote test --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-DROP TABLE IF EXISTS t1,t2,t3;
-SET TIMESTAMP=1000000000;
-CREATE TABLE t1(word VARCHAR(20));
-SET TIMESTAMP=1000000000;
-CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY);
-SET TIMESTAMP=1000000000;
-CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT);
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+DROP TABLE IF EXISTS t1,t2,t3/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+CREATE TABLE t1(word VARCHAR(20))/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -189,6 +193,8 @@ ROLLBACK /* added by mysqlbinlog */;
--- Test 5 LOAD DATA --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
+DELIMITER /*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -196,20 +202,22 @@ ROLLBACK /* added by mysqlbinlog */;
--- Test 6 reading stdin --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-DROP TABLE IF EXISTS t1,t2,t3;
-SET TIMESTAMP=1000000000;
-CREATE TABLE t1(word VARCHAR(20));
-SET TIMESTAMP=1000000000;
-CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY);
-SET TIMESTAMP=1000000000;
-CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT);
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+DROP TABLE IF EXISTS t1,t2,t3/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+CREATE TABLE t1(word VARCHAR(20))/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+CREATE TABLE t2(id INT AUTO_INCREMENT NOT NULL PRIMARY KEY)/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
@@ -217,13 +225,15 @@ ROLLBACK /* added by mysqlbinlog */;
--- Test 7 reading stdin w/position --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-use test;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT);
+DELIMITER /*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT, c5 FLOAT)/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
diff --git a/mysql-test/r/rpl_row_tabledefs_2myisam.result b/mysql-test/r/rpl_row_tabledefs_2myisam.result
index 527274bf81d..700163fa3d1 100644
--- a/mysql-test/r/rpl_row_tabledefs_2myisam.result
+++ b/mysql-test/r/rpl_row_tabledefs_2myisam.result
@@ -46,60 +46,60 @@ INSERT INTO t1_bit VALUES (1,2);
INSERT INTO t1_bit VALUES (2,5);
INSERT INTO t1_char VALUES (1,2);
INSERT INTO t1_char VALUES (2,5);
-SELECT * FROM t1_int;
+SELECT * FROM t1_int ORDER BY a;
a b
1 2
2 5
-SELECT * FROM t1_bit;
+SELECT * FROM t1_bit ORDER BY a;
a b
1 2
2 5
-SELECT * FROM t1_char;
+SELECT * FROM t1_char ORDER BY a;
a b
1 2
2 5
**** On Slave ****
-SELECT a,b,x FROM t1_int;
+SELECT a,b,x FROM t1_int ORDER BY a;
a b x
-2 5 4711
1 2 42
-SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
+2 5 4711
+SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a;
a b HEX(x) HEX(y) HEX(z)
-2 5 5 1C 1
1 2 3 15 2
-SELECT a,b,x FROM t1_char;
+2 5 5 1C 1
+SELECT a,b,x FROM t1_char ORDER BY a;
a b x
-2 5 Foo is a bar
1 2 Just a test
+2 5 Foo is a bar
**** On Master ****
UPDATE t1_int SET b=2*b WHERE a=2;
UPDATE t1_char SET b=2*b WHERE a=2;
UPDATE t1_bit SET b=2*b WHERE a=2;
-SELECT * FROM t1_int;
+SELECT * FROM t1_int ORDER BY a;
a b
1 2
2 10
-SELECT * FROM t1_bit;
+SELECT * FROM t1_bit ORDER BY a;
a b
1 2
2 10
-SELECT * FROM t1_char;
+SELECT * FROM t1_char ORDER BY a;
a b
1 2
2 10
**** On Slave ****
-SELECT a,b,x FROM t1_int;
+SELECT a,b,x FROM t1_int ORDER BY a;
a b x
-2 10 4711
1 2 42
-SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
+2 10 4711
+SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a;
a b HEX(x) HEX(y) HEX(z)
-2 10 5 1C 1
1 2 3 15 2
-SELECT a,b,x FROM t1_char;
+2 10 5 1C 1
+SELECT a,b,x FROM t1_char ORDER BY a;
a b x
-2 10 Foo is a bar
1 2 Just a test
+2 10 Foo is a bar
INSERT INTO t9 VALUES (2);
INSERT INTO t1_nodef VALUES (1,2);
SHOW SLAVE STATUS;
@@ -327,22 +327,22 @@ Master_SSL_Key
Seconds_Behind_Master #
INSERT INTO t7 VALUES (1),(2),(3);
INSERT INTO t8 VALUES (1),(2),(3);
-SELECT * FROM t7;
+SELECT * FROM t7 ORDER BY a;
a
1
2
3
-SELECT * FROM t8;
+SELECT * FROM t8 ORDER BY a;
a
1
2
3
-SELECT * FROM t7;
+SELECT * FROM t7 ORDER BY a;
a e1 e2 e3 e4 e5 e6 e7 e8
1 NULL NULL NULL NULL NULL NULL NULL NULL
2 NULL NULL NULL NULL NULL NULL NULL NULL
3 NULL NULL NULL NULL NULL NULL NULL NULL
-SELECT * FROM t8;
+SELECT * FROM t8 ORDER BY a;
a e1 e2 e3 e4 e5 e6 e7 e8
1 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0
@@ -358,22 +358,22 @@ INSERT INTO t1_nodef VALUES (1,2,3);
INSERT INTO t1_nodef VALUES (2,4,6);
**** On Master ****
UPDATE t1_nodef SET b=2*b WHERE a=1;
-SELECT * FROM t1_nodef;
+SELECT * FROM t1_nodef ORDER BY a;
a b
1 4
2 4
**** On Slave ****
-SELECT * FROM t1_nodef;
+SELECT * FROM t1_nodef ORDER BY a;
a b x
1 4 3
2 4 6
**** On Master ****
DELETE FROM t1_nodef WHERE a=2;
-SELECT * FROM t1_nodef;
+SELECT * FROM t1_nodef ORDER BY a;
a b
1 4
**** On Slave ****
-SELECT * FROM t1_nodef;
+SELECT * FROM t1_nodef ORDER BY a;
a b x
1 4 3
**** Cleanup ****
diff --git a/mysql-test/r/rpl_row_tabledefs_3innodb.result b/mysql-test/r/rpl_row_tabledefs_3innodb.result
index df9442bfbaf..29901c51124 100644
--- a/mysql-test/r/rpl_row_tabledefs_3innodb.result
+++ b/mysql-test/r/rpl_row_tabledefs_3innodb.result
@@ -46,60 +46,60 @@ INSERT INTO t1_bit VALUES (1,2);
INSERT INTO t1_bit VALUES (2,5);
INSERT INTO t1_char VALUES (1,2);
INSERT INTO t1_char VALUES (2,5);
-SELECT * FROM t1_int;
+SELECT * FROM t1_int ORDER BY a;
a b
1 2
2 5
-SELECT * FROM t1_bit;
+SELECT * FROM t1_bit ORDER BY a;
a b
1 2
2 5
-SELECT * FROM t1_char;
+SELECT * FROM t1_char ORDER BY a;
a b
1 2
2 5
**** On Slave ****
-SELECT a,b,x FROM t1_int;
+SELECT a,b,x FROM t1_int ORDER BY a;
a b x
-2 5 4711
1 2 42
-SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
+2 5 4711
+SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a;
a b HEX(x) HEX(y) HEX(z)
-2 5 5 1C 1
1 2 3 15 2
-SELECT a,b,x FROM t1_char;
+2 5 5 1C 1
+SELECT a,b,x FROM t1_char ORDER BY a;
a b x
-2 5 Foo is a bar
1 2 Just a test
+2 5 Foo is a bar
**** On Master ****
UPDATE t1_int SET b=2*b WHERE a=2;
UPDATE t1_char SET b=2*b WHERE a=2;
UPDATE t1_bit SET b=2*b WHERE a=2;
-SELECT * FROM t1_int;
+SELECT * FROM t1_int ORDER BY a;
a b
1 2
2 10
-SELECT * FROM t1_bit;
+SELECT * FROM t1_bit ORDER BY a;
a b
1 2
2 10
-SELECT * FROM t1_char;
+SELECT * FROM t1_char ORDER BY a;
a b
1 2
2 10
**** On Slave ****
-SELECT a,b,x FROM t1_int;
+SELECT a,b,x FROM t1_int ORDER BY a;
a b x
-2 10 4711
1 2 42
-SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit;
+2 10 4711
+SELECT a,b,HEX(x),HEX(y),HEX(z) FROM t1_bit ORDER BY a;
a b HEX(x) HEX(y) HEX(z)
-2 10 5 1C 1
1 2 3 15 2
-SELECT a,b,x FROM t1_char;
+2 10 5 1C 1
+SELECT a,b,x FROM t1_char ORDER BY a;
a b x
-2 10 Foo is a bar
1 2 Just a test
+2 10 Foo is a bar
INSERT INTO t9 VALUES (2);
INSERT INTO t1_nodef VALUES (1,2);
SHOW SLAVE STATUS;
@@ -327,22 +327,22 @@ Master_SSL_Key
Seconds_Behind_Master #
INSERT INTO t7 VALUES (1),(2),(3);
INSERT INTO t8 VALUES (1),(2),(3);
-SELECT * FROM t7;
+SELECT * FROM t7 ORDER BY a;
a
1
2
3
-SELECT * FROM t8;
+SELECT * FROM t8 ORDER BY a;
a
1
2
3
-SELECT * FROM t7;
+SELECT * FROM t7 ORDER BY a;
a e1 e2 e3 e4 e5 e6 e7 e8
1 NULL NULL NULL NULL NULL NULL NULL NULL
2 NULL NULL NULL NULL NULL NULL NULL NULL
3 NULL NULL NULL NULL NULL NULL NULL NULL
-SELECT * FROM t8;
+SELECT * FROM t8 ORDER BY a;
a e1 e2 e3 e4 e5 e6 e7 e8
1 0 0 0 0 0 0 0 0
2 0 0 0 0 0 0 0 0
@@ -358,22 +358,22 @@ INSERT INTO t1_nodef VALUES (1,2,3);
INSERT INTO t1_nodef VALUES (2,4,6);
**** On Master ****
UPDATE t1_nodef SET b=2*b WHERE a=1;
-SELECT * FROM t1_nodef;
+SELECT * FROM t1_nodef ORDER BY a;
a b
1 4
2 4
**** On Slave ****
-SELECT * FROM t1_nodef;
+SELECT * FROM t1_nodef ORDER BY a;
a b x
1 4 3
2 4 6
**** On Master ****
DELETE FROM t1_nodef WHERE a=2;
-SELECT * FROM t1_nodef;
+SELECT * FROM t1_nodef ORDER BY a;
a b
1 4
**** On Slave ****
-SELECT * FROM t1_nodef;
+SELECT * FROM t1_nodef ORDER BY a;
a b x
1 4 3
**** Cleanup ****
diff --git a/mysql-test/r/rpl_sp.result b/mysql-test/r/rpl_sp.result
index 175e8b6613d..34ff77996be 100644
--- a/mysql-test/r/rpl_sp.result
+++ b/mysql-test/r/rpl_sp.result
@@ -269,6 +269,118 @@ insert into t1 values (1);
select * from t1;
a
1
+select * from t1;
+a
+1
+create procedure foo()
+not deterministic
+reads sql data
+select * from t1;
+call foo();
+a
+1
+drop procedure foo;
+drop function fn1;
+drop database mysqltest1;
+drop user "zedjzlcsjhd"@127.0.0.1;
+use test;
+use test;
+drop function if exists f1;
+create function f1() returns int reads sql data
+begin
+declare var integer;
+declare c cursor for select a from v1;
+open c;
+fetch c into var;
+close c;
+return var;
+end|
+create view v1 as select 1 as a;
+create table t1 (a int);
+insert into t1 (a) values (f1());
+select * from t1;
+a
+1
+drop view v1;
+drop function f1;
+select * from t1;
+a
+1
+DROP PROCEDURE IF EXISTS p1;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(col VARCHAR(10));
+CREATE PROCEDURE p1(arg VARCHAR(10))
+INSERT INTO t1 VALUES(arg);
+CALL p1('test');
+SELECT * FROM t1;
+col
+test
+SELECT * FROM t1;
+col
+test
+DROP PROCEDURE p1;
+
+---> Test for BUG#20438
+
+---> Preparing environment...
+---> connection: master
+DROP PROCEDURE IF EXISTS p1;
+DROP FUNCTION IF EXISTS f1;
+
+---> Synchronizing slave with master...
+
+---> connection: master
+
+---> Creating procedure...
+/*!50003 CREATE PROCEDURE p1() SET @a = 1 */;
+/*!50003 CREATE FUNCTION f1() RETURNS INT RETURN 0 */;
+
+---> Checking on master...
+SHOW CREATE PROCEDURE p1;
+Procedure sql_mode Create Procedure
+p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
+SET @a = 1
+SHOW CREATE FUNCTION f1;
+Function sql_mode Create Function
+f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
+RETURN 0
+
+---> Synchronizing slave with master...
+---> connection: master
+
+---> Checking on slave...
+SHOW CREATE PROCEDURE p1;
+Procedure sql_mode Create Procedure
+p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
+SET @a = 1
+SHOW CREATE FUNCTION f1;
+Function sql_mode Create Function
+f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
+RETURN 0
+
+---> connection: master
+
+---> Cleaning up...
+DROP PROCEDURE p1;
+DROP FUNCTION f1;
+drop table t1;
+drop database if exists mysqltest;
+drop database if exists mysqltest2;
+create database mysqltest;
+create database mysqltest2;
+use mysqltest2;
+create table t ( t integer );
+create procedure mysqltest.test() begin end;
+insert into t values ( 1 );
+create procedure `\\`.test() begin end;
+ERROR 42000: Unknown database '\\'
+create function f1 () returns int
+begin
+insert into t values (1);
+return 0;
+end|
+use mysqltest;
+set @a:= mysqltest2.f1();
show binlog events in 'master-bin.000001' from 102;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Query 1 # drop database if exists mysqltest1
@@ -329,7 +441,7 @@ insert into t1 values (x);
return x+2;
end
master-bin.000001 # Query 1 # use `mysqltest1`; delete t1,t2 from t1,t2
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `fn1`(20)
+master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20)
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t2 values(fn1(21))
master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` function fn1()
@@ -362,32 +474,23 @@ begin
insert into t2 values(x),(x);
return 10;
end
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `fn1`(100)
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `fn1`(20)
+master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(100)
+master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`fn1`(20)
master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger trg before insert on t1 for each row set new.a= 10
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (1)
master-bin.000001 # Query 1 # use `mysqltest1`; delete from t1
master-bin.000001 # Query 1 # use `mysqltest1`; drop trigger trg
master-bin.000001 # Query 1 # use `mysqltest1`; insert into t1 values (1)
-select * from t1;
-a
-1
-create procedure foo()
+master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` procedure foo()
not deterministic
reads sql data
-select * from t1;
-call foo();
-a
-1
-drop procedure foo;
-drop function fn1;
-drop database mysqltest1;
-drop user "zedjzlcsjhd"@127.0.0.1;
-use test;
-use test;
-drop function if exists f1;
-create function f1() returns int reads sql data
+select * from t1
+master-bin.000001 # Query 1 # use `mysqltest1`; drop procedure foo
+master-bin.000001 # Query 1 # use `mysqltest1`; drop function fn1
+master-bin.000001 # Query 1 # drop database mysqltest1
+master-bin.000001 # Query 1 # drop user "zedjzlcsjhd"@127.0.0.1
+master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` function f1() returns int reads sql data
begin
declare var integer;
declare c cursor for select a from v1;
@@ -395,99 +498,39 @@ open c;
fetch c into var;
close c;
return var;
-end|
-create view v1 as select 1 as a;
-create table t1 (a int);
-insert into t1 (a) values (f1());
-select * from t1;
-a
-1
-drop view v1;
-drop function f1;
-select * from t1;
-a
-1
-DROP PROCEDURE IF EXISTS p1;
-DROP TABLE IF EXISTS t1;
-CREATE TABLE t1(col VARCHAR(10));
-CREATE PROCEDURE p1(arg VARCHAR(10))
-INSERT INTO t1 VALUES(arg);
-CALL p1('test');
-SELECT * FROM t1;
-col
-test
-SELECT * FROM t1;
-col
-test
-DROP PROCEDURE p1;
-
----> Test for BUG#20438
-
----> Preparing environment...
----> connection: master
-DROP PROCEDURE IF EXISTS p1;
-DROP FUNCTION IF EXISTS f1;
-
----> Synchronizing slave with master...
-
----> connection: master
-
----> Creating procedure...
-/*!50003 CREATE PROCEDURE p1() SET @a = 1 */;
-/*!50003 CREATE FUNCTION f1() RETURNS INT RETURN 0 */;
-
----> Checking on master...
-SHOW CREATE PROCEDURE p1;
-Procedure sql_mode Create Procedure
-p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
-SET @a = 1
-SHOW CREATE FUNCTION f1;
-Function sql_mode Create Function
-f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
-RETURN 0
-
----> Synchronizing slave with master...
----> connection: master
-
----> Checking on slave...
-SHOW CREATE PROCEDURE p1;
-Procedure sql_mode Create Procedure
-p1 CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
-SET @a = 1
-SHOW CREATE FUNCTION f1;
-Function sql_mode Create Function
-f1 CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
-RETURN 0
-
----> connection: master
-
----> Cleaning up...
-DROP PROCEDURE p1;
-DROP FUNCTION f1;
-drop table t1;
+end
+master-bin.000001 # Query 1 # use `test`; CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 1 as a
+master-bin.000001 # Query 1 # use `test`; create table t1 (a int)
+master-bin.000001 # Query 1 # use `test`; insert into t1 (a) values (f1())
+master-bin.000001 # Query 1 # use `test`; drop view v1
+master-bin.000001 # Query 1 # use `test`; drop function f1
+master-bin.000001 # Query 1 # use `test`; DROP TABLE IF EXISTS t1
+master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(col VARCHAR(10))
+master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE p1(arg VARCHAR(10))
+INSERT INTO t1 VALUES(arg)
+master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES( NAME_CONST('arg',_latin1'test'))
+master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1
+master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` PROCEDURE p1() SET @a = 1
+master-bin.000001 # Query 1 # use `test`; CREATE DEFINER=`root`@`localhost` FUNCTION f1() RETURNS INT RETURN 0
+master-bin.000001 # Query 1 # use `test`; DROP PROCEDURE p1
+master-bin.000001 # Query 1 # use `test`; DROP FUNCTION f1
+master-bin.000001 # Query 1 # use `test`; drop table t1
+master-bin.000001 # Query 1 # drop database if exists mysqltest
+master-bin.000001 # Query 1 # drop database if exists mysqltest2
+master-bin.000001 # Query 1 # create database mysqltest
+master-bin.000001 # Query 1 # create database mysqltest2
+master-bin.000001 # Query 1 # use `mysqltest2`; create table t ( t integer )
+master-bin.000001 # Query 1 # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` procedure mysqltest.test() begin end
+master-bin.000001 # Query 1 # use `mysqltest2`; insert into t values ( 1 )
+master-bin.000001 # Query 1 # use `mysqltest2`; CREATE DEFINER=`root`@`localhost` function f1 () returns int
+begin
+insert into t values (1);
+return 0;
+end
+master-bin.000001 # Query 1 # use `mysqltest`; SELECT `mysqltest2`.`f1`()
set global log_bin_trust_function_creators=0;
set global log_bin_trust_function_creators=0;
-End of 5.0 tests
-reset master;
-drop database if exists mysqltest;
-drop database if exists mysqltest2;
-create database mysqltest;
-create database mysqltest2;
-use mysqltest2;
-create table t ( t integer );
-create procedure mysqltest.test() begin end;
-insert into t values ( 1 );
-show binlog events in 'master-bin.000001' from 102;
-Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 102 Query 1 203 drop database if exists mysqltest
-master-bin.000001 203 Query 1 306 drop database if exists mysqltest2
-master-bin.000001 306 Query 1 399 create database mysqltest
-master-bin.000001 399 Query 1 494 create database mysqltest2
-master-bin.000001 494 Query 1 591 use `mysqltest2`; create table t ( t integer )
-master-bin.000001 591 Query 1 730 use `mysqltest2`; CREATE DEFINER=`root`@`localhost` procedure mysqltest.test() begin end
-master-bin.000001 730 Query 1 825 use `mysqltest2`; insert into t values ( 1 )
-create procedure `\\`.test() begin end;
-ERROR 42000: Unknown database '\\'
drop database mysqltest;
drop database mysqltest2;
+End of 5.0 tests
End of 5.1 tests
diff --git a/mysql-test/r/rpl_stm_charset.result b/mysql-test/r/rpl_stm_charset.result
index 12f5b636125..f1691608bc7 100644
--- a/mysql-test/r/rpl_stm_charset.result
+++ b/mysql-test/r/rpl_stm_charset.result
@@ -174,86 +174,89 @@ CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
select hex(c1), hex(c2) from t1;
hex(c1) hex(c2)
CDF32C20E7E020F0FBE1E0EBEAF3 CDF32C20E7E020F0FBE1E0EBEAF3
+flush logs;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET TIMESTAMP=1000000000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-drop database if exists mysqltest2;
-SET TIMESTAMP=1000000000;
-drop database if exists mysqltest3;
-SET TIMESTAMP=1000000000;
-create database mysqltest2 character set latin2;
-SET TIMESTAMP=1000000000;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30;
-create database mysqltest3;
-SET TIMESTAMP=1000000000;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=64;
-drop database mysqltest3;
-SET TIMESTAMP=1000000000;
-create database mysqltest3;
-use mysqltest2;
-SET TIMESTAMP=1000000000;
-create table t1 (a int auto_increment primary key, b varchar(100));
-SET INSERT_ID=1;
-SET TIMESTAMP=1000000000;
-/*!\C cp850 */;
-SET @@session.character_set_client=4,@@session.collation_connection=27,@@session.collation_server=64;
-insert into t1 (b) values(@@character_set_server);
-SET INSERT_ID=2;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(@@collation_server);
-SET INSERT_ID=3;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(@@character_set_client);
-SET INSERT_ID=4;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(@@character_set_connection);
-SET INSERT_ID=5;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(@@collation_connection);
-SET TIMESTAMP=1000000000;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=5,@@session.collation_server=64;
-truncate table t1;
-SET INSERT_ID=1;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(@@collation_connection);
-SET INSERT_ID=2;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(LEAST("Müller","Muffler"));
-SET INSERT_ID=3;
-SET TIMESTAMP=1000000000;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=31,@@session.collation_server=64;
-insert into t1 (b) values(@@collation_connection);
-SET INSERT_ID=4;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(LEAST("Müller","Muffler"));
-SET TIMESTAMP=1000000000;
-truncate table t1;
-SET INSERT_ID=1;
-SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`;
-SET TIMESTAMP=1000000000;
-insert into t1 (b) values(collation(@a));
-SET TIMESTAMP=1000000000;
-drop database mysqltest2;
-SET TIMESTAMP=1000000000;
-drop database mysqltest3;
-use test;
-SET TIMESTAMP=1000000000;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30;
-CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255));
-SET TIMESTAMP=1000000000;
-/*!\C koi8r */;
-SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30;
-INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ');
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+drop database if exists mysqltest2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+drop database if exists mysqltest3/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+create database mysqltest2 character set latin2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30/*!*/;
+create database mysqltest3/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=64/*!*/;
+drop database mysqltest3/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+create database mysqltest3/*!*/;
+use mysqltest2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+create table t1 (a int auto_increment primary key, b varchar(100))/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+/*!\C cp850 *//*!*/;
+SET @@session.character_set_client=4,@@session.collation_connection=27,@@session.collation_server=64/*!*/;
+insert into t1 (b) values(@@character_set_server)/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(@@collation_server)/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(@@character_set_client)/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(@@character_set_connection)/*!*/;
+SET INSERT_ID=5/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(@@collation_connection)/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=5,@@session.collation_server=64/*!*/;
+truncate table t1/*!*/;
+SET INSERT_ID=1/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(@@collation_connection)/*!*/;
+SET INSERT_ID=2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(LEAST("Müller","Muffler"))/*!*/;
+SET INSERT_ID=3/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=31,@@session.collation_server=64/*!*/;
+insert into t1 (b) values(@@collation_connection)/*!*/;
+SET INSERT_ID=4/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(LEAST("Müller","Muffler"))/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+truncate table t1/*!*/;
+SET INSERT_ID=1/*!*/;
+SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+insert into t1 (b) values(collation(@a))/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+drop database mysqltest2/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+drop database mysqltest3/*!*/;
+use test/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=30/*!*/;
+CREATE TABLE t1 (c1 VARBINARY(255), c2 VARBINARY(255))/*!*/;
+SET TIMESTAMP=1000000000/*!*/;
+/*!\C koi8r *//*!*/;
+SET @@session.character_set_client=7,@@session.collation_connection=51,@@session.collation_server=30/*!*/;
+INSERT INTO t1 (c1, c2) VALUES ('îÕ, ÚÁ ÒÙÂÁÌËÕ','îÕ, ÚÁ ÒÙÂÁÌËÕ')/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
diff --git a/mysql-test/r/rpl_switch_stm_row_mixed.result b/mysql-test/r/rpl_switch_stm_row_mixed.result
index 047bfe53704..258adc83b04 100644
--- a/mysql-test/r/rpl_switch_stm_row_mixed.result
+++ b/mysql-test/r/rpl_switch_stm_row_mixed.result
@@ -559,7 +559,7 @@ begin
insert into t2 select x;
return 100;
end
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `foo6`(_latin1'foo6_1_')
+master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`foo6`(_latin1'foo6_1_')
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
@@ -620,7 +620,7 @@ master-bin.000001 # Query 1 # use `mysqltest1`; create table t12 select * from t
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int, b varchar(100), key(a))
master-bin.000001 # Intvar 1 # INSERT_ID=4
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `f`(_latin1'try_45_')
+master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`f`(_latin1'try_45_')
master-bin.000001 # Query 1 # use `mysqltest1`; create table t13 select * from t1
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100))
@@ -660,9 +660,9 @@ set y = (select count(*) from t2);
return y;
end
master-bin.000001 # Intvar 1 # INSERT_ID=4
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `f1`(_latin1'try_53_')
+master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`f1`(_latin1'try_53_')
master-bin.000001 # Intvar 1 # INSERT_ID=5
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `f2`(_latin1'try_54_')
+master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`f2`(_latin1'try_54_')
master-bin.000001 # Query 1 # use `mysqltest1`; drop function f2
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1 for each row
begin
@@ -869,7 +869,7 @@ begin
insert into t2 select x;
return 100;
end
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `foo6`(_latin1'foo6_1_')
+master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`foo6`(_latin1'foo6_1_')
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t2)
@@ -930,7 +930,7 @@ master-bin.000001 # Query 1 # use `mysqltest1`; create table t12 select * from t
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int, b varchar(100), key(a))
master-bin.000001 # Intvar 1 # INSERT_ID=4
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `f`(_latin1'try_45_')
+master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`f`(_latin1'try_45_')
master-bin.000001 # Query 1 # use `mysqltest1`; create table t13 select * from t1
master-bin.000001 # Query 1 # use `mysqltest1`; drop table t1
master-bin.000001 # Query 1 # use `mysqltest1`; create table t1 (a int primary key auto_increment, b varchar(100))
@@ -970,9 +970,9 @@ set y = (select count(*) from t2);
return y;
end
master-bin.000001 # Intvar 1 # INSERT_ID=4
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `f1`(_latin1'try_53_')
+master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`f1`(_latin1'try_53_')
master-bin.000001 # Intvar 1 # INSERT_ID=5
-master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `f2`(_latin1'try_54_')
+master-bin.000001 # Query 1 # use `mysqltest1`; SELECT `mysqltest1`.`f2`(_latin1'try_54_')
master-bin.000001 # Query 1 # use `mysqltest1`; drop function f2
master-bin.000001 # Query 1 # use `mysqltest1`; CREATE DEFINER=`root`@`localhost` trigger t1_bi before insert on t1 for each row
begin
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index 15937a4a6f5..cf84f197c8e 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -2811,6 +2811,23 @@ SELECT i='1e+01',i=1e+01, i in (1e+01,1e+01), i in ('1e+01','1e+01') FROM t1;
i='1e+01' i=1e+01 i in (1e+01,1e+01) i in ('1e+01','1e+01')
1 1 1 1
DROP TABLE t1;
+create table t1(a bigint unsigned, b bigint);
+insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff),
+(0x10000000000000000, 0x10000000000000000),
+(0x8fffffffffffffff, 0x8fffffffffffffff);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+Warning 1264 Out of range value for column 'b' at row 1
+Warning 1264 Out of range value for column 'a' at row 2
+Warning 1264 Out of range value for column 'b' at row 2
+Warning 1264 Out of range value for column 'b' at row 3
+select hex(a), hex(b) from t1;
+hex(a) hex(b)
+FFFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF
+FFFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF
+8FFFFFFFFFFFFFFF 7FFFFFFFFFFFFFFF
+drop table t1;
+End of 4.1 tests
CREATE TABLE t1 (
K2C4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '',
K4N4 varchar(4) character set latin1 collate latin1_bin NOT NULL default '0000',
@@ -3611,3 +3628,9 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 range si,ai si 5 NULL 2 Using where
1 SIMPLE t3 eq_ref PRIMARY,ci PRIMARY 4 test.t2.a 1 Using where
DROP TABLE t1,t2,t3;
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(a int);
+INSERT into t1 values (1), (2), (3);
+SELECT * FROM t1 LIMIT 2, -1;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-1' at line 1
+DROP TABLE t1;
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 71684d23b9d..c2d86ebc42d 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -5633,7 +5633,7 @@ drop function if exists pi;
create function pi() returns varchar(50)
return "pie, my favorite desert.";
Warnings:
-Note 1581 This function 'pi' has the same name as a native function.
+Note 1581 This function 'pi' has the same name as a native function
SET @save_sql_mode=@@sql_mode;
SET SQL_MODE='IGNORE_SPACE';
select pi(), pi ();
@@ -5682,15 +5682,15 @@ use test;
create function `database`() returns varchar(50)
return "Stored function database";
Warnings:
-Note 1581 This function 'database' has the same name as a native function.
+Note 1581 This function 'database' has the same name as a native function
create function `current_user`() returns varchar(50)
return "Stored function current_user";
Warnings:
-Note 1581 This function 'current_user' has the same name as a native function.
+Note 1581 This function 'current_user' has the same name as a native function
create function md5(x varchar(50)) returns varchar(50)
return "Stored function md5";
Warnings:
-Note 1581 This function 'md5' has the same name as a native function.
+Note 1581 This function 'md5' has the same name as a native function
SET SQL_MODE='IGNORE_SPACE';
select database(), database ();
database() database ()
@@ -5816,4 +5816,20 @@ DROP TABLE bug23760, bug23760_log|
DROP PROCEDURE bug23760_update_log|
DROP PROCEDURE bug23760_test_row_count|
DROP FUNCTION bug23760_rc_test|
+DROP PROCEDURE IF EXISTS bug24117|
+DROP TABLE IF EXISTS t3|
+CREATE TABLE t3(c1 ENUM('abc'))|
+INSERT INTO t3 VALUES('abc')|
+CREATE PROCEDURE bug24117()
+BEGIN
+DECLARE t3c1 ENUM('abc');
+DECLARE mycursor CURSOR FOR SELECT c1 FROM t3;
+OPEN mycursor;
+FLUSH TABLES;
+FETCH mycursor INTO t3c1;
+CLOSE mycursor;
+END|
+CALL bug24117()|
+DROP PROCEDURE bug24117|
+DROP TABLE t3|
drop table t1,t2;
diff --git a/mysql-test/r/sp_gis.result b/mysql-test/r/sp_gis.result
index f46bcc90308..fddf2a6bc18 100644
--- a/mysql-test/r/sp_gis.result
+++ b/mysql-test/r/sp_gis.result
@@ -7,11 +7,11 @@ return 1;
create function x() returns int
return 2;
Warnings:
-Note 1581 This function 'x' has the same name as a native function.
+Note 1581 This function 'x' has the same name as a native function
create function y() returns int
return 3;
Warnings:
-Note 1581 This function 'y' has the same name as a native function.
+Note 1581 This function 'y' has the same name as a native function
select a();
a()
1
diff --git a/mysql-test/r/symlink.result b/mysql-test/r/symlink.result
index efd6f8710aa..8ffe88acfa4 100644
--- a/mysql-test/r/symlink.result
+++ b/mysql-test/r/symlink.result
@@ -111,3 +111,26 @@ t1 CREATE TABLE `t1` (
`i` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+show create table t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/'
+show create table t1;
+Table Create Table
+t1 CREATE TEMPORARY TABLE `t1` (
+ `a` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1 DATA DIRECTORY='MYSQLTEST_VARDIR/log/'
+create table t1 (a int) engine=myisam select 42 a;
+select * from t1;
+a
+9
+select * from t1;
+a
+99
+select * from t1;
+a
+42
+drop table t1;
+End of 4.1 tests
+End of 5.0 tests
diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result
index cfd3854c200..e1e51f9a469 100644
--- a/mysql-test/r/type_bit.result
+++ b/mysql-test/r/type_bit.result
@@ -568,7 +568,7 @@ create table t1 (a bit(7));
insert into t1 values (0x60);
select * from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def test t1 t1 a a 16 7 1 Y 0 0 63
+def test t1 t1 a a 16 7 1 Y 32 0 63
a
`
drop table t1;
diff --git a/mysql-test/r/type_bit_innodb.result b/mysql-test/r/type_bit_innodb.result
index 8dc016d5a4a..97331408b40 100644
--- a/mysql-test/r/type_bit_innodb.result
+++ b/mysql-test/r/type_bit_innodb.result
@@ -406,7 +406,7 @@ create table t1 (a bit(7)) engine=innodb;
insert into t1 values (0x60);
select * from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
-def test t1 t1 a a 16 7 1 Y 0 0 63
+def test t1 t1 a a 16 7 1 Y 32 0 63
a
`
drop table t1;
diff --git a/mysql-test/r/udf.result b/mysql-test/r/udf.result
index 3e2cceddbe5..dbbe432e614 100644
--- a/mysql-test/r/udf.result
+++ b/mysql-test/r/udf.result
@@ -209,7 +209,7 @@ select abs(myfunc_double(3) AS wrong);
ERROR 42000: Incorrect parameters in the call to native function 'abs'
drop function if exists pi;
CREATE FUNCTION pi RETURNS STRING SONAME "should_not_parse.so";
-ERROR HY000: This function 'pi' has the same name as a native function.
+ERROR HY000: This function 'pi' has the same name as a native function
DROP FUNCTION IF EXISTS metaphon;
CREATE FUNCTION metaphon(a int) RETURNS int
return 0;
diff --git a/mysql-test/r/user_var-binlog.result b/mysql-test/r/user_var-binlog.result
index 8813d2b499f..1c50289a85d 100644
--- a/mysql-test/r/user_var-binlog.result
+++ b/mysql-test/r/user_var-binlog.result
@@ -13,21 +13,24 @@ master-bin.000001 # Query 1 # use `test`; INSERT INTO t1 VALUES(@`a b`)
master-bin.000001 # User var 1 # @`var1`=_latin1 0x273B616161 COLLATE latin1_swedish_ci
master-bin.000001 # User var 1 # @`var2`=_binary 0x61 COLLATE binary
master-bin.000001 # Query 1 # use `test`; insert into t1 values (@var1),(@var2)
+flush logs;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
-ROLLBACK;
-SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`;
-use test;
-SET TIMESTAMP=10000;
-SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
-SET @@session.sql_mode=0;
-/*!\C latin1 */;
-SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
-INSERT INTO t1 VALUES(@`a b`);
-SET @`var1`:=_latin1 0x273B616161 COLLATE `latin1_swedish_ci`;
-SET @`var2`:=_binary 0x61 COLLATE `binary`;
-SET TIMESTAMP=10000;
-insert into t1 values (@var1),(@var2);
+DELIMITER /*!*/;
+ROLLBACK/*!*/;
+SET @`a b`:=_latin1 0x68656C6C6F COLLATE `latin1_swedish_ci`/*!*/;
+use test/*!*/;
+SET TIMESTAMP=10000/*!*/;
+SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
+SET @@session.sql_mode=0/*!*/;
+/*!\C latin1 *//*!*/;
+SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
+INSERT INTO t1 VALUES(@`a b`)/*!*/;
+SET @`var1`:=_latin1 0x273B616161 COLLATE `latin1_swedish_ci`/*!*/;
+SET @`var2`:=_binary 0x61 COLLATE `binary`/*!*/;
+SET TIMESTAMP=10000/*!*/;
+insert into t1 values (@var1),(@var2)/*!*/;
+DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index f759e78adbf..ec4c7c9b2aa 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -697,6 +697,63 @@ set names latin1;
select @@have_innodb;
@@have_innodb
#
+*** Various tests with LC_TIME_NAMES
+*** LC_TIME_NAMES: testing case insensitivity
+set @@lc_time_names='ru_ru';
+select @@lc_time_names;
+@@lc_time_names
+ru_RU
+*** LC_TIME_NAMES: testing with a user variable
+set @lc='JA_JP';
+set @@lc_time_names=@lc;
+select @@lc_time_names;
+@@lc_time_names
+ja_JP
+*** LC_TIME_NAMES: testing with string expressions
+set lc_time_names=concat('de','_','DE');
+select @@lc_time_names;
+@@lc_time_names
+de_DE
+set lc_time_names=concat('de','+','DE');
+ERROR HY000: Unknown locale: 'de+DE'
+select @@lc_time_names;
+@@lc_time_names
+de_DE
+LC_TIME_NAMES: testing with numeric expressions
+set @@lc_time_names=1+2;
+select @@lc_time_names;
+@@lc_time_names
+sv_SE
+set @@lc_time_names=1/0;
+ERROR 42000: Incorrect argument type to variable 'lc_time_names'
+select @@lc_time_names;
+@@lc_time_names
+sv_SE
+set lc_time_names=en_US;
+LC_TIME_NAMES: testing NULL and a negative number:
+set lc_time_names=NULL;
+ERROR 42000: Variable 'lc_time_names' can't be set to the value of 'NULL'
+set lc_time_names=-1;
+ERROR HY000: Unknown locale: '-1'
+select @@lc_time_names;
+@@lc_time_names
+en_US
+LC_TIME_NAMES: testing locale with the last ID:
+set lc_time_names=108;
+select @@lc_time_names;
+@@lc_time_names
+zh_HK
+LC_TIME_NAMES: testing a number beyond the valid ID range:
+set lc_time_names=109;
+ERROR HY000: Unknown locale: '109'
+select @@lc_time_names;
+@@lc_time_names
+zh_HK
+LC_TIME_NAMES: testing that 0 is en_US:
+set lc_time_names=0;
+select @@lc_time_names;
+@@lc_time_names
+en_US
set @test = @@query_prealloc_size;
set @@query_prealloc_size = @test;
select @@query_prealloc_size = @test;
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 4fbe0176c57..b338ba12685 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -2675,9 +2675,9 @@ lName varchar(25) NOT NULL,
DOB date NOT NULL,
uID int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1(fName, lName, DOB) VALUES
-('Hank', 'Hill', '1964-09-29'),
-('Tom', 'Adams', '1908-02-14'),
-('Homer', 'Simpson', '1968-03-05');
+('Alice', 'Hill', date_sub(curdate(), interval 15271 day)),
+('Bob', 'Adams', date_sub(curdate(), interval 33600 day)),
+('Carol', 'Simpson', date_sub(curdate(), interval 13700 day));
CREATE VIEW v1 AS
SELECT (year(now())-year(DOB)) AS Age
FROM t1 HAVING Age < 75;
@@ -2686,12 +2686,12 @@ View Create View
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select (year(now()) - year(`t1`.`DOB`)) AS `Age` from `t1` having (`Age` < 75)
SELECT (year(now())-year(DOB)) AS Age FROM t1 HAVING Age < 75;
Age
-43
-39
+42
+38
SELECT * FROM v1;
Age
-43
-39
+42
+38
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (id int NOT NULL PRIMARY KEY, a char(6) DEFAULT 'xxx');
@@ -3014,6 +3014,15 @@ i j
6 3
DROP VIEW v1, v2;
DROP TABLE t1;
+DROP VIEW IF EXISTS v1;
+CREATE VIEW v1 AS SELECT 'The\ZEnd';
+SELECT * FROM v1;
+TheEnd
+TheEnd
+SHOW CREATE VIEW v1;
+View Create View
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select _latin1'The\ZEnd' AS `TheEnd`
+DROP VIEW v1;
End of 5.0 tests.
DROP DATABASE IF EXISTS `d-1`;
CREATE DATABASE `d-1`;
diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result
index 93c83c57c45..01b1c77887f 100644
--- a/mysql-test/r/warnings.result
+++ b/mysql-test/r/warnings.result
@@ -166,13 +166,6 @@ show variables like 'max_error_count';
Variable_name Value
max_error_count 10
drop table t1;
-create table t1 (id int) engine=Innodb;
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't1'
-alter table t1 engine=Innodb;
-Warnings:
-Warning 1266 Using storage engine MyISAM for table 't1'
-drop table t1;
set table_type=MYISAM;
Warnings:
Warning 1543 The syntax 'table_type' is deprecated and will be removed in MySQL 5.2. Please use 'storage_engine' instead
diff --git a/mysql-test/r/warnings_engine_disabled.result b/mysql-test/r/warnings_engine_disabled.result
new file mode 100644
index 00000000000..aa6170a60a7
--- /dev/null
+++ b/mysql-test/r/warnings_engine_disabled.result
@@ -0,0 +1,7 @@
+create table t1 (id int) engine=NDB;
+Warnings:
+Warning 1266 Using storage engine MyISAM for table 't1'
+alter table t1 engine=NDB;
+Warnings:
+Warning 1266 Using storage engine MyISAM for table 't1'
+drop table t1;
diff --git a/mysql-test/r/windows.result b/mysql-test/r/windows.result
index e8c3c81a44e..7472b724f47 100644
--- a/mysql-test/r/windows.result
+++ b/mysql-test/r/windows.result
@@ -6,6 +6,12 @@ use prn;
ERROR 42000: Unknown database 'prn'
create table nu (a int);
drop table nu;
+drop table if exists t1;
+CREATE TABLE t1 ( `ID` int(6) ) data directory 'c:/tmp/' index directory 'c:/tmp/' engine=MyISAM;
+Warnings:
+Warning 0 DATA DIRECTORY option ignored
+Warning 0 INDEX DIRECTORY option ignored
+drop table t1;
create procedure proc_1() install plugin my_plug soname '\\root\\some_plugin.dll';
call proc_1();
ERROR HY000: No paths allowed for shared library
diff --git a/mysql-test/t/archive.test b/mysql-test/t/archive.test
index 7eaf12de358..37542c272a9 100644
--- a/mysql-test/t/archive.test
+++ b/mysql-test/t/archive.test
@@ -1347,11 +1347,14 @@ CHECK TABLE t2;
SELECT * FROM t2;
-# We won't know exactly about what is going on internally,
-# but we will see if the row makes it in!!
+# Test INSERT DELAYED and wait until the table has one more record
+SELECT COUNT(auto) FROM t2;
INSERT DELAYED INTO t2 VALUES (4,011403,37,'intercepted','audiology','tinily','');
-FLUSH TABLE t2;
-SELECT * FROM t2;
+while (`SELECT COUNT(auto)!=1214 FROM t2`)
+{
+ sleep 0.1;
+}
+SELECT COUNT(auto) FROM t2;
# Adding test for alter table
ALTER TABLE t2 DROP COLUMN fld6;
diff --git a/mysql-test/t/binlog_row_mix_innodb_myisam.test b/mysql-test/t/binlog_row_mix_innodb_myisam.test
index e04d53a2209..b131e5350af 100644
--- a/mysql-test/t/binlog_row_mix_innodb_myisam.test
+++ b/mysql-test/t/binlog_row_mix_innodb_myisam.test
@@ -19,6 +19,7 @@
# we check that the error code of the "ROLLBACK" event is 0 and not
# ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction
# and does not make slave to stop)
+flush logs;
--exec $MYSQL_BINLOG --start-position=516 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval select
@@ -26,6 +27,6 @@ eval select
is not null;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval select
-@a like "%#%error_code=0%ROLLBACK;%ROLLBACK /* added by mysqlbinlog */;%",
+@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%",
@a not like "%#%error_code=%error_code=%";
drop table t1, t2;
diff --git a/mysql-test/t/binlog_stm_mix_innodb_myisam.test b/mysql-test/t/binlog_stm_mix_innodb_myisam.test
index cb6516a3a2f..8d7399b918e 100644
--- a/mysql-test/t/binlog_stm_mix_innodb_myisam.test
+++ b/mysql-test/t/binlog_stm_mix_innodb_myisam.test
@@ -11,6 +11,7 @@
# we check that the error code of the "ROLLBACK" event is 0 and not
# ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction
# and does not make slave to stop)
+flush logs;
--exec $MYSQL_BINLOG --start-position=551 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval select
@@ -18,6 +19,6 @@ eval select
is not null;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
eval select
-@a like "%#%error_code=0%ROLLBACK;%ROLLBACK /* added by mysqlbinlog */;%",
+@a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%",
@a not like "%#%error_code=%error_code=%";
drop table t1, t2;
diff --git a/mysql-test/t/ctype_hebrew.test b/mysql-test/t/ctype_hebrew.test
new file mode 100644
index 00000000000..f786d05141d
--- /dev/null
+++ b/mysql-test/t/ctype_hebrew.test
@@ -0,0 +1,16 @@
+#
+# BUG #24037: Lossy Hebrew to Unicode conversion
+#
+# Test if LRM and RLM characters are correctly converted to UTF-8
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+SET NAMES hebrew;
+CREATE TABLE t1 (a char(1)) DEFAULT CHARSET=hebrew;
+INSERT INTO t1 VALUES (0xFD),(0xFE);
+ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
+SELECT HEX(a) FROM t1;
+DROP TABLE t1;
+
+--echo End of 4.1 tests
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index 804b17ab6bb..3a62ed1f7cd 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -94,6 +94,26 @@ select * from t1;
drop table t1;
#
+# Bug#22646 LC_TIME_NAMES: Assignment to non-UTF8 target fails
+#
+set names utf8;
+set LC_TIME_NAMES='fr_FR';
+create table t1 (s1 char(20) character set latin1);
+insert into t1 values (date_format('2004-02-02','%M'));
+select hex(s1) from t1;
+drop table t1;
+create table t1 (s1 char(20) character set koi8r);
+set LC_TIME_NAMES='ru_RU';
+insert into t1 values (date_format('2004-02-02','%M'));
+insert into t1 values (date_format('2004-02-02','%b'));
+insert into t1 values (date_format('2004-02-02','%W'));
+insert into t1 values (date_format('2004-02-02','%a'));
+select hex(s1), s1 from t1;
+drop table t1;
+set LC_TIME_NAMES='en_US';
+
+
+#
# Bug #2366 Wrong utf8 behaviour when data is truncated
#
set names koi8r;
diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
index ce7bb345aad..8c2c4740f5e 100644
--- a/mysql-test/t/disabled.def
+++ b/mysql-test/t/disabled.def
@@ -38,4 +38,5 @@ synchronization : Bug#24529 Test 'synchronization' fails on Mac pushb
flush2 : Bug#24805 Pushbuild can't handle test with --disable-log-bin
mysql_upgrade : Bug#25074 mysql_upgrade gives inconsisten results
+plugin : Bug#25659 memory leak via "plugins" test
diff --git a/mysql-test/t/events_logs_tests.test b/mysql-test/t/events_logs_tests.test
index aee16595ef9..e45fea1dfad 100644
--- a/mysql-test/t/events_logs_tests.test
+++ b/mysql-test/t/events_logs_tests.test
@@ -72,17 +72,20 @@ SET SESSION long_query_time=1;
SELECT * FROM slow_event_test;
SET SESSION long_query_time=1;
SET GLOBAL event_scheduler=on;
+SET GLOBAL long_query_time=20;
CREATE EVENT long_event ON SCHEDULE EVERY 1 MINUTE DO INSERT INTO slow_event_test SELECT @@long_query_time, SLEEP(1.5);
--echo "Sleep some more time than the actual event run will take"
--sleep 2
SHOW VARIABLES LIKE 'event_scheduler';
--echo "Check our table. Should see 1 row"
SELECT * FROM slow_event_test;
---echo "Check slow log. Should not see anything because 1.5 is under the threshold of 300 for GLOBAL, though over SESSION which is 2"
+--echo "Check slow log. Should not see anything because 1.5 is under the threshold of 20 for GLOBAL, though over SESSION which is 1"
+--echo "This should show that the GLOBAL value is regarded and not the SESSION one of the current connection"
SELECT user_host, query_time, db, sql_text FROM mysql.slow_log;
+--echo "Another test to show that GLOBAL is regarded and not SESSION."
--echo "This should go to the slow log"
-DROP EVENT long_event;
SET SESSION long_query_time=10;
+DROP EVENT long_event;
SET GLOBAL long_query_time=1;
CREATE EVENT long_event2 ON SCHEDULE EVERY 1 MINUTE DO INSERT INTO slow_event_test SELECT @@long_query_time, SLEEP(2);
--echo "Sleep some more time than the actual event run will take"
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test
index dae697810e7..cae3d91071a 100644
--- a/mysql-test/t/func_group.test
+++ b/mysql-test/t/func_group.test
@@ -709,6 +709,97 @@ create table t1 select stddev(0);
show create table t1;
drop table t1;
+
+#
+# Bug#22555: STDDEV yields positive result for groups with only one row
+#
+
+create table bug22555 (i smallint primary key auto_increment, s1 smallint, s2 smallint, e decimal(30,10), o double);
+insert into bug22555 (s1, s2, e, o) values (53, 78, 11.4276528, 6.828112), (17, 78, 5.916793, 1.8502951), (18, 76, 2.679231, 9.17975591), (31, 62, 6.07831, 0.1), (19, 41, 5.37463, 15.1), (83, 73, 14.567426, 7.959222), (92, 53, 6.10151, 13.1856852), (7, 12, 13.92272, 3.442007), (92, 35, 11.95358909, 6.01376678), (38, 84, 2.572, 7.904571);
+select std(s1/s2) from bug22555 group by i;
+select std(e) from bug22555 group by i;
+select std(o) from bug22555 group by i;
+drop table bug22555;
+
+create table bug22555 (i smallint, s1 smallint, s2 smallint, o1 double, o2 double, e1 decimal, e2 decimal);
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+select i, count(*) from bug22555 group by i;
+select std(s1/s2) from bug22555 where i=1;
+select std(s1/s2) from bug22555 where i=2;
+select std(s1/s2) from bug22555 where i=3;
+select std(s1/s2) from bug22555 where i=1 group by i;
+select std(s1/s2) from bug22555 where i=2 group by i;
+select std(s1/s2) from bug22555 where i=3 group by i;
+select std(s1/s2) from bug22555 group by i order by i;
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+set @saved_div_precision_increment=@@div_precision_increment;
+set div_precision_increment=19;
+select i, count(*), variance(s1/s2) from bug22555 group by i order by i;
+select i, count(*), variance(o1/o2) from bug22555 group by i order by i;
+select i, count(*), variance(e1/e2) from bug22555 group by i order by i;
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+set div_precision_increment=20;
+select i, count(*), variance(s1/s2) from bug22555 group by i order by i;
+select i, count(*), variance(o1/o2) from bug22555 group by i order by i;
+select i, count(*), variance(e1/e2) from bug22555 group by i order by i;
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+set @@div_precision_increment=@saved_div_precision_increment;
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,18,76,18,76,18,76);
+
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+select std(s1/s2) from bug22555;
+select std(o1/o2) from bug22555;
+select std(e1/e2) from bug22555;
+set @saved_div_precision_increment=@@div_precision_increment;
+set div_precision_increment=19;
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+select round(std(s1/s2), 17) from bug22555;
+select std(o1/o2) from bug22555;
+select round(std(e1/e2), 17) from bug22555;
+set div_precision_increment=20;
+select i, count(*), std(s1/s2) from bug22555 group by i order by i;
+select i, count(*), std(o1/o2) from bug22555 group by i order by i;
+select i, count(*), std(e1/e2) from bug22555 group by i order by i;
+select round(std(s1/s2), 17) from bug22555;
+select std(o1/o2) from bug22555;
+select round(std(e1/e2), 17) from bug22555;
+set @@div_precision_increment=@saved_div_precision_increment;
+drop table bug22555;
+
+create table bug22555 (s smallint, o double, e decimal);
+insert into bug22555 values (1,1,1),(2,2,2),(3,3,3),(6,6,6),(7,7,7);
+select var_samp(s), var_pop(s) from bug22555;
+select var_samp(o), var_pop(o) from bug22555;
+select var_samp(e), var_pop(e) from bug22555;
+drop table bug22555;
+
+create table bug22555 (s smallint, o double, e decimal);
+insert into bug22555 values (null,null,null),(null,null,null);
+select var_samp(s) as 'null', var_pop(s) as 'null' from bug22555;
+select var_samp(o) as 'null', var_pop(o) as 'null' from bug22555;
+select var_samp(e) as 'null', var_pop(e) as 'null' from bug22555;
+insert into bug22555 values (1,1,1);
+select var_samp(s) as 'null', var_pop(s) as '0' from bug22555;
+select var_samp(o) as 'null', var_pop(o) as '0' from bug22555;
+select var_samp(e) as 'null', var_pop(e) as '0' from bug22555;
+insert into bug22555 values (2,2,2);
+select var_samp(s) as '0.5', var_pop(s) as '0.25' from bug22555;
+select var_samp(o) as '0.5', var_pop(o) as '0.25' from bug22555;
+select var_samp(e) as '0.5', var_pop(e) as '0.25' from bug22555;
+drop table bug22555;
+
+
#
# Bug #23184: SELECT causes server crash
#
@@ -733,4 +824,5 @@ SELECT a,AVG(DISTINCT b) AS average FROM t1 GROUP BY a HAVING average > 50;
DROP TABLE t1;
+###
--echo End of 5.0 tests
diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test
index ee344d0958b..75d85065419 100644
--- a/mysql-test/t/func_in.test
+++ b/mysql-test/t/func_in.test
@@ -252,6 +252,13 @@ insert into t1 values (1),(2);
select some_id from t1 where some_id not in(2,-1);
select some_id from t1 where some_id not in(-4,-1,-4);
select some_id from t1 where some_id not in(-4,-1,3423534,2342342);
+
+#
+# BUG#24261: crash when WHERE contains NOT IN ('<negative value>') for unsigned column type
+#
+
+select some_id from t1 where some_id not in('-1', '0');
+
drop table t1;
diff --git a/mysql-test/t/information_schema_chmod.test b/mysql-test/t/information_schema_chmod.test
index c7ea2b03890..38586ab8b67 100644
--- a/mysql-test/t/information_schema_chmod.test
+++ b/mysql-test/t/information_schema_chmod.test
@@ -17,7 +17,7 @@
#
create database mysqltest;
create table mysqltest.t1(a int);
---exec chmod -r $MYSQLTEST_VARDIR/master-data/mysqltest
+chmod 0000 $MYSQLTEST_VARDIR/master-data/mysqltest;
select table_schema from information_schema.tables where table_schema='mysqltest';
---exec chmod +r $MYSQLTEST_VARDIR/master-data/mysqltest
+exec chmod 0777 $MYSQLTEST_VARDIR/master-data/mysqltest;
drop database mysqltest;
diff --git a/mysql-test/t/kill.test b/mysql-test/t/kill.test
index 53a88df7bd9..cf0895f63c4 100644
--- a/mysql-test/t/kill.test
+++ b/mysql-test/t/kill.test
@@ -76,11 +76,14 @@ insert into t2 select id from t1;
create table t3 (kill_id int);
insert into t3 values(connection_id());
+connect (conn2, localhost, root,,);
+connection conn2;
+
+connection conn1;
-- disable_result_log
send select id from t1 where id in (select distinct id from t2);
-- enable_result_log
-connect (conn2, localhost, root,,);
connection conn2;
select ((@id := kill_id) - kill_id) from t3;
-- sleep 1
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index 2bb1984c91c..0898f7d9896 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -846,6 +846,10 @@ DROP TABLE t1;
#
SET @@myisam_repair_threads=1;
SHOW VARIABLES LIKE 'myisam_repair%';
+
+--echo End of 4.1 tests
+
+
# Test varchar
#
@@ -942,42 +946,7 @@ alter table t1 enable keys;
show keys from t1;
drop table t1;
-#
-# Bug#8706 - temporary table with data directory option fails
-#
-connect (session1,localhost,root,,);
-connect (session2,localhost,root,,);
-connection session1;
-disable_query_log;
-eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp" select 9 a;
-enable_query_log;
-disable_result_log;
-show create table t1;
-enable_result_log;
-
-connection session2;
-disable_query_log;
-eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/tmp" select 99 a;
-enable_query_log;
-disable_result_log;
-show create table t1;
-enable_result_log;
-
-connection default;
-create table t1 (a int) engine=myisam select 42 a;
-
-connection session1;
-select * from t1;
-disconnect session1;
-connection session2;
-select * from t1;
-disconnect session2;
-connection default;
-select * from t1;
-drop table t1;
-
---echo End of 4.1 tests
#
# Bug#10056 - PACK_KEYS option take values greater than 1 while creating table
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test
index c9fec6deb35..c0f33ef9204 100644
--- a/mysql-test/t/mysql.test
+++ b/mysql-test/t/mysql.test
@@ -145,21 +145,24 @@ drop table t1;
#
# Bug #19216: Client crashes on long SELECT
#
---exec echo "select" > $MYSQLTEST_VARDIR/tmp/b19216.tmp
-# 3400 * 20 makes 68000 columns that is more than the max number that can fit
-# in a 16 bit number.
-let $i= 3400;
-while ($i)
-{
- --exec echo "'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a'," >> $MYSQLTEST_VARDIR/tmp/b19216.tmp
- dec $i;
-}
-
---exec echo "'b';" >> $MYSQLTEST_VARDIR/tmp/b19216.tmp
+# Create large SELECT
+# - 3400 * 20 makes 68000 columns that is more than the
+# max number that can fit in a 16 bit number.
+
+--perl
+open(FILE,">","$ENV{'MYSQLTEST_VARDIR'}/tmp/b19216.tmp") or die;
+print FILE "select\n";
+print FILE "'a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a','a',\n" x 3400;
+print FILE "'b';\n";
+close FILE;
+EOF
+
--disable_query_log
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/b19216.tmp >/dev/null
--enable_query_log
+--remove_file $MYSQLTEST_VARDIR/tmp/b19216.tmp
+
#
# Bug #20103: Escaping with backslash does not work
#
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index 8e2035f45b0..ad6a16810c5 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -133,10 +133,63 @@ flush logs;
# resulted binlog, parly consisting of multi-byte utf8 chars,
# must be digestable for both client and server. In 4.1 the client
# should use default-character-set same as the server.
+flush logs;
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000006 | $MYSQL
select * from t5 /* must be (1),(1) */;
+#
+# Bug#22645 LC_TIME_NAMES: Statement not replicated
+# Check that a dump created by mysqlbinlog reproduces
+# lc_time_names dependent values correctly
+#
+flush logs;
+drop table if exists t5;
+create table t5 (c1 int, c2 varchar(128) character set latin1 not null);
+insert into t5 values (1, date_format('2001-01-01','%W'));
+set lc_time_names=de_DE;
+insert into t5 values (2, date_format('2001-01-01','%W'));
+set lc_time_names=en_US;
+insert into t5 values (3, date_format('2001-01-01','%W'));
+select * from t5 order by c1;
+flush logs;
+drop table t5;
+--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000008 | $MYSQL
+select * from t5 order by c1;
+#
+# Bug#20396 Bin Log does not get DELIMETER cmd - Recover StoredProc fails
+#
+--disable_warnings
+drop procedure if exists p1;
+--enable_warnings
+flush logs;
+delimiter //;
+create procedure p1()
+begin
+select 1;
+end;
+//
+delimiter ;//
+flush logs;
+call p1();
+drop procedure p1;
+--error 1305
+call p1();
+--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000010
+--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000010 | $MYSQL
+call p1();
+drop procedure p1;
+
# clean up
drop table t1, t2, t03, t04, t3, t4, t5;
# End of 5.0 tests
+
+#
+# Test --disable-force-if-open and --force-if-open
+#
+flush logs;
+--error 1
+--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000012 >/dev/null 2>/dev/null
+--exec $MYSQL_BINLOG --force-if-open $MYSQLTEST_VARDIR/log/master-bin.000012 >/dev/null 2>/dev/null
+
+# End of 5.1 tests
diff --git a/mysql-test/t/mysqlbinlog2.test b/mysql-test/t/mysqlbinlog2.test
index 69cd5d90453..85a678055d4 100644
--- a/mysql-test/t/mysqlbinlog2.test
+++ b/mysql-test/t/mysqlbinlog2.test
@@ -72,6 +72,7 @@ select "--- Local with 2 binlogs on command line --" as "";
# This is to verify that some options apply only to first, or last binlog
+flush logs;
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000001 $MYSQLTEST_VARDIR/log/master-bin.000002
--disable_query_log
diff --git a/mysql-test/t/mysqlbinlog_base64.test b/mysql-test/t/mysqlbinlog_base64.test
index 66aaff83254..1ca018218b2 100644
--- a/mysql-test/t/mysqlbinlog_base64.test
+++ b/mysql-test/t/mysqlbinlog_base64.test
@@ -15,6 +15,7 @@ load data infile '../std_data_ln/words.dat' into table t2;
#
# Save binlog
#
+flush logs;
--exec $MYSQL_BINLOG --hexdump $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_base64.sql
#
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index b7ff8bbdfdb..d841312392d 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -713,6 +713,25 @@ create table t1 (a int);
--exec $MYSQL_DUMP --skip-comments --force test t1 --where='xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 2>&1
drop table t1;
+--echo #
+--echo # BUG#13926: --order-by-primary fails if PKEY contains quote character
+--echo #
+
+--disable_warnings
+DROP TABLE IF EXISTS `t1`;
+CREATE TABLE `t1` (
+ `a b` INT,
+ `c"d` INT,
+ `e``f` INT,
+ PRIMARY KEY (`a b`, `c"d`, `e``f`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+insert into t1 values (0815, 4711, 2006);
+
+--exec $MYSQL_DUMP --skip-comments --compatible=ansi --order-by-primary test t1
+--exec $MYSQL_DUMP --skip-comments --order-by-primary test t1
+DROP TABLE `t1`;
+--enable_warnings
+
--echo End of 4.1 tests
--echo #
@@ -1394,28 +1413,6 @@ revoke all privileges on mysqldump_myDB.* from myDB_User@localhost;
drop user myDB_User@localhost;
drop database mysqldump_myDB;
use test;
-connection default;
-disconnect root;
-disconnect user1;
-
---echo #
---echo # BUG#13926: --order-by-primary fails if PKEY contains quote character
---echo #
-
---disable_warnings
-DROP TABLE IF EXISTS `t1`;
-CREATE TABLE `t1` (
- `a b` INT,
- `c"d` INT,
- `e``f` INT,
- PRIMARY KEY (`a b`, `c"d`, `e``f`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-insert into t1 values (0815, 4711, 2006);
-
---exec $MYSQL_DUMP --skip-comments --compatible=ansi --order-by-primary test t1
---exec $MYSQL_DUMP --skip-comments --order-by-primary test t1
-DROP TABLE `t1`;
---enable_warnings
--echo #
--echo # Bug #19745: mysqldump --xml produces invalid xml
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index c06d51d9d49..7da84543e6d 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -1,6 +1,9 @@
# This test should work in embedded server after mysqltest is fixed
-- source include/not_embedded.inc
+# This test uses chmod, can't be run with root permissions
+-- source include/not_as_root.inc
+
# ============================================================================
#
# Test of mysqltest itself
diff --git a/mysql-test/t/ndb_binlog_ignore_db.test b/mysql-test/t/ndb_binlog_ignore_db.test
index a4090bbb62b..a99dfd940ad 100644
--- a/mysql-test/t/ndb_binlog_ignore_db.test
+++ b/mysql-test/t/ndb_binlog_ignore_db.test
@@ -1,5 +1,6 @@
-- source include/have_ndb.inc
-- source include/have_binlog_format_row.inc
+reset master;
--disable_warnings
drop table if exists t1;
diff --git a/mysql-test/t/ndb_lock.test b/mysql-test/t/ndb_lock.test
index 474155e06f4..b036522ad15 100644
--- a/mysql-test/t/ndb_lock.test
+++ b/mysql-test/t/ndb_lock.test
@@ -102,16 +102,36 @@ connection con1;
commit;
# table scan
+#
+# Note that there are two distinct execution paths in which we unlock
+# non-matching rows inspected during table scan - one that is used in
+# case of filesort and one that used in rest of cases. Below we cover
+# the latter (Bug #20390 "SELECT FOR UPDATE does not release locks of
+# untouched rows in full table scans").
connection con1;
begin;
-select * from t1 where y = 'one' or y = 'three' order by x for update;
+# We can't use "order by x" here as it will cause filesort
+--replace_column 1 # 2 # 3 #
+select * from t1 where y = 'one' or y = 'three' for update;
connection con2;
begin;
# Have to check with pk access here since scans take locks on
# all rows and then release them in chunks
-# Bug #20390 SELECT FOR UPDATE does not release locks of untouched rows in full table scans
-#select * from t1 where x = 2 for update;
+select * from t1 where x = 2 for update;
+--error 1205
+select * from t1 where x = 1 for update;
+rollback;
+
+connection con1;
+commit;
+
+# And now the test for case with filesort
+begin;
+select * from t1 where y = 'one' or y = 'three' order by x for update;
+connection con2;
+begin;
+select * from t1 where x = 2 for update;
--error 1205
select * from t1 where x = 1 for update;
rollback;
@@ -157,15 +177,32 @@ commit;
# table scan
connection con1;
begin;
-select * from t1 where y = 'one' or y = 'three' order by x lock in share mode;
+# We can't use "order by x" here as it will cause filesort
+--replace_column 1 # 2 # 3 #
+select * from t1 where y = 'one' or y = 'three' lock in share mode;
connection con2;
begin;
select * from t1 where y = 'one' lock in share mode;
# Have to check with pk access here since scans take locks on
# all rows and then release them in chunks
-# Bug #20390 SELECT FOR UPDATE does not release locks of untouched rows in full table scans
-#select * from t1 where x = 2 for update;
+select * from t1 where x = 2 for update;
+--error 1205
+select * from t1 where x = 1 for update;
+rollback;
+
+connection con1;
+commit;
+
+# And the same test for case with filesort
+connection con1;
+begin;
+select * from t1 where y = 'one' or y = 'three' order by x lock in share mode;
+
+connection con2;
+begin;
+select * from t1 where y = 'one' lock in share mode;
+select * from t1 where x = 2 for update;
--error 1205
select * from t1 where x = 1 for update;
rollback;
diff --git a/mysql-test/t/ndb_types.test b/mysql-test/t/ndb_types.test
index 10b8eb87e2c..ab18817132e 100644
--- a/mysql-test/t/ndb_types.test
+++ b/mysql-test/t/ndb_types.test
@@ -1,5 +1,5 @@
--- source include/have_ndb.inc
--- source include/not_embedded.inc
+--source include/have_ndb.inc
+--source include/not_embedded.inc
--disable_warnings
DROP TABLE IF EXISTS t1;
@@ -50,7 +50,7 @@ CREATE TABLE t1 (
);
set @now = now();
-sleep 1;
+--sleep 1.5
insert into t1
(string,vstring,bin,vbin,tiny,short,medium,long_int,longlong,
real_float,real_double, real_decimal,utiny, ushort, umedium,ulong,ulonglong,
@@ -66,7 +66,7 @@ from t1;
select time_stamp>@now from t1;
set @now = now();
-sleep 1;
+--sleep 1.5
update t1 set string="bbbb",vstring="bbbb",bin=0xBBBB,vbin=0xBBBB,
tiny=-2,short=-2,medium=-2,long_int=-2,longlong=-2,real_float=2.2,
real_double=2.2,real_decimal=2.2,utiny=2,ushort=2,umedium=2,ulong=2,
@@ -82,4 +82,4 @@ select time_stamp>@now from t1;
drop table t1;
-# End of 4.1 tests
+--echo End of 4.1 tests
diff --git a/mysql-test/t/plugin.test b/mysql-test/t/plugin.test
new file mode 100644
index 00000000000..80c1de00b8e
--- /dev/null
+++ b/mysql-test/t/plugin.test
@@ -0,0 +1,26 @@
+--source include/have_example_plugin.inc
+
+CREATE TABLE t1(a int) ENGINE=EXAMPLE;
+DROP TABLE t1;
+
+INSTALL PLUGIN example SONAME 'ha_example.so';
+--error 1125
+INSTALL PLUGIN EXAMPLE SONAME 'ha_example.so';
+
+UNINSTALL PLUGIN example;
+
+INSTALL PLUGIN example SONAME 'ha_example.so';
+
+CREATE TABLE t1(a int) ENGINE=EXAMPLE;
+
+# Let's do some advanced ops with the example engine :)
+SELECT * FROM t1;
+
+DROP TABLE t1;
+
+# Waiting for fix to BUG#22694
+#UNINSTALL PLUGIN example;
+#UNINSTALL PLUGIN EXAMPLE;
+
+--error 1305
+UNINSTALL PLUGIN non_exist;
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test
index d65da7f3018..34f9a6fb699 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -1118,11 +1118,9 @@ EXECUTE stmt USING @a;
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
-
--echo End of 4.1 tests.
-
############################# 5.0 tests start ################################
#
#
diff --git a/mysql-test/t/range.test b/mysql-test/t/range.test
index 400e28c3e28..af90b6cd4f0 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -406,8 +406,8 @@ select count(*) from t1 where x = 18446744073709551601;
create table t2 (x bigint not null);
-insert into t2(x) values (cast(0xfffffffffffffff0+0 as signed));
-insert into t2(x) values (cast(0xfffffffffffffff1+0 as signed));
+insert into t2(x) values (-16);
+insert into t2(x) values (-15);
select * from t2;
select count(*) from t2 where x>0;
select count(*) from t2 where x=0;
diff --git a/mysql-test/t/rpl_charset_sjis.test b/mysql-test/t/rpl_charset_sjis.test
new file mode 100644
index 00000000000..2469b0db8a2
--- /dev/null
+++ b/mysql-test/t/rpl_charset_sjis.test
@@ -0,0 +1,25 @@
+source include/have_sjis.inc;
+source include/master-slave.inc;
+
+--disable_warnings
+drop table if exists t1;
+drop procedure if exists p1;
+--enable_warnings
+create table t1 (a varchar(255) character set sjis);
+create procedure p1 (in a varchar(255) character set sjis) insert into t1 values (a);
+
+SET NAMES binary;
+CALL p1 ('–\\');
+select "--- on master ---";
+select hex(a) from t1 ;
+sync_slave_with_master;
+connection slave;
+select "--- on slave ---";
+select hex(a) from t1;
+connection master;
+drop table t1;
+drop procedure p1;
+sync_slave_with_master;
+connection master;
+
+# End of 5.0 tests
diff --git a/mysql-test/t/rpl_do_grant.test b/mysql-test/t/rpl_do_grant.test
index 4e398114269..5615900c2dd 100644
--- a/mysql-test/t/rpl_do_grant.test
+++ b/mysql-test/t/rpl_do_grant.test
@@ -34,6 +34,22 @@ connection slave;
sync_with_master;
select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
+#
+# Bug#24158 SET PASSWORD in binary log fails under ANSI_QUOTES
+#
+connection master;
+update mysql.user set password='' where user='rpl_do_grant';
+flush privileges;
+select password<>'' from mysql.user where user='rpl_do_grant';
+set sql_mode='ANSI_QUOTES';
+set password for rpl_do_grant@localhost=password('does it work?');
+set sql_mode='';
+save_master_pos;
+connection slave;
+sync_with_master;
+select password<>'' from mysql.user where user='rpl_do_grant';
+
+
# clear what we have done, to not influence other tests.
connection master;
delete from mysql.user where user=_binary'rpl_do_grant';
diff --git a/mysql-test/t/rpl_locale.test b/mysql-test/t/rpl_locale.test
new file mode 100644
index 00000000000..2f2d637e1b4
--- /dev/null
+++ b/mysql-test/t/rpl_locale.test
@@ -0,0 +1,24 @@
+# Replication of locale variables
+
+source include/master-slave.inc;
+
+#
+# Bug#22645 LC_TIME_NAMES: Statement not replicated
+#
+connection master;
+create table t1 (s1 char(10));
+set lc_time_names= 'de_DE';
+insert into t1 values (date_format('2001-01-01','%W'));
+set lc_time_names= 'en_US';
+insert into t1 values (date_format('2001-01-01','%W'));
+select * from t1;
+sync_slave_with_master;
+connection slave;
+select * from t1;
+connection master;
+drop table t1;
+sync_slave_with_master;
+
+# End of 4.1 tests
+
+
diff --git a/mysql-test/t/rpl_rbr_to_sbr.test b/mysql-test/t/rpl_rbr_to_sbr.test
index 0c5368197b3..379b1edec02 100644
--- a/mysql-test/t/rpl_rbr_to_sbr.test
+++ b/mysql-test/t/rpl_rbr_to_sbr.test
@@ -1,4 +1,3 @@
--- source include/have_row_based.inc
-- source include/have_binlog_format_mixed_or_statement.inc
-- source include/not_ndb_default.inc
-- source include/master-slave.inc
diff --git a/mysql-test/t/rpl_rotate_logs.test b/mysql-test/t/rpl_rotate_logs.test
index 0c5ed1a35a4..027747665a3 100644
--- a/mysql-test/t/rpl_rotate_logs.test
+++ b/mysql-test/t/rpl_rotate_logs.test
@@ -20,8 +20,10 @@ connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
drop table if exists t1, t2, t3, t4;
--enable_warnings
connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK);
-system cat /dev/null > $MYSQLTEST_VARDIR/slave-data/master.info;
-system chmod 000 $MYSQLTEST_VARDIR/slave-data/master.info;
+# Create empty file
+write_file $MYSQLTEST_VARDIR/slave-data/master.info;
+EOF
+chmod 0000 $MYSQLTEST_VARDIR/slave-data/master.info;
connection slave;
--disable_warnings
drop table if exists t1, t2, t3, t4;
@@ -32,7 +34,7 @@ drop table if exists t1, t2, t3, t4;
--replace_result $MYSQL_TEST_DIR TESTDIR
--error 1105,1105,29
start slave;
-system chmod 600 $MYSQLTEST_VARDIR/slave-data/master.info;
+chmod 0600 $MYSQLTEST_VARDIR/slave-data/master.info;
# It will fail again because the file is empty so the slave cannot get valuable
# info about how to connect to the master from it (failure in
# init_strvar_from_file() in init_master_info()).
diff --git a/mysql-test/t/rpl_row_basic_11bugs.test b/mysql-test/t/rpl_row_basic_11bugs.test
index 37bfd01e260..5b28af75d33 100644
--- a/mysql-test/t/rpl_row_basic_11bugs.test
+++ b/mysql-test/t/rpl_row_basic_11bugs.test
@@ -1,4 +1,3 @@
---source include/have_row_based.inc
--source include/have_binlog_format_row.inc
diff --git a/mysql-test/t/rpl_row_basic_8partition.test b/mysql-test/t/rpl_row_basic_8partition.test
index f262ef05c58..687b3bc785d 100644
--- a/mysql-test/t/rpl_row_basic_8partition.test
+++ b/mysql-test/t/rpl_row_basic_8partition.test
@@ -7,7 +7,6 @@
# partition tables with same engine (MyISAM) in both ends. #
############################################################
---source include/have_row_based.inc
--source include/have_binlog_format_row.inc
--source include/have_partition.inc
--source include/not_ndb_default.inc
diff --git a/mysql-test/t/rpl_row_create_table-slave.opt b/mysql-test/t/rpl_row_create_table-slave.opt
new file mode 100644
index 00000000000..627becdbfb5
--- /dev/null
+++ b/mysql-test/t/rpl_row_create_table-slave.opt
@@ -0,0 +1 @@
+--innodb
diff --git a/mysql-test/t/rpl_row_create_table.test b/mysql-test/t/rpl_row_create_table.test
index 3a711e5b496..6accf0c8bef 100644
--- a/mysql-test/t/rpl_row_create_table.test
+++ b/mysql-test/t/rpl_row_create_table.test
@@ -2,6 +2,10 @@
--source include/have_binlog_format_row.inc
--source include/master-slave.inc
+--source include/have_innodb.inc
+connection slave;
+--source include/have_innodb.inc
+connection master;
# Bug#18326: Do not lock table for writing during prepare of statement
# The use of the ps protocol causes extra table maps in the binlog, so
@@ -31,7 +35,7 @@ CREATE TABLE t2 (a INT, b INT) ENGINE=Merge;
CREATE TABLE t3 (a INT, b INT) CHARSET=utf8;
CREATE TABLE t4 (a INT, b INT) ENGINE=Merge CHARSET=utf8;
--replace_column 1 # 4 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
--query_vertical SHOW BINLOG EVENTS FROM 212
--echo **** On Master ****
--query_vertical SHOW CREATE TABLE t1
@@ -66,8 +70,8 @@ connection master;
--error 1062
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
# Shouldn't be written to the binary log
---replace_regex /table_id: [0-9]+/table_id: #/
-SHOW BINLOG EVENTS FROM 1256;
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
+SHOW BINLOG EVENTS FROM 1118;
# Test that INSERT-SELECT works the same way as for SBR.
CREATE TABLE t7 (a INT, b INT UNIQUE);
@@ -75,7 +79,7 @@ CREATE TABLE t7 (a INT, b INT UNIQUE);
INSERT INTO t7 SELECT a,b FROM tt3;
SELECT * FROM t7 ORDER BY a,b;
# Should be written to the binary log
---replace_regex /table_id: [0-9]+/table_id: #/
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS FROM 1118;
sync_slave_with_master;
SELECT * FROM t7 ORDER BY a,b;
@@ -86,7 +90,7 @@ INSERT INTO tt4 VALUES (4,8), (5,10), (6,12);
BEGIN;
INSERT INTO t7 SELECT a,b FROM tt4;
ROLLBACK;
---replace_regex /table_id: [0-9]+/table_id: #/
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS FROM 1314;
SELECT * FROM t7 ORDER BY a,b;
sync_slave_with_master;
@@ -101,7 +105,7 @@ CREATE TEMPORARY TABLE tt7 SELECT 1;
--echo **** On Master ****
--query_vertical SHOW CREATE TABLE t8
--query_vertical SHOW CREATE TABLE t9
---replace_regex /table_id: [0-9]+/table_id: #/
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
SHOW BINLOG EVENTS FROM 1410;
sync_slave_with_master;
--echo **** On Slave ****
@@ -109,12 +113,117 @@ sync_slave_with_master;
--query_vertical SHOW CREATE TABLE t9
connection master;
---disable_query_log
DROP TABLE IF EXISTS t1,t2,t3,t4,t5,t6,t7,t8,t9;
sync_slave_with_master;
# Here we reset the value of the default storage engine
STOP SLAVE;
SET GLOBAL storage_engine=@storage_engine;
START SLAVE;
---enable_query_log
--enable_ps_protocol
+
+# BUG#22864 (Rollback following CREATE ... SELECT discards 'CREATE
+# table' from log):
+--echo ================ BUG#22864 ================
+connection slave;
+STOP SLAVE;
+RESET SLAVE;
+connection master;
+RESET MASTER;
+connection slave;
+START SLAVE;
+connection master;
+SET AUTOCOMMIT=0;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+
+CREATE TABLE t2 ENGINE=INNODB SELECT * FROM t1;
+ROLLBACK;
+
+CREATE TABLE t3 ENGINE=INNODB SELECT * FROM t1;
+INSERT INTO t3 VALUES (4),(5),(6);
+ROLLBACK;
+
+CREATE TABLE t4 ENGINE=INNODB SELECT * FROM t1;
+INSERT INTO t1 VALUES (4),(5),(6);
+ROLLBACK;
+
+SHOW TABLES;
+SELECT TABLE_NAME,ENGINE
+ FROM INFORMATION_SCHEMA.TABLES
+ WHERE TABLE_NAME LIKE 't_'
+ORDER BY TABLE_NAME;
+SELECT * FROM t1 ORDER BY a;
+SELECT * FROM t2 ORDER BY a;
+SELECT * FROM t3 ORDER BY a;
+SELECT * FROM t4 ORDER BY a;
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
+SHOW BINLOG EVENTS;
+sync_slave_with_master;
+SHOW TABLES;
+SELECT TABLE_NAME,ENGINE
+ FROM INFORMATION_SCHEMA.TABLES
+ WHERE TABLE_NAME LIKE 't_'
+ORDER BY TABLE_NAME;
+SELECT * FROM t1 ORDER BY a;
+SELECT * FROM t2 ORDER BY a;
+SELECT * FROM t3 ORDER BY a;
+SELECT * FROM t4 ORDER BY a;
+
+connection master;
+DROP TABLE IF EXISTS t1,t2,t3,t4;
+SET AUTOCOMMIT=1;
+sync_slave_with_master;
+
+# Some tests with temporary tables
+connection slave;
+STOP SLAVE;
+RESET SLAVE;
+
+connection master;
+RESET MASTER;
+
+connection slave;
+START SLAVE;
+
+connection master;
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2),(3);
+
+CREATE TABLE t2 (a INT) ENGINE=INNODB;
+
+BEGIN;
+INSERT INTO t2 SELECT a*a FROM t1;
+CREATE TEMPORARY TABLE tt1
+SELECT a+1 AS a
+ FROM t1
+ WHERE a MOD 2 = 1;
+INSERT INTO t2 SELECT a+2 FROM tt1;
+COMMIT;
+
+SELECT * FROM t2 ORDER BY a;
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
+SHOW BINLOG EVENTS;
+sync_slave_with_master;
+SELECT * FROM t2 ORDER BY a;
+
+connection master;
+TRUNCATE TABLE t2;
+
+BEGIN;
+INSERT INTO t2 SELECT a*a FROM t1;
+CREATE TEMPORARY TABLE tt2
+SELECT a+1 AS a
+ FROM t1
+ WHERE a MOD 2 = 1;
+INSERT INTO t2 SELECT a+2 FROM tt2;
+ROLLBACK;
+
+SELECT * FROM t2 ORDER BY a;
+--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
+SHOW BINLOG EVENTS FROM 627;
+sync_slave_with_master;
+SELECT * FROM t2 ORDER BY a;
+
+connection master;
+DROP TABLE t1,t2;
+sync_slave_with_master;
diff --git a/mysql-test/t/rpl_row_max_relay_size.test b/mysql-test/t/rpl_row_max_relay_size.test
index eb3f63db8aa..a0be59e44a7 100644
--- a/mysql-test/t/rpl_row_max_relay_size.test
+++ b/mysql-test/t/rpl_row_max_relay_size.test
@@ -5,7 +5,6 @@
# Requires statement logging
-- source include/not_ndb_default.inc
--- source include/have_row_based.inc
SET SESSION BINLOG_FORMAT=ROW;
SET GLOBAL BINLOG_FORMAT=ROW;
-- source extra/rpl_tests/rpl_max_relay_size.test
diff --git a/mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt b/mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt
new file mode 100644
index 00000000000..627becdbfb5
--- /dev/null
+++ b/mysql-test/t/rpl_row_tabledefs_3innodb-slave.opt
@@ -0,0 +1 @@
+--innodb
diff --git a/mysql-test/t/rpl_sp.test b/mysql-test/t/rpl_sp.test
index 3a93a6608cd..9a1960db647 100644
--- a/mysql-test/t/rpl_sp.test
+++ b/mysql-test/t/rpl_sp.test
@@ -343,13 +343,13 @@ delete from t1;
drop trigger trg;
insert into t1 values (1);
select * from t1;
---replace_column 2 # 5 #
---replace_regex /table_id: [0-9]+/table_id: #/
-show binlog events in 'master-bin.000001' from 102;
sync_slave_with_master;
select * from t1;
+# ********************** PART 4 : RELATED FIXED BUGS ***************
+
+
#
# Test for bug #13969 "Routines which are replicated from master can't be
# executed on slave".
@@ -522,17 +522,11 @@ connection master;
drop table t1;
sync_slave_with_master;
-# Restore log_bin_trust_function_creators to original value
-set global log_bin_trust_function_creators=0;
-connection master;
-set global log_bin_trust_function_creators=0;
---echo End of 5.0 tests
-
#
# Bug22043: MySQL don't add "USE <DATABASE>" before "DROP PROCEDURE IF EXISTS"
#
+
connection master;
-reset master;
--disable_warnings
drop database if exists mysqltest;
drop database if exists mysqltest2;
@@ -543,12 +537,49 @@ use mysqltest2;
create table t ( t integer );
create procedure mysqltest.test() begin end;
insert into t values ( 1 );
-show binlog events in 'master-bin.000001' from 102;
--error ER_BAD_DB_ERROR
create procedure `\\`.test() begin end;
+
+#
+# BUG#19725: Calls to stored function in other database are not
+# replicated correctly in some cases
+#
+
+connection master;
+delimiter |;
+create function f1 () returns int
+begin
+ insert into t values (1);
+ return 0;
+end|
+delimiter ;|
+sync_slave_with_master;
+# Let us test if we don't forget to binlog the function's database
+connection master;
+use mysqltest;
+set @a:= mysqltest2.f1();
+sync_slave_with_master;
+connection master;
+
+
+# Final inspection which verifies how all statements of this test file
+# were written to the binary log.
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/
+show binlog events in 'master-bin.000001' from 102;
+
+
+# Restore log_bin_trust_function_creators to its original value.
+# This is a cleanup for all parts above where we tested stored
+# functions and triggers.
+set global log_bin_trust_function_creators=0;
+connection master;
+set global log_bin_trust_function_creators=0;
+
# Clean up
drop database mysqltest;
drop database mysqltest2;
+--echo End of 5.0 tests
--echo End of 5.1 tests
diff --git a/mysql-test/t/rpl_switch_stm_row_mixed.test b/mysql-test/t/rpl_switch_stm_row_mixed.test
index d345b62b8eb..ccd505941c8 100644
--- a/mysql-test/t/rpl_switch_stm_row_mixed.test
+++ b/mysql-test/t/rpl_switch_stm_row_mixed.test
@@ -1,4 +1,3 @@
--- source include/have_row_based.inc
-- source include/not_ndb_default.inc
-- source include/master-slave.inc
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index 79049353950..0e7361218aa 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -2350,7 +2350,18 @@ INSERT INTO t1 VALUES (10);
SELECT i='1e+01',i=1e+01, i in (1e+01,1e+01), i in ('1e+01','1e+01') FROM t1;
DROP TABLE t1;
-# End of 4.1 tests
+#
+# Bug #22533: storing large hex strings
+#
+
+create table t1(a bigint unsigned, b bigint);
+insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff),
+ (0x10000000000000000, 0x10000000000000000),
+ (0x8fffffffffffffff, 0x8fffffffffffffff);
+select hex(a), hex(b) from t1;
+drop table t1;
+
+--echo End of 4.1 tests
#
# Test for bug #6474
@@ -3093,3 +3104,23 @@ SELECT t3.a FROM t1,t2,t3
t3.c IN ('bb','ee');
DROP TABLE t1,t2,t3;
+
+#
+# Bug#6298: LIMIT #, -1 no longer works to set start with no end limit
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE t1(a int);
+INSERT into t1 values (1), (2), (3);
+
+# LIMIT N, -1 was accepted by accident in 4.0, but was not intended.
+# This test verifies that this illegal construct is now properly detected.
+
+--error ER_PARSE_ERROR
+SELECT * FROM t1 LIMIT 2, -1;
+
+DROP TABLE t1;
+
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index ba1180ffaff..19c70b1bd1e 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -6779,6 +6779,30 @@ DROP PROCEDURE bug23760_test_row_count|
DROP FUNCTION bug23760_rc_test|
#
+# BUG#24117: server crash on a FETCH with a cursor on a table which is not in
+# the table cache
+#
+
+--disable_warnings
+DROP PROCEDURE IF EXISTS bug24117|
+DROP TABLE IF EXISTS t3|
+--enable_warnings
+CREATE TABLE t3(c1 ENUM('abc'))|
+INSERT INTO t3 VALUES('abc')|
+CREATE PROCEDURE bug24117()
+BEGIN
+ DECLARE t3c1 ENUM('abc');
+ DECLARE mycursor CURSOR FOR SELECT c1 FROM t3;
+ OPEN mycursor;
+ FLUSH TABLES;
+ FETCH mycursor INTO t3c1;
+ CLOSE mycursor;
+END|
+CALL bug24117()|
+DROP PROCEDURE bug24117|
+DROP TABLE t3|
+
+#
# NOTE: The delimiter is `|`, and not `;`. It is changed to `;`
# at the end of the file!
#
diff --git a/mysql-test/t/symlink.test b/mysql-test/t/symlink.test
index 19a720a4fb8..d79b6905224 100644
--- a/mysql-test/t/symlink.test
+++ b/mysql-test/t/symlink.test
@@ -139,4 +139,43 @@ enable_query_log;
show create table t1;
drop table t1;
-# End of 4.1 tests
+#
+# Bug#8706 - temporary table with data directory option fails
+#
+connect (session1,localhost,root,,);
+connect (session2,localhost,root,,);
+
+connection session1;
+disable_query_log;
+eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/log" select 9 a;
+enable_query_log;
+# If running test suite with a non standard tmp dir, the "show create table"
+# will print "DATA_DIRECTORY=". Use replace_result to mask it out
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+show create table t1;
+
+connection session2;
+disable_query_log;
+eval create temporary table t1 (a int) engine=myisam data directory="$MYSQLTEST_VARDIR/log" select 99 a;
+enable_query_log;
+# If running test suite with a non standard tmp dir, the "show create table"
+# will print "DATA_DIRECTORY=". Use replace_result to mask it out
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+show create table t1;
+
+connection default;
+create table t1 (a int) engine=myisam select 42 a;
+
+connection session1;
+select * from t1;
+disconnect session1;
+connection session2;
+select * from t1;
+disconnect session2;
+connection default;
+select * from t1;
+drop table t1;
+
+--echo End of 4.1 tests
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test
index 916a85ec424..56d310eec37 100644
--- a/mysql-test/t/trigger.test
+++ b/mysql-test/t/trigger.test
@@ -1,3 +1,7 @@
+# This test uses chmod, can't be run with root permissions
+-- source include/not_as_root.inc
+
+
#
# Basic triggers test
#
@@ -1138,8 +1142,10 @@ select trigger_schema, trigger_name, event_object_schema,
event_object_table, action_statement from information_schema.triggers
where event_object_schema = 'test';
# Trick which makes update of second .TRN file impossible
-system echo dummy >$MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
-system chmod 000 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
+write_file $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
+dummy
+EOF
+chmod 0000 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
--replace_result $MYSQLTEST_VARDIR . master-data// ''
--error 1
rename table t1 to t2;
@@ -1149,8 +1155,8 @@ select @a, @b;
select trigger_schema, trigger_name, event_object_schema,
event_object_table, action_statement from information_schema.triggers
where event_object_schema = 'test';
-system chmod 600 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
-system rm $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
+chmod 0600 $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
+remove_file $MYSQLTEST_VARDIR/master-data/test/t1_ai.TRN~;
# Let us check that updates to .TRN files were rolled back too
drop trigger t1_bi;
drop trigger t1_ai;
diff --git a/mysql-test/t/user_var-binlog.test b/mysql-test/t/user_var-binlog.test
index 6615e48ca42..ce1a476eb43 100644
--- a/mysql-test/t/user_var-binlog.test
+++ b/mysql-test/t/user_var-binlog.test
@@ -20,6 +20,7 @@ show binlog events from 102;
# absolutely need variables names to be quoted and strings to be
# escaped).
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+flush logs;
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000001
drop table t1;
diff --git a/mysql-test/t/varbinary.test b/mysql-test/t/varbinary.test
index 0e45bfb5e1b..2f0c1c83e84 100644
--- a/mysql-test/t/varbinary.test
+++ b/mysql-test/t/varbinary.test
@@ -1,3 +1,7 @@
+# This test uses chmod, can't be run with root permissions
+-- source include/not_as_root.inc
+
+
# Initialise
--disable_warnings
drop table if exists t1;
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 7cbc7ee153b..4f91b75ced1 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -497,6 +497,50 @@ set names latin1;
select @@have_innodb;
#
+# Tests for lc_time_names
+# Note, when adding new locales, please fix ID accordingly:
+# - to test the last ID (currently 108)
+# - and the next after the last (currently 109)
+#
+--echo *** Various tests with LC_TIME_NAMES
+--echo *** LC_TIME_NAMES: testing case insensitivity
+set @@lc_time_names='ru_ru';
+select @@lc_time_names;
+--echo *** LC_TIME_NAMES: testing with a user variable
+set @lc='JA_JP';
+set @@lc_time_names=@lc;
+select @@lc_time_names;
+--echo *** LC_TIME_NAMES: testing with string expressions
+set lc_time_names=concat('de','_','DE');
+select @@lc_time_names;
+--error 1105
+set lc_time_names=concat('de','+','DE');
+select @@lc_time_names;
+--echo LC_TIME_NAMES: testing with numeric expressions
+set @@lc_time_names=1+2;
+select @@lc_time_names;
+--error 1232
+set @@lc_time_names=1/0;
+select @@lc_time_names;
+set lc_time_names=en_US;
+--echo LC_TIME_NAMES: testing NULL and a negative number:
+--error 1231
+set lc_time_names=NULL;
+--error 1105
+set lc_time_names=-1;
+select @@lc_time_names;
+--echo LC_TIME_NAMES: testing locale with the last ID:
+set lc_time_names=108;
+select @@lc_time_names;
+--echo LC_TIME_NAMES: testing a number beyond the valid ID range:
+--error 1105
+set lc_time_names=109;
+select @@lc_time_names;
+--echo LC_TIME_NAMES: testing that 0 is en_US:
+set lc_time_names=0;
+select @@lc_time_names;
+
+#
# Bug #13334: query_prealloc_size default less than minimum
#
set @test = @@query_prealloc_size;
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index 7175db1db4e..ea429e2a0f0 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -2544,9 +2544,9 @@ CREATE TABLE t1(
uID int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY);
INSERT INTO t1(fName, lName, DOB) VALUES
- ('Hank', 'Hill', '1964-09-29'),
- ('Tom', 'Adams', '1908-02-14'),
- ('Homer', 'Simpson', '1968-03-05');
+ ('Alice', 'Hill', date_sub(curdate(), interval 15271 day)),
+ ('Bob', 'Adams', date_sub(curdate(), interval 33600 day)),
+ ('Carol', 'Simpson', date_sub(curdate(), interval 13700 day));
CREATE VIEW v1 AS
SELECT (year(now())-year(DOB)) AS Age
@@ -2906,6 +2906,7 @@ DROP FUNCTION f1;
DROP VIEW v1;
DROP TABLE t1;
+#
# Bug #16813 (WITH CHECK OPTION doesn't work with UPDATE)
#
CREATE TABLE t1(id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, val INT UNSIGNED NOT NULL);
@@ -2919,7 +2920,6 @@ UPDATE v1 SET val=6 WHERE id=2;
DROP VIEW v1;
DROP TABLE t1;
-
#
# BUG#22584: last_insert_id not updated after inserting a record
# through a updatable view
@@ -2957,6 +2957,20 @@ SELECT * FROM t1;
DROP VIEW v1, v2;
DROP TABLE t1;
+#
+# BUG#24293: '\Z' token is not handled correctly in views
+#
+
+--disable_warnings
+DROP VIEW IF EXISTS v1;
+--enable_warnings
+
+CREATE VIEW v1 AS SELECT 'The\ZEnd';
+SELECT * FROM v1;
+
+SHOW CREATE VIEW v1;
+
+DROP VIEW v1;
--echo End of 5.0 tests.
diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test
index c9aba4549c2..b5bae109f5f 100644
--- a/mysql-test/t/warnings.test
+++ b/mysql-test/t/warnings.test
@@ -109,12 +109,6 @@ show variables like 'max_error_count';
set max_error_count=10;
show variables like 'max_error_count';
-#
-# Test for handler type
-#
-drop table t1;
-create table t1 (id int) engine=Innodb;
-alter table t1 engine=Innodb;
drop table t1;
#
diff --git a/mysql-test/t/warnings_engine_disabled-master.opt b/mysql-test/t/warnings_engine_disabled-master.opt
new file mode 100644
index 00000000000..99837e4a4cb
--- /dev/null
+++ b/mysql-test/t/warnings_engine_disabled-master.opt
@@ -0,0 +1 @@
+--loose-skip-ndb
diff --git a/mysql-test/t/warnings_engine_disabled.test b/mysql-test/t/warnings_engine_disabled.test
new file mode 100644
index 00000000000..0b09cff7b1e
--- /dev/null
+++ b/mysql-test/t/warnings_engine_disabled.test
@@ -0,0 +1,19 @@
+#
+# Only run this test with a compiled in but disabled
+# engine
+#
+disable_query_log;
+--require r/true.require
+select support = 'Disabled' as `TRUE` from information_schema.engines where engine = 'ndbcluster';
+enable_query_log;
+
+
+#
+# Test for handler type, will select MyISAM and print a warning
+# about that - since NDB is disabled
+#
+create table t1 (id int) engine=NDB;
+alter table t1 engine=NDB;
+drop table t1;
+
+
diff --git a/mysql-test/t/windows.test b/mysql-test/t/windows.test
index 4dab646df2c..a10d54b5452 100644
--- a/mysql-test/t/windows.test
+++ b/mysql-test/t/windows.test
@@ -17,6 +17,15 @@ use prn;
create table nu (a int);
drop table nu;
+#
+# Bug17489: ailed to put data file in custom directory use "data directory" option
+#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+CREATE TABLE t1 ( `ID` int(6) ) data directory 'c:/tmp/' index directory 'c:/tmp/' engine=MyISAM;
+drop table t1;
+
# End of 4.1 tests
#
diff --git a/mysys/default.c b/mysys/default.c
index b68ff8e1779..9b638b9bc88 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -986,10 +986,11 @@ static uint my_get_system_windows_directory(char *buffer, uint size)
Everywhere else, this is:
1. /etc/
- 2. getenv(DEFAULT_HOME_ENV)
- 3. ""
- 4. "~/"
- 5. --sysconfdir=<path>
+ 2. /etc/mysql/
+ 3. getenv(DEFAULT_HOME_ENV)
+ 4. ""
+ 5. "~/"
+ 6. --sysconfdir=<path>
*/
@@ -1011,6 +1012,7 @@ static void init_default_directories()
*ptr++= "sys:/etc/";
#else
*ptr++= "/etc/";
+ *ptr++= "/etc/mysql/";
#endif
if ((env= getenv(STRINGIFY_ARG(DEFAULT_HOME_ENV))))
*ptr++= env;
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index d458bf528d0..fc81f0bad03 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -200,11 +200,11 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
if (type != READ_NET && type != WRITE_NET)
{
/* Retry allocating memory in smaller blocks until we get one */
+ cachesize=(uint) ((ulong) (cachesize + min_cache-1) &
+ (ulong) ~(min_cache-1));
for (;;)
{
uint buffer_block;
- cachesize=(uint) ((ulong) (cachesize + min_cache-1) &
- (ulong) ~(min_cache-1));
if (cachesize < min_cache)
cachesize = min_cache;
buffer_block = cachesize;
@@ -223,7 +223,8 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
}
if (cachesize == min_cache)
DBUG_RETURN(2); /* Can't alloc cache */
- cachesize= (uint) ((long) cachesize*3/4); /* Try with less memory */
+ /* Try with less memory */
+ cachesize= (uint) ((ulong) cachesize*3/4 & (ulong)~(min_cache-1));
}
}
diff --git a/mysys/my_thr_init.c b/mysys/my_thr_init.c
index d83aa95b0ef..853a2761224 100644
--- a/mysys/my_thr_init.c
+++ b/mysys/my_thr_init.c
@@ -46,6 +46,23 @@ pthread_mutexattr_t my_fast_mutexattr;
pthread_mutexattr_t my_errorcheck_mutexattr;
#endif
+#ifdef NPTL_PTHREAD_EXIT_BUG /* see my_pthread.h */
+
+/*
+ Dummy thread spawned in my_thread_global_init() below to avoid
+ race conditions in NPTL pthread_exit code.
+*/
+
+static
+pthread_handler_t nptl_pthread_exit_hack_handler(void *arg)
+{
+ /* Do nothing! */
+ pthread_exit(0);
+ return 0;
+}
+
+#endif
+
/*
initialize thread environment
@@ -64,6 +81,28 @@ my_bool my_thread_global_init(void)
fprintf(stderr,"Can't initialize threads: error %d\n",errno);
return 1;
}
+
+#ifdef NPTL_PTHREAD_EXIT_BUG
+
+/*
+ BUG#24507: Race conditions inside current NPTL pthread_exit() implementation.
+
+ To avoid a possible segmentation fault during concurrent executions of
+ pthread_exit(), a dummy thread is spawned which initializes internal variables
+ of pthread lib. See bug description for thoroughfull explanation.
+
+ TODO: Remove this code when fixed versions of glibc6 are in common use.
+*/
+
+ pthread_t dummy_thread;
+ pthread_attr_t dummy_thread_attr;
+
+ pthread_attr_init(&dummy_thread_attr);
+ pthread_attr_setdetachstate(&dummy_thread_attr,PTHREAD_CREATE_DETACHED);
+
+ pthread_create(&dummy_thread,&dummy_thread_attr,nptl_pthread_exit_hack_handler,NULL);
+
+#endif
#ifdef PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP
/*
diff --git a/mysys/my_wincond.c b/mysys/my_wincond.c
index 560d1788ae0..ed8b715cb85 100644
--- a/mysys/my_wincond.c
+++ b/mysys/my_wincond.c
@@ -36,7 +36,7 @@ int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr)
int pthread_cond_destroy(pthread_cond_t *cond)
{
- return CloseHandle(cond->semaphore) ? 0 : EINVAL;
+ return CloseHandle(cond->semaphore) ? 0 : EINVAL;
}
@@ -50,20 +50,37 @@ int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex)
return 0 ;
}
+
int pthread_cond_timedwait(pthread_cond_t *cond, pthread_mutex_t *mutex,
struct timespec *abstime)
{
- struct _timeb curtime;
int result;
- long timeout;
- _ftime(&curtime);
- timeout= ((long) (abstime->tv_sec - curtime.time)*1000L +
- (long)((abstime->tv_nsec/1000) - curtime.millitm)/1000L);
- if (timeout < 0) /* Some safety */
- timeout = 0L;
+ long timeout;
+ union ft64 now;
+
+ GetSystemTimeAsFileTime(&now.ft);
+
+ /*
+ Calculate time left to abstime
+ - subtract start time from current time(values are in 100ns units)
+ - convert to millisec by dividing with 10000
+ */
+ timeout= (long)((abstime->tv.i64 - now.i64) / 10000);
+
+ /* Don't allow the timeout to be negative */
+ if (timeout < 0)
+ timeout= 0L;
+
+ /*
+ Make sure the calucated timeout does not exceed original timeout
+ value which could cause "wait for ever" if system time changes
+ */
+ if (timeout > abstime->max_timeout_msec)
+ timeout= abstime->max_timeout_msec;
+
InterlockedIncrement(&cond->waiting);
LeaveCriticalSection(mutex);
- result=WaitForSingleObject(cond->semaphore,timeout);
+ result= WaitForSingleObject(cond->semaphore,timeout);
InterlockedDecrement(&cond->waiting);
EnterCriticalSection(mutex);
diff --git a/mysys/string.c b/mysys/string.c
index 86de7bfcf69..e1ff9ec8c26 100644
--- a/mysys/string.c
+++ b/mysys/string.c
@@ -121,6 +121,56 @@ my_bool dynstr_trunc(DYNAMIC_STRING *str, int n)
return FALSE;
}
+/** Concatenates any number of strings, escapes any OS quote in the result then
+ * surround the whole affair in another set of quotes which is finally appended
+ * to specified DYNAMIC_STRING. This function is especially useful when
+ * building strings to be executed with the system() function.
+ * @param str Dynamic String which will have addtional strings appended.
+ * @param append String to be appended.
+ * @param ... Optional. Additional string(s) to be appended.
+ *
+ * @note The final argument in the list must be NullS even if no additional
+ * options are passed.
+ *
+ * @return True = Success.
+ */
+my_bool dynstr_append_os_quoted(DYNAMIC_STRING *str, const char *append, ...)
+{
+#ifdef __WIN__
+ const char *quote_str= "\"";
+ const uint quote_len= 1;
+#else
+ const char *quote_str= "\'";
+ const uint quote_len= 1;
+#endif /* __WIN__ */
+ my_bool ret= TRUE;
+ va_list dirty_text;
+
+ ret&= dynstr_append_mem(str, quote_str, quote_len); /* Leading quote */
+ va_start(dirty_text, append);
+ while (append != NullS)
+ {
+ const char *cur_pos= append;
+ const char *next_pos= cur_pos;
+
+ /* Search for quote in each string and replace with escaped quote */
+ while(*(next_pos= strcend(cur_pos, quote_str[0])) != '\0')
+ {
+ ret&= dynstr_append_mem(str, cur_pos, next_pos - cur_pos);
+ ret&= dynstr_append_mem(str ,"\\", 1);
+ ret&= dynstr_append_mem(str, quote_str, quote_len);
+ cur_pos= next_pos + 1;
+ }
+ ret&= dynstr_append_mem(str, cur_pos, next_pos - cur_pos);
+ append= va_arg(dirty_text, char *);
+ }
+ va_end(dirty_text);
+ ret&= dynstr_append_mem(str, quote_str, quote_len); /* Trailing quote */
+
+ return ret;
+}
+
+
void dynstr_free(DYNAMIC_STRING *str)
{
if (str->str)
diff --git a/mysys/typelib.c b/mysys/typelib.c
index 95bd16cfefd..4fab6f20493 100644
--- a/mysys/typelib.c
+++ b/mysys/typelib.c
@@ -118,3 +118,54 @@ const char *get_type(TYPELIB *typelib, uint nr)
return(typelib->type_names[nr]);
return "?";
}
+
+
+/*
+ Create a copy of a specified TYPELIB structure.
+
+ SYNOPSIS
+ copy_typelib()
+ root pointer to a MEM_ROOT object for allocations
+ from pointer to a source TYPELIB structure
+
+ RETURN
+ pointer to the new TYPELIB structure on successful copy, or
+ NULL otherwise
+*/
+
+TYPELIB *copy_typelib(MEM_ROOT *root, TYPELIB *from)
+{
+ TYPELIB *to;
+ uint i;
+
+ if (!from)
+ return NULL;
+
+ if (!(to= (TYPELIB*) alloc_root(root, sizeof(TYPELIB))))
+ return NULL;
+
+ if (!(to->type_names= (const char **)
+ alloc_root(root, (sizeof(char *) + sizeof(int)) * (from->count + 1))))
+ return NULL;
+ to->type_lengths= (unsigned int *)(to->type_names + from->count + 1);
+ to->count= from->count;
+ if (from->name)
+ {
+ if (!(to->name= strdup_root(root, from->name)))
+ return NULL;
+ }
+ else
+ to->name= NULL;
+
+ for (i= 0; i < from->count; i++)
+ {
+ if (!(to->type_names[i]= strmake_root(root, from->type_names[i],
+ from->type_lengths[i])))
+ return NULL;
+ to->type_lengths[i]= from->type_lengths[i];
+ }
+ to->type_names[to->count]= NULL;
+ to->type_lengths[to->count]= 0;
+
+ return to;
+}
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index f457dbfd98e..4791e048d7e 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -263,7 +263,7 @@ $CP mysql-test/std_data/*.dat mysql-test/std_data/*.frm \
mysql-test/std_data/*.MYD mysql-test/std_data/*.MYI \
mysql-test/std_data/*.pem mysql-test/std_data/Moscow_leap \
mysql-test/std_data/des_key_file mysql-test/std_data/*.*001 \
- mysql-test/std_data/*.cnf \
+ mysql-test/std_data/*.cnf mysql-test/std_data/*.MY* \
$BASE/mysql-test/std_data
$CP mysql-test/t/*.test $BASE/mysql-test/t
$CP mysql-test/t/*.imtest mysql-test/t/*.disabled $BASE/mysql-test/t
diff --git a/scripts/mysqlbug.sh b/scripts/mysqlbug.sh
index 875df566815..69ea82e8794 100644
--- a/scripts/mysqlbug.sh
+++ b/scripts/mysqlbug.sh
@@ -147,7 +147,13 @@ if test -z "$VISUAL"
then
if test -z "$EDITOR"
then
- EDIT=emacs
+ # Honor debian sensible-editor
+ if test -x "/usr/bin/sensible-editor"
+ then
+ EDIT=/usr/bin/sensible-editor
+ else
+ EDIT=emacs
+ fi
else
EDIT="$EDITOR"
fi
diff --git a/scripts/mysqld_multi.sh b/scripts/mysqld_multi.sh
index 12758ae8290..91afe49b46b 100644
--- a/scripts/mysqld_multi.sh
+++ b/scripts/mysqld_multi.sh
@@ -472,6 +472,14 @@ sub find_groups
{
$data[$i] = $line;
}
+ if (-f "/etc/mysql/my.cnf" && -r "/etc/mysql/my.cnf")
+ {
+ open(MY_CNF, "</etc/mysql/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
+ }
+ for (; ($line = shift @tmp); $i++)
+ {
+ $data[$i] = $line;
+ }
if (defined($ENV{MYSQL_HOME}) && -f "$ENV{MYSQL_HOME}/my.cnf" &&
-r "$ENV{MYSQL_HOME}/my.cnf")
{
@@ -482,6 +490,14 @@ sub find_groups
{
$data[$i] = $line;
}
+ if (-f "/etc/mysql/my.cnf" && -r "/etc/mysql/my.cnf")
+ {
+ open(MY_CNF, "</etc/mysql/my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
+ }
+ for (; ($line = shift @tmp); $i++)
+ {
+ $data[$i] = $line;
+ }
if (-f "$homedir/.my.cnf" && -r "$homedir/.my.cnf")
{
open(MY_CNF, "<$homedir/.my.cnf") && (@tmp=<MY_CNF>) && close(MY_CNF);
@@ -491,7 +507,7 @@ sub find_groups
$data[$i] = $line;
}
}
- chop @data;
+ chomp @data;
# Make a list of the wanted group ids
if (defined($raw_gids))
{
diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh
index 91d53c412f7..bfaa1d57ed2 100644
--- a/scripts/mysqld_safe.sh
+++ b/scripts/mysqld_safe.sh
@@ -217,6 +217,7 @@ if [ ! -d $mysql_unix_port_dir ]
then
mkdir $mysql_unix_port_dir
chown $user $mysql_unix_port_dir
+ chmod 755 $mysql_unix_port_dir
fi
# If the user doesn't specify a binary, we assume name "mysqld"
diff --git a/scripts/mysqldumpslow.sh b/scripts/mysqldumpslow.sh
index ccb006f692d..ff82a35ec3f 100644
--- a/scripts/mysqldumpslow.sh
+++ b/scripts/mysqldumpslow.sh
@@ -40,6 +40,7 @@ unless (@ARGV) {
warn "basedir=$basedir\n" if $opt{v};
my $datadir = ($defaults =~ m/--datadir=(.*)/)[0];
+ my $slowlog = ($defaults =~ m/--log-slow-queries=(.*)/)[0];
if (!$datadir or $opt{i}) {
# determine the datadir from the instances section of /etc/my.cnf, if any
my $instances = `my_print_defaults instances`;
@@ -55,8 +56,13 @@ unless (@ARGV) {
warn "datadir=$datadir\n" if $opt{v};
}
- @ARGV = <$datadir/$opt{h}-slow.log>;
- die "Can't find '$datadir/$opt{h}-slow.log'\n" unless @ARGV;
+ if ( -f $slowlog ) {
+ @ARGV = ($slowlog);
+ die "Can't find '$slowlog'\n" unless @ARGV;
+ } else {
+ @ARGV = <$datadir/$opt{h}-slow.log>;
+ die "Can't find '$datadir/$opt{h}-slow.log'\n" unless @ARGV;
+ }
}
warn "\nReading mysql slow query log from @ARGV\n";
diff --git a/server-tools/instance-manager/Makefile.am b/server-tools/instance-manager/Makefile.am
index 73eed4305ad..6a974bc992d 100644
--- a/server-tools/instance-manager/Makefile.am
+++ b/server-tools/instance-manager/Makefile.am
@@ -32,7 +32,7 @@ liboptions_la_CXXFLAGS= $(CXXFLAGS) \
-DDEFAULT_SOCKET_FILE_NAME="/tmp/mysqlmanager.sock" \
-DDEFAULT_PASSWORD_FILE_NAME="/etc/mysqlmanager.passwd" \
-DDEFAULT_MYSQLD_PATH="$(libexecdir)/mysqld$(EXEEXT)" \
- -DDEFAULT_CONFIG_FILE="/etc/my.cnf" \
+ -DDEFAULT_CONFIG_FILE="my.cnf" \
-DPROTOCOL_VERSION=@PROTOCOL_VERSION@
liboptions_la_SOURCES= options.h options.cc priv.h priv.cc
diff --git a/server-tools/instance-manager/guardian.cc b/server-tools/instance-manager/guardian.cc
index bad43b1f92e..9a5ae090300 100644
--- a/server-tools/instance-manager/guardian.cc
+++ b/server-tools/instance-manager/guardian.cc
@@ -308,8 +308,7 @@ void Guardian::run()
break;
}
- timeout.tv_sec= time(NULL) + Options::Main::monitoring_interval;
- timeout.tv_nsec= 0;
+ set_timespec(timeout, Options::Main::monitoring_interval);
thread_registry->cond_timedwait(&thread_info, &COND_guardian,
&LOCK_guardian, &timeout);
diff --git a/sql/CMakeLists.txt b/sql/CMakeLists.txt
index 3cd2334d69e..37707fe3963 100644
--- a/sql/CMakeLists.txt
+++ b/sql/CMakeLists.txt
@@ -37,8 +37,7 @@ SET_SOURCE_FILES_PROPERTIES(${CMAKE_SOURCE_DIR}/sql/message.rc
${PROJECT_SOURCE_DIR}/include/sql_state.h
PROPERTIES GENERATED 1)
-ADD_DEFINITIONS(-DHAVE_ROW_BASED_REPLICATION -DMYSQL_SERVER
- -D_CONSOLE -DHAVE_DLOPEN)
+ADD_DEFINITIONS(-DMYSQL_SERVER -D_CONSOLE -DHAVE_DLOPEN)
ADD_EXECUTABLE(mysqld ../sql-common/client.c derror.cc des_key_file.cc
discover.cc ../libmysql/errmsg.c field.cc field_conv.cc
diff --git a/sql/event_queue.cc b/sql/event_queue.cc
index 9a740114193..45d354ea9b6 100644
--- a/sql/event_queue.cc
+++ b/sql/event_queue.cc
@@ -691,16 +691,11 @@ static const char *queue_wait_msg= "Waiting for next activation";
SYNOPSIS
Event_queue::get_top_for_execution_if_time()
thd [in] Thread
- now [in] Current timestamp
job_data [out] The object to execute
- abstime [out] Time to sleep
RETURN VALUE
FALSE No error. If *job_data==NULL then top not elligible for execution.
- Could be that there is no top. If abstime->tv_sec is set to value
- greater than zero then use abstime with pthread_cond_timedwait().
- If abstime->tv_sec is zero then sleep with pthread_cond_wait().
- abstime->tv_nsec is always zero.
+ Could be that there is no top.
TRUE Error
*/
@@ -710,56 +705,51 @@ Event_queue::get_top_for_execution_if_time(THD *thd, Event_job_data **job_data)
{
bool ret= FALSE;
struct timespec top_time;
- struct timespec *abstime;
Event_queue_element *top= NULL;
bool to_free= FALSE;
bool to_drop= FALSE;
*job_data= NULL;
DBUG_ENTER("Event_queue::get_top_for_execution_if_time");
- top_time.tv_nsec= 0;
LOCK_QUEUE_DATA();
for (;;)
{
int res;
- thd->end_time();
- time_t now= thd->query_start();
- abstime= NULL;
+ /* Break loop if thd has been killed */
+ if (thd->killed)
+ {
+ DBUG_PRINT("info", ("thd->killed=%d", thd->killed));
+ goto end;
+ }
- if (queue.elements)
+ if (!queue.elements)
{
- top= ((Event_queue_element*) queue_element(&queue, 0));
- top_time.tv_sec= sec_since_epoch_TIME(&top->execute_at);
+ /* There are no events in the queue */
+ set_zero_time(&next_activation_at, MYSQL_TIMESTAMP_DATETIME);
+
+ /* Wait on condition until signaled. Release LOCK_queue while waiting. */
+ cond_wait(thd, NULL, queue_empty_msg, SCHED_FUNC, __LINE__);
- abstime= &top_time;
+ continue;
}
- if (!abstime || abstime->tv_sec > now)
- {
- const char *msg;
- if (abstime)
- {
- next_activation_at= top->execute_at;
- msg= queue_wait_msg;
- }
- else
- {
- set_zero_time(&next_activation_at, MYSQL_TIMESTAMP_DATETIME);
- msg= queue_wait_msg;
- }
+ top= ((Event_queue_element*) queue_element(&queue, 0));
- cond_wait(thd, abstime, msg, SCHED_FUNC, __LINE__);
- if (thd->killed)
- {
- DBUG_PRINT("info", ("thd->killed=%d", thd->killed));
- goto end;
- }
+ thd->end_time(); /* Get current time */
+
+ time_t seconds_to_next_event=
+ sec_since_epoch_TIME(&top->execute_at) - thd->query_start();
+ next_activation_at= top->execute_at;
+ if (seconds_to_next_event > 0)
+ {
/*
- The queue could have been emptied. Therefore it's safe to start from
- the beginning. Moreover, this way we will get also the new top, if
- the element at the top has been changed.
+ Not yet time for top event, wait on condition with
+ time or until signaled. Release LOCK_queue while waiting.
*/
+ set_timespec(top_time, seconds_to_next_event);
+ cond_wait(thd, &top_time, queue_wait_msg, SCHED_FUNC, __LINE__);
+
continue;
}
@@ -801,7 +791,7 @@ Event_queue::get_top_for_execution_if_time(THD *thd, Event_job_data **job_data)
else
queue_replaced(&queue);
- dbug_dump_queue(now);
+ dbug_dump_queue(thd->query_start());
break;
}
end:
@@ -814,8 +804,7 @@ end:
if (to_free)
delete top;
- DBUG_PRINT("info", ("returning %d et_new: 0x%lx abstime.tv_sec: %ld ",
- ret, (long) *job_data, abstime ? abstime->tv_sec : 0));
+ DBUG_PRINT("info", ("returning %d et_new: 0x%lx ", ret, (long) *job_data));
if (*job_data)
DBUG_PRINT("info", ("db: %s name: %s definer=%s", (*job_data)->dbname.str,
diff --git a/sql/field.cc b/sql/field.cc
index ef084367d32..3114c8b595e 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -8030,6 +8030,16 @@ void Field_enum::sql_type(String &res) const
}
+Field *Field_enum::new_field(MEM_ROOT *root, struct st_table *new_table,
+ bool keep_type)
+{
+ Field_enum *res= (Field_enum*) Field::new_field(root, new_table, keep_type);
+ if (res)
+ res->typelib= copy_typelib(root, typelib);
+ return res;
+}
+
+
/*
set type.
This is a string which can have a collection of different values.
@@ -8235,6 +8245,7 @@ Field_bit::Field_bit(char *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
bit_ptr(bit_ptr_arg), bit_ofs(bit_ofs_arg), bit_len(len_arg & 7),
bytes_in_rec(len_arg / 8)
{
+ flags|= UNSIGNED_FLAG;
/*
Ensure that Field::eq() can distinguish between two different bit fields.
(two bit fields that are not null, may have same ptr and null_ptr)
@@ -8524,10 +8535,12 @@ const char *Field_bit::unpack(char *to, const char *from)
void Field_bit::set_default()
{
- my_ptrdiff_t const offset= (my_ptrdiff_t) (table->s->default_values -
- table->record[0]);
- uchar bits= (uchar) get_rec_bits(bit_ptr + offset, bit_ofs, bit_len);
- set_rec_bits(bits, bit_ptr, bit_ofs, bit_len);
+ if (bit_len > 0)
+ {
+ my_ptrdiff_t const offset= table->s->default_values - table->record[0];
+ uchar bits= get_rec_bits(bit_ptr + offset, bit_ofs, bit_len);
+ set_rec_bits(bits, bit_ptr, bit_ofs, bit_len);
+ }
Field::set_default();
}
@@ -8542,6 +8555,7 @@ Field_bit_as_char::Field_bit_as_char(char *ptr_arg, uint32 len_arg,
:Field_bit(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, 0, 0,
unireg_check_arg, field_name_arg)
{
+ flags|= UNSIGNED_FLAG;
bit_len= 0;
bytes_in_rec= (len_arg + 7) / 8;
}
diff --git a/sql/field.h b/sql/field.h
index 29a969cad59..d0a2e0ca225 100644
--- a/sql/field.h
+++ b/sql/field.h
@@ -1367,6 +1367,7 @@ public:
{
flags|=ENUM_FLAG;
}
+ Field *new_field(MEM_ROOT *root, struct st_table *new_table, bool keep_type);
enum_field_types type() const { return MYSQL_TYPE_STRING; }
enum Item_result cmp_type () const { return INT_RESULT; }
enum Item_result cast_to_int_type () const { return INT_RESULT; }
@@ -1504,6 +1505,13 @@ private:
};
+/**
+ BIT field represented as chars for non-MyISAM tables.
+
+ @todo The inheritance relationship is backwards since Field_bit is
+ an extended version of Field_bit_as_char and not the other way
+ around. Hence, we should refactor it to fix the hierarchy order.
+ */
class Field_bit_as_char: public Field_bit {
public:
Field_bit_as_char(char *ptr_arg, uint32 len_arg, uchar *null_ptr_arg,
diff --git a/sql/handler.cc b/sql/handler.cc
index 3d47a6a2eaf..360d528f0ad 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -3471,7 +3471,6 @@ bool ha_show_status(THD *thd, handlerton *db_type, enum ha_stat_type stat)
- table is not mysql.event
*/
-#ifdef HAVE_ROW_BASED_REPLICATION
/* The Sun compiler cannot instantiate the template below if this is
declared static, but it works by putting it into an anonymous
namespace. */
@@ -3626,7 +3625,6 @@ namespace
binlog_log_row<Update_rows_log_event>(TABLE *, const byte *, const byte *);
}
-#endif /* HAVE_ROW_BASED_REPLICATION */
int handler::ha_external_lock(THD *thd, int lock_type)
{
@@ -3667,10 +3665,8 @@ int handler::ha_write_row(byte *buf)
int error;
if (unlikely(error= write_row(buf)))
return error;
-#ifdef HAVE_ROW_BASED_REPLICATION
if (unlikely(error= binlog_log_row<Write_rows_log_event>(table, 0, buf)))
return error;
-#endif
return 0;
}
@@ -3686,10 +3682,8 @@ int handler::ha_update_row(const byte *old_data, byte *new_data)
if (unlikely(error= update_row(old_data, new_data)))
return error;
-#ifdef HAVE_ROW_BASED_REPLICATION
if (unlikely(error= binlog_log_row<Update_rows_log_event>(table, old_data, new_data)))
return error;
-#endif
return 0;
}
@@ -3698,10 +3692,8 @@ int handler::ha_delete_row(const byte *buf)
int error;
if (unlikely(error= delete_row(buf)))
return error;
-#ifdef HAVE_ROW_BASED_REPLICATION
if (unlikely(error= binlog_log_row<Delete_rows_log_event>(table, buf, 0)))
return error;
-#endif
return 0;
}
diff --git a/sql/item.cc b/sql/item.cc
index 83be426d8b5..7ba5ab3e09d 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -4639,18 +4639,31 @@ my_decimal *Item_hex_string::val_decimal(my_decimal *decimal_value)
int Item_hex_string::save_in_field(Field *field, bool no_conversions)
{
- int error;
field->set_notnull();
if (field->result_type() == STRING_RESULT)
+ return field->store(str_value.ptr(), str_value.length(),
+ collation.collation);
+
+ ulonglong nr;
+ uint32 length= str_value.length();
+ if (length > 8)
{
- error=field->store(str_value.ptr(),str_value.length(),collation.collation);
+ nr= field->flags & UNSIGNED_FLAG ? ULONGLONG_MAX : LONGLONG_MAX;
+ goto warn;
}
- else
+ nr= (ulonglong) val_int();
+ if ((length == 8) && !(field->flags & UNSIGNED_FLAG) && (nr > LONGLONG_MAX))
{
- longlong nr=val_int();
- error=field->store(nr, TRUE); // Assume hex numbers are unsigned
+ nr= LONGLONG_MAX;
+ goto warn;
}
- return error;
+ return field->store((longlong) nr, TRUE); // Assume hex numbers are unsigned
+
+warn:
+ if (!field->store((longlong) nr, TRUE))
+ field->set_warning(MYSQL_ERROR::WARN_LEVEL_WARN, ER_WARN_DATA_OUT_OF_RANGE,
+ 1);
+ return 1;
}
diff --git a/sql/item_create.cc b/sql/item_create.cc
index b7656fc8c4f..ff5825ef389 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -2341,9 +2341,7 @@ Create_udf_func::create(THD *thd, udf_func *udf, List<Item> *item_list)
if (item_list != NULL)
arg_count= item_list->elements;
-#ifdef HAVE_ROW_BASED_REPLICATION
thd->lex->binlog_row_based_if_mixed= TRUE;
-#endif
DBUG_ASSERT( (udf->type == UDFTYPE_FUNCTION)
|| (udf->type == UDFTYPE_AGGREGATE));
@@ -4532,9 +4530,7 @@ Create_func_uuid Create_func_uuid::s_singleton;
Item*
Create_func_uuid::create(THD *thd)
{
-#ifdef HAVE_ROW_BASED_REPLICATION
thd->lex->binlog_row_based_if_mixed= TRUE;
-#endif
return new (thd->mem_root) Item_func_uuid();
}
diff --git a/sql/item_sum.cc b/sql/item_sum.cc
index 624e3c74202..99053587de5 100644
--- a/sql/item_sum.cc
+++ b/sql/item_sum.cc
@@ -1124,7 +1124,7 @@ Field *Item_sum_avg::create_tmp_field(bool group, TABLE *table,
{
/*
We must store both value and counter in the temporary table in one field.
- The easyest way is to do this is to store both value in a string
+ The easiest way is to do this is to store both value in a string
and unpack on access.
*/
field= new Field_string(((hybrid_type == DECIMAL_RESULT) ?
@@ -1202,8 +1202,9 @@ String *Item_sum_avg::val_str(String *str)
double Item_sum_std::val_real()
{
DBUG_ASSERT(fixed == 1);
- double tmp= Item_sum_variance::val_real();
- return tmp <= 0.0 ? 0.0 : sqrt(tmp);
+ double nr= Item_sum_variance::val_real();
+ DBUG_ASSERT(nr >= 0.0);
+ return sqrt(nr);
}
Item *Item_sum_std::copy_or_same(THD* thd)
@@ -1217,40 +1218,77 @@ Item *Item_sum_std::copy_or_same(THD* thd)
*/
-Item_sum_variance::Item_sum_variance(THD *thd, Item_sum_variance *item):
- Item_sum_num(thd, item), hybrid_type(item->hybrid_type),
- cur_dec(item->cur_dec), count(item->count), sample(item->sample),
- prec_increment(item->prec_increment)
+/**
+ Variance implementation for floating-point implementations, without
+ catastrophic cancellation, from Knuth's _TAoCP_, 3rd ed, volume 2, pg232.
+ This alters the value at m, s, and increments count.
+*/
+
+/*
+ These two functions are used by the Item_sum_variance and the
+ Item_variance_field classes, which are unrelated, and each need to calculate
+ variance. The difference between the two classes is that the first is used
+ for a mundane SELECT, while the latter is used in a GROUPing SELECT.
+*/
+static void variance_fp_recurrence_next(double *m, double *s, ulonglong *count, double nr)
{
- if (hybrid_type == DECIMAL_RESULT)
+ *count += 1;
+
+ if (*count == 1)
{
- memcpy(dec_sum, item->dec_sum, sizeof(item->dec_sum));
- memcpy(dec_sqr, item->dec_sqr, sizeof(item->dec_sqr));
- for (int i=0; i<2; i++)
- {
- dec_sum[i].fix_buffer_pointer();
- dec_sqr[i].fix_buffer_pointer();
- }
+ *m= nr;
+ *s= 0;
}
else
{
- sum= item->sum;
- sum_sqr= item->sum_sqr;
+ double m_kminusone= *m;
+ *m= m_kminusone + (nr - m_kminusone) / (double) *count;
+ *s= *s + (nr - m_kminusone) * (nr - *m);
}
}
+static double variance_fp_recurrence_result(double s, ulonglong count, bool is_sample_variance)
+{
+ if (count == 1)
+ return 0.0;
+
+ if (is_sample_variance)
+ return s / (count - 1);
+
+ /* else, is a population variance */
+ return s / count;
+}
+
+
+Item_sum_variance::Item_sum_variance(THD *thd, Item_sum_variance *item):
+ Item_sum_num(thd, item), hybrid_type(item->hybrid_type),
+ count(item->count), sample(item->sample),
+ prec_increment(item->prec_increment)
+{
+ recurrence_m= item->recurrence_m;
+ recurrence_s= item->recurrence_s;
+}
+
+
void Item_sum_variance::fix_length_and_dec()
{
DBUG_ENTER("Item_sum_variance::fix_length_and_dec");
maybe_null= null_value= 1;
prec_increment= current_thd->variables.div_precincrement;
+
+ /*
+ According to the SQL2003 standard (Part 2, Foundations; sec 10.9,
+ aggregate function; paragraph 7h of Syntax Rules), "the declared
+ type of the result is an implementation-defined aproximate numeric
+ type.
+ */
+ hybrid_type= REAL_RESULT;
+
switch (args[0]->result_type()) {
case REAL_RESULT:
case STRING_RESULT:
decimals= min(args[0]->decimals + 4, NOT_FIXED_DEC);
- hybrid_type= REAL_RESULT;
- sum= 0.0;
break;
case INT_RESULT:
case DECIMAL_RESULT:
@@ -1259,37 +1297,14 @@ void Item_sum_variance::fix_length_and_dec()
decimals= min(args[0]->decimals + prec_increment, DECIMAL_MAX_SCALE);
max_length= my_decimal_precision_to_length(precision, decimals,
unsigned_flag);
- cur_dec= 0;
- hybrid_type= DECIMAL_RESULT;
- my_decimal_set_zero(dec_sum);
- my_decimal_set_zero(dec_sqr);
- /*
- The maxium value to usable for variance is DECIMAL_MAX_LENGTH/2
- becasue we need to be able to calculate in dec_bin_size1
- column_value * column_value
- */
- f_scale0= args[0]->decimals;
- f_precision0= min(args[0]->decimal_precision() + DECIMAL_LONGLONG_DIGITS,
- DECIMAL_MAX_PRECISION);
- f_scale1= min(args[0]->decimals * 2, DECIMAL_MAX_SCALE);
- f_precision1= min(args[0]->decimal_precision()*2 + DECIMAL_LONGLONG_DIGITS,
- DECIMAL_MAX_PRECISION);
- dec_bin_size0= my_decimal_get_binary_size(f_precision0, f_scale0);
- dec_bin_size1= my_decimal_get_binary_size(f_precision1, f_scale1);
break;
}
case ROW_RESULT:
default:
DBUG_ASSERT(0);
}
- DBUG_PRINT("info", ("Type: %s (%d, %d)",
- (hybrid_type == REAL_RESULT ? "REAL_RESULT" :
- hybrid_type == DECIMAL_RESULT ? "DECIMAL_RESULT" :
- hybrid_type == INT_RESULT ? "INT_RESULT" :
- "--ILLEGAL!!!--"),
- max_length,
- (int)decimals));
+ DBUG_PRINT("info", ("Type: REAL_RESULT (%d, %d)", max_length, (int)decimals));
DBUG_VOID_RETURN;
}
@@ -1300,6 +1315,11 @@ Item *Item_sum_variance::copy_or_same(THD* thd)
}
+/**
+ Create a new field to match the type of value we're expected to yield.
+ If we're grouping, then we need some space to serialize variables into, to
+ pass around.
+*/
Field *Item_sum_variance::create_tmp_field(bool group, TABLE *table,
uint convert_blob_len)
{
@@ -1308,110 +1328,68 @@ Field *Item_sum_variance::create_tmp_field(bool group, TABLE *table,
{
/*
We must store both value and counter in the temporary table in one field.
- The easyest way is to do this is to store both value in a string
+ The easiest way is to do this is to store both value in a string
and unpack on access.
*/
- field= new Field_string(((hybrid_type == DECIMAL_RESULT) ?
- dec_bin_size0 + dec_bin_size1 :
- sizeof(double)*2) + sizeof(longlong),
- 0, name, &my_charset_bin);
+ field= new Field_string(sizeof(double)*2 + sizeof(longlong), 0, name, &my_charset_bin);
}
else
- {
- field= new Field_double(max_length, maybe_null,name, decimals);
- }
- if (field)
+ field= new Field_double(max_length, maybe_null, name, decimals);
+
+ if (field != NULL)
field->init(table);
+
return field;
}
void Item_sum_variance::clear()
{
- if (hybrid_type == DECIMAL_RESULT)
- {
- my_decimal_set_zero(dec_sum);
- my_decimal_set_zero(dec_sqr);
- cur_dec= 0;
- }
- else
- sum=sum_sqr=0.0;
- count=0;
+ count= 0;
}
bool Item_sum_variance::add()
{
- if (hybrid_type == DECIMAL_RESULT)
- {
- my_decimal dec_buf, *dec= args[0]->val_decimal(&dec_buf);
- my_decimal sqr_buf;
- if (!args[0]->null_value)
- {
- count++;
- int next_dec= cur_dec ^ 1;
- my_decimal_mul(E_DEC_FATAL_ERROR, &sqr_buf, dec, dec);
- my_decimal_add(E_DEC_FATAL_ERROR, dec_sqr+next_dec,
- dec_sqr+cur_dec, &sqr_buf);
- my_decimal_add(E_DEC_FATAL_ERROR, dec_sum+next_dec,
- dec_sum+cur_dec, dec);
- cur_dec= next_dec;
- }
- }
- else
- {
- double nr= args[0]->val_real();
- if (!args[0]->null_value)
- {
- sum+=nr;
- sum_sqr+=nr*nr;
- count++;
- }
- }
+ /*
+ Why use a temporary variable? We don't know if it is null until we
+ evaluate it, which has the side-effect of setting null_value .
+ */
+ double nr= args[0]->val_real();
+
+ if (!args[0]->null_value)
+ variance_fp_recurrence_next(&recurrence_m, &recurrence_s, &count, nr);
return 0;
}
double Item_sum_variance::val_real()
{
DBUG_ASSERT(fixed == 1);
- if (hybrid_type == DECIMAL_RESULT)
- return val_real_from_decimal();
+ /*
+ 'sample' is a 1/0 boolean value. If it is 1/true, id est this is a sample
+ variance call, then we should set nullness when the count of the items
+ is one or zero. If it's zero, i.e. a population variance, then we only
+ set nullness when the count is zero.
+
+ Another way to read it is that 'sample' is the numerical threshhold, at and
+ below which a 'count' number of items is called NULL.
+ */
+ DBUG_ASSERT((sample == 0) || (sample == 1));
if (count <= sample)
{
null_value=1;
return 0.0;
}
+
null_value=0;
- /* Avoid problems when the precision isn't good enough */
- double tmp=ulonglong2double(count);
- double tmp2= (sum_sqr - sum*sum/tmp)/(tmp - (double)sample);
- return tmp2 <= 0.0 ? 0.0 : tmp2;
+ return variance_fp_recurrence_result(recurrence_s, count, sample);
}
my_decimal *Item_sum_variance::val_decimal(my_decimal *dec_buf)
{
- my_decimal count_buf, count1_buf, sum_sqr_buf;
- DBUG_ASSERT(fixed ==1 );
- if (hybrid_type == REAL_RESULT)
- return val_decimal_from_real(dec_buf);
-
- if (count <= sample)
- {
- null_value= 1;
- return 0;
- }
- null_value= 0;
- int2my_decimal(E_DEC_FATAL_ERROR, count, 0, &count_buf);
- int2my_decimal(E_DEC_FATAL_ERROR, count-sample, 0, &count1_buf);
- my_decimal_mul(E_DEC_FATAL_ERROR, &sum_sqr_buf,
- dec_sum+cur_dec, dec_sum+cur_dec);
- my_decimal_div(E_DEC_FATAL_ERROR, dec_buf,
- &sum_sqr_buf, &count_buf, prec_increment);
- my_decimal_sub(E_DEC_FATAL_ERROR, &sum_sqr_buf, dec_sqr+cur_dec, dec_buf);
- my_decimal_div(E_DEC_FATAL_ERROR, dec_buf,
- &sum_sqr_buf, &count1_buf, prec_increment);
- return dec_buf;
+ DBUG_ASSERT(fixed == 1);
+ return val_decimal_from_real(dec_buf);
}
@@ -1420,89 +1398,44 @@ void Item_sum_variance::reset_field()
double nr;
char *res= result_field->ptr;
- if (hybrid_type == DECIMAL_RESULT)
- {
- my_decimal value, *arg_dec, *arg2_dec;
- longlong tmp;
-
- arg_dec= args[0]->val_decimal(&value);
- if (args[0]->null_value)
- {
- arg_dec= arg2_dec= &decimal_zero;
- tmp= 0;
- }
- else
- {
- my_decimal_mul(E_DEC_FATAL_ERROR, dec_sum, arg_dec, arg_dec);
- arg2_dec= dec_sum;
- tmp= 1;
- }
- my_decimal2binary(E_DEC_FATAL_ERROR, arg_dec,
- res, f_precision0, f_scale0);
- my_decimal2binary(E_DEC_FATAL_ERROR, arg2_dec,
- res+dec_bin_size0, f_precision1, f_scale1);
- res+= dec_bin_size0 + dec_bin_size1;
- int8store(res,tmp);
- return;
- }
- nr= args[0]->val_real();
+ nr= args[0]->val_real(); /* sets null_value as side-effect */
if (args[0]->null_value)
bzero(res,sizeof(double)*2+sizeof(longlong));
else
{
- longlong tmp;
- float8store(res,nr);
- nr*=nr;
- float8store(res+sizeof(double),nr);
- tmp= 1;
- int8store(res+sizeof(double)*2,tmp);
+ /* Serialize format is (double)m, (double)s, (longlong)count */
+ ulonglong tmp_count;
+ double tmp_s;
+ float8store(res, nr); /* recurrence variable m */
+ tmp_s= 0.0;
+ float8store(res + sizeof(double), tmp_s);
+ tmp_count= 1;
+ int8store(res + sizeof(double)*2, tmp_count);
}
}
void Item_sum_variance::update_field()
{
- longlong field_count;
+ ulonglong field_count;
char *res=result_field->ptr;
- if (hybrid_type == DECIMAL_RESULT)
- {
- my_decimal value, *arg_val= args[0]->val_decimal(&value);
- if (!args[0]->null_value)
- {
- binary2my_decimal(E_DEC_FATAL_ERROR, res,
- dec_sum+1, f_precision0, f_scale0);
- binary2my_decimal(E_DEC_FATAL_ERROR, res+dec_bin_size0,
- dec_sqr+1, f_precision1, f_scale1);
- field_count= sint8korr(res + (dec_bin_size0 + dec_bin_size1));
- my_decimal_add(E_DEC_FATAL_ERROR, dec_sum, arg_val, dec_sum+1);
- my_decimal_mul(E_DEC_FATAL_ERROR, dec_sum+1, arg_val, arg_val);
- my_decimal_add(E_DEC_FATAL_ERROR, dec_sqr, dec_sqr+1, dec_sum+1);
- field_count++;
- my_decimal2binary(E_DEC_FATAL_ERROR, dec_sum,
- res, f_precision0, f_scale0);
- my_decimal2binary(E_DEC_FATAL_ERROR, dec_sqr,
- res+dec_bin_size0, f_precision1, f_scale1);
- res+= dec_bin_size0 + dec_bin_size1;
- int8store(res, field_count);
- }
+
+ double nr= args[0]->val_real(); /* sets null_value as side-effect */
+
+ if (args[0]->null_value)
return;
- }
- double nr,old_nr,old_sqr;
- float8get(old_nr, res);
- float8get(old_sqr, res+sizeof(double));
+ /* Serialize format is (double)m, (double)s, (longlong)count */
+ double field_recurrence_m, field_recurrence_s;
+ float8get(field_recurrence_m, res);
+ float8get(field_recurrence_s, res + sizeof(double));
field_count=sint8korr(res+sizeof(double)*2);
- nr= args[0]->val_real();
- if (!args[0]->null_value)
- {
- old_nr+=nr;
- old_sqr+=nr*nr;
- field_count++;
- }
- float8store(res,old_nr);
- float8store(res+sizeof(double),old_sqr);
+ variance_fp_recurrence_next(&field_recurrence_m, &field_recurrence_s, &field_count, nr);
+
+ float8store(res, field_recurrence_m);
+ float8store(res + sizeof(double), field_recurrence_s);
res+= sizeof(double)*2;
int8store(res,field_count);
}
@@ -2329,25 +2262,9 @@ double Item_std_field::val_real()
{
double nr;
// fix_fields() never calls for this Item
- if (hybrid_type == REAL_RESULT)
- {
- /*
- We can't call Item_variance_field::val_real() on a DECIMAL_RESULT
- as this would call Item_std_field::val_decimal() and we would
- calculate sqrt() twice
- */
- nr= Item_variance_field::val_real();
- }
- else
- {
- my_decimal dec_buf,*dec;
- dec= Item_variance_field::val_decimal(&dec_buf);
- if (!dec)
- nr= 0.0; // NULL; Return 0.0
- else
- my_decimal2double(E_DEC_FATAL_ERROR, dec, &nr);
- }
- return nr <= 0.0 ? 0.0 : sqrt(nr);
+ nr= Item_variance_field::val_real();
+ DBUG_ASSERT(nr >= 0.0);
+ return sqrt(nr);
}
@@ -2361,11 +2278,13 @@ my_decimal *Item_std_field::val_decimal(my_decimal *dec_buf)
double nr;
if (hybrid_type == REAL_RESULT)
return val_decimal_from_real(dec_buf);
+
dec= Item_variance_field::val_decimal(dec_buf);
if (!dec)
return 0;
my_decimal2double(E_DEC_FATAL_ERROR, dec, &nr);
- nr= nr <= 0.0 ? 0.0 : sqrt(nr);
+ DBUG_ASSERT(nr >= 0.0);
+ nr= sqrt(nr);
double2my_decimal(E_DEC_FATAL_ERROR, nr, &tmp_dec);
my_decimal_round(E_DEC_FATAL_ERROR, &tmp_dec, decimals, FALSE, dec_buf);
return dec_buf;
@@ -2400,52 +2319,15 @@ double Item_variance_field::val_real()
if (hybrid_type == DECIMAL_RESULT)
return val_real_from_decimal();
- double sum,sum_sqr;
- longlong count;
- float8get(sum,field->ptr);
- float8get(sum_sqr,(field->ptr+sizeof(double)));
+ double recurrence_s;
+ ulonglong count;
+ float8get(recurrence_s, (field->ptr + sizeof(double)));
count=sint8korr(field->ptr+sizeof(double)*2);
if ((null_value= (count <= sample)))
return 0.0;
- double tmp= (double) count;
- double tmp2= (sum_sqr - sum*sum/tmp)/(tmp - (double)sample);
- return tmp2 <= 0.0 ? 0.0 : tmp2;
-}
-
-
-String *Item_variance_field::val_str(String *str)
-{
- if (hybrid_type == DECIMAL_RESULT)
- return val_string_from_decimal(str);
- return val_string_from_real(str);
-}
-
-
-my_decimal *Item_variance_field::val_decimal(my_decimal *dec_buf)
-{
- // fix_fields() never calls for this Item
- if (hybrid_type == REAL_RESULT)
- return val_decimal_from_real(dec_buf);
-
- longlong count= sint8korr(field->ptr+dec_bin_size0+dec_bin_size1);
- if ((null_value= (count <= sample)))
- return 0;
-
- my_decimal dec_count, dec1_count, dec_sum, dec_sqr, tmp;
- int2my_decimal(E_DEC_FATAL_ERROR, count, 0, &dec_count);
- int2my_decimal(E_DEC_FATAL_ERROR, count-sample, 0, &dec1_count);
- binary2my_decimal(E_DEC_FATAL_ERROR, field->ptr,
- &dec_sum, f_precision0, f_scale0);
- binary2my_decimal(E_DEC_FATAL_ERROR, field->ptr+dec_bin_size0,
- &dec_sqr, f_precision1, f_scale1);
- my_decimal_mul(E_DEC_FATAL_ERROR, &tmp, &dec_sum, &dec_sum);
- my_decimal_div(E_DEC_FATAL_ERROR, dec_buf, &tmp, &dec_count, prec_increment);
- my_decimal_sub(E_DEC_FATAL_ERROR, &dec_sum, &dec_sqr, dec_buf);
- my_decimal_div(E_DEC_FATAL_ERROR, dec_buf,
- &dec_sum, &dec1_count, prec_increment);
- return dec_buf;
+ return variance_fp_recurrence_result(recurrence_s, count, sample);
}
diff --git a/sql/item_sum.h b/sql/item_sum.h
index fdc13a36874..4cf16fc79af 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -682,8 +682,10 @@ public:
double val_real();
longlong val_int()
{ /* can't be fix_fields()ed */ return (longlong) rint(val_real()); }
- String *val_str(String*);
- my_decimal *val_decimal(my_decimal *);
+ String *val_str(String *str)
+ { return val_string_from_real(str); }
+ my_decimal *val_decimal(my_decimal *dec_buf)
+ { return val_decimal_from_real(dec_buf); }
bool is_null() { update_null_value(); return null_value; }
enum_field_types field_type() const
{
@@ -705,6 +707,14 @@ public:
= (sum(ai^2) - 2*sum(a)*sum(a)/count(a) + count(a)*sum(a)^2/count(a)^2 )/count(a) =
= (sum(ai^2) - 2*sum(a)^2/count(a) + sum(a)^2/count(a) )/count(a) =
= (sum(ai^2) - sum(a)^2/count(a))/count(a)
+
+But, this falls prey to catastrophic cancellation. Instead, use the recurrence formulas
+
+ M_{1} = x_{1}, ~ M_{k} = M_{k-1} + (x_{k} - M_{k-1}) / k newline
+ S_{1} = 0, ~ S_{k} = S_{k-1} + (x_{k} - M_{k-1}) times (x_{k} - M_{k}) newline
+ for 2 <= k <= n newline
+ ital variance = S_{n} / (n-1)
+
*/
class Item_sum_variance : public Item_sum_num
@@ -713,9 +723,8 @@ class Item_sum_variance : public Item_sum_num
public:
Item_result hybrid_type;
- double sum, sum_sqr;
- my_decimal dec_sum[2], dec_sqr[2];
int cur_dec;
+ double recurrence_m, recurrence_s; /* Used in recurrence relation. */
ulonglong count;
uint f_precision0, f_scale0;
uint f_precision1, f_scale1;
@@ -724,7 +733,7 @@ public:
uint prec_increment;
Item_sum_variance(Item *item_par, uint sample_arg) :Item_sum_num(item_par),
- hybrid_type(REAL_RESULT), cur_dec(0), count(0), sample(sample_arg)
+ hybrid_type(REAL_RESULT), count(0), sample(sample_arg)
{}
Item_sum_variance(THD *thd, Item_sum_variance *item);
enum Sumfunctype sum_func () const { return VARIANCE_FUNC; }
@@ -744,7 +753,6 @@ public:
enum Item_result result_type () const { return REAL_RESULT; }
void cleanup()
{
- cur_dec= 0;
count= 0;
Item_sum_num::cleanup();
}
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 8fb0549fb94..faeef7fd5db 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -608,16 +608,10 @@ bool make_date_time(DATE_TIME_FORMAT *format, TIME *l_time,
uint weekday;
ulong length;
const char *ptr, *end;
- MY_LOCALE *locale;
THD *thd= current_thd;
- char buf[STRING_BUFFER_USUAL_SIZE];
- String tmp(buf, sizeof(buf), thd->variables.character_set_results);
- uint errors= 0;
+ MY_LOCALE *locale= thd->variables.lc_time_names;
- tmp.length(0);
str->length(0);
- str->set_charset(&my_charset_bin);
- locale = thd->variables.lc_time_names;
if (l_time->neg)
str->append('-');
@@ -631,41 +625,37 @@ bool make_date_time(DATE_TIME_FORMAT *format, TIME *l_time,
{
switch (*++ptr) {
case 'M':
- if (!l_time->month)
- return 1;
- tmp.copy(locale->month_names->type_names[l_time->month-1],
- strlen(locale->month_names->type_names[l_time->month-1]),
- system_charset_info, tmp.charset(), &errors);
- str->append(tmp.ptr(), tmp.length());
- break;
+ if (!l_time->month)
+ return 1;
+ str->append(locale->month_names->type_names[l_time->month-1],
+ strlen(locale->month_names->type_names[l_time->month-1]),
+ system_charset_info);
+ break;
case 'b':
- if (!l_time->month)
- return 1;
- tmp.copy(locale->ab_month_names->type_names[l_time->month-1],
- strlen(locale->ab_month_names->type_names[l_time->month-1]),
- system_charset_info, tmp.charset(), &errors);
- str->append(tmp.ptr(), tmp.length());
- break;
+ if (!l_time->month)
+ return 1;
+ str->append(locale->ab_month_names->type_names[l_time->month-1],
+ strlen(locale->ab_month_names->type_names[l_time->month-1]),
+ system_charset_info);
+ break;
case 'W':
- if (type == MYSQL_TIMESTAMP_TIME)
- return 1;
- weekday= calc_weekday(calc_daynr(l_time->year,l_time->month,
- l_time->day),0);
- tmp.copy(locale->day_names->type_names[weekday],
- strlen(locale->day_names->type_names[weekday]),
- system_charset_info, tmp.charset(), &errors);
- str->append(tmp.ptr(), tmp.length());
- break;
+ if (type == MYSQL_TIMESTAMP_TIME)
+ return 1;
+ weekday= calc_weekday(calc_daynr(l_time->year,l_time->month,
+ l_time->day),0);
+ str->append(locale->day_names->type_names[weekday],
+ strlen(locale->day_names->type_names[weekday]),
+ system_charset_info);
+ break;
case 'a':
- if (type == MYSQL_TIMESTAMP_TIME)
- return 1;
- weekday=calc_weekday(calc_daynr(l_time->year,l_time->month,
- l_time->day),0);
- tmp.copy(locale->ab_day_names->type_names[weekday],
- strlen(locale->ab_day_names->type_names[weekday]),
- system_charset_info, tmp.charset(), &errors);
- str->append(tmp.ptr(), tmp.length());
- break;
+ if (type == MYSQL_TIMESTAMP_TIME)
+ return 1;
+ weekday=calc_weekday(calc_daynr(l_time->year,l_time->month,
+ l_time->day),0);
+ str->append(locale->ab_day_names->type_names[weekday],
+ strlen(locale->ab_day_names->type_names[weekday]),
+ system_charset_info);
+ break;
case 'D':
if (type == MYSQL_TIMESTAMP_TIME)
return 1;
@@ -1688,6 +1678,7 @@ longlong Item_func_sec_to_time::val_int()
void Item_func_date_format::fix_length_and_dec()
{
+ THD* thd= current_thd;
/*
Must use this_item() in case it's a local SP variable
(for ->max_length and ->str_value)
@@ -1695,22 +1686,18 @@ void Item_func_date_format::fix_length_and_dec()
Item *arg1= args[1]->this_item();
decimals=0;
- collation.set(&my_charset_bin);
+ collation.set(thd->variables.collation_connection);
if (arg1->type() == STRING_ITEM)
{ // Optimize the normal case
fixed_length=1;
-
- /*
- The result is a binary string (no reason to use collation->mbmaxlen
- This is becasue make_date_time() only returns binary strings
- */
- max_length= format_length(&arg1->str_value);
+ max_length= format_length(&arg1->str_value) *
+ collation.collation->mbmaxlen;
}
else
{
fixed_length=0;
- /* The result is a binary string (no reason to use collation->mbmaxlen */
- max_length=min(arg1->max_length, MAX_BLOB_WIDTH) * 10;
+ max_length=min(arg1->max_length, MAX_BLOB_WIDTH) * 10 *
+ collation.collation->mbmaxlen;
set_if_smaller(max_length,MAX_BLOB_WIDTH);
}
maybe_null=1; // If wrong date
@@ -1855,6 +1842,7 @@ String *Item_func_date_format::val_str(String *str)
date_time_format.format.length= format->length();
/* Create the result string */
+ str->set_charset(collation.collation);
if (!make_date_time(&date_time_format, &l_time,
is_time_format ? MYSQL_TIMESTAMP_TIME :
MYSQL_TIMESTAMP_DATE,
diff --git a/sql/log.cc b/sql/log.cc
index 150c4a58c63..1b432ca15c0 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -81,23 +81,54 @@ char *make_default_log_name(char *buff,const char* log_ext)
}
/*
+ Helper class to hold a mutex for the duration of the
+ block.
+
+ Eliminates the need for explicit unlocking of mutexes on, e.g.,
+ error returns. On passing a null pointer, the sentry will not do
+ anything.
+ */
+class Mutex_sentry
+{
+public:
+ Mutex_sentry(pthread_mutex_t *mutex)
+ : m_mutex(mutex)
+ {
+ if (m_mutex)
+ pthread_mutex_lock(mutex);
+ }
+
+ ~Mutex_sentry()
+ {
+ if (m_mutex)
+ pthread_mutex_unlock(m_mutex);
+#ifndef DBUG_OFF
+ m_mutex= 0;
+#endif
+ }
+
+private:
+ pthread_mutex_t *m_mutex;
+
+ // It's not allowed to copy this object in any way
+ Mutex_sentry(Mutex_sentry const&);
+ void operator=(Mutex_sentry const&);
+};
+
+/*
Helper class to store binary log transaction data.
*/
class binlog_trx_data {
public:
binlog_trx_data()
-#ifdef HAVE_ROW_BASED_REPLICATION
: m_pending(0), before_stmt_pos(MY_OFF_T_UNDEF)
-#endif
{
trans_log.end_of_file= max_binlog_cache_size;
}
~binlog_trx_data()
{
-#ifdef HAVE_ROW_BASED_REPLICATION
DBUG_ASSERT(pending() == NULL);
-#endif
close_cached_file(&trans_log);
}
@@ -107,11 +138,7 @@ public:
bool empty() const
{
-#ifdef HAVE_ROW_BASED_REPLICATION
return pending() == NULL && my_b_tell(&trans_log) == 0;
-#else
- return my_b_tell(&trans_log) == 0;
-#endif
}
/*
@@ -120,11 +147,13 @@ public:
*/
void truncate(my_off_t pos)
{
-#ifdef HAVE_ROW_BASED_REPLICATION
+ DBUG_PRINT("info", ("truncating to position %lu", pos));
+ DBUG_PRINT("info", ("before_stmt_pos=%lu", pos));
delete pending();
set_pending(0);
-#endif
reinit_io_cache(&trans_log, WRITE_CACHE, pos, 0, 0);
+ if (pos < before_stmt_pos)
+ before_stmt_pos= MY_OFF_T_UNDEF;
}
/*
@@ -134,13 +163,10 @@ public:
void reset() {
if (!empty())
truncate(0);
-#ifdef HAVE_ROW_BASED_REPLICATION
before_stmt_pos= MY_OFF_T_UNDEF;
-#endif
trans_log.end_of_file= max_binlog_cache_size;
}
-#ifdef HAVE_ROW_BASED_REPLICATION
Rows_log_event *pending() const
{
return m_pending;
@@ -150,12 +176,10 @@ public:
{
m_pending= pending;
}
-#endif
IO_CACHE trans_log; // The transaction cache
private:
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
Pending binrows event. This event is the event where the rows are
currently written.
@@ -167,7 +191,6 @@ public:
Binlog position before the start of the current statement.
*/
my_off_t before_stmt_pos;
-#endif
};
handlerton *binlog_hton;
@@ -1467,9 +1490,7 @@ binlog_end_trans(THD *thd, binlog_trx_data *trx_data,
were, we would have to ensure that we're not ending a statement
inside a stored function.
*/
-#ifdef HAVE_ROW_BASED_REPLICATION
thd->binlog_flush_pending_rows_event(TRUE);
-#endif
/*
We write the transaction cache to the binary log if either we're
committing the entire transaction, or if we are doing an
@@ -1479,13 +1500,11 @@ binlog_end_trans(THD *thd, binlog_trx_data *trx_data,
{
error= mysql_bin_log.write(thd, &trx_data->trans_log, end_ev);
trx_data->reset();
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
We need to step the table map version after writing the
transaction cache to disk.
*/
mysql_bin_log.update_table_map_version();
-#endif
statistic_increment(binlog_cache_use, &LOCK_status);
if (trans_log->disk_writes != 0)
{
@@ -1494,7 +1513,6 @@ binlog_end_trans(THD *thd, binlog_trx_data *trx_data,
}
}
}
-#ifdef HAVE_ROW_BASED_REPLICATION
else
{
/*
@@ -1503,12 +1521,11 @@ binlog_end_trans(THD *thd, binlog_trx_data *trx_data,
If rolling back a statement in a transaction, we truncate the
transaction cache to remove the statement.
-
*/
if (all || !(thd->options & (OPTION_BEGIN | OPTION_NOT_AUTOCOMMIT)))
trx_data->reset();
- else
- trx_data->truncate(trx_data->before_stmt_pos); // ...statement
+ else // ...statement
+ trx_data->truncate(trx_data->before_stmt_pos);
/*
We need to step the table map version on a rollback to ensure
@@ -1517,7 +1534,6 @@ binlog_end_trans(THD *thd, binlog_trx_data *trx_data,
*/
mysql_bin_log.update_table_map_version();
}
-#endif
DBUG_RETURN(error);
}
@@ -2096,7 +2112,7 @@ bool MYSQL_QUERY_LOG::write(time_t event_time, const char *user_host,
if (my_b_write(&log_file, (byte*) "\t\t" ,2) < 0)
goto err;
- /* command_type, thread_id */
+ /* command_type, thread_id */
length= my_snprintf(buff, 32, "%5ld ", (long) thread_id);
if (my_b_write(&log_file, (byte*) buff, length))
@@ -3395,7 +3411,6 @@ int THD::binlog_setup_trx_data()
DBUG_RETURN(0);
}
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
Function to start a statement and optionally a transaction for the
binary log.
@@ -3437,18 +3452,7 @@ THD::binlog_start_trans_and_stmt()
if (trx_data == NULL ||
trx_data->before_stmt_pos == MY_OFF_T_UNDEF)
{
- /*
- The call to binlog_trans_log_savepos() might create the trx_data
- structure, if it didn't exist before, so we save the position
- into an auto variable and then write it into the transaction
- data for the binary log (i.e., trx_data).
- */
- my_off_t pos= 0;
- binlog_trans_log_savepos(this, &pos);
- trx_data= (binlog_trx_data*) ha_data[binlog_hton->slot];
-
- trx_data->before_stmt_pos= pos;
-
+ this->binlog_set_stmt_begin();
if (options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN))
trans_register_ha(this, TRUE, binlog_hton);
trans_register_ha(this, FALSE, binlog_hton);
@@ -3456,6 +3460,51 @@ THD::binlog_start_trans_and_stmt()
DBUG_VOID_RETURN;
}
+void THD::binlog_set_stmt_begin() {
+ binlog_trx_data *trx_data=
+ (binlog_trx_data*) ha_data[binlog_hton->slot];
+
+ /*
+ The call to binlog_trans_log_savepos() might create the trx_data
+ structure, if it didn't exist before, so we save the position
+ into an auto variable and then write it into the transaction
+ data for the binary log (i.e., trx_data).
+ */
+ my_off_t pos= 0;
+ binlog_trans_log_savepos(this, &pos);
+ trx_data= (binlog_trx_data*) ha_data[binlog_hton->slot];
+ trx_data->before_stmt_pos= pos;
+}
+
+int THD::binlog_flush_transaction_cache()
+{
+ DBUG_ENTER("binlog_flush_transaction_cache");
+ binlog_trx_data *trx_data= (binlog_trx_data*) ha_data[binlog_hton->slot];
+ DBUG_PRINT("enter", ("trx_data=0x%lu", trx_data));
+ if (trx_data)
+ DBUG_PRINT("enter", ("trx_data->before_stmt_pos=%u",
+ trx_data->before_stmt_pos));
+
+ /*
+ Write the transaction cache to the binary log. We don't flush and
+ sync the log file since we don't know if more will be written to
+ it. If the caller want the log file sync:ed, the caller has to do
+ it.
+
+ The transaction data is only reset upon a successful write of the
+ cache to the binary log.
+ */
+
+ if (trx_data && likely(mysql_bin_log.is_open())) {
+ if (int error= mysql_bin_log.write_cache(&trx_data->trans_log, true, true))
+ DBUG_RETURN(error);
+ trx_data->reset();
+ }
+
+ DBUG_RETURN(0);
+}
+
+
/*
Write a table map to the binary log.
*/
@@ -3604,7 +3653,6 @@ MYSQL_BIN_LOG::flush_and_set_pending_rows_event(THD *thd,
DBUG_RETURN(error);
}
-#endif /*HAVE_ROW_BASED_REPLICATION*/
/*
Write an event to the binary log
@@ -3637,11 +3685,9 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info)
we are inside a stored function, we do not end the statement since
this will close all tables on the slave.
*/
-#ifdef HAVE_ROW_BASED_REPLICATION
bool const end_stmt=
thd->prelocked_mode && thd->lex->requires_prelocking();
thd->binlog_flush_pending_rows_event(end_stmt);
-#endif /*HAVE_ROW_BASED_REPLICATION*/
pthread_mutex_lock(&LOCK_log);
@@ -3671,7 +3717,7 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info)
}
#endif /* HAVE_REPLICATION */
-#if defined(USING_TRANSACTIONS) && defined(HAVE_ROW_BASED_REPLICATION)
+#if defined(USING_TRANSACTIONS)
/*
Should we write to the binlog cache or to the binlog on disk?
Write to the binlog cache if:
@@ -3706,7 +3752,7 @@ bool MYSQL_BIN_LOG::write(Log_event *event_info)
LOCK_log.
*/
}
-#endif /* USING_TRANSACTIONS && HAVE_ROW_BASED_REPLICATION */
+#endif /* USING_TRANSACTIONS */
DBUG_PRINT("info",("event type: %d",event_info->get_type_code()));
/*
@@ -3869,12 +3915,48 @@ uint MYSQL_BIN_LOG::next_file_id()
/*
+ Write the contents of a cache to the binary log.
+
+ SYNOPSIS
+ write_cache()
+ cache Cache to write to the binary log
+ lock_log True if the LOCK_log mutex should be aquired, false otherwise
+ sync_log True if the log should be flushed and sync:ed
+
+ DESCRIPTION
+ Write the contents of the cache to the binary log. The cache will
+ be reset as a READ_CACHE to be able to read the contents from it.
+ */
+
+int MYSQL_BIN_LOG::write_cache(IO_CACHE *cache, bool lock_log, bool sync_log)
+{
+ Mutex_sentry sentry(lock_log ? &LOCK_log : NULL);
+
+ if (reinit_io_cache(cache, READ_CACHE, 0, 0, 0))
+ return ER_ERROR_ON_WRITE;
+ uint bytes= my_b_bytes_in_cache(cache);
+ do
+ {
+ if (my_b_write(&log_file, cache->read_pos, bytes))
+ return ER_ERROR_ON_WRITE;
+ cache->read_pos= cache->read_end;
+ } while ((bytes= my_b_fill(cache)));
+
+ if (sync_log)
+ flush_and_sync();
+
+ return 0; // All OK
+}
+
+/*
Write a cached log entry to the binary log
SYNOPSIS
write()
thd
cache The cache to copy to the binlog
+ commit_event The commit event to print after writing the
+ contents of the cache.
NOTE
- We only come here if there is something in the cache.
@@ -3934,20 +4016,10 @@ bool MYSQL_BIN_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event)
if (qinfo.write(&log_file))
goto err;
}
- /* Read from the file used to cache the queries .*/
- if (reinit_io_cache(cache, READ_CACHE, 0, 0, 0))
- goto err;
- length=my_b_bytes_in_cache(cache);
- DBUG_EXECUTE_IF("half_binlogged_transaction", length-=100;);
- do
- {
- /* Write data to the binary log file */
- if (my_b_write(&log_file, cache->read_pos, length))
- goto err;
- cache->read_pos=cache->read_end; // Mark buffer used up
- DBUG_EXECUTE_IF("half_binlogged_transaction", goto DBUG_skip_commit;);
- } while ((length=my_b_fill(cache)));
+ if ((write_error= write_cache(cache, false, false)))
+ goto err;
+
if (commit_event && commit_event->write(&log_file))
goto err;
#ifndef DBUG_OFF
diff --git a/sql/log.h b/sql/log.h
index 13795f30647..61db7052f75 100644
--- a/sql/log.h
+++ b/sql/log.h
@@ -339,6 +339,8 @@ public:
bool write(Log_event* event_info); // binary log write
bool write(THD *thd, IO_CACHE *cache, Log_event *commit_event);
+ int write_cache(IO_CACHE *cache, bool lock_log, bool flush_and_sync);
+
void start_union_events(THD *thd);
void stop_union_events(THD *thd);
bool is_query_in_union(THD *thd, query_id_t query_id_param);
@@ -602,14 +604,12 @@ public:
enum enum_binlog_format {
BINLOG_FORMAT_STMT= 0, // statement-based
-#ifdef HAVE_ROW_BASED_REPLICATION
BINLOG_FORMAT_ROW= 1, // row_based
/*
statement-based except for cases where only row-based can work (UUID()
etc):
*/
BINLOG_FORMAT_MIXED= 2,
-#endif
/*
This value is last, after the end of binlog_format_typelib: it has no
corresponding cell in this typelib. We use this value to be able to know if
diff --git a/sql/log_event.cc b/sql/log_event.cc
index d93845603fd..82fb64bfe15 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -372,7 +372,7 @@ append_query_string(CHARSET_INFO *csinfo,
else
{
*ptr++= '\'';
- ptr+= escape_string_for_mysql(from->charset(), ptr, 0,
+ ptr+= escape_string_for_mysql(csinfo, ptr, 0,
from->ptr(), from->length());
*ptr++='\'';
}
@@ -993,7 +993,7 @@ Log_event* Log_event::read_log_event(const char* buf, uint event_len,
case FORMAT_DESCRIPTION_EVENT:
ev = new Format_description_log_event(buf, event_len, description_event);
break;
-#if defined(HAVE_REPLICATION) && defined(HAVE_ROW_BASED_REPLICATION)
+#if defined(HAVE_REPLICATION)
case WRITE_ROWS_EVENT:
ev = new Write_rows_log_event(buf, event_len, description_event);
break;
@@ -1182,7 +1182,7 @@ void Log_event::print_base64(IO_CACHE* file,
my_b_printf(file, "%s\n", tmp_str);
if (!more)
- my_b_printf(file, "';\n");
+ my_b_printf(file, "'%s\n", print_event_info->delimiter);
my_free(tmp_str, MYF(0));
DBUG_VOID_RETURN;
@@ -1288,7 +1288,8 @@ bool Query_log_event::write(IO_CACHE* file)
1+1+FN_REFLEN+ // code of catalog and catalog length and catalog
1+4+ // code of autoinc and the 2 autoinc variables
1+6+ // code of charset and charset
- 1+1+MAX_TIME_ZONE_NAME_LENGTH // code of tz and tz length and tz name
+ 1+1+MAX_TIME_ZONE_NAME_LENGTH+ // code of tz and tz length and tz name
+ 1+2 // code of lc_time_names and lc_time_names_number
], *start, *start_of_status;
ulong event_length;
@@ -1400,6 +1401,13 @@ bool Query_log_event::write(IO_CACHE* file)
memcpy(start, time_zone_str, time_zone_len);
start+= time_zone_len;
}
+ if (lc_time_names_number)
+ {
+ DBUG_ASSERT(lc_time_names_number <= 0xFFFF);
+ *start++= Q_LC_TIME_NAMES_CODE;
+ int2store(start, lc_time_names_number);
+ start+= 2;
+ }
/*
Here there could be code like
if (command-line-option-which-says-"log_this_variable" && inited)
@@ -1464,7 +1472,8 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
flags2_inited(1), sql_mode_inited(1), charset_inited(1),
sql_mode(thd_arg->variables.sql_mode),
auto_increment_increment(thd_arg->variables.auto_increment_increment),
- auto_increment_offset(thd_arg->variables.auto_increment_offset)
+ auto_increment_offset(thd_arg->variables.auto_increment_offset),
+ lc_time_names_number(thd_arg->variables.lc_time_names->number)
{
time_t end_time;
time(&end_time);
@@ -1506,23 +1515,30 @@ Query_log_event::Query_log_event(THD* thd_arg, const char* query_arg,
/* 2 utility functions for the next method */
-static void get_str_len_and_pointer(const char **dst, const char **src, uint *len)
+/*
+ Get the pointer for a string (src) that contains the length in
+ the first byte. Set the output string (dst) to the string value
+ and place the length of the string in the byte after the string.
+*/
+static void get_str_len_and_pointer(const Log_event::Byte **src,
+ const char **dst,
+ uint *len)
{
if ((*len= **src))
- *dst= *src + 1; // Will be copied later
- (*src)+= *len+1;
+ *dst= (char *)*src + 1; // Will be copied later
+ (*src)+= *len + 1;
}
-
-static void copy_str_and_move(char **dst, const char **src, uint len)
+static void copy_str_and_move(const char **src,
+ Log_event::Byte **dst,
+ uint len)
{
memcpy(*dst, *src, len);
- *src= *dst;
+ *src= (const char *)*dst;
(*dst)+= len;
*(*dst)++= 0;
}
-
/*
Query_log_event::Query_log_event()
This is used by the SQL slave thread to prepare the event before execution.
@@ -1535,13 +1551,13 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
db(NullS), catalog_len(0), status_vars_len(0),
flags2_inited(0), sql_mode_inited(0), charset_inited(0),
auto_increment_increment(1), auto_increment_offset(1),
- time_zone_len(0)
+ time_zone_len(0), lc_time_names_number(0)
{
ulong data_len;
uint32 tmp;
uint8 common_header_len, post_header_len;
- char *start;
- const char *end;
+ Log_event::Byte *start;
+ const Log_event::Byte *end;
bool catalog_nz= 1;
DBUG_ENTER("Query_log_event::Query_log_event(char*,...)");
@@ -1587,9 +1603,9 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
/* variable-part: the status vars; only in MySQL 5.0 */
- start= (char*) (buf+post_header_len);
- end= (const char*) (start+status_vars_len);
- for (const uchar* pos= (const uchar*) start; pos < (const uchar*) end;)
+ start= (Log_event::Byte*) (buf+post_header_len);
+ end= (const Log_event::Byte*) (start+status_vars_len);
+ for (const Log_event::Byte* pos= start; pos < end;)
{
switch (*pos++) {
case Q_FLAGS2_CODE:
@@ -1611,7 +1627,7 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
break;
}
case Q_CATALOG_NZ_CODE:
- get_str_len_and_pointer(&catalog, (const char **)(&pos), &catalog_len);
+ get_str_len_and_pointer(&pos, &catalog, &catalog_len);
break;
case Q_AUTO_INCREMENT:
auto_increment_increment= uint2korr(pos);
@@ -1627,7 +1643,7 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
}
case Q_TIME_ZONE_CODE:
{
- get_str_len_and_pointer(&time_zone_str, (const char **)(&pos), &time_zone_len);
+ get_str_len_and_pointer(&pos, &time_zone_str, &time_zone_len);
break;
}
case Q_CATALOG_CODE: /* for 5.0.x where 0<=x<=3 masters */
@@ -1636,6 +1652,10 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
pos+= catalog_len+2; // leap over end 0
catalog_nz= 0; // catalog has end 0 in event
break;
+ case Q_LC_TIME_NAMES_CODE:
+ lc_time_names_number= uint2korr(pos);
+ pos+= 2;
+ break;
default:
/* That's why you must write status vars in growing order of code */
DBUG_PRINT("info",("Query_log_event has unknown status vars (first has\
@@ -1645,38 +1665,38 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
}
#if !defined(MYSQL_CLIENT) && defined(HAVE_QUERY_CACHE)
- if (!(start= data_buf = (char*) my_malloc(catalog_len + 1 +
- time_zone_len + 1 +
- data_len + 1 +
- QUERY_CACHE_FLAGS_SIZE +
- db_len + 1,
- MYF(MY_WME))))
+ if (!(start= data_buf = (Log_event::Byte*) my_malloc(catalog_len + 1 +
+ time_zone_len + 1 +
+ data_len + 1 +
+ QUERY_CACHE_FLAGS_SIZE +
+ db_len + 1,
+ MYF(MY_WME))))
#else
- if (!(start= data_buf = (char*) my_malloc(catalog_len + 1 +
- time_zone_len + 1 +
- data_len + 1,
- MYF(MY_WME))))
+ if (!(start= data_buf = (Log_event::Byte*) my_malloc(catalog_len + 1 +
+ time_zone_len + 1 +
+ data_len + 1,
+ MYF(MY_WME))))
#endif
DBUG_VOID_RETURN;
if (catalog_len) // If catalog is given
{
if (likely(catalog_nz)) // true except if event comes from 5.0.0|1|2|3.
- copy_str_and_move(&start, &catalog, catalog_len);
+ copy_str_and_move(&catalog, &start, catalog_len);
else
{
memcpy(start, catalog, catalog_len+1); // copy end 0
- catalog= start;
+ catalog= (const char *)start;
start+= catalog_len+1;
}
}
if (time_zone_len)
- copy_str_and_move(&start, &time_zone_str, time_zone_len);
+ copy_str_and_move(&time_zone_str, &start, time_zone_len);
/* A 2nd variable part; this is common to all versions */
memcpy((char*) start, end, data_len); // Copy db and query
start[data_len]= '\0'; // End query with \0 (For safetly)
- db= start;
- query= start + db_len + 1;
+ db= (char *)start;
+ query= (char *)(start + db_len + 1);
q_len= data_len - db_len -1;
DBUG_VOID_RETURN;
}
@@ -1708,15 +1728,16 @@ void Query_log_event::print_query_header(IO_CACHE* file,
if (different_db= memcmp(print_event_info->db, db, db_len + 1))
memcpy(print_event_info->db, db, db_len + 1);
if (db[0] && different_db)
- my_b_printf(file, "use %s;\n", db);
+ my_b_printf(file, "use %s%s\n", db, print_event_info->delimiter);
}
end=int10_to_str((long) when, strmov(buff,"SET TIMESTAMP="),10);
- *end++=';';
+ end= strmov(end, print_event_info->delimiter);
*end++='\n';
my_b_write(file, (byte*) buff, (uint) (end-buff));
if (flags & LOG_EVENT_THREAD_SPECIFIC_F)
- my_b_printf(file,"SET @@session.pseudo_thread_id=%lu;\n",(ulong)thread_id);
+ my_b_printf(file,"SET @@session.pseudo_thread_id=%lu%s\n",
+ (ulong)thread_id, print_event_info->delimiter);
/*
If flags2_inited==0, this is an event from 3.23 or 4.0; nothing to
@@ -1745,7 +1766,7 @@ void Query_log_event::print_query_header(IO_CACHE* file,
"@@session.sql_auto_is_null", &need_comma);
print_set_option(file, tmp, OPTION_RELAXED_UNIQUE_CHECKS, ~flags2,
"@@session.unique_checks", &need_comma);
- my_b_printf(file,";\n");
+ my_b_printf(file,"%s\n", print_event_info->delimiter);
print_event_info->flags2= flags2;
}
}
@@ -1773,15 +1794,17 @@ void Query_log_event::print_query_header(IO_CACHE* file,
}
if (unlikely(print_event_info->sql_mode != sql_mode))
{
- my_b_printf(file,"SET @@session.sql_mode=%lu;\n",(ulong)sql_mode);
+ my_b_printf(file,"SET @@session.sql_mode=%lu%s\n",
+ (ulong)sql_mode, print_event_info->delimiter);
print_event_info->sql_mode= sql_mode;
}
}
if (print_event_info->auto_increment_increment != auto_increment_increment ||
print_event_info->auto_increment_offset != auto_increment_offset)
{
- my_b_printf(file,"SET @@session.auto_increment_increment=%lu, @@session.auto_increment_offset=%lu;\n",
- auto_increment_increment,auto_increment_offset);
+ my_b_printf(file,"SET @@session.auto_increment_increment=%lu, @@session.auto_increment_offset=%lu%s\n",
+ auto_increment_increment,auto_increment_offset,
+ print_event_info->delimiter);
print_event_info->auto_increment_increment= auto_increment_increment;
print_event_info->auto_increment_offset= auto_increment_offset;
}
@@ -1801,16 +1824,18 @@ void Query_log_event::print_query_header(IO_CACHE* file,
if (cs_info)
{
/* for mysql client */
- my_b_printf(file, "/*!\\C %s */;\n", cs_info->csname);
+ my_b_printf(file, "/*!\\C %s */%s\n",
+ cs_info->csname, print_event_info->delimiter);
}
my_b_printf(file,"SET "
"@@session.character_set_client=%d,"
"@@session.collation_connection=%d,"
"@@session.collation_server=%d"
- ";\n",
+ "%s\n",
uint2korr(charset),
uint2korr(charset+2),
- uint2korr(charset+4));
+ uint2korr(charset+4),
+ print_event_info->delimiter);
memcpy(print_event_info->charset, charset, 6);
}
}
@@ -1818,10 +1843,17 @@ void Query_log_event::print_query_header(IO_CACHE* file,
{
if (bcmp(print_event_info->time_zone_str, time_zone_str, time_zone_len+1))
{
- my_b_printf(file,"SET @@session.time_zone='%s';\n", time_zone_str);
+ my_b_printf(file,"SET @@session.time_zone='%s'%s\n",
+ time_zone_str, print_event_info->delimiter);
memcpy(print_event_info->time_zone_str, time_zone_str, time_zone_len+1);
}
}
+ if (lc_time_names_number != print_event_info->lc_time_names_number)
+ {
+ my_b_printf(file, "SET @@session.lc_time_names=%d%s\n",
+ lc_time_names_number, print_event_info->delimiter);
+ print_event_info->lc_time_names_number= lc_time_names_number;
+ }
}
@@ -1831,7 +1863,7 @@ void Query_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
print_query_header(&cache, print_event_info);
my_b_write(&cache, (byte*) query, q_len);
- my_b_printf(&cache, ";\n");
+ my_b_printf(&cache, "%s\n", print_event_info->delimiter);
}
#endif /* MYSQL_CLIENT */
@@ -1964,6 +1996,19 @@ int Query_log_event::exec_event(struct st_relay_log_info* rli,
goto compare_errors;
}
}
+ if (lc_time_names_number)
+ {
+ if (!(thd->variables.lc_time_names=
+ my_locale_by_number(lc_time_names_number)))
+ {
+ my_printf_error(ER_UNKNOWN_ERROR,
+ "Unknown locale: '%d'", MYF(0), lc_time_names_number);
+ thd->variables.lc_time_names= &my_locale_en_US;
+ goto compare_errors;
+ }
+ }
+ else
+ thd->variables.lc_time_names= &my_locale_en_US;
/* Execute the query (note that we bypass dispatch_command()) */
mysql_parse(thd, thd->query, thd->query_length);
@@ -2188,9 +2233,9 @@ void Start_log_event_v3::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
and rollback unfinished transaction.
Probably this can be done with RESET CONNECTION (syntax to be defined).
*/
- my_b_printf(&cache,"RESET CONNECTION;\n");
+ my_b_printf(&cache,"RESET CONNECTION%s\n", print_event_info->delimiter);
#else
- my_b_printf(&cache,"ROLLBACK;\n");
+ my_b_printf(&cache,"ROLLBACK%s\n", print_event_info->delimiter);
#endif
}
DBUG_VOID_RETURN;
@@ -2945,15 +2990,16 @@ void Load_log_event::print(FILE* file_arg, PRINT_EVENT_INFO* print_event_info,
}
if (db && db[0] && different_db)
- my_b_printf(&cache, "%suse %s;\n",
+ my_b_printf(&cache, "%suse %s%s\n",
commented ? "# " : "",
- db);
+ db, print_event_info->delimiter);
if (flags & LOG_EVENT_THREAD_SPECIFIC_F)
- my_b_printf(&cache,"%sSET @@session.pseudo_thread_id=%lu;\n",
- commented ? "# " : "", (ulong)thread_id);
+ my_b_printf(&cache,"%sSET @@session.pseudo_thread_id=%lu%s\n",
+ commented ? "# " : "", (ulong)thread_id,
+ print_event_info->delimiter);
my_b_printf(&cache, "%sLOAD DATA ",
- commented ? "# " : "");
+ commented ? "# " : "");
if (check_fname_outside_temp_buf())
my_b_printf(&cache, "LOCAL ");
my_b_printf(&cache, "INFILE '%-*s' ", fname_len, fname);
@@ -3003,7 +3049,7 @@ void Load_log_event::print(FILE* file_arg, PRINT_EVENT_INFO* print_event_info,
my_b_printf(&cache, ")");
}
- my_b_printf(&cache, ";\n");
+ my_b_printf(&cache, "%s\n", print_event_info->delimiter);
DBUG_VOID_RETURN;
}
#endif /* MYSQL_CLIENT */
@@ -3582,7 +3628,8 @@ void Intvar_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
msg="INVALID_INT";
break;
}
- my_b_printf(&cache, "%s=%s;\n", msg, llstr(val,llbuff));
+ my_b_printf(&cache, "%s=%s%s\n",
+ msg, llstr(val,llbuff), print_event_info->delimiter);
}
#endif
@@ -3660,8 +3707,9 @@ void Rand_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
print_header(&cache, print_event_info, FALSE);
my_b_printf(&cache, "\tRand\n");
}
- my_b_printf(&cache, "SET @@RAND_SEED1=%s, @@RAND_SEED2=%s;\n",
- llstr(seed1, llbuff),llstr(seed2, llbuff2));
+ my_b_printf(&cache, "SET @@RAND_SEED1=%s, @@RAND_SEED2=%s%s\n",
+ llstr(seed1, llbuff),llstr(seed2, llbuff2),
+ print_event_info->delimiter);
}
#endif /* MYSQL_CLIENT */
@@ -3734,7 +3782,7 @@ void Xid_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
print_header(&cache, print_event_info, FALSE);
my_b_printf(&cache, "\tXid = %s\n", buf);
}
- my_b_printf(&cache, "COMMIT;\n");
+ my_b_printf(&cache, "COMMIT%s\n", print_event_info->delimiter);
}
#endif /* MYSQL_CLIENT */
@@ -3939,7 +3987,7 @@ void User_var_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
if (is_null)
{
- my_b_printf(&cache, ":=NULL;\n");
+ my_b_printf(&cache, ":=NULL%s\n", print_event_info->delimiter);
}
else
{
@@ -3947,12 +3995,12 @@ void User_var_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
case REAL_RESULT:
double real_val;
float8get(real_val, val);
- my_b_printf(&cache, ":=%.14g;\n", real_val);
+ my_b_printf(&cache, ":=%.14g%s\n", real_val, print_event_info->delimiter);
break;
case INT_RESULT:
char int_buf[22];
longlong10_to_str(uint8korr(val), int_buf, -10);
- my_b_printf(&cache, ":=%s;\n", int_buf);
+ my_b_printf(&cache, ":=%s%s\n", int_buf, print_event_info->delimiter);
break;
case DECIMAL_RESULT:
{
@@ -3968,7 +4016,7 @@ void User_var_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
bin2decimal(val+2, &dec, precision, scale);
decimal2string(&dec, str_buf, &str_len, 0, 0, 0);
str_buf[str_len]= 0;
- my_b_printf(&cache, ":=%s;\n",str_buf);
+ my_b_printf(&cache, ":=%s%s\n", str_buf, print_event_info->delimiter);
break;
}
case STRING_RESULT:
@@ -4004,9 +4052,11 @@ void User_var_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
Generate an unusable command (=> syntax error) is probably the best
thing we can do here.
*/
- my_b_printf(&cache, ":=???;\n");
+ my_b_printf(&cache, ":=???%s\n", print_event_info->delimiter);
else
- my_b_printf(&cache, ":=_%s %s COLLATE `%s`;\n", cs->csname, hex_str, cs->name);
+ my_b_printf(&cache, ":=_%s %s COLLATE `%s`%s\n",
+ cs->csname, hex_str, cs->name,
+ print_event_info->delimiter);
my_afree(hex_str);
}
break;
@@ -5108,12 +5158,12 @@ void Execute_load_query_log_event::print(FILE* file,
my_b_printf(&cache, " REPLACE");
my_b_printf(&cache, " INTO");
my_b_write(&cache, (byte*) query + fn_pos_end, q_len-fn_pos_end);
- my_b_printf(&cache, ";\n");
+ my_b_printf(&cache, "%s\n", print_event_info->delimiter);
}
else
{
my_b_write(&cache, (byte*) query, q_len);
- my_b_printf(&cache, ";\n");
+ my_b_printf(&cache, "%s\n", print_event_info->delimiter);
}
if (!print_event_info->short_form)
@@ -5287,8 +5337,6 @@ char* sql_ex_info::init(char* buf,char* buf_end,bool use_new_format)
}
-#ifdef HAVE_ROW_BASED_REPLICATION
-
/**************************************************************************
Rows_log_event member functions
**************************************************************************/
@@ -5558,8 +5606,8 @@ unpack_row(RELAY_LOG_INFO *rli,
if (bitmap_is_set(cols, field_ptr - begin_ptr))
{
DBUG_ASSERT((const char *)table->record[0] <= f->ptr);
- DBUG_ASSERT(f->ptr < ((const char *)table->record[0] + table->s->reclength +
- (f->pack_length_in_rec() == 0)));
+ DBUG_ASSERT(f->ptr < (char*)(table->record[0] + table->s->reclength +
+ (f->pack_length_in_rec() == 0)));
DBUG_PRINT("info", ("unpacking column '%s' to 0x%lx", f->field_name,
(long) f->ptr));
@@ -6582,10 +6630,13 @@ copy_extra_record_fields(TABLE *table,
case MYSQL_TYPE_BIT:
Field_bit *f= static_cast<Field_bit*>(*field_ptr);
- my_ptrdiff_t const offset= table->record[1] - table->record[0];
- uchar const bits=
- get_rec_bits(f->bit_ptr + offset, f->bit_ofs, f->bit_len);
- set_rec_bits(bits, f->bit_ptr, f->bit_ofs, f->bit_len);
+ if (f->bit_len > 0)
+ {
+ my_ptrdiff_t const offset= table->record[1] - table->record[0];
+ uchar const bits=
+ get_rec_bits(f->bit_ptr + offset, f->bit_ofs, f->bit_len);
+ set_rec_bits(bits, f->bit_ptr, f->bit_ofs, f->bit_len);
+ }
break;
}
}
@@ -7286,4 +7337,3 @@ void Update_rows_log_event::print(FILE *file,
}
#endif
-#endif /* defined(HAVE_ROW_BASED_REPLICATION) */
diff --git a/sql/log_event.h b/sql/log_event.h
index fd924537919..5994beb0df3 100644
--- a/sql/log_event.h
+++ b/sql/log_event.h
@@ -270,6 +270,8 @@ struct sql_ex_info
*/
#define Q_CATALOG_NZ_CODE 6
+#define Q_LC_TIME_NAMES_CODE 7
+
/* Intvar event post-header */
#define I_TYPE_OFFSET 0
@@ -422,12 +424,18 @@ struct sql_ex_info
either, as the manual says (because a too big in-memory temp table is
automatically written to disk).
*/
-#define OPTIONS_WRITTEN_TO_BIN_LOG (OPTION_AUTO_IS_NULL | \
-OPTION_NO_FOREIGN_KEY_CHECKS | OPTION_RELAXED_UNIQUE_CHECKS)
+#define OPTIONS_WRITTEN_TO_BIN_LOG \
+ (OPTION_AUTO_IS_NULL | OPTION_NO_FOREIGN_KEY_CHECKS | \
+ OPTION_RELAXED_UNIQUE_CHECKS | OPTION_NOT_AUTOCOMMIT)
+
+/* Shouldn't be defined before */
+#define EXPECTED_OPTIONS \
+ ((ULL(1) << 14) | (ULL(1) << 26) | (ULL(1) << 27) | (ULL(1) << 19))
-#if OPTIONS_WRITTEN_TO_BIN_LOG != ((1L << 14) | (1L << 26) | (1L << 27))
+#if OPTIONS_WRITTEN_TO_BIN_LOG != EXPECTED_OPTIONS
#error OPTIONS_WRITTEN_TO_BIN_LOG must NOT change their values!
#endif
+#undef EXPECTED_OPTIONS /* You shouldn't use this one */
enum Log_event_type
{
@@ -524,9 +532,11 @@ typedef struct st_print_event_info
bool charset_inited;
char charset[6]; // 3 variables, each of them storable in 2 bytes
char time_zone_str[MAX_TIME_ZONE_NAME_LENGTH];
+ uint lc_time_names_number;
st_print_event_info()
:flags2_inited(0), sql_mode_inited(0),
- auto_increment_increment(1),auto_increment_offset(1), charset_inited(0)
+ auto_increment_increment(1),auto_increment_offset(1), charset_inited(0),
+ lc_time_names_number(0)
{
/*
Currently we only use static PRINT_EVENT_INFO objects, so zeroed at
@@ -536,6 +546,7 @@ typedef struct st_print_event_info
bzero(db, sizeof(db));
bzero(charset, sizeof(charset));
bzero(time_zone_str, sizeof(time_zone_str));
+ strcpy(delimiter, ";");
uint const flags = MYF(MY_WME | MY_NABP);
init_io_cache(&head_cache, -1, 0, WRITE_CACHE, 0L, FALSE, flags);
init_io_cache(&body_cache, -1, 0, WRITE_CACHE, 0L, FALSE, flags);
@@ -552,6 +563,7 @@ typedef struct st_print_event_info
bool base64_output;
my_off_t hexdump_from;
uint8 common_header_len;
+ char delimiter[16];
/*
These two caches are used by the row-based replication events to
@@ -575,6 +587,13 @@ class Log_event
{
public:
/*
+ The following type definition is to be used whenever data is placed
+ and manipulated in a common buffer. Use this typedef for buffers
+ that contain data containing binary and character data.
+ */
+ typedef unsigned char Byte;
+
+ /*
The offset in the log where this event originally appeared (it is
preserved in relay logs, making SHOW SLAVE STATUS able to print
coordinates of the event in the master's binlog). Note: when a
@@ -755,7 +774,7 @@ public:
class Query_log_event: public Log_event
{
protected:
- char* data_buf;
+ Log_event::Byte* data_buf;
public:
const char* query;
const char* catalog;
@@ -826,6 +845,7 @@ public:
char charset[6];
uint time_zone_len; /* 0 means uninited */
const char *time_zone_str;
+ uint lc_time_names_number; /* 0 means en_US */
#ifndef MYSQL_CLIENT
@@ -1690,8 +1710,6 @@ public:
#endif
char *str_to_hex(char *to, const char *from, uint len);
-#ifdef HAVE_ROW_BASED_REPLICATION
-
/*****************************************************************************
Table map log event class
@@ -2020,7 +2038,7 @@ public:
Write_rows_log_event(const char *buf, uint event_len,
const Format_description_log_event *description_event);
#endif
-#if !defined(MYSQL_CLIENT) && defined(HAVE_ROW_BASED_REPLICATION)
+#if !defined(MYSQL_CLIENT)
static bool binlog_row_logging_function(THD *thd, TABLE *table,
bool is_transactional,
MY_BITMAP *cols,
@@ -2085,7 +2103,7 @@ public:
const Format_description_log_event *description_event);
#endif
-#if !defined(MYSQL_CLIENT) && defined(HAVE_ROW_BASED_REPLICATION)
+#if !defined(MYSQL_CLIENT)
static bool binlog_row_logging_function(THD *thd, TABLE *table,
bool is_transactional,
MY_BITMAP *cols,
@@ -2155,7 +2173,7 @@ public:
Delete_rows_log_event(const char *buf, uint event_len,
const Format_description_log_event *description_event);
#endif
-#if !defined(MYSQL_CLIENT) && defined(HAVE_ROW_BASED_REPLICATION)
+#if !defined(MYSQL_CLIENT)
static bool binlog_row_logging_function(THD *thd, TABLE *table,
bool is_transactional,
MY_BITMAP *cols,
@@ -2189,6 +2207,4 @@ private:
#endif
};
-#endif /* HAVE_ROW_BASED_REPLICATION */
-
#endif /* _log_event_h */
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 261f165202f..caeeb615e0a 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -118,6 +118,7 @@ enum Derivation
typedef struct my_locale_st
{
+ uint number;
const char *name;
const char *description;
const bool is_ascii;
@@ -126,9 +127,11 @@ typedef struct my_locale_st
TYPELIB *day_names;
TYPELIB *ab_day_names;
#ifdef __cplusplus
- my_locale_st(const char *name_par, const char *descr_par, bool is_ascii_par,
+ my_locale_st(uint number_par,
+ const char *name_par, const char *descr_par, bool is_ascii_par,
TYPELIB *month_names_par, TYPELIB *ab_month_names_par,
TYPELIB *day_names_par, TYPELIB *ab_day_names_par) :
+ number(number_par),
name(name_par), description(descr_par), is_ascii(is_ascii_par),
month_names(month_names_par), ab_month_names(ab_month_names_par),
day_names(day_names_par), ab_day_names(ab_day_names_par)
@@ -140,6 +143,7 @@ extern MY_LOCALE my_locale_en_US;
extern MY_LOCALE *my_locales[];
MY_LOCALE *my_locale_by_name(const char *name);
+MY_LOCALE *my_locale_by_number(uint number);
/***************************************************************************
Configuration parameters
@@ -303,54 +307,54 @@ MY_LOCALE *my_locale_by_name(const char *name);
TODO: separate three contexts above, move them to separate bitfields.
*/
-#define SELECT_DISTINCT (LL(1) << 0) // SELECT, user
-#define SELECT_STRAIGHT_JOIN (LL(1) << 1) // SELECT, user
-#define SELECT_DESCRIBE (LL(1) << 2) // SELECT, user
-#define SELECT_SMALL_RESULT (LL(1) << 3) // SELECT, user
-#define SELECT_BIG_RESULT (LL(1) << 4) // SELECT, user
-#define OPTION_FOUND_ROWS (LL(1) << 5) // SELECT, user
-#define OPTION_TO_QUERY_CACHE (LL(1) << 6) // SELECT, user
-#define SELECT_NO_JOIN_CACHE (LL(1) << 7) // intern
-#define OPTION_BIG_TABLES (LL(1) << 8) // THD, user
-#define OPTION_BIG_SELECTS (LL(1) << 9) // THD, user
-#define OPTION_LOG_OFF (LL(1) << 10) // THD, user
-#define OPTION_QUOTE_SHOW_CREATE (LL(1) << 11) // THD, user
-#define TMP_TABLE_ALL_COLUMNS (LL(1) << 12) // SELECT, intern
-#define OPTION_WARNINGS (LL(1) << 13) // THD, user
-#define OPTION_AUTO_IS_NULL (LL(1) << 14) // THD, user, binlog
-#define OPTION_FOUND_COMMENT (LL(1) << 15) // SELECT, intern, parser
-#define OPTION_SAFE_UPDATES (LL(1) << 16) // THD, user
-#define OPTION_BUFFER_RESULT (LL(1) << 17) // SELECT, user
-#define OPTION_BIN_LOG (LL(1) << 18) // THD, user
-#define OPTION_NOT_AUTOCOMMIT (LL(1) << 19) // THD, user
-#define OPTION_BEGIN (LL(1) << 20) // THD, intern
-#define OPTION_TABLE_LOCK (LL(1) << 21) // THD, intern
-#define OPTION_QUICK (LL(1) << 22) // SELECT (for DELETE)
-#define OPTION_KEEP_LOG (LL(1) << 23) // Keep binlog on rollback
+#define SELECT_DISTINCT (ULL(1) << 0) // SELECT, user
+#define SELECT_STRAIGHT_JOIN (ULL(1) << 1) // SELECT, user
+#define SELECT_DESCRIBE (ULL(1) << 2) // SELECT, user
+#define SELECT_SMALL_RESULT (ULL(1) << 3) // SELECT, user
+#define SELECT_BIG_RESULT (ULL(1) << 4) // SELECT, user
+#define OPTION_FOUND_ROWS (ULL(1) << 5) // SELECT, user
+#define OPTION_TO_QUERY_CACHE (ULL(1) << 6) // SELECT, user
+#define SELECT_NO_JOIN_CACHE (ULL(1) << 7) // intern
+#define OPTION_BIG_TABLES (ULL(1) << 8) // THD, user
+#define OPTION_BIG_SELECTS (ULL(1) << 9) // THD, user
+#define OPTION_LOG_OFF (ULL(1) << 10) // THD, user
+#define OPTION_QUOTE_SHOW_CREATE (ULL(1) << 11) // THD, user
+#define TMP_TABLE_ALL_COLUMNS (ULL(1) << 12) // SELECT, intern
+#define OPTION_WARNINGS (ULL(1) << 13) // THD, user
+#define OPTION_AUTO_IS_NULL (ULL(1) << 14) // THD, user, binlog
+#define OPTION_FOUND_COMMENT (ULL(1) << 15) // SELECT, intern, parser
+#define OPTION_SAFE_UPDATES (ULL(1) << 16) // THD, user
+#define OPTION_BUFFER_RESULT (ULL(1) << 17) // SELECT, user
+#define OPTION_BIN_LOG (ULL(1) << 18) // THD, user
+#define OPTION_NOT_AUTOCOMMIT (ULL(1) << 19) // THD, user
+#define OPTION_BEGIN (ULL(1) << 20) // THD, intern
+#define OPTION_TABLE_LOCK (ULL(1) << 21) // THD, intern
+#define OPTION_QUICK (ULL(1) << 22) // SELECT (for DELETE)
+#define OPTION_KEEP_LOG (ULL(1) << 23) // Keep binlog on rollback
/* The following is used to detect a conflict with DISTINCT */
-#define SELECT_ALL (LL(1) << 24) // SELECT, user, parser
+#define SELECT_ALL (ULL(1) << 24) // SELECT, user, parser
/* Set if we are updating a non-transaction safe table */
-#define OPTION_STATUS_NO_TRANS_UPDATE (LL(1) << 25) // THD, intern
+#define OPTION_STATUS_NO_TRANS_UPDATE (ULL(1) << 25) // THD, intern
/* The following can be set when importing tables in a 'wrong order'
to suppress foreign key checks */
-#define OPTION_NO_FOREIGN_KEY_CHECKS (LL(1) << 26) // THD, user, binlog
+#define OPTION_NO_FOREIGN_KEY_CHECKS (ULL(1) << 26) // THD, user, binlog
/* The following speeds up inserts to InnoDB tables by suppressing unique
key checks in some cases */
-#define OPTION_RELAXED_UNIQUE_CHECKS (LL(1) << 27) // THD, user, binlog
-#define SELECT_NO_UNLOCK (LL(1) << 28) // SELECT, intern
-#define OPTION_SCHEMA_TABLE (LL(1) << 29) // SELECT, intern
+#define OPTION_RELAXED_UNIQUE_CHECKS (ULL(1) << 27) // THD, user, binlog
+#define SELECT_NO_UNLOCK (ULL(1) << 28) // SELECT, intern
+#define OPTION_SCHEMA_TABLE (ULL(1) << 29) // SELECT, intern
/* Flag set if setup_tables already done */
-#define OPTION_SETUP_TABLES_DONE (LL(1) << 30) // intern
+#define OPTION_SETUP_TABLES_DONE (ULL(1) << 30) // intern
/* If not set then the thread will ignore all warnings with level notes. */
-#define OPTION_SQL_NOTES (LL(1) << 31) // THD, user
+#define OPTION_SQL_NOTES (ULL(1) << 31) // THD, user
/*
Force the used temporary table to be a MyISAM table (because we will use
fulltext functions when reading from it.
*/
-#define TMP_TABLE_FORCE_MYISAM (LL(1) << 32)
+#define TMP_TABLE_FORCE_MYISAM (ULL(1) << 32)
/*
Maximum length of time zone name that we support
@@ -1561,9 +1565,7 @@ extern ulong query_buff_size, thread_stack;
extern ulong max_prepared_stmt_count, prepared_stmt_count;
extern ulong binlog_cache_size, max_binlog_cache_size, open_files_limit;
extern ulong max_binlog_size, max_relay_log_size;
-#ifdef HAVE_ROW_BASED_REPLICATION
extern ulong opt_binlog_rows_event_max_size;
-#endif
extern ulong rpl_recovery_rank, thread_cache_size;
extern ulong back_log;
extern ulong specialflag, current_pid;
@@ -1663,7 +1665,6 @@ extern handlerton *partition_hton;
extern handlerton *myisam_hton;
extern handlerton *heap_hton;
-extern SHOW_COMP_OPTION have_row_based_replication;
extern SHOW_COMP_OPTION have_openssl, have_symlink, have_dlopen;
extern SHOW_COMP_OPTION have_query_cache;
extern SHOW_COMP_OPTION have_geometry, have_rtree_keys;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 0a635b65b39..1477850f234 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -27,9 +27,7 @@
#include "../storage/myisam/ha_myisam.h"
-#ifdef HAVE_ROW_BASED_REPLICATION
#include "rpl_injector.h"
-#endif
#ifdef WITH_INNOBASE_STORAGE_ENGINE
#define OPT_INNODB_DEFAULT 1
@@ -447,12 +445,8 @@ volatile bool mqh_used = 0;
my_bool opt_noacl;
my_bool sp_automatic_privileges= 1;
-#ifdef HAVE_ROW_BASED_REPLICATION
ulong opt_binlog_rows_event_max_size;
const char *binlog_format_names[]= {"STATEMENT", "ROW", "MIXED", NullS};
-#else
-const char *binlog_format_names[]= {"STATEMENT", NullS};
-#endif
TYPELIB binlog_format_typelib=
{ array_elements(binlog_format_names)-1,"",
binlog_format_names, NULL };
@@ -564,7 +558,6 @@ CHARSET_INFO *system_charset_info, *files_charset_info ;
CHARSET_INFO *national_charset_info, *table_alias_charset;
CHARSET_INFO *character_set_filesystem;
-SHOW_COMP_OPTION have_row_based_replication;
SHOW_COMP_OPTION have_openssl, have_symlink, have_dlopen, have_query_cache;
SHOW_COMP_OPTION have_geometry, have_rtree_keys;
SHOW_COMP_OPTION have_crypt, have_compress;
@@ -1172,9 +1165,7 @@ void clean_up(bool print_message)
what they have that is dependent on the binlog
*/
ha_binlog_end(current_thd);
-#ifdef HAVE_ROW_BASED_REPLICATION
injector::free_instance();
-#endif
mysql_bin_log.cleanup();
#ifdef HAVE_REPLICATION
@@ -3171,11 +3162,7 @@ with --log-bin instead.");
}
if (global_system_variables.binlog_format == BINLOG_FORMAT_UNSPEC)
{
-#if defined(HAVE_ROW_BASED_REPLICATION)
global_system_variables.binlog_format= BINLOG_FORMAT_MIXED;
-#else
- global_system_variables.binlog_format= BINLOG_FORMAT_STMT;
-#endif
}
/* Check that we have not let the format to unspecified at this point */
@@ -3480,6 +3467,9 @@ int win_main(int argc, char **argv)
int main(int argc, char **argv)
#endif
{
+ MY_INIT(argv[0]); // init my_sys library & pthreads
+ /* nothing should come before this line ^^^ */
+
rpl_filter= new Rpl_filter;
binlog_filter= new Rpl_filter;
if (!rpl_filter || !binlog_filter)
@@ -3488,8 +3478,6 @@ int main(int argc, char **argv)
exit(1);
}
- MY_INIT(argv[0]); // init my_sys library & pthreads
-
/*
Perform basic logger initialization logger. Should be called after
MY_INIT, as it initializes mutexes. Log tables are inited later.
@@ -4716,9 +4704,7 @@ enum options_mysqld
#ifndef DBUG_OFF
OPT_BINLOG_SHOW_XID,
#endif
-#ifdef HAVE_ROW_BASED_REPLICATION
OPT_BINLOG_ROWS_EVENT_MAX_SIZE,
-#endif
OPT_WANT_CORE, OPT_CONCURRENT_INSERT,
OPT_MEMLOCK, OPT_MYISAM_RECOVER,
OPT_REPLICATE_REWRITE_DB, OPT_SERVER_ID,
@@ -4929,7 +4915,6 @@ struct my_option my_long_options[] =
(gptr*) &my_bind_addr_str, (gptr*) &my_bind_addr_str, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"binlog_format", OPT_BINLOG_FORMAT,
-#ifdef HAVE_ROW_BASED_REPLICATION
"Tell the master the form of binary logging to use: either 'row' for "
"row-based binary logging, or 'statement' for statement-based binary "
"logging, or 'mixed'. 'mixed' is statement-based binary logging except "
@@ -4939,17 +4924,8 @@ struct my_option my_long_options[] =
#ifdef HAVE_NDB_BINLOG
"If ndbcluster is enabled, the default is 'row'."
#endif
-#else
- "Tell the master the form of binary logging to use: this build "
- "supports only statement-based binary logging, so only 'statement' is "
- "a legal value."
-#endif
, 0, 0, 0, GET_STR, REQUIRED_ARG,
-#ifdef HAVE_ROW_BASED_REPLICATION
BINLOG_FORMAT_MIXED
-#else
- BINLOG_FORMAT_STMT
-#endif
, 0, 0, 0, 0, 0 },
{"binlog-do-db", OPT_BINLOG_DO_DB,
"Tells the master it should log updates for the specified database, and exclude all others not explicitly mentioned.",
@@ -4957,7 +4933,6 @@ struct my_option my_long_options[] =
{"binlog-ignore-db", OPT_BINLOG_IGNORE_DB,
"Tells the master that updates to the given database should not be logged tothe binary log.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-#ifdef HAVE_ROW_BASED_REPLICATION
{"binlog-row-event-max-size", OPT_BINLOG_ROWS_EVENT_MAX_SIZE,
"The maximum size of a row-based binary log event in bytes. Rows will be "
"grouped into events smaller than this size if possible. "
@@ -4969,7 +4944,6 @@ struct my_option my_long_options[] =
/* sub_size */ 0, /* block_size */ 256,
/* app_type */ 0
},
-#endif
#ifndef DISABLE_GRANT_OPTIONS
{"bootstrap", OPT_BOOTSTRAP, "Used by mysql installation scripts.", 0, 0, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -5235,11 +5209,9 @@ Disable with --skip-innodb-doublewrite.", (gptr*) &innobase_use_doublewrite,
"If equal to 0 (the default), then when --log-bin is used, creation of "
"a stored function (or trigger) is allowed only to users having the SUPER privilege "
"and only if this stored function (trigger) may not break binary logging."
-#ifdef HAVE_ROW_BASED_REPLICATION
"Note that if ALL connections to this server ALWAYS use row-based binary "
"logging, the security issues do not exist and the binary logging cannot "
"break, so you can safely set this to 1."
-#endif
,(gptr*) &trust_function_creators, (gptr*) &trust_function_creators, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"log-error", OPT_ERROR_LOG_FILE, "Error log file.",
@@ -5718,6 +5690,11 @@ log and this option does nothing anymore.",
0, 0, 0, 0, 0},
{"use-symbolic-links", 's', "Enable symbolic link support. Deprecated option; use --symbolic-links instead.",
(gptr*) &my_use_symdir, (gptr*) &my_use_symdir, 0, GET_BOOL, NO_ARG,
+ /*
+ The system call realpath() produces warnings under valgrind and
+ purify. These are not suppressed: instead we disable symlinks
+ option if compiled with valgrind support.
+ */
IF_PURIFY(0,1), 0, 0, 0, 0, 0},
{"user", 'u', "Run mysqld daemon as user.", 0, 0, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
@@ -7077,11 +7054,6 @@ static void mysql_init_variables(void)
#else
have_partition_db= SHOW_OPTION_NO;
#endif
-#ifdef HAVE_ROW_BASED_REPLICATION
- have_row_based_replication= SHOW_OPTION_YES;
-#else
- have_row_based_replication= SHOW_OPTION_NO;
-#endif
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
have_ndbcluster=SHOW_OPTION_DISABLED;
global_system_variables.ndb_index_stat_enable=FALSE;
@@ -7311,7 +7283,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
int id;
if ((id= find_type(argument, &binlog_format_typelib, 2)) <= 0)
{
-#ifdef HAVE_ROW_BASED_REPLICATION
fprintf(stderr,
"Unknown binary log format: '%s' "
"(should be one of '%s', '%s', '%s')\n",
@@ -7319,11 +7290,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
binlog_format_names[BINLOG_FORMAT_STMT],
binlog_format_names[BINLOG_FORMAT_ROW],
binlog_format_names[BINLOG_FORMAT_MIXED]);
-#else
- fprintf(stderr,
- "Unknown binary log format: '%s' (only legal value is '%s')\n",
- argument, binlog_format_names[BINLOG_FORMAT_STMT]);
-#endif
exit(1);
}
global_system_variables.binlog_format= id-1;
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 8e9dadc1dbf..7c0e40543a8 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -599,7 +599,10 @@ net_real_write(NET *net,const char *packet,ulong len)
}
#endif /* HAVE_COMPRESS */
- /* DBUG_DUMP("net",packet,len); */
+#ifdef DEBUG_DATA_PACKETS
+ DBUG_DUMP("data",packet,len);
+#endif
+
#ifndef NO_ALARM
thr_alarm_init(&alarmed);
if (net_blocking)
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 7f58e0359c4..628b07631c1 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -5016,7 +5016,8 @@ static SEL_TREE *get_func_mm_tree(RANGE_OPT_PARAM *param, Item_func *cond_func,
for (uint idx= 0; idx < param->keys; idx++)
{
SEL_ARG *new_interval, *last_val;
- if (((new_interval= tree2->keys[idx])) &&
+ if (((new_interval= tree2->keys[idx])) &&
+ (tree->keys[idx]) &&
((last_val= tree->keys[idx]->last())))
{
new_interval->min_value= last_val->max_value;
diff --git a/sql/rpl_injector.cc b/sql/rpl_injector.cc
index 292e6262382..95b5ecba895 100644
--- a/sql/rpl_injector.cc
+++ b/sql/rpl_injector.cc
@@ -15,7 +15,6 @@
#include "mysql_priv.h"
#include "rpl_injector.h"
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
injector::transaction - member definitions
@@ -189,5 +188,3 @@ void injector::new_trans(THD *thd, injector::transaction *ptr)
DBUG_VOID_RETURN;
}
-
-#endif
diff --git a/sql/rpl_injector.h b/sql/rpl_injector.h
index 381da7c33a5..8b08c0672c9 100644
--- a/sql/rpl_injector.h
+++ b/sql/rpl_injector.h
@@ -19,7 +19,6 @@
/* Pull in 'byte', 'my_off_t', and 'uint32' */
#include <my_global.h>
-#ifdef HAVE_ROW_BASED_REPLICATION
#include <my_bitmap.h>
/* Forward declarations */
@@ -329,5 +328,4 @@ private:
*/
};
-#endif /* HAVE_ROW_BASED_REPLICATION */
#endif /* INJECTOR_H */
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 0111e10d889..1f079eee0c6 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -670,7 +670,6 @@ sys_var_have_variable sys_have_query_cache("have_query_cache",
&have_query_cache);
sys_var_have_variable sys_have_rtree_keys("have_rtree_keys", &have_rtree_keys);
sys_var_have_variable sys_have_symlink("have_symlink", &have_symlink);
-sys_var_have_variable sys_have_row_based_replication("have_row_based_replication",&have_row_based_replication);
/* Global read-only variable describing server license */
sys_var_const_str sys_license("license", STRINGIFY_ARG(LICENSE));
@@ -792,7 +791,6 @@ SHOW_VAR init_vars[]= {
{sys_have_openssl.name, (char*) &have_openssl, SHOW_HAVE},
{sys_have_partition_db.name,(char*) &have_partition_db, SHOW_HAVE},
{sys_have_query_cache.name, (char*) &have_query_cache, SHOW_HAVE},
- {sys_have_row_based_replication.name, (char*) &have_row_based_replication, SHOW_HAVE},
{sys_have_rtree_keys.name, (char*) &have_rtree_keys, SHOW_HAVE},
{sys_have_symlink.name, (char*) &have_symlink, SHOW_HAVE},
{"init_connect", (char*) &sys_init_connect, SHOW_SYS},
@@ -1307,10 +1305,6 @@ bool sys_var_thd_binlog_format::is_readonly() const
If we don't have row-based replication compiled in, the variable
is always read-only.
*/
-#ifndef HAVE_ROW_BASED_REPLICATION
- my_error(ER_RBR_NOT_AVAILABLE, MYF(0));
- return 1;
-#else
if ((thd->variables.binlog_format == BINLOG_FORMAT_ROW) &&
thd->temporary_tables)
{
@@ -1335,16 +1329,13 @@ bool sys_var_thd_binlog_format::is_readonly() const
return 1;
}
#endif /* HAVE_NDB_BINLOG */
-#endif /* HAVE_ROW_BASED_REPLICATION */
return sys_var_thd_enum::is_readonly();
}
void fix_binlog_format_after_update(THD *thd, enum_var_type type)
{
-#ifdef HAVE_ROW_BASED_REPLICATION
thd->reset_current_stmt_binlog_row_based();
-#endif /*HAVE_ROW_BASED_REPLICATION*/
}
@@ -2986,17 +2977,39 @@ byte *sys_var_max_user_conn::value_ptr(THD *thd, enum_var_type type,
return (byte*) &(max_user_connections);
}
+
bool sys_var_thd_lc_time_names::check(THD *thd, set_var *var)
{
- char *locale_str =var->value->str_value.c_ptr();
- MY_LOCALE *locale_match= my_locale_by_name(locale_str);
+ MY_LOCALE *locale_match;
- if (locale_match == NULL)
+ if (var->value->result_type() == INT_RESULT)
{
- my_printf_error(ER_UNKNOWN_ERROR,
- "Unknown locale: '%s'", MYF(0), locale_str);
- return 1;
+ if (!(locale_match= my_locale_by_number((uint) var->value->val_int())))
+ {
+ char buf[20];
+ int10_to_str((int) var->value->val_int(), buf, -10);
+ my_printf_error(ER_UNKNOWN_ERROR, "Unknown locale: '%s'", MYF(0), buf);
+ return 1;
+ }
+ }
+ else // STRING_RESULT
+ {
+ char buff[6];
+ String str(buff, sizeof(buff), &my_charset_latin1), *res;
+ if (!(res=var->value->val_str(&str)))
+ {
+ my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), name, "NULL");
+ return 1;
+ }
+ const char *locale_str= res->c_ptr();
+ if (!(locale_match= my_locale_by_name(locale_str)))
+ {
+ my_printf_error(ER_UNKNOWN_ERROR,
+ "Unknown locale: '%s'", MYF(0), locale_str);
+ return 1;
+ }
}
+
var->save_result.locale_value= locale_match;
return 0;
}
diff --git a/sql/set_var.h b/sql/set_var.h
index f957ec931d6..b0e9c8fd335 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -922,13 +922,17 @@ class sys_var_thd_lc_time_names :public sys_var_thd
{
public:
sys_var_thd_lc_time_names(const char *name_arg):
- sys_var_thd(name_arg)
- {}
+ sys_var_thd(name_arg)
+ {
+#if MYSQL_VERSION_ID < 50000
+ no_support_one_shot= 0;
+#endif
+ }
bool check(THD *thd, set_var *var);
SHOW_TYPE type() { return SHOW_CHAR; }
bool check_update_type(Item_result type)
{
- return type != STRING_RESULT; /* Only accept strings */
+ return ((type != STRING_RESULT) && (type != INT_RESULT));
}
bool check_default(enum_var_type type) { return 0; }
bool update(THD *thd, set_var *var);
@@ -953,9 +957,7 @@ public:
}
};
-#ifdef HAVE_ROW_BASED_REPLICATION
extern void fix_binlog_format_after_update(THD *thd, enum_var_type type);
-#endif
class sys_var_thd_binlog_format :public sys_var_thd_enum
{
@@ -963,9 +965,7 @@ public:
sys_var_thd_binlog_format(const char *name_arg, ulong SV::*offset_arg)
:sys_var_thd_enum(name_arg, offset_arg,
&binlog_format_typelib
-#ifdef HAVE_ROW_BASED_REPLICATION
, fix_binlog_format_after_update
-#endif
)
{};
bool is_readonly() const;
diff --git a/sql/share/charsets/hebrew.xml b/sql/share/charsets/hebrew.xml
index bdfa82bb791..20d68487301 100644
--- a/sql/share/charsets/hebrew.xml
+++ b/sql/share/charsets/hebrew.xml
@@ -39,7 +39,7 @@
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
02 02 02 02 02 02 02 02 02 02 02 02 02 02 02 02
- 02 02 02 02 02 02 02 02 02 02 02 00 00 00 00 00
+ 02 02 02 02 02 02 02 02 02 02 02 00 00 20 20 00
</map>
</ctype>
@@ -105,7 +105,7 @@
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 2017
05D0 05D1 05D2 05D3 05D4 05D5 05D6 05D7 05D8 05D9 05DA 05DB 05DC 05DD 05DE 05DF
-05E0 05E1 05E2 05E3 05E4 05E5 05E6 05E7 05E8 05E9 05EA 0000 0000 0000 0000 0000
+05E0 05E1 05E2 05E3 05E4 05E5 05E6 05E7 05E8 05E9 05EA 0000 0000 200E 200F 0000
</map>
</unicode>
diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt
index 671dbbd9c03..15ea8f67c0d 100644
--- a/sql/share/errmsg.txt
+++ b/sql/share/errmsg.txt
@@ -950,7 +950,7 @@ ER_CON_COUNT_ERROR 08004
eng "Too many connections"
jps "Ú‘±‚ª‘½‚·‚¬‚Ü‚·",
est "Liiga palju samaaegseid ühendusi"
- fre "Trop de connections"
+ fre "Trop de connexions"
ger "Zu viele Verbindungen"
greek "ÕðÜñ÷ïõí ðïëëÝò óõíäÝóåéò..."
hun "Tul sok kapcsolat"
@@ -1827,7 +1827,7 @@ ER_READY
eng "%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d"
jps "%s: €”õŠ®—¹",
est "%s: ootab ühendusi"
- fre "%s: Prêt pour des connections"
+ fre "%s: Prêt pour des connexions"
ger "%-.64s: Bereit für Verbindungen.\nVersion: '%2' Socket: '%s' Port: %d"
greek "%s: óå áíáìïíÞ óõíäÝóåùí"
hun "%s: kapcsolatra kesz"
@@ -1950,7 +1950,7 @@ ER_IPSOCK_ERROR 08S01
eng "Can't create IP socket"
jps "IP socket ‚ªì‚ê‚Ü‚¹‚ñ",
est "Ei suuda luua IP socketit"
- fre "Ne peut créer la connection IP (socket)"
+ fre "Ne peut créer la connexion IP (socket)"
ger "Kann IP-Socket nicht erzeugen"
greek "Äåí åßíáé äõíáôÞ ç äçìéïõñãßá IP socket"
hun "Az IP socket nem hozhato letre"
@@ -3031,7 +3031,7 @@ ER_HOST_IS_BLOCKED
eng "Host '%-.64s' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'"
jps "Host '%-.64s' ‚Í many connection error ‚Ì‚½‚ßA‹‘”Û‚³‚ê‚Ü‚µ‚½. 'mysqladmin flush-hosts' ‚ʼn𜂵‚Ä‚­‚¾‚³‚¢",
est "Masin '%-.64s' on blokeeritud hulgaliste ühendusvigade tõttu. Blokeeringu saab tühistada 'mysqladmin flush-hosts' käsuga"
- fre "L'hôte '%-.64s' est bloqué à cause d'un trop grand nombre d'erreur de connection. Débloquer le par 'mysqladmin flush-hosts'"
+ fre "L'hôte '%-.64s' est bloqué à cause d'un trop grand nombre d'erreur de connexion. Débloquer le par 'mysqladmin flush-hosts'"
ger "Host '%-.64s' blockiert wegen zu vieler Verbindungsfehler. Aufheben der Blockierung mit 'mysqladmin flush-hosts'"
greek "Ï õðïëïãéóôÞò Ý÷åé áðïêëåéóèåß ëüãù ðïëëáðëþí ëáèþí óýíäåóçò. ÐñïóðáèÞóôå íá äéïñþóåôå ìå 'mysqladmin flush-hosts'"
hun "A '%-.64s' host blokkolodott, tul sok kapcsolodasi hiba miatt. Hasznalja a 'mysqladmin flush-hosts' parancsot"
@@ -3533,7 +3533,7 @@ ER_NET_READ_ERROR_FROM_PIPE 08S01
nla "Kreeg leesfout van de verbindings pipe"
eng "Got a read error from the connection pipe"
est "Viga ühendustoru lugemisel"
- fre "Erreur de lecture reçue du pipe de connection"
+ fre "Erreur de lecture reçue du pipe de connexion"
ger "Lese-Fehler bei einer Verbindungs-Pipe"
hun "Olvasasi hiba a kapcsolat soran"
ita "Rilevato un errore di lettura dalla pipe di connessione"
@@ -4331,7 +4331,7 @@ ER_TOO_MANY_USER_CONNECTIONS 42000
nla "Gebruiker %-.64s heeft reeds meer dan 'max_user_connections' actieve verbindingen"
eng "User %-.64s already has more than 'max_user_connections' active connections"
est "Kasutajal %-.64s on juba rohkem ühendusi kui lubatud 'max_user_connections' muutujaga"
- fre "L'utilisateur %-.64s possède déjà plus de 'max_user_connections' connections actives"
+ fre "L'utilisateur %-.64s possède déjà plus de 'max_user_connections' connexions actives"
ger "Benutzer '%-.64s' hat mehr als 'max_user_connections' aktive Verbindungen"
ita "L'utente %-.64s ha gia' piu' di 'max_user_connections' connessioni attive"
por "Usuário '%-.64s' já possui mais que o valor máximo de conexões (max_user_connections) ativas"
@@ -6009,15 +6009,22 @@ ER_BAD_LOG_STATEMENT
ger "Sie können eine Logtabelle nicht '%s', wenn Loggen angeschaltet ist"
ER_NON_INSERTABLE_TABLE
eng "The target table %-.100s of the %s is not insertable-into"
+ ger "Die Zieltabelle %-.100s von %s ist nicht einfügbar"
ER_CANT_RENAME_LOG_TABLE
eng "Cannot rename '%s'. When logging enabled, rename to/from log table must rename two tables: the log table to an archive table and another table back to '%s'"
+ ger "Kann '%s' nicht umbenennen. Wenn Loggen angeschaltet ist, müssen beim Umbenennen zu/von einer Logtabelle zwei Tabellen angegeben werden: die Logtabelle zu einer Archivtabelle und eine weitere Tabelle zurück zu '%s'"
ER_WRONG_PARAMCOUNT_TO_NATIVE_FCT 42000
eng "Incorrect parameter count in the call to native function '%-.64s'"
+ ger "Falsche Anzahl von Parametern beim Aufruf der nativen Funktion '%-.64s'"
ER_WRONG_PARAMETERS_TO_NATIVE_FCT 42000
eng "Incorrect parameters in the call to native function '%-.64s'"
+ ger "Falscher Parameter beim Aufruf der nativen Funktion '%-.64s'"
ER_WRONG_PARAMETERS_TO_STORED_FCT 42000
eng "Incorrect parameters in the call to stored function '%-.64s'"
+ ger "Falsche Parameter beim Aufruf der gespeicherten Funktion '%-.64s'"
ER_NATIVE_FCT_NAME_COLLISION
- eng "This function '%-.64s' has the same name as a native function."
+ eng "This function '%-.64s' has the same name as a native function"
+ ger "Die Funktion '%-.64s' hat denselben Namen wie eine native Funktion"
ER_BINLOG_PURGE_EMFILE
eng "Too many files opened, please execute the command again"
+ ger "Zu viele offene Dateien, bitte führen Sie den Befehl noch einmal aus"
diff --git a/sql/slave.cc b/sql/slave.cc
index 88e501143bc..c21aec49e88 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -32,6 +32,7 @@
int queue_event(MASTER_INFO* mi,const char* buf,ulong event_len);
+#define FLAGSTR(V,F) ((V)&(F)?#F" ":"")
#define MAX_SLAVE_RETRY_PAUSE 5
bool use_slave_mask = 0;
@@ -1798,6 +1799,10 @@ static int exec_relay_log_event(THD* thd, RELAY_LOG_INFO* rli)
if (!ev->when)
ev->when = time(NULL);
ev->thd = thd; // because up to this point, ev->thd == 0
+ DBUG_PRINT("info", ("thd->options={ %s%s}",
+ FLAGSTR(thd->options, OPTION_NOT_AUTOCOMMIT),
+ FLAGSTR(thd->options, OPTION_BEGIN)));
+
exec_res = ev->exec_event(rli);
DBUG_PRINT("info", ("exec_event result: %d", exec_res));
DBUG_ASSERT(rli->sql_thd==thd);
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index 2b65e2b345f..7c110185a95 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -92,7 +92,7 @@ sp_map_item_type(enum enum_field_types type)
*/
static String *
-sp_get_item_value(Item *item, String *str)
+sp_get_item_value(THD *thd, Item *item, String *str)
{
Item_result result_type= item->result_type();
@@ -112,15 +112,16 @@ sp_get_item_value(Item *item, String *str)
{
char buf_holder[STRING_BUFFER_USUAL_SIZE];
String buf(buf_holder, sizeof(buf_holder), result->charset());
+ CHARSET_INFO *cs= thd->variables.character_set_client;
/* We must reset length of the buffer, because of String specificity. */
buf.length(0);
buf.append('_');
buf.append(result->charset()->csname);
- if (result->charset()->escape_with_backslash_is_dangerous)
+ if (cs->escape_with_backslash_is_dangerous)
buf.append(' ');
- append_query_string(result->charset(), result, &buf);
+ append_query_string(cs, result, &buf);
str->copy(buf);
return str;
@@ -882,7 +883,7 @@ subst_spvars(THD *thd, sp_instr *instr, LEX_STRING *query_str)
val= (*splocal)->this_item();
DBUG_PRINT("info", ("print 0x%lx", (long) val));
- str_value= sp_get_item_value(val, &str_value_holder);
+ str_value= sp_get_item_value(thd, val, &str_value_holder);
if (str_value)
res|= qbuf.append(*str_value);
else
@@ -1449,6 +1450,8 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount,
{
binlog_buf.length(0);
binlog_buf.append(STRING_WITH_LEN("SELECT "));
+ append_identifier(thd, &binlog_buf, m_db.str, m_db.length);
+ binlog_buf.append('.');
append_identifier(thd, &binlog_buf, m_name.str, m_name.length);
binlog_buf.append('(');
for (arg_no= 0; arg_no < argcount; arg_no++)
@@ -1459,7 +1462,7 @@ sp_head::execute_function(THD *thd, Item **argp, uint argcount,
if (arg_no)
binlog_buf.append(',');
- str_value= sp_get_item_value(nctx->get_item(arg_no),
+ str_value= sp_get_item_value(thd, nctx->get_item(arg_no),
&str_value_holder);
if (str_value)
@@ -1831,7 +1834,6 @@ sp_head::restore_lex(THD *thd)
oldlex->next_state= sublex->next_state;
oldlex->trg_table_fields.push_back(&sublex->trg_table_fields);
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
If this substatement needs row-based, the entire routine does too (we
cannot switch from statement-based to row-based only for this
@@ -1839,7 +1841,6 @@ sp_head::restore_lex(THD *thd)
*/
if (sublex->binlog_row_based_if_mixed)
m_flags|= BINLOG_ROW_BASED_IF_MIXED;
-#endif
/*
Add routines which are used by statement to respective set for
diff --git a/sql/sp_head.h b/sql/sp_head.h
index 0085608ae40..385d90bb5b8 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -372,7 +372,6 @@ public:
*/
void propagate_attributes(LEX *lex)
{
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
If this routine needs row-based binary logging, the entire top statement
too (we cannot switch from statement-based to row-based only for this
@@ -381,7 +380,6 @@ public:
*/
if (m_flags & BINLOG_ROW_BASED_IF_MIXED)
lex->binlog_row_based_if_mixed= TRUE;
-#endif
}
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 4d1451f6bce..0d9653172e0 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -1629,7 +1629,7 @@ bool change_password(THD *thd, const char *host, const char *user,
{
query_length=
my_sprintf(buff,
- (buff,"SET PASSWORD FOR \"%-.120s\"@\"%-.120s\"=\"%-.120s\"",
+ (buff,"SET PASSWORD FOR '%-.120s'@'%-.120s'='%-.120s'",
acl_user->user ? acl_user->user : "",
acl_user->host.hostname ? acl_user->host.hostname : "",
new_password));
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 75e019ccb63..930615133da 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -1061,9 +1061,7 @@ void close_thread_tables(THD *thd, bool lock_in_use, bool skip_derived)
handled either before writing a query log event (inside
binlog_query()) or when preparing a pending event.
*/
-#ifdef HAVE_ROW_BASED_REPLICATION
thd->binlog_flush_pending_rows_event(TRUE);
-#endif /*HAVE_ROW_BASED_REPLICATION*/
mysql_unlock_tables(thd, thd->lock);
thd->lock=0;
}
@@ -3322,13 +3320,11 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count, bool *need_reopen)
*need_reopen= FALSE;
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
CREATE ... SELECT UUID() locks no tables, we have to test here.
*/
if (thd->lex->binlog_row_based_if_mixed)
thd->set_current_stmt_binlog_row_based_if_mixed();
-#endif /*HAVE_ROW_BASED_REPLICATION*/
if (!tables && !thd->lex->requires_prelocking())
DBUG_RETURN(0);
@@ -3360,7 +3356,6 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count, bool *need_reopen)
{
thd->in_lock_tables=1;
thd->options|= OPTION_TABLE_LOCK;
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
If we have >= 2 different tables to update with auto_inc columns,
statement-based binlogging won't work. We can solve this problem in
@@ -3372,7 +3367,6 @@ int lock_tables(THD *thd, TABLE_LIST *tables, uint count, bool *need_reopen)
thd->lex->binlog_row_based_if_mixed= TRUE;
thd->set_current_stmt_binlog_row_based_if_mixed();
}
-#endif
}
if (! (thd->lock= mysql_lock_tables(thd, start, (uint) (ptr - start),
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 9e3c2442f57..7309e79a666 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -203,9 +203,7 @@ THD::THD()
Open_tables_state(refresh_version), rli_fake(0),
lock_id(&main_lock_id),
user_time(0), in_sub_stmt(0),
-#ifdef HAVE_ROW_BASED_REPLICATION
binlog_table_maps(0),
-#endif /*HAVE_ROW_BASED_REPLICATION*/
global_read_lock(0), is_fatal_error(0),
rand_used(0), time_zone_used(0),
arg_of_last_insert_id_function(FALSE),
@@ -266,9 +264,7 @@ THD::THD()
system_thread= NON_SYSTEM_THREAD;
cleanup_done= abort_on_warning= no_warnings_for_error= 0;
peer_port= 0; // For SHOW PROCESSLIST
-#ifdef HAVE_ROW_BASED_REPLICATION
transaction.m_pending_rows_event= 0;
-#endif
#ifdef __WIN__
real_id = 0;
#endif
@@ -348,9 +344,7 @@ void THD::init(void)
bzero((char*) warn_count, sizeof(warn_count));
total_warn_count= 0;
update_charset();
-#ifdef HAVE_ROW_BASED_REPLICATION
reset_current_stmt_binlog_row_based();
-#endif /*HAVE_ROW_BASED_REPLICATION*/
bzero((char *) &status_var, sizeof(status_var));
variables.lc_time_names = &my_locale_en_US;
}
@@ -2307,7 +2301,6 @@ void xid_cache_delete(XID_STATE *xid_state)
*/
#ifndef MYSQL_CLIENT
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
Template member function for ensuring that there is an rows log
@@ -2800,8 +2793,6 @@ void THD::binlog_delete_pending_rows_event()
}
}
-#endif /* HAVE_ROW_BASED_REPLICATION */
-
/*
Member function that will log query, either row-based or
statement-based depending on the value of the 'current_stmt_binlog_row_based'
@@ -2842,18 +2833,14 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype,
If we are in prelocked mode, the flushing will be done inside the
top-most close_thread_tables().
*/
-#ifdef HAVE_ROW_BASED_REPLICATION
if (this->prelocked_mode == NON_PRELOCKED)
if (int error= binlog_flush_pending_rows_event(TRUE))
DBUG_RETURN(error);
-#endif /*HAVE_ROW_BASED_REPLICATION*/
switch (qtype) {
case THD::ROW_QUERY_TYPE:
-#ifdef HAVE_ROW_BASED_REPLICATION
if (current_stmt_binlog_row_based)
DBUG_RETURN(0);
-#endif
/* Otherwise, we fall through */
case THD::MYSQL_QUERY_TYPE:
/*
@@ -2871,9 +2858,7 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype,
*/
{
Query_log_event qinfo(this, query, query_len, is_trans, suppress_use);
-#ifdef HAVE_ROW_BASED_REPLICATION
qinfo.flags|= LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F;
-#endif
/*
Binlog table maps will be irrelevant after a Query_log_event
(they are just removed on the slave side) so after the query
@@ -2881,9 +2866,7 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype,
table maps were written.
*/
int error= mysql_bin_log.write(&qinfo);
-#ifdef HAVE_ROW_BASED_REPLICATION
binlog_table_maps= 0;
-#endif /*HAVE_ROW_BASED_REPLICATION*/
DBUG_RETURN(error);
}
break;
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 8c86a66392a..588d936fd57 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -941,12 +941,12 @@ public:
#ifndef MYSQL_CLIENT
int binlog_setup_trx_data();
-#ifdef HAVE_ROW_BASED_REPLICATION
-
/*
Public interface to write RBR events to the binlog
*/
void binlog_start_trans_and_stmt();
+ int binlog_flush_transaction_cache();
+ void binlog_set_stmt_begin();
int binlog_write_table_map(TABLE *table, bool is_transactional);
int binlog_write_row(TABLE* table, bool is_transactional,
MY_BITMAP const* cols, my_size_t colcnt,
@@ -996,7 +996,6 @@ public:
uint get_binlog_table_maps() const {
return binlog_table_maps;
}
-#endif /* HAVE_ROW_BASED_REPLICATION */
#endif /* MYSQL_CLIENT */
#ifndef MYSQL_CLIENT
@@ -1035,9 +1034,7 @@ public:
XID xid; // transaction identifier
enum xa_states xa_state; // used by external XA only
XID_STATE xid_state;
-#ifdef HAVE_ROW_BASED_REPLICATION
Rows_log_event *m_pending_rows_event;
-#endif
/*
Tables changed in transaction (that must be invalidated in query cache).
@@ -1544,7 +1541,6 @@ public:
void restore_active_arena(Query_arena *set, Query_arena *backup);
inline void set_current_stmt_binlog_row_based_if_mixed()
{
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
If in a stored/function trigger, the caller should already have done the
change. We test in_sub_stmt to prevent introducing bugs where people
@@ -1557,23 +1553,17 @@ public:
if ((variables.binlog_format == BINLOG_FORMAT_MIXED) &&
(in_sub_stmt == 0))
current_stmt_binlog_row_based= TRUE;
-#endif
}
inline void set_current_stmt_binlog_row_based()
{
-#ifdef HAVE_ROW_BASED_REPLICATION
current_stmt_binlog_row_based= TRUE;
-#endif
}
inline void clear_current_stmt_binlog_row_based()
{
-#ifdef HAVE_ROW_BASED_REPLICATION
current_stmt_binlog_row_based= FALSE;
-#endif
}
inline void reset_current_stmt_binlog_row_based()
{
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
If there are temporary tables, don't reset back to
statement-based. Indeed it could be that:
@@ -1597,9 +1587,6 @@ public:
current_stmt_binlog_row_based=
test(variables.binlog_format == BINLOG_FORMAT_ROW);
}
-#else
- current_stmt_binlog_row_based= FALSE;
-#endif
}
/*
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index ccacd71a614..989b78f3517 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -2277,7 +2277,6 @@ bool delayed_insert::handle_inserts(void)
thd.proc_info=0;
pthread_mutex_unlock(&mutex);
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
We need to flush the pending event when using row-based
replication since the flushing normally done in binlog_query() is
@@ -2292,7 +2291,6 @@ bool delayed_insert::handle_inserts(void)
*/
if (thd.current_stmt_binlog_row_based)
thd.binlog_flush_pending_rows_event(TRUE);
-#endif /* HAVE_ROW_BASED_REPLICATION */
if ((error=table->file->extra(HA_EXTRA_NO_CACHE)))
{ // This shouldn't happen
@@ -2644,8 +2642,7 @@ void select_insert::send_error(uint errcode,const char *err)
If the creation of the table failed (due to a syntax error, for
example), no table will have been opened and therefore 'table'
will be NULL. In that case, we still need to execute the rollback
- and the end of the function to truncate the binary log, but we can
- skip all the intermediate steps.
+ and the end of the function.
*/
if (table)
{
@@ -2676,10 +2673,8 @@ void select_insert::send_error(uint errcode,const char *err)
if (!table->file->has_transactions())
{
if (mysql_bin_log.is_open())
- {
thd->binlog_query(THD::ROW_QUERY_TYPE, thd->query, thd->query_length,
table->file->has_transactions(), FALSE);
- }
if (!thd->current_stmt_binlog_row_based && !table->s->tmp_table &&
!can_rollback_data())
thd->options|= OPTION_STATUS_NO_TRANS_UPDATE;
@@ -2924,9 +2919,7 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
save us from that ?
*/
table->reginfo.lock_type=TL_WRITE;
-#ifdef HAVE_ROW_BASED_REPLICATION
hooks->prelock(&table, 1); // Call prelock hooks
-#endif
if (! ((*lock)= mysql_lock_tables(thd, &table, 1,
MYSQL_LOCK_IGNORE_FLUSH, &not_used)))
{
@@ -2948,7 +2941,24 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
DBUG_ENTER("select_create::prepare");
TABLEOP_HOOKS *hook_ptr= NULL;
-#ifdef HAVE_ROW_BASED_REPLICATION
+ /*
+ For row-based replication, the CREATE-SELECT statement is written
+ in two pieces: the first one contain the CREATE TABLE statement
+ necessary to create the table and the second part contain the rows
+ that should go into the table.
+
+ For non-temporary tables, the start of the CREATE-SELECT
+ implicitly commits the previous transaction, and all events
+ forming the statement will be stored the transaction cache. At end
+ of the statement, the entire statement is committed as a
+ transaction, and all events are written to the binary log.
+
+ On the master, the table is locked for the duration of the
+ statement, but since the CREATE part is replicated as a simple
+ statement, there is no way to lock the table for accesses on the
+ slave. Hence, we have to hold on to the CREATE part of the
+ statement until the statement has finished.
+ */
class MY_HOOKS : public TABLEOP_HOOKS {
public:
MY_HOOKS(select_create *x) : ptr(x) { }
@@ -2958,7 +2968,7 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
{
TABLE const *const table = *tables;
if (ptr->get_thd()->current_stmt_binlog_row_based &&
- table->s->tmp_table == NO_TMP_TABLE &&
+ !table->s->tmp_table &&
!ptr->get_create_info()->table_existed)
{
ptr->binlog_show_create_table(tables, count);
@@ -2970,22 +2980,19 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
MY_HOOKS hooks(this);
hook_ptr= &hooks;
-#endif
unit= u;
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
- Start a statement transaction before the create if we are creating
- a non-temporary table and are using row-based replication for the
- statement.
+ Start a statement transaction before the create if we are using
+ row-based replication for the statement. If we are creating a
+ temporary table, we need to start a statement transaction.
*/
if ((thd->lex->create_info.options & HA_LEX_CREATE_TMP_TABLE) == 0 &&
thd->current_stmt_binlog_row_based)
{
thd->binlog_start_trans_and_stmt();
}
-#endif
if (!(table= create_table_from_items(thd, create_info, create_table,
extra_fields, keys, &values,
@@ -3029,8 +3036,6 @@ select_create::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
DBUG_RETURN(0);
}
-
-#ifdef HAVE_ROW_BASED_REPLICATION
void
select_create::binlog_show_create_table(TABLE **tables, uint count)
{
@@ -3071,7 +3076,6 @@ select_create::binlog_show_create_table(TABLE **tables, uint count)
/* is_trans */ TRUE,
/* suppress_use */ FALSE);
}
-#endif // HAVE_ROW_BASED_REPLICATION
void select_create::store_values(List<Item> &values)
{
@@ -3082,13 +3086,35 @@ void select_create::store_values(List<Item> &values)
void select_create::send_error(uint errcode,const char *err)
{
+ DBUG_ENTER("select_create::send_error");
+
+ DBUG_PRINT("info",
+ ("Current statement %s row-based",
+ thd->current_stmt_binlog_row_based ? "is" : "is NOT"));
+ DBUG_PRINT("info",
+ ("Current table (at 0x%lu) %s a temporary (or non-existant) table",
+ table,
+ table && !table->s->tmp_table ? "is NOT" : "is"));
+ DBUG_PRINT("info",
+ ("Table %s prior to executing this statement",
+ get_create_info()->table_existed ? "existed" : "did not exist"));
+
/*
- Disable binlog, because we "roll back" partial inserts in ::abort
- by removing the table, even for non-transactional tables.
+ This will execute any rollbacks that are necessary before writing
+ the transcation cache.
+
+ We disable the binary log since nothing should be written to the
+ binary log. This disabling is important, since we potentially do
+ a "roll back" of non-transactional tables by removing the table,
+ and the actual rollback might generate events that should not be
+ written to the binary log.
+
*/
tmp_disable_binlog(thd);
select_insert::send_error(errcode, err);
reenable_binlog(thd);
+
+ DBUG_VOID_RETURN;
}
@@ -3099,6 +3125,14 @@ bool select_create::send_eof()
abort();
else
{
+ /*
+ Do an implicit commit at end of statement for non-temporary
+ tables. This can fail, but we should unlock the table
+ nevertheless.
+ */
+ if (!table->s->tmp_table)
+ ha_commit(thd); // Can fail, but we proceed anyway
+
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
VOID(pthread_mutex_lock(&LOCK_open));
@@ -3117,12 +3151,31 @@ bool select_create::send_eof()
void select_create::abort()
{
+ DBUG_ENTER("select_create::abort");
VOID(pthread_mutex_lock(&LOCK_open));
+
+ /*
+ We roll back the statement, including truncating the transaction
+ cache of the binary log, if the statement failed.
+
+ We roll back the statement prior to deleting the table and prior
+ to releasing the lock on the table, since there might be potential
+ for failure if the rollback is executed after the drop or after
+ unlocking the table.
+
+ We also roll back the statement regardless of whether the creation
+ of the table succeeded or not, since we need to reset the binary
+ log state.
+ */
+ if (thd->current_stmt_binlog_row_based)
+ ha_rollback_stmt(thd);
+
if (thd->extra_lock)
{
mysql_unlock_tables(thd, thd->extra_lock);
thd->extra_lock=0;
}
+
if (table)
{
table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
@@ -3134,17 +3187,8 @@ void select_create::abort()
table->s->version= 0;
hash_delete(&open_cache,(byte*) table);
if (!create_info->table_existed)
- {
quick_rm_table(table_type, create_table->db,
create_table->table_name, 0);
- /*
- We roll back the statement, including truncating the
- transaction cache of the binary log, if the statement
- failed.
- */
- if (thd->current_stmt_binlog_row_based)
- ha_rollback_stmt(thd);
- }
/* Tell threads waiting for refresh that something has happened */
if (version != refresh_version)
broadcast_refresh();
@@ -3154,6 +3198,7 @@ void select_create::abort()
table=0; // Safety
}
VOID(pthread_mutex_unlock(&LOCK_open));
+ DBUG_VOID_RETURN;
}
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc
index 1c399503498..97b5df241f7 100644
--- a/sql/sql_lex.cc
+++ b/sql/sql_lex.cc
@@ -1680,9 +1680,7 @@ void Query_tables_list::reset_query_tables_list(bool init)
sroutines_list.empty();
sroutines_list_own_last= sroutines_list.next;
sroutines_list_own_elements= 0;
-#ifdef HAVE_ROW_BASED_REPLICATION
binlog_row_based_if_mixed= FALSE;
-#endif
}
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index fd76ec7ac51..8e9eb578911 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -820,7 +820,6 @@ public:
byte **sroutines_list_own_last;
uint sroutines_list_own_elements;
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
Tells if the parsing stage detected that some items require row-based
binlogging to give a reliable binlog/replication, or if we will use
@@ -828,7 +827,6 @@ public:
binlogging.
*/
bool binlog_row_based_if_mixed;
-#endif
/*
These constructor and destructor serve for creation/destruction
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 81dd710dbcb..c1c775f95b7 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -464,7 +464,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
#ifndef EMBEDDED_LIBRARY
if (mysql_bin_log.is_open())
{
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
We need to do the job that is normally done inside
binlog_query() here, which is to ensure that the pending event
@@ -476,7 +475,6 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
if (thd->current_stmt_binlog_row_based)
thd->binlog_flush_pending_rows_event(true);
else
-#endif
{
/*
As already explained above, we need to call end_io_cache() or the last
diff --git a/sql/sql_locale.cc b/sql/sql_locale.cc
index 217c09d9e00..4e61c664106 100644
--- a/sql/sql_locale.cc
+++ b/sql/sql_locale.cc
@@ -23,17 +23,6 @@
#include "mysql_priv.h"
-MY_LOCALE *my_locale_by_name(const char *name)
-{
- MY_LOCALE **locale;
- for( locale= my_locales; *locale != NULL; locale++)
- {
- if(!strcmp((*locale)->name, name))
- return *locale;
- }
- return NULL;
-}
-
/***** LOCALE BEGIN ar_AE: Arabic - United Arab Emirates *****/
static const char *my_locale_month_names_ar_AE[13] =
{"يناير","Ùبراير","مارس","أبريل","مايو","يونيو","يوليو","أغسطس","سبتمبر","أكتوبر","نوÙمبر","ديسمبر", NullS };
@@ -51,7 +40,17 @@ static TYPELIB my_locale_typelib_day_names_ar_AE =
{ array_elements(my_locale_day_names_ar_AE)-1, "", my_locale_day_names_ar_AE, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ar_AE =
{ array_elements(my_locale_ab_day_names_ar_AE)-1, "", my_locale_ab_day_names_ar_AE, NULL };
-MY_LOCALE my_locale_ar_AE ( "ar_AE", "Arabic - United Arab Emirates", FALSE, &my_locale_typelib_month_names_ar_AE, &my_locale_typelib_ab_month_names_ar_AE, &my_locale_typelib_day_names_ar_AE, &my_locale_typelib_ab_day_names_ar_AE );
+MY_LOCALE my_locale_ar_AE
+(
+ 6,
+ "ar_AE",
+ "Arabic - United Arab Emirates",
+ FALSE,
+ &my_locale_typelib_month_names_ar_AE,
+ &my_locale_typelib_ab_month_names_ar_AE,
+ &my_locale_typelib_day_names_ar_AE,
+ &my_locale_typelib_ab_day_names_ar_AE
+);
/***** LOCALE END ar_AE *****/
/***** LOCALE BEGIN ar_BH: Arabic - Bahrain *****/
@@ -71,7 +70,17 @@ static TYPELIB my_locale_typelib_day_names_ar_BH =
{ array_elements(my_locale_day_names_ar_BH)-1, "", my_locale_day_names_ar_BH, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ar_BH =
{ array_elements(my_locale_ab_day_names_ar_BH)-1, "", my_locale_ab_day_names_ar_BH, NULL };
-MY_LOCALE my_locale_ar_BH ( "ar_BH", "Arabic - Bahrain", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_BH
+(
+ 7,
+ "ar_BH",
+ "Arabic - Bahrain",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_BH *****/
/***** LOCALE BEGIN ar_JO: Arabic - Jordan *****/
@@ -91,7 +100,17 @@ static TYPELIB my_locale_typelib_day_names_ar_JO =
{ array_elements(my_locale_day_names_ar_JO)-1, "", my_locale_day_names_ar_JO, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ar_JO =
{ array_elements(my_locale_ab_day_names_ar_JO)-1, "", my_locale_ab_day_names_ar_JO, NULL };
-MY_LOCALE my_locale_ar_JO ( "ar_JO", "Arabic - Jordan", FALSE, &my_locale_typelib_month_names_ar_JO, &my_locale_typelib_ab_month_names_ar_JO, &my_locale_typelib_day_names_ar_JO, &my_locale_typelib_ab_day_names_ar_JO );
+MY_LOCALE my_locale_ar_JO
+(
+ 8,
+ "ar_JO",
+ "Arabic - Jordan",
+ FALSE,
+ &my_locale_typelib_month_names_ar_JO,
+ &my_locale_typelib_ab_month_names_ar_JO,
+ &my_locale_typelib_day_names_ar_JO,
+ &my_locale_typelib_ab_day_names_ar_JO
+);
/***** LOCALE END ar_JO *****/
/***** LOCALE BEGIN ar_SA: Arabic - Saudi Arabia *****/
@@ -111,7 +130,17 @@ static TYPELIB my_locale_typelib_day_names_ar_SA =
{ array_elements(my_locale_day_names_ar_SA)-1, "", my_locale_day_names_ar_SA, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ar_SA =
{ array_elements(my_locale_ab_day_names_ar_SA)-1, "", my_locale_ab_day_names_ar_SA, NULL };
-MY_LOCALE my_locale_ar_SA ( "ar_SA", "Arabic - Saudi Arabia", FALSE, &my_locale_typelib_month_names_ar_SA, &my_locale_typelib_ab_month_names_ar_SA, &my_locale_typelib_day_names_ar_SA, &my_locale_typelib_ab_day_names_ar_SA );
+MY_LOCALE my_locale_ar_SA
+(
+ 9,
+ "ar_SA",
+ "Arabic - Saudi Arabia",
+ FALSE,
+ &my_locale_typelib_month_names_ar_SA,
+ &my_locale_typelib_ab_month_names_ar_SA,
+ &my_locale_typelib_day_names_ar_SA,
+ &my_locale_typelib_ab_day_names_ar_SA
+);
/***** LOCALE END ar_SA *****/
/***** LOCALE BEGIN ar_SY: Arabic - Syria *****/
@@ -131,7 +160,17 @@ static TYPELIB my_locale_typelib_day_names_ar_SY =
{ array_elements(my_locale_day_names_ar_SY)-1, "", my_locale_day_names_ar_SY, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ar_SY =
{ array_elements(my_locale_ab_day_names_ar_SY)-1, "", my_locale_ab_day_names_ar_SY, NULL };
-MY_LOCALE my_locale_ar_SY ( "ar_SY", "Arabic - Syria", FALSE, &my_locale_typelib_month_names_ar_SY, &my_locale_typelib_ab_month_names_ar_SY, &my_locale_typelib_day_names_ar_SY, &my_locale_typelib_ab_day_names_ar_SY );
+MY_LOCALE my_locale_ar_SY
+(
+ 10,
+ "ar_SY",
+ "Arabic - Syria",
+ FALSE,
+ &my_locale_typelib_month_names_ar_SY,
+ &my_locale_typelib_ab_month_names_ar_SY,
+ &my_locale_typelib_day_names_ar_SY,
+ &my_locale_typelib_ab_day_names_ar_SY
+);
/***** LOCALE END ar_SY *****/
/***** LOCALE BEGIN be_BY: Belarusian - Belarus *****/
@@ -151,7 +190,17 @@ static TYPELIB my_locale_typelib_day_names_be_BY =
{ array_elements(my_locale_day_names_be_BY)-1, "", my_locale_day_names_be_BY, NULL };
static TYPELIB my_locale_typelib_ab_day_names_be_BY =
{ array_elements(my_locale_ab_day_names_be_BY)-1, "", my_locale_ab_day_names_be_BY, NULL };
-MY_LOCALE my_locale_be_BY ( "be_BY", "Belarusian - Belarus", FALSE, &my_locale_typelib_month_names_be_BY, &my_locale_typelib_ab_month_names_be_BY, &my_locale_typelib_day_names_be_BY, &my_locale_typelib_ab_day_names_be_BY );
+MY_LOCALE my_locale_be_BY
+(
+ 11,
+ "be_BY",
+ "Belarusian - Belarus",
+ FALSE,
+ &my_locale_typelib_month_names_be_BY,
+ &my_locale_typelib_ab_month_names_be_BY,
+ &my_locale_typelib_day_names_be_BY,
+ &my_locale_typelib_ab_day_names_be_BY
+);
/***** LOCALE END be_BY *****/
/***** LOCALE BEGIN bg_BG: Bulgarian - Bulgaria *****/
@@ -171,7 +220,17 @@ static TYPELIB my_locale_typelib_day_names_bg_BG =
{ array_elements(my_locale_day_names_bg_BG)-1, "", my_locale_day_names_bg_BG, NULL };
static TYPELIB my_locale_typelib_ab_day_names_bg_BG =
{ array_elements(my_locale_ab_day_names_bg_BG)-1, "", my_locale_ab_day_names_bg_BG, NULL };
-MY_LOCALE my_locale_bg_BG ( "bg_BG", "Bulgarian - Bulgaria", FALSE, &my_locale_typelib_month_names_bg_BG, &my_locale_typelib_ab_month_names_bg_BG, &my_locale_typelib_day_names_bg_BG, &my_locale_typelib_ab_day_names_bg_BG );
+MY_LOCALE my_locale_bg_BG
+(
+ 12,
+ "bg_BG",
+ "Bulgarian - Bulgaria",
+ FALSE,
+ &my_locale_typelib_month_names_bg_BG,
+ &my_locale_typelib_ab_month_names_bg_BG,
+ &my_locale_typelib_day_names_bg_BG,
+ &my_locale_typelib_ab_day_names_bg_BG
+);
/***** LOCALE END bg_BG *****/
/***** LOCALE BEGIN ca_ES: Catalan - Catalan *****/
@@ -191,7 +250,17 @@ static TYPELIB my_locale_typelib_day_names_ca_ES =
{ array_elements(my_locale_day_names_ca_ES)-1, "", my_locale_day_names_ca_ES, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ca_ES =
{ array_elements(my_locale_ab_day_names_ca_ES)-1, "", my_locale_ab_day_names_ca_ES, NULL };
-MY_LOCALE my_locale_ca_ES ( "ca_ES", "Catalan - Catalan", FALSE, &my_locale_typelib_month_names_ca_ES, &my_locale_typelib_ab_month_names_ca_ES, &my_locale_typelib_day_names_ca_ES, &my_locale_typelib_ab_day_names_ca_ES );
+MY_LOCALE my_locale_ca_ES
+(
+ 13,
+ "ca_ES",
+ "Catalan - Catalan",
+ FALSE,
+ &my_locale_typelib_month_names_ca_ES,
+ &my_locale_typelib_ab_month_names_ca_ES,
+ &my_locale_typelib_day_names_ca_ES,
+ &my_locale_typelib_ab_day_names_ca_ES
+);
/***** LOCALE END ca_ES *****/
/***** LOCALE BEGIN cs_CZ: Czech - Czech Republic *****/
@@ -211,7 +280,17 @@ static TYPELIB my_locale_typelib_day_names_cs_CZ =
{ array_elements(my_locale_day_names_cs_CZ)-1, "", my_locale_day_names_cs_CZ, NULL };
static TYPELIB my_locale_typelib_ab_day_names_cs_CZ =
{ array_elements(my_locale_ab_day_names_cs_CZ)-1, "", my_locale_ab_day_names_cs_CZ, NULL };
-MY_LOCALE my_locale_cs_CZ ( "cs_CZ", "Czech - Czech Republic", FALSE, &my_locale_typelib_month_names_cs_CZ, &my_locale_typelib_ab_month_names_cs_CZ, &my_locale_typelib_day_names_cs_CZ, &my_locale_typelib_ab_day_names_cs_CZ );
+MY_LOCALE my_locale_cs_CZ
+(
+ 14,
+ "cs_CZ",
+ "Czech - Czech Republic",
+ FALSE,
+ &my_locale_typelib_month_names_cs_CZ,
+ &my_locale_typelib_ab_month_names_cs_CZ,
+ &my_locale_typelib_day_names_cs_CZ,
+ &my_locale_typelib_ab_day_names_cs_CZ
+);
/***** LOCALE END cs_CZ *****/
/***** LOCALE BEGIN da_DK: Danish - Denmark *****/
@@ -231,7 +310,17 @@ static TYPELIB my_locale_typelib_day_names_da_DK =
{ array_elements(my_locale_day_names_da_DK)-1, "", my_locale_day_names_da_DK, NULL };
static TYPELIB my_locale_typelib_ab_day_names_da_DK =
{ array_elements(my_locale_ab_day_names_da_DK)-1, "", my_locale_ab_day_names_da_DK, NULL };
-MY_LOCALE my_locale_da_DK ( "da_DK", "Danish - Denmark", FALSE, &my_locale_typelib_month_names_da_DK, &my_locale_typelib_ab_month_names_da_DK, &my_locale_typelib_day_names_da_DK, &my_locale_typelib_ab_day_names_da_DK );
+MY_LOCALE my_locale_da_DK
+(
+ 15,
+ "da_DK",
+ "Danish - Denmark",
+ FALSE,
+ &my_locale_typelib_month_names_da_DK,
+ &my_locale_typelib_ab_month_names_da_DK,
+ &my_locale_typelib_day_names_da_DK,
+ &my_locale_typelib_ab_day_names_da_DK
+);
/***** LOCALE END da_DK *****/
/***** LOCALE BEGIN de_AT: German - Austria *****/
@@ -251,7 +340,17 @@ static TYPELIB my_locale_typelib_day_names_de_AT =
{ array_elements(my_locale_day_names_de_AT)-1, "", my_locale_day_names_de_AT, NULL };
static TYPELIB my_locale_typelib_ab_day_names_de_AT =
{ array_elements(my_locale_ab_day_names_de_AT)-1, "", my_locale_ab_day_names_de_AT, NULL };
-MY_LOCALE my_locale_de_AT ( "de_AT", "German - Austria", FALSE, &my_locale_typelib_month_names_de_AT, &my_locale_typelib_ab_month_names_de_AT, &my_locale_typelib_day_names_de_AT, &my_locale_typelib_ab_day_names_de_AT );
+MY_LOCALE my_locale_de_AT
+(
+ 16,
+ "de_AT",
+ "German - Austria",
+ FALSE,
+ &my_locale_typelib_month_names_de_AT,
+ &my_locale_typelib_ab_month_names_de_AT,
+ &my_locale_typelib_day_names_de_AT,
+ &my_locale_typelib_ab_day_names_de_AT
+);
/***** LOCALE END de_AT *****/
/***** LOCALE BEGIN de_DE: German - Germany *****/
@@ -271,7 +370,17 @@ static TYPELIB my_locale_typelib_day_names_de_DE =
{ array_elements(my_locale_day_names_de_DE)-1, "", my_locale_day_names_de_DE, NULL };
static TYPELIB my_locale_typelib_ab_day_names_de_DE =
{ array_elements(my_locale_ab_day_names_de_DE)-1, "", my_locale_ab_day_names_de_DE, NULL };
-MY_LOCALE my_locale_de_DE ( "de_DE", "German - Germany", FALSE, &my_locale_typelib_month_names_de_DE, &my_locale_typelib_ab_month_names_de_DE, &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE );
+MY_LOCALE my_locale_de_DE
+(
+ 4,
+ "de_DE",
+ "German - Germany",
+ FALSE,
+ &my_locale_typelib_month_names_de_DE,
+ &my_locale_typelib_ab_month_names_de_DE,
+ &my_locale_typelib_day_names_de_DE,
+ &my_locale_typelib_ab_day_names_de_DE
+);
/***** LOCALE END de_DE *****/
/***** LOCALE BEGIN en_US: English - United States *****/
@@ -291,7 +400,17 @@ static TYPELIB my_locale_typelib_day_names_en_US =
{ array_elements(my_locale_day_names_en_US)-1, "", my_locale_day_names_en_US, NULL };
static TYPELIB my_locale_typelib_ab_day_names_en_US =
{ array_elements(my_locale_ab_day_names_en_US)-1, "", my_locale_ab_day_names_en_US, NULL };
-MY_LOCALE my_locale_en_US ( "en_US", "English - United States", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_US
+(
+ 0,
+ "en_US",
+ "English - United States",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_US *****/
/***** LOCALE BEGIN es_ES: Spanish - Spain *****/
@@ -311,7 +430,17 @@ static TYPELIB my_locale_typelib_day_names_es_ES =
{ array_elements(my_locale_day_names_es_ES)-1, "", my_locale_day_names_es_ES, NULL };
static TYPELIB my_locale_typelib_ab_day_names_es_ES =
{ array_elements(my_locale_ab_day_names_es_ES)-1, "", my_locale_ab_day_names_es_ES, NULL };
-MY_LOCALE my_locale_es_ES ( "es_ES", "Spanish - Spain", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_ES
+(
+ 17,
+ "es_ES",
+ "Spanish - Spain",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_ES *****/
/***** LOCALE BEGIN et_EE: Estonian - Estonia *****/
@@ -331,7 +460,17 @@ static TYPELIB my_locale_typelib_day_names_et_EE =
{ array_elements(my_locale_day_names_et_EE)-1, "", my_locale_day_names_et_EE, NULL };
static TYPELIB my_locale_typelib_ab_day_names_et_EE =
{ array_elements(my_locale_ab_day_names_et_EE)-1, "", my_locale_ab_day_names_et_EE, NULL };
-MY_LOCALE my_locale_et_EE ( "et_EE", "Estonian - Estonia", FALSE, &my_locale_typelib_month_names_et_EE, &my_locale_typelib_ab_month_names_et_EE, &my_locale_typelib_day_names_et_EE, &my_locale_typelib_ab_day_names_et_EE );
+MY_LOCALE my_locale_et_EE
+(
+ 18,
+ "et_EE",
+ "Estonian - Estonia",
+ FALSE,
+ &my_locale_typelib_month_names_et_EE,
+ &my_locale_typelib_ab_month_names_et_EE,
+ &my_locale_typelib_day_names_et_EE,
+ &my_locale_typelib_ab_day_names_et_EE
+);
/***** LOCALE END et_EE *****/
/***** LOCALE BEGIN eu_ES: Basque - Basque *****/
@@ -351,7 +490,17 @@ static TYPELIB my_locale_typelib_day_names_eu_ES =
{ array_elements(my_locale_day_names_eu_ES)-1, "", my_locale_day_names_eu_ES, NULL };
static TYPELIB my_locale_typelib_ab_day_names_eu_ES =
{ array_elements(my_locale_ab_day_names_eu_ES)-1, "", my_locale_ab_day_names_eu_ES, NULL };
-MY_LOCALE my_locale_eu_ES ( "eu_ES", "Basque - Basque", TRUE, &my_locale_typelib_month_names_eu_ES, &my_locale_typelib_ab_month_names_eu_ES, &my_locale_typelib_day_names_eu_ES, &my_locale_typelib_ab_day_names_eu_ES );
+MY_LOCALE my_locale_eu_ES
+(
+ 19,
+ "eu_ES",
+ "Basque - Basque",
+ TRUE,
+ &my_locale_typelib_month_names_eu_ES,
+ &my_locale_typelib_ab_month_names_eu_ES,
+ &my_locale_typelib_day_names_eu_ES,
+ &my_locale_typelib_ab_day_names_eu_ES
+);
/***** LOCALE END eu_ES *****/
/***** LOCALE BEGIN fi_FI: Finnish - Finland *****/
@@ -371,7 +520,17 @@ static TYPELIB my_locale_typelib_day_names_fi_FI =
{ array_elements(my_locale_day_names_fi_FI)-1, "", my_locale_day_names_fi_FI, NULL };
static TYPELIB my_locale_typelib_ab_day_names_fi_FI =
{ array_elements(my_locale_ab_day_names_fi_FI)-1, "", my_locale_ab_day_names_fi_FI, NULL };
-MY_LOCALE my_locale_fi_FI ( "fi_FI", "Finnish - Finland", FALSE, &my_locale_typelib_month_names_fi_FI, &my_locale_typelib_ab_month_names_fi_FI, &my_locale_typelib_day_names_fi_FI, &my_locale_typelib_ab_day_names_fi_FI );
+MY_LOCALE my_locale_fi_FI
+(
+ 20,
+ "fi_FI",
+ "Finnish - Finland",
+ FALSE,
+ &my_locale_typelib_month_names_fi_FI,
+ &my_locale_typelib_ab_month_names_fi_FI,
+ &my_locale_typelib_day_names_fi_FI,
+ &my_locale_typelib_ab_day_names_fi_FI
+);
/***** LOCALE END fi_FI *****/
/***** LOCALE BEGIN fo_FO: Faroese - Faroe Islands *****/
@@ -391,7 +550,17 @@ static TYPELIB my_locale_typelib_day_names_fo_FO =
{ array_elements(my_locale_day_names_fo_FO)-1, "", my_locale_day_names_fo_FO, NULL };
static TYPELIB my_locale_typelib_ab_day_names_fo_FO =
{ array_elements(my_locale_ab_day_names_fo_FO)-1, "", my_locale_ab_day_names_fo_FO, NULL };
-MY_LOCALE my_locale_fo_FO ( "fo_FO", "Faroese - Faroe Islands", FALSE, &my_locale_typelib_month_names_fo_FO, &my_locale_typelib_ab_month_names_fo_FO, &my_locale_typelib_day_names_fo_FO, &my_locale_typelib_ab_day_names_fo_FO );
+MY_LOCALE my_locale_fo_FO
+(
+ 21,
+ "fo_FO",
+ "Faroese - Faroe Islands",
+ FALSE,
+ &my_locale_typelib_month_names_fo_FO,
+ &my_locale_typelib_ab_month_names_fo_FO,
+ &my_locale_typelib_day_names_fo_FO,
+ &my_locale_typelib_ab_day_names_fo_FO
+);
/***** LOCALE END fo_FO *****/
/***** LOCALE BEGIN fr_FR: French - France *****/
@@ -411,7 +580,17 @@ static TYPELIB my_locale_typelib_day_names_fr_FR =
{ array_elements(my_locale_day_names_fr_FR)-1, "", my_locale_day_names_fr_FR, NULL };
static TYPELIB my_locale_typelib_ab_day_names_fr_FR =
{ array_elements(my_locale_ab_day_names_fr_FR)-1, "", my_locale_ab_day_names_fr_FR, NULL };
-MY_LOCALE my_locale_fr_FR ( "fr_FR", "French - France", FALSE, &my_locale_typelib_month_names_fr_FR, &my_locale_typelib_ab_month_names_fr_FR, &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR );
+MY_LOCALE my_locale_fr_FR
+(
+ 5,
+ "fr_FR",
+ "French - France",
+ FALSE,
+ &my_locale_typelib_month_names_fr_FR,
+ &my_locale_typelib_ab_month_names_fr_FR,
+ &my_locale_typelib_day_names_fr_FR,
+ &my_locale_typelib_ab_day_names_fr_FR
+);
/***** LOCALE END fr_FR *****/
/***** LOCALE BEGIN gl_ES: Galician - Galician *****/
@@ -431,7 +610,17 @@ static TYPELIB my_locale_typelib_day_names_gl_ES =
{ array_elements(my_locale_day_names_gl_ES)-1, "", my_locale_day_names_gl_ES, NULL };
static TYPELIB my_locale_typelib_ab_day_names_gl_ES =
{ array_elements(my_locale_ab_day_names_gl_ES)-1, "", my_locale_ab_day_names_gl_ES, NULL };
-MY_LOCALE my_locale_gl_ES ( "gl_ES", "Galician - Galician", FALSE, &my_locale_typelib_month_names_gl_ES, &my_locale_typelib_ab_month_names_gl_ES, &my_locale_typelib_day_names_gl_ES, &my_locale_typelib_ab_day_names_gl_ES );
+MY_LOCALE my_locale_gl_ES
+(
+ 22,
+ "gl_ES",
+ "Galician - Galician",
+ FALSE,
+ &my_locale_typelib_month_names_gl_ES,
+ &my_locale_typelib_ab_month_names_gl_ES,
+ &my_locale_typelib_day_names_gl_ES,
+ &my_locale_typelib_ab_day_names_gl_ES
+);
/***** LOCALE END gl_ES *****/
/***** LOCALE BEGIN gu_IN: Gujarati - India *****/
@@ -451,7 +640,17 @@ static TYPELIB my_locale_typelib_day_names_gu_IN =
{ array_elements(my_locale_day_names_gu_IN)-1, "", my_locale_day_names_gu_IN, NULL };
static TYPELIB my_locale_typelib_ab_day_names_gu_IN =
{ array_elements(my_locale_ab_day_names_gu_IN)-1, "", my_locale_ab_day_names_gu_IN, NULL };
-MY_LOCALE my_locale_gu_IN ( "gu_IN", "Gujarati - India", FALSE, &my_locale_typelib_month_names_gu_IN, &my_locale_typelib_ab_month_names_gu_IN, &my_locale_typelib_day_names_gu_IN, &my_locale_typelib_ab_day_names_gu_IN );
+MY_LOCALE my_locale_gu_IN
+(
+ 23,
+ "gu_IN",
+ "Gujarati - India",
+ FALSE,
+ &my_locale_typelib_month_names_gu_IN,
+ &my_locale_typelib_ab_month_names_gu_IN,
+ &my_locale_typelib_day_names_gu_IN,
+ &my_locale_typelib_ab_day_names_gu_IN
+);
/***** LOCALE END gu_IN *****/
/***** LOCALE BEGIN he_IL: Hebrew - Israel *****/
@@ -471,7 +670,17 @@ static TYPELIB my_locale_typelib_day_names_he_IL =
{ array_elements(my_locale_day_names_he_IL)-1, "", my_locale_day_names_he_IL, NULL };
static TYPELIB my_locale_typelib_ab_day_names_he_IL =
{ array_elements(my_locale_ab_day_names_he_IL)-1, "", my_locale_ab_day_names_he_IL, NULL };
-MY_LOCALE my_locale_he_IL ( "he_IL", "Hebrew - Israel", FALSE, &my_locale_typelib_month_names_he_IL, &my_locale_typelib_ab_month_names_he_IL, &my_locale_typelib_day_names_he_IL, &my_locale_typelib_ab_day_names_he_IL );
+MY_LOCALE my_locale_he_IL
+(
+ 24,
+ "he_IL",
+ "Hebrew - Israel",
+ FALSE,
+ &my_locale_typelib_month_names_he_IL,
+ &my_locale_typelib_ab_month_names_he_IL,
+ &my_locale_typelib_day_names_he_IL,
+ &my_locale_typelib_ab_day_names_he_IL
+);
/***** LOCALE END he_IL *****/
/***** LOCALE BEGIN hi_IN: Hindi - India *****/
@@ -491,7 +700,17 @@ static TYPELIB my_locale_typelib_day_names_hi_IN =
{ array_elements(my_locale_day_names_hi_IN)-1, "", my_locale_day_names_hi_IN, NULL };
static TYPELIB my_locale_typelib_ab_day_names_hi_IN =
{ array_elements(my_locale_ab_day_names_hi_IN)-1, "", my_locale_ab_day_names_hi_IN, NULL };
-MY_LOCALE my_locale_hi_IN ( "hi_IN", "Hindi - India", FALSE, &my_locale_typelib_month_names_hi_IN, &my_locale_typelib_ab_month_names_hi_IN, &my_locale_typelib_day_names_hi_IN, &my_locale_typelib_ab_day_names_hi_IN );
+MY_LOCALE my_locale_hi_IN
+(
+ 25,
+ "hi_IN",
+ "Hindi - India",
+ FALSE,
+ &my_locale_typelib_month_names_hi_IN,
+ &my_locale_typelib_ab_month_names_hi_IN,
+ &my_locale_typelib_day_names_hi_IN,
+ &my_locale_typelib_ab_day_names_hi_IN
+);
/***** LOCALE END hi_IN *****/
/***** LOCALE BEGIN hr_HR: Croatian - Croatia *****/
@@ -511,7 +730,17 @@ static TYPELIB my_locale_typelib_day_names_hr_HR =
{ array_elements(my_locale_day_names_hr_HR)-1, "", my_locale_day_names_hr_HR, NULL };
static TYPELIB my_locale_typelib_ab_day_names_hr_HR =
{ array_elements(my_locale_ab_day_names_hr_HR)-1, "", my_locale_ab_day_names_hr_HR, NULL };
-MY_LOCALE my_locale_hr_HR ( "hr_HR", "Croatian - Croatia", FALSE, &my_locale_typelib_month_names_hr_HR, &my_locale_typelib_ab_month_names_hr_HR, &my_locale_typelib_day_names_hr_HR, &my_locale_typelib_ab_day_names_hr_HR );
+MY_LOCALE my_locale_hr_HR
+(
+ 26,
+ "hr_HR",
+ "Croatian - Croatia",
+ FALSE,
+ &my_locale_typelib_month_names_hr_HR,
+ &my_locale_typelib_ab_month_names_hr_HR,
+ &my_locale_typelib_day_names_hr_HR,
+ &my_locale_typelib_ab_day_names_hr_HR
+);
/***** LOCALE END hr_HR *****/
/***** LOCALE BEGIN hu_HU: Hungarian - Hungary *****/
@@ -531,7 +760,17 @@ static TYPELIB my_locale_typelib_day_names_hu_HU =
{ array_elements(my_locale_day_names_hu_HU)-1, "", my_locale_day_names_hu_HU, NULL };
static TYPELIB my_locale_typelib_ab_day_names_hu_HU =
{ array_elements(my_locale_ab_day_names_hu_HU)-1, "", my_locale_ab_day_names_hu_HU, NULL };
-MY_LOCALE my_locale_hu_HU ( "hu_HU", "Hungarian - Hungary", FALSE, &my_locale_typelib_month_names_hu_HU, &my_locale_typelib_ab_month_names_hu_HU, &my_locale_typelib_day_names_hu_HU, &my_locale_typelib_ab_day_names_hu_HU );
+MY_LOCALE my_locale_hu_HU
+(
+ 27,
+ "hu_HU",
+ "Hungarian - Hungary",
+ FALSE,
+ &my_locale_typelib_month_names_hu_HU,
+ &my_locale_typelib_ab_month_names_hu_HU,
+ &my_locale_typelib_day_names_hu_HU,
+ &my_locale_typelib_ab_day_names_hu_HU
+);
/***** LOCALE END hu_HU *****/
/***** LOCALE BEGIN id_ID: Indonesian - Indonesia *****/
@@ -551,7 +790,17 @@ static TYPELIB my_locale_typelib_day_names_id_ID =
{ array_elements(my_locale_day_names_id_ID)-1, "", my_locale_day_names_id_ID, NULL };
static TYPELIB my_locale_typelib_ab_day_names_id_ID =
{ array_elements(my_locale_ab_day_names_id_ID)-1, "", my_locale_ab_day_names_id_ID, NULL };
-MY_LOCALE my_locale_id_ID ( "id_ID", "Indonesian - Indonesia", TRUE, &my_locale_typelib_month_names_id_ID, &my_locale_typelib_ab_month_names_id_ID, &my_locale_typelib_day_names_id_ID, &my_locale_typelib_ab_day_names_id_ID );
+MY_LOCALE my_locale_id_ID
+(
+ 28,
+ "id_ID",
+ "Indonesian - Indonesia",
+ TRUE,
+ &my_locale_typelib_month_names_id_ID,
+ &my_locale_typelib_ab_month_names_id_ID,
+ &my_locale_typelib_day_names_id_ID,
+ &my_locale_typelib_ab_day_names_id_ID
+);
/***** LOCALE END id_ID *****/
/***** LOCALE BEGIN is_IS: Icelandic - Iceland *****/
@@ -571,7 +820,17 @@ static TYPELIB my_locale_typelib_day_names_is_IS =
{ array_elements(my_locale_day_names_is_IS)-1, "", my_locale_day_names_is_IS, NULL };
static TYPELIB my_locale_typelib_ab_day_names_is_IS =
{ array_elements(my_locale_ab_day_names_is_IS)-1, "", my_locale_ab_day_names_is_IS, NULL };
-MY_LOCALE my_locale_is_IS ( "is_IS", "Icelandic - Iceland", FALSE, &my_locale_typelib_month_names_is_IS, &my_locale_typelib_ab_month_names_is_IS, &my_locale_typelib_day_names_is_IS, &my_locale_typelib_ab_day_names_is_IS );
+MY_LOCALE my_locale_is_IS
+(
+ 29,
+ "is_IS",
+ "Icelandic - Iceland",
+ FALSE,
+ &my_locale_typelib_month_names_is_IS,
+ &my_locale_typelib_ab_month_names_is_IS,
+ &my_locale_typelib_day_names_is_IS,
+ &my_locale_typelib_ab_day_names_is_IS
+);
/***** LOCALE END is_IS *****/
/***** LOCALE BEGIN it_CH: Italian - Switzerland *****/
@@ -591,7 +850,17 @@ static TYPELIB my_locale_typelib_day_names_it_CH =
{ array_elements(my_locale_day_names_it_CH)-1, "", my_locale_day_names_it_CH, NULL };
static TYPELIB my_locale_typelib_ab_day_names_it_CH =
{ array_elements(my_locale_ab_day_names_it_CH)-1, "", my_locale_ab_day_names_it_CH, NULL };
-MY_LOCALE my_locale_it_CH ( "it_CH", "Italian - Switzerland", FALSE, &my_locale_typelib_month_names_it_CH, &my_locale_typelib_ab_month_names_it_CH, &my_locale_typelib_day_names_it_CH, &my_locale_typelib_ab_day_names_it_CH );
+MY_LOCALE my_locale_it_CH
+(
+ 30,
+ "it_CH",
+ "Italian - Switzerland",
+ FALSE,
+ &my_locale_typelib_month_names_it_CH,
+ &my_locale_typelib_ab_month_names_it_CH,
+ &my_locale_typelib_day_names_it_CH,
+ &my_locale_typelib_ab_day_names_it_CH
+);
/***** LOCALE END it_CH *****/
/***** LOCALE BEGIN ja_JP: Japanese - Japan *****/
@@ -611,7 +880,17 @@ static TYPELIB my_locale_typelib_day_names_ja_JP =
{ array_elements(my_locale_day_names_ja_JP)-1, "", my_locale_day_names_ja_JP, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ja_JP =
{ array_elements(my_locale_ab_day_names_ja_JP)-1, "", my_locale_ab_day_names_ja_JP, NULL };
-MY_LOCALE my_locale_ja_JP ( "ja_JP", "Japanese - Japan", FALSE, &my_locale_typelib_month_names_ja_JP, &my_locale_typelib_ab_month_names_ja_JP, &my_locale_typelib_day_names_ja_JP, &my_locale_typelib_ab_day_names_ja_JP );
+MY_LOCALE my_locale_ja_JP
+(
+ 2,
+ "ja_JP",
+ "Japanese - Japan",
+ FALSE,
+ &my_locale_typelib_month_names_ja_JP,
+ &my_locale_typelib_ab_month_names_ja_JP,
+ &my_locale_typelib_day_names_ja_JP,
+ &my_locale_typelib_ab_day_names_ja_JP
+);
/***** LOCALE END ja_JP *****/
/***** LOCALE BEGIN ko_KR: Korean - Korea *****/
@@ -631,7 +910,17 @@ static TYPELIB my_locale_typelib_day_names_ko_KR =
{ array_elements(my_locale_day_names_ko_KR)-1, "", my_locale_day_names_ko_KR, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ko_KR =
{ array_elements(my_locale_ab_day_names_ko_KR)-1, "", my_locale_ab_day_names_ko_KR, NULL };
-MY_LOCALE my_locale_ko_KR ( "ko_KR", "Korean - Korea", FALSE, &my_locale_typelib_month_names_ko_KR, &my_locale_typelib_ab_month_names_ko_KR, &my_locale_typelib_day_names_ko_KR, &my_locale_typelib_ab_day_names_ko_KR );
+MY_LOCALE my_locale_ko_KR
+(
+ 31,
+ "ko_KR",
+ "Korean - Korea",
+ FALSE,
+ &my_locale_typelib_month_names_ko_KR,
+ &my_locale_typelib_ab_month_names_ko_KR,
+ &my_locale_typelib_day_names_ko_KR,
+ &my_locale_typelib_ab_day_names_ko_KR
+);
/***** LOCALE END ko_KR *****/
/***** LOCALE BEGIN lt_LT: Lithuanian - Lithuania *****/
@@ -651,7 +940,17 @@ static TYPELIB my_locale_typelib_day_names_lt_LT =
{ array_elements(my_locale_day_names_lt_LT)-1, "", my_locale_day_names_lt_LT, NULL };
static TYPELIB my_locale_typelib_ab_day_names_lt_LT =
{ array_elements(my_locale_ab_day_names_lt_LT)-1, "", my_locale_ab_day_names_lt_LT, NULL };
-MY_LOCALE my_locale_lt_LT ( "lt_LT", "Lithuanian - Lithuania", FALSE, &my_locale_typelib_month_names_lt_LT, &my_locale_typelib_ab_month_names_lt_LT, &my_locale_typelib_day_names_lt_LT, &my_locale_typelib_ab_day_names_lt_LT );
+MY_LOCALE my_locale_lt_LT
+(
+ 32,
+ "lt_LT",
+ "Lithuanian - Lithuania",
+ FALSE,
+ &my_locale_typelib_month_names_lt_LT,
+ &my_locale_typelib_ab_month_names_lt_LT,
+ &my_locale_typelib_day_names_lt_LT,
+ &my_locale_typelib_ab_day_names_lt_LT
+);
/***** LOCALE END lt_LT *****/
/***** LOCALE BEGIN lv_LV: Latvian - Latvia *****/
@@ -671,7 +970,17 @@ static TYPELIB my_locale_typelib_day_names_lv_LV =
{ array_elements(my_locale_day_names_lv_LV)-1, "", my_locale_day_names_lv_LV, NULL };
static TYPELIB my_locale_typelib_ab_day_names_lv_LV =
{ array_elements(my_locale_ab_day_names_lv_LV)-1, "", my_locale_ab_day_names_lv_LV, NULL };
-MY_LOCALE my_locale_lv_LV ( "lv_LV", "Latvian - Latvia", FALSE, &my_locale_typelib_month_names_lv_LV, &my_locale_typelib_ab_month_names_lv_LV, &my_locale_typelib_day_names_lv_LV, &my_locale_typelib_ab_day_names_lv_LV );
+MY_LOCALE my_locale_lv_LV
+(
+ 33,
+ "lv_LV",
+ "Latvian - Latvia",
+ FALSE,
+ &my_locale_typelib_month_names_lv_LV,
+ &my_locale_typelib_ab_month_names_lv_LV,
+ &my_locale_typelib_day_names_lv_LV,
+ &my_locale_typelib_ab_day_names_lv_LV
+);
/***** LOCALE END lv_LV *****/
/***** LOCALE BEGIN mk_MK: Macedonian - FYROM *****/
@@ -691,7 +1000,17 @@ static TYPELIB my_locale_typelib_day_names_mk_MK =
{ array_elements(my_locale_day_names_mk_MK)-1, "", my_locale_day_names_mk_MK, NULL };
static TYPELIB my_locale_typelib_ab_day_names_mk_MK =
{ array_elements(my_locale_ab_day_names_mk_MK)-1, "", my_locale_ab_day_names_mk_MK, NULL };
-MY_LOCALE my_locale_mk_MK ( "mk_MK", "Macedonian - FYROM", FALSE, &my_locale_typelib_month_names_mk_MK, &my_locale_typelib_ab_month_names_mk_MK, &my_locale_typelib_day_names_mk_MK, &my_locale_typelib_ab_day_names_mk_MK );
+MY_LOCALE my_locale_mk_MK
+(
+ 34,
+ "mk_MK",
+ "Macedonian - FYROM",
+ FALSE,
+ &my_locale_typelib_month_names_mk_MK,
+ &my_locale_typelib_ab_month_names_mk_MK,
+ &my_locale_typelib_day_names_mk_MK,
+ &my_locale_typelib_ab_day_names_mk_MK
+);
/***** LOCALE END mk_MK *****/
/***** LOCALE BEGIN mn_MN: Mongolia - Mongolian *****/
@@ -711,7 +1030,17 @@ static TYPELIB my_locale_typelib_day_names_mn_MN =
{ array_elements(my_locale_day_names_mn_MN)-1, "", my_locale_day_names_mn_MN, NULL };
static TYPELIB my_locale_typelib_ab_day_names_mn_MN =
{ array_elements(my_locale_ab_day_names_mn_MN)-1, "", my_locale_ab_day_names_mn_MN, NULL };
-MY_LOCALE my_locale_mn_MN ( "mn_MN", "Mongolia - Mongolian", FALSE, &my_locale_typelib_month_names_mn_MN, &my_locale_typelib_ab_month_names_mn_MN, &my_locale_typelib_day_names_mn_MN, &my_locale_typelib_ab_day_names_mn_MN );
+MY_LOCALE my_locale_mn_MN
+(
+ 35,
+ "mn_MN",
+ "Mongolia - Mongolian",
+ FALSE,
+ &my_locale_typelib_month_names_mn_MN,
+ &my_locale_typelib_ab_month_names_mn_MN,
+ &my_locale_typelib_day_names_mn_MN,
+ &my_locale_typelib_ab_day_names_mn_MN
+);
/***** LOCALE END mn_MN *****/
/***** LOCALE BEGIN ms_MY: Malay - Malaysia *****/
@@ -731,7 +1060,17 @@ static TYPELIB my_locale_typelib_day_names_ms_MY =
{ array_elements(my_locale_day_names_ms_MY)-1, "", my_locale_day_names_ms_MY, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ms_MY =
{ array_elements(my_locale_ab_day_names_ms_MY)-1, "", my_locale_ab_day_names_ms_MY, NULL };
-MY_LOCALE my_locale_ms_MY ( "ms_MY", "Malay - Malaysia", TRUE, &my_locale_typelib_month_names_ms_MY, &my_locale_typelib_ab_month_names_ms_MY, &my_locale_typelib_day_names_ms_MY, &my_locale_typelib_ab_day_names_ms_MY );
+MY_LOCALE my_locale_ms_MY
+(
+ 36,
+ "ms_MY",
+ "Malay - Malaysia",
+ TRUE,
+ &my_locale_typelib_month_names_ms_MY,
+ &my_locale_typelib_ab_month_names_ms_MY,
+ &my_locale_typelib_day_names_ms_MY,
+ &my_locale_typelib_ab_day_names_ms_MY
+);
/***** LOCALE END ms_MY *****/
/***** LOCALE BEGIN nb_NO: Norwegian(Bokml) - Norway *****/
@@ -751,7 +1090,17 @@ static TYPELIB my_locale_typelib_day_names_nb_NO =
{ array_elements(my_locale_day_names_nb_NO)-1, "", my_locale_day_names_nb_NO, NULL };
static TYPELIB my_locale_typelib_ab_day_names_nb_NO =
{ array_elements(my_locale_ab_day_names_nb_NO)-1, "", my_locale_ab_day_names_nb_NO, NULL };
-MY_LOCALE my_locale_nb_NO ( "nb_NO", "Norwegian(Bokml) - Norway", FALSE, &my_locale_typelib_month_names_nb_NO, &my_locale_typelib_ab_month_names_nb_NO, &my_locale_typelib_day_names_nb_NO, &my_locale_typelib_ab_day_names_nb_NO );
+MY_LOCALE my_locale_nb_NO
+(
+ 37,
+ "nb_NO",
+ "Norwegian(Bokml) - Norway",
+ FALSE,
+ &my_locale_typelib_month_names_nb_NO,
+ &my_locale_typelib_ab_month_names_nb_NO,
+ &my_locale_typelib_day_names_nb_NO,
+ &my_locale_typelib_ab_day_names_nb_NO
+);
/***** LOCALE END nb_NO *****/
/***** LOCALE BEGIN nl_NL: Dutch - The Netherlands *****/
@@ -771,7 +1120,17 @@ static TYPELIB my_locale_typelib_day_names_nl_NL =
{ array_elements(my_locale_day_names_nl_NL)-1, "", my_locale_day_names_nl_NL, NULL };
static TYPELIB my_locale_typelib_ab_day_names_nl_NL =
{ array_elements(my_locale_ab_day_names_nl_NL)-1, "", my_locale_ab_day_names_nl_NL, NULL };
-MY_LOCALE my_locale_nl_NL ( "nl_NL", "Dutch - The Netherlands", TRUE, &my_locale_typelib_month_names_nl_NL, &my_locale_typelib_ab_month_names_nl_NL, &my_locale_typelib_day_names_nl_NL, &my_locale_typelib_ab_day_names_nl_NL );
+MY_LOCALE my_locale_nl_NL
+(
+ 38,
+ "nl_NL",
+ "Dutch - The Netherlands",
+ TRUE,
+ &my_locale_typelib_month_names_nl_NL,
+ &my_locale_typelib_ab_month_names_nl_NL,
+ &my_locale_typelib_day_names_nl_NL,
+ &my_locale_typelib_ab_day_names_nl_NL
+);
/***** LOCALE END nl_NL *****/
/***** LOCALE BEGIN pl_PL: Polish - Poland *****/
@@ -791,7 +1150,17 @@ static TYPELIB my_locale_typelib_day_names_pl_PL =
{ array_elements(my_locale_day_names_pl_PL)-1, "", my_locale_day_names_pl_PL, NULL };
static TYPELIB my_locale_typelib_ab_day_names_pl_PL =
{ array_elements(my_locale_ab_day_names_pl_PL)-1, "", my_locale_ab_day_names_pl_PL, NULL };
-MY_LOCALE my_locale_pl_PL ( "pl_PL", "Polish - Poland", FALSE, &my_locale_typelib_month_names_pl_PL, &my_locale_typelib_ab_month_names_pl_PL, &my_locale_typelib_day_names_pl_PL, &my_locale_typelib_ab_day_names_pl_PL );
+MY_LOCALE my_locale_pl_PL
+(
+ 39,
+ "pl_PL",
+ "Polish - Poland",
+ FALSE,
+ &my_locale_typelib_month_names_pl_PL,
+ &my_locale_typelib_ab_month_names_pl_PL,
+ &my_locale_typelib_day_names_pl_PL,
+ &my_locale_typelib_ab_day_names_pl_PL
+);
/***** LOCALE END pl_PL *****/
/***** LOCALE BEGIN pt_BR: Portugese - Brazil *****/
@@ -811,7 +1180,17 @@ static TYPELIB my_locale_typelib_day_names_pt_BR =
{ array_elements(my_locale_day_names_pt_BR)-1, "", my_locale_day_names_pt_BR, NULL };
static TYPELIB my_locale_typelib_ab_day_names_pt_BR =
{ array_elements(my_locale_ab_day_names_pt_BR)-1, "", my_locale_ab_day_names_pt_BR, NULL };
-MY_LOCALE my_locale_pt_BR ( "pt_BR", "Portugese - Brazil", FALSE, &my_locale_typelib_month_names_pt_BR, &my_locale_typelib_ab_month_names_pt_BR, &my_locale_typelib_day_names_pt_BR, &my_locale_typelib_ab_day_names_pt_BR );
+MY_LOCALE my_locale_pt_BR
+(
+ 40,
+ "pt_BR",
+ "Portugese - Brazil",
+ FALSE,
+ &my_locale_typelib_month_names_pt_BR,
+ &my_locale_typelib_ab_month_names_pt_BR,
+ &my_locale_typelib_day_names_pt_BR,
+ &my_locale_typelib_ab_day_names_pt_BR
+);
/***** LOCALE END pt_BR *****/
/***** LOCALE BEGIN pt_PT: Portugese - Portugal *****/
@@ -831,7 +1210,17 @@ static TYPELIB my_locale_typelib_day_names_pt_PT =
{ array_elements(my_locale_day_names_pt_PT)-1, "", my_locale_day_names_pt_PT, NULL };
static TYPELIB my_locale_typelib_ab_day_names_pt_PT =
{ array_elements(my_locale_ab_day_names_pt_PT)-1, "", my_locale_ab_day_names_pt_PT, NULL };
-MY_LOCALE my_locale_pt_PT ( "pt_PT", "Portugese - Portugal", FALSE, &my_locale_typelib_month_names_pt_PT, &my_locale_typelib_ab_month_names_pt_PT, &my_locale_typelib_day_names_pt_PT, &my_locale_typelib_ab_day_names_pt_PT );
+MY_LOCALE my_locale_pt_PT
+(
+ 41,
+ "pt_PT",
+ "Portugese - Portugal",
+ FALSE,
+ &my_locale_typelib_month_names_pt_PT,
+ &my_locale_typelib_ab_month_names_pt_PT,
+ &my_locale_typelib_day_names_pt_PT,
+ &my_locale_typelib_ab_day_names_pt_PT
+);
/***** LOCALE END pt_PT *****/
/***** LOCALE BEGIN ro_RO: Romanian - Romania *****/
@@ -851,7 +1240,17 @@ static TYPELIB my_locale_typelib_day_names_ro_RO =
{ array_elements(my_locale_day_names_ro_RO)-1, "", my_locale_day_names_ro_RO, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ro_RO =
{ array_elements(my_locale_ab_day_names_ro_RO)-1, "", my_locale_ab_day_names_ro_RO, NULL };
-MY_LOCALE my_locale_ro_RO ( "ro_RO", "Romanian - Romania", FALSE, &my_locale_typelib_month_names_ro_RO, &my_locale_typelib_ab_month_names_ro_RO, &my_locale_typelib_day_names_ro_RO, &my_locale_typelib_ab_day_names_ro_RO );
+MY_LOCALE my_locale_ro_RO
+(
+ 42,
+ "ro_RO",
+ "Romanian - Romania",
+ FALSE,
+ &my_locale_typelib_month_names_ro_RO,
+ &my_locale_typelib_ab_month_names_ro_RO,
+ &my_locale_typelib_day_names_ro_RO,
+ &my_locale_typelib_ab_day_names_ro_RO
+);
/***** LOCALE END ro_RO *****/
/***** LOCALE BEGIN ru_RU: Russian - Russia *****/
@@ -871,7 +1270,17 @@ static TYPELIB my_locale_typelib_day_names_ru_RU =
{ array_elements(my_locale_day_names_ru_RU)-1, "", my_locale_day_names_ru_RU, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ru_RU =
{ array_elements(my_locale_ab_day_names_ru_RU)-1, "", my_locale_ab_day_names_ru_RU, NULL };
-MY_LOCALE my_locale_ru_RU ( "ru_RU", "Russian - Russia", FALSE, &my_locale_typelib_month_names_ru_RU, &my_locale_typelib_ab_month_names_ru_RU, &my_locale_typelib_day_names_ru_RU, &my_locale_typelib_ab_day_names_ru_RU );
+MY_LOCALE my_locale_ru_RU
+(
+ 43,
+ "ru_RU",
+ "Russian - Russia",
+ FALSE,
+ &my_locale_typelib_month_names_ru_RU,
+ &my_locale_typelib_ab_month_names_ru_RU,
+ &my_locale_typelib_day_names_ru_RU,
+ &my_locale_typelib_ab_day_names_ru_RU
+);
/***** LOCALE END ru_RU *****/
/***** LOCALE BEGIN ru_UA: Russian - Ukraine *****/
@@ -891,7 +1300,17 @@ static TYPELIB my_locale_typelib_day_names_ru_UA =
{ array_elements(my_locale_day_names_ru_UA)-1, "", my_locale_day_names_ru_UA, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ru_UA =
{ array_elements(my_locale_ab_day_names_ru_UA)-1, "", my_locale_ab_day_names_ru_UA, NULL };
-MY_LOCALE my_locale_ru_UA ( "ru_UA", "Russian - Ukraine", FALSE, &my_locale_typelib_month_names_ru_UA, &my_locale_typelib_ab_month_names_ru_UA, &my_locale_typelib_day_names_ru_UA, &my_locale_typelib_ab_day_names_ru_UA );
+MY_LOCALE my_locale_ru_UA
+(
+ 44,
+ "ru_UA",
+ "Russian - Ukraine",
+ FALSE,
+ &my_locale_typelib_month_names_ru_UA,
+ &my_locale_typelib_ab_month_names_ru_UA,
+ &my_locale_typelib_day_names_ru_UA,
+ &my_locale_typelib_ab_day_names_ru_UA
+);
/***** LOCALE END ru_UA *****/
/***** LOCALE BEGIN sk_SK: Slovak - Slovakia *****/
@@ -911,7 +1330,17 @@ static TYPELIB my_locale_typelib_day_names_sk_SK =
{ array_elements(my_locale_day_names_sk_SK)-1, "", my_locale_day_names_sk_SK, NULL };
static TYPELIB my_locale_typelib_ab_day_names_sk_SK =
{ array_elements(my_locale_ab_day_names_sk_SK)-1, "", my_locale_ab_day_names_sk_SK, NULL };
-MY_LOCALE my_locale_sk_SK ( "sk_SK", "Slovak - Slovakia", FALSE, &my_locale_typelib_month_names_sk_SK, &my_locale_typelib_ab_month_names_sk_SK, &my_locale_typelib_day_names_sk_SK, &my_locale_typelib_ab_day_names_sk_SK );
+MY_LOCALE my_locale_sk_SK
+(
+ 45,
+ "sk_SK",
+ "Slovak - Slovakia",
+ FALSE,
+ &my_locale_typelib_month_names_sk_SK,
+ &my_locale_typelib_ab_month_names_sk_SK,
+ &my_locale_typelib_day_names_sk_SK,
+ &my_locale_typelib_ab_day_names_sk_SK
+);
/***** LOCALE END sk_SK *****/
/***** LOCALE BEGIN sl_SI: Slovenian - Slovenia *****/
@@ -931,7 +1360,17 @@ static TYPELIB my_locale_typelib_day_names_sl_SI =
{ array_elements(my_locale_day_names_sl_SI)-1, "", my_locale_day_names_sl_SI, NULL };
static TYPELIB my_locale_typelib_ab_day_names_sl_SI =
{ array_elements(my_locale_ab_day_names_sl_SI)-1, "", my_locale_ab_day_names_sl_SI, NULL };
-MY_LOCALE my_locale_sl_SI ( "sl_SI", "Slovenian - Slovenia", FALSE, &my_locale_typelib_month_names_sl_SI, &my_locale_typelib_ab_month_names_sl_SI, &my_locale_typelib_day_names_sl_SI, &my_locale_typelib_ab_day_names_sl_SI );
+MY_LOCALE my_locale_sl_SI
+(
+ 46,
+ "sl_SI",
+ "Slovenian - Slovenia",
+ FALSE,
+ &my_locale_typelib_month_names_sl_SI,
+ &my_locale_typelib_ab_month_names_sl_SI,
+ &my_locale_typelib_day_names_sl_SI,
+ &my_locale_typelib_ab_day_names_sl_SI
+);
/***** LOCALE END sl_SI *****/
/***** LOCALE BEGIN sq_AL: Albanian - Albania *****/
@@ -951,7 +1390,17 @@ static TYPELIB my_locale_typelib_day_names_sq_AL =
{ array_elements(my_locale_day_names_sq_AL)-1, "", my_locale_day_names_sq_AL, NULL };
static TYPELIB my_locale_typelib_ab_day_names_sq_AL =
{ array_elements(my_locale_ab_day_names_sq_AL)-1, "", my_locale_ab_day_names_sq_AL, NULL };
-MY_LOCALE my_locale_sq_AL ( "sq_AL", "Albanian - Albania", FALSE, &my_locale_typelib_month_names_sq_AL, &my_locale_typelib_ab_month_names_sq_AL, &my_locale_typelib_day_names_sq_AL, &my_locale_typelib_ab_day_names_sq_AL );
+MY_LOCALE my_locale_sq_AL
+(
+ 47,
+ "sq_AL",
+ "Albanian - Albania",
+ FALSE,
+ &my_locale_typelib_month_names_sq_AL,
+ &my_locale_typelib_ab_month_names_sq_AL,
+ &my_locale_typelib_day_names_sq_AL,
+ &my_locale_typelib_ab_day_names_sq_AL
+);
/***** LOCALE END sq_AL *****/
/***** LOCALE BEGIN sr_YU: Servian - Yugoslavia *****/
@@ -971,7 +1420,17 @@ static TYPELIB my_locale_typelib_day_names_sr_YU =
{ array_elements(my_locale_day_names_sr_YU)-1, "", my_locale_day_names_sr_YU, NULL };
static TYPELIB my_locale_typelib_ab_day_names_sr_YU =
{ array_elements(my_locale_ab_day_names_sr_YU)-1, "", my_locale_ab_day_names_sr_YU, NULL };
-MY_LOCALE my_locale_sr_YU ( "sr_YU", "Servian - Yugoslavia", FALSE, &my_locale_typelib_month_names_sr_YU, &my_locale_typelib_ab_month_names_sr_YU, &my_locale_typelib_day_names_sr_YU, &my_locale_typelib_ab_day_names_sr_YU );
+MY_LOCALE my_locale_sr_YU
+(
+ 48,
+ "sr_YU",
+ "Servian - Yugoslavia",
+ FALSE,
+ &my_locale_typelib_month_names_sr_YU,
+ &my_locale_typelib_ab_month_names_sr_YU,
+ &my_locale_typelib_day_names_sr_YU,
+ &my_locale_typelib_ab_day_names_sr_YU
+);
/***** LOCALE END sr_YU *****/
/***** LOCALE BEGIN sv_SE: Swedish - Sweden *****/
@@ -991,7 +1450,17 @@ static TYPELIB my_locale_typelib_day_names_sv_SE =
{ array_elements(my_locale_day_names_sv_SE)-1, "", my_locale_day_names_sv_SE, NULL };
static TYPELIB my_locale_typelib_ab_day_names_sv_SE =
{ array_elements(my_locale_ab_day_names_sv_SE)-1, "", my_locale_ab_day_names_sv_SE, NULL };
-MY_LOCALE my_locale_sv_SE ( "sv_SE", "Swedish - Sweden", FALSE, &my_locale_typelib_month_names_sv_SE, &my_locale_typelib_ab_month_names_sv_SE, &my_locale_typelib_day_names_sv_SE, &my_locale_typelib_ab_day_names_sv_SE );
+MY_LOCALE my_locale_sv_SE
+(
+ 3,
+ "sv_SE",
+ "Swedish - Sweden",
+ FALSE,
+ &my_locale_typelib_month_names_sv_SE,
+ &my_locale_typelib_ab_month_names_sv_SE,
+ &my_locale_typelib_day_names_sv_SE,
+ &my_locale_typelib_ab_day_names_sv_SE
+);
/***** LOCALE END sv_SE *****/
/***** LOCALE BEGIN ta_IN: Tamil - India *****/
@@ -1011,7 +1480,17 @@ static TYPELIB my_locale_typelib_day_names_ta_IN =
{ array_elements(my_locale_day_names_ta_IN)-1, "", my_locale_day_names_ta_IN, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ta_IN =
{ array_elements(my_locale_ab_day_names_ta_IN)-1, "", my_locale_ab_day_names_ta_IN, NULL };
-MY_LOCALE my_locale_ta_IN ( "ta_IN", "Tamil - India", FALSE, &my_locale_typelib_month_names_ta_IN, &my_locale_typelib_ab_month_names_ta_IN, &my_locale_typelib_day_names_ta_IN, &my_locale_typelib_ab_day_names_ta_IN );
+MY_LOCALE my_locale_ta_IN
+(
+ 49,
+ "ta_IN",
+ "Tamil - India",
+ FALSE,
+ &my_locale_typelib_month_names_ta_IN,
+ &my_locale_typelib_ab_month_names_ta_IN,
+ &my_locale_typelib_day_names_ta_IN,
+ &my_locale_typelib_ab_day_names_ta_IN
+);
/***** LOCALE END ta_IN *****/
/***** LOCALE BEGIN te_IN: Telugu - India *****/
@@ -1031,7 +1510,17 @@ static TYPELIB my_locale_typelib_day_names_te_IN =
{ array_elements(my_locale_day_names_te_IN)-1, "", my_locale_day_names_te_IN, NULL };
static TYPELIB my_locale_typelib_ab_day_names_te_IN =
{ array_elements(my_locale_ab_day_names_te_IN)-1, "", my_locale_ab_day_names_te_IN, NULL };
-MY_LOCALE my_locale_te_IN ( "te_IN", "Telugu - India", FALSE, &my_locale_typelib_month_names_te_IN, &my_locale_typelib_ab_month_names_te_IN, &my_locale_typelib_day_names_te_IN, &my_locale_typelib_ab_day_names_te_IN );
+MY_LOCALE my_locale_te_IN
+(
+ 50,
+ "te_IN",
+ "Telugu - India",
+ FALSE,
+ &my_locale_typelib_month_names_te_IN,
+ &my_locale_typelib_ab_month_names_te_IN,
+ &my_locale_typelib_day_names_te_IN,
+ &my_locale_typelib_ab_day_names_te_IN
+);
/***** LOCALE END te_IN *****/
/***** LOCALE BEGIN th_TH: Thai - Thailand *****/
@@ -1051,7 +1540,17 @@ static TYPELIB my_locale_typelib_day_names_th_TH =
{ array_elements(my_locale_day_names_th_TH)-1, "", my_locale_day_names_th_TH, NULL };
static TYPELIB my_locale_typelib_ab_day_names_th_TH =
{ array_elements(my_locale_ab_day_names_th_TH)-1, "", my_locale_ab_day_names_th_TH, NULL };
-MY_LOCALE my_locale_th_TH ( "th_TH", "Thai - Thailand", FALSE, &my_locale_typelib_month_names_th_TH, &my_locale_typelib_ab_month_names_th_TH, &my_locale_typelib_day_names_th_TH, &my_locale_typelib_ab_day_names_th_TH );
+MY_LOCALE my_locale_th_TH
+(
+ 51,
+ "th_TH",
+ "Thai - Thailand",
+ FALSE,
+ &my_locale_typelib_month_names_th_TH,
+ &my_locale_typelib_ab_month_names_th_TH,
+ &my_locale_typelib_day_names_th_TH,
+ &my_locale_typelib_ab_day_names_th_TH
+);
/***** LOCALE END th_TH *****/
/***** LOCALE BEGIN tr_TR: Turkish - Turkey *****/
@@ -1071,7 +1570,17 @@ static TYPELIB my_locale_typelib_day_names_tr_TR =
{ array_elements(my_locale_day_names_tr_TR)-1, "", my_locale_day_names_tr_TR, NULL };
static TYPELIB my_locale_typelib_ab_day_names_tr_TR =
{ array_elements(my_locale_ab_day_names_tr_TR)-1, "", my_locale_ab_day_names_tr_TR, NULL };
-MY_LOCALE my_locale_tr_TR ( "tr_TR", "Turkish - Turkey", FALSE, &my_locale_typelib_month_names_tr_TR, &my_locale_typelib_ab_month_names_tr_TR, &my_locale_typelib_day_names_tr_TR, &my_locale_typelib_ab_day_names_tr_TR );
+MY_LOCALE my_locale_tr_TR
+(
+ 52,
+ "tr_TR",
+ "Turkish - Turkey",
+ FALSE,
+ &my_locale_typelib_month_names_tr_TR,
+ &my_locale_typelib_ab_month_names_tr_TR,
+ &my_locale_typelib_day_names_tr_TR,
+ &my_locale_typelib_ab_day_names_tr_TR
+);
/***** LOCALE END tr_TR *****/
/***** LOCALE BEGIN uk_UA: Ukrainian - Ukraine *****/
@@ -1091,7 +1600,17 @@ static TYPELIB my_locale_typelib_day_names_uk_UA =
{ array_elements(my_locale_day_names_uk_UA)-1, "", my_locale_day_names_uk_UA, NULL };
static TYPELIB my_locale_typelib_ab_day_names_uk_UA =
{ array_elements(my_locale_ab_day_names_uk_UA)-1, "", my_locale_ab_day_names_uk_UA, NULL };
-MY_LOCALE my_locale_uk_UA ( "uk_UA", "Ukrainian - Ukraine", FALSE, &my_locale_typelib_month_names_uk_UA, &my_locale_typelib_ab_month_names_uk_UA, &my_locale_typelib_day_names_uk_UA, &my_locale_typelib_ab_day_names_uk_UA );
+MY_LOCALE my_locale_uk_UA
+(
+ 53,
+ "uk_UA",
+ "Ukrainian - Ukraine",
+ FALSE,
+ &my_locale_typelib_month_names_uk_UA,
+ &my_locale_typelib_ab_month_names_uk_UA,
+ &my_locale_typelib_day_names_uk_UA,
+ &my_locale_typelib_ab_day_names_uk_UA
+);
/***** LOCALE END uk_UA *****/
/***** LOCALE BEGIN ur_PK: Urdu - Pakistan *****/
@@ -1111,7 +1630,17 @@ static TYPELIB my_locale_typelib_day_names_ur_PK =
{ array_elements(my_locale_day_names_ur_PK)-1, "", my_locale_day_names_ur_PK, NULL };
static TYPELIB my_locale_typelib_ab_day_names_ur_PK =
{ array_elements(my_locale_ab_day_names_ur_PK)-1, "", my_locale_ab_day_names_ur_PK, NULL };
-MY_LOCALE my_locale_ur_PK ( "ur_PK", "Urdu - Pakistan", FALSE, &my_locale_typelib_month_names_ur_PK, &my_locale_typelib_ab_month_names_ur_PK, &my_locale_typelib_day_names_ur_PK, &my_locale_typelib_ab_day_names_ur_PK );
+MY_LOCALE my_locale_ur_PK
+(
+ 54,
+ "ur_PK",
+ "Urdu - Pakistan",
+ FALSE,
+ &my_locale_typelib_month_names_ur_PK,
+ &my_locale_typelib_ab_month_names_ur_PK,
+ &my_locale_typelib_day_names_ur_PK,
+ &my_locale_typelib_ab_day_names_ur_PK
+);
/***** LOCALE END ur_PK *****/
/***** LOCALE BEGIN vi_VN: Vietnamese - Vietnam *****/
@@ -1131,7 +1660,17 @@ static TYPELIB my_locale_typelib_day_names_vi_VN =
{ array_elements(my_locale_day_names_vi_VN)-1, "", my_locale_day_names_vi_VN, NULL };
static TYPELIB my_locale_typelib_ab_day_names_vi_VN =
{ array_elements(my_locale_ab_day_names_vi_VN)-1, "", my_locale_ab_day_names_vi_VN, NULL };
-MY_LOCALE my_locale_vi_VN ( "vi_VN", "Vietnamese - Vietnam", FALSE, &my_locale_typelib_month_names_vi_VN, &my_locale_typelib_ab_month_names_vi_VN, &my_locale_typelib_day_names_vi_VN, &my_locale_typelib_ab_day_names_vi_VN );
+MY_LOCALE my_locale_vi_VN
+(
+ 55,
+ "vi_VN",
+ "Vietnamese - Vietnam",
+ FALSE,
+ &my_locale_typelib_month_names_vi_VN,
+ &my_locale_typelib_ab_month_names_vi_VN,
+ &my_locale_typelib_day_names_vi_VN,
+ &my_locale_typelib_ab_day_names_vi_VN
+);
/***** LOCALE END vi_VN *****/
/***** LOCALE BEGIN zh_CN: Chinese - Peoples Republic of China *****/
@@ -1151,7 +1690,17 @@ static TYPELIB my_locale_typelib_day_names_zh_CN =
{ array_elements(my_locale_day_names_zh_CN)-1, "", my_locale_day_names_zh_CN, NULL };
static TYPELIB my_locale_typelib_ab_day_names_zh_CN =
{ array_elements(my_locale_ab_day_names_zh_CN)-1, "", my_locale_ab_day_names_zh_CN, NULL };
-MY_LOCALE my_locale_zh_CN ( "zh_CN", "Chinese - Peoples Republic of China", FALSE, &my_locale_typelib_month_names_zh_CN, &my_locale_typelib_ab_month_names_zh_CN, &my_locale_typelib_day_names_zh_CN, &my_locale_typelib_ab_day_names_zh_CN );
+MY_LOCALE my_locale_zh_CN
+(
+ 56,
+ "zh_CN",
+ "Chinese - Peoples Republic of China",
+ FALSE,
+ &my_locale_typelib_month_names_zh_CN,
+ &my_locale_typelib_ab_month_names_zh_CN,
+ &my_locale_typelib_day_names_zh_CN,
+ &my_locale_typelib_ab_day_names_zh_CN
+);
/***** LOCALE END zh_CN *****/
/***** LOCALE BEGIN zh_TW: Chinese - Taiwan *****/
@@ -1171,217 +1720,754 @@ static TYPELIB my_locale_typelib_day_names_zh_TW =
{ array_elements(my_locale_day_names_zh_TW)-1, "", my_locale_day_names_zh_TW, NULL };
static TYPELIB my_locale_typelib_ab_day_names_zh_TW =
{ array_elements(my_locale_ab_day_names_zh_TW)-1, "", my_locale_ab_day_names_zh_TW, NULL };
-MY_LOCALE my_locale_zh_TW ( "zh_TW", "Chinese - Taiwan", FALSE, &my_locale_typelib_month_names_zh_TW, &my_locale_typelib_ab_month_names_zh_TW, &my_locale_typelib_day_names_zh_TW, &my_locale_typelib_ab_day_names_zh_TW );
+MY_LOCALE my_locale_zh_TW
+(
+ 57,
+ "zh_TW",
+ "Chinese - Taiwan",
+ FALSE,
+ &my_locale_typelib_month_names_zh_TW,
+ &my_locale_typelib_ab_month_names_zh_TW,
+ &my_locale_typelib_day_names_zh_TW,
+ &my_locale_typelib_ab_day_names_zh_TW
+);
/***** LOCALE END zh_TW *****/
/***** LOCALE BEGIN ar_DZ: Arabic - Algeria *****/
-MY_LOCALE my_locale_ar_DZ ( "ar_DZ", "Arabic - Algeria", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_DZ
+(
+ 58,
+ "ar_DZ",
+ "Arabic - Algeria",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_DZ *****/
/***** LOCALE BEGIN ar_EG: Arabic - Egypt *****/
-MY_LOCALE my_locale_ar_EG ( "ar_EG", "Arabic - Egypt", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_EG
+(
+ 59,
+ "ar_EG",
+ "Arabic - Egypt",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_EG *****/
/***** LOCALE BEGIN ar_IN: Arabic - Iran *****/
-MY_LOCALE my_locale_ar_IN ( "ar_IN", "Arabic - Iran", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_IN
+(
+ 60,
+ "ar_IN",
+ "Arabic - Iran",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_IN *****/
/***** LOCALE BEGIN ar_IQ: Arabic - Iraq *****/
-MY_LOCALE my_locale_ar_IQ ( "ar_IQ", "Arabic - Iraq", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_IQ
+(
+ 61,
+ "ar_IQ",
+ "Arabic - Iraq",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_IQ *****/
/***** LOCALE BEGIN ar_KW: Arabic - Kuwait *****/
-MY_LOCALE my_locale_ar_KW ( "ar_KW", "Arabic - Kuwait", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_KW
+(
+ 62,
+ "ar_KW",
+ "Arabic - Kuwait",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_KW *****/
/***** LOCALE BEGIN ar_LB: Arabic - Lebanon *****/
-MY_LOCALE my_locale_ar_LB ( "ar_LB", "Arabic - Lebanon", FALSE, &my_locale_typelib_month_names_ar_JO, &my_locale_typelib_ab_month_names_ar_JO, &my_locale_typelib_day_names_ar_JO, &my_locale_typelib_ab_day_names_ar_JO );
+MY_LOCALE my_locale_ar_LB
+(
+ 63,
+ "ar_LB",
+ "Arabic - Lebanon",
+ FALSE,
+ &my_locale_typelib_month_names_ar_JO,
+ &my_locale_typelib_ab_month_names_ar_JO,
+ &my_locale_typelib_day_names_ar_JO,
+ &my_locale_typelib_ab_day_names_ar_JO
+);
/***** LOCALE END ar_LB *****/
/***** LOCALE BEGIN ar_LY: Arabic - Libya *****/
-MY_LOCALE my_locale_ar_LY ( "ar_LY", "Arabic - Libya", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_LY
+(
+ 64,
+ "ar_LY",
+ "Arabic - Libya",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_LY *****/
/***** LOCALE BEGIN ar_MA: Arabic - Morocco *****/
-MY_LOCALE my_locale_ar_MA ( "ar_MA", "Arabic - Morocco", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_MA
+(
+ 65,
+ "ar_MA",
+ "Arabic - Morocco",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_MA *****/
/***** LOCALE BEGIN ar_OM: Arabic - Oman *****/
-MY_LOCALE my_locale_ar_OM ( "ar_OM", "Arabic - Oman", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_OM
+(
+ 66,
+ "ar_OM",
+ "Arabic - Oman",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_OM *****/
/***** LOCALE BEGIN ar_QA: Arabic - Qatar *****/
-MY_LOCALE my_locale_ar_QA ( "ar_QA", "Arabic - Qatar", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_QA
+(
+ 67,
+ "ar_QA",
+ "Arabic - Qatar",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_QA *****/
/***** LOCALE BEGIN ar_SD: Arabic - Sudan *****/
-MY_LOCALE my_locale_ar_SD ( "ar_SD", "Arabic - Sudan", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_SD
+(
+ 68,
+ "ar_SD",
+ "Arabic - Sudan",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_SD *****/
/***** LOCALE BEGIN ar_TN: Arabic - Tunisia *****/
-MY_LOCALE my_locale_ar_TN ( "ar_TN", "Arabic - Tunisia", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_TN
+(
+ 69,
+ "ar_TN",
+ "Arabic - Tunisia",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_TN *****/
/***** LOCALE BEGIN ar_YE: Arabic - Yemen *****/
-MY_LOCALE my_locale_ar_YE ( "ar_YE", "Arabic - Yemen", FALSE, &my_locale_typelib_month_names_ar_BH, &my_locale_typelib_ab_month_names_ar_BH, &my_locale_typelib_day_names_ar_BH, &my_locale_typelib_ab_day_names_ar_BH );
+MY_LOCALE my_locale_ar_YE
+(
+ 70,
+ "ar_YE",
+ "Arabic - Yemen",
+ FALSE,
+ &my_locale_typelib_month_names_ar_BH,
+ &my_locale_typelib_ab_month_names_ar_BH,
+ &my_locale_typelib_day_names_ar_BH,
+ &my_locale_typelib_ab_day_names_ar_BH
+);
/***** LOCALE END ar_YE *****/
/***** LOCALE BEGIN de_BE: German - Belgium *****/
-MY_LOCALE my_locale_de_BE ( "de_BE", "German - Belgium", FALSE, &my_locale_typelib_month_names_de_DE, &my_locale_typelib_ab_month_names_de_DE, &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE );
+MY_LOCALE my_locale_de_BE
+(
+ 71,
+ "de_BE",
+ "German - Belgium",
+ FALSE,
+ &my_locale_typelib_month_names_de_DE,
+ &my_locale_typelib_ab_month_names_de_DE,
+ &my_locale_typelib_day_names_de_DE,
+ &my_locale_typelib_ab_day_names_de_DE
+);
/***** LOCALE END de_BE *****/
/***** LOCALE BEGIN de_CH: German - Switzerland *****/
-MY_LOCALE my_locale_de_CH ( "de_CH", "German - Switzerland", FALSE, &my_locale_typelib_month_names_de_DE, &my_locale_typelib_ab_month_names_de_DE, &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE );
+MY_LOCALE my_locale_de_CH
+(
+ 72,
+ "de_CH",
+ "German - Switzerland",
+ FALSE,
+ &my_locale_typelib_month_names_de_DE,
+ &my_locale_typelib_ab_month_names_de_DE,
+ &my_locale_typelib_day_names_de_DE,
+ &my_locale_typelib_ab_day_names_de_DE
+);
/***** LOCALE END de_CH *****/
/***** LOCALE BEGIN de_LU: German - Luxembourg *****/
-MY_LOCALE my_locale_de_LU ( "de_LU", "German - Luxembourg", FALSE, &my_locale_typelib_month_names_de_DE, &my_locale_typelib_ab_month_names_de_DE, &my_locale_typelib_day_names_de_DE, &my_locale_typelib_ab_day_names_de_DE );
+MY_LOCALE my_locale_de_LU
+(
+ 73,
+ "de_LU",
+ "German - Luxembourg",
+ FALSE,
+ &my_locale_typelib_month_names_de_DE,
+ &my_locale_typelib_ab_month_names_de_DE,
+ &my_locale_typelib_day_names_de_DE,
+ &my_locale_typelib_ab_day_names_de_DE
+);
/***** LOCALE END de_LU *****/
/***** LOCALE BEGIN en_AU: English - Australia *****/
-MY_LOCALE my_locale_en_AU ( "en_AU", "English - Australia", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_AU
+(
+ 74,
+ "en_AU",
+ "English - Australia",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_AU *****/
/***** LOCALE BEGIN en_CA: English - Canada *****/
-MY_LOCALE my_locale_en_CA ( "en_CA", "English - Canada", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_CA
+(
+ 75,
+ "en_CA",
+ "English - Canada",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_CA *****/
/***** LOCALE BEGIN en_GB: English - United Kingdom *****/
-MY_LOCALE my_locale_en_GB ( "en_GB", "English - United Kingdom", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_GB
+(
+ 1,
+ "en_GB",
+ "English - United Kingdom",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_GB *****/
/***** LOCALE BEGIN en_IN: English - India *****/
-MY_LOCALE my_locale_en_IN ( "en_IN", "English - India", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_IN
+(
+ 76,
+ "en_IN",
+ "English - India",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_IN *****/
/***** LOCALE BEGIN en_NZ: English - New Zealand *****/
-MY_LOCALE my_locale_en_NZ ( "en_NZ", "English - New Zealand", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_NZ
+(
+ 77,
+ "en_NZ",
+ "English - New Zealand",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_NZ *****/
/***** LOCALE BEGIN en_PH: English - Philippines *****/
-MY_LOCALE my_locale_en_PH ( "en_PH", "English - Philippines", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_PH
+(
+ 78,
+ "en_PH",
+ "English - Philippines",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_PH *****/
/***** LOCALE BEGIN en_ZA: English - South Africa *****/
-MY_LOCALE my_locale_en_ZA ( "en_ZA", "English - South Africa", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_ZA
+(
+ 79,
+ "en_ZA",
+ "English - South Africa",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_ZA *****/
/***** LOCALE BEGIN en_ZW: English - Zimbabwe *****/
-MY_LOCALE my_locale_en_ZW ( "en_ZW", "English - Zimbabwe", TRUE, &my_locale_typelib_month_names_en_US, &my_locale_typelib_ab_month_names_en_US, &my_locale_typelib_day_names_en_US, &my_locale_typelib_ab_day_names_en_US );
+MY_LOCALE my_locale_en_ZW
+(
+ 80,
+ "en_ZW",
+ "English - Zimbabwe",
+ TRUE,
+ &my_locale_typelib_month_names_en_US,
+ &my_locale_typelib_ab_month_names_en_US,
+ &my_locale_typelib_day_names_en_US,
+ &my_locale_typelib_ab_day_names_en_US
+);
/***** LOCALE END en_ZW *****/
/***** LOCALE BEGIN es_AR: Spanish - Argentina *****/
-MY_LOCALE my_locale_es_AR ( "es_AR", "Spanish - Argentina", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_AR
+(
+ 81,
+ "es_AR",
+ "Spanish - Argentina",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_AR *****/
/***** LOCALE BEGIN es_BO: Spanish - Bolivia *****/
-MY_LOCALE my_locale_es_BO ( "es_BO", "Spanish - Bolivia", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_BO
+(
+ 82,
+ "es_BO",
+ "Spanish - Bolivia",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_BO *****/
/***** LOCALE BEGIN es_CL: Spanish - Chile *****/
-MY_LOCALE my_locale_es_CL ( "es_CL", "Spanish - Chile", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_CL
+(
+ 83,
+ "es_CL",
+ "Spanish - Chile",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_CL *****/
/***** LOCALE BEGIN es_CO: Spanish - Columbia *****/
-MY_LOCALE my_locale_es_CO ( "es_CO", "Spanish - Columbia", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_CO
+(
+ 84,
+ "es_CO",
+ "Spanish - Columbia",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_CO *****/
/***** LOCALE BEGIN es_CR: Spanish - Costa Rica *****/
-MY_LOCALE my_locale_es_CR ( "es_CR", "Spanish - Costa Rica", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_CR
+(
+ 85,
+ "es_CR",
+ "Spanish - Costa Rica",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_CR *****/
/***** LOCALE BEGIN es_DO: Spanish - Dominican Republic *****/
-MY_LOCALE my_locale_es_DO ( "es_DO", "Spanish - Dominican Republic", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_DO
+(
+ 86,
+ "es_DO",
+ "Spanish - Dominican Republic",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_DO *****/
/***** LOCALE BEGIN es_EC: Spanish - Ecuador *****/
-MY_LOCALE my_locale_es_EC ( "es_EC", "Spanish - Ecuador", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_EC
+(
+ 87,
+ "es_EC",
+ "Spanish - Ecuador",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_EC *****/
/***** LOCALE BEGIN es_GT: Spanish - Guatemala *****/
-MY_LOCALE my_locale_es_GT ( "es_GT", "Spanish - Guatemala", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_GT
+(
+ 88,
+ "es_GT",
+ "Spanish - Guatemala",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_GT *****/
/***** LOCALE BEGIN es_HN: Spanish - Honduras *****/
-MY_LOCALE my_locale_es_HN ( "es_HN", "Spanish - Honduras", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_HN
+(
+ 89,
+ "es_HN",
+ "Spanish - Honduras",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_HN *****/
/***** LOCALE BEGIN es_MX: Spanish - Mexico *****/
-MY_LOCALE my_locale_es_MX ( "es_MX", "Spanish - Mexico", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_MX
+(
+ 90,
+ "es_MX",
+ "Spanish - Mexico",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_MX *****/
/***** LOCALE BEGIN es_NI: Spanish - Nicaragua *****/
-MY_LOCALE my_locale_es_NI ( "es_NI", "Spanish - Nicaragua", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_NI
+(
+ 91,
+ "es_NI",
+ "Spanish - Nicaragua",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_NI *****/
/***** LOCALE BEGIN es_PA: Spanish - Panama *****/
-MY_LOCALE my_locale_es_PA ( "es_PA", "Spanish - Panama", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_PA
+(
+ 92,
+ "es_PA",
+ "Spanish - Panama",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_PA *****/
/***** LOCALE BEGIN es_PE: Spanish - Peru *****/
-MY_LOCALE my_locale_es_PE ( "es_PE", "Spanish - Peru", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_PE
+(
+ 93,
+ "es_PE",
+ "Spanish - Peru",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_PE *****/
/***** LOCALE BEGIN es_PR: Spanish - Puerto Rico *****/
-MY_LOCALE my_locale_es_PR ( "es_PR", "Spanish - Puerto Rico", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_PR
+(
+ 94,
+ "es_PR",
+ "Spanish - Puerto Rico",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_PR *****/
/***** LOCALE BEGIN es_PY: Spanish - Paraguay *****/
-MY_LOCALE my_locale_es_PY ( "es_PY", "Spanish - Paraguay", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_PY
+(
+ 95,
+ "es_PY",
+ "Spanish - Paraguay",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_PY *****/
/***** LOCALE BEGIN es_SV: Spanish - El Salvador *****/
-MY_LOCALE my_locale_es_SV ( "es_SV", "Spanish - El Salvador", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_SV
+(
+ 96,
+ "es_SV",
+ "Spanish - El Salvador",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_SV *****/
/***** LOCALE BEGIN es_US: Spanish - United States *****/
-MY_LOCALE my_locale_es_US ( "es_US", "Spanish - United States", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_US
+(
+ 97,
+ "es_US",
+ "Spanish - United States",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_US *****/
/***** LOCALE BEGIN es_UY: Spanish - Uruguay *****/
-MY_LOCALE my_locale_es_UY ( "es_UY", "Spanish - Uruguay", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_UY
+(
+ 98,
+ "es_UY",
+ "Spanish - Uruguay",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_UY *****/
/***** LOCALE BEGIN es_VE: Spanish - Venezuela *****/
-MY_LOCALE my_locale_es_VE ( "es_VE", "Spanish - Venezuela", FALSE, &my_locale_typelib_month_names_es_ES, &my_locale_typelib_ab_month_names_es_ES, &my_locale_typelib_day_names_es_ES, &my_locale_typelib_ab_day_names_es_ES );
+MY_LOCALE my_locale_es_VE
+(
+ 99,
+ "es_VE",
+ "Spanish - Venezuela",
+ FALSE,
+ &my_locale_typelib_month_names_es_ES,
+ &my_locale_typelib_ab_month_names_es_ES,
+ &my_locale_typelib_day_names_es_ES,
+ &my_locale_typelib_ab_day_names_es_ES
+);
/***** LOCALE END es_VE *****/
/***** LOCALE BEGIN fr_BE: French - Belgium *****/
-MY_LOCALE my_locale_fr_BE ( "fr_BE", "French - Belgium", FALSE, &my_locale_typelib_month_names_fr_FR, &my_locale_typelib_ab_month_names_fr_FR, &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR );
+MY_LOCALE my_locale_fr_BE
+(
+ 100,
+ "fr_BE",
+ "French - Belgium",
+ FALSE,
+ &my_locale_typelib_month_names_fr_FR,
+ &my_locale_typelib_ab_month_names_fr_FR,
+ &my_locale_typelib_day_names_fr_FR,
+ &my_locale_typelib_ab_day_names_fr_FR
+);
/***** LOCALE END fr_BE *****/
/***** LOCALE BEGIN fr_CA: French - Canada *****/
-MY_LOCALE my_locale_fr_CA ( "fr_CA", "French - Canada", FALSE, &my_locale_typelib_month_names_fr_FR, &my_locale_typelib_ab_month_names_fr_FR, &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR );
+MY_LOCALE my_locale_fr_CA
+(
+ 101,
+ "fr_CA",
+ "French - Canada",
+ FALSE,
+ &my_locale_typelib_month_names_fr_FR,
+ &my_locale_typelib_ab_month_names_fr_FR,
+ &my_locale_typelib_day_names_fr_FR,
+ &my_locale_typelib_ab_day_names_fr_FR
+);
/***** LOCALE END fr_CA *****/
/***** LOCALE BEGIN fr_CH: French - Switzerland *****/
-MY_LOCALE my_locale_fr_CH ( "fr_CH", "French - Switzerland", FALSE, &my_locale_typelib_month_names_fr_FR, &my_locale_typelib_ab_month_names_fr_FR, &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR );
+MY_LOCALE my_locale_fr_CH
+(
+ 102,
+ "fr_CH",
+ "French - Switzerland",
+ FALSE,
+ &my_locale_typelib_month_names_fr_FR,
+ &my_locale_typelib_ab_month_names_fr_FR,
+ &my_locale_typelib_day_names_fr_FR,
+ &my_locale_typelib_ab_day_names_fr_FR
+);
/***** LOCALE END fr_CH *****/
/***** LOCALE BEGIN fr_LU: French - Luxembourg *****/
-MY_LOCALE my_locale_fr_LU ( "fr_LU", "French - Luxembourg", FALSE, &my_locale_typelib_month_names_fr_FR, &my_locale_typelib_ab_month_names_fr_FR, &my_locale_typelib_day_names_fr_FR, &my_locale_typelib_ab_day_names_fr_FR );
+MY_LOCALE my_locale_fr_LU
+(
+ 103,
+ "fr_LU",
+ "French - Luxembourg",
+ FALSE,
+ &my_locale_typelib_month_names_fr_FR,
+ &my_locale_typelib_ab_month_names_fr_FR,
+ &my_locale_typelib_day_names_fr_FR,
+ &my_locale_typelib_ab_day_names_fr_FR
+);
/***** LOCALE END fr_LU *****/
/***** LOCALE BEGIN it_IT: Italian - Italy *****/
-MY_LOCALE my_locale_it_IT ( "it_IT", "Italian - Italy", FALSE, &my_locale_typelib_month_names_it_CH, &my_locale_typelib_ab_month_names_it_CH, &my_locale_typelib_day_names_it_CH, &my_locale_typelib_ab_day_names_it_CH );
+MY_LOCALE my_locale_it_IT
+(
+ 104,
+ "it_IT",
+ "Italian - Italy",
+ FALSE,
+ &my_locale_typelib_month_names_it_CH,
+ &my_locale_typelib_ab_month_names_it_CH,
+ &my_locale_typelib_day_names_it_CH,
+ &my_locale_typelib_ab_day_names_it_CH
+);
/***** LOCALE END it_IT *****/
/***** LOCALE BEGIN nl_BE: Dutch - Belgium *****/
-MY_LOCALE my_locale_nl_BE ( "nl_BE", "Dutch - Belgium", TRUE, &my_locale_typelib_month_names_nl_NL, &my_locale_typelib_ab_month_names_nl_NL, &my_locale_typelib_day_names_nl_NL, &my_locale_typelib_ab_day_names_nl_NL );
+MY_LOCALE my_locale_nl_BE
+(
+ 105,
+ "nl_BE",
+ "Dutch - Belgium",
+ TRUE,
+ &my_locale_typelib_month_names_nl_NL,
+ &my_locale_typelib_ab_month_names_nl_NL,
+ &my_locale_typelib_day_names_nl_NL,
+ &my_locale_typelib_ab_day_names_nl_NL
+);
/***** LOCALE END nl_BE *****/
/***** LOCALE BEGIN no_NO: Norwegian - Norway *****/
-MY_LOCALE my_locale_no_NO ( "no_NO", "Norwegian - Norway", FALSE, &my_locale_typelib_month_names_nb_NO, &my_locale_typelib_ab_month_names_nb_NO, &my_locale_typelib_day_names_nb_NO, &my_locale_typelib_ab_day_names_nb_NO );
+MY_LOCALE my_locale_no_NO
+(
+ 106,
+ "no_NO",
+ "Norwegian - Norway",
+ FALSE,
+ &my_locale_typelib_month_names_nb_NO,
+ &my_locale_typelib_ab_month_names_nb_NO,
+ &my_locale_typelib_day_names_nb_NO,
+ &my_locale_typelib_ab_day_names_nb_NO
+);
/***** LOCALE END no_NO *****/
/***** LOCALE BEGIN sv_FI: Swedish - Finland *****/
-MY_LOCALE my_locale_sv_FI ( "sv_FI", "Swedish - Finland", FALSE, &my_locale_typelib_month_names_sv_SE, &my_locale_typelib_ab_month_names_sv_SE, &my_locale_typelib_day_names_sv_SE, &my_locale_typelib_ab_day_names_sv_SE );
+MY_LOCALE my_locale_sv_FI
+(
+ 107,
+ "sv_FI",
+ "Swedish - Finland",
+ FALSE,
+ &my_locale_typelib_month_names_sv_SE,
+ &my_locale_typelib_ab_month_names_sv_SE,
+ &my_locale_typelib_day_names_sv_SE,
+ &my_locale_typelib_ab_day_names_sv_SE
+);
/***** LOCALE END sv_FI *****/
/***** LOCALE BEGIN zh_HK: Chinese - Hong Kong SAR *****/
-MY_LOCALE my_locale_zh_HK ( "zh_HK", "Chinese - Hong Kong SAR", FALSE, &my_locale_typelib_month_names_zh_CN, &my_locale_typelib_ab_month_names_zh_CN, &my_locale_typelib_day_names_zh_CN, &my_locale_typelib_ab_day_names_zh_CN );
+MY_LOCALE my_locale_zh_HK
+(
+ 108,
+ "zh_HK",
+ "Chinese - Hong Kong SAR",
+ FALSE,
+ &my_locale_typelib_month_names_zh_CN,
+ &my_locale_typelib_ab_month_names_zh_CN,
+ &my_locale_typelib_day_names_zh_CN,
+ &my_locale_typelib_ab_day_names_zh_CN
+);
/***** LOCALE END zh_HK *****/
+
+/*
+ The list of all locales.
+ Note, locales must be ordered according to their
+ numbers to make my_locale_by_number() work fast.
+ Some debug asserts below check this.
+*/
MY_LOCALE *my_locales[]=
{
&my_locale_en_US,
@@ -1495,3 +2581,31 @@ MY_LOCALE *my_locales[]=
&my_locale_zh_HK,
NULL
};
+
+
+MY_LOCALE *my_locale_by_number(uint number)
+{
+ MY_LOCALE *locale;
+ if (number >= array_elements(my_locales) - 1)
+ return NULL;
+ locale= my_locales[number];
+ // Check that locale is on its correct position in the array
+ DBUG_ASSERT(locale == my_locales[locale->number]);
+ return locale;
+}
+
+
+MY_LOCALE *my_locale_by_name(const char *name)
+{
+ MY_LOCALE **locale;
+ for (locale= my_locales; *locale != NULL; locale++)
+ {
+ if (!my_strcasecmp(&my_charset_latin1, (*locale)->name, name))
+ {
+ // Check that locale is on its correct position in the array
+ DBUG_ASSERT((*locale) == my_locales[(*locale)->number]);
+ return *locale;
+ }
+ }
+ return NULL;
+}
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 33ae6d96c91..1b7cf2a342d 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -2487,6 +2487,7 @@ static void reset_one_shot_variables(THD *thd)
thd->update_charset();
thd->variables.time_zone=
global_system_variables.time_zone;
+ thd->variables.lc_time_names= &my_locale_en_US;
thd->one_shot_set= 0;
}
@@ -2954,6 +2955,12 @@ mysql_execute_command(THD *thd)
goto end_with_restore_list;
#ifndef HAVE_READLINK
+ if (lex->create_info.data_file_name)
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+ "DATA DIRECTORY option ignored");
+ if (lex->create_info.index_file_name)
+ push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN, 0,
+ "INDEX DIRECTORY option ignored");
lex->create_info.data_file_name=lex->create_info.index_file_name=0;
#else
/* Fix names if symlinked tables */
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index c8830278e42..7715575d65b 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -10646,6 +10646,7 @@ evaluate_join_record(JOIN *join, JOIN_TAB *join_tab,
*/
join->examined_rows++;
join->thd->row_count++;
+ join_tab->read_record.file->unlock_row();
}
return NESTED_LOOP_OK;
}
diff --git a/sql/sql_string.cc b/sql/sql_string.cc
index b307953addc..2aaab83796f 100644
--- a/sql/sql_string.cc
+++ b/sql/sql_string.cc
@@ -1022,8 +1022,8 @@ void String::print(String *str)
case '\r':
str->append(STRING_WITH_LEN("\\r"));
break;
- case 26: //Ctrl-Z
- str->append(STRING_WITH_LEN("\\z"));
+ case '\032': // Ctrl-Z
+ str->append(STRING_WITH_LEN("\\Z"));
break;
default:
str->append(c);
diff --git a/sql/sql_view.cc b/sql/sql_view.cc
index a699a801e2b..55f6fc04442 100644
--- a/sql/sql_view.cc
+++ b/sql/sql_view.cc
@@ -1089,14 +1089,12 @@ bool mysql_make_view(THD *thd, File_parser *parser, TABLE_LIST *table,
table->next_global= view_tables;
}
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
If the view's body needs row-based binlogging (e.g. the VIEW is created
from SELECT UUID()), the top statement also needs it.
*/
if (lex->binlog_row_based_if_mixed)
old_lex->binlog_row_based_if_mixed= TRUE;
-#endif
bool view_is_mergeable= (table->algorithm != VIEW_ALGORITHM_TMPTABLE &&
lex->can_be_merged());
TABLE_LIST *view_main_select_tables;
diff --git a/sql/table.cc b/sql/table.cc
index 4896645c140..d4289aa1dd3 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -122,7 +122,6 @@ TABLE_SHARE *alloc_table_share(TABLE_LIST *table_list, char *key,
share->version= refresh_version;
share->flush_version= flush_version;
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
This constant is used to mark that no table map version has been
assigned. No arithmetic is done on the value: it will be
@@ -140,8 +139,6 @@ TABLE_SHARE *alloc_table_share(TABLE_LIST *table_list, char *key,
share->table_map_id= ~0UL;
share->cached_row_logging_check= -1;
-#endif
-
memcpy((char*) &share->mem_root, (char*) &mem_root, sizeof(mem_root));
pthread_mutex_init(&share->mutex, MY_MUTEX_INIT_FAST);
pthread_cond_init(&share->cond, NULL);
@@ -193,7 +190,6 @@ void init_tmp_table_share(TABLE_SHARE *share, const char *key,
share->path.length= share->normalized_path.length= strlen(path);
share->frm_version= FRM_VER_TRUE_VARCHAR;
-#ifdef HAVE_ROW_BASED_REPLICATION
/*
Temporary tables are not replicated, but we set up these fields
anyway to be able to catch errors.
@@ -201,7 +197,6 @@ void init_tmp_table_share(TABLE_SHARE *share, const char *key,
share->table_map_version= ~(ulonglong)0;
share->table_map_id= ~0UL;
share->cached_row_logging_check= -1;
-#endif
DBUG_VOID_RETURN;
}
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index 0b03bfb0d9c..9290418c7aa 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -2955,7 +2955,7 @@ static int federated_commit(handlerton *hton, THD *thd, bool all)
if (old)
old->trx_next= NULL;
error= ptr->connection_commit();
- if (error && !return_val);
+ if (error && !return_val)
return_val= error;
}
thd->ha_data[hton->slot]= NULL;
diff --git a/storage/myisam/mi_packrec.c b/storage/myisam/mi_packrec.c
index ba16d2c8c9b..30c95dcb0bd 100644
--- a/storage/myisam/mi_packrec.c
+++ b/storage/myisam/mi_packrec.c
@@ -591,8 +591,7 @@ static void fill_quick_table(uint16 *table, uint bits, uint max_bits,
static uint copy_decode_table(uint16 *to_pos, uint offset,
uint16 *decode_table)
{
- uint prev_offset;
- prev_offset= offset;
+ uint prev_offset= offset;
DBUG_ENTER("copy_decode_table");
/* Descent on the left side. */
diff --git a/strings/conf_to_src.c b/strings/conf_to_src.c
index 1ec7b360f03..e2ac9846c85 100644
--- a/strings/conf_to_src.c
+++ b/strings/conf_to_src.c
@@ -275,7 +275,14 @@ main(int argc, char **argv __attribute__((unused)))
}
}
-
+ fprintf(f, "/*\n");
+ fprintf(f, " This file was generated by the conf_to_src utility. "
+ "Do not edit it directly,\n");
+ fprintf(f, " edit the XML definitions in sql/share/charsets/ instead.\n\n");
+ fprintf(f, " To re-generate, run the following in the strings/ "
+ "directory:\n");
+ fprintf(f, " ./conf_to_src ../sql/share/charsets/ > FILE\n");
+ fprintf(f, "*/\n\n");
fprintf(f,"#include <my_global.h>\n");
fprintf(f,"#include <m_ctype.h>\n\n");
diff --git a/strings/ctype-extra.c b/strings/ctype-extra.c
index 4fb5d18bdf4..2b66989ed3e 100644
--- a/strings/ctype-extra.c
+++ b/strings/ctype-extra.c
@@ -1,17 +1,10 @@
-/* Copyright (C) 2000-2003 MySQL AB
+/*
+ This file was generated by the conf_to_src utility. Do not edit it directly,
+ edit the XML definitions in sql/share/charsets/ instead.
- 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 */
+ To re-generate, run the following in the strings/ directory:
+ ./conf_to_src ../sql/share/charsets/ > FILE
+*/
#include <my_global.h>
#include <m_ctype.h>
@@ -1184,7 +1177,7 @@ uchar ctype_hebrew_general_ci[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x00
+0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x20,0x20,0x00
};
uchar to_lower_hebrew_general_ci[] = {
@@ -1276,7 +1269,7 @@ uint16 to_uni_hebrew_general_ci[] = {
0x05D0,0x05D1,0x05D2,0x05D3,0x05D4,0x05D5,0x05D6,0x05D7,
0x05D8,0x05D9,0x05DA,0x05DB,0x05DC,0x05DD,0x05DE,0x05DF,
0x05E0,0x05E1,0x05E2,0x05E3,0x05E4,0x05E5,0x05E6,0x05E7,
-0x05E8,0x05E9,0x05EA,0x0000,0x0000,0x0000,0x0000,0x0000
+0x05E8,0x05E9,0x05EA,0x0000,0x0000,0x200E,0x200F,0x0000
};
#endif
@@ -5115,7 +5108,7 @@ uchar ctype_hebrew_bin[] = {
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,
-0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x00
+0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x02,0x00,0x00,0x20,0x20,0x00
};
uchar to_lower_hebrew_bin[] = {
@@ -5188,7 +5181,7 @@ uint16 to_uni_hebrew_bin[] = {
0x05D0,0x05D1,0x05D2,0x05D3,0x05D4,0x05D5,0x05D6,0x05D7,
0x05D8,0x05D9,0x05DA,0x05DB,0x05DC,0x05DD,0x05DE,0x05DF,
0x05E0,0x05E1,0x05E2,0x05E3,0x05E4,0x05E5,0x05E6,0x05E7,
-0x05E8,0x05E9,0x05EA,0x0000,0x0000,0x0000,0x0000,0x0000
+0x05E8,0x05E9,0x05EA,0x0000,0x0000,0x200E,0x200F,0x0000
};
#endif
diff --git a/tests/mysql_client_test.c b/tests/mysql_client_test.c
index e239400873f..224d0ff13b8 100644
--- a/tests/mysql_client_test.c
+++ b/tests/mysql_client_test.c
@@ -11014,7 +11014,7 @@ static void test_view()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= my_process_stmt_result(stmt);
- assert(1 == rc);
+ DIE_UNLESS(1 == rc);
}
mysql_stmt_close(stmt);
@@ -11057,7 +11057,7 @@ static void test_view_where()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= my_process_stmt_result(stmt);
- assert(4 == rc);
+ DIE_UNLESS(4 == rc);
}
mysql_stmt_close(stmt);
@@ -11140,7 +11140,7 @@ static void test_view_2where()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= my_process_stmt_result(stmt);
- assert(0 == rc);
+ DIE_UNLESS(0 == rc);
mysql_stmt_close(stmt);
@@ -11193,7 +11193,7 @@ static void test_view_star()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= my_process_stmt_result(stmt);
- assert(0 == rc);
+ DIE_UNLESS(0 == rc);
}
mysql_stmt_close(stmt);
@@ -11256,7 +11256,7 @@ static void test_view_insert()
rc= mysql_stmt_execute(select_stmt);
check_execute(select_stmt, rc);
rowcount= (int)my_process_stmt_result(select_stmt);
- assert((i+1) == rowcount);
+ DIE_UNLESS((i+1) == rowcount);
}
mysql_stmt_close(insert_stmt);
mysql_stmt_close(select_stmt);
@@ -11297,7 +11297,7 @@ static void test_left_join_view()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= my_process_stmt_result(stmt);
- assert(3 == rc);
+ DIE_UNLESS(3 == rc);
}
mysql_stmt_close(stmt);
@@ -11373,7 +11373,7 @@ static void test_view_insert_fields()
rc= mysql_stmt_execute(stmt);
check_execute(stmt, rc);
rc= my_process_stmt_result(stmt);
- assert(1 == rc);
+ DIE_UNLESS(1 == rc);
mysql_stmt_close(stmt);
rc= mysql_query(mysql, "DROP VIEW v1");
@@ -12859,6 +12859,81 @@ static void test_bug7990()
DIE_UNLESS(!mysql_errno(mysql));
}
+/*
+ Bug #15518 - Reusing a stmt that has failed during prepare
+ does not clear error
+*/
+
+static void test_bug15518()
+{
+ MYSQL_STMT *stmt;
+ MYSQL* mysql1;
+ int rc;
+ myheader("test_bug15518");
+
+ mysql1= mysql_init(NULL);
+
+ if (!mysql_real_connect(mysql1, opt_host, opt_user, opt_password,
+ opt_db ? opt_db : "test", opt_port, opt_unix_socket,
+ CLIENT_MULTI_STATEMENTS))
+ {
+ fprintf(stderr, "Failed to connect to the database\n");
+ DIE_UNLESS(0);
+ }
+
+ stmt= mysql_stmt_init(mysql1);
+
+ /*
+ The prepare of foo should fail with errno 1064 since
+ it's not a valid query
+ */
+ rc= mysql_stmt_prepare(stmt, "foo", 3);
+ if (!opt_silent)
+ fprintf(stdout, "rc: %d, mysql_stmt_errno: %d, mysql_errno: %d\n",
+ rc, mysql_stmt_errno(stmt), mysql_errno(mysql1));
+ DIE_UNLESS(rc && mysql_stmt_errno(stmt) && mysql_errno(mysql1));
+
+ /*
+ Use the same stmt and reprepare with another query that
+ suceeds
+ */
+ rc= mysql_stmt_prepare(stmt, "SHOW STATUS", 12);
+ if (!opt_silent)
+ fprintf(stdout, "rc: %d, mysql_stmt_errno: %d, mysql_errno: %d\n",
+ rc, mysql_stmt_errno(stmt), mysql_errno(mysql1));
+ DIE_UNLESS(!rc || mysql_stmt_errno(stmt) || mysql_errno(mysql1));
+
+ mysql_stmt_close(stmt);
+ DIE_UNLESS(!mysql_errno(mysql1));
+
+ /*
+ part2, when connection to server has been closed
+ after first prepare
+ */
+ stmt= mysql_stmt_init(mysql1);
+ rc= mysql_stmt_prepare(stmt, "foo", 3);
+ if (!opt_silent)
+ fprintf(stdout, "rc: %d, mysql_stmt_errno: %d, mysql_errno: %d\n",
+ rc, mysql_stmt_errno(stmt), mysql_errno(mysql1));
+ DIE_UNLESS(rc && mysql_stmt_errno(stmt) && mysql_errno(mysql1));
+
+ /* Close connection to server */
+ mysql_close(mysql1);
+
+ /*
+ Use the same stmt and reprepare with another query that
+ suceeds. The prepare should fail with error 2013 since
+ connection to server has been closed.
+ */
+ rc= mysql_stmt_prepare(stmt, "SHOW STATUS", 12);
+ if (!opt_silent)
+ fprintf(stdout, "rc: %d, mysql_stmt_errno: %d\n",
+ rc, mysql_stmt_errno(stmt));
+ DIE_UNLESS(rc && mysql_stmt_errno(stmt));
+
+ mysql_stmt_close(stmt);
+}
+
static void test_view_sp_list_fields()
{
@@ -15035,7 +15110,7 @@ static void test_bug17667()
}
else
{
- assert(0==1);
+ DIE_UNLESS(0==1);
}
}
@@ -15989,6 +16064,7 @@ static struct my_tests_st my_tests[]= {
{ "test_bug19671", test_bug19671 },
{ "test_bug21206", test_bug21206 },
{ "test_bug21726", test_bug21726 },
+ { "test_bug15518", test_bug15518 },
{ "test_bug23383", test_bug23383 },
{ "test_bug21635", test_bug21635 },
{ "test_status", test_status},
diff --git a/unittest/mysys/my_atomic-t.c b/unittest/mysys/my_atomic-t.c
index aa730552582..f636ffed97f 100644
--- a/unittest/mysys/my_atomic-t.c
+++ b/unittest/mysys/my_atomic-t.c
@@ -173,9 +173,15 @@ int main()
pthread_cond_init(&cond, 0);
my_atomic_rwlock_init(&rwl);
- test_atomic("my_atomic_add32", test_atomic_add_handler, 100,10000);
- test_atomic("my_atomic_swap32", test_atomic_swap_handler, 100,10000);
- test_atomic("my_atomic_cas32", test_atomic_cas_handler, 100,10000);
+#ifdef HPUX11
+#define CYCLES 1000
+#else
+#define CYCLES 10000
+#endif
+#define THREADS 100
+ test_atomic("my_atomic_add32", test_atomic_add_handler, THREADS, CYCLES);
+ test_atomic("my_atomic_swap32", test_atomic_swap_handler, THREADS, CYCLES);
+ test_atomic("my_atomic_cas32", test_atomic_cas_handler, THREADS, CYCLES);
/*
workaround until we know why it crashes randomly on some machine
diff --git a/vio/viossl.c b/vio/viossl.c
index 6686e63de0e..4267486112f 100644
--- a/vio/viossl.c
+++ b/vio/viossl.c
@@ -125,12 +125,16 @@ int vio_ssl_close(Vio *vio)
{
switch ((r= SSL_shutdown(ssl)))
{
- case 1: /* Shutdown successful */
+ case 1:
+ /* Shutdown successful */
+ break;
+ case 0:
+ /*
+ Shutdown not yet finished - since the socket is going to
+ be closed there is no need to call SSL_shutdown() a second
+ time to wait for the other side to respond
+ */
break;
- case 0: /* Shutdown not yet finished, call it again */
- if ((r= SSL_shutdown(ssl) >= 0))
- break;
- /* Fallthrough */
default: /* Shutdown failed */
DBUG_PRINT("vio_error", ("SSL_shutdown() failed, error: %d",
SSL_get_error(ssl, r)));