summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <tsmith@quadxeon.mysql.com>2007-03-07 07:21:24 +0100
committerunknown <tsmith@quadxeon.mysql.com>2007-03-07 07:21:24 +0100
commita69a96e26a06d08d5f1060469c630f6296c64dfc (patch)
tree3b6fe53494b0d386d485258b18617577fa500e46
parent0ac63815ff77c208b1312427cda72b9680d03709 (diff)
parent01fc4d068466234ceeea20a0f8ae0e77e36fd90f (diff)
downloadmariadb-git-a69a96e26a06d08d5f1060469c630f6296c64dfc.tar.gz
Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-runtime
into quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/maint/mrg0306/51 client/mysqltest.c: Auto merged include/my_pthread.h: Auto merged mysql-test/mysql-test-run.pl: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/t/disabled.def: Auto merged mysql-test/t/sp.test: Auto merged mysys/my_wincond.c: Auto merged sql/event_queue.cc: Auto merged sql/field.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_load.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_trigger.cc: Auto merged client/mysql_upgrade.c: Manual merge; I chose to keep Magnus' changes because they make the code more simple; always use *only* the option file created by mysql_upgrade. mysql-test/extra/binlog_tests/ctype_cp932.test: Manual merge mysql-test/r/binlog_row_ctype_cp932.result: Manual merge mysql-test/r/binlog_stm_ctype_cp932.result: Manual merge mysql-test/r/mysqlbinlog.result: Manual merge mysql-test/r/rpl_switch_stm_row_mixed.result: Manual merge mysql-test/t/mysqlbinlog.test: Manual merge mysql-test/t/rpl_switch_stm_row_mixed.test: Manual merge
-rw-r--r--.bzrignore2
-rw-r--r--client/CMakeLists.txt3
-rw-r--r--client/Makefile.am1
-rw-r--r--client/echo.c45
-rw-r--r--client/mysql_upgrade.c115
-rw-r--r--client/mysqltest.c394
-rw-r--r--extra/CMakeLists.txt2
-rw-r--r--extra/Makefile.am3
-rw-r--r--extra/comp_err.c119
-rw-r--r--extra/yassl/taocrypt/include/misc.hpp6
-rw-r--r--extra/yassl/taocrypt/src/misc.cpp6
-rw-r--r--include/my_time.h16
-rw-r--r--libmysql/libmysql.c2
-rw-r--r--mysql-test/Makefile.am2
-rw-r--r--mysql-test/extra/binlog_tests/ctype_cp932.test14
-rw-r--r--mysql-test/extra/rpl_tests/rpl_log.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_UUID.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_blob.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_func003.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_sp006.test2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_tabledefs.test4
-rw-r--r--mysql-test/include/add_anonymous_users.inc7
-rw-r--r--mysql-test/include/delete_anonymous_users.inc5
-rw-r--r--mysql-test/include/get_binlog_dump_thread_id.inc19
-rw-r--r--mysql-test/include/gis_generic.inc4
-rw-r--r--mysql-test/include/mix2.inc222
-rw-r--r--mysql-test/include/mix2_ucs2.inc228
-rw-r--r--mysql-test/include/ps_conv.inc12
-rw-r--r--mysql-test/lib/init_db.sql651
-rw-r--r--mysql-test/lib/mtr_misc.pl11
-rw-r--r--mysql-test/lib/mtr_process.pl39
-rwxr-xr-xmysql-test/mysql-test-run.pl130
-rw-r--r--mysql-test/r/archive_gis.result4
-rw-r--r--mysql-test/r/binlog_row_ctype_cp932.result10
-rwxr-xr-xmysql-test/r/binlog_stm_ctype_cp932.result10
-rw-r--r--mysql-test/r/bootstrap.result8
-rw-r--r--mysql-test/r/create.result2
-rw-r--r--mysql-test/r/csv.result7
-rw-r--r--mysql-test/r/derived.result2
-rw-r--r--mysql-test/r/events_logs_tests.result1
-rw-r--r--mysql-test/r/events_scheduling.result1
-rw-r--r--mysql-test/r/federated_server.result2
-rw-r--r--mysql-test/r/func_group.result30
-rw-r--r--mysql-test/r/func_sapdb.result4
-rw-r--r--mysql-test/r/func_str.result14
-rw-r--r--mysql-test/r/func_time.result25
-rw-r--r--mysql-test/r/gis.result50
-rw-r--r--mysql-test/r/innodb-ucs2.result313
-rw-r--r--mysql-test/r/innodb.result312
-rw-r--r--mysql-test/r/innodb_gis.result4
-rw-r--r--mysql-test/r/insert.result1
-rw-r--r--mysql-test/r/join.result2
-rw-r--r--mysql-test/r/loaddata.result16
-rw-r--r--mysql-test/r/log_state.result4
-rw-r--r--mysql-test/r/mix2_myisam.result312
-rw-r--r--mysql-test/r/mix2_myisam_ucs2.result312
-rw-r--r--mysql-test/r/mysql.result10
-rw-r--r--mysql-test/r/mysql_cp932.result10
-rw-r--r--mysql-test/r/mysql_upgrade.result130
-rw-r--r--mysql-test/r/mysqlbinlog-cp932.result19
-rw-r--r--mysql-test/r/mysqlbinlog.result19
-rw-r--r--mysql-test/r/mysqltest.result7
-rw-r--r--mysql-test/r/ndb_gis.result8
-rw-r--r--mysql-test/r/order_by.result24
-rw-r--r--mysql-test/r/outfile.resultbin1159 -> 1382 bytes
-rw-r--r--mysql-test/r/ps_2myisam.result12
-rw-r--r--mysql-test/r/ps_3innodb.result12
-rw-r--r--mysql-test/r/ps_4heap.result12
-rw-r--r--mysql-test/r/ps_5merge.result24
-rw-r--r--mysql-test/r/ps_7ndb.result12
-rw-r--r--mysql-test/r/query_cache.result2
-rw-r--r--mysql-test/r/rpl_ndb_log.result6
-rw-r--r--mysql-test/r/rpl_read_only.result3
-rw-r--r--mysql-test/r/rpl_row_NOW.result1
-rw-r--r--mysql-test/r/rpl_row_USER.result10
-rw-r--r--mysql-test/r/rpl_row_basic_11bugs.result2
-rw-r--r--mysql-test/r/rpl_row_func002.result1
-rw-r--r--mysql-test/r/rpl_row_log.result6
-rw-r--r--mysql-test/r/rpl_row_log_innodb.result6
-rw-r--r--mysql-test/r/rpl_row_sp008.result1
-rw-r--r--mysql-test/r/rpl_row_sp012.result1
-rw-r--r--mysql-test/r/rpl_row_tabledefs_2myisam.result2
-rw-r--r--mysql-test/r/rpl_row_tabledefs_3innodb.result2
-rw-r--r--mysql-test/r/rpl_row_tabledefs_7ndb.result2
-rw-r--r--mysql-test/r/rpl_row_view01.result1
-rw-r--r--mysql-test/r/rpl_slave_status.result1
-rw-r--r--mysql-test/r/rpl_stm_log.result8
-rw-r--r--mysql-test/r/rpl_switch_stm_row_mixed.result2
-rw-r--r--mysql-test/r/sp-security.result6
-rw-r--r--mysql-test/r/sp-ucs2.result14
-rw-r--r--mysql-test/r/sp.result15
-rw-r--r--mysql-test/r/type_blob.result24
-rw-r--r--mysql-test/r/varbinary.result1
-rw-r--r--mysql-test/r/variables.result16
-rw-r--r--mysql-test/t/bootstrap.test46
-rw-r--r--mysql-test/t/create.test4
-rw-r--r--mysql-test/t/csv.test50
-rw-r--r--mysql-test/t/ctype_ucs2_def-master.opt2
-rw-r--r--mysql-test/t/ctype_ucs2_def.test2
-rw-r--r--mysql-test/t/derived.test7
-rw-r--r--mysql-test/t/disabled.def1
-rw-r--r--mysql-test/t/events_logs_tests.test2
-rw-r--r--mysql-test/t/events_scheduling.test1
-rw-r--r--mysql-test/t/func_group.test6
-rw-r--r--mysql-test/t/func_str.test22
-rw-r--r--mysql-test/t/func_time.test27
-rw-r--r--mysql-test/t/gis.test40
-rw-r--r--mysql-test/t/grant2.test4
-rw-r--r--mysql-test/t/grant_cache.test6
-rw-r--r--mysql-test/t/init_connect.test4
-rw-r--r--mysql-test/t/innodb-ucs2.test226
-rw-r--r--mysql-test/t/innodb.test221
-rw-r--r--mysql-test/t/insert.test2
-rw-r--r--mysql-test/t/loaddata.test23
-rw-r--r--mysql-test/t/lock_multi.test6
-rw-r--r--mysql-test/t/log_state.test9
-rw-r--r--mysql-test/t/mix2_myisam_ucs2.test27
-rw-r--r--mysql-test/t/mysql.test34
-rw-r--r--mysql-test/t/mysql_cp932.test22
-rw-r--r--mysql-test/t/mysqlbinlog-cp932-master.opt1
-rw-r--r--mysql-test/t/mysqlbinlog-cp932.test20
-rw-r--r--mysql-test/t/mysqlbinlog.test44
-rw-r--r--mysql-test/t/mysqldump.test34
-rw-r--r--mysql-test/t/mysqltest.test129
-rw-r--r--mysql-test/t/ndb_basic.test6
-rw-r--r--mysql-test/t/ndb_index_ordered.test4
-rw-r--r--mysql-test/t/ndb_multi.test4
-rw-r--r--mysql-test/t/ndb_multi_row.test4
-rw-r--r--mysql-test/t/order_by.test31
-rw-r--r--mysql-test/t/outfile.test12
-rw-r--r--mysql-test/t/overflow.test2
-rw-r--r--mysql-test/t/query_cache.test4
-rw-r--r--mysql-test/t/rpl_ndb_bank.test2
-rw-r--r--mysql-test/t/rpl_ndb_dd_advance.test2
-rw-r--r--mysql-test/t/rpl_rbr_to_sbr.test2
-rw-r--r--mysql-test/t/rpl_read_only.test8
-rw-r--r--mysql-test/t/rpl_row_NOW.test3
-rw-r--r--mysql-test/t/rpl_row_USER.test4
-rw-r--r--mysql-test/t/rpl_row_basic_11bugs.test6
-rw-r--r--mysql-test/t/rpl_row_func002.test3
-rw-r--r--mysql-test/t/rpl_row_sp001.test2
-rw-r--r--mysql-test/t/rpl_row_sp008.test1
-rw-r--r--mysql-test/t/rpl_row_sp011.test2
-rw-r--r--mysql-test/t/rpl_row_sp012.test1
-rw-r--r--mysql-test/t/rpl_row_trig001.test2
-rw-r--r--mysql-test/t/rpl_row_trig003.test2
-rw-r--r--mysql-test/t/rpl_row_view01.test1
-rw-r--r--mysql-test/t/rpl_slave_status.test1
-rw-r--r--mysql-test/t/rpl_sp004.test2
-rw-r--r--mysql-test/t/rpl_switch_stm_row_mixed.test10
-rw-r--r--mysql-test/t/rpl_temporary.test14
-rw-r--r--mysql-test/t/sp-ucs2.test28
-rw-r--r--mysql-test/t/sp.test26
-rw-r--r--mysql-test/t/trigger-grant.test18
-rw-r--r--mysql-test/t/type_blob.test27
-rw-r--r--mysql-test/t/type_varchar.test5
-rw-r--r--mysql-test/t/varbinary.test1
-rw-r--r--mysql-test/t/variables.test19
-rw-r--r--mysql-test/t/xa.test2
-rw-r--r--mysys/mf_iocache.c34
-rw-r--r--mysys/my_symlink2.c4
-rw-r--r--scripts/Makefile.am29
-rw-r--r--scripts/make_binary_distribution.sh1
-rwxr-xr-xscripts/make_win_bin_dist1
-rw-r--r--scripts/mysql_create_system_tables.sh924
-rw-r--r--scripts/mysql_fix_privilege_tables.sh2
-rw-r--r--scripts/mysql_install_db.sh208
-rw-r--r--scripts/mysql_system_tables.sql77
-rw-r--r--scripts/mysql_system_tables_data.sql13
-rw-r--r--scripts/mysql_system_tables_fix.sql (renamed from scripts/mysql_fix_privilege_tables.sql)230
-rw-r--r--scripts/mysql_test_data_timezone.sql5
-rw-r--r--sql-common/my_time.c2
-rw-r--r--sql/Makefile.am15
-rw-r--r--sql/event_queue.cc7
-rw-r--r--sql/field.cc23
-rw-r--r--sql/item.cc13
-rw-r--r--sql/item_geofunc.cc36
-rw-r--r--sql/item_geofunc.h37
-rw-r--r--sql/item_strfunc.cc9
-rw-r--r--sql/log.cc4
-rw-r--r--sql/mysql_priv.h1
-rw-r--r--sql/mysqld.cc85
-rw-r--r--sql/set_var.cc13
-rw-r--r--sql/share/errmsg.txt1032
-rw-r--r--sql/spatial.cc13
-rw-r--r--sql/spatial.h4
-rw-r--r--sql/sql_class.cc14
-rw-r--r--sql/sql_class.h2
-rw-r--r--sql/sql_load.cc9
-rw-r--r--sql/sql_parse.cc13
-rw-r--r--sql/sql_trigger.cc6
-rw-r--r--sql/tztime.cc23
-rw-r--r--storage/innobase/handler/ha_innodb.cc17
-rw-r--r--storage/innobase/handler/ha_innodb.h3
-rw-r--r--storage/innobase/include/srv0srv.h2
-rw-r--r--storage/innobase/srv/srv0srv.c2
196 files changed, 4043 insertions, 4107 deletions
diff --git a/.bzrignore b/.bzrignore
index 9f59f057f4f..c91df60c99f 100644
--- a/.bzrignore
+++ b/.bzrignore
@@ -1249,6 +1249,7 @@ mysql-test/*.ds?
mysql-test/*.vcproj
mysql-test/gmon.out
mysql-test/install_test_db
+mysql-test/lib/init_db.sql
mysql-test/mtr
mysql-test/mysql-test-run
mysql-test/mysql-test-run-shell
@@ -1813,6 +1814,7 @@ scripts/mysql_explain_log
scripts/mysql_find_rows
scripts/mysql_fix_extensions
scripts/mysql_fix_privilege_tables
+scripts/mysql_fix_privilege_tables.sql
scripts/mysql_install_db
scripts/mysql_secure_installation
scripts/mysql_setpermission
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index a8319f51333..d492c49a6b2 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -96,3 +96,6 @@ TARGET_LINK_LIBRARIES(mysqladmin mysqlclient mysys dbug yassl taocrypt zlib wsoc
ADD_EXECUTABLE(mysqlslap mysqlslap.c)
TARGET_LINK_LIBRARIES(mysqlslap mysqlclient mysys yassl taocrypt zlib wsock32 dbug)
+
+ADD_EXECUTABLE(echo echo.c)
+
diff --git a/client/Makefile.am b/client/Makefile.am
index 747b27e9aa0..1c908ea715e 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -96,6 +96,7 @@ DEFS = -DUNDEF_THREADS_HACK \
sql_src=log_event.h mysql_priv.h log_event.cc my_decimal.h my_decimal.cc
strings_src=decimal.c
+EXTRA_DIST = get_password.c CMakeLists.txt echo.c
link_sources:
for f in $(sql_src) ; do \
diff --git a/client/echo.c b/client/echo.c
new file mode 100644
index 00000000000..4483eaad293
--- /dev/null
+++ b/client/echo.c
@@ -0,0 +1,45 @@
+/* Copyright (C) 2000 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+
+/*
+ echo is a replacement for the "echo" command builtin to cmd.exe
+ on Windows, to get a Unix eqvivalent behaviour when running commands
+ like:
+ $> echo "hello" | mysql
+
+ The windows "echo" would have sent "hello" to mysql while
+ Unix echo will send hello without the enclosing hyphens
+
+ This is a very advanced high tech program so take care when
+ you change it and remember to valgrind it before production
+ use.
+
+*/
+
+#include <stdio.h>
+
+int main(int argc, char **argv)
+{
+ int i;
+ for (i= 1; i < argc; i++)
+ {
+ fprintf(stdout, "%s", argv[i]);
+ if (i < argc - 1)
+ fprintf(stdout, " ");
+ }
+ fprintf(stdout, "\n");
+ return 0;
+}
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c
index e916bebb43c..e27e44013f2 100644
--- a/client/mysql_upgrade.c
+++ b/client/mysql_upgrade.c
@@ -54,6 +54,8 @@ static char *default_dbug_option= (char*) "d:t:O,/tmp/mysql_upgrade.trace";
#endif
static my_bool info_flag= 0, tty_password= 0;
+static char **defaults_argv;
+
static struct my_option my_long_options[]=
{
{"help", '?', "Display this help message and exit.", 0, 0, 0, GET_NO_ARG,
@@ -282,6 +284,10 @@ static int create_defaults_file(const char *path, const char *forced_path)
DYNAMIC_STRING buf;
extra_default_t *d;
+ DBUG_ENTER("create_defaults_file");
+ DBUG_PRINT("enter", ("path: %s, forced_path: %s", path, forced_path));
+
+ /* Delete any previous defaults file generated by mysql_upgrade */
my_delete(path, MYF(0));
defaults_file= my_open(path, O_BINARY | O_CREAT | O_WRONLY | O_EXCL,
@@ -298,6 +304,7 @@ static int create_defaults_file(const char *path, const char *forced_path)
goto error;
}
+ /* Copy forced_path file into the defaults_file being generated */
if (forced_path)
{
forced_file= my_open(forced_path, O_RDONLY, MYF(MY_FAE | MY_WME));
@@ -306,6 +313,7 @@ static int create_defaults_file(const char *path, const char *forced_path)
ret= 1;
goto error;
}
+ DBUG_PRINT("info", ("Copying from %s to %s", forced_path, path));
do
{
cnt= my_read(forced_file, buf.str, buf.max_length, MYF(MY_WME));
@@ -316,10 +324,12 @@ static int create_defaults_file(const char *path, const char *forced_path)
my_close(forced_file, MYF(0));
goto error;
}
+ DBUG_PRINT("info", ("%s", buf.str));
} while (cnt == buf.max_length);
my_close(forced_file, MYF(0));
}
-
+
+ /* Write all extra_default options into the [client] section */
dynstr_set(&buf, "\n[client]");
if (opt_password)
{
@@ -330,6 +340,7 @@ static int create_defaults_file(const char *path, const char *forced_path)
goto error;
}
}
+ DBUG_PRINT("info", ("Writing extra_defaults to file"));
while (extra_defaults)
{
int len;
@@ -338,6 +349,7 @@ static int create_defaults_file(const char *path, const char *forced_path)
len= d->n_len + d->v_len + 1;
if (buf.length + len >= buf.max_length) /* to avoid realloc() */
{
+
if (my_write(defaults_file, buf.str, buf.length, MYF(MY_FNABP | MY_WME)))
{
ret= 1;
@@ -353,9 +365,8 @@ static int create_defaults_file(const char *path, const char *forced_path)
ret= 1;
goto error;
}
- my_delete((gptr)d, MYF(0));
+ DBUG_PRINT("info", ("%s", buf.str));
my_free((gptr) d, MYF(0));
-
list_pop(extra_defaults); /* pop off the head */
}
if (my_write(defaults_file, buf.str, buf.length, MYF(MY_FNABP | MY_WME)))
@@ -375,7 +386,7 @@ error:
my_delete(path, MYF(0));
out:
- return ret;
+ DBUG_RETURN(ret);
}
@@ -452,12 +463,8 @@ int main(int argc, char **argv)
char *forced_defaults_file;
char *forced_extra_defaults;
char *local_defaults_group_suffix;
- const char *script_line;
- char *upgrade_defaults_path= NULL;
- char *defaults_to_use= NULL;
- int upgrade_defaults_created= 0;
- int no_defaults;
- char path[FN_REFLEN];
+
+ char path[FN_REFLEN], upgrade_defaults_path[FN_REFLEN];
DYNAMIC_STRING cmdline;
MY_INIT(argv[0]);
@@ -466,15 +473,12 @@ int main(int argc, char **argv)
#endif
/* Check if we are forced to use specific defaults */
- no_defaults= 0;
- if (argc >= 2 && !strcmp(argv[1],"--no-defaults"))
- no_defaults= 1;
-
get_defaults_options(argc, argv,
&forced_defaults_file, &forced_extra_defaults,
&local_defaults_group_suffix);
load_defaults("my", load_default_groups, &argc, &argv);
+ defaults_argv= argv;
/*
Must init_dynamic_string before handle_options because string is freed
@@ -522,25 +526,19 @@ int main(int argc, char **argv)
goto error;
}
- /*
- Create the modified defaults file to be used by mysqlcheck
- and mysql tools
+ /*
+ Create the modified defaults file to be used by mysqlcheck
+ and mysql command line client
*/
- fn_format(path, UPGRADE_DEFAULTS_NAME, datadir, "", MYF(0));
- upgrade_defaults_path= my_strdup(path, MYF(0));
-
- if (extra_defaults)
- {
- ret= create_defaults_file(upgrade_defaults_path, forced_extra_defaults);
- if (ret)
- goto error;
-
- defaults_to_use= upgrade_defaults_path;
- upgrade_defaults_created= 1;
- }
- else
- defaults_to_use= forced_extra_defaults;
+ fn_format(upgrade_defaults_path, UPGRADE_DEFAULTS_NAME, datadir, "", MYF(0));
+ create_defaults_file(upgrade_defaults_path, forced_extra_defaults);
+
+ /*
+ Read the mysql_upgrade_info file to check if mysql_upgrade
+ already has been done
+ Maybe this could be done a little earlier?
+ */
if (!find_file(MYSQL_UPGRADE_INFO_NAME, datadir, MY_SEARCH_SELF,
path, sizeof(path), NULL, NullS)
&& !opt_force)
@@ -559,7 +557,9 @@ int main(int argc, char **argv)
goto fix_priv_tables;
}
}
-
+
+
+ /* Find mysqlcheck */
if (find_file(mysqlcheck_name, basedir, MYF(0), path, sizeof(path),
"bin", EXTRA_CLIENT_PATHS, NullS))
{
@@ -581,15 +581,13 @@ int main(int argc, char **argv)
dynstr_append_os_quoted(&cmdline, path, NullS);
}
- if (defaults_to_use)
- {
- dynstr_append(&cmdline, " ");
- dynstr_append_os_quoted(&cmdline,
- (no_defaults ? "--defaults-file=" :
- "--defaults-extra-file="),
- defaults_to_use, NullS);
- }
-
+ /*
+ All settings have been written to the "upgrade_defaults_path"
+ instruct mysqlcheck to only read options from that file
+ */
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--defaults-file=",
+ upgrade_defaults_path, NullS);
dynstr_append(&cmdline, " ");
dynstr_append_os_quoted(&cmdline, "--check-upgrade", NullS);
dynstr_append(&cmdline, " ");
@@ -602,9 +600,10 @@ int main(int argc, char **argv)
dynstr_append(&cmdline, "\"");
#endif /* __WIN__ */
+ /* Execute mysqlcheck */
if (opt_verbose)
printf("Running %s\n", cmdline.str);
-
+ DBUG_PRINT("info", ("Running: %s", cmdline.str));
ret= system(cmdline.str);
if (ret)
{
@@ -618,6 +617,7 @@ int main(int argc, char **argv)
goto error;
fix_priv_tables:
+ /* Find mysql */
if (find_file(mysql_name, basedir, MYF(0), path, sizeof(path),
"bin", EXTRA_CLIENT_PATHS, NullS))
{
@@ -639,6 +639,7 @@ fix_priv_tables:
dynstr_append_os_quoted(&cmdline, path, NullS);
}
+ /* Find mysql_fix_privililege_tables.sql */
if (find_file(MYSQL_FIX_PRIV_TABLES_NAME, basedir, MYF(0),
path, sizeof(path),
"support_files", "share", "share/mysql", "scripts",
@@ -654,17 +655,14 @@ fix_priv_tables:
" where MySQL is installed");
goto error;
}
- else
- script_line= my_strdup(path, MYF(0));
- if (defaults_to_use)
- {
- dynstr_append(&cmdline, " ");
- dynstr_append_os_quoted(&cmdline,
- (no_defaults ? "--defaults-file=" :
- "--defaults-extra-file="),
- defaults_to_use, NullS);
- }
+ /*
+ All settings have been written to the "upgrade_defaults_path",
+ instruct mysql to only read options from that file
+ */
+ dynstr_append(&cmdline, " ");
+ dynstr_append_os_quoted(&cmdline, "--defaults-file=",
+ upgrade_defaults_path, NullS);
dynstr_append(&cmdline, " ");
dynstr_append_os_quoted(&cmdline, "--force", NullS);
dynstr_append(&cmdline, " ");
@@ -676,14 +674,15 @@ fix_priv_tables:
dynstr_append(&cmdline, " ");
dynstr_append_os_quoted(&cmdline, "--database=mysql", NullS);
dynstr_append(&cmdline, " < ");
- dynstr_append_os_quoted(&cmdline, script_line, NullS);
+ dynstr_append_os_quoted(&cmdline, path, NullS);
#ifdef __WIN__
dynstr_append(&cmdline, "\"");
#endif /* __WIN__ */
+ /* Execute "mysql --force < mysql_fix_privilege_tables.sql" */
if (opt_verbose)
printf("Running %s\n", cmdline.str);
-
+ DBUG_PRINT("info", ("Running: %s", cmdline.str));
ret= system(cmdline.str);
if (ret)
fprintf(stderr, "Error executing '%s'\n", cmdline.str);
@@ -691,10 +690,10 @@ fix_priv_tables:
error:
dynstr_free(&cmdline);
- if (upgrade_defaults_created)
- my_delete(upgrade_defaults_path, MYF(0));
-
- my_free(upgrade_defaults_path, MYF(MY_ALLOW_ZERO_PTR));
+ /* Delete the generated defaults file */
+ my_delete(upgrade_defaults_path, MYF(0));
+
+ free_defaults(defaults_argv);
my_end(info_flag ? MY_CHECK_ERROR : 0);
return ret;
}
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 3f462c2af77..d6f54cafcbb 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -31,7 +31,7 @@
Holyfoot
*/
-#define MTEST_VERSION "3.1"
+#define MTEST_VERSION "3.2"
#include <my_global.h>
#include <mysql_embed.h>
@@ -60,6 +60,11 @@
# endif
#endif
+/* Use cygwin for --exec and --system before 5.0 */
+#if MYSQL_VERSION_ID < 50000
+#define USE_CYGWIN
+#endif
+
#define MAX_VAR_NAME_LENGTH 256
#define MAX_COLUMNS 256
#define MAX_EMBEDDED_SERVER_ARGS 64
@@ -105,7 +110,7 @@ static my_bool disable_warnings= 0, disable_ps_warnings= 0;
static my_bool disable_info= 1;
static my_bool abort_on_error= 1;
static my_bool server_initialized= 0;
-
+static my_bool is_windows= 0;
static char **default_argv;
static const char *load_default_groups[]= { "mysqltest", "client", 0 };
static char line_buffer[MAX_DELIMITER_LENGTH], *line_buffer_pos= line_buffer;
@@ -275,7 +280,7 @@ enum enum_commands {
Q_DISABLE_PARSING, Q_ENABLE_PARSING,
Q_REPLACE_REGEX, Q_REMOVE_FILE, Q_FILE_EXIST,
Q_WRITE_FILE, Q_COPY_FILE, Q_PERL, Q_DIE, Q_EXIT,
- Q_CHMOD_FILE,
+ Q_CHMOD_FILE, Q_APPEND_FILE, Q_CAT_FILE, Q_DIFF_FILES,
Q_UNKNOWN, /* Unknown command. */
Q_COMMENT, /* Comments, ignored. */
@@ -359,6 +364,9 @@ const char *command_names[]=
/* Don't execute any more commands, compare result */
"exit",
"chmod",
+ "append_file",
+ "cat_file",
+ "diff_files",
0
};
@@ -410,6 +418,9 @@ TYPELIB command_typelib= {array_elements(command_names),"",
static DYNAMIC_STRING ds_res, ds_progress, ds_warning_messages;
static DYNAMIC_STRING global_ds_warnings, global_eval_query;
+char builtin_echo[FN_REFLEN];
+
+
void die(const char *fmt, ...)
ATTRIBUTE_FORMAT(printf, 1, 2);
void abort_not_supported_test(const char *fmt, ...)
@@ -418,6 +429,8 @@ void verbose_msg(const char *fmt, ...)
ATTRIBUTE_FORMAT(printf, 1, 2);
void warning_msg(const char *fmt, ...)
ATTRIBUTE_FORMAT(printf, 1, 2);
+void log_msg(const char *fmt, ...)
+ ATTRIBUTE_FORMAT(printf, 1, 2);
VAR* var_from_env(const char *, const char *);
VAR* var_init(VAR* v, const char *name, int name_len, const char *val,
@@ -435,6 +448,7 @@ void dump_progress();
void do_eval(DYNAMIC_STRING *query_eval, const char *query,
const char *query_end, my_bool pass_through_escape_chars);
void str_to_file(const char *fname, char *str, int size);
+void str_to_file2(const char *fname, char *str, int size, my_bool append);
#ifdef __WIN__
void free_tmp_sh_file();
@@ -580,6 +594,7 @@ void do_eval(DYNAMIC_STRING *query_eval, const char *query,
dynstr_append_mem(query_eval, p, 1);
break;
default:
+ escaped= 0;
dynstr_append_mem(query_eval, p, 1);
break;
}
@@ -936,10 +951,10 @@ void warning_msg(const char *fmt, ...)
dynstr_append_mem(&ds_warning_messages,
buff, len);
}
-#ifndef __WIN__
- len= vsnprintf(buff, sizeof(buff), fmt, args);
+
+ len= my_vsnprintf(buff, sizeof(buff), fmt, args);
dynstr_append_mem(&ds_warning_messages, buff, len);
-#endif
+
dynstr_append(&ds_warning_messages, "\n");
va_end(args);
@@ -947,6 +962,25 @@ void warning_msg(const char *fmt, ...)
}
+void log_msg(const char *fmt, ...)
+{
+ va_list args;
+ char buff[512];
+ size_t len;
+ DBUG_ENTER("log_msg");
+
+ memset(buff, 0, sizeof(buff));
+ va_start(args, fmt);
+ len= my_vsnprintf(buff, sizeof(buff)-1, fmt, args);
+ va_end(args);
+
+ dynstr_append_mem(&ds_res, buff, len);
+ dynstr_append(&ds_res, "\n");
+
+ DBUG_VOID_RETURN;
+}
+
+
/*
Compare content of the string ds to content of file fname
*/
@@ -1519,29 +1553,36 @@ void do_source(struct st_command *command)
}
-#ifdef __WIN__
+#if defined __WIN__
+
+#ifdef USE_CYGWIN
/* Variables used for temporary sh files used for emulating Unix on Windows */
char tmp_sh_name[64], tmp_sh_cmd[70];
+#endif
void init_tmp_sh_file()
{
+#ifdef USE_CYGWIN
/* Format a name for the tmp sh file that is unique for this process */
my_snprintf(tmp_sh_name, sizeof(tmp_sh_name), "tmp_%d.sh", getpid());
/* Format the command to execute in order to run the script */
my_snprintf(tmp_sh_cmd, sizeof(tmp_sh_cmd), "sh %s", tmp_sh_name);
+#endif
}
void free_tmp_sh_file()
{
+#ifdef USE_CYGWIN
my_delete(tmp_sh_name, MYF(0));
+#endif
}
#endif
FILE* my_popen(DYNAMIC_STRING *ds_cmd, const char *mode)
{
-#ifdef __WIN__
+#if defined __WIN__ && defined USE_CYGWIN
/* Dump the command into a sh script file and execute with popen */
str_to_file(tmp_sh_name, ds_cmd->str, ds_cmd->length);
return popen(tmp_sh_cmd, mode);
@@ -1551,6 +1592,64 @@ FILE* my_popen(DYNAMIC_STRING *ds_cmd, const char *mode)
}
+static void init_builtin_echo(void)
+{
+#ifdef __WIN__
+
+ /* Look for "echo.exe" in same dir as mysqltest was started from */
+ dirname_part(builtin_echo, my_progname);
+ fn_format(builtin_echo, ".\\echo.exe",
+ builtin_echo, "", MYF(MY_REPLACE_DIR));
+
+ /* Make sure echo.exe exists */
+ if (access(builtin_echo, F_OK) != 0)
+ builtin_echo[0]= 0;
+ return;
+
+#else
+
+ builtin_echo[0]= 0;
+ return;
+
+#endif
+}
+
+
+/*
+ Replace a substring
+
+ SYNOPSIS
+ replace
+ ds_str The string to search and perform the replace in
+ search_str The string to search for
+ search_len Length of the string to search for
+ replace_str The string to replace with
+ replace_len Length of the string to replace with
+
+ RETURN
+ 0 String replaced
+ 1 Could not find search_str in str
+*/
+
+static int replace(DYNAMIC_STRING *ds_str,
+ const char *search_str, ulong search_len,
+ const char *replace_str, ulong replace_len)
+{
+ DYNAMIC_STRING ds_tmp;
+ const char *start= strstr(ds_str->str, search_str);
+ if (!start)
+ return 1;
+ init_dynamic_string(&ds_tmp, "",
+ ds_str->length + replace_len, 256);
+ dynstr_append_mem(&ds_tmp, ds_str->str, start - ds_str->str);
+ dynstr_append_mem(&ds_tmp, replace_str, replace_len);
+ dynstr_append(&ds_tmp, start + search_len);
+ dynstr_set(ds_str, ds_tmp.str);
+ dynstr_free(&ds_tmp);
+ return 0;
+}
+
+
/*
Execute given command.
@@ -1569,13 +1668,13 @@ FILE* my_popen(DYNAMIC_STRING *ds_cmd, const char *mode)
NOTE
Although mysqltest is executed from cygwin shell, the command will be
executed in "cmd.exe". Thus commands like "rm" etc can NOT be used, use
- system for those commands.
+ mysqltest commmand(s) like "remove_file" for that
*/
void do_exec(struct st_command *command)
{
int error;
- char buf[1024];
+ char buf[512];
FILE *res_file;
char *cmd= command->first_argument;
DYNAMIC_STRING ds_cmd;
@@ -1591,7 +1690,23 @@ void do_exec(struct st_command *command)
init_dynamic_string(&ds_cmd, 0, command->query_len+256, 256);
/* Eval the command, thus replacing all environment variables */
- do_eval(&ds_cmd, cmd, command->end, TRUE);
+ do_eval(&ds_cmd, cmd, command->end, !is_windows);
+
+ /* Check if echo should be replaced with "builtin" echo */
+ if (builtin_echo[0] && strncmp(cmd, "echo", 4) == 0)
+ {
+ /* Replace echo with our "builtin" echo */
+ replace(&ds_cmd, "echo", 4, builtin_echo, strlen(builtin_echo));
+ }
+
+#ifdef __WIN__
+ /* Replace /dev/null with NUL */
+ while(replace(&ds_cmd, "/dev/null", 9, "NUL", 3) == 0)
+ ;
+ /* Replace "closed stdout" with non existing output fd */
+ while(replace(&ds_cmd, ">&-", 3, ">&4", 3) == 0)
+ ;
+#endif
DBUG_PRINT("info", ("Executing '%s' as '%s'",
command->first_argument, ds_cmd.str));
@@ -1618,7 +1733,11 @@ void do_exec(struct st_command *command)
my_bool ok= 0;
if (command->abort_on_error)
+ {
+ log_msg("exec of '%s failed, error: %d, status: %d, errno: %d",
+ ds_cmd.str, error, status, errno);
die("command \"%s\" failed", command->first_argument);
+ }
DBUG_PRINT("info",
("error: %d, status: %d", error, status));
@@ -1642,6 +1761,8 @@ void do_exec(struct st_command *command)
command->expected_errors.err[0].code.errnum != 0)
{
/* Error code we wanted was != 0, i.e. not an expected success */
+ log_msg("exec of '%s failed, error: %d, errno: %d",
+ ds_cmd.str, error, errno);
die("command \"%s\" succeeded - should have failed with errno %d...",
command->first_argument, command->expected_errors.err[0].code.errnum);
}
@@ -1712,7 +1833,7 @@ int do_modify_var(struct st_command *command,
int my_system(DYNAMIC_STRING* ds_cmd)
{
-#ifdef __WIN__
+#if defined __WIN__ && defined USE_CYGWIN
/* Dump the command into a sh script file and execute with system */
str_to_file(tmp_sh_name, ds_cmd->str, ds_cmd->length);
return system(tmp_sh_cmd);
@@ -1746,7 +1867,14 @@ void do_system(struct st_command *command)
init_dynamic_string(&ds_cmd, 0, command->query_len + 64, 256);
/* Eval the system command, thus replacing all environment variables */
- do_eval(&ds_cmd, command->first_argument, command->end, TRUE);
+ do_eval(&ds_cmd, command->first_argument, command->end, !is_windows);
+
+#ifdef __WIN__
+ /* Replace /dev/null with NUL */
+ while(replace(&ds_cmd, "/dev/null", 9, "NUL", 3) == 0)
+ ;
+#endif
+
DBUG_PRINT("info", ("running system command '%s' as '%s'",
command->first_argument, ds_cmd.str));
@@ -1967,6 +2095,38 @@ void read_until_delimiter(DYNAMIC_STRING *ds,
}
+void do_write_file_command(struct st_command *command, my_bool append)
+{
+ static DYNAMIC_STRING ds_content;
+ static DYNAMIC_STRING ds_filename;
+ static DYNAMIC_STRING ds_delimiter;
+ const struct command_arg write_file_args[] = {
+ "filename", ARG_STRING, TRUE, &ds_filename, "File to write to",
+ "delimiter", ARG_STRING, FALSE, &ds_delimiter, "Delimiter to read until"
+ };
+ DBUG_ENTER("do_write_file");
+
+ check_command_args(command,
+ command->first_argument,
+ write_file_args,
+ sizeof(write_file_args)/sizeof(struct command_arg),
+ ' ');
+
+ /* If no delimiter was provided, use EOF */
+ if (ds_delimiter.length == 0)
+ dynstr_set(&ds_delimiter, "EOF");
+
+ init_dynamic_string(&ds_content, "", 1024, 1024);
+ read_until_delimiter(&ds_content, &ds_delimiter);
+ DBUG_PRINT("info", ("Writing to file: %s", ds_filename.str));
+ str_to_file2(ds_filename.str, ds_content.str, ds_content.length, append);
+ dynstr_free(&ds_content);
+ dynstr_free(&ds_filename);
+ dynstr_free(&ds_delimiter);
+ DBUG_VOID_RETURN;
+}
+
+
/*
SYNOPSIS
do_write_file
@@ -1996,36 +2156,174 @@ void read_until_delimiter(DYNAMIC_STRING *ds,
void do_write_file(struct st_command *command)
{
- static DYNAMIC_STRING ds_content;
+ do_write_file_command(command, FALSE);
+}
+
+
+/*
+ SYNOPSIS
+ do_append_file
+ command called command
+
+ DESCRIPTION
+ append_file <file_name> [<delimiter>];
+ <what to write line 1>
+ <...>
+ < what to write line n>
+ EOF
+
+ --append_file <file_name>;
+ <what to write line 1>
+ <...>
+ < what to write line n>
+ EOF
+
+ Append everything between the "append_file" command
+ and 'delimiter' to "file_name"
+
+ Default <delimiter> is EOF
+
+*/
+
+void do_append_file(struct st_command *command)
+{
+ do_write_file_command(command, TRUE);
+}
+
+
+/*
+ SYNOPSIS
+ do_cat_file
+ command called command
+
+ DESCRIPTION
+ cat_file <file_name>;
+
+ Print the given file to result log
+
+*/
+
+void do_cat_file(struct st_command *command)
+{
+ int fd;
+ uint len;
+ char buff[512];
static DYNAMIC_STRING ds_filename;
- static DYNAMIC_STRING ds_delimiter;
- const struct command_arg write_file_args[] = {
- "filename", ARG_STRING, TRUE, &ds_filename, "File to write to",
- "delimiter", ARG_STRING, FALSE, &ds_delimiter, "Delimiter to read until"
+ const struct command_arg cat_file_args[] = {
+ "filename", ARG_STRING, TRUE, &ds_filename, "File to read from"
};
- DBUG_ENTER("do_write_file");
+ DBUG_ENTER("do_cat_file");
check_command_args(command,
command->first_argument,
- write_file_args,
- sizeof(write_file_args)/sizeof(struct command_arg),
+ cat_file_args,
+ sizeof(cat_file_args)/sizeof(struct command_arg),
' ');
- /* If no delimiter was provided, use EOF */
- if (ds_delimiter.length == 0)
- dynstr_set(&ds_delimiter, "EOF");
+ DBUG_PRINT("info", ("Reading from, file: %s", ds_filename.str));
- init_dynamic_string(&ds_content, "", 1024, 1024);
- read_until_delimiter(&ds_content, &ds_delimiter);
- DBUG_PRINT("info", ("Writing to file: %s", ds_filename.str));
- str_to_file(ds_filename.str, ds_content.str, ds_content.length);
- dynstr_free(&ds_content);
+ if ((fd= my_open(ds_filename.str, O_RDONLY, MYF(0))) < 0)
+ die("Failed to open file %s", ds_filename.str);
+ while((len= my_read(fd, (byte*)&buff,
+ sizeof(buff), MYF(0))) > 0)
+ {
+ char *p= buff, *start= buff;
+ while (p < buff+len)
+ {
+ /* Convert cr/lf to lf */
+ if (*p == '\r' && *(p+1) && *(p+1)== '\n')
+ {
+ /* Add fake newline instead of cr and output the line */
+ *p= '\n';
+ p++; /* Step past the "fake" newline */
+ dynstr_append_mem(&ds_res, start, p-start);
+ p++; /* Step past the "fake" newline */
+ start= p;
+ }
+ else
+ p++;
+ }
+ /* Output any chars that migh be left */
+ dynstr_append_mem(&ds_res, start, p-start);
+ }
+ my_close(fd, MYF(0));
dynstr_free(&ds_filename);
- dynstr_free(&ds_delimiter);
DBUG_VOID_RETURN;
}
+
+/*
+ SYNOPSIS
+ do_diff_files
+ command called command
+
+ DESCRIPTION
+ diff_files <file1> <file2>;
+
+ Fails if the two files differ.
+
+*/
+
+void do_diff_files(struct st_command *command)
+{
+ int error= 0;
+ int fd, fd2;
+ uint len, len2;
+ char buff[512], buff2[512];
+ static DYNAMIC_STRING ds_filename;
+ static DYNAMIC_STRING ds_filename2;
+ const struct command_arg diff_file_args[] = {
+ "file1", ARG_STRING, TRUE, &ds_filename, "First file to diff",
+ "file2", ARG_STRING, TRUE, &ds_filename2, "Second file to diff"
+ };
+ DBUG_ENTER("do_diff_files");
+
+ check_command_args(command,
+ command->first_argument,
+ diff_file_args,
+ sizeof(diff_file_args)/sizeof(struct command_arg),
+ ' ');
+
+ if ((fd= my_open(ds_filename.str, O_RDONLY, MYF(0))) < 0)
+ die("Failed to open first file %s", ds_filename.str);
+ if ((fd2= my_open(ds_filename2.str, O_RDONLY, MYF(0))) < 0)
+ {
+ my_close(fd, MYF(0));
+ die("Failed to open second file %s", ds_filename2.str);
+ }
+ while((len= my_read(fd, (byte*)&buff,
+ sizeof(buff), MYF(0))) > 0)
+ {
+ if ((len2= my_read(fd2, (byte*)&buff2,
+ sizeof(buff2), MYF(0))) != len)
+ {
+ /* File 2 was smaller */
+ error= 1;
+ break;
+ }
+ if ((memcmp(buff, buff2, len)))
+ {
+ /* Content of this part differed */
+ error= 1;
+ break;
+ }
+ }
+ if (my_read(fd2, (byte*)&buff2,
+ sizeof(buff2), MYF(0)) > 0)
+ {
+ /* File 1 was smaller */
+ error= 1;
+ }
+
+ my_close(fd, MYF(0));
+ my_close(fd2, MYF(0));
+ dynstr_free(&ds_filename);
+ dynstr_free(&ds_filename2);
+ handle_command_error(command, error);
+ DBUG_VOID_RETURN;
+}
+
/*
SYNOPSIS
do_perl
@@ -4181,21 +4479,22 @@ int parse_args(int argc, char **argv)
return 0;
}
-
/*
Write the content of str into file
SYNOPSIS
- str_to_file
+ str_to_file2
fname - name of file to truncate/create and write to
str - content to write to file
size - size of content witten to file
+ append - append to file instead of overwriting old file
*/
-void str_to_file(const char *fname, char *str, int size)
+void str_to_file2(const char *fname, char *str, int size, my_bool append)
{
int fd;
char buff[FN_REFLEN];
+ int flags= O_WRONLY | O_CREAT;
if (!test_if_hard_path(fname))
{
strxmov(buff, opt_basedir, fname, NullS);
@@ -4203,14 +4502,33 @@ void str_to_file(const char *fname, char *str, int size)
}
fn_format(buff, fname, "", "", MY_UNPACK_FILENAME);
- if ((fd= my_open(buff, O_WRONLY | O_CREAT | O_TRUNC,
+ if (!append)
+ flags|= O_TRUNC;
+ if ((fd= my_open(buff, flags,
MYF(MY_WME | MY_FFNF))) < 0)
die("Could not open %s: errno = %d", buff, errno);
+ if (append && my_seek(fd, 0, SEEK_END, MYF(0)) == MY_FILEPOS_ERROR)
+ die("Could not find end of file %s: errno = %d", buff, errno);
if (my_write(fd, (byte*)str, size, MYF(MY_WME|MY_FNABP)))
die("write failed");
my_close(fd, MYF(0));
}
+/*
+ Write the content of str into file
+
+ SYNOPSIS
+ str_to_file
+ fname - name of file to truncate/create and write to
+ str - content to write to file
+ size - size of content witten to file
+*/
+
+void str_to_file(const char *fname, char *str, int size)
+{
+ str_to_file2(fname, str, size, FALSE);
+}
+
void dump_result_to_reject_file(char *buf, int size)
{
@@ -5047,8 +5365,9 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
/*
If we got here the statement succeeded and was expected to do so,
get data. Note that this can still give errors found during execution!
+ Store the result of the query if if will return any fields
*/
- if (mysql_stmt_store_result(stmt))
+ if (mysql_stmt_field_count(stmt) && mysql_stmt_store_result(stmt))
{
handle_error(command, mysql_stmt_errno(stmt),
mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);
@@ -5643,7 +5962,9 @@ int main(int argc, char **argv)
parser.current_line= parser.read_lines= 0;
memset(&var_reg, 0, sizeof(var_reg));
+ init_builtin_echo();
#ifdef __WIN__
+ is_windows= 1;
init_tmp_sh_file();
init_win_path_patterns();
#endif
@@ -5778,6 +6099,9 @@ int main(int argc, char **argv)
case Q_REMOVE_FILE: do_remove_file(command); break;
case Q_FILE_EXIST: do_file_exist(command); break;
case Q_WRITE_FILE: do_write_file(command); break;
+ case Q_APPEND_FILE: do_append_file(command); break;
+ case Q_DIFF_FILES: do_diff_files(command); break;
+ case Q_CAT_FILE: do_cat_file(command); break;
case Q_COPY_FILE: do_copy_file(command); break;
case Q_CHMOD_FILE: do_chmod_file(command); break;
case Q_PERL: do_perl(command); break;
diff --git a/extra/CMakeLists.txt b/extra/CMakeLists.txt
index 5ce2f7b02ab..ed40ec3070a 100644
--- a/extra/CMakeLists.txt
+++ b/extra/CMakeLists.txt
@@ -19,7 +19,7 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include)
ADD_EXECUTABLE(comp_err comp_err.c)
-TARGET_LINK_LIBRARIES(comp_err dbug mysys strings wsock32)
+TARGET_LINK_LIBRARIES(comp_err dbug mysys strings zlib wsock32)
GET_TARGET_PROPERTY(COMP_ERR_EXE comp_err LOCATION)
diff --git a/extra/Makefile.am b/extra/Makefile.am
index 1ea0b7ddb38..b2d504cfb62 100644
--- a/extra/Makefile.am
+++ b/extra/Makefile.am
@@ -16,7 +16,8 @@
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/sql
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \
- ../dbug/libdbug.a ../strings/libmystrings.a
+ ../dbug/libdbug.a ../strings/libmystrings.a \
+ $(ZLIB_LIBS)
BUILT_SOURCES= $(top_builddir)/include/mysqld_error.h \
$(top_builddir)/include/sql_state.h \
$(top_builddir)/include/mysqld_ername.h
diff --git a/extra/comp_err.c b/extra/comp_err.c
index a2e52b73f90..ff1d114b27d 100644
--- a/extra/comp_err.c
+++ b/extra/comp_err.c
@@ -134,6 +134,8 @@ static struct message *parse_message_string(struct message *new_message,
char *str);
static struct message *find_message(struct errors *err, const char *lang,
my_bool no_default);
+static int check_message_format(struct errors *err,
+ const char* mess);
static int parse_input_file(const char *file_name, struct errors **top_error,
struct languages **top_language);
static int get_options(int *argc, char ***argv);
@@ -462,6 +464,13 @@ static int parse_input_file(const char *file_name, struct errors **top_error,
current_error->er_name, current_message.lang_short_name);
DBUG_RETURN(0);
}
+ if (check_message_format(current_error, current_message.text))
+ {
+ fprintf(stderr, "Wrong formatspecifier of error message string"
+ " for error '%s' in language '%s'\n",
+ current_error->er_name, current_message.lang_short_name);
+ DBUG_RETURN(0);
+ }
if (insert_dynamic(&current_error->msg, (byte *) & current_message))
DBUG_RETURN(0);
continue;
@@ -603,6 +612,116 @@ static struct message *find_message(struct errors *err, const char *lang,
}
+
+/*
+ Check message format specifiers against error message for
+ previous language
+
+ SYNOPSIS
+ checksum_format_specifier()
+ msg String for which to generate checksum
+ for the format specifiers
+
+ RETURN VALUE
+ Returns the checksum for all the characters of the
+ format specifiers
+
+ Ex.
+ "text '%-64.s' text part 2 %d'"
+ ^^^^^^ ^^
+ characters will be xored to form checksum
+
+ NOTE:
+ Does not support format specifiers with positional args
+ like "%2$s" but that is not yet supported by my_vsnprintf
+ either.
+*/
+
+static char checksum_format_specifier(const char* msg)
+{
+ char chksum= 0;
+ const char* p= msg;
+ const char* start= 0;
+ int num_format_specifiers= 0;
+ while (*p)
+ {
+
+ if (*p == '%')
+ {
+ start= p+1; /* Entering format specifier */
+ num_format_specifiers++;
+ }
+ else if (start)
+ {
+ switch(*p)
+ {
+ case 'd':
+ case 'u':
+ case 'x':
+ case 's':
+ chksum= my_checksum(chksum, start, p-start);
+ start= 0; /* Not in format specifier anymore */
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ p++;
+ }
+
+ if (start)
+ {
+ /* Still inside a format specifier after end of string */
+
+ fprintf(stderr, "Still inside formatspecifier after end of string"
+ " in'%s'\n", msg);
+ DBUG_ASSERT(start==0);
+ }
+
+ /* Add number of format specifiers to checksum as extra safeguard */
+ chksum+= num_format_specifiers;
+
+ return chksum;
+}
+
+
+/*
+ Check message format specifiers against error message for
+ previous language
+
+ SYNOPSIS
+ check_message_format()
+ err Error to check message for
+ mess Message to check
+
+ RETURN VALUE
+ Returns 0 if no previous error message or message format is ok
+*/
+static int check_message_format(struct errors *err,
+ const char* mess)
+{
+ struct message *first;
+ DBUG_ENTER("check_message_format");
+
+ /* Get first message(if any) */
+ if ((err->msg).elements == 0)
+ DBUG_RETURN(0); /* No previous message to compare against */
+
+ first= dynamic_element(&err->msg, 0, struct message*);
+ DBUG_ASSERT(first != NULL);
+
+ if (checksum_format_specifier(first->text) !=
+ checksum_format_specifier(mess))
+ {
+ /* Check sum of format specifiers failed, they should be equal */
+ DBUG_RETURN(1);
+ }
+ DBUG_RETURN(0);
+}
+
+
/*
Skips spaces and or tabs till the beginning of the next word
Returns pointer to the beginning of the first character of the word
diff --git a/extra/yassl/taocrypt/include/misc.hpp b/extra/yassl/taocrypt/include/misc.hpp
index 392db38410a..224589e0640 100644
--- a/extra/yassl/taocrypt/include/misc.hpp
+++ b/extra/yassl/taocrypt/include/misc.hpp
@@ -858,9 +858,9 @@ inline T1 SaturatingSubtract(T1 a, T2 b)
// declares
-unsigned int BytePrecision(unsigned long value);
-unsigned int BitPrecision(unsigned long);
-unsigned long Crop(unsigned long value, unsigned int size);
+unsigned int BytePrecision(word value);
+unsigned int BitPrecision(word);
+word Crop(word value, unsigned int size);
diff --git a/extra/yassl/taocrypt/src/misc.cpp b/extra/yassl/taocrypt/src/misc.cpp
index 83acc15277d..726d9e630e6 100644
--- a/extra/yassl/taocrypt/src/misc.cpp
+++ b/extra/yassl/taocrypt/src/misc.cpp
@@ -122,7 +122,7 @@ void xorbuf(byte* buf, const byte* mask, unsigned int count)
}
-unsigned int BytePrecision(unsigned long value)
+unsigned int BytePrecision(word value)
{
unsigned int i;
for (i=sizeof(value); i; --i)
@@ -133,7 +133,7 @@ unsigned int BytePrecision(unsigned long value)
}
-unsigned int BitPrecision(unsigned long value)
+unsigned int BitPrecision(word value)
{
if (!value)
return 0;
@@ -154,7 +154,7 @@ unsigned int BitPrecision(unsigned long value)
}
-unsigned long Crop(unsigned long value, unsigned int size)
+word Crop(word value, unsigned int size)
{
if (size < 8*sizeof(value))
return (value & ((1L << size) - 1));
diff --git a/include/my_time.h b/include/my_time.h
index a27ac5c1628..d96c5822069 100644
--- a/include/my_time.h
+++ b/include/my_time.h
@@ -30,15 +30,15 @@ extern uchar days_in_month[];
/*
Portable time_t replacement.
- Should be signed and hold seconds for 1902-2038 range.
-*/
-#if defined(_WIN64) || defined(WIN64)
-/* on Win64 long is still 4 bytes (not 8!) */
-typedef LONG64 my_time_t;
-#else
-typedef time_t my_time_t;
+ Should be signed and hold seconds for 1902 -- 2038-01-19 range
+ i.e at least a 32bit variable
+
+ Using the system built in time_t is not an option as
+ we rely on the above requirements in the time functions
-#endif
+ For example QNX has an unsigned time_t type
+*/
+typedef long my_time_t;
#define MY_TIME_T_MAX LONG_MAX
#define MY_TIME_T_MIN LONG_MIN
diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c
index 3ca09cb68ea..181904edc1a 100644
--- a/libmysql/libmysql.c
+++ b/libmysql/libmysql.c
@@ -1361,7 +1361,7 @@ mysql_stat(MYSQL *mysql)
{
DBUG_ENTER("mysql_stat");
if (simple_command(mysql,COM_STATISTICS,0,0,0))
- return mysql->net.last_error;
+ DBUG_RETURN(mysql->net.last_error);
DBUG_RETURN((*mysql->methods->read_statistics)(mysql));
}
diff --git a/mysql-test/Makefile.am b/mysql-test/Makefile.am
index ede012c1870..839dc434e46 100644
--- a/mysql-test/Makefile.am
+++ b/mysql-test/Makefile.am
@@ -70,7 +70,6 @@ dist-hook:
$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50/BACKUP* $(distdir)/std_data/ndb_backup50
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51/BACKUP* $(distdir)/std_data/ndb_backup51
- $(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(distdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib
install-data-local:
@@ -112,7 +111,6 @@ install-data-local:
$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup50/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup50
$(INSTALL_DATA) $(srcdir)/std_data/ndb_backup51/BACKUP* $(DESTDIR)$(testdir)/std_data/ndb_backup51
- $(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(DESTDIR)$(testdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
uninstall-local:
diff --git a/mysql-test/extra/binlog_tests/ctype_cp932.test b/mysql-test/extra/binlog_tests/ctype_cp932.test
index c6196b928b0..fc2fa934641 100644
--- a/mysql-test/extra/binlog_tests/ctype_cp932.test
+++ b/mysql-test/extra/binlog_tests/ctype_cp932.test
@@ -424,3 +424,17 @@ show warnings;
select * from t1;
select hex(a) from t1;
drop table t1;
+
+#
+# BUG#16217 - MySQL client misinterpretes multi-byte char as escape `\'
+#
+
+# new command \C or charset
+--exec $MYSQL --default-character-set=utf8 test -e "\C cp932 \g"
+--exec $MYSQL --default-character-set=cp932 test -e "charset utf8;"
+
+# its usage to switch internally in mysql to requested charset
+--exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select '\'; create table t1 (c_cp932 TEXT CHARACTER SET cp932); insert into t1 values('\'); select * from t1; drop table t1;"
+--exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select '\'"
+--exec $MYSQL --default-character-set=utf8 test -e "/*charset cp932 */; set character_set_client= cp932; select '\'"
+--exec $MYSQL --default-character-set=utf8 test -e "/*!\C cp932 */; set character_set_client= cp932; select '\'"
diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test
index cc3a9b4ffb5..9f6f4bf7e57 100644
--- a/mysql-test/extra/rpl_tests/rpl_log.test
+++ b/mysql-test/extra/rpl_tests/rpl_log.test
@@ -125,6 +125,8 @@ show slave status;
--error 1220
show binlog events in 'slave-bin.000005' from 4;
+connection master;
+
# The table drops caused Cluster Replication wrapper to fail as event ID would never be the same.# Moving drops here.
DROP TABLE t1;
@@ -149,3 +151,5 @@ drop table t1;
# End of 4.1 tests
+sync_with_master;
+
diff --git a/mysql-test/extra/rpl_tests/rpl_row_UUID.test b/mysql-test/extra/rpl_tests/rpl_row_UUID.test
index 962572d3aec..b3fa2fabe2c 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_UUID.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_UUID.test
@@ -72,7 +72,7 @@ DROP TABLE test.t2;
# will be created. You will need to go to the mysql-test dir and diff
# the files your self to see what is not matching :-)
---exec diff $MYSQLTEST_VARDIR/tmp/rpl_row_UUID_master.sql $MYSQLTEST_VARDIR/tmp/rpl_row_UUID_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/rpl_row_UUID_master.sql $MYSQLTEST_VARDIR/tmp/rpl_row_UUID_slave.sql;
# Cleanup dump files.
# Long-term "system rm" is not portable; we could live without
diff --git a/mysql-test/extra/rpl_tests/rpl_row_blob.test b/mysql-test/extra/rpl_tests/rpl_row_blob.test
index 75a2dc2cf9e..2dc6867df32 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_blob.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_blob.test
@@ -179,7 +179,7 @@ connection master;
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_row_blob_master.sql
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/rpl_row_blob_slave.sql
---exec diff $MYSQLTEST_VARDIR/tmp/rpl_row_blob_master.sql $MYSQLTEST_VARDIR/tmp/rpl_row_blob_slave.sql
+diff_files $MYSQLTEST_VARDIR/tmp/rpl_row_blob_master.sql $MYSQLTEST_VARDIR/tmp/rpl_row_blob_slave.sql;
DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2;
diff --git a/mysql-test/extra/rpl_tests/rpl_row_func003.test b/mysql-test/extra/rpl_tests/rpl_row_func003.test
index 153a03da2e7..662f1454096 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_func003.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_func003.test
@@ -80,7 +80,7 @@ SET AUTOCOMMIT=1;
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func003_master.sql
--exec $MYSQL_DUMP_SLAVE --compact --order-by-primary --skip-extended-insert --no-create-info test > $MYSQLTEST_VARDIR/tmp/func003_slave.sql
-# First lets cleanupi
+# First lets cleanup
DROP FUNCTION test.f1;
DROP TABLE test.t1;
@@ -90,7 +90,7 @@ DROP TABLE test.t1;
# the files yourself to see what is not matching :-) File are located
# in $MYSQLTEST_VARDIR/tmp
-exec diff $MYSQLTEST_VARDIR/tmp/func003_master.sql $MYSQLTEST_VARDIR/tmp/func003_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/func003_master.sql $MYSQLTEST_VARDIR/tmp/func003_slave.sql;
# End of 5.0 test case
diff --git a/mysql-test/extra/rpl_tests/rpl_row_sp006.test b/mysql-test/extra/rpl_tests/rpl_row_sp006.test
index 25073e54991..da9206d7d3f 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_sp006.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_sp006.test
@@ -84,7 +84,7 @@ DROP DATABASE mysqltest1;
# the files your self to see what is not matching :-) Failed test
# Dump files will be located in $MYSQLTEST_VARDIR/tmp.
-exec diff $MYSQLTEST_VARDIR/tmp/sp006_master.sql $MYSQLTEST_VARDIR/tmp/sp006_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/sp006_master.sql $MYSQLTEST_VARDIR/tmp/sp006_slave.sql;
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 c50a5613386..0cf43d45348 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
@@ -12,6 +12,7 @@ DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t9;
--enable_warnings
sync_slave_with_master;
STOP SLAVE;
+SET @my_sql_mode= @@global.sql_mode;
SET GLOBAL SQL_MODE='STRICT_ALL_TABLES';
START SLAVE;
@@ -238,3 +239,6 @@ DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef;
DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9;
--enable_warnings
sync_slave_with_master;
+
+# Restore sql_mode
+SET @@global.sql_mode= @my_sql_mode;
diff --git a/mysql-test/include/add_anonymous_users.inc b/mysql-test/include/add_anonymous_users.inc
new file mode 100644
index 00000000000..a59aa971d59
--- /dev/null
+++ b/mysql-test/include/add_anonymous_users.inc
@@ -0,0 +1,7 @@
+# Allow anonymous users to connect
+disable_warnings;
+disable_query_log;
+INSERT INTO mysql.user (host, user) VALUES ('localhost','');
+FLUSH PRIVILEGES;
+enable_query_log;
+enable_warnings;
diff --git a/mysql-test/include/delete_anonymous_users.inc b/mysql-test/include/delete_anonymous_users.inc
new file mode 100644
index 00000000000..9f642223748
--- /dev/null
+++ b/mysql-test/include/delete_anonymous_users.inc
@@ -0,0 +1,5 @@
+# Remove anonymous users added by add_anonymous_users.inc
+disable_query_log;
+DELETE FROM mysql.user where host='localhost' and user='';
+FLUSH PRIVILEGES;
+enable_query_log;
diff --git a/mysql-test/include/get_binlog_dump_thread_id.inc b/mysql-test/include/get_binlog_dump_thread_id.inc
index 830a88b5db6..bfc8506b39e 100644
--- a/mysql-test/include/get_binlog_dump_thread_id.inc
+++ b/mysql-test/include/get_binlog_dump_thread_id.inc
@@ -1,9 +1,22 @@
---exec $MYSQL test -e 'show processlist' | grep 'Binlog Dump' | cut -f1 > $MYSQLTEST_VARDIR/tmp/bl_dump_thread_id
+--exec $MYSQL test -e "show processlist" > $MYSQLTEST_VARDIR/tmp/bl_dump_thread_id
--disable_warnings
drop table if exists t999;
--enable_warnings
-create temporary table t999 (f int);
+# Create a table to hold the process list
+create temporary table t999(
+ id int,
+ user char(255),
+ host char(255),
+ db char(255),
+ Command char(255),
+ time int,
+ State char(255),
+ info char(255)
+);
+# Load processlist into table, headers will create seom warnings
+--disable_warnings
--replace_result $MYSQLTEST_VARDIR "."
eval LOAD DATA INFILE "$MYSQLTEST_VARDIR/tmp/bl_dump_thread_id" into table t999;
-let $id = `select f from t999`;
+--enable_warnings
+let $id = `select Id from t999 where Command="Binlog Dump"`;
drop table t999;
diff --git a/mysql-test/include/gis_generic.inc b/mysql-test/include/gis_generic.inc
index 3abc18283fa..e3b716953c3 100644
--- a/mysql-test/include/gis_generic.inc
+++ b/mysql-test/include/gis_generic.inc
@@ -166,14 +166,14 @@ insert IGNORE into t1 (a) values ('Garbage');
drop table t1;
-create table t1 (pk integer primary key auto_increment, fl geometry);
+create table t1 (pk integer primary key auto_increment, fl geometry not null);
--error 1416
insert into t1 (fl) values (1);
--error 1416
insert into t1 (fl) values (1.11);
--error 1416
insert into t1 (fl) values ("qwerty");
---error 1416
+--error 1048
insert into t1 (fl) values (pointfromtext('point(1,1)'));
drop table t1;
diff --git a/mysql-test/include/mix2.inc b/mysql-test/include/mix2.inc
index 9bbf2dc0be4..76666cb7bc0 100644
--- a/mysql-test/include/mix2.inc
+++ b/mysql-test/include/mix2.inc
@@ -1770,139 +1770,6 @@ disconnect a;
disconnect b;
}
-#
-# BUG 14056 Column prefix index on UTF-8 primary key column causes: Can't find record..
-#
-
-eval create table t1 (
- a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = $engine_type;
-eval create table t2 (
- a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = $engine_type;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
-insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
-insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-select a,hex(b),hex(c),filler from t2 order by filler;
-drop table t1;
-drop table t2;
-
-eval create table t1 (
- a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = $engine_type;
-eval create table t2 (
- a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = $engine_type;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
-insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
-insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-select a,hex(b),hex(c),filler from t2 order by filler;
-drop table t1;
-drop table t2;
-
-eval create table t1 (
- a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = $engine_type;
-eval create table t2 (
- a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = $engine_type;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
-insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
-insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-select a,hex(b),hex(c),filler from t2 order by filler;
-drop table t1;
-drop table t2;
-
-eval create table t1 (
- a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = $engine_type;
-eval create table t2 (
- a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = $engine_type;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-select a,hex(b),hex(c),filler from t2 order by filler;
-drop table t1;
-drop table t2;
-commit;
-
# tests for bugs #9802 and #13778
if ($test_foreign_keys)
@@ -2099,95 +1966,6 @@ drop table t2,t1;
}
# End FOREIGN KEY tests
-#
-# Test cases for bug #15308 Problem of Order with Enum Column in Primary Key
-#
-eval CREATE TABLE t1 (
- ind enum('0','1','2') NOT NULL default '0',
- string1 varchar(250) NOT NULL,
- PRIMARY KEY (ind)
-) ENGINE=$engine_type DEFAULT CHARSET=utf8;
-eval CREATE TABLE t2 (
- ind enum('0','1','2') NOT NULL default '0',
- string1 varchar(250) NOT NULL,
- PRIMARY KEY (ind)
-) ENGINE=$engine_type DEFAULT CHARSET=ucs2;
-
-INSERT INTO t1 VALUES ('1', ''),('2', '');
-INSERT INTO t2 VALUES ('1', ''),('2', '');
-SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
-SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
-drop table t1,t2;
-
-eval CREATE TABLE t1 (
- ind set('0','1','2') NOT NULL default '0',
- string1 varchar(250) NOT NULL,
- PRIMARY KEY (ind)
-) ENGINE=$engine_type DEFAULT CHARSET=utf8;
-eval CREATE TABLE t2 (
- ind set('0','1','2') NOT NULL default '0',
- string1 varchar(250) NOT NULL,
- PRIMARY KEY (ind)
-) ENGINE=$engine_type DEFAULT CHARSET=ucs2;
-
-INSERT INTO t1 VALUES ('1', ''),('2', '');
-INSERT INTO t2 VALUES ('1', ''),('2', '');
-SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
-SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
-drop table t1,t2;
-
-eval CREATE TABLE t1 (
- ind bit not null,
- string1 varchar(250) NOT NULL,
- PRIMARY KEY (ind)
-) ENGINE=$engine_type DEFAULT CHARSET=utf8;
-eval CREATE TABLE t2 (
- ind bit not null,
- string1 varchar(250) NOT NULL,
- PRIMARY KEY (ind)
-) ENGINE=$engine_type DEFAULT CHARSET=ucs2;
-insert into t1 values(0,''),(1,'');
-insert into t2 values(0,''),(1,'');
-select hex(ind),hex(string1) from t1 order by string1;
-select hex(ind),hex(string1) from t2 order by string1;
-drop table t1,t2;
-
-# tests for bug #14056 Column prefix index on UTF-8 primary key column causes 'Can't find record..'
-
-eval create table t2 (
- a int, b char(10), filler char(10), primary key(a, b(2))
-) character set utf8 engine = $engine_type;
-
-insert into t2 values (1,'abcdefg','one');
-insert into t2 values (2,'ijkilmn','two');
-insert into t2 values (3, 'qrstuvw','three');
-update t2 set a=5, filler='booo' where a=1;
-drop table t2;
-eval create table t2 (
- a int, b char(10), filler char(10), primary key(a, b(2))
-) character set ucs2 engine = $engine_type;
-
-insert into t2 values (1,'abcdefg','one');
-insert into t2 values (2,'ijkilmn','two');
-insert into t2 values (3, 'qrstuvw','three');
-update t2 set a=5, filler='booo' where a=1;
-drop table t2;
-
-eval create table t1(a int not null, b char(110),primary key(a,b(100))) engine=$engine_type default charset=utf8;
-insert into t1 values(1,'abcdefg'),(2,'defghijk');
-insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
-insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
-select a,hex(b) from t1 order by b;
-update t1 set b = 'three' where a = 6;
-drop table t1;
-eval create table t1(a int not null, b text(110),primary key(a,b(100))) engine=$engine_type default charset=utf8;
-insert into t1 values(1,'abcdefg'),(2,'defghijk');
-insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
-insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
-select a,hex(b) from t1 order by b;
-update t1 set b = 'three' where a = 6;
-drop table t1;
-
if ($test_foreign_keys)
{
# Ensure that <tablename>_ibfk_0 is not mistreated as a
diff --git a/mysql-test/include/mix2_ucs2.inc b/mysql-test/include/mix2_ucs2.inc
new file mode 100644
index 00000000000..418bc7aad74
--- /dev/null
+++ b/mysql-test/include/mix2_ucs2.inc
@@ -0,0 +1,228 @@
+#
+# Tests from mix2.inc which require ucs2 character sets should go here
+#
+
+#
+# BUG 14056 Column prefix index on UTF-8 primary key column causes: Can't find record..
+#
+
+eval create table t1 (
+ a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = $engine_type;
+eval create table t2 (
+ a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = $engine_type;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+select a,hex(b),hex(c),filler from t2 order by filler;
+drop table t1;
+drop table t2;
+
+eval create table t1 (
+ a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = $engine_type;
+eval create table t2 (
+ a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = $engine_type;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+
+
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+select a,hex(b),hex(c),filler from t2 order by filler;
+drop table t1;
+drop table t2;
+
+eval create table t1 (
+ a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = $engine_type;
+eval create table t2 (
+ a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = $engine_type;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+select a,hex(b),hex(c),filler from t2 order by filler;
+drop table t1;
+drop table t2;
+
+eval create table t1 (
+ a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = $engine_type;
+eval create table t2 (
+ a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = $engine_type;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+select a,hex(b),hex(c),filler from t2 order by filler;
+drop table t1;
+drop table t2;
+commit;
+
+#
+# Test cases for bug #15308 Problem of Order with Enum Column in Primary Key
+#
+eval CREATE TABLE t1 (
+ ind enum('0','1','2') NOT NULL default '0',
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=$engine_type DEFAULT CHARSET=utf8;
+eval CREATE TABLE t2 (
+ ind enum('0','1','2') NOT NULL default '0',
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=$engine_type DEFAULT CHARSET=ucs2;
+
+INSERT INTO t1 VALUES ('1', ''),('2', '');
+INSERT INTO t2 VALUES ('1', ''),('2', '');
+SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
+SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
+drop table t1,t2;
+
+eval CREATE TABLE t1 (
+ ind set('0','1','2') NOT NULL default '0',
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=$engine_type DEFAULT CHARSET=utf8;
+eval CREATE TABLE t2 (
+ ind set('0','1','2') NOT NULL default '0',
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=$engine_type DEFAULT CHARSET=ucs2;
+
+INSERT INTO t1 VALUES ('1', ''),('2', '');
+INSERT INTO t2 VALUES ('1', ''),('2', '');
+SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
+SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
+drop table t1,t2;
+
+eval CREATE TABLE t1 (
+ ind bit not null,
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=$engine_type DEFAULT CHARSET=utf8;
+eval CREATE TABLE t2 (
+ ind bit not null,
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=$engine_type DEFAULT CHARSET=ucs2;
+insert into t1 values(0,''),(1,'');
+insert into t2 values(0,''),(1,'');
+select hex(ind),hex(string1) from t1 order by string1;
+select hex(ind),hex(string1) from t2 order by string1;
+drop table t1,t2;
+
+# tests for bug #14056 Column prefix index on UTF-8 primary key column causes 'Can't find record..'
+
+eval create table t2 (
+ a int, b char(10), filler char(10), primary key(a, b(2))
+) character set utf8 engine = $engine_type;
+
+insert into t2 values (1,'abcdefg','one');
+insert into t2 values (2,'ijkilmn','two');
+insert into t2 values (3, 'qrstuvw','three');
+update t2 set a=5, filler='booo' where a=1;
+drop table t2;
+eval create table t2 (
+ a int, b char(10), filler char(10), primary key(a, b(2))
+) character set ucs2 engine = $engine_type;
+
+insert into t2 values (1,'abcdefg','one');
+insert into t2 values (2,'ijkilmn','two');
+insert into t2 values (3, 'qrstuvw','three');
+update t2 set a=5, filler='booo' where a=1;
+drop table t2;
+
+eval create table t1(a int not null, b char(110),primary key(a,b(100))) engine=$engine_type default charset=utf8;
+insert into t1 values(1,'abcdefg'),(2,'defghijk');
+insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
+insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
+select a,hex(b) from t1 order by b;
+update t1 set b = 'three' where a = 6;
+drop table t1;
+eval create table t1(a int not null, b text(110),primary key(a,b(100))) engine=$engine_type default charset=utf8;
+insert into t1 values(1,'abcdefg'),(2,'defghijk');
+insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
+insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
+select a,hex(b) from t1 order by b;
+update t1 set b = 'three' where a = 6;
+drop table t1;
+
diff --git a/mysql-test/include/ps_conv.inc b/mysql-test/include/ps_conv.inc
index 0dd819f6e62..09290d760ce 100644
--- a/mysql-test/include/ps_conv.inc
+++ b/mysql-test/include/ps_conv.inc
@@ -1152,19 +1152,19 @@ select '-- select .. where date/time column = .. --' as test_sequence ;
######## SELECT .. WHERE column(date/time/..)=value(CHAR(n)/LONGTEXT) ########
set @arg00= '1991-01-01 01:01:01' ;
select 'true' as found from t9
-where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01' ;
select 'true' as found from t9
-where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01'" ;
execute stmt1 ;
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
@@ -1177,7 +1177,7 @@ where c1= 20 and c13= CAST('1991-01-01 01:01:01' as datetime) and
c16= CAST('1991-01-01 01:01:01' as datetime) and
c17= CAST('1991-01-01 01:01:01' as datetime) ;
select 'true' as found from t9
-where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
prepare stmt1 from "select 'true' as found from t9
where c1= 20 and c13= CAST('1991-01-01 01:01:01' as datetime) and
@@ -1187,7 +1187,7 @@ where c1= 20 and c13= CAST('1991-01-01 01:01:01' as datetime) and
c17= CAST('1991-01-01 01:01:01' as datetime)" ;
execute stmt1 ;
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
diff --git a/mysql-test/lib/init_db.sql b/mysql-test/lib/init_db.sql
deleted file mode 100644
index c6c0f1d81dd..00000000000
--- a/mysql-test/lib/init_db.sql
+++ /dev/null
@@ -1,651 +0,0 @@
-use mysql;
-set table_type=myisam;
-
-CREATE TABLE db (
- Host char(60) binary DEFAULT '' NOT NULL,
- Db char(64) binary DEFAULT '' NOT NULL,
- User char(16) binary DEFAULT '' NOT NULL,
- Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- PRIMARY KEY Host (Host,Db,User),
- KEY User (User)
-) engine=MyISAM
-CHARACTER SET utf8 COLLATE utf8_bin
-comment='Database privileges';
-
-
-INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
-INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
-
-
-CREATE TABLE host (
- Host char(60) binary DEFAULT '' NOT NULL,
- Db char(64) binary DEFAULT '' NOT NULL,
- Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- PRIMARY KEY Host (Host,Db)
-) engine=MyISAM
-CHARACTER SET utf8 COLLATE utf8_bin
-comment='Host privileges; Merged with database privileges';
-
-
-CREATE TABLE user (
- Host char(60) binary DEFAULT '' NOT NULL,
- User char(16) binary DEFAULT '' NOT NULL,
- Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL,
- Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
- ssl_cipher BLOB NOT NULL,
- x509_issuer BLOB NOT NULL,
- x509_subject BLOB NOT NULL,
- max_questions int(11) unsigned DEFAULT 0 NOT NULL,
- max_updates int(11) unsigned DEFAULT 0 NOT NULL,
- max_connections int(11) unsigned DEFAULT 0 NOT NULL,
- max_user_connections int(11) unsigned DEFAULT 0 NOT NULL,
- PRIMARY KEY Host (Host,User)
-) engine=MyISAM
-CHARACTER SET utf8 COLLATE utf8_bin
-comment='Users and global privileges';
-
-
-INSERT INTO user VALUES ('localhost' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
-INSERT INTO user VALUES ('@HOSTNAME@%' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
-REPLACE INTO user VALUES ('127.0.0.1' ,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
-INSERT INTO user (host,user) VALUES ('localhost','');
-INSERT INTO user (host,user) VALUES ('@HOSTNAME@%','');
-
-CREATE TABLE servers (
- Server_name char(64) NOT NULL DEFAULT '',
- Host char(64) NOT NULL DEFAULT '',
- Db char(64) NOT NULL DEFAULT '',
- Username char(64) NOT NULL DEFAULT '',
- Password char(64) NOT NULL DEFAULT '',
- Port INT(4) NOT NULL DEFAULT '0',
- Socket char(64) NOT NULL DEFAULT '',
- Wrapper char(64) NOT NULL DEFAULT '',
- Owner char(64) NOT NULL DEFAULT '',
- PRIMARY KEY (Server_name))
- CHARACTER SET utf8 comment='MySQL Foreign Servers table';
-
-INSERT INTO servers VALUES ('test','localhost','test','root','', 0,'','mysql','root');
-
-CREATE TABLE func (
- name char(64) binary DEFAULT '' NOT NULL,
- ret tinyint(1) DEFAULT '0' NOT NULL,
- dl char(128) DEFAULT '' NOT NULL,
- type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL,
- PRIMARY KEY (name)
-) engine=MyISAM
-CHARACTER SET utf8 COLLATE utf8_bin
-comment='User defined functions';
-
-
-CREATE TABLE plugin (
- name char(64) binary DEFAULT '' NOT NULL,
- dl char(128) DEFAULT '' NOT NULL,
- PRIMARY KEY (name)
-) engine=MyISAM
-CHARACTER SET utf8 COLLATE utf8_bin
-comment='MySQL plugins';
-
-
-CREATE TABLE tables_priv (
- Host char(60) binary DEFAULT '' NOT NULL,
- Db char(64) binary DEFAULT '' NOT NULL,
- User char(16) binary DEFAULT '' NOT NULL,
- Table_name char(64) binary DEFAULT '' NOT NULL,
- Grantor char(77) DEFAULT '' NOT NULL,
- Timestamp timestamp(14),
- Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
- Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
- PRIMARY KEY (Host,Db,User,Table_name),KEY Grantor (Grantor)
-) engine=MyISAM
-CHARACTER SET utf8 COLLATE utf8_bin
-comment='Table privileges';
-
-
-CREATE TABLE columns_priv (
- Host char(60) binary DEFAULT '' NOT NULL,
- Db char(64) binary DEFAULT '' NOT NULL,
- User char(16) binary DEFAULT '' NOT NULL,
- Table_name char(64) binary DEFAULT '' NOT NULL,
- Column_name char(64) binary DEFAULT '' NOT NULL,
- Timestamp timestamp(14),
- Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
- PRIMARY KEY (Host,Db,User,Table_name,Column_name)
-) engine=MyISAM
-CHARACTER SET utf8 COLLATE utf8_bin
-comment='Column privileges';
-
-
-CREATE TABLE help_topic (
- help_topic_id int unsigned not null,
- name char(64) not null,
- help_category_id smallint unsigned not null,
- description text not null,
- example text not null,
- url char(128) not null,
- primary key (help_topic_id),
- unique index (name)
-) engine=MyISAM
-CHARACTER SET utf8
-comment='help topics';
-
-
-CREATE TABLE help_category (
- help_category_id smallint unsigned not null,
- name char(64) not null,
- parent_category_id smallint unsigned null,
- url char(128) not null,
- primary key (help_category_id),unique index (name)
-) engine=MyISAM
-CHARACTER SET utf8
-comment='help categories';
-
-
-CREATE TABLE help_keyword (
- help_keyword_id int unsigned not null,
- name char(64) not null,
- primary key (help_keyword_id),unique index (name)
-) engine=MyISAM
-CHARACTER SET utf8
-comment='help keywords';
-
-
-CREATE TABLE help_relation (
- help_topic_id int unsigned not null references help_topic,
- help_keyword_id int unsigned not null references help_keyword,
- primary key (help_keyword_id, help_topic_id)
-) engine=MyISAM
-CHARACTER SET utf8
-comment='keyword-topic relation';
-
-
-CREATE TABLE time_zone_name (
- Name char(64) NOT NULL,
- Time_zone_id int unsigned NOT NULL,
- PRIMARY KEY Name (Name)
-) engine=MyISAM
-CHARACTER SET utf8
-comment='Time zone names';
-
-
-INSERT INTO time_zone_name (Name, Time_Zone_id) VALUES
- ('MET', 1), ('UTC', 2), ('Universal', 2),
- ('Europe/Moscow',3), ('leap/Europe/Moscow',4),
- ('Japan', 5);
-
-
-CREATE TABLE time_zone (
- Time_zone_id int unsigned NOT NULL auto_increment,
- Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
- PRIMARY KEY TzId (Time_zone_id)
-) engine=MyISAM
-CHARACTER SET utf8
-comment='Time zones';
-
-
-INSERT INTO time_zone (Time_zone_id, Use_leap_seconds)
- VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y'), (5,'N');
-
-
-CREATE TABLE time_zone_transition (
- Time_zone_id int unsigned NOT NULL,
- Transition_time bigint signed NOT NULL,
- Transition_type_id int unsigned NOT NULL,
- PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time)
-) engine=MyISAM
-CHARACTER SET utf8
-comment='Time zone transitions';
-
-
-INSERT INTO time_zone_transition
- (Time_zone_id, Transition_time, Transition_type_id)
-VALUES
- (1, -1693706400, 0) ,(1, -1680483600, 1)
- ,(1, -1663455600, 2) ,(1, -1650150000, 3)
- ,(1, -1632006000, 2) ,(1, -1618700400, 3)
- ,(1, -938905200, 2) ,(1, -857257200, 3)
- ,(1, -844556400, 2) ,(1, -828226800, 3)
- ,(1, -812502000, 2) ,(1, -796777200, 3)
- ,(1, 228877200, 2) ,(1, 243997200, 3)
- ,(1, 260326800, 2) ,(1, 276051600, 3)
- ,(1, 291776400, 2) ,(1, 307501200, 3)
- ,(1, 323830800, 2) ,(1, 338950800, 3)
- ,(1, 354675600, 2) ,(1, 370400400, 3)
- ,(1, 386125200, 2) ,(1, 401850000, 3)
- ,(1, 417574800, 2) ,(1, 433299600, 3)
- ,(1, 449024400, 2) ,(1, 465354000, 3)
- ,(1, 481078800, 2) ,(1, 496803600, 3)
- ,(1, 512528400, 2) ,(1, 528253200, 3)
- ,(1, 543978000, 2) ,(1, 559702800, 3)
- ,(1, 575427600, 2) ,(1, 591152400, 3)
- ,(1, 606877200, 2) ,(1, 622602000, 3)
- ,(1, 638326800, 2) ,(1, 654656400, 3)
- ,(1, 670381200, 2) ,(1, 686106000, 3)
- ,(1, 701830800, 2) ,(1, 717555600, 3)
- ,(1, 733280400, 2) ,(1, 749005200, 3)
- ,(1, 764730000, 2) ,(1, 780454800, 3)
- ,(1, 796179600, 2) ,(1, 811904400, 3)
- ,(1, 828234000, 2) ,(1, 846378000, 3)
- ,(1, 859683600, 2) ,(1, 877827600, 3)
- ,(1, 891133200, 2) ,(1, 909277200, 3)
- ,(1, 922582800, 2) ,(1, 941331600, 3)
- ,(1, 954032400, 2) ,(1, 972781200, 3)
- ,(1, 985482000, 2) ,(1, 1004230800, 3)
- ,(1, 1017536400, 2) ,(1, 1035680400, 3)
- ,(1, 1048986000, 2) ,(1, 1067130000, 3)
- ,(1, 1080435600, 2) ,(1, 1099184400, 3)
- ,(1, 1111885200, 2) ,(1, 1130634000, 3)
- ,(1, 1143334800, 2) ,(1, 1162083600, 3)
- ,(1, 1174784400, 2) ,(1, 1193533200, 3)
- ,(1, 1206838800, 2) ,(1, 1224982800, 3)
- ,(1, 1238288400, 2) ,(1, 1256432400, 3)
- ,(1, 1269738000, 2) ,(1, 1288486800, 3)
- ,(1, 1301187600, 2) ,(1, 1319936400, 3)
- ,(1, 1332637200, 2) ,(1, 1351386000, 3)
- ,(1, 1364691600, 2) ,(1, 1382835600, 3)
- ,(1, 1396141200, 2) ,(1, 1414285200, 3)
- ,(1, 1427590800, 2) ,(1, 1445734800, 3)
- ,(1, 1459040400, 2) ,(1, 1477789200, 3)
- ,(1, 1490490000, 2) ,(1, 1509238800, 3)
- ,(1, 1521939600, 2) ,(1, 1540688400, 3)
- ,(1, 1553994000, 2) ,(1, 1572138000, 3)
- ,(1, 1585443600, 2) ,(1, 1603587600, 3)
- ,(1, 1616893200, 2) ,(1, 1635642000, 3)
- ,(1, 1648342800, 2) ,(1, 1667091600, 3)
- ,(1, 1679792400, 2) ,(1, 1698541200, 3)
- ,(1, 1711846800, 2) ,(1, 1729990800, 3)
- ,(1, 1743296400, 2) ,(1, 1761440400, 3)
- ,(1, 1774746000, 2) ,(1, 1792890000, 3)
- ,(1, 1806195600, 2) ,(1, 1824944400, 3)
- ,(1, 1837645200, 2) ,(1, 1856394000, 3)
- ,(1, 1869094800, 2) ,(1, 1887843600, 3)
- ,(1, 1901149200, 2) ,(1, 1919293200, 3)
- ,(1, 1932598800, 2) ,(1, 1950742800, 3)
- ,(1, 1964048400, 2) ,(1, 1982797200, 3)
- ,(1, 1995498000, 2) ,(1, 2014246800, 3)
- ,(1, 2026947600, 2) ,(1, 2045696400, 3)
- ,(1, 2058397200, 2) ,(1, 2077146000, 3)
- ,(1, 2090451600, 2) ,(1, 2108595600, 3)
- ,(1, 2121901200, 2) ,(1, 2140045200, 3)
- ,(3, -1688265000, 2) ,(3, -1656819048, 1)
- ,(3, -1641353448, 2) ,(3, -1627965048, 3)
- ,(3, -1618716648, 1) ,(3, -1596429048, 3)
- ,(3, -1593829848, 5) ,(3, -1589860800, 4)
- ,(3, -1542427200, 5) ,(3, -1539493200, 6)
- ,(3, -1525323600, 5) ,(3, -1522728000, 4)
- ,(3, -1491188400, 7) ,(3, -1247536800, 4)
- ,(3, 354920400, 5) ,(3, 370728000, 4)
- ,(3, 386456400, 5) ,(3, 402264000, 4)
- ,(3, 417992400, 5) ,(3, 433800000, 4)
- ,(3, 449614800, 5) ,(3, 465346800, 8)
- ,(3, 481071600, 9) ,(3, 496796400, 8)
- ,(3, 512521200, 9) ,(3, 528246000, 8)
- ,(3, 543970800, 9) ,(3, 559695600, 8)
- ,(3, 575420400, 9) ,(3, 591145200, 8)
- ,(3, 606870000, 9) ,(3, 622594800, 8)
- ,(3, 638319600, 9) ,(3, 654649200, 8)
- ,(3, 670374000, 10) ,(3, 686102400, 11)
- ,(3, 695779200, 8) ,(3, 701812800, 5)
- ,(3, 717534000, 4) ,(3, 733273200, 9)
- ,(3, 748998000, 8) ,(3, 764722800, 9)
- ,(3, 780447600, 8) ,(3, 796172400, 9)
- ,(3, 811897200, 8) ,(3, 828226800, 9)
- ,(3, 846370800, 8) ,(3, 859676400, 9)
- ,(3, 877820400, 8) ,(3, 891126000, 9)
- ,(3, 909270000, 8) ,(3, 922575600, 9)
- ,(3, 941324400, 8) ,(3, 954025200, 9)
- ,(3, 972774000, 8) ,(3, 985474800, 9)
- ,(3, 1004223600, 8) ,(3, 1017529200, 9)
- ,(3, 1035673200, 8) ,(3, 1048978800, 9)
- ,(3, 1067122800, 8) ,(3, 1080428400, 9)
- ,(3, 1099177200, 8) ,(3, 1111878000, 9)
- ,(3, 1130626800, 8) ,(3, 1143327600, 9)
- ,(3, 1162076400, 8) ,(3, 1174777200, 9)
- ,(3, 1193526000, 8) ,(3, 1206831600, 9)
- ,(3, 1224975600, 8) ,(3, 1238281200, 9)
- ,(3, 1256425200, 8) ,(3, 1269730800, 9)
- ,(3, 1288479600, 8) ,(3, 1301180400, 9)
- ,(3, 1319929200, 8) ,(3, 1332630000, 9)
- ,(3, 1351378800, 8) ,(3, 1364684400, 9)
- ,(3, 1382828400, 8) ,(3, 1396134000, 9)
- ,(3, 1414278000, 8) ,(3, 1427583600, 9)
- ,(3, 1445727600, 8) ,(3, 1459033200, 9)
- ,(3, 1477782000, 8) ,(3, 1490482800, 9)
- ,(3, 1509231600, 8) ,(3, 1521932400, 9)
- ,(3, 1540681200, 8) ,(3, 1553986800, 9)
- ,(3, 1572130800, 8) ,(3, 1585436400, 9)
- ,(3, 1603580400, 8) ,(3, 1616886000, 9)
- ,(3, 1635634800, 8) ,(3, 1648335600, 9)
- ,(3, 1667084400, 8) ,(3, 1679785200, 9)
- ,(3, 1698534000, 8) ,(3, 1711839600, 9)
- ,(3, 1729983600, 8) ,(3, 1743289200, 9)
- ,(3, 1761433200, 8) ,(3, 1774738800, 9)
- ,(3, 1792882800, 8) ,(3, 1806188400, 9)
- ,(3, 1824937200, 8) ,(3, 1837638000, 9)
- ,(3, 1856386800, 8) ,(3, 1869087600, 9)
- ,(3, 1887836400, 8) ,(3, 1901142000, 9)
- ,(3, 1919286000, 8) ,(3, 1932591600, 9)
- ,(3, 1950735600, 8) ,(3, 1964041200, 9)
- ,(3, 1982790000, 8) ,(3, 1995490800, 9)
- ,(3, 2014239600, 8) ,(3, 2026940400, 9)
- ,(3, 2045689200, 8) ,(3, 2058390000, 9)
- ,(3, 2077138800, 8) ,(3, 2090444400, 9)
- ,(3, 2108588400, 8) ,(3, 2121894000, 9)
- ,(3, 2140038000, 8)
- ,(4, -1688265000, 2) ,(4, -1656819048, 1)
- ,(4, -1641353448, 2) ,(4, -1627965048, 3)
- ,(4, -1618716648, 1) ,(4, -1596429048, 3)
- ,(4, -1593829848, 5) ,(4, -1589860800, 4)
- ,(4, -1542427200, 5) ,(4, -1539493200, 6)
- ,(4, -1525323600, 5) ,(4, -1522728000, 4)
- ,(4, -1491188400, 7) ,(4, -1247536800, 4)
- ,(4, 354920409, 5) ,(4, 370728010, 4)
- ,(4, 386456410, 5) ,(4, 402264011, 4)
- ,(4, 417992411, 5) ,(4, 433800012, 4)
- ,(4, 449614812, 5) ,(4, 465346812, 8)
- ,(4, 481071612, 9) ,(4, 496796413, 8)
- ,(4, 512521213, 9) ,(4, 528246013, 8)
- ,(4, 543970813, 9) ,(4, 559695613, 8)
- ,(4, 575420414, 9) ,(4, 591145214, 8)
- ,(4, 606870014, 9) ,(4, 622594814, 8)
- ,(4, 638319615, 9) ,(4, 654649215, 8)
- ,(4, 670374016, 10) ,(4, 686102416, 11)
- ,(4, 695779216, 8) ,(4, 701812816, 5)
- ,(4, 717534017, 4) ,(4, 733273217, 9)
- ,(4, 748998018, 8) ,(4, 764722818, 9)
- ,(4, 780447619, 8) ,(4, 796172419, 9)
- ,(4, 811897219, 8) ,(4, 828226820, 9)
- ,(4, 846370820, 8) ,(4, 859676420, 9)
- ,(4, 877820421, 8) ,(4, 891126021, 9)
- ,(4, 909270021, 8) ,(4, 922575622, 9)
- ,(4, 941324422, 8) ,(4, 954025222, 9)
- ,(4, 972774022, 8) ,(4, 985474822, 9)
- ,(4, 1004223622, 8) ,(4, 1017529222, 9)
- ,(4, 1035673222, 8) ,(4, 1048978822, 9)
- ,(4, 1067122822, 8) ,(4, 1080428422, 9)
- ,(4, 1099177222, 8) ,(4, 1111878022, 9)
- ,(4, 1130626822, 8) ,(4, 1143327622, 9)
- ,(4, 1162076422, 8) ,(4, 1174777222, 9)
- ,(4, 1193526022, 8) ,(4, 1206831622, 9)
- ,(4, 1224975622, 8) ,(4, 1238281222, 9)
- ,(4, 1256425222, 8) ,(4, 1269730822, 9)
- ,(4, 1288479622, 8) ,(4, 1301180422, 9)
- ,(4, 1319929222, 8) ,(4, 1332630022, 9)
- ,(4, 1351378822, 8) ,(4, 1364684422, 9)
- ,(4, 1382828422, 8) ,(4, 1396134022, 9)
- ,(4, 1414278022, 8) ,(4, 1427583622, 9)
- ,(4, 1445727622, 8) ,(4, 1459033222, 9)
- ,(4, 1477782022, 8) ,(4, 1490482822, 9)
- ,(4, 1509231622, 8) ,(4, 1521932422, 9)
- ,(4, 1540681222, 8) ,(4, 1553986822, 9)
- ,(4, 1572130822, 8) ,(4, 1585436422, 9)
- ,(4, 1603580422, 8) ,(4, 1616886022, 9)
- ,(4, 1635634822, 8) ,(4, 1648335622, 9)
- ,(4, 1667084422, 8) ,(4, 1679785222, 9)
- ,(4, 1698534022, 8) ,(4, 1711839622, 9)
- ,(4, 1729983622, 8) ,(4, 1743289222, 9)
- ,(4, 1761433222, 8) ,(4, 1774738822, 9)
- ,(4, 1792882822, 8) ,(4, 1806188422, 9)
- ,(4, 1824937222, 8) ,(4, 1837638022, 9)
- ,(4, 1856386822, 8) ,(4, 1869087622, 9)
- ,(4, 1887836422, 8) ,(4, 1901142022, 9)
- ,(4, 1919286022, 8) ,(4, 1932591622, 9)
- ,(4, 1950735622, 8) ,(4, 1964041222, 9)
- ,(4, 1982790022, 8) ,(4, 1995490822, 9)
- ,(4, 2014239622, 8) ,(4, 2026940422, 9)
- ,(4, 2045689222, 8) ,(4, 2058390022, 9)
- ,(4, 2077138822, 8) ,(4, 2090444422, 9)
- ,(4, 2108588422, 8) ,(4, 2121894022, 9)
- ,(4, 2140038022, 8)
- ,(5, -1009875600, 1);
-
-
-CREATE TABLE time_zone_transition_type (
- Time_zone_id int unsigned NOT NULL,
- Transition_type_id int unsigned NOT NULL,
- Offset int signed DEFAULT 0 NOT NULL,
- Is_DST tinyint unsigned DEFAULT 0 NOT NULL,
- Abbreviation char(8) DEFAULT '' NOT NULL,
- PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id)
-) engine=MyISAM
-CHARACTER SET utf8
-comment='Time zone transition types';
-
-
-INSERT INTO time_zone_transition_type (
- Time_zone_id,Transition_type_id, Offset, Is_DST, Abbreviation) VALUES
- (1, 0, 7200, 1, 'MEST') ,(1, 1, 3600, 0, 'MET')
- ,(1, 2, 7200, 1, 'MEST') ,(1, 3, 3600, 0, 'MET')
- ,(2, 0, 0, 0, 'UTC')
- ,(3, 0, 9000, 0, 'MMT') ,(3, 1, 12648, 1, 'MST')
- ,(3, 2, 9048, 0, 'MMT') ,(3, 3, 16248, 1, 'MDST')
- ,(3, 4, 10800, 0, 'MSK') ,(3, 5, 14400, 1, 'MSD')
- ,(3, 6, 18000, 1, 'MSD') ,(3, 7, 7200, 0, 'EET')
- ,(3, 8, 10800, 0, 'MSK') ,(3, 9, 14400, 1, 'MSD')
- ,(3, 10, 10800, 1, 'EEST') ,(3, 11, 7200, 0, 'EET')
- ,(4, 0, 9000, 0, 'MMT') ,(4, 1, 12648, 1, 'MST')
- ,(4, 2, 9048, 0, 'MMT') ,(4, 3, 16248, 1, 'MDST')
- ,(4, 4, 10800, 0, 'MSK') ,(4, 5, 14400, 1, 'MSD')
- ,(4, 6, 18000, 1, 'MSD') ,(4, 7, 7200, 0, 'EET')
- ,(4, 8, 10800, 0, 'MSK') ,(4, 9, 14400, 1, 'MSD')
- ,(4, 10, 10800, 1, 'EEST') ,(4, 11, 7200, 0, 'EET')
- ,(5, 0, 32400, 0, 'CJT') ,(5, 1, 32400, 0, 'JST');
-
-
-CREATE TABLE time_zone_leap_second (
- Transition_time bigint signed NOT NULL,
- Correction int signed NOT NULL,
- PRIMARY KEY TranTime (Transition_time)
-) engine=MyISAM
-CHARACTER SET utf8
-comment='Leap seconds information for time zones';
-
-
-INSERT INTO time_zone_leap_second (
- Transition_time, Correction) VALUES
- (78796800, 1) ,(94694401, 2) ,(126230402, 3)
- ,(157766403, 4) ,(189302404, 5) ,(220924805, 6)
- ,(252460806, 7) ,(283996807, 8) ,(315532808, 9)
- ,(362793609, 10) ,(394329610, 11) ,(425865611, 12)
- ,(489024012, 13) ,(567993613, 14) ,(631152014, 15)
- ,(662688015, 16) ,(709948816, 17) ,(741484817, 18)
- ,(773020818, 19) ,(820454419, 20) ,(867715220, 21)
- ,(915148821, 22);
-
-
-CREATE TABLE procs_priv (
- Host char(60) binary DEFAULT '' NOT NULL,
- Db char(64) binary DEFAULT '' NOT NULL,
- User char(16) binary DEFAULT '' NOT NULL,
- Routine_name char(64) binary DEFAULT '' NOT NULL,
- Routine_type enum('FUNCTION','PROCEDURE') NOT NULL,
- Grantor char(77) DEFAULT '' NOT NULL,
- Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
- Timestamp timestamp(14),
- PRIMARY KEY (Host,Db,User,Routine_name,Routine_type),
- KEY Grantor (Grantor)
-) engine=MyISAM
-CHARACTER SET utf8 COLLATE utf8_bin
-comment='Procedure privileges';
-
-
-CREATE TABLE proc (
- db char(64) collate utf8_bin DEFAULT '' NOT NULL,
- name char(64) DEFAULT '' NOT NULL,
- type enum('FUNCTION','PROCEDURE') NOT NULL,
- specific_name char(64) DEFAULT '' NOT NULL,
- language enum('SQL') DEFAULT 'SQL' NOT NULL,
- sql_data_access enum('CONTAINS_SQL',
- 'NO_SQL',
- 'READS_SQL_DATA',
- 'MODIFIES_SQL_DATA'
- ) DEFAULT 'CONTAINS_SQL' NOT NULL,
- is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL,
- security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL,
- param_list blob DEFAULT '' NOT NULL,
- returns char(64) DEFAULT '' NOT NULL,
- body longblob DEFAULT '' NOT NULL,
- definer char(77) collate utf8_bin DEFAULT '' NOT NULL,
- created timestamp,
- modified timestamp,
- sql_mode set(
- 'REAL_AS_FLOAT',
- 'PIPES_AS_CONCAT',
- 'ANSI_QUOTES',
- 'IGNORE_SPACE',
- 'NOT_USED',
- 'ONLY_FULL_GROUP_BY',
- 'NO_UNSIGNED_SUBTRACTION',
- 'NO_DIR_IN_CREATE',
- 'POSTGRESQL',
- 'ORACLE',
- 'MSSQL',
- 'DB2',
- 'MAXDB',
- 'NO_KEY_OPTIONS',
- 'NO_TABLE_OPTIONS',
- 'NO_FIELD_OPTIONS',
- 'MYSQL323',
- 'MYSQL40',
- 'ANSI',
- 'NO_AUTO_VALUE_ON_ZERO',
- 'NO_BACKSLASH_ESCAPES',
- 'STRICT_TRANS_TABLES',
- 'STRICT_ALL_TABLES',
- 'NO_ZERO_IN_DATE',
- 'NO_ZERO_DATE',
- 'INVALID_DATES',
- 'ERROR_FOR_DIVISION_BY_ZERO',
- 'TRADITIONAL',
- 'NO_AUTO_CREATE_USER',
- 'HIGH_NOT_PRECEDENCE'
- ) DEFAULT '' NOT NULL,
- comment char(64) collate utf8_bin DEFAULT '' NOT NULL,
- PRIMARY KEY (db,name,type)
-) character set utf8 comment='Stored Procedures';
-
-
-CREATE PROCEDURE create_log_tables() BEGIN DECLARE is_csv_enabled int DEFAULT 0; SELECT @@have_csv = 'YES' INTO is_csv_enabled; IF (is_csv_enabled) THEN CREATE TABLE general_log (event_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT, thread_id INTEGER, server_id INTEGER, command_type VARCHAR(64), argument MEDIUMTEXT) engine=CSV CHARACTER SET utf8 comment='General log'; CREATE TABLE slow_log (start_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT NOT NULL, query_time TIME NOT NULL, lock_time TIME NOT NULL, rows_sent INTEGER NOT NULL, rows_examined INTEGER NOT NULL, db VARCHAR(512), last_insert_id INTEGER, insert_id INTEGER, server_id INTEGER, sql_text MEDIUMTEXT NOT NULL) engine=CSV CHARACTER SET utf8 comment='Slow log'; END IF; END;
-CALL create_log_tables();
-DROP PROCEDURE create_log_tables;
-
-CREATE TABLE event (
- db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
- name char(64) CHARACTER SET utf8 NOT NULL default '',
- body longblob NOT NULL,
- definer char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
- execute_at DATETIME default NULL,
- interval_value int(11) default NULL,
- interval_field ENUM('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK',
- 'SECOND','MICROSECOND', 'YEAR_MONTH','DAY_HOUR',
- 'DAY_MINUTE','DAY_SECOND',
- 'HOUR_MINUTE','HOUR_SECOND',
- 'MINUTE_SECOND','DAY_MICROSECOND',
- 'HOUR_MICROSECOND','MINUTE_MICROSECOND',
- 'SECOND_MICROSECOND') default NULL,
- created TIMESTAMP NOT NULL,
- modified TIMESTAMP NOT NULL,
- last_executed DATETIME default NULL,
- starts DATETIME default NULL,
- ends DATETIME default NULL,
- status ENUM('ENABLED','DISABLED') NOT NULL default 'ENABLED',
- on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP',
- sql_mode set(
- 'REAL_AS_FLOAT',
- 'PIPES_AS_CONCAT',
- 'ANSI_QUOTES',
- 'IGNORE_SPACE',
- 'NOT_USED',
- 'ONLY_FULL_GROUP_BY',
- 'NO_UNSIGNED_SUBTRACTION',
- 'NO_DIR_IN_CREATE',
- 'POSTGRESQL',
- 'ORACLE',
- 'MSSQL',
- 'DB2',
- 'MAXDB',
- 'NO_KEY_OPTIONS',
- 'NO_TABLE_OPTIONS',
- 'NO_FIELD_OPTIONS',
- 'MYSQL323',
- 'MYSQL40',
- 'ANSI',
- 'NO_AUTO_VALUE_ON_ZERO',
- 'NO_BACKSLASH_ESCAPES',
- 'STRICT_TRANS_TABLES',
- 'STRICT_ALL_TABLES',
- 'NO_ZERO_IN_DATE',
- 'NO_ZERO_DATE',
- 'INVALID_DATES',
- 'ERROR_FOR_DIVISION_BY_ZERO',
- 'TRADITIONAL',
- 'NO_AUTO_CREATE_USER',
- 'HIGH_NOT_PRECEDENCE'
- ) DEFAULT '' NOT NULL,
- comment char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',
- PRIMARY KEY (db, name)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';
-
-CREATE TABLE IF NOT EXISTS mysql.ndb_binlog_index (Position BIGINT UNSIGNED NOT NULL, File VARCHAR(255) NOT NULL, epoch BIGINT UNSIGNED NOT NULL, inserts BIGINT UNSIGNED NOT NULL, updates BIGINT UNSIGNED NOT NULL, deletes BIGINT UNSIGNED NOT NULL, schemaops BIGINT UNSIGNED NOT NULL, PRIMARY KEY(epoch)) ENGINE=MYISAM;
diff --git a/mysql-test/lib/mtr_misc.pl b/mysql-test/lib/mtr_misc.pl
index 97b0a6fc131..40d74f8da55 100644
--- a/mysql-test/lib/mtr_misc.pl
+++ b/mysql-test/lib/mtr_misc.pl
@@ -22,6 +22,7 @@ use strict;
sub mtr_full_hostname ();
sub mtr_short_hostname ();
+sub mtr_native_path($);
sub mtr_init_args ($);
sub mtr_add_arg ($$@);
sub mtr_path_exists(@);
@@ -63,6 +64,16 @@ sub mtr_short_hostname () {
return $hostname;
}
+# Convert path to OS native format
+sub mtr_native_path($)
+{
+ my $path= shift;
+ $path=~ s/\//\\/g
+ if ($::glob_win32);
+ return $path;
+}
+
+
# FIXME move to own lib
sub mtr_init_args ($) {
diff --git a/mysql-test/lib/mtr_process.pl b/mysql-test/lib/mtr_process.pl
index f63009cd24c..690ca8313dd 100644
--- a/mysql-test/lib/mtr_process.pl
+++ b/mysql-test/lib/mtr_process.pl
@@ -22,7 +22,7 @@ use Socket;
use Errno;
use strict;
-use POSIX 'WNOHANG';
+use POSIX qw(WNOHANG SIGHUP);
sub mtr_run ($$$$$$;$);
sub mtr_spawn ($$$$$$;$);
@@ -139,19 +139,18 @@ sub spawn_impl ($$$$$$$$) {
{
if ( $! == $!{EAGAIN} ) # See "perldoc Errno"
{
- mtr_debug("Got EAGAIN from fork(), sleep 1 second and redo");
+ mtr_warning("Got EAGAIN from fork(), sleep 1 second and redo");
sleep(1);
redo FORK;
}
- else
- {
- mtr_error("$path ($pid) can't be forked");
- }
+
+ mtr_error("$path ($pid) can't be forked, error: $!");
+
}
if ( $pid )
{
- spawn_parent_impl($pid,$mode,$path);
+ return spawn_parent_impl($pid,$mode,$path);
}
else
{
@@ -216,8 +215,11 @@ sub spawn_impl ($$$$$$$$) {
{
mtr_child_error("failed to execute \"$path\": $!");
}
+ mtr_error("Should never come here 1!");
}
+ mtr_error("Should never come here 2!");
}
+ mtr_error("Should never come here 3!");
}
@@ -230,12 +232,21 @@ sub spawn_parent_impl {
{
if ( $mode eq 'run' )
{
- # Simple run of command, we wait for it to return
+ # Simple run of command, wait blocking for it to return
my $ret_pid= waitpid($pid,0);
if ( $ret_pid != $pid )
{
- mtr_error("waitpid($pid, 0) returned $ret_pid " .
- "when waiting for '$path'");
+ # The "simple" waitpid has failed, print debug info
+ # and try to handle the error
+ mtr_warning("waitpid($pid, 0) returned $ret_pid " .
+ "when waiting for '$path', error: '$!'");
+ if ( $ret_pid == -1 )
+ {
+ # waitpid returned -1, that would indicate the process
+ # no longer exist and waitpid couldn't wait for it.
+ return 1;
+ }
+ mtr_error("Error handling failed");
}
return mtr_process_exit_status($?);
@@ -1109,12 +1120,6 @@ sub mtr_kill_processes ($) {
#
##############################################################################
-# FIXME something is wrong, we sometimes terminate with "Hangup" written
-# to tty, and no STDERR output telling us why.
-
-# FIXME for some reason, setting HUP to 'IGNORE' will cause exit() to
-# write out "Hangup", and maybe loose some output. We insert a sleep...
-
sub mtr_exit ($) {
my $code= shift;
mtr_timer_stop_all($::glob_timers);
@@ -1126,7 +1131,7 @@ sub mtr_exit ($) {
# set ourselves as the group leader at startup (with
# POSIX::setpgrp(0,0)), but then care must be needed to always do
# proper child process cleanup.
- kill('HUP', -$$) if !$::glob_win32_perl and $$ == getpgrp();
+ POSIX::kill(SIGHUP, -$$) if !$::glob_win32_perl and $$ == getpgrp();
exit($code);
}
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 2017da8a9c1..25ee0f3e735 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -300,6 +300,8 @@ our $path_ndb_examples_dir;
our $exe_ndb_example;
our $path_ndb_testrun_log;
+our $path_sql_dir;
+
our @data_dir_lst;
our $used_binlog_format;
@@ -357,6 +359,7 @@ sub stop_all_servers ();
sub run_mysqltest ($);
sub usage ($);
+
######################################################################
#
# Main program
@@ -766,7 +769,7 @@ sub command_line_setup () {
foreach my $arg ( @opt_extra_mysqld_opt )
{
- if ( $arg =~ /binlog-format=(\S+)/ )
+ if ( $arg =~ /binlog[-_]format=(\S+)/ )
{
$used_binlog_format= $1;
}
@@ -1492,6 +1495,10 @@ sub executable_setup () {
if (!$opt_extern)
{
+ # Look for SQL scripts directory
+ $path_sql_dir= mtr_path_exists("$glob_basedir/share",
+ "$glob_basedir/scripts");
+
if ( $mysql_version_id >= 50100 )
{
$exe_mysqlslap= mtr_exe_exists("$path_client_bindir/mysqlslap");
@@ -1585,7 +1592,8 @@ sub executable_setup () {
sub generate_cmdline_mysqldump ($) {
my($mysqld) = @_;
return
- "$exe_mysqldump --no-defaults --debug-info -uroot " .
+ mtr_native_path($exe_mysqldump) .
+ " --no-defaults -uroot --debug-info " .
"--port=$mysqld->{'port'} " .
"--socket=$mysqld->{'path_sock'} --password=";
}
@@ -1727,7 +1735,7 @@ sub environment_setup () {
my $deb_version;
if ( $opt_valgrind and -d $debug_libraries_path and
(! -e '/etc/debian_version' or
- ($deb_version= mtr_grab_file('/etc/debian_version')) == 0 or
+ ($deb_version= mtr_grab_file('/etc/debian_version')) !~ /^[0-9]+\.[0-9]$/ or
$deb_version > 3.1 ) )
{
push(@ld_library_paths, $debug_libraries_path);
@@ -1831,7 +1839,8 @@ sub environment_setup () {
# Setup env so childs can execute mysqlcheck
# ----------------------------------------------------
my $cmdline_mysqlcheck=
- "$exe_mysqlcheck --no-defaults --debug-info -uroot " .
+ mtr_native_path($exe_mysqlcheck) .
+ " --no-defaults --debug-info -uroot " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password=";
@@ -1865,7 +1874,8 @@ sub environment_setup () {
if ( $exe_mysqlslap )
{
my $cmdline_mysqlslap=
- "$exe_mysqlslap -uroot " .
+ mtr_native_path($exe_mysqlslap) .
+ " -uroot " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password= " .
"--lock-directory=$opt_tmpdir";
@@ -1882,7 +1892,8 @@ sub environment_setup () {
# Setup env so childs can execute mysqlimport
# ----------------------------------------------------
my $cmdline_mysqlimport=
- "$exe_mysqlimport --debug-info -uroot " .
+ mtr_native_path($exe_mysqlimport) .
+ " -uroot --debug-info " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password=";
@@ -1898,7 +1909,8 @@ sub environment_setup () {
# Setup env so childs can execute mysqlshow
# ----------------------------------------------------
my $cmdline_mysqlshow=
- "$exe_mysqlshow --debug-info -uroot " .
+ mtr_native_path($exe_mysqlshow) .
+ " -uroot --debug-info " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password=";
@@ -1913,7 +1925,7 @@ sub environment_setup () {
# Setup env so childs can execute mysqlbinlog
# ----------------------------------------------------
my $cmdline_mysqlbinlog=
- "$exe_mysqlbinlog" .
+ mtr_native_path($exe_mysqlbinlog) .
" --no-defaults --disable-force-if-open --debug-info --local-load=$opt_tmpdir";
if ( !$opt_extern && $mysql_version_id >= 50000 )
{
@@ -1931,7 +1943,8 @@ sub environment_setup () {
# Setup env so childs can execute mysql
# ----------------------------------------------------
my $cmdline_mysql=
- "$exe_mysql --no-defaults --debug-info --host=localhost --user=root --password= " .
+ mtr_native_path($exe_mysql) .
+ " --no-defaults --debug-info --host=localhost --user=root --password= " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} ".
"--character-sets-dir=$path_charsetsdir";
@@ -1963,6 +1976,7 @@ sub environment_setup () {
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'}";
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
+
}
if (!$opt_extern)
{
@@ -1972,17 +1986,17 @@ sub environment_setup () {
# ----------------------------------------------------
# Setup env so childs can execute my_print_defaults
# ----------------------------------------------------
- $ENV{'MYSQL_MY_PRINT_DEFAULTS'}= $exe_my_print_defaults;
+ $ENV{'MYSQL_MY_PRINT_DEFAULTS'}= mtr_native_path($exe_my_print_defaults);
# ----------------------------------------------------
# Setup env so childs can execute mysqladmin
# ----------------------------------------------------
- $ENV{'MYSQLADMIN'}= $exe_mysqladmin;
+ $ENV{'MYSQLADMIN'}= mtr_native_path($exe_mysqladmin);
# ----------------------------------------------------
# Setup env so childs can execute perror
# ----------------------------------------------------
- $ENV{'MY_PERROR'}= $exe_perror;
+ $ENV{'MY_PERROR'}= mtr_native_path($exe_perror);
# ----------------------------------------------------
# Add the path where mysqld will find udf_example.so
@@ -2141,6 +2155,16 @@ sub remove_stale_vardir () {
mtr_verbose("Removing $opt_vardir/");
rmtree("$opt_vardir/");
}
+
+ if ( $opt_mem )
+ {
+ # A symlink from var/ to $opt_mem will be set up
+ # remove the $opt_mem dir to assure the symlink
+ # won't point at an old directory
+ mtr_verbose("Removing $opt_mem");
+ rmtree($opt_mem);
+ }
+
}
else
{
@@ -2892,42 +2916,13 @@ sub install_db ($$) {
my $type= shift;
my $data_dir= shift;
- my $init_db_sql= "lib/init_db.sql";
- my $init_db_sql_tmp= "/tmp/init_db.sql$$";
- my $args;
-
mtr_report("Installing \u$type Database");
- open(IN, $init_db_sql)
- or mtr_error("Can't open $init_db_sql: $!");
- open(OUT, ">", $init_db_sql_tmp)
- or mtr_error("Can't write to $init_db_sql_tmp: $!");
- while (<IN>)
- {
- chomp;
- s/\@HOSTNAME\@/$glob_hostname/;
- if ( /^\s*$/ )
- {
- print OUT "\n";
- }
- elsif (/;$/)
- {
- print OUT "$_\n";
- }
- else
- {
- print OUT "$_ ";
- }
- }
- close OUT;
- close IN;
+ my $args;
mtr_init_args(\$args);
-
mtr_add_arg($args, "--no-defaults");
mtr_add_arg($args, "--bootstrap");
- mtr_add_arg($args, "--console");
- mtr_add_arg($args, "--skip-grant-tables");
mtr_add_arg($args, "--basedir=%s", $path_my_basedir);
mtr_add_arg($args, "--datadir=%s", $data_dir);
mtr_add_arg($args, "--skip-innodb");
@@ -2954,21 +2949,55 @@ sub install_db ($$) {
# --bootstrap, to accommodate this.
my $exe_mysqld_bootstrap = $ENV{'MYSQLD_BOOTSTRAP'} || $exe_mysqld;
+ # ----------------------------------------------------------------------
+ # export MYSQLD_BOOTSTRAP_CMD variable containing <path>/mysqld <args>
+ # ----------------------------------------------------------------------
+ $ENV{'MYSQLD_BOOTSTRAP_CMD'}= "$exe_mysqld_bootstrap " . join(" ", @$args);
+
+ # ----------------------------------------------------------------------
+ # Create the bootstrap.sql file
+ # ----------------------------------------------------------------------
+ my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql";
+
+ # Use the mysql database for system tables
+ mtr_tofile($bootstrap_sql_file, "use mysql");
+
+ # Add the offical mysql system tables
+ # for a production system
+ mtr_appendfile_to_file("$path_sql_dir/mysql_system_tables.sql",
+ $bootstrap_sql_file);
+
+ # Add the mysql system tables initial data
+ # for a production system
+ mtr_appendfile_to_file("$path_sql_dir/mysql_system_tables_data.sql",
+ $bootstrap_sql_file);
+
+ # Add test data for timezone - this is just a subset, on a real
+ # system these tables will be populated either by mysql_tzinfo_to_sql
+ # or by downloading the timezone table package from our website
+ mtr_appendfile_to_file("$path_sql_dir/mysql_test_data_timezone.sql",
+ $bootstrap_sql_file);
+
+ # Fill help tables, just an empty file when running from bk repo
+ # but will be replaced by a real fill_help_tables.sql when
+ # building the source dist
+ mtr_appendfile_to_file("$path_sql_dir/fill_help_tables.sql",
+ $bootstrap_sql_file);
+
# Log bootstrap command
my $path_bootstrap_log= "$opt_vardir/log/bootstrap.log";
mtr_tofile($path_bootstrap_log,
"$exe_mysqld_bootstrap " . join(" ", @$args) . "\n");
- if ( mtr_run($exe_mysqld_bootstrap, $args, $init_db_sql_tmp,
+ if ( mtr_run($exe_mysqld_bootstrap, $args, $bootstrap_sql_file,
$path_bootstrap_log, $path_bootstrap_log,
"", { append_log_file => 1 }) != 0 )
{
- unlink($init_db_sql_tmp);
mtr_error("Error executing mysqld --bootstrap\n" .
- "Could not install $type test DBs");
+ "Could not install system database from $bootstrap_sql_file\n" .
+ "see $path_bootstrap_log for errors");
}
- unlink($init_db_sql_tmp);
}
@@ -3625,6 +3654,12 @@ sub mysqld_arguments ($$$$$) {
mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir);
mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir);
+ if ( $mysql_version_id >= 50036)
+ {
+ # Prevent the started mysqld to access files outside of vardir
+ mtr_add_arg($args, "%s--secure-file-priv=%s", $prefix, $opt_vardir);
+ }
+
if ( $mysql_version_id >= 50000 )
{
mtr_add_arg($args, "%s--log-bin-trust-function-creators", $prefix);
@@ -4671,7 +4706,8 @@ sub run_mysqltest ($) {
# ----------------------------------------------------------------------
# export MYSQL_TEST variable containing <path>/mysqltest <args>
# ----------------------------------------------------------------------
- $ENV{'MYSQL_TEST'}= "$exe_mysqltest " . join(" ", @$args);
+ $ENV{'MYSQL_TEST'}=
+ mtr_native_path($exe_mysqltest) . " " . join(" ", @$args);
# ----------------------------------------------------------------------
# Add arguments that should not go into the MYSQL_TEST env var
diff --git a/mysql-test/r/archive_gis.result b/mysql-test/r/archive_gis.result
index 9ab8a5e758b..210140ea11b 100644
--- a/mysql-test/r/archive_gis.result
+++ b/mysql-test/r/archive_gis.result
@@ -450,7 +450,7 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert IGNORE into t1 (a) values ('Garbage');
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
-create table t1 (pk integer primary key auto_increment, fl geometry);
+create table t1 (pk integer primary key auto_increment, fl geometry not null);
insert into t1 (fl) values (1);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (1.11);
@@ -458,5 +458,5 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (pointfromtext('point(1,1)'));
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR 23000: Column 'fl' cannot be null
drop table t1;
diff --git a/mysql-test/r/binlog_row_ctype_cp932.result b/mysql-test/r/binlog_row_ctype_cp932.result
index 10451686e2c..ca70f98c0e6 100644
--- a/mysql-test/r/binlog_row_ctype_cp932.result
+++ b/mysql-test/r/binlog_row_ctype_cp932.result
@@ -11365,3 +11365,13 @@ select hex(a) from t1;
hex(a)
82A0
drop table t1;
+\
+\
+c_cp932
+\
+\
+\
+ソ
+ソ
+\
+\
diff --git a/mysql-test/r/binlog_stm_ctype_cp932.result b/mysql-test/r/binlog_stm_ctype_cp932.result
index 10451686e2c..ca70f98c0e6 100755
--- a/mysql-test/r/binlog_stm_ctype_cp932.result
+++ b/mysql-test/r/binlog_stm_ctype_cp932.result
@@ -11365,3 +11365,13 @@ select hex(a) from t1;
hex(a)
82A0
drop table t1;
+\
+\
+c_cp932
+\
+\
+\
+ソ
+ソ
+\
+\
diff --git a/mysql-test/r/bootstrap.result b/mysql-test/r/bootstrap.result
new file mode 100644
index 00000000000..3301ca74324
--- /dev/null
+++ b/mysql-test/r/bootstrap.result
@@ -0,0 +1,8 @@
+drop table if exists t1;
+drop table t1;
+drop table t1;
+ERROR 42S02: Unknown table 't1'
+set @my_max_allowed_packet= @@max_allowed_packet;
+set global max_allowed_packet=100*@@max_allowed_packet;
+set global max_allowed_packet=@my_max_allowed_packet;
+drop table t1;
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index c2bbb01af8c..ab9e6762d21 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -522,9 +522,11 @@ drop database mysqltest;
select database();
database()
NULL
+create user mysqltest_1;
select database(), user();
database() user()
NULL mysqltest_1@localhost
+drop user mysqltest_1;
use test;
create table t1 (a int, index `primary` (a));
ERROR 42000: Incorrect index name 'primary'
diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result
index d253d121e99..ede5d9a32fd 100644
--- a/mysql-test/r/csv.result
+++ b/mysql-test/r/csv.result
@@ -5007,7 +5007,6 @@ Warnings:
Error 1194 Table 'test_repair_table2' is marked as crashed and should be repaired
SELECT * from test_repair_table2;
val
-test_repair_table2.CSM
CHECK TABLE test_repair_table2;
Table Op Msg_type Msg_text
test.test_repair_table2 check status OK
@@ -5210,15 +5209,9 @@ create table bug22080_3 (id int,string varchar(64)) Engine=CSV;
insert into bug22080_1 values(1,'string');
insert into bug22080_1 values(2,'string');
insert into bug22080_1 values(3,'string');
-1,"string"
-2","string"
-3,"string"
check table bug22080_2;
Table Op Msg_type Msg_text
test.bug22080_2 check error Corrupt
-1,"string"
-2,"string"
-3,"string"
check table bug22080_3;
Table Op Msg_type Msg_text
test.bug22080_3 check error Corrupt
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result
index 8c7e39e0e90..3a098308b49 100644
--- a/mysql-test/r/derived.result
+++ b/mysql-test/r/derived.result
@@ -202,6 +202,7 @@ drop table t1,t2;
SELECT a.x FROM (SELECT 1 AS x) AS a HAVING a.x = 1;
x
1
+create user mysqltest_1;
create table t1 select 1 as a;
select 2 as a from (select * from t1) b;
ERROR 3D000: No database selected
@@ -380,3 +381,4 @@ ID DATA FID
select t2.* from (select * from t1) as A inner join t2 on A.ID = t2.FID;
ID DATA FID
drop table t1, t2;
+drop user mysqltest_1;
diff --git a/mysql-test/r/events_logs_tests.result b/mysql-test/r/events_logs_tests.result
index 1efd3fa602e..ede7d0f4e25 100644
--- a/mysql-test/r/events_logs_tests.result
+++ b/mysql-test/r/events_logs_tests.result
@@ -97,3 +97,4 @@ DROP TABLE slow_event_test;
SET GLOBAL long_query_time =@old_global_long_query_time;
SET SESSION long_query_time =@old_session_long_query_time;
DROP DATABASE events_test;
+SET GLOBAL event_scheduler=off;
diff --git a/mysql-test/r/events_scheduling.result b/mysql-test/r/events_scheduling.result
index 180c2e4883d..d885dc3a048 100644
--- a/mysql-test/r/events_scheduling.result
+++ b/mysql-test/r/events_scheduling.result
@@ -83,3 +83,4 @@ DROP TABLE table_2;
DROP TABLE table_3;
DROP TABLE table_4;
DROP DATABASE events_test;
+SET GLOBAL event_scheduler=OFF;
diff --git a/mysql-test/r/federated_server.result b/mysql-test/r/federated_server.result
index 43a99454e1e..7a1a6e0970d 100644
--- a/mysql-test/r/federated_server.result
+++ b/mysql-test/r/federated_server.result
@@ -49,7 +49,6 @@ SOCKET '',
OWNER 'root');
select * from mysql.servers;
Server_name Host Db Username Password Port Socket Wrapper Owner
-test localhost test root 0 mysql root
server_one 127.0.0.1 first_db root SLAVE_PORT mysql root
server_two 127.0.0.1 second_db root SLAVE_PORT mysql root
DROP TABLE IF EXISTS federated.old;
@@ -101,7 +100,6 @@ drop server 'server_one';
drop server 'server_two';
select * from mysql.servers;
Server_name Host Db Username Password Port Socket Wrapper Owner
-test localhost test root 0 mysql root
drop table first_db.t1;
drop table second_db.t1;
drop database first_db;
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index 64324b57fe3..972bb99d56f 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -1171,11 +1171,11 @@ 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(*), round(std(o1/o2), 16) from bug22555 group by i order by i;
+i count(*) round(std(o1/o2), 16)
+1 4 0.0000000000000000
+2 4 0.0000000000000000
+3 4 0.0000000000000000
select i, count(*), std(e1/e2) from bug22555 group by i order by i;
i count(*) std(e1/e2)
1 4 0.00000000
@@ -1197,11 +1197,11 @@ 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(*), round(std(o1/o2), 16) from bug22555 group by i order by i;
+i count(*) round(std(o1/o2), 16)
+1 4 0.0000000000000000
+2 4 0.0000000000000000
+3 4 0.0000000000000000
select i, count(*), std(e1/e2) from bug22555 group by i order by i;
i count(*) std(e1/e2)
1 4 0.000000000000000000000000000000
@@ -1222,11 +1222,11 @@ 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(*), round(std(o1/o2), 16) from bug22555 group by i order by i;
+i count(*) round(std(o1/o2), 16)
+1 4 0.0000000000000000
+2 4 0.0000000000000000
+3 4 0.0000000000000000
select i, count(*), std(e1/e2) from bug22555 group by i order by i;
i count(*) std(e1/e2)
1 4 0.000000000000000000000000000000
diff --git a/mysql-test/r/func_sapdb.result b/mysql-test/r/func_sapdb.result
index 29ceb6ecaa4..124b20e9b46 100644
--- a/mysql-test/r/func_sapdb.result
+++ b/mysql-test/r/func_sapdb.result
@@ -240,9 +240,7 @@ a
10000
select microsecond(19971231235959.01) as a;
a
-0
-Warnings:
-Warning 1292 Truncated incorrect time value: '19971231235959.01'
+10000
select date_add("1997-12-31",INTERVAL "10.09" SECOND_MICROSECOND) as a;
a
1997-12-31 00:00:10.090000
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index e6c323276ea..d6eb1ab06cf 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -2273,4 +2273,18 @@ abcxx
select lpad('abc', cast(5 as unsigned integer), 'x');
lpad('abc', cast(5 as unsigned integer), 'x')
xxabc
+DROP TABLE IF EXISTS t1;
+CREATE TABLE `t1` (
+`id` varchar(20) NOT NULL,
+`tire` tinyint(3) unsigned NOT NULL,
+PRIMARY KEY (`id`)
+);
+INSERT INTO `t1` (`id`, `tire`) VALUES ('A', 0), ('B', 1),('C', 2);
+SELECT REPEAT( '#', tire ) AS A,
+REPEAT( '#', tire % 999 ) AS B, tire FROM `t1`;
+A B tire
+ 0
+# # 1
+## ## 2
+DROP TABLE t1;
End of 5.0 tests
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index d5888d13a06..16a1e5d01d7 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -1050,6 +1050,10 @@ H
select last_day('0000-00-00');
last_day('0000-00-00')
NULL
+select isnull(week(now() + 0)), isnull(week(now() + 0.2)),
+week(20061108), week(20061108.01), week(20061108085411.000002);
+isnull(week(now() + 0)) isnull(week(now() + 0.2)) week(20061108) week(20061108.01) week(20061108085411.000002)
+0 0 45 45 45
End of 4.1 tests
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
timestampdiff(SQL_TSI_FRAC_SECOND, '2001-02-01 12:59:59.120000', '2001-05-01 12:58:58.119999') as a2;
@@ -1183,6 +1187,23 @@ set time_zone= @@global.time_zone;
select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE
NULL
+create table t1 (field DATE);
+insert into t1 values ('2006-11-06');
+select * from t1 where field < '2006-11-06 04:08:36.0';
+field
+2006-11-06
+select * from t1 where field = '2006-11-06 04:08:36.0';
+field
+select * from t1 where field = '2006-11-06';
+field
+2006-11-06
+select * from t1 where CAST(field as DATETIME) < '2006-11-06 04:08:36.0';
+field
+2006-11-06
+select * from t1 where CAST(field as DATE) < '2006-11-06 04:08:36.0';
+field
+2006-11-06
+drop table t1;
CREATE TABLE t1 (a int, t1 time, t2 time, d date, PRIMARY KEY (a));
INSERT INTO t1 VALUES (1, '10:00:00', NULL, NULL),
(2, '11:00:00', '11:15:00', '1972-02-06');
@@ -1197,6 +1218,10 @@ t1 t2 SEC_TO_TIME( TIME_TO_SEC( t2 ) - TIME_TO_SEC( t1 ) ) QUARTER(d)
11:00:00 11:15:00 00:15:00 1
10:00:00 NULL NULL NULL
DROP TABLE t1;
+SELECT TIME_FORMAT(SEC_TO_TIME(a),"%H:%i:%s") FROM (SELECT 3020399 AS a UNION SELECT 3020398 ) x GROUP BY 1;
+TIME_FORMAT(SEC_TO_TIME(a),"%H:%i:%s")
+838:59:58
+838:59:59
End of 5.0 tests
select date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND);
date_sub("0050-01-01 00:00:01",INTERVAL 2 SECOND)
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index 6483b12acb0..8f81c7c4b66 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -578,7 +578,7 @@ create table t1 select GeomFromWKB(POINT(1,3));
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `GeomFromWKB(POINT(1,3))` geometry NOT NULL DEFAULT ''
+ `GeomFromWKB(POINT(1,3))` geometry DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
CREATE TABLE `t1` (`object_id` bigint(20) unsigned NOT NULL default '0', `geo`
@@ -657,7 +657,7 @@ t1 where object_id=85984;
object_id geometrytype(geo) ISSIMPLE(GEO) ASTEXT(centroid(geo))
85984 MULTIPOLYGON 0 POINT(-114.87787186923 36.33101763469)
drop table t1;
-create table t1 (fl geometry);
+create table t1 (fl geometry not null);
insert into t1 values (1);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values (1.11);
@@ -665,7 +665,7 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 values (pointfromtext('point(1,1)'));
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR 23000: Column 'fl' cannot be null
drop table t1;
select (asWKT(geomfromwkb((0x000000000140240000000000004024000000000000))));
(asWKT(geomfromwkb((0x000000000140240000000000004024000000000000))))
@@ -689,6 +689,48 @@ load data infile '../std_data_ln/bad_gis_data.dat' into table t1;
ERROR 22004: Column set to default value; NULL supplied to NOT NULL column 'b' at row 1
alter table t1 enable keys;
drop table t1;
+create table t1 (a int, b blob);
+insert into t1 values (1, ''), (2, NULL), (3, '1');
+select * from t1;
+a b
+1
+2 NULL
+3 1
+select
+geometryfromtext(b) IS NULL, geometryfromwkb(b) IS NULL, astext(b) IS NULL,
+aswkb(b) IS NULL, geometrytype(b) IS NULL, centroid(b) IS NULL,
+envelope(b) IS NULL, startpoint(b) IS NULL, endpoint(b) IS NULL,
+exteriorring(b) IS NULL, pointn(b, 1) IS NULL, geometryn(b, 1) IS NULL,
+interiorringn(b, 1) IS NULL, multipoint(b) IS NULL, isempty(b) IS NULL,
+issimple(b) IS NULL, isclosed(b) IS NULL, dimension(b) IS NULL,
+numgeometries(b) IS NULL, numinteriorrings(b) IS NULL, numpoints(b) IS NULL,
+area(b) IS NULL, glength(b) IS NULL, srid(b) IS NULL, x(b) IS NULL,
+y(b) IS NULL
+from t1;
+geometryfromtext(b) IS NULL geometryfromwkb(b) IS NULL astext(b) IS NULL aswkb(b) IS NULL geometrytype(b) IS NULL centroid(b) IS NULL envelope(b) IS NULL startpoint(b) IS NULL endpoint(b) IS NULL exteriorring(b) IS NULL pointn(b, 1) IS NULL geometryn(b, 1) IS NULL interiorringn(b, 1) IS NULL multipoint(b) IS NULL isempty(b) IS NULL issimple(b) IS NULL isclosed(b) IS NULL dimension(b) IS NULL numgeometries(b) IS NULL numinteriorrings(b) IS NULL numpoints(b) IS NULL area(b) IS NULL glength(b) IS NULL srid(b) IS NULL x(b) IS NULL y(b) IS NULL
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
+select
+within(b, b) IS NULL, contains(b, b) IS NULL, overlaps(b, b) IS NULL,
+equals(b, b) IS NULL, disjoint(b, b) IS NULL, touches(b, b) IS NULL,
+intersects(b, b) IS NULL, crosses(b, b) IS NULL
+from t1;
+within(b, b) IS NULL contains(b, b) IS NULL overlaps(b, b) IS NULL equals(b, b) IS NULL disjoint(b, b) IS NULL touches(b, b) IS NULL intersects(b, b) IS NULL crosses(b, b) IS NULL
+1 1 1 1 1 1 1 1
+1 1 1 1 1 1 1 1
+1 1 1 1 1 1 1 1
+select
+point(b, b) IS NULL, linestring(b) IS NULL, polygon(b) IS NULL, multipoint(b) IS NULL,
+multilinestring(b) IS NULL, multipolygon(b) IS NULL,
+geometrycollection(b) IS NULL
+from t1;
+point(b, b) IS NULL linestring(b) IS NULL polygon(b) IS NULL multipoint(b) IS NULL multilinestring(b) IS NULL multipolygon(b) IS NULL geometrycollection(b) IS NULL
+0 1 1 1 1 1 1
+1 1 1 1 1 1 1
+0 1 1 1 1 1 1
+drop table t1;
+End of 4.1 tests
create table t1 (s1 geometry not null,s2 char(100));
create trigger t1_bu before update on t1 for each row set new.s1 = null;
insert into t1 values (null,null);
@@ -716,7 +758,7 @@ drop table t1;
create table t1 select GeomFromText('point(1 1)');
desc t1;
Field Type Null Key Default Extra
-GeomFromText('point(1 1)') geometry NO
+GeomFromText('point(1 1)') geometry YES NULL
drop table t1;
create table t1 (g geometry not null);
insert into t1 values(default);
diff --git a/mysql-test/r/innodb-ucs2.result b/mysql-test/r/innodb-ucs2.result
new file mode 100644
index 00000000000..a1c73c912b2
--- /dev/null
+++ b/mysql-test/r/innodb-ucs2.result
@@ -0,0 +1,313 @@
+create table t1 (
+a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+a hex(b) hex(c) filler
+1 61626364656667 61626364656667 boo
+4 D0B1 D0B1 eight
+4 5B 5B five
+4 E880BD E880BD four
+4 E880BDD0B1E880BD E880BDD0B1E880BD seven
+4 E880BDE880BD E880BDE880BD six
+3 71727374757677 71727374757677 three
+2 696A6B696C6D6E 696A6B696C6D6E two
+select a,hex(b),hex(c),filler from t2 order by filler;
+a hex(b) hex(c) filler
+4 05630563 05630563 email
+4 0563 0563 email
+4 05612020 05612020 email
+4 01FC 01FC email
+4 0120 0120 email
+4 00640065 00640065 email
+4 00E400E50068 00E400E50068 email
+4 0000E400 0000E400 email
+4 0000563001FC0563 0000563001FC0563 email
+1 0061006200630064006500660067 0061006200630064006500660067 one
+3 0071007200730074007500760077 0071007200730074007500760077 three
+2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
+drop table t1;
+drop table t2;
+create table t1 (
+a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+a hex(b) hex(c) filler
+1 61626364656667 61626364656667 boo
+4 D0B1 D0B1 eight
+4 5B 5B five
+4 E880BD E880BD four
+4 E880BDD0B1E880BD E880BDD0B1E880BD seven
+4 E880BDE880BD E880BDE880BD six
+3 71727374757677 71727374757677 three
+2 696A6B696C6D6E 696A6B696C6D6E two
+select a,hex(b),hex(c),filler from t2 order by filler;
+a hex(b) hex(c) filler
+4 05630563 05630563 email
+4 0563 0563 email
+4 05612020 05612020 email
+4 01FC 01FC email
+4 0120 0120 email
+4 00640065 00640065 email
+4 00E400E50068 00E400E50068 email
+4 0000E400 0000E400 email
+4 0000563001FC0563 0000563001FC0563 email
+1 0061006200630064006500660067 0061006200630064006500660067 one
+3 0071007200730074007500760077 0071007200730074007500760077 three
+2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
+drop table t1;
+drop table t2;
+create table t1 (
+a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+a hex(b) hex(c) filler
+1 61626364656667 61626364656667 boo
+4 D0B1 D0B1 eight
+4 5B 5B five
+4 E880BD E880BD four
+4 E880BDD0B1E880BD E880BDD0B1E880BD seven
+4 E880BDE880BD E880BDE880BD six
+3 71727374757677 71727374757677 three
+2 696A6B696C6D6E 696A6B696C6D6E two
+select a,hex(b),hex(c),filler from t2 order by filler;
+a hex(b) hex(c) filler
+4 0120 0120 email
+4 01FC 01FC email
+4 0563 0563 email
+4 0000563001FC0563 0000563001FC0563 email
+4 0000E400 0000E400 email
+4 00640065 00640065 email
+4 00E400E50068 00E400E50068 email
+4 05612020 05612020 email
+4 05630563 05630563 email
+1 0061006200630064006500660067 0061006200630064006500660067 one
+3 0071007200730074007500760077 0071007200730074007500760077 three
+2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
+drop table t1;
+drop table t2;
+create table t1 (
+a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+a hex(b) hex(c) filler
+1 61626364656667 61626364656667 boo
+4 D0B1 D0B1 eight
+4 5B 5B five
+4 E880BD E880BD four
+3 71727374757677 71727374757677 three
+2 696A6B696C6D6E 696A6B696C6D6E two
+select a,hex(b),hex(c),filler from t2 order by filler;
+a hex(b) hex(c) filler
+4 0000E400 0000E400 email
+4 00640065 00640065 email
+4 00E400E50068 00E400E50068 email
+4 0120 0120 email
+4 01FC 01FC email
+4 05612020 05612020 email
+4 0563 0563 email
+1 61626364656667 61626364656667 one
+3 71727374757677 71727374757677 three
+2 696A6B696C6D6E 696A6B696C6D6E two
+drop table t1;
+drop table t2;
+commit;
+CREATE TABLE t1 (
+ind enum('0','1','2') NOT NULL default '0',
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+ind enum('0','1','2') NOT NULL default '0',
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
+INSERT INTO t1 VALUES ('1', ''),('2', '');
+INSERT INTO t2 VALUES ('1', ''),('2', '');
+SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
+hex(ind) hex(string1)
+31
+32
+SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
+hex(ind) hex(string1)
+0031
+0032
+drop table t1,t2;
+CREATE TABLE t1 (
+ind set('0','1','2') NOT NULL default '0',
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+ind set('0','1','2') NOT NULL default '0',
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
+INSERT INTO t1 VALUES ('1', ''),('2', '');
+INSERT INTO t2 VALUES ('1', ''),('2', '');
+SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
+hex(ind) hex(string1)
+31
+32
+SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
+hex(ind) hex(string1)
+0031
+0032
+drop table t1,t2;
+CREATE TABLE t1 (
+ind bit not null,
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+ind bit not null,
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
+insert into t1 values(0,''),(1,'');
+insert into t2 values(0,''),(1,'');
+select hex(ind),hex(string1) from t1 order by string1;
+hex(ind) hex(string1)
+0
+1
+select hex(ind),hex(string1) from t2 order by string1;
+hex(ind) hex(string1)
+0
+1
+drop table t1,t2;
+create table t2 (
+a int, b char(10), filler char(10), primary key(a, b(2))
+) character set utf8 engine = innodb;
+insert into t2 values (1,'abcdefg','one');
+insert into t2 values (2,'ijkilmn','two');
+insert into t2 values (3, 'qrstuvw','three');
+update t2 set a=5, filler='booo' where a=1;
+drop table t2;
+create table t2 (
+a int, b char(10), filler char(10), primary key(a, b(2))
+) character set ucs2 engine = innodb;
+insert into t2 values (1,'abcdefg','one');
+insert into t2 values (2,'ijkilmn','two');
+insert into t2 values (3, 'qrstuvw','three');
+update t2 set a=5, filler='booo' where a=1;
+drop table t2;
+create table t1(a int not null, b char(110),primary key(a,b(100))) engine=innodb default charset=utf8;
+insert into t1 values(1,'abcdefg'),(2,'defghijk');
+insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
+insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
+select a,hex(b) from t1 order by b;
+a hex(b)
+1 61626364656667
+2 6465666768696A6B
+6 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1
+7 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2
+update t1 set b = 'three' where a = 6;
+drop table t1;
+create table t1(a int not null, b text(110),primary key(a,b(100))) engine=innodb default charset=utf8;
+insert into t1 values(1,'abcdefg'),(2,'defghijk');
+insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
+insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
+select a,hex(b) from t1 order by b;
+a hex(b)
+1 61626364656667
+2 6465666768696A6B
+6 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1
+7 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2
+update t1 set b = 'three' where a = 6;
+drop table t1;
+End of 5.0 tests
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index 642c9ff2bef..f2d504f555f 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -2666,215 +2666,6 @@ checksum table t1;
Table Checksum
test.t1 2050879373
drop table t1;
-create table t1 (
-a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = innodb;
-create table t2 (
-a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = innodb;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
-insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
-insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-a hex(b) hex(c) filler
-1 61626364656667 61626364656667 boo
-4 D0B1 D0B1 eight
-4 5B 5B five
-4 E880BD E880BD four
-4 E880BDD0B1E880BD E880BDD0B1E880BD seven
-4 E880BDE880BD E880BDE880BD six
-3 71727374757677 71727374757677 three
-2 696A6B696C6D6E 696A6B696C6D6E two
-select a,hex(b),hex(c),filler from t2 order by filler;
-a hex(b) hex(c) filler
-4 05630563 05630563 email
-4 0563 0563 email
-4 05612020 05612020 email
-4 01FC 01FC email
-4 0120 0120 email
-4 00640065 00640065 email
-4 00E400E50068 00E400E50068 email
-4 0000E400 0000E400 email
-4 0000563001FC0563 0000563001FC0563 email
-1 0061006200630064006500660067 0061006200630064006500660067 one
-3 0071007200730074007500760077 0071007200730074007500760077 three
-2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
-drop table t1;
-drop table t2;
-create table t1 (
-a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = innodb;
-create table t2 (
-a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = innodb;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
-insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
-insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-a hex(b) hex(c) filler
-1 61626364656667 61626364656667 boo
-4 D0B1 D0B1 eight
-4 5B 5B five
-4 E880BD E880BD four
-4 E880BDD0B1E880BD E880BDD0B1E880BD seven
-4 E880BDE880BD E880BDE880BD six
-3 71727374757677 71727374757677 three
-2 696A6B696C6D6E 696A6B696C6D6E two
-select a,hex(b),hex(c),filler from t2 order by filler;
-a hex(b) hex(c) filler
-4 05630563 05630563 email
-4 0563 0563 email
-4 05612020 05612020 email
-4 01FC 01FC email
-4 0120 0120 email
-4 00640065 00640065 email
-4 00E400E50068 00E400E50068 email
-4 0000E400 0000E400 email
-4 0000563001FC0563 0000563001FC0563 email
-1 0061006200630064006500660067 0061006200630064006500660067 one
-3 0071007200730074007500760077 0071007200730074007500760077 three
-2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
-drop table t1;
-drop table t2;
-create table t1 (
-a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = innodb;
-create table t2 (
-a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = innodb;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
-insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
-insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-a hex(b) hex(c) filler
-1 61626364656667 61626364656667 boo
-4 D0B1 D0B1 eight
-4 5B 5B five
-4 E880BD E880BD four
-4 E880BDD0B1E880BD E880BDD0B1E880BD seven
-4 E880BDE880BD E880BDE880BD six
-3 71727374757677 71727374757677 three
-2 696A6B696C6D6E 696A6B696C6D6E two
-select a,hex(b),hex(c),filler from t2 order by filler;
-a hex(b) hex(c) filler
-4 0120 0120 email
-4 01FC 01FC email
-4 0563 0563 email
-4 0000563001FC0563 0000563001FC0563 email
-4 0000E400 0000E400 email
-4 00640065 00640065 email
-4 00E400E50068 00E400E50068 email
-4 05612020 05612020 email
-4 05630563 05630563 email
-1 0061006200630064006500660067 0061006200630064006500660067 one
-3 0071007200730074007500760077 0071007200730074007500760077 three
-2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
-drop table t1;
-drop table t2;
-create table t1 (
-a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = innodb;
-create table t2 (
-a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = innodb;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-a hex(b) hex(c) filler
-1 61626364656667 61626364656667 boo
-4 D0B1 D0B1 eight
-4 5B 5B five
-4 E880BD E880BD four
-3 71727374757677 71727374757677 three
-2 696A6B696C6D6E 696A6B696C6D6E two
-select a,hex(b),hex(c),filler from t2 order by filler;
-a hex(b) hex(c) filler
-4 0000E400 0000E400 email
-4 00640065 00640065 email
-4 00E400E50068 00E400E50068 email
-4 0120 0120 email
-4 01FC 01FC email
-4 05612020 05612020 email
-4 0563 0563 email
-1 61626364656667 61626364656667 one
-3 71727374757677 71727374757677 three
-2 696A6B696C6D6E 696A6B696C6D6E two
-drop table t1;
-drop table t2;
-commit;
set foreign_key_checks=0;
create table t2 (a int primary key, b int, foreign key (b) references t1(a)) engine = innodb;
create table t1(a char(10) primary key, b varchar(20)) engine = innodb;
@@ -3051,109 +2842,6 @@ select hex(s1) from t2;
hex(s1)
12
drop table t2,t1;
-CREATE TABLE t1 (
-ind enum('0','1','2') NOT NULL default '0',
-string1 varchar(250) NOT NULL,
-PRIMARY KEY (ind)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-CREATE TABLE t2 (
-ind enum('0','1','2') NOT NULL default '0',
-string1 varchar(250) NOT NULL,
-PRIMARY KEY (ind)
-) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
-INSERT INTO t1 VALUES ('1', ''),('2', '');
-INSERT INTO t2 VALUES ('1', ''),('2', '');
-SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
-hex(ind) hex(string1)
-31
-32
-SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
-hex(ind) hex(string1)
-0031
-0032
-drop table t1,t2;
-CREATE TABLE t1 (
-ind set('0','1','2') NOT NULL default '0',
-string1 varchar(250) NOT NULL,
-PRIMARY KEY (ind)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-CREATE TABLE t2 (
-ind set('0','1','2') NOT NULL default '0',
-string1 varchar(250) NOT NULL,
-PRIMARY KEY (ind)
-) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
-INSERT INTO t1 VALUES ('1', ''),('2', '');
-INSERT INTO t2 VALUES ('1', ''),('2', '');
-SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
-hex(ind) hex(string1)
-31
-32
-SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
-hex(ind) hex(string1)
-0031
-0032
-drop table t1,t2;
-CREATE TABLE t1 (
-ind bit not null,
-string1 varchar(250) NOT NULL,
-PRIMARY KEY (ind)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-CREATE TABLE t2 (
-ind bit not null,
-string1 varchar(250) NOT NULL,
-PRIMARY KEY (ind)
-) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
-insert into t1 values(0,''),(1,'');
-insert into t2 values(0,''),(1,'');
-select hex(ind),hex(string1) from t1 order by string1;
-hex(ind) hex(string1)
-0
-1
-select hex(ind),hex(string1) from t2 order by string1;
-hex(ind) hex(string1)
-0
-1
-drop table t1,t2;
-create table t2 (
-a int, b char(10), filler char(10), primary key(a, b(2))
-) character set utf8 engine = innodb;
-insert into t2 values (1,'abcdefg','one');
-insert into t2 values (2,'ijkilmn','two');
-insert into t2 values (3, 'qrstuvw','three');
-update t2 set a=5, filler='booo' where a=1;
-drop table t2;
-create table t2 (
-a int, b char(10), filler char(10), primary key(a, b(2))
-) character set ucs2 engine = innodb;
-insert into t2 values (1,'abcdefg','one');
-insert into t2 values (2,'ijkilmn','two');
-insert into t2 values (3, 'qrstuvw','three');
-update t2 set a=5, filler='booo' where a=1;
-drop table t2;
-create table t1(a int not null, b char(110),primary key(a,b(100))) engine=innodb default charset=utf8;
-insert into t1 values(1,'abcdefg'),(2,'defghijk');
-insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
-insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
-select a,hex(b) from t1 order by b;
-a hex(b)
-1 61626364656667
-2 6465666768696A6B
-6 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1
-7 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2
-update t1 set b = 'three' where a = 6;
-drop table t1;
-create table t1(a int not null, b text(110),primary key(a,b(100))) engine=innodb default charset=utf8;
-insert into t1 values(1,'abcdefg'),(2,'defghijk');
-insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
-insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
-select a,hex(b) from t1 order by b;
-a hex(b)
-1 61626364656667
-2 6465666768696A6B
-6 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1
-7 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2
-update t1 set b = 'three' where a = 6;
-drop table t1;
CREATE TABLE t1(a INT, PRIMARY KEY(a)) ENGINE=InnoDB;
CREATE TABLE t2(a INT) ENGINE=InnoDB;
ALTER TABLE t2 ADD FOREIGN KEY (a) REFERENCES t1(a);
diff --git a/mysql-test/r/innodb_gis.result b/mysql-test/r/innodb_gis.result
index e714dbeffc0..a65155909f1 100644
--- a/mysql-test/r/innodb_gis.result
+++ b/mysql-test/r/innodb_gis.result
@@ -450,7 +450,7 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert IGNORE into t1 (a) values ('Garbage');
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
-create table t1 (pk integer primary key auto_increment, fl geometry);
+create table t1 (pk integer primary key auto_increment, fl geometry not null);
insert into t1 (fl) values (1);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (1.11);
@@ -458,7 +458,7 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (pointfromtext('point(1,1)'));
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR 23000: Column 'fl' cannot be null
drop table t1;
create table t1 (g geometry not null, spatial gk(g)) engine=innodb;
ERROR HY000: The used table type doesn't support SPATIAL indexes
diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result
index b039ee49235..2ddd904c5ea 100644
--- a/mysql-test/r/insert.result
+++ b/mysql-test/r/insert.result
@@ -383,3 +383,4 @@ id data
7 130
8 140
9 150
+drop table t1;
diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result
index fbddc6ffeab..0a45aa2eb9b 100644
--- a/mysql-test/r/join.result
+++ b/mysql-test/r/join.result
@@ -701,7 +701,7 @@ select * from information_schema.statistics join information_schema.columns
using(table_name,column_name) where table_name='user';
TABLE_NAME COLUMN_NAME TABLE_CATALOG TABLE_SCHEMA NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT TABLE_CATALOG TABLE_SCHEMA ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
user Host NULL mysql 0 mysql PRIMARY 1 A NULL NULL NULL BTREE NULL mysql 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI #
-user User NULL mysql 0 mysql PRIMARY 2 A 5 NULL NULL BTREE NULL mysql 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI #
+user User NULL mysql 0 mysql PRIMARY 2 A 3 NULL NULL BTREE NULL mysql 2 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI #
drop table t1;
drop table t2;
drop table t3;
diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result
index 481b3de9f02..c8fcdf14ea0 100644
--- a/mysql-test/r/loaddata.result
+++ b/mysql-test/r/loaddata.result
@@ -148,6 +148,22 @@ select * from t1;
a b c
10 NULL Ten
15 NULL Fifteen
+show variables like "secure_file_pri%";
+Variable_name Value
+secure_file_priv MYSQLTEST_VARDIR/
+select @@secure_file_priv;
+@@secure_file_priv
+MYSQLTEST_VARDIR/
+set @@secure_file_priv= 0;
+ERROR HY000: Variable 'secure_file_priv' is a read only variable
+truncate table t1;
+load data infile 'MYSQL_TEST_DIR/Makefile' into table t1;
+ERROR HY000: The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
+select * from t1;
+a b c
+select load_file("MYSQL_TEST_DIR/Makefile");
+load_file("MYSQL_TEST_DIR/Makefile")
+NULL
drop table t1, t2;
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1);
diff --git a/mysql-test/r/log_state.result b/mysql-test/r/log_state.result
index 0547c5a5bbf..946797aeec7 100644
--- a/mysql-test/r/log_state.result
+++ b/mysql-test/r/log_state.result
@@ -94,8 +94,8 @@ Variable_name Value
log_output FILE,TABLE
set global general_log_file='/not exiting path/log.master';
ERROR 42000: Variable 'general_log_file' can't be set to the value of '/not exiting path/log.master'
-set global general_log_file='/tmp';
-ERROR 42000: Variable 'general_log_file' can't be set to the value of '/tmp'
+set global general_log_file='MYSQLTEST_VARDIR';
+ERROR 42000: Variable 'general_log_file' can't be set to the value of 'MYSQLTEST_VARDIR'
set global general_log_file='';
ERROR 42000: Variable 'general_log_file' can't be set to the value of ''
show variables like 'general_log_file';
diff --git a/mysql-test/r/mix2_myisam.result b/mysql-test/r/mix2_myisam.result
index 569eefb34ec..cabc4de8d21 100644
--- a/mysql-test/r/mix2_myisam.result
+++ b/mysql-test/r/mix2_myisam.result
@@ -2058,318 +2058,6 @@ delete t1 from t1,t2 where f1=f3 and f4='cc';
select * from t1;
f1 f2
drop table t1,t2;
-create table t1 (
-a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = MyISAM;
-create table t2 (
-a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = MyISAM;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
-insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
-insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-a hex(b) hex(c) filler
-1 61626364656667 61626364656667 boo
-4 D0B1 D0B1 eight
-4 5B 5B five
-4 E880BD E880BD four
-4 E880BDD0B1E880BD E880BDD0B1E880BD seven
-4 E880BDE880BD E880BDE880BD six
-3 71727374757677 71727374757677 three
-2 696A6B696C6D6E 696A6B696C6D6E two
-select a,hex(b),hex(c),filler from t2 order by filler;
-a hex(b) hex(c) filler
-4 05612020 05612020 email
-4 0000563001FC0563 0000563001FC0563 email
-4 05630563 05630563 email
-4 0563 0563 email
-4 0120 0120 email
-4 01FC 01FC email
-4 00E400E50068 00E400E50068 email
-4 00640065 00640065 email
-4 0000E400 0000E400 email
-1 0061006200630064006500660067 0061006200630064006500660067 one
-3 0071007200730074007500760077 0071007200730074007500760077 three
-2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
-drop table t1;
-drop table t2;
-create table t1 (
-a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = MyISAM;
-create table t2 (
-a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = MyISAM;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
-insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
-insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-a hex(b) hex(c) filler
-1 61626364656667 61626364656667 boo
-4 D0B1 D0B1 eight
-4 5B 5B five
-4 E880BD E880BD four
-4 E880BDD0B1E880BD E880BDD0B1E880BD seven
-4 E880BDE880BD E880BDE880BD six
-3 71727374757677 71727374757677 three
-2 696A6B696C6D6E 696A6B696C6D6E two
-select a,hex(b),hex(c),filler from t2 order by filler;
-a hex(b) hex(c) filler
-4 05612020 05612020 email
-4 0000563001FC0563 0000563001FC0563 email
-4 05630563 05630563 email
-4 0563 0563 email
-4 0120 0120 email
-4 01FC 01FC email
-4 00E400E50068 00E400E50068 email
-4 00640065 00640065 email
-4 0000E400 0000E400 email
-1 0061006200630064006500660067 0061006200630064006500660067 one
-3 0071007200730074007500760077 0071007200730074007500760077 three
-2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
-drop table t1;
-drop table t2;
-create table t1 (
-a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = MyISAM;
-create table t2 (
-a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = MyISAM;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
-insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
-insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-a hex(b) hex(c) filler
-1 61626364656667 61626364656667 boo
-4 D0B1 D0B1 eight
-4 5B 5B five
-4 E880BD E880BD four
-4 E880BDD0B1E880BD E880BDD0B1E880BD seven
-4 E880BDE880BD E880BDE880BD six
-3 71727374757677 71727374757677 three
-2 696A6B696C6D6E 696A6B696C6D6E two
-select a,hex(b),hex(c),filler from t2 order by filler;
-a hex(b) hex(c) filler
-4 0000E400 0000E400 email
-4 00640065 00640065 email
-4 00E400E50068 00E400E50068 email
-4 01FC 01FC email
-4 0120 0120 email
-4 0563 0563 email
-4 05630563 05630563 email
-4 0000563001FC0563 0000563001FC0563 email
-4 05612020 05612020 email
-1 0061006200630064006500660067 0061006200630064006500660067 one
-3 0071007200730074007500760077 0071007200730074007500760077 three
-2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
-drop table t1;
-drop table t2;
-create table t1 (
-a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = MyISAM;
-create table t2 (
-a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = MyISAM;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-a hex(b) hex(c) filler
-1 61626364656667 61626364656667 boo
-4 D0B1 D0B1 eight
-4 5B 5B five
-4 E880BD E880BD four
-3 71727374757677 71727374757677 three
-2 696A6B696C6D6E 696A6B696C6D6E two
-select a,hex(b),hex(c),filler from t2 order by filler;
-a hex(b) hex(c) filler
-4 0000E400 0000E400 email
-4 00640065 00640065 email
-4 00E400E50068 00E400E50068 email
-4 01FC 01FC email
-4 0120 0120 email
-4 0563 0563 email
-4 05612020 05612020 email
-1 61626364656667 61626364656667 one
-3 71727374757677 71727374757677 three
-2 696A6B696C6D6E 696A6B696C6D6E two
-drop table t1;
-drop table t2;
-commit;
-CREATE TABLE t1 (
-ind enum('0','1','2') NOT NULL default '0',
-string1 varchar(250) NOT NULL,
-PRIMARY KEY (ind)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-CREATE TABLE t2 (
-ind enum('0','1','2') NOT NULL default '0',
-string1 varchar(250) NOT NULL,
-PRIMARY KEY (ind)
-) ENGINE=MyISAM DEFAULT CHARSET=ucs2;
-INSERT INTO t1 VALUES ('1', ''),('2', '');
-INSERT INTO t2 VALUES ('1', ''),('2', '');
-SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
-hex(ind) hex(string1)
-31
-32
-SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
-hex(ind) hex(string1)
-0031
-0032
-drop table t1,t2;
-CREATE TABLE t1 (
-ind set('0','1','2') NOT NULL default '0',
-string1 varchar(250) NOT NULL,
-PRIMARY KEY (ind)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-CREATE TABLE t2 (
-ind set('0','1','2') NOT NULL default '0',
-string1 varchar(250) NOT NULL,
-PRIMARY KEY (ind)
-) ENGINE=MyISAM DEFAULT CHARSET=ucs2;
-INSERT INTO t1 VALUES ('1', ''),('2', '');
-INSERT INTO t2 VALUES ('1', ''),('2', '');
-SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
-hex(ind) hex(string1)
-31
-32
-SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
-hex(ind) hex(string1)
-0031
-0032
-drop table t1,t2;
-CREATE TABLE t1 (
-ind bit not null,
-string1 varchar(250) NOT NULL,
-PRIMARY KEY (ind)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-CREATE TABLE t2 (
-ind bit not null,
-string1 varchar(250) NOT NULL,
-PRIMARY KEY (ind)
-) ENGINE=MyISAM DEFAULT CHARSET=ucs2;
-insert into t1 values(0,''),(1,'');
-insert into t2 values(0,''),(1,'');
-select hex(ind),hex(string1) from t1 order by string1;
-hex(ind) hex(string1)
-0
-1
-select hex(ind),hex(string1) from t2 order by string1;
-hex(ind) hex(string1)
-0
-1
-drop table t1,t2;
-create table t2 (
-a int, b char(10), filler char(10), primary key(a, b(2))
-) character set utf8 engine = MyISAM;
-insert into t2 values (1,'abcdefg','one');
-insert into t2 values (2,'ijkilmn','two');
-insert into t2 values (3, 'qrstuvw','three');
-update t2 set a=5, filler='booo' where a=1;
-drop table t2;
-create table t2 (
-a int, b char(10), filler char(10), primary key(a, b(2))
-) character set ucs2 engine = MyISAM;
-insert into t2 values (1,'abcdefg','one');
-insert into t2 values (2,'ijkilmn','two');
-insert into t2 values (3, 'qrstuvw','three');
-update t2 set a=5, filler='booo' where a=1;
-drop table t2;
-create table t1(a int not null, b char(110),primary key(a,b(100))) engine=MyISAM default charset=utf8;
-insert into t1 values(1,'abcdefg'),(2,'defghijk');
-insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
-insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
-select a,hex(b) from t1 order by b;
-a hex(b)
-1 61626364656667
-2 6465666768696A6B
-6 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1
-7 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2
-update t1 set b = 'three' where a = 6;
-drop table t1;
-create table t1(a int not null, b text(110),primary key(a,b(100))) engine=MyISAM default charset=utf8;
-insert into t1 values(1,'abcdefg'),(2,'defghijk');
-insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
-insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
-select a,hex(b) from t1 order by b;
-a hex(b)
-1 61626364656667
-2 6465666768696A6B
-6 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1
-7 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2
-update t1 set b = 'three' where a = 6;
-drop table t1;
create table t1(a int not null, b int, c int, d int, primary key(a)) engine=MyISAM;
insert into t1(a) values (1),(2),(3);
commit;
diff --git a/mysql-test/r/mix2_myisam_ucs2.result b/mysql-test/r/mix2_myisam_ucs2.result
new file mode 100644
index 00000000000..830d3b87eb5
--- /dev/null
+++ b/mysql-test/r/mix2_myisam_ucs2.result
@@ -0,0 +1,312 @@
+create table t1 (
+a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = MyISAM;
+create table t2 (
+a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = MyISAM;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+a hex(b) hex(c) filler
+1 61626364656667 61626364656667 boo
+4 D0B1 D0B1 eight
+4 5B 5B five
+4 E880BD E880BD four
+4 E880BDD0B1E880BD E880BDD0B1E880BD seven
+4 E880BDE880BD E880BDE880BD six
+3 71727374757677 71727374757677 three
+2 696A6B696C6D6E 696A6B696C6D6E two
+select a,hex(b),hex(c),filler from t2 order by filler;
+a hex(b) hex(c) filler
+4 05612020 05612020 email
+4 0000563001FC0563 0000563001FC0563 email
+4 05630563 05630563 email
+4 0563 0563 email
+4 0120 0120 email
+4 01FC 01FC email
+4 00E400E50068 00E400E50068 email
+4 00640065 00640065 email
+4 0000E400 0000E400 email
+1 0061006200630064006500660067 0061006200630064006500660067 one
+3 0071007200730074007500760077 0071007200730074007500760077 three
+2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
+drop table t1;
+drop table t2;
+create table t1 (
+a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = MyISAM;
+create table t2 (
+a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = MyISAM;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+a hex(b) hex(c) filler
+1 61626364656667 61626364656667 boo
+4 D0B1 D0B1 eight
+4 5B 5B five
+4 E880BD E880BD four
+4 E880BDD0B1E880BD E880BDD0B1E880BD seven
+4 E880BDE880BD E880BDE880BD six
+3 71727374757677 71727374757677 three
+2 696A6B696C6D6E 696A6B696C6D6E two
+select a,hex(b),hex(c),filler from t2 order by filler;
+a hex(b) hex(c) filler
+4 05612020 05612020 email
+4 0000563001FC0563 0000563001FC0563 email
+4 05630563 05630563 email
+4 0563 0563 email
+4 0120 0120 email
+4 01FC 01FC email
+4 00E400E50068 00E400E50068 email
+4 00640065 00640065 email
+4 0000E400 0000E400 email
+1 0061006200630064006500660067 0061006200630064006500660067 one
+3 0071007200730074007500760077 0071007200730074007500760077 three
+2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
+drop table t1;
+drop table t2;
+create table t1 (
+a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = MyISAM;
+create table t2 (
+a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = MyISAM;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+a hex(b) hex(c) filler
+1 61626364656667 61626364656667 boo
+4 D0B1 D0B1 eight
+4 5B 5B five
+4 E880BD E880BD four
+4 E880BDD0B1E880BD E880BDD0B1E880BD seven
+4 E880BDE880BD E880BDE880BD six
+3 71727374757677 71727374757677 three
+2 696A6B696C6D6E 696A6B696C6D6E two
+select a,hex(b),hex(c),filler from t2 order by filler;
+a hex(b) hex(c) filler
+4 0000E400 0000E400 email
+4 00640065 00640065 email
+4 00E400E50068 00E400E50068 email
+4 01FC 01FC email
+4 0120 0120 email
+4 0563 0563 email
+4 05630563 05630563 email
+4 0000563001FC0563 0000563001FC0563 email
+4 05612020 05612020 email
+1 0061006200630064006500660067 0061006200630064006500660067 one
+3 0071007200730074007500760077 0071007200730074007500760077 three
+2 0069006A006B0069006C006D006E 0069006A006B0069006C006D006E two
+drop table t1;
+drop table t2;
+create table t1 (
+a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = MyISAM;
+create table t2 (
+a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = MyISAM;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+a hex(b) hex(c) filler
+1 61626364656667 61626364656667 boo
+4 D0B1 D0B1 eight
+4 5B 5B five
+4 E880BD E880BD four
+3 71727374757677 71727374757677 three
+2 696A6B696C6D6E 696A6B696C6D6E two
+select a,hex(b),hex(c),filler from t2 order by filler;
+a hex(b) hex(c) filler
+4 0000E400 0000E400 email
+4 00640065 00640065 email
+4 00E400E50068 00E400E50068 email
+4 01FC 01FC email
+4 0120 0120 email
+4 0563 0563 email
+4 05612020 05612020 email
+1 61626364656667 61626364656667 one
+3 71727374757677 71727374757677 three
+2 696A6B696C6D6E 696A6B696C6D6E two
+drop table t1;
+drop table t2;
+commit;
+CREATE TABLE t1 (
+ind enum('0','1','2') NOT NULL default '0',
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+ind enum('0','1','2') NOT NULL default '0',
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=MyISAM DEFAULT CHARSET=ucs2;
+INSERT INTO t1 VALUES ('1', ''),('2', '');
+INSERT INTO t2 VALUES ('1', ''),('2', '');
+SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
+hex(ind) hex(string1)
+31
+32
+SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
+hex(ind) hex(string1)
+0031
+0032
+drop table t1,t2;
+CREATE TABLE t1 (
+ind set('0','1','2') NOT NULL default '0',
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+ind set('0','1','2') NOT NULL default '0',
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=MyISAM DEFAULT CHARSET=ucs2;
+INSERT INTO t1 VALUES ('1', ''),('2', '');
+INSERT INTO t2 VALUES ('1', ''),('2', '');
+SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
+hex(ind) hex(string1)
+31
+32
+SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
+hex(ind) hex(string1)
+0031
+0032
+drop table t1,t2;
+CREATE TABLE t1 (
+ind bit not null,
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+ind bit not null,
+string1 varchar(250) NOT NULL,
+PRIMARY KEY (ind)
+) ENGINE=MyISAM DEFAULT CHARSET=ucs2;
+insert into t1 values(0,''),(1,'');
+insert into t2 values(0,''),(1,'');
+select hex(ind),hex(string1) from t1 order by string1;
+hex(ind) hex(string1)
+0
+1
+select hex(ind),hex(string1) from t2 order by string1;
+hex(ind) hex(string1)
+0
+1
+drop table t1,t2;
+create table t2 (
+a int, b char(10), filler char(10), primary key(a, b(2))
+) character set utf8 engine = MyISAM;
+insert into t2 values (1,'abcdefg','one');
+insert into t2 values (2,'ijkilmn','two');
+insert into t2 values (3, 'qrstuvw','three');
+update t2 set a=5, filler='booo' where a=1;
+drop table t2;
+create table t2 (
+a int, b char(10), filler char(10), primary key(a, b(2))
+) character set ucs2 engine = MyISAM;
+insert into t2 values (1,'abcdefg','one');
+insert into t2 values (2,'ijkilmn','two');
+insert into t2 values (3, 'qrstuvw','three');
+update t2 set a=5, filler='booo' where a=1;
+drop table t2;
+create table t1(a int not null, b char(110),primary key(a,b(100))) engine=MyISAM default charset=utf8;
+insert into t1 values(1,'abcdefg'),(2,'defghijk');
+insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
+insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
+select a,hex(b) from t1 order by b;
+a hex(b)
+1 61626364656667
+2 6465666768696A6B
+6 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1
+7 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2
+update t1 set b = 'three' where a = 6;
+drop table t1;
+create table t1(a int not null, b text(110),primary key(a,b(100))) engine=MyISAM default charset=utf8;
+insert into t1 values(1,'abcdefg'),(2,'defghijk');
+insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
+insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
+select a,hex(b) from t1 order by b;
+a hex(b)
+1 61626364656667
+2 6465666768696A6B
+6 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1
+7 D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2
+update t1 set b = 'three' where a = 6;
+drop table t1;
diff --git a/mysql-test/r/mysql.result b/mysql-test/r/mysql.result
index 3bba1944c52..e83bbe97eaa 100644
--- a/mysql-test/r/mysql.result
+++ b/mysql-test/r/mysql.result
@@ -61,16 +61,6 @@ database()
test
unlock tables;
drop table t1;
-\
-\
-c_cp932
-\
-\
-\
-ソ
-ソ
-\
-\
+----------------------+------------+--------+
| concat('>',col1,'<') | col2 | col3 |
+----------------------+------------+--------+
diff --git a/mysql-test/r/mysql_cp932.result b/mysql-test/r/mysql_cp932.result
new file mode 100644
index 00000000000..e15c97720cd
--- /dev/null
+++ b/mysql-test/r/mysql_cp932.result
@@ -0,0 +1,10 @@
+\
+\
+c_cp932
+\
+\
+\
+ソ
+ソ
+\
+\
diff --git a/mysql-test/r/mysql_upgrade.result b/mysql-test/r/mysql_upgrade.result
index a65020754be..e24580632c9 100644
--- a/mysql-test/r/mysql_upgrade.result
+++ b/mysql-test/r/mysql_upgrade.result
@@ -1,3 +1,133 @@
Run mysql_upgrade once
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.general_log OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.host OK
+mysql.ndb_binlog_index OK
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.servers OK
+mysql.slow_log OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.user OK
+@hadGrantPriv:=1
+1
+1
+1
+@hadShowDbPriv:=1
+1
+1
+1
+@hadCreateViewPriv:=1
+1
+1
+1
+@hadCreateRoutinePriv:=1
+1
+1
+1
+@hadCreateUserPriv:=1
+1
+1
+1
+@hadEventPriv :=1
+1
+1
+1
+@hadTriggerPriv :=1
+1
+1
+1
Run it again - should say already completed
+@hadGrantPriv:=1
+1
+1
+1
+@hadShowDbPriv:=1
+1
+1
+1
+@hadCreateViewPriv:=1
+1
+1
+1
+@hadCreateRoutinePriv:=1
+1
+1
+1
+@hadCreateUserPriv:=1
+1
+1
+1
+@hadEventPriv :=1
+1
+1
+1
+@hadTriggerPriv :=1
+1
+1
+1
Force should run it regardless of wheter it's been run before
+mysql.columns_priv OK
+mysql.db OK
+mysql.event OK
+mysql.func OK
+mysql.general_log OK
+mysql.help_category OK
+mysql.help_keyword OK
+mysql.help_relation OK
+mysql.help_topic OK
+mysql.host OK
+mysql.ndb_binlog_index OK
+mysql.plugin OK
+mysql.proc OK
+mysql.procs_priv OK
+mysql.servers OK
+mysql.slow_log OK
+mysql.tables_priv OK
+mysql.time_zone OK
+mysql.time_zone_leap_second OK
+mysql.time_zone_name OK
+mysql.time_zone_transition OK
+mysql.time_zone_transition_type OK
+mysql.user OK
+@hadGrantPriv:=1
+1
+1
+1
+@hadShowDbPriv:=1
+1
+1
+1
+@hadCreateViewPriv:=1
+1
+1
+1
+@hadCreateRoutinePriv:=1
+1
+1
+1
+@hadCreateUserPriv:=1
+1
+1
+1
+@hadEventPriv :=1
+1
+1
+1
+@hadTriggerPriv :=1
+1
+1
+1
diff --git a/mysql-test/r/mysqlbinlog-cp932.result b/mysql-test/r/mysqlbinlog-cp932.result
new file mode 100644
index 00000000000..1640a3b1642
--- /dev/null
+++ b/mysql-test/r/mysqlbinlog-cp932.result
@@ -0,0 +1,19 @@
+flush logs;
+create table t3 (f text character set utf8);
+create table t4 (f text character set cp932);
+flush logs;
+rename table t3 to t03, t4 to t04;
+select HEX(f) from t03;
+HEX(f)
+E382BD
+select HEX(f) from t3;
+HEX(f)
+E382BD
+select HEX(f) from t04;
+HEX(f)
+835C
+select HEX(f) from t4;
+HEX(f)
+835C
+drop table t3, t4, t03, t04;
+End of 5.0 tests
diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result
index 73e60f833c7..6265f927231 100644
--- a/mysql-test/r/mysqlbinlog.result
+++ b/mysql-test/r/mysqlbinlog.result
@@ -194,24 +194,6 @@ ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
drop table t1,t2;
flush logs;
-create table t3 (f text character set utf8);
-create table t4 (f text character set cp932);
-flush logs;
-rename table t3 to t03, t4 to t04;
-select HEX(f) from t03;
-HEX(f)
-E382BD
-select HEX(f) from t3;
-HEX(f)
-E382BD
-select HEX(f) from t04;
-HEX(f)
-835C
-select HEX(f) from t4;
-HEX(f)
-835C
-drop table t3,t4,t03,t04;
-flush logs;
flush logs;
select * from t5 /* must be (1),(1) */;
a
@@ -332,3 +314,4 @@ DELIMITER ;
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
flush logs;
+End of 5.0 tests
diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result
index 21d8336c119..0188fe87bbd 100644
--- a/mysql-test/r/mysqltest.result
+++ b/mysql-test/r/mysqltest.result
@@ -210,7 +210,6 @@ source database
"MySQL: The world's most popular ;open source database"
echo message echo message
-mysqltest: At line 1: Empty variable
mysqltest: At line 1: command "false" failed
mysqltest: At line 1: Missing argument in exec
MySQL
@@ -518,8 +517,10 @@ drop table t1;
mysqltest: At line 1: Missing required argument 'filename' to command 'remove_file'
mysqltest: At line 1: Missing required argument 'filename' to command 'write_file'
mysqltest: At line 1: End of file encountered before 'EOF' delimiter was found
-mysqltest: At line 1: End of line junk detected: "write_file filename ";
-"
+Some data
+for cat_file command
+of mysqltest
+mysqltest: At line 1: Failed to open file non_existing_file
mysqltest: At line 1: Missing required argument 'filename' to command 'file_exists'
mysqltest: At line 1: Missing required argument 'from_file' to command 'copy_file'
mysqltest: At line 1: Missing required argument 'to_file' to command 'copy_file'
diff --git a/mysql-test/r/ndb_gis.result b/mysql-test/r/ndb_gis.result
index ecdba448f1b..23341ee0216 100644
--- a/mysql-test/r/ndb_gis.result
+++ b/mysql-test/r/ndb_gis.result
@@ -450,7 +450,7 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert IGNORE into t1 (a) values ('Garbage');
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
-create table t1 (pk integer primary key auto_increment, fl geometry);
+create table t1 (pk integer primary key auto_increment, fl geometry not null);
insert into t1 (fl) values (1);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (1.11);
@@ -458,7 +458,7 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (pointfromtext('point(1,1)'));
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR 23000: Column 'fl' cannot be null
drop table t1;
set engine_condition_pushdown = on;
DROP TABLE IF EXISTS t1, gis_point, gis_line, gis_polygon, gis_multi_point, gis_multi_line, gis_multi_polygon, gis_geometrycollection, gis_geometry;
@@ -912,7 +912,7 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert IGNORE into t1 (a) values ('Garbage');
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1;
-create table t1 (pk integer primary key auto_increment, fl geometry);
+create table t1 (pk integer primary key auto_increment, fl geometry not null);
insert into t1 (fl) values (1);
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (1.11);
@@ -920,5 +920,5 @@ ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values ("qwerty");
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
insert into t1 (fl) values (pointfromtext('point(1,1)'));
-ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
+ERROR 23000: Column 'fl' cannot be null
drop table t1;
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index a056e1244e6..b48e87de38e 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -874,6 +874,30 @@ num (select num + 2 FROM t1 LIMIT 1)
SELECT a.a + 1 AS num FROM t1 a JOIN t1 b ON num = b.a;
ERROR 42S22: Unknown column 'num' in 'on clause'
DROP TABLE t1;
+CREATE TABLE bug25126 (
+val int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY
+);
+UPDATE bug25126 SET MissingCol = MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'field list'
+UPDATE bug25126 SET val = val ORDER BY MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+UPDATE bug25126 SET val = val ORDER BY val;
+UPDATE bug25126 SET val = 1 ORDER BY val;
+UPDATE bug25126 SET val = 1 ORDER BY MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+UPDATE bug25126 SET val = 1 ORDER BY val, MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+UPDATE bug25126 SET val = MissingCol ORDER BY MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+UPDATE bug25126 SET MissingCol = 1 ORDER BY val, MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+UPDATE bug25126 SET MissingCol = 1 ORDER BY MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+UPDATE bug25126 SET MissingCol = val ORDER BY MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+UPDATE bug25126 SET MissingCol = MissingCol ORDER BY MissingCol;
+ERROR 42S22: Unknown column 'MissingCol' in 'order clause'
+DROP TABLE bug25126;
CREATE TABLE t1 (a int);
SELECT p.a AS val, q.a AS val1 FROM t1 p, t1 q ORDER BY val > 1;
val val1
diff --git a/mysql-test/r/outfile.result b/mysql-test/r/outfile.result
index 040dff576f8..023c4ea205f 100644
--- a/mysql-test/r/outfile.result
+++ b/mysql-test/r/outfile.result
Binary files differ
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result
index 2bfd6d31ac9..af7a762c5a8 100644
--- a/mysql-test/r/ps_2myisam.result
+++ b/mysql-test/r/ps_2myisam.result
@@ -3046,25 +3046,25 @@ test_sequence
-- select .. where date/time column = .. --
set @arg00= '1991-01-01 01:01:01' ;
select 'true' as found from t9
-where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01' ;
found
true
select 'true' as found from t9
-where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01'" ;
execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
@@ -3078,7 +3078,7 @@ c17= CAST('1991-01-01 01:01:01' as datetime) ;
found
true
select 'true' as found from t9
-where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
@@ -3092,7 +3092,7 @@ execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result
index 607a0426bd7..8c0b9f1e19b 100644
--- a/mysql-test/r/ps_3innodb.result
+++ b/mysql-test/r/ps_3innodb.result
@@ -3029,25 +3029,25 @@ test_sequence
-- select .. where date/time column = .. --
set @arg00= '1991-01-01 01:01:01' ;
select 'true' as found from t9
-where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01' ;
found
true
select 'true' as found from t9
-where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01'" ;
execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
@@ -3061,7 +3061,7 @@ c17= CAST('1991-01-01 01:01:01' as datetime) ;
found
true
select 'true' as found from t9
-where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
@@ -3075,7 +3075,7 @@ execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result
index f4eec0c610c..7ad6e3ea722 100644
--- a/mysql-test/r/ps_4heap.result
+++ b/mysql-test/r/ps_4heap.result
@@ -3030,25 +3030,25 @@ test_sequence
-- select .. where date/time column = .. --
set @arg00= '1991-01-01 01:01:01' ;
select 'true' as found from t9
-where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01' ;
found
true
select 'true' as found from t9
-where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01'" ;
execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
@@ -3062,7 +3062,7 @@ c17= CAST('1991-01-01 01:01:01' as datetime) ;
found
true
select 'true' as found from t9
-where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
@@ -3076,7 +3076,7 @@ execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result
index 38e4626d59c..1e2c27e6e4f 100644
--- a/mysql-test/r/ps_5merge.result
+++ b/mysql-test/r/ps_5merge.result
@@ -2966,25 +2966,25 @@ test_sequence
-- select .. where date/time column = .. --
set @arg00= '1991-01-01 01:01:01' ;
select 'true' as found from t9
-where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01' ;
found
true
select 'true' as found from t9
-where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01'" ;
execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
@@ -2998,7 +2998,7 @@ c17= CAST('1991-01-01 01:01:01' as datetime) ;
found
true
select 'true' as found from t9
-where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
@@ -3012,7 +3012,7 @@ execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
@@ -5980,25 +5980,25 @@ test_sequence
-- select .. where date/time column = .. --
set @arg00= '1991-01-01 01:01:01' ;
select 'true' as found from t9
-where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01' ;
found
true
select 'true' as found from t9
-where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01'" ;
execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
@@ -6012,7 +6012,7 @@ c17= CAST('1991-01-01 01:01:01' as datetime) ;
found
true
select 'true' as found from t9
-where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
@@ -6026,7 +6026,7 @@ execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
diff --git a/mysql-test/r/ps_7ndb.result b/mysql-test/r/ps_7ndb.result
index 432a07df9d0..e43f6b4ed6c 100644
--- a/mysql-test/r/ps_7ndb.result
+++ b/mysql-test/r/ps_7ndb.result
@@ -3029,25 +3029,25 @@ test_sequence
-- select .. where date/time column = .. --
set @arg00= '1991-01-01 01:01:01' ;
select 'true' as found from t9
-where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01' ;
found
true
select 'true' as found from t9
-where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= '1991-01-01 01:01:01' and c14= '1991-01-01 01:01:01' and
+where c1= 20 and c13= CAST('1991-01-01 01:01:01' AS DATE) and c14= '1991-01-01 01:01:01' and
c15= '1991-01-01 01:01:01' and c16= '1991-01-01 01:01:01' and
c17= '1991-01-01 01:01:01'" ;
execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
@@ -3061,7 +3061,7 @@ c17= CAST('1991-01-01 01:01:01' as datetime) ;
found
true
select 'true' as found from t9
-where c1= 20 and c13= @arg00 and c14= @arg00 and c15= @arg00 and c16= @arg00
+where c1= 20 and c13= CAST(@arg00 AS DATE) and c14= @arg00 and c15= @arg00 and c16= @arg00
and c17= @arg00 ;
found
true
@@ -3075,7 +3075,7 @@ execute stmt1 ;
found
true
prepare stmt1 from "select 'true' as found from t9
-where c1= 20 and c13= ? and c14= ? and c15= ? and c16= ? and c17= ?" ;
+where c1= 20 and c13= CAST(? AS DATE) and c14= ? and c15= ? and c16= ? and c17= ?" ;
execute stmt1 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
found
true
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index 54b35827cea..49f70290d0e 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -624,7 +624,7 @@ word
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 1
-load data infile 'TEST_DIR/std_data/words.dat' into table t1;
+load data infile 'MYSQLTEST_VARDIR/std_data_ln/words.dat' into table t1;
show status like "Qcache_queries_in_cache";
Variable_name Value
Qcache_queries_in_cache 0
diff --git a/mysql-test/r/rpl_ndb_log.result b/mysql-test/r/rpl_ndb_log.result
index 66db8c24bb2..543af3b9abe 100644
--- a/mysql-test/r/rpl_ndb_log.result
+++ b/mysql-test/r/rpl_ndb_log.result
@@ -139,9 +139,9 @@ set insert_id=5;
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-slave-bin.000001 # Table_map 2 # table_id: # (test.t1)
-slave-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F
+master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
+master-bin.000001 # Table_map 1 # table_id: # (test.t1)
+master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
select * from t1;
a b
1 1
diff --git a/mysql-test/r/rpl_read_only.result b/mysql-test/r/rpl_read_only.result
index 0b06a3d414a..6b1404b4f68 100644
--- a/mysql-test/r/rpl_read_only.result
+++ b/mysql-test/r/rpl_read_only.result
@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
+create user test;
create table t1(a int) engine=InnoDB;
create table t2(a int) engine=MyISAM;
insert into t1 values(1001);
@@ -109,5 +110,7 @@ insert into t1 values(1006);
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
insert into t2 values(2006);
ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
+drop user test;
drop table t1;
drop table t2;
+set global read_only=0;
diff --git a/mysql-test/r/rpl_row_NOW.result b/mysql-test/r/rpl_row_NOW.result
index ed045efa7af..23f95878608 100644
--- a/mysql-test/r/rpl_row_NOW.result
+++ b/mysql-test/r/rpl_row_NOW.result
@@ -26,3 +26,4 @@ END|
INSERT INTO mysqltest1.t1 SET n = NULL, a = now();
DROP TABLE IF EXISTS mysqltest1.t1;
DROP FUNCTION mysqltest1.f1;
+DROP DATABASE mysqltest1;
diff --git a/mysql-test/r/rpl_row_USER.result b/mysql-test/r/rpl_row_USER.result
index c061ccbdc62..98755fb4653 100644
--- a/mysql-test/r/rpl_row_USER.result
+++ b/mysql-test/r/rpl_row_USER.result
@@ -22,15 +22,17 @@ CALL mysqltest1.p1();
SELECT * FROM mysqltest1.t1 ORDER BY a;
a users
1 tester@localhost
-2 @localhost
+2 @localhost%
3 tester@localhost
-4 @localhost
+4 @localhost%
SELECT * FROM mysqltest1.t1 ORDER BY a;
a users
1 tester@localhost
-2 @localhost
+2 @localhost%
3 tester@localhost
-4 @localhost
+4 @localhost%
DROP DATABASE mysqltest1;
REVOKE ALL ON mysqltest1.* FROM 'tester'@'%';
REVOKE ALL ON mysqltest1.* FROM ''@'localhost%';
+DROP USER tester@'%';
+DROP USER ''@'localhost%';
diff --git a/mysql-test/r/rpl_row_basic_11bugs.result b/mysql-test/r/rpl_row_basic_11bugs.result
index 8af2e8639aa..6f7bd6e3f85 100644
--- a/mysql-test/r/rpl_row_basic_11bugs.result
+++ b/mysql-test/r/rpl_row_basic_11bugs.result
@@ -97,6 +97,7 @@ a
7
8
9
+SET GLOBAL QUERY_CACHE_SIZE=0;
================ Test for BUG#22550 ================
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
@@ -118,3 +119,4 @@ HEX(a) b
SELECT HEX(a),b FROM t1;
HEX(a) b
0 2
+DROP TABLE t1;
diff --git a/mysql-test/r/rpl_row_func002.result b/mysql-test/r/rpl_row_func002.result
index e65c0a35180..03f5b3115c3 100644
--- a/mysql-test/r/rpl_row_func002.result
+++ b/mysql-test/r/rpl_row_func002.result
@@ -23,3 +23,4 @@ SET TIMESTAMP=333300000;
INSERT INTO test.t2 VALUES (null,f1(),CURRENT_TIMESTAMP);
DROP FUNCTION test.f1;
DROP TABLE test.t1;
+DROP TABLE test.t2;
diff --git a/mysql-test/r/rpl_row_log.result b/mysql-test/r/rpl_row_log.result
index 89163e1e37b..c6b85e7b329 100644
--- a/mysql-test/r/rpl_row_log.result
+++ b/mysql-test/r/rpl_row_log.result
@@ -107,9 +107,9 @@ set insert_id=5;
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-slave-bin.000001 # Table_map 2 # table_id: # (test.t1)
-slave-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F
+master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
+master-bin.000001 # Table_map 1 # table_id: # (test.t1)
+master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
select * from t1;
a b
1 1
diff --git a/mysql-test/r/rpl_row_log_innodb.result b/mysql-test/r/rpl_row_log_innodb.result
index 3bcd8a6a0fb..bc13047f973 100644
--- a/mysql-test/r/rpl_row_log_innodb.result
+++ b/mysql-test/r/rpl_row_log_innodb.result
@@ -115,9 +115,9 @@ set insert_id=5;
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-slave-bin.000001 # Table_map 2 # table_id: # (test.t1)
-slave-bin.000001 # Write_rows 2 # table_id: # flags: STMT_END_F
+master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
+master-bin.000001 # Table_map 1 # table_id: # (test.t1)
+master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
select * from t1;
a b
1 1
diff --git a/mysql-test/r/rpl_row_sp008.result b/mysql-test/r/rpl_row_sp008.result
index 2026ba8a03a..23197964a24 100644
--- a/mysql-test/r/rpl_row_sp008.result
+++ b/mysql-test/r/rpl_row_sp008.result
@@ -31,3 +31,4 @@ a
2
DROP PROCEDURE IF EXISTS test.p1;
DROP TABLE IF EXISTS test.t1;
+DROP TABLE IF EXISTS test.t2;
diff --git a/mysql-test/r/rpl_row_sp012.result b/mysql-test/r/rpl_row_sp012.result
index 28da1c3208e..b9c818bad9a 100644
--- a/mysql-test/r/rpl_row_sp012.result
+++ b/mysql-test/r/rpl_row_sp012.result
@@ -56,3 +56,4 @@ DROP PROCEDURE IF EXISTS test.p3;
DROP PROCEDURE IF EXISTS test.p2;
DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2;
+DROP USER user1@localhost;
diff --git a/mysql-test/r/rpl_row_tabledefs_2myisam.result b/mysql-test/r/rpl_row_tabledefs_2myisam.result
index 700163fa3d1..d62650fa142 100644
--- a/mysql-test/r/rpl_row_tabledefs_2myisam.result
+++ b/mysql-test/r/rpl_row_tabledefs_2myisam.result
@@ -5,6 +5,7 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
STOP SLAVE;
+SET @my_sql_mode= @@global.sql_mode;
SET GLOBAL SQL_MODE='STRICT_ALL_TABLES';
START SLAVE;
CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='MyISAM';
@@ -379,3 +380,4 @@ a b x
**** Cleanup ****
DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef;
DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9;
+SET @@global.sql_mode= @my_sql_mode;
diff --git a/mysql-test/r/rpl_row_tabledefs_3innodb.result b/mysql-test/r/rpl_row_tabledefs_3innodb.result
index 29901c51124..0c3bb734e95 100644
--- a/mysql-test/r/rpl_row_tabledefs_3innodb.result
+++ b/mysql-test/r/rpl_row_tabledefs_3innodb.result
@@ -5,6 +5,7 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
STOP SLAVE;
+SET @my_sql_mode= @@global.sql_mode;
SET GLOBAL SQL_MODE='STRICT_ALL_TABLES';
START SLAVE;
CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='InnoDB';
@@ -379,3 +380,4 @@ a b x
**** Cleanup ****
DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef;
DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9;
+SET @@global.sql_mode= @my_sql_mode;
diff --git a/mysql-test/r/rpl_row_tabledefs_7ndb.result b/mysql-test/r/rpl_row_tabledefs_7ndb.result
index 0d0da3b6185..5876a0e1b65 100644
--- a/mysql-test/r/rpl_row_tabledefs_7ndb.result
+++ b/mysql-test/r/rpl_row_tabledefs_7ndb.result
@@ -5,6 +5,7 @@ reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
STOP SLAVE;
+SET @my_sql_mode= @@global.sql_mode;
SET GLOBAL SQL_MODE='STRICT_ALL_TABLES';
START SLAVE;
CREATE TABLE t1_int (a INT PRIMARY KEY, b INT) ENGINE='NDB';
@@ -284,3 +285,4 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef;
DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t9;
+SET @@global.sql_mode= @my_sql_mode;
diff --git a/mysql-test/r/rpl_row_view01.result b/mysql-test/r/rpl_row_view01.result
index 0006ec99f5e..a4b8d0a05e3 100644
--- a/mysql-test/r/rpl_row_view01.result
+++ b/mysql-test/r/rpl_row_view01.result
@@ -98,3 +98,4 @@ DROP TABLE IF EXISTS mysqltest1.t3;
DROP TABLE IF EXISTS mysqltest1.t1;
DROP TABLE IF EXISTS mysqltest1.t2;
DROP TABLE IF EXISTS mysqltest1.t4;
+DROP DATABASE mysqltest1;
diff --git a/mysql-test/r/rpl_slave_status.result b/mysql-test/r/rpl_slave_status.result
index 641a65f5ed7..c7a5d32ddd7 100644
--- a/mysql-test/r/rpl_slave_status.result
+++ b/mysql-test/r/rpl_slave_status.result
@@ -53,4 +53,5 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master NULL
drop table t1;
+delete from mysql.user where user='rpl';
drop table t1;
diff --git a/mysql-test/r/rpl_stm_log.result b/mysql-test/r/rpl_stm_log.result
index e0b1aa12c9b..496685981aa 100644
--- a/mysql-test/r/rpl_stm_log.result
+++ b/mysql-test/r/rpl_stm_log.result
@@ -105,10 +105,10 @@ set insert_id=5;
insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id());
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
-slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
-slave-bin.000001 # Intvar 2 # LAST_INSERT_ID=1
-slave-bin.000001 # Intvar 2 # INSERT_ID=5
-slave-bin.000001 # Query 2 # use `test`; insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id())
+master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
+master-bin.000001 # Intvar 1 # LAST_INSERT_ID=1
+master-bin.000001 # Intvar 1 # INSERT_ID=5
+master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id())
select * from t1;
a b
1 1
diff --git a/mysql-test/r/rpl_switch_stm_row_mixed.result b/mysql-test/r/rpl_switch_stm_row_mixed.result
index 48b228550a7..fe0d986eba6 100644
--- a/mysql-test/r/rpl_switch_stm_row_mixed.result
+++ b/mysql-test/r/rpl_switch_stm_row_mixed.result
@@ -7,6 +7,7 @@ start slave;
drop database if exists mysqltest1;
create database mysqltest1;
use mysqltest1;
+set @my_binlog_format= @@global.binlog_format;
set session binlog_format=mixed;
show session variables like "binlog_format%";
Variable_name Value
@@ -1025,3 +1026,4 @@ master-bin.000001 # Query 1 # use `mysqltest1`; CREATE TABLE t12 (data LONG)
master-bin.000001 # Table_map 1 # table_id: # (mysqltest1.t12)
master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
drop database mysqltest1;
+set global binlog_format =@my_binlog_format;
diff --git a/mysql-test/r/sp-security.result b/mysql-test/r/sp-security.result
index 7729890ff02..b2fdf6a864e 100644
--- a/mysql-test/r/sp-security.result
+++ b/mysql-test/r/sp-security.result
@@ -45,7 +45,7 @@ db1_secret
select * from db1_secret.t1;
ERROR 42000: SELECT command denied to user ''@'localhost' for table 't1'
create procedure db1_secret.dummy() begin end;
-ERROR 42000: Access denied for user ''@'localhost' to database 'db1_secret'
+ERROR 42000: Access denied for user ''@'%' to database 'db1_secret'
drop procedure db1_secret.dummy;
ERROR 42000: PROCEDURE db1_secret.dummy does not exist
select * from t1;
@@ -76,9 +76,9 @@ ERROR 42000: Access denied for user 'user1'@'localhost' to database 'db1_secret'
select db1_secret.db();
ERROR 42000: Access denied for user 'user1'@'localhost' to database 'db1_secret'
call db1_secret.stamp(6);
-ERROR 42000: Access denied for user ''@'localhost' to database 'db1_secret'
+ERROR 42000: Access denied for user ''@'%' to database 'db1_secret'
select db1_secret.db();
-ERROR 42000: Access denied for user ''@'localhost' to database 'db1_secret'
+ERROR 42000: Access denied for user ''@'%' to database 'db1_secret'
drop database if exists db2;
create database db2;
use db2;
diff --git a/mysql-test/r/sp-ucs2.result b/mysql-test/r/sp-ucs2.result
new file mode 100644
index 00000000000..ce6be5b0a65
--- /dev/null
+++ b/mysql-test/r/sp-ucs2.result
@@ -0,0 +1,14 @@
+drop function if exists bug17615|
+create table t3 (a varchar(256) unicode)|
+create function bug17615() returns varchar(256) unicode
+begin
+declare tmp_res varchar(256) unicode;
+set tmp_res= 'foo string';
+return tmp_res;
+end|
+insert into t3 values(bug17615())|
+select * from t3|
+a
+foo string
+drop function bug17615|
+drop table t3|
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 9b96781b58a..c73a44042c3 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -4718,20 +4718,6 @@ Handler
Inner
drop procedure bug15011|
drop table t3|
-drop function if exists bug17615|
-create table t3 (a varchar(256) unicode)|
-create function bug17615() returns varchar(256) unicode
-begin
-declare tmp_res varchar(256) unicode;
-set tmp_res= 'foo string';
-return tmp_res;
-end|
-insert into t3 values(bug17615())|
-select * from t3|
-a
-foo string
-drop function bug17615|
-drop table t3|
drop procedure if exists bug17476|
create table t3 ( d date )|
insert into t3 values
@@ -5819,6 +5805,7 @@ bug23760_rc_test(ROW_COUNT())
DROP TABLE bug23760, bug23760_log|
DROP PROCEDURE bug23760_update_log|
DROP PROCEDURE bug23760_test_row_count|
+DROP PROCEDURE bug23760_test_row_count2|
DROP FUNCTION bug23760_rc_test|
DROP PROCEDURE IF EXISTS bug24117|
DROP TABLE IF EXISTS t3|
diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result
index 5e5bc7682d3..869efb535e6 100644
--- a/mysql-test/r/type_blob.result
+++ b/mysql-test/r/type_blob.result
@@ -506,26 +506,26 @@ create table t1 (id integer auto_increment unique,imagem LONGBLOB not null defau
Warnings:
Warning 1101 BLOB/TEXT column 'imagem' can't have a default value
insert into t1 (id) values (1);
-select
-charset(load_file('../../std_data/words.dat')),
-collation(load_file('../../std_data/words.dat')),
-coercibility(load_file('../../std_data/words.dat'));
-charset(load_file('../../std_data/words.dat')) collation(load_file('../../std_data/words.dat')) coercibility(load_file('../../std_data/words.dat'))
+select
+charset(load_file('../std_data_ln/words.dat')),
+collation(load_file('../std_data_ln/words.dat')),
+coercibility(load_file('../std_data_ln/words.dat'));
+charset(load_file('../std_data_ln/words.dat')) collation(load_file('../std_data_ln/words.dat')) coercibility(load_file('../std_data_ln/words.dat'))
binary binary 4
-explain extended select
-charset(load_file('../../std_data/words.dat')),
-collation(load_file('../../std_data/words.dat')),
-coercibility(load_file('../../std_data/words.dat'));
+explain extended select
+charset(load_file('MYSQLTEST_VARDIR/std_data_ln/words.dat')),
+collation(load_file('MYSQLTEST_VARDIR/std_data_ln/words.dat')),
+coercibility(load_file('MYSQLTEST_VARDIR/std_data_ln/words.dat'));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select charset(load_file(_latin1'../../std_data/words.dat')) AS `charset(load_file('../../std_data/words.dat'))`,collation(load_file(_latin1'../../std_data/words.dat')) AS `collation(load_file('../../std_data/words.dat'))`,coercibility(load_file(_latin1'../../std_data/words.dat')) AS `coercibility(load_file('../../std_data/words.dat'))`
-update t1 set imagem=load_file('../../std_data/words.dat') where id=1;
+Note 1003 select charset(load_file(_latin1'MYSQLTEST_VARDIR/std_data_ln/words.dat')) AS `charset(load_file('MYSQLTEST_VARDIR/std_data_ln/words.dat'))`,collation(load_file(_latin1'MYSQLTEST_VARDIR/std_data_ln/words.dat')) AS `collation(load_file('MYSQLTEST_VARDIR/std_data_ln/words.dat'))`,coercibility(load_file(_latin1'MYSQLTEST_VARDIR/std_data_ln/words.dat')) AS `coercibility(load_file('MYSQLTEST_VARDIR/std_data_ln/words.dat'))`
+update t1 set imagem=load_file('MYSQLTEST_VARDIR/std_data_ln/words.dat') where id=1;
select if(imagem is null, "ERROR", "OK"),length(imagem) from t1 where id = 1;
if(imagem is null, "ERROR", "OK") length(imagem)
OK 581
drop table t1;
-create table t1 select load_file('../../std_data/words.dat') l;
+create table t1 select load_file('MYSQLTEST_VARDIR/std_data_ln/words.dat') l;
show full fields from t1;
Field Type Collation Null Key Default Extra Privileges Comment
l longblob NULL YES NULL #
diff --git a/mysql-test/r/varbinary.result b/mysql-test/r/varbinary.result
index e1ac58ecd52..583d3046ea7 100644
--- a/mysql-test/r/varbinary.result
+++ b/mysql-test/r/varbinary.result
@@ -78,3 +78,4 @@ alter table t1 modify a varchar(255);
select length(a) from t1;
length(a)
6
+drop table t1;
diff --git a/mysql-test/r/variables.result b/mysql-test/r/variables.result
index ec4c7c9b2aa..6927f07da6b 100644
--- a/mysql-test/r/variables.result
+++ b/mysql-test/r/variables.result
@@ -9,12 +9,11 @@ set @my_key_buffer_size =@@global.key_buffer_size;
set @my_max_binlog_cache_size =@@global.max_binlog_cache_size;
set @my_max_binlog_size =@@global.max_binlog_size;
set @my_max_connect_errors =@@global.max_connect_errors;
+set @my_max_connections =@@global.max_connections;
set @my_max_delayed_threads =@@global.max_delayed_threads;
set @my_max_heap_table_size =@@global.max_heap_table_size;
set @my_max_insert_delayed_threads=@@global.max_insert_delayed_threads;
set @my_max_join_size =@@global.max_join_size;
-set @my_max_user_connections =@@global.max_user_connections;
-set @my_max_write_lock_count =@@global.max_write_lock_count;
set @my_myisam_data_pointer_size =@@global.myisam_data_pointer_size;
set @my_net_buffer_length =@@global.net_buffer_length;
set @my_net_write_timeout =@@global.net_write_timeout;
@@ -903,6 +902,14 @@ select @@&;
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 '&' at line 1
select @@@;
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 '@' at line 1
+select @@hostname;
+@@hostname
+#
+set @@hostname= "anothername";
+ERROR HY000: Variable 'hostname' is a read only variable
+show variables like 'hostname';
+Variable_name Value
+hostname #
End of 5.0 tests
set global binlog_cache_size =@my_binlog_cache_size;
set global connect_timeout =@my_connect_timeout;
@@ -914,12 +921,13 @@ set global key_buffer_size =@my_key_buffer_size;
set global max_binlog_cache_size =default;
set global max_binlog_size =@my_max_binlog_size;
set global max_connect_errors =@my_max_connect_errors;
+set global max_connections =@my_max_connections;
set global max_delayed_threads =@my_max_delayed_threads;
set global max_heap_table_size =@my_max_heap_table_size;
set global max_insert_delayed_threads=@my_max_insert_delayed_threads;
set global max_join_size =@my_max_join_size;
-set global max_user_connections =@my_max_user_connections;
-set global max_write_lock_count =@my_max_write_lock_count;
+set global max_user_connections =default;
+set global max_write_lock_count =default;
set global myisam_data_pointer_size =@my_myisam_data_pointer_size;
set global net_buffer_length =@my_net_buffer_length;
set global net_write_timeout =@my_net_write_timeout;
diff --git a/mysql-test/t/bootstrap.test b/mysql-test/t/bootstrap.test
new file mode 100644
index 00000000000..1c2952e93d0
--- /dev/null
+++ b/mysql-test/t/bootstrap.test
@@ -0,0 +1,46 @@
+#
+# test mysqld in bootstrap mode
+#
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+
+
+#
+# Check that --bootstrap reads from stdin
+#
+--write_file $MYSQLTEST_VARDIR/tmp/bootstrap.sql
+use test;
+CREATE TABLE t1(a int);
+EOF
+--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/bootstrap.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
+drop table t1;
+
+#
+# Check that --bootstrap of file with SQL error returns error
+#
+--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql
+use test;
+CREATE TABLE t1;
+EOF
+--error 1
+--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/bootstrap_error.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
+# Table t1 should not exists
+--error 1051
+drop table t1;
+
+#
+# Bootstrap with a query larger than 2*thd->net.max_packet
+#
+set @my_max_allowed_packet= @@max_allowed_packet;
+set global max_allowed_packet=100*@@max_allowed_packet;
+--disable_query_log
+create table t1 select 2 as a, concat(repeat('MySQL', @@max_allowed_packet/10), ';') as b;
+eval select * into outfile '$MYSQLTEST_VARDIR/tmp/long_query.sql' from t1;
+--enable_query_log
+--error 1
+--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/long_query.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
+
+set global max_allowed_packet=@my_max_allowed_packet;
+drop table t1;
+
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index b4837b4ccbb..ffdcee06488 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -410,12 +410,14 @@ select database();
drop database mysqltest;
select database();
-# Connect without a database
+# Connect without a database as user mysqltest_1
+create user mysqltest_1;
connect (user1,localhost,mysqltest_1,,*NO-ONE*);
connection user1;
select database(), user();
connection default;
disconnect user1;
+drop user mysqltest_1;
use test;
#
diff --git a/mysql-test/t/csv.test b/mysql-test/t/csv.test
index c7d34a43d95..62482d576b2 100644
--- a/mysql-test/t/csv.test
+++ b/mysql-test/t/csv.test
@@ -1406,7 +1406,7 @@ DROP TABLE test_repair_table;
#
CREATE TABLE test_repair_table2 ( val integer ) ENGINE = CSV;
---exec rm $MYSQLTEST_VARDIR/master-data/test/test_repair_table2.CSM
+--remove_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table2.CSM
# Should give a warning and perform autorepair. We also disable ps-protocol
# here, as mysql-test eats up warnings in ps-protocol mode
@@ -1416,15 +1416,19 @@ SELECT * from test_repair_table2;
--enable_ps_protocol
# this should work ok, as the table is already repaired
SELECT * from test_repair_table2;
-# check that the metafile appeared again. chop the path to it
---exec ls $MYSQLTEST_VARDIR/master-data/test/test_repair_table2.CSM | perl -pi -e "s/.*\///"
+# check that the metafile appeared again.
+--file_exists $MYSQLTEST_VARDIR/master-data/test/test_repair_table2.CSM
CHECK TABLE test_repair_table2;
DROP TABLE test_repair_table2;
# Corrupt csv file and see if we can repair it
CREATE TABLE test_repair_table3 ( val integer ) ENGINE = CSV;
---exec perl -e 'print "\"1\"\n\"4\"\n\"3";' > $MYSQLTEST_VARDIR/master-data/test/test_repair_table3.CSV
+--write_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table3.CSV
+"1"
+"4"
+"3
+EOF
CHECK TABLE test_repair_table3;
REPAIR TABLE test_repair_table3;
SELECT * FROM test_repair_table3;
@@ -1439,7 +1443,7 @@ CREATE TABLE test_repair_table4 (
founded char(4) DEFAULT '' NOT NULL
) ENGINE = CSV;
---exec rm $MYSQLTEST_VARDIR/master-data/test/test_repair_table4.CSM
+--remove_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table4.CSM
--disable_ps_protocol
SELECT * FROM test_repair_table4;
--enable_ps_protocol
@@ -1472,7 +1476,9 @@ CREATE TABLE test_repair_table5 (
) ENGINE = CSV;
# Corrupt a table -- put a file with wrong # of columns
---exec perl -e 'print "\"1\",\"101\",\"IBM\"\n";' > $MYSQLTEST_VARDIR/master-data/test/test_repair_table5.CSV
+--write_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table5.CSV
+"1","101","IBM"
+EOF
CHECK TABLE test_repair_table5;
REPAIR TABLE test_repair_table5;
@@ -1481,7 +1487,9 @@ INSERT INTO test_repair_table5 VALUES (1, 102, "CORRECT", 1876);
SELECT * FROM test_repair_table5;
# Corrupt a table -- put a row with wrong # of columns at end of file
---exec perl -e 'print "\"1\",\"101\",\"IBM\"\n";' >> $MYSQLTEST_VARDIR/master-data/test/test_repair_table5.CSV
+--append_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table5.CSV
+"1","101","IBM"
+EOF
FLUSH TABLES;
CHECK TABLE test_repair_table5;
@@ -1492,7 +1500,9 @@ INSERT INTO test_repair_table5 VALUES (1, 102, "CORRECT2", 1876);
SELECT * FROM test_repair_table5;
# Corrupt table again -- put a row with wrong # of columns at end of file
---exec perl -e 'print "\"1\",\"101\",\"IBM\"\n";' >> $MYSQLTEST_VARDIR/master-data/test/test_repair_table5.CSV
+--append_file $MYSQLTEST_VARDIR/master-data/test/test_repair_table5.CSV
+"1","101","IBM"
+EOF
FLUSH TABLES;
CHECK TABLE test_repair_table5;
@@ -1573,13 +1583,15 @@ drop table t1;
create table bug15205 (val int(11) default null) engine=csv;
create table bug15205_2 (val int(11) default null) engine=csv;
---exec rm $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV
+--remove_file $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV
# system error (can't open the datafile)
--replace_result $MYSQLTEST_VARDIR . master-data/ ''
--error 13
select * from bug15205;
select * from bug15205_2;
---exec touch $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV
+# Create empty file
+--write_file $MYSQLTEST_VARDIR/master-data/test/bug15205.CSV
+EOF
select * from bug15205;
drop table bug15205;
drop table bug15205_2;
@@ -1595,14 +1607,22 @@ insert into bug22080_1 values(1,'string');
insert into bug22080_1 values(2,'string');
insert into bug22080_1 values(3,'string');
-# Currupt the file as described in the bug report
---exec sed -e 's/2/2"/' $MYSQLTEST_VARDIR/master-data/test/bug22080_1.CSV > $MYSQLTEST_VARDIR/master-data/test/bug22080_2.CSV
---exec sed -e 's/2","/2",/' $MYSQLTEST_VARDIR/master-data/test/bug22080_1.CSV > $MYSQLTEST_VARDIR/master-data/test/bug22080_3.CSV
+# Create first corrupt file as described in bug report
+--write_file $MYSQLTEST_VARDIR/master-data/test/bug22080_2.CSV
+1,"string"
+2","string"
+3,"string"
+EOF
+
+# Create second corrupt file as described in bug report
+--write_file $MYSQLTEST_VARDIR/master-data/test/bug22080_3.CSV
+1,"string"
+"2",string"
+3,"string"
+EOF
---exec cat $MYSQLTEST_VARDIR/master-data/test/bug22080_2.CSV
check table bug22080_2;
---exec cat $MYSQLTEST_VARDIR/master-data/test/bug22080_3.CSV
check table bug22080_3;
drop tables bug22080_1,bug22080_2,bug22080_3;
diff --git a/mysql-test/t/ctype_ucs2_def-master.opt b/mysql-test/t/ctype_ucs2_def-master.opt
index a0b5b061860..84d2a52b639 100644
--- a/mysql-test/t/ctype_ucs2_def-master.opt
+++ b/mysql-test/t/ctype_ucs2_def-master.opt
@@ -1 +1 @@
---default-collation=ucs2_unicode_ci --default-character-set=ucs2
+--default-collation=ucs2_unicode_ci --default-character-set=ucs2,latin1
diff --git a/mysql-test/t/ctype_ucs2_def.test b/mysql-test/t/ctype_ucs2_def.test
index 00f636d79dc..e435d1fb07d 100644
--- a/mysql-test/t/ctype_ucs2_def.test
+++ b/mysql-test/t/ctype_ucs2_def.test
@@ -1,3 +1,5 @@
+-- source include/have_ucs2.inc
+
#
# MySQL Bug#15276: MySQL ignores collation-server
#
diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test
index 3ad33dddcbe..4d8a8e3c3af 100644
--- a/mysql-test/t/derived.test
+++ b/mysql-test/t/derived.test
@@ -99,7 +99,8 @@ SELECT a.x FROM (SELECT 1 AS x) AS a HAVING a.x = 1;
#
# Test for select if database is not selected.
#
-# Connect without a database
+# Connect without a database as user mysqltest_1
+create user mysqltest_1;
create table t1 select 1 as a;
connect (con1,localhost,mysqltest_1,,*NO-ONE*,$MASTER_MYPORT,$MASTER_MYSOCK);
connection con1;
@@ -271,4 +272,8 @@ select t2.* from ((select * from t1) as A inner join t2 on A.ID = t2.FID);
select t2.* from (select * from t1) as A inner join t2 on A.ID = t2.FID;
drop table t1, t2;
+disconnect con1;
+connection default;
+drop user mysqltest_1;
+
# End of 4.1 tests
diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
index 2d37ab0b2c5..769c9ab1512 100644
--- a/mysql-test/t/disabled.def
+++ b/mysql-test/t/disabled.def
@@ -35,7 +35,6 @@ synchronization : Bug#24529 Test 'synchronization' fails on Mac pushb
#ndb_binlog_discover : bug#21806 2006-08-24
#ndb_autodiscover3 : bug#21806
-mysql_upgrade : Bug#25074 mysql_upgrade gives inconsisten results
plugin : Bug#25659 memory leak via "plugins" test
rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly
ndb_alter_table : Bug##25774 ndb_alter_table.test fails in DBUG_ASSERT() on Linux x64
diff --git a/mysql-test/t/events_logs_tests.test b/mysql-test/t/events_logs_tests.test
index e45fea1dfad..64ce4a5c3df 100644
--- a/mysql-test/t/events_logs_tests.test
+++ b/mysql-test/t/events_logs_tests.test
@@ -104,3 +104,5 @@ SET GLOBAL long_query_time =@old_global_long_query_time;
SET SESSION long_query_time =@old_session_long_query_time;
DROP DATABASE events_test;
+
+SET GLOBAL event_scheduler=off;
diff --git a/mysql-test/t/events_scheduling.test b/mysql-test/t/events_scheduling.test
index 0002cf9f29f..e3b55685e65 100644
--- a/mysql-test/t/events_scheduling.test
+++ b/mysql-test/t/events_scheduling.test
@@ -63,3 +63,4 @@ DROP TABLE table_2;
DROP TABLE table_3;
DROP TABLE table_4;
DROP DATABASE events_test;
+SET GLOBAL event_scheduler=OFF;
diff --git a/mysql-test/t/func_group.test b/mysql-test/t/func_group.test
index cae3d91071a..4989199f3aa 100644
--- a/mysql-test/t/func_group.test
+++ b/mysql-test/t/func_group.test
@@ -754,7 +754,7 @@ insert into bug22555 values (1,53,78,53,78,53,78),(2,17,78,17,78,17,78),(3,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(*), round(std(o1/o2), 16) 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;
@@ -762,14 +762,14 @@ 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(*), round(std(o1/o2), 16) 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(*), round(std(o1/o2), 16) 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;
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 535af6907ad..ddab3d03454 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -1115,4 +1115,26 @@ select repeat('a', cast(2 as unsigned int));
select rpad('abc', cast(5 as unsigned integer), 'x');
select lpad('abc', cast(5 as unsigned integer), 'x');
+
+#
+# Bug #25197 :repeat function returns null when using table field directly as count
+#
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+
+CREATE TABLE `t1` (
+ `id` varchar(20) NOT NULL,
+ `tire` tinyint(3) unsigned NOT NULL,
+ PRIMARY KEY (`id`)
+);
+
+INSERT INTO `t1` (`id`, `tire`) VALUES ('A', 0), ('B', 1),('C', 2);
+
+SELECT REPEAT( '#', tire ) AS A,
+ REPEAT( '#', tire % 999 ) AS B, tire FROM `t1`;
+
+DROP TABLE t1;
+
--echo End of 5.0 tests
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 9e5a3012934..4b952b66ff3 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -571,6 +571,13 @@ union
select last_day('0000-00-00');
+#
+# Bug 23616: datetime functions with double argumets
+#
+
+select isnull(week(now() + 0)), isnull(week(now() + 0.2)),
+ week(20061108), week(20061108.01), week(20061108085411.000002);
+
--echo End of 4.1 tests
explain extended select timestampdiff(SQL_TSI_WEEK, '2001-02-01', '2001-05-01') as a1,
@@ -694,6 +701,19 @@ set time_zone= @@global.time_zone;
select str_to_date('10:00 PM', '%h:%i %p') + INTERVAL 10 MINUTE;
#
+# Bug #21103: DATE column not compared as DATE
+#
+
+create table t1 (field DATE);
+insert into t1 values ('2006-11-06');
+select * from t1 where field < '2006-11-06 04:08:36.0';
+select * from t1 where field = '2006-11-06 04:08:36.0';
+select * from t1 where field = '2006-11-06';
+select * from t1 where CAST(field as DATETIME) < '2006-11-06 04:08:36.0';
+select * from t1 where CAST(field as DATE) < '2006-11-06 04:08:36.0';
+drop table t1;
+
+#
# Bug #25643: SEC_TO_TIME function problem
#
CREATE TABLE t1 (a int, t1 time, t2 time, d date, PRIMARY KEY (a));
@@ -704,6 +724,13 @@ SELECT t1, t2, SEC_TO_TIME( TIME_TO_SEC( t2 ) - TIME_TO_SEC( t1 ) ), QUARTER(d)
SELECT t1, t2, SEC_TO_TIME( TIME_TO_SEC( t2 ) - TIME_TO_SEC( t1 ) ), QUARTER(d)
FROM t1 ORDER BY a DESC;
DROP TABLE t1;
+
+#
+# Bug #20293: group by cuts off value from time_format
+#
+# Check if using GROUP BY with TIME_FORMAT() produces correct results
+
+SELECT TIME_FORMAT(SEC_TO_TIME(a),"%H:%i:%s") FROM (SELECT 3020399 AS a UNION SELECT 3020398 ) x GROUP BY 1;
--echo End of 5.0 tests
#
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index 51dec7d2b81..7ae6e3adda7 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -360,14 +360,14 @@ t1 where object_id=85984;
drop table t1;
-create table t1 (fl geometry);
+create table t1 (fl geometry not null);
--error 1416
insert into t1 values (1);
--error 1416
insert into t1 values (1.11);
--error 1416
insert into t1 values ("qwerty");
---error 1416
+--error 1048
insert into t1 values (pointfromtext('point(1,1)'));
drop table t1;
@@ -389,7 +389,41 @@ load data infile '../std_data_ln/bad_gis_data.dat' into table t1;
alter table t1 enable keys;
drop table t1;
-# End of 4.1 tests
+#
+# Bug #26038: is null and bad data
+#
+
+create table t1 (a int, b blob);
+insert into t1 values (1, ''), (2, NULL), (3, '1');
+select * from t1;
+
+select
+ geometryfromtext(b) IS NULL, geometryfromwkb(b) IS NULL, astext(b) IS NULL,
+ aswkb(b) IS NULL, geometrytype(b) IS NULL, centroid(b) IS NULL,
+ envelope(b) IS NULL, startpoint(b) IS NULL, endpoint(b) IS NULL,
+ exteriorring(b) IS NULL, pointn(b, 1) IS NULL, geometryn(b, 1) IS NULL,
+ interiorringn(b, 1) IS NULL, multipoint(b) IS NULL, isempty(b) IS NULL,
+ issimple(b) IS NULL, isclosed(b) IS NULL, dimension(b) IS NULL,
+ numgeometries(b) IS NULL, numinteriorrings(b) IS NULL, numpoints(b) IS NULL,
+ area(b) IS NULL, glength(b) IS NULL, srid(b) IS NULL, x(b) IS NULL,
+ y(b) IS NULL
+from t1;
+
+select
+ within(b, b) IS NULL, contains(b, b) IS NULL, overlaps(b, b) IS NULL,
+ equals(b, b) IS NULL, disjoint(b, b) IS NULL, touches(b, b) IS NULL,
+ intersects(b, b) IS NULL, crosses(b, b) IS NULL
+from t1;
+
+select
+ point(b, b) IS NULL, linestring(b) IS NULL, polygon(b) IS NULL, multipoint(b) IS NULL,
+ multilinestring(b) IS NULL, multipolygon(b) IS NULL,
+ geometrycollection(b) IS NULL
+from t1;
+
+drop table t1;
+
+--echo End of 4.1 tests
#
# Bug #12281 (Geometry: crash in trigger)
diff --git a/mysql-test/t/grant2.test b/mysql-test/t/grant2.test
index a533af995dc..866c5a8a4b3 100644
--- a/mysql-test/t/grant2.test
+++ b/mysql-test/t/grant2.test
@@ -395,6 +395,8 @@ delete from mysql.user where user like 'mysqltest\_1';
flush privileges;
drop database mysqltest_1;
+--source include/add_anonymous_users.inc
+
# But anonymous users can't change their password
connect (n5,localhost,test,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connection n5;
@@ -403,6 +405,8 @@ set password = password("changed");
disconnect n5;
connection default;
+--source include/delete_anonymous_users.inc
+
# Bug #12423 "Deadlock when doing FLUSH PRIVILEGES and GRANT in
# multi-threaded environment". We should be able to execute FLUSH
diff --git a/mysql-test/t/grant_cache.test b/mysql-test/t/grant_cache.test
index 7e17a03ec21..c2e31621744 100644
--- a/mysql-test/t/grant_cache.test
+++ b/mysql-test/t/grant_cache.test
@@ -2,6 +2,8 @@
-- source include/not_embedded.inc
-- source include/have_query_cache.inc
+--source include/add_anonymous_users.inc
+
#
# Test grants with query cache
#
@@ -71,6 +73,7 @@ show status like "Qcache_queries_in_cache";
show status like "Qcache_hits";
show status like "Qcache_not_cached";
+
# Don't use '' as user because it will pick Unix login
connect (unkuser,localhost,unkuser,,,$MASTER_MYPORT,$MASTER_MYSOCK);
connection unkuser;
@@ -150,4 +153,7 @@ drop database mysqltest;
set GLOBAL query_cache_size=default;
+--source include/delete_anonymous_users.inc
+
+
# End of 4.1 tests
diff --git a/mysql-test/t/init_connect.test b/mysql-test/t/init_connect.test
index cf98f608982..c9a18a4003d 100644
--- a/mysql-test/t/init_connect.test
+++ b/mysql-test/t/init_connect.test
@@ -2,6 +2,8 @@
# Test of init_connect variable
#
+--source include/add_anonymous_users.inc
+
# should work with embedded server after mysqltest is fixed
-- source include/not_embedded.inc
connect (con0,localhost,root,,);
@@ -41,6 +43,8 @@ disconnect con3;
disconnect con4;
disconnect con5;
+--source include/delete_anonymous_users.inc
+
--echo End of 4.1 tests
#
# Test 5.* features
diff --git a/mysql-test/t/innodb-ucs2.test b/mysql-test/t/innodb-ucs2.test
new file mode 100644
index 00000000000..6647a9d0845
--- /dev/null
+++ b/mysql-test/t/innodb-ucs2.test
@@ -0,0 +1,226 @@
+-- source include/have_innodb.inc
+-- source include/have_ucs2.inc
+
+#
+# BUG 14056 Column prefix index on UTF-8 primary key column causes: Can't find record..
+#
+
+create table t1 (
+ a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+ a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+select a,hex(b),hex(c),filler from t2 order by filler;
+drop table t1;
+drop table t2;
+
+create table t1 (
+ a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+ a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+select a,hex(b),hex(c),filler from t2 order by filler;
+drop table t1;
+drop table t2;
+
+create table t1 (
+ a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+ a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
+insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
+insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+select a,hex(b),hex(c),filler from t2 order by filler;
+drop table t1;
+drop table t2;
+
+create table t1 (
+ a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
+) character set utf8 engine = innodb;
+create table t2 (
+ a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
+) character set ucs2 engine = innodb;
+insert into t1 values (1,'abcdefg','abcdefg','one');
+insert into t1 values (2,'ijkilmn','ijkilmn','two');
+insert into t1 values (3,'qrstuvw','qrstuvw','three');
+insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
+insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
+insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
+insert into t2 values (1,'abcdefg','abcdefg','one');
+insert into t2 values (2,'ijkilmn','ijkilmn','two');
+insert into t2 values (3,'qrstuvw','qrstuvw','three');
+insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
+insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
+insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
+insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
+insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
+insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
+insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
+update t1 set filler = 'boo' where a = 1;
+update t2 set filler ='email' where a = 4;
+select a,hex(b),hex(c),filler from t1 order by filler;
+select a,hex(b),hex(c),filler from t2 order by filler;
+drop table t1;
+drop table t2;
+commit;
+
+#
+# Test cases for bug #15308 Problem of Order with Enum Column in Primary Key
+#
+CREATE TABLE t1 (
+ ind enum('0','1','2') NOT NULL default '0',
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+ ind enum('0','1','2') NOT NULL default '0',
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
+
+INSERT INTO t1 VALUES ('1', ''),('2', '');
+INSERT INTO t2 VALUES ('1', ''),('2', '');
+SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
+SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
+drop table t1,t2;
+
+CREATE TABLE t1 (
+ ind set('0','1','2') NOT NULL default '0',
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+ ind set('0','1','2') NOT NULL default '0',
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
+
+INSERT INTO t1 VALUES ('1', ''),('2', '');
+INSERT INTO t2 VALUES ('1', ''),('2', '');
+SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
+SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
+drop table t1,t2;
+
+CREATE TABLE t1 (
+ ind bit not null,
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+CREATE TABLE t2 (
+ ind bit not null,
+ string1 varchar(250) NOT NULL,
+ PRIMARY KEY (ind)
+) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
+insert into t1 values(0,''),(1,'');
+insert into t2 values(0,''),(1,'');
+select hex(ind),hex(string1) from t1 order by string1;
+select hex(ind),hex(string1) from t2 order by string1;
+drop table t1,t2;
+
+# tests for bug #14056 Column prefix index on UTF-8 primary key column causes 'Can't find record..'
+
+create table t2 (
+ a int, b char(10), filler char(10), primary key(a, b(2))
+) character set utf8 engine = innodb;
+
+insert into t2 values (1,'abcdefg','one');
+insert into t2 values (2,'ijkilmn','two');
+insert into t2 values (3, 'qrstuvw','three');
+update t2 set a=5, filler='booo' where a=1;
+drop table t2;
+create table t2 (
+ a int, b char(10), filler char(10), primary key(a, b(2))
+) character set ucs2 engine = innodb;
+
+insert into t2 values (1,'abcdefg','one');
+insert into t2 values (2,'ijkilmn','two');
+insert into t2 values (3, 'qrstuvw','three');
+update t2 set a=5, filler='booo' where a=1;
+drop table t2;
+
+create table t1(a int not null, b char(110),primary key(a,b(100))) engine=innodb default charset=utf8;
+insert into t1 values(1,'abcdefg'),(2,'defghijk');
+insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
+insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
+select a,hex(b) from t1 order by b;
+update t1 set b = 'three' where a = 6;
+drop table t1;
+create table t1(a int not null, b text(110),primary key(a,b(100))) engine=innodb default charset=utf8;
+insert into t1 values(1,'abcdefg'),(2,'defghijk');
+insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
+insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
+select a,hex(b) from t1 order by b;
+update t1 set b = 'three' where a = 6;
+drop table t1;
+
+--echo End of 5.0 tests
diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test
index 27116b1345b..0937b4fd30d 100644
--- a/mysql-test/t/innodb.test
+++ b/mysql-test/t/innodb.test
@@ -1630,139 +1630,6 @@ connection default;
disconnect a;
disconnect b;
-#
-# BUG 14056 Column prefix index on UTF-8 primary key column causes: Can't find record..
-#
-
-create table t1 (
- a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = innodb;
-create table t2 (
- a int, b char(10), c char(10), filler char(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = innodb;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
-insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
-insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-select a,hex(b),hex(c),filler from t2 order by filler;
-drop table t1;
-drop table t2;
-
-create table t1 (
- a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = innodb;
-create table t2 (
- a int, b varchar(10), c varchar(10), filler varchar(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = innodb;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
-insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
-insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-select a,hex(b),hex(c),filler from t2 order by filler;
-drop table t1;
-drop table t2;
-
-create table t1 (
- a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = innodb;
-create table t2 (
- a int, b text(10), c text(10), filler text(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = innodb;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xe880bde880bd,_utf8 0xe880bde880bd,'six');
-insert into t1 values (4,_utf8 0xe880bdD0B1e880bd,_utf8 0xe880bdD0B1e880bd,'seven');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05630563,_ucs2 0x05630563,'eleven');
-insert into t2 values (4,_ucs2 0x0563001fc0563,_ucs2 0x0563001fc0563,'point');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-select a,hex(b),hex(c),filler from t2 order by filler;
-drop table t1;
-drop table t2;
-
-create table t1 (
- a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
-) character set utf8 engine = innodb;
-create table t2 (
- a int, b blob(10), c blob(10), filler blob(10), primary key(a, b(2)), unique key (a, c(2))
-) character set ucs2 engine = innodb;
-insert into t1 values (1,'abcdefg','abcdefg','one');
-insert into t1 values (2,'ijkilmn','ijkilmn','two');
-insert into t1 values (3,'qrstuvw','qrstuvw','three');
-insert into t1 values (4,_utf8 0xe880bd,_utf8 0xe880bd,'four');
-insert into t1 values (4,_utf8 0x5b,_utf8 0x5b,'five');
-insert into t1 values (4,_utf8 0xD0B1,_utf8 0xD0B1,'eight');
-insert into t2 values (1,'abcdefg','abcdefg','one');
-insert into t2 values (2,'ijkilmn','ijkilmn','two');
-insert into t2 values (3,'qrstuvw','qrstuvw','three');
-insert into t2 values (4,_ucs2 0x00e400,_ucs2 0x00e400,'four');
-insert into t2 values (4,_ucs2 0x00640065,_ucs2 0x00640065,'five');
-insert into t2 values (4,_ucs2 0x00e400e50068,_ucs2 0x00e400e50068,'six');
-insert into t2 values (4,_ucs2 0x01fc,_ucs2 0x01fc,'seven');
-insert into t2 values (4,_ucs2 0x0120,_ucs2 0x0120,'eight');
-insert into t2 values (4,_ucs2 0x0563,_ucs2 0x0563,'ten');
-insert into t2 values (4,_ucs2 0x05612020,_ucs2 0x05612020,'taken');
-update t1 set filler = 'boo' where a = 1;
-update t2 set filler ='email' where a = 4;
-select a,hex(b),hex(c),filler from t1 order by filler;
-select a,hex(b),hex(c),filler from t2 order by filler;
-drop table t1;
-drop table t2;
-commit;
-
# tests for bugs #9802 and #13778
# test that FKs between invalid types are not accepted
@@ -1943,94 +1810,6 @@ select a,hex(s1) from t1;
select hex(s1) from t2;
drop table t2,t1;
-#
-# Test cases for bug #15308 Problem of Order with Enum Column in Primary Key
-#
-CREATE TABLE t1 (
- ind enum('0','1','2') NOT NULL default '0',
- string1 varchar(250) NOT NULL,
- PRIMARY KEY (ind)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-CREATE TABLE t2 (
- ind enum('0','1','2') NOT NULL default '0',
- string1 varchar(250) NOT NULL,
- PRIMARY KEY (ind)
-) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
-
-INSERT INTO t1 VALUES ('1', ''),('2', '');
-INSERT INTO t2 VALUES ('1', ''),('2', '');
-SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
-SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
-drop table t1,t2;
-
-CREATE TABLE t1 (
- ind set('0','1','2') NOT NULL default '0',
- string1 varchar(250) NOT NULL,
- PRIMARY KEY (ind)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-CREATE TABLE t2 (
- ind set('0','1','2') NOT NULL default '0',
- string1 varchar(250) NOT NULL,
- PRIMARY KEY (ind)
-) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
-
-INSERT INTO t1 VALUES ('1', ''),('2', '');
-INSERT INTO t2 VALUES ('1', ''),('2', '');
-SELECT hex(ind),hex(string1) FROM t1 ORDER BY string1;
-SELECT hex(ind),hex(string1) FROM t2 ORDER BY string1;
-drop table t1,t2;
-
-CREATE TABLE t1 (
- ind bit not null,
- string1 varchar(250) NOT NULL,
- PRIMARY KEY (ind)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-CREATE TABLE t2 (
- ind bit not null,
- string1 varchar(250) NOT NULL,
- PRIMARY KEY (ind)
-) ENGINE=InnoDB DEFAULT CHARSET=ucs2;
-insert into t1 values(0,''),(1,'');
-insert into t2 values(0,''),(1,'');
-select hex(ind),hex(string1) from t1 order by string1;
-select hex(ind),hex(string1) from t2 order by string1;
-drop table t1,t2;
-
-# tests for bug #14056 Column prefix index on UTF-8 primary key column causes 'Can't find record..'
-
-create table t2 (
- a int, b char(10), filler char(10), primary key(a, b(2))
-) character set utf8 engine = innodb;
-
-insert into t2 values (1,'abcdefg','one');
-insert into t2 values (2,'ijkilmn','two');
-insert into t2 values (3, 'qrstuvw','three');
-update t2 set a=5, filler='booo' where a=1;
-drop table t2;
-create table t2 (
- a int, b char(10), filler char(10), primary key(a, b(2))
-) character set ucs2 engine = innodb;
-
-insert into t2 values (1,'abcdefg','one');
-insert into t2 values (2,'ijkilmn','two');
-insert into t2 values (3, 'qrstuvw','three');
-update t2 set a=5, filler='booo' where a=1;
-drop table t2;
-
-create table t1(a int not null, b char(110),primary key(a,b(100))) engine=innodb default charset=utf8;
-insert into t1 values(1,'abcdefg'),(2,'defghijk');
-insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
-insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
-select a,hex(b) from t1 order by b;
-update t1 set b = 'three' where a = 6;
-drop table t1;
-create table t1(a int not null, b text(110),primary key(a,b(100))) engine=innodb default charset=utf8;
-insert into t1 values(1,'abcdefg'),(2,'defghijk');
-insert into t1 values(6,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1);
-insert into t1 values(7,_utf8 0xD0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B1D0B2);
-select a,hex(b) from t1 order by b;
-update t1 set b = 'three' where a = 6;
-drop table t1;
# Ensure that <tablename>_ibfk_0 is not mistreated as a
# generated foreign key identifier. (Bug #16387)
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test
index 0a6b081e7c3..6c076fa6dc0 100644
--- a/mysql-test/t/insert.test
+++ b/mysql-test/t/insert.test
@@ -248,3 +248,5 @@ insert ignore into t1 values(NULL,100),(NULL,110),(NULL,120);
insert ignore into t1 values(NULL,10),(NULL,20),(NULL,110),(NULL,120),(NULL,100),(NULL,90);
insert ignore into t1 values(NULL,130),(NULL,140),(500,110),(550,120),(450,100),(NULL,150);
select * from t1 order by id;
+
+drop table t1;
diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test
index aff5efa51cb..b608ab601c1 100644
--- a/mysql-test/t/loaddata.test
+++ b/mysql-test/t/loaddata.test
@@ -114,6 +114,29 @@ truncate table t1;
load data infile '../std_data_ln/rpl_loaddata.dat' into table t1 (@dummy,@n) set a= @n, c= (select str from t2 where num=@n);
select * from t1;
+#
+# Bug#18628 mysql-test-run: security problem
+#
+# It should not be possible to load from a file outside of vardir
+
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+show variables like "secure_file_pri%";
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+select @@secure_file_priv;
+--error 1238
+set @@secure_file_priv= 0;
+
+# Test "load data"
+truncate table t1;
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+--error 1290
+eval load data infile '$MYSQL_TEST_DIR/Makefile' into table t1;
+select * from t1;
+
+# Test "load_file" returns NULL
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+eval select load_file("$MYSQL_TEST_DIR/Makefile");
+
# cleanup
drop table t1, t2;
diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test
index 2b92ddf76ec..4a6b4ff5e56 100644
--- a/mysql-test/t/lock_multi.test
+++ b/mysql-test/t/lock_multi.test
@@ -123,6 +123,10 @@ drop table t1;
#
# Bug#16986 - Deadlock condition with MyISAM tables
#
+
+# Need a matching user in mysql.user for multi-table select
+--source include/add_anonymous_users.inc
+
connection locker;
use mysql;
LOCK TABLES columns_priv WRITE, db WRITE, host WRITE, user WRITE;
@@ -199,6 +203,8 @@ UNLOCK TABLES;
connection default;
DROP TABLE t1;
+--source include/delete_anonymous_users.inc
+
#
# Bug#19815 - CREATE/RENAME/DROP DATABASE can deadlock on a global read lock
#
diff --git a/mysql-test/t/log_state.test b/mysql-test/t/log_state.test
index e16256d48df..a5e00cb0387 100644
--- a/mysql-test/t/log_state.test
+++ b/mysql-test/t/log_state.test
@@ -70,12 +70,19 @@ show variables like 'general_log_file';
show variables like 'slow_query_log_file';
show variables like 'log_output';
+# Can't set general_log_file to a non existing file
--error 1231
set global general_log_file='/not exiting path/log.master';
+
+# Can't set general_log_file to a directory
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1231
-set global general_log_file='/tmp';
+eval set global general_log_file='$MYSQLTEST_VARDIR';
+
+# Can't set general_log_file to empty string
--error 1231
set global general_log_file='';
+
--replace_column 2 #
show variables like 'general_log_file';
set global general_log= OFF;
diff --git a/mysql-test/t/mix2_myisam_ucs2.test b/mysql-test/t/mix2_myisam_ucs2.test
new file mode 100644
index 00000000000..fe22fa50238
--- /dev/null
+++ b/mysql-test/t/mix2_myisam_ucs2.test
@@ -0,0 +1,27 @@
+#
+# Tests which require ucs2 character set
+#
+
+-- source include/have_ucs2.inc
+
+let $engine_type= MyISAM;
+let $other_engine_type= MEMORY;
+# There are unfortunately only MyISAM and MEMORY all time available
+# Therefore use here MEMORY again.
+let $other_engine_type1= MEMORY;
+let $other_non_trans_engine_type= MEMORY;
+let $other_non_live_chks_engine_type= MEMORY;
+# Therefore use here MyISAM again.
+let $other_live_chks_engine_type= MyISAM;
+# MyISAM does not support transactions
+let $test_transactions= 0;
+# MyISAM does not support FOREIGN KEYFOREIGN KEYs
+let $test_foreign_keys= 0;
+# MyISAM supports fulltext queries
+let $fulltext_query_unsupported= 0;
+# MyISAM internal autoincrement values are updated during updates
+let $no_autoinc_update= 0;
+# MyISAM supports keys on spatial data types
+let $no_spatial_key= 0;
+
+-- source include/mix2_ucs2.inc
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test
index 23cdb094e83..b999c5c0029 100644
--- a/mysql-test/t/mysql.test
+++ b/mysql-test/t/mysql.test
@@ -44,20 +44,6 @@ unlock tables;
drop table t1;
#
-# BUG#16217 - MySQL client misinterprets multi-byte char as escape `\'
-#
-
-# new command \C or charset
---exec $MYSQL --default-character-set=utf8 test -e "\C cp932 \g"
---exec $MYSQL --default-character-set=cp932 test -e "charset utf8;"
-
-# its usage to switch internally in mysql to requested charset
---exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select '\'; create table t1 (c_cp932 TEXT CHARACTER SET cp932); insert into t1 values('\'); select * from t1; drop table t1;"
---exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select '\'"
---exec $MYSQL --default-character-set=utf8 test -e "/*charset cp932 */; set character_set_client= cp932; select '\'"
---exec $MYSQL --default-character-set=utf8 test -e "/*!\C cp932 */; set character_set_client= cp932; select '\'"
-
-#
# Bug#16859 -- NULLs in columns must not truncate data as if a C-language "string".
#
--exec $MYSQL -t test -e "create table t1 (col1 binary(4), col2 varchar(10), col3 int); insert into t1 values ('a', 'b', 123421),('a ', '0123456789', 4), ('abcd', '', 4); select concat('>',col1,'<'), col2, col3 from t1; drop table t1;" 2>&1
@@ -138,9 +124,9 @@ drop table t1;
#
# Bug #20328: mysql client interprets commands in comments
#
---exec $MYSQL -e 'help' > $MYSQLTEST_VARDIR/tmp/bug20328_1.result
---exec $MYSQL -e 'help ' > $MYSQLTEST_VARDIR/tmp/bug20328_2.result
---exec diff $MYSQLTEST_VARDIR/tmp/bug20328_1.result $MYSQLTEST_VARDIR/tmp/bug20328_2.result
+--exec $MYSQL -e "help" > $MYSQLTEST_VARDIR/tmp/bug20328_1.result
+--exec $MYSQL -e "help " > $MYSQLTEST_VARDIR/tmp/bug20328_2.result
+--diff_files $MYSQLTEST_VARDIR/tmp/bug20328_1.result $MYSQLTEST_VARDIR/tmp/bug20328_2.result
#
# Bug #19216: Client crashes on long SELECT
@@ -251,16 +237,22 @@ drop table t17583;
#
# This should work just fine...
---exec echo "DELIMITER /" > $MYSQLTEST_VARDIR/tmp/bug21412.sql
---exec echo "SELECT 1/" >> $MYSQLTEST_VARDIR/tmp/bug21412.sql
+--write_file $MYSQLTEST_VARDIR/tmp/bug21412.sql
+DELIMITER /
+SELECT 1/
+EOF
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
# This should give an error...
---exec echo "DELIMITER \\" > $MYSQLTEST_VARDIR/tmp/bug21412.sql
+--write_file $MYSQLTEST_VARDIR/tmp/bug21412.sql
+DELIMITER \
+EOF
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
# As should this...
---exec echo "DELIMITER \\\\" > $MYSQLTEST_VARDIR/tmp/bug21412.sql
+--write_file $MYSQLTEST_VARDIR/tmp/bug21412.sql
+DELIMITER \\
+EOF
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21412.sql 2>&1
#
diff --git a/mysql-test/t/mysql_cp932.test b/mysql-test/t/mysql_cp932.test
new file mode 100644
index 00000000000..60a129c3805
--- /dev/null
+++ b/mysql-test/t/mysql_cp932.test
@@ -0,0 +1,22 @@
+# This test should work in embedded server after we fix mysqltest
+-- source include/not_embedded.inc
+
+#
+# Tests from mysql.test which require the cp932 character set
+#
+-- source include/have_cp932.inc
+
+#
+# BUG#16217 - MySQL client misinterprets multi-byte char as escape `\'
+#
+
+# new command \C or charset
+--exec $MYSQL --default-character-set=utf8 test -e "\C cp932 \g"
+--exec $MYSQL --default-character-set=cp932 test -e "charset utf8;"
+
+# its usage to switch internally in mysql to requested charset
+--exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select '\'; create table t1 (c_cp932 TEXT CHARACTER SET cp932); insert into t1 values('\'); select * from t1; drop table t1;"
+--exec $MYSQL --default-character-set=utf8 test -e "charset cp932; select '\'"
+--exec $MYSQL --default-character-set=utf8 test -e "/*charset cp932 */; set character_set_client= cp932; select '\'"
+--exec $MYSQL --default-character-set=utf8 test -e "/*!\C cp932 */; set character_set_client= cp932; select '\'"
+
diff --git a/mysql-test/t/mysqlbinlog-cp932-master.opt b/mysql-test/t/mysqlbinlog-cp932-master.opt
new file mode 100644
index 00000000000..bb0cda4519a
--- /dev/null
+++ b/mysql-test/t/mysqlbinlog-cp932-master.opt
@@ -0,0 +1 @@
+--max-binlog-size=8192
diff --git a/mysql-test/t/mysqlbinlog-cp932.test b/mysql-test/t/mysqlbinlog-cp932.test
new file mode 100644
index 00000000000..5d44ab63f12
--- /dev/null
+++ b/mysql-test/t/mysqlbinlog-cp932.test
@@ -0,0 +1,20 @@
+-- source include/have_binlog_format_mixed_or_statement.inc
+-- source include/have_cp932.inc
+
+# Bug#16217 (mysql client did not know how not switch its internal charset)
+flush logs;
+create table t3 (f text character set utf8);
+create table t4 (f text character set cp932);
+--exec $MYSQL --default-character-set=utf8 test -e "insert into t3 values(_utf8'ソ')"
+--exec $MYSQL --default-character-set=cp932 test -e "insert into t4 values(_cp932'\');"
+flush logs;
+rename table t3 to t03, t4 to t04;
+--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000002 | $MYSQL --default-character-set=utf8
+# original and recovered data must be equal
+select HEX(f) from t03;
+select HEX(f) from t3;
+select HEX(f) from t04;
+select HEX(f) from t4;
+
+drop table t3, t4, t03, t04;
+--echo End of 5.0 tests
diff --git a/mysql-test/t/mysqlbinlog.test b/mysql-test/t/mysqlbinlog.test
index 852cc6d2e36..245aca528dc 100644
--- a/mysql-test/t/mysqlbinlog.test
+++ b/mysql-test/t/mysqlbinlog.test
@@ -111,34 +111,24 @@ select "--- reading stdin --" as "";
drop table t1,t2;
#
-# Bug#16217 (mysql client did not know how not switch its internal charset)
-#
-flush logs;
-create table t3 (f text character set utf8);
-create table t4 (f text character set cp932);
---exec $MYSQL --default-character-set=utf8 test -e "insert into t3 values(_utf8'ソ')"
---exec $MYSQL --default-character-set=cp932 test -e "insert into t4 values(_cp932'\');"
-flush logs;
-rename table t3 to t03, t4 to t04;
---exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000004 | $MYSQL --default-character-set=utf8
-# original and recovered data must be equal
-select HEX(f) from t03;
-select HEX(f) from t3;
-select HEX(f) from t04;
-select HEX(f) from t4;
-drop table t3,t4,t03,t04;
-
-#
#BUG#14157: utf8 encoding in binlog without set character_set_client
#
flush logs;
---exec $MYSQL test -e 'create table if not exists t5 (a int); set names latin1; create temporary table `` (a int); insert into `` values (1); insert into t5 select * from ``'
+--write_file $MYSQLTEST_VARDIR/tmp/bug14157.sql
+create table if not exists t5 (a int);
+set names latin1;
+create temporary table `` (a int);
+insert into `` values (1);
+insert into t5 select * from ``
+EOF
+--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/bug14157.sql
+--remove_file $MYSQLTEST_VARDIR/tmp/bug14157.sql
# 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
+--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000004 | $MYSQL
select * from t5 /* must be (1),(1) */;
drop table t5;
@@ -157,7 +147,7 @@ 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
+--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000006 | $MYSQL
select * from t5 order by c1;
drop table t5;
@@ -180,8 +170,8 @@ 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
+--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000008
+--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000008 | $MYSQL
call p1();
drop procedure p1;
@@ -215,9 +205,9 @@ select hex(a) from t1;
drop table t1;
flush logs;
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
---exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000012
+--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000010
-# End of 5.0 tests
+--echo End of 5.0 tests
#
# Test --disable-force-if-open and --force-if-open
@@ -225,6 +215,6 @@ flush logs;
flush logs;
--error 1
--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000014 >/dev/null 2>/dev/null
---exec $MYSQL_BINLOG --force-if-open $MYSQLTEST_VARDIR/log/master-bin.000014 >/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
+--echo End of 5.1 tests
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index d841312392d..d9372ad35c1 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -126,13 +126,13 @@ drop table t1;
create table t1(a int);
insert into t1 values (1),(2),(3);
--exec $MYSQL_DUMP --skip-comments --tab=$MYSQLTEST_VARDIR/tmp/ test
---exec cat $MYSQLTEST_VARDIR/tmp/t1.sql
---exec cat $MYSQLTEST_VARDIR/tmp/t1.txt
---exec rm $MYSQLTEST_VARDIR/tmp/t1.sql
---exec rm $MYSQLTEST_VARDIR/tmp/t1.txt
+--cat_file $MYSQLTEST_VARDIR/tmp/t1.sql
+--cat_file $MYSQLTEST_VARDIR/tmp/t1.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
+--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ test
---exec rm $MYSQLTEST_VARDIR/tmp/t1.sql
---exec rm $MYSQLTEST_VARDIR/tmp/t1.txt
+--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
+--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
drop table t1;
--echo #
@@ -710,7 +710,7 @@ drop table t1, t2, t3;
create table t1 (a int);
--error 2
---exec $MYSQL_DUMP --skip-comments --force test t1 --where='xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 2>&1
+--exec $MYSQL_DUMP --skip-comments --force test t1 --where="xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" 2>&1
drop table t1;
--echo #
@@ -913,11 +913,13 @@ DROP TABLE t1, t2;
--echo # Bugs #9136, #12917: problems with --defaults-extra-file option
--echo #
---system echo '[mysqltest1]' > $MYSQLTEST_VARDIR/tmp/tmp.cnf
---system echo 'port=1234' >> $MYSQLTEST_VARDIR/tmp/tmp.cnf
+--write_file $MYSQLTEST_VARDIR/tmp/tmp.cnf
+[mysqltest1]
+port=1234
+EOF
--exec $MYSQL_MY_PRINT_DEFAULTS -c $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1
--exec $MYSQL_MY_PRINT_DEFAULTS -e $MYSQLTEST_VARDIR/tmp/tmp.cnf mysqltest1 mysqltest1
---system rm $MYSQLTEST_VARDIR/tmp/tmp.cnf
+--remov_file $MYSQLTEST_VARDIR/tmp/tmp.cnf
--echo #
--echo # Test of fix to BUG 12597
@@ -1190,9 +1192,9 @@ create view v1 as select qty, price, qty*price as value from t;
create view v2 as select qty from v1;
--echo mysqldump {
--exec $MYSQL_DUMP --compact -F --tab $MYSQLTEST_VARDIR/tmp test
---exec cat $MYSQLTEST_VARDIR/tmp/v1.sql
+--cat_file $MYSQLTEST_VARDIR/tmp/v1.sql
--echo } mysqldump {
---exec cat $MYSQLTEST_VARDIR/tmp/v2.sql
+--cat_file $MYSQLTEST_VARDIR/tmp/v2.sql
--echo } mysqldump
drop view v1;
drop view v2;
@@ -1258,7 +1260,7 @@ create database mysqldump_views;
use mysqldump_views;
create view nasishnasifu as select mysqldump_tables.basetable.id from mysqldump_tables.basetable;
---exec $MYSQL_DUMP --skip-comments --compact --databases mysqldump_tables mysqldump_views;
+--exec $MYSQL_DUMP --skip-comments --compact --databases mysqldump_tables mysqldump_views
drop view nasishnasifu;
drop database mysqldump_views;
@@ -1281,7 +1283,7 @@ create table t1 (f1 int, f2 int);
insert into t1 values (2,2);
create view v1 as select f1, f2 from t1;
---exec $MYSQL_DUMP --skip-comments --add-drop-database --databases mysqldump_dba mysqldump_dbb > $MYSQLTEST_VARDIR/tmp/bug20221_backup;
+--exec $MYSQL_DUMP --skip-comments --add-drop-database --databases mysqldump_dba mysqldump_dbb > $MYSQLTEST_VARDIR/tmp/bug20221_backup
drop view v1;
drop table t1;
@@ -1291,7 +1293,7 @@ drop view v1;
drop table t1;
drop database mysqldump_dba;
---exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20221_backup;
+--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug20221_backup
select * from mysqldump_dba.v1;
select * from mysqldump_dbb.v1;
@@ -1393,7 +1395,7 @@ flush privileges;
--echo # Restore. Flush Privileges test ends.
--echo #
---exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21527.sql;
+--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/bug21527.sql
# Do as a user
connection user1;
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index a8a55336144..1914f2794e2 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -555,8 +555,8 @@ echo ;
# Illegal use of echo
---error 1
---exec echo "echo \$;" | $MYSQL_TEST 2>&1
+#--error 1
+#--exec echo "echo \$;" | $MYSQL_TEST 2>&1
# ----------------------------------------------------------------------------
@@ -902,9 +902,9 @@ echo $d;
# ----------------------------------------------------------------------------
# Test system
# ----------------------------------------------------------------------------
-system ls > /dev/null;
+#system ls > /dev/null;
system echo "hej" > /dev/null;
---system ls > /dev/null
+#--system ls > /dev/null
--system echo "hej" > /dev/null;
--error 1
@@ -1134,18 +1134,24 @@ EOF
--error 1
--exec echo "{;" | $MYSQL_TEST 2>&1
---system echo "while (0)" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "echo hej;" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+while (0)
+echo hej;
+EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
---system echo "while (0)" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "{echo hej;" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+while (0)
+{echo hej;
+EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
---system echo "while (0){" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "echo hej;" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+while (0){
+ echo hej;
+EOF
--error 1
--exec $MYSQL_TEST < $MYSQLTEST_VARDIR/tmp/mysqltest.sql 2>&1
@@ -1244,28 +1250,34 @@ EOF
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql; echo OK;" | $MYSQL_TEST 2>&1
# Repeat connect/disconnect, exceed max number of connections
---system echo "let \$i=200;" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "while (\$i)" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "{" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo " connect (test_con1,localhost,root,,); " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo " disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo " dec \$i; " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "}" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+let $i=200;
+while ($i)
+{
+ connect (test_con1,localhost,root,,);
+ disconnect test_con1;
+ dec $i;
+}
+EOF
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql;" | $MYSQL_TEST 2>&1
# Select disconnected connection
---system echo "connect (test_con1,localhost,root,,);" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "disconnect test_con1; " >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "connection test_con1;" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+connect (test_con1,localhost,root,,);
+disconnect test_con1;
+connection test_con1;
+EOF
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql;" | $MYSQL_TEST 2>&1
# Connection name already used
---system echo "connect (test_con1,localhost,root,,);" > $MYSQLTEST_VARDIR/tmp/mysqltest.sql
---system echo "connect (test_con1,localhost,root,,);" >> $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+--write_file $MYSQLTEST_VARDIR/tmp/mysqltest.sql
+connect (test_con1,localhost,root,,);
+connect (test_con1,localhost,root,,);
+EOF
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--error 1
--exec echo "source $MYSQLTEST_VARDIR/tmp/mysqltest.sql;" | $MYSQL_TEST 2>&1
@@ -1510,8 +1522,9 @@ remove_file non_existing_file;
--error 1
--exec echo "write_file filename ;" | $MYSQL_TEST 2>&1
---error 1
---exec echo "write_file filename \";" | $MYSQL_TEST 2>&1
+# Comment out this test as it confuses cmd.exe with unmatched "
+#--error 1
+#--exec echo "write_file filename \";" | $MYSQL_TEST 2>&1
write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
Content for test_file1
@@ -1526,6 +1539,74 @@ file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
# ----------------------------------------------------------------------------
+# test for append_file
+# ----------------------------------------------------------------------------
+
+write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
+Content for test_file1
+EOF
+file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
+
+append_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
+Appended text
+EOF
+file_exists $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
+
+remove_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
+append_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
+Appended text on nonexisting file
+EOF
+
+# ----------------------------------------------------------------------------
+# test for cat_file
+# ----------------------------------------------------------------------------
+
+--write_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp
+Some data
+for cat_file command
+of mysqltest
+EOF
+cat_file $MYSQLTEST_VARDIR/tmp/test_file1.tmp;
+
+--error 1
+--exec echo "cat_file non_existing_file;" | $MYSQL_TEST 2>&1
+
+# ----------------------------------------------------------------------------
+# test for diff_files
+# ----------------------------------------------------------------------------
+
+--write_file $MYSQLTEST_VARDIR/tmp/diff1.tmp
+Some data
+for diff_file command
+of mysqltest
+EOF
+
+--write_file $MYSQLTEST_VARDIR/tmp/diff2.tmp
+Some data
+for diff_file command
+of mysqltest
+EOF
+
+--write_file $MYSQLTEST_VARDIR/tmp/diff3.tmp
+Some other data
+for diff_file command
+of mysqltest
+EOF
+
+# Compare equal files
+--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff2.tmp
+--diff_files $MYSQLTEST_VARDIR/tmp/diff2.tmp $MYSQLTEST_VARDIR/tmp/diff1.tmp
+
+# Compare files that differ
+--error 1
+--diff_files $MYSQLTEST_VARDIR/tmp/diff3.tmp $MYSQLTEST_VARDIR/tmp/diff2.tmp
+--error 1
+--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff3.tmp
+
+# Compare equal files, again...
+--diff_files $MYSQLTEST_VARDIR/tmp/diff1.tmp $MYSQLTEST_VARDIR/tmp/diff2.tmp
+
+# ----------------------------------------------------------------------------
# test for file_exist
# ----------------------------------------------------------------------------
--error 1
diff --git a/mysql-test/t/ndb_basic.test b/mysql-test/t/ndb_basic.test
index ad5f9c652c7..a20cfc500cf 100644
--- a/mysql-test/t/ndb_basic.test
+++ b/mysql-test/t/ndb_basic.test
@@ -597,8 +597,8 @@ drop table t1;
# Test auto_increment
#
-connect (con1,localhost,,,test);
-connect (con2,localhost,,,test);
+connect (con1,localhost,root,,test);
+connect (con2,localhost,root,,test);
create table t1
(counter int(64) NOT NULL auto_increment,
@@ -631,7 +631,7 @@ drop table t1;
#
# Bug #17249 delete statement with join where clause fails
# when table do not have pk
-#
+ #
create table t1 (a int) engine=ndb;
create table t2 (a int) engine=ndb;
diff --git a/mysql-test/t/ndb_index_ordered.test b/mysql-test/t/ndb_index_ordered.test
index c2a96a590ca..782f17ca5b2 100644
--- a/mysql-test/t/ndb_index_ordered.test
+++ b/mysql-test/t/ndb_index_ordered.test
@@ -336,8 +336,8 @@ drop table t1;
# bug#7798
create table t1(a int primary key, b int not null, index(b));
insert into t1 values (1,1), (2,2);
-connect (con1,localhost,,,test);
-connect (con2,localhost,,,test);
+connect (con1,localhost,root,,test);
+connect (con2,localhost,root,,test);
connection con1;
set autocommit=0;
begin;
diff --git a/mysql-test/t/ndb_multi.test b/mysql-test/t/ndb_multi.test
index a50b3ef28ea..3482db1d1b2 100644
--- a/mysql-test/t/ndb_multi.test
+++ b/mysql-test/t/ndb_multi.test
@@ -21,8 +21,8 @@ select * from t2;
show status like 'handler_discover%';
# Check dropping and recreating table on same server
-connect (con1,localhost,,,test);
-connect (con2,localhost,,,test);
+connect (con1,localhost,root,,test);
+connect (con2,localhost,root,,test);
connection con1;
select * from t1;
connection con2;
diff --git a/mysql-test/t/ndb_multi_row.test b/mysql-test/t/ndb_multi_row.test
index 05a0944e99a..632a9fda89a 100644
--- a/mysql-test/t/ndb_multi_row.test
+++ b/mysql-test/t/ndb_multi_row.test
@@ -23,8 +23,8 @@ select * from t2;
show status like 'handler_discover%';
# Check dropping and recreating table on same server
-connect (con1,localhost,,,test);
-connect (con2,localhost,,,test);
+connect (con1,localhost,root,,test);
+connect (con2,localhost,root,,test);
connection con1;
select * from t1;
connection con2;
diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test
index 15fb6771101..f2da8e44843 100644
--- a/mysql-test/t/order_by.test
+++ b/mysql-test/t/order_by.test
@@ -589,6 +589,36 @@ SELECT a.a + 1 AS num FROM t1 a JOIN t1 b ON num = b.a;
DROP TABLE t1;
#
+# Bug#25126: Reference to non-existant column in UPDATE...ORDER BY...
+# crashes server
+#
+CREATE TABLE bug25126 (
+ val int unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY
+);
+--error 1054
+UPDATE bug25126 SET MissingCol = MissingCol;
+--error 1054
+UPDATE bug25126 SET val = val ORDER BY MissingCol;
+UPDATE bug25126 SET val = val ORDER BY val;
+UPDATE bug25126 SET val = 1 ORDER BY val;
+--error 1054
+UPDATE bug25126 SET val = 1 ORDER BY MissingCol;
+--error 1054
+UPDATE bug25126 SET val = 1 ORDER BY val, MissingCol;
+--error 1054
+UPDATE bug25126 SET val = MissingCol ORDER BY MissingCol;
+--error 1054
+UPDATE bug25126 SET MissingCol = 1 ORDER BY val, MissingCol;
+--error 1054
+UPDATE bug25126 SET MissingCol = 1 ORDER BY MissingCol;
+--error 1054
+UPDATE bug25126 SET MissingCol = val ORDER BY MissingCol;
+--error 1054
+UPDATE bug25126 SET MissingCol = MissingCol ORDER BY MissingCol;
+DROP TABLE bug25126;
+
+
+#
# Bug #25427: crash when order by expression contains a name
# that cannot be resolved unambiguously
#
@@ -603,7 +633,6 @@ SELECT p.a AS val, q.a AS val FROM t1 p, t1 q ORDER BY val > 1;
DROP TABLE t1;
-# End of 4.1 tests
create table t1 (a int not null, b int not null, c int not null);
insert t1 values (1,1,1),(1,1,2),(1,2,1);
select a, b from t1 group by a, b order by sum(c);
diff --git a/mysql-test/t/outfile.test b/mysql-test/t/outfile.test
index c48e6c9730d..7c90fd32909 100644
--- a/mysql-test/t/outfile.test
+++ b/mysql-test/t/outfile.test
@@ -84,3 +84,15 @@ FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'
FROM schemata LIMIT 0, 5;
enable_query_log;
--exec rm $MYSQLTEST_VARDIR/tmp/outfile-test.4
+use test;
+
+#
+# Bug#18628 mysql-test-run: security problem
+#
+# It should not be possible to write to a file outside of vardir
+create table t1(a int);
+--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
+--error 1290
+eval select * into outfile "$MYSQL_TEST_DIR/outfile-test1" from t1;
+drop table t1;
+
diff --git a/mysql-test/t/overflow.test b/mysql-test/t/overflow.test
index c930707413b..a62ef9c4cd2 100644
--- a/mysql-test/t/overflow.test
+++ b/mysql-test/t/overflow.test
@@ -1,4 +1,4 @@
-connect (con1,localhost,boo,,);
+connect (con1,localhost,root,,);
connection con1;
-- error 1064,1102,1280
drop database AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA;
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index ad7fd90ed63..87e2ef511d9 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -409,8 +409,8 @@ select * from t1 where id=2;
create table t1 (word char(20) not null);
select * from t1;
show status like "Qcache_queries_in_cache";
---replace_result $MYSQL_TEST_DIR TEST_DIR
-eval load data infile '$MYSQL_TEST_DIR/std_data/words.dat' into table t1;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval load data infile '$MYSQLTEST_VARDIR/std_data_ln/words.dat' into table t1;
show status like "Qcache_queries_in_cache";
select count(*) from t1;
drop table t1;
diff --git a/mysql-test/t/rpl_ndb_bank.test b/mysql-test/t/rpl_ndb_bank.test
index 9174d09484b..c1448573f5b 100644
--- a/mysql-test/t/rpl_ndb_bank.test
+++ b/mysql-test/t/rpl_ndb_bank.test
@@ -175,7 +175,7 @@ insert into t1 values (1);
--connection master
drop table t1;
---exec diff $MYSQLTEST_VARDIR/tmp/master_BANK.sql $MYSQLTEST_VARDIR/tmp/slave_BANK.sql
+diff_files $MYSQLTEST_VARDIR/tmp/master_BANK.sql $MYSQLTEST_VARDIR/tmp/slave_BANK.sql;
--dec $2
}
diff --git a/mysql-test/t/rpl_ndb_dd_advance.test b/mysql-test/t/rpl_ndb_dd_advance.test
index 82ec85c09a5..0a1ab37cdad 100644
--- a/mysql-test/t/rpl_ndb_dd_advance.test
+++ b/mysql-test/t/rpl_ndb_dd_advance.test
@@ -571,7 +571,7 @@ connection master;
--echo ****** Do dumps compare ************
---exec diff $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql
+diff_files $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_M.sql $MYSQLTEST_VARDIR/tmp/RPL_DD_ADV_S.sql;
## Note: Ths files should only get removed, if the above diff succeeds.
diff --git a/mysql-test/t/rpl_rbr_to_sbr.test b/mysql-test/t/rpl_rbr_to_sbr.test
index 379b1edec02..4def515eb13 100644
--- a/mysql-test/t/rpl_rbr_to_sbr.test
+++ b/mysql-test/t/rpl_rbr_to_sbr.test
@@ -39,7 +39,7 @@ DROP TABLE IF EXISTS t1;
# will be created. You will need to go to the mysql-test dir and diff
# the files your self to see what is not matching
---exec diff $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_master.sql $MYSQLTEST_VARDIR/tmp/rpl_rbr_to_sbr_slave.sql;
# If all is good, we can remove the files
diff --git a/mysql-test/t/rpl_read_only.test b/mysql-test/t/rpl_read_only.test
index 659c3d10044..62864b62a28 100644
--- a/mysql-test/t/rpl_read_only.test
+++ b/mysql-test/t/rpl_read_only.test
@@ -2,6 +2,11 @@
-- source include/master-slave.inc
-- source include/have_innodb.inc
+# Create a test and replicate it to slave
+connection master;
+create user test;
+sync_slave_with_master;
+
# Setting the master readonly :
# - the variable @@readonly is not replicated on the slave
@@ -99,7 +104,10 @@ insert into t2 values(2006);
## Cleanup
connection master;
+drop user test;
drop table t1;
drop table t2;
sync_slave_with_master;
+set global read_only=0;
+
diff --git a/mysql-test/t/rpl_row_NOW.test b/mysql-test/t/rpl_row_NOW.test
index 24a8774284a..d0272b35c1f 100644
--- a/mysql-test/t/rpl_row_NOW.test
+++ b/mysql-test/t/rpl_row_NOW.test
@@ -56,6 +56,7 @@ connection master;
# lets cleanup
DROP TABLE IF EXISTS mysqltest1.t1;
DROP FUNCTION mysqltest1.f1;
+DROP DATABASE mysqltest1;
# Lets compare. Note: If they match test will pass, if they do not match
# the test will show that the diff statement failed and not reject file
@@ -63,7 +64,7 @@ DROP FUNCTION mysqltest1.f1;
# the files your self to see what is not matching :-) The failed dump
# files will be located in $MYSQLTEST_VARDIR/tmp
-exec diff $MYSQLTEST_VARDIR/tmp/NOW_master.sql $MYSQLTEST_VARDIR/tmp/NOW_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/NOW_master.sql $MYSQLTEST_VARDIR/tmp/NOW_slave.sql;
# If all is good, when can cleanup our dump files.
system rm $MYSQLTEST_VARDIR/tmp/NOW_master.sql;
diff --git a/mysql-test/t/rpl_row_USER.test b/mysql-test/t/rpl_row_USER.test
index a099a35ec27..7b13ebc50ee 100644
--- a/mysql-test/t/rpl_row_USER.test
+++ b/mysql-test/t/rpl_row_USER.test
@@ -2,7 +2,7 @@
# Original Author: JBM #
# Original Date: Aug/18/2005 #
#############################################################################
-# TEST: To test the UUID() in rbr #
+# TEST: To test the USER() and CURRENT_USER() in rbr #
#############################################################################
# Change Author: JBM
# Change Date: 2006-01-16
@@ -52,6 +52,8 @@ connection master;
DROP DATABASE mysqltest1;
REVOKE ALL ON mysqltest1.* FROM 'tester'@'%';
REVOKE ALL ON mysqltest1.* FROM ''@'localhost%';
+DROP USER tester@'%';
+DROP USER ''@'localhost%';
sync_slave_with_master;
diff --git a/mysql-test/t/rpl_row_basic_11bugs.test b/mysql-test/t/rpl_row_basic_11bugs.test
index 5b28af75d33..348b6d45f52 100644
--- a/mysql-test/t/rpl_row_basic_11bugs.test
+++ b/mysql-test/t/rpl_row_basic_11bugs.test
@@ -92,6 +92,8 @@ INSERT INTO t1 VALUES (7),(8),(9);
sync_slave_with_master;
SELECT * FROM t1;
+SET GLOBAL QUERY_CACHE_SIZE=0;
+
# Bug#22550: Replication of BIT columns failing
--echo ================ Test for BUG#22550 ================
--disable_query_log
@@ -113,3 +115,7 @@ UPDATE t1 SET a=0 WHERE b=2;
SELECT HEX(a),b FROM t1;
sync_slave_with_master;
SELECT HEX(a),b FROM t1;
+
+connection master;
+DROP TABLE t1;
+sync_slave_with_master;
diff --git a/mysql-test/t/rpl_row_func002.test b/mysql-test/t/rpl_row_func002.test
index 46767abd529..44a704bfbc5 100644
--- a/mysql-test/t/rpl_row_func002.test
+++ b/mysql-test/t/rpl_row_func002.test
@@ -90,6 +90,7 @@ connection master;
# Cleanup
DROP FUNCTION test.f1;
DROP TABLE test.t1;
+DROP TABLE test.t2;
sync_slave_with_master;
# the test will show that the diff statement failed and no reject file
@@ -97,7 +98,7 @@ sync_slave_with_master;
# the files your self to see what is not matching :-). The files are located
# in mysql-test/var/tmp
-exec diff $MYSQLTEST_VARDIR/tmp/func002_master.sql $MYSQLTEST_VARDIR/tmp/func002_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/func002_master.sql $MYSQLTEST_VARDIR/tmp/func002_slave.sql;
# End of 5.0 test case
diff --git a/mysql-test/t/rpl_row_sp001.test b/mysql-test/t/rpl_row_sp001.test
index 8e01cbc4f44..c6fc29e3750 100644
--- a/mysql-test/t/rpl_row_sp001.test
+++ b/mysql-test/t/rpl_row_sp001.test
@@ -137,7 +137,7 @@ sync_slave_with_master;
# the files your self to see what is not matching :-) Failed dump files
# will be located in $MYSQLTEST_VARDIR/tmp
---exec diff $MYSQLTEST_VARDIR/tmp/sp001_master.sql $MYSQLTEST_VARDIR/tmp/sp001_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/sp001_master.sql $MYSQLTEST_VARDIR/tmp/sp001_slave.sql;
# If all is good, when can cleanup our dump files.
system rm $MYSQLTEST_VARDIR/tmp/sp001_master.sql;
diff --git a/mysql-test/t/rpl_row_sp008.test b/mysql-test/t/rpl_row_sp008.test
index 8e8e709a2d9..b1295820c99 100644
--- a/mysql-test/t/rpl_row_sp008.test
+++ b/mysql-test/t/rpl_row_sp008.test
@@ -51,6 +51,7 @@ SELECT * FROM test.t2;
connection master;
DROP PROCEDURE IF EXISTS test.p1;
DROP TABLE IF EXISTS test.t1;
+DROP TABLE IF EXISTS test.t2;
sync_slave_with_master;
# End of 5.0 test case
diff --git a/mysql-test/t/rpl_row_sp011.test b/mysql-test/t/rpl_row_sp011.test
index 54e708492d1..fb87249d93c 100644
--- a/mysql-test/t/rpl_row_sp011.test
+++ b/mysql-test/t/rpl_row_sp011.test
@@ -102,7 +102,7 @@ sync_slave_with_master;
# the files your self to see what is not matching :-) Failed test
# Will leave dump files in $MYSQLTEST_VARDIR/tmp
-exec diff $MYSQLTEST_VARDIR/tmp/sp011_master.sql $MYSQLTEST_VARDIR/tmp/sp011_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/sp011_master.sql $MYSQLTEST_VARDIR/tmp/sp011_slave.sql;
# If all is good, when can cleanup our dump files.
system rm $MYSQLTEST_VARDIR/tmp/sp011_master.sql;
diff --git a/mysql-test/t/rpl_row_sp012.test b/mysql-test/t/rpl_row_sp012.test
index 5b6fc139577..3a8d295121c 100644
--- a/mysql-test/t/rpl_row_sp012.test
+++ b/mysql-test/t/rpl_row_sp012.test
@@ -68,6 +68,7 @@ DROP PROCEDURE IF EXISTS test.p3;
DROP PROCEDURE IF EXISTS test.p2;
DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2;
+DROP USER user1@localhost;
sync_slave_with_master;
# End of 5.0 test case
diff --git a/mysql-test/t/rpl_row_trig001.test b/mysql-test/t/rpl_row_trig001.test
index 931cab95948..7b1fca2d6a1 100644
--- a/mysql-test/t/rpl_row_trig001.test
+++ b/mysql-test/t/rpl_row_trig001.test
@@ -95,6 +95,6 @@ sync_slave_with_master;
# the files your self to see what is not matching :-) Failed tests
# will leave dump files in $MYSQLTEST_VARDIR/tmp
-exec diff $MYSQLTEST_VARDIR/tmp/trig001_master.sql $MYSQLTEST_VARDIR/tmp/trig001_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/trig001_master.sql $MYSQLTEST_VARDIR/tmp/trig001_slave.sql;
# End of 5.0 test case
diff --git a/mysql-test/t/rpl_row_trig003.test b/mysql-test/t/rpl_row_trig003.test
index d4570afd094..4a1bbc5ca89 100644
--- a/mysql-test/t/rpl_row_trig003.test
+++ b/mysql-test/t/rpl_row_trig003.test
@@ -147,6 +147,6 @@ DROP TABLE IF EXISTS test.t2;
DROP TABLE IF EXISTS test.t3;
--enable_warnings
-exec diff $MYSQLTEST_VARDIR/tmp/trg003_master.sql $MYSQLTEST_VARDIR/tmp/trg003_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/trg003_master.sql $MYSQLTEST_VARDIR/tmp/trg003_slave.sql;
# End of 5.0 test case
diff --git a/mysql-test/t/rpl_row_view01.test b/mysql-test/t/rpl_row_view01.test
index 895a922fef8..634e3c30cc6 100644
--- a/mysql-test/t/rpl_row_view01.test
+++ b/mysql-test/t/rpl_row_view01.test
@@ -82,6 +82,7 @@ DROP TABLE IF EXISTS mysqltest1.t3;
DROP TABLE IF EXISTS mysqltest1.t1;
DROP TABLE IF EXISTS mysqltest1.t2;
DROP TABLE IF EXISTS mysqltest1.t4;
+DROP DATABASE mysqltest1;
sync_slave_with_master;
# End of 5.1 test case
diff --git a/mysql-test/t/rpl_slave_status.test b/mysql-test/t/rpl_slave_status.test
index f98cc7a7d14..32320a50656 100644
--- a/mysql-test/t/rpl_slave_status.test
+++ b/mysql-test/t/rpl_slave_status.test
@@ -49,6 +49,7 @@ show slave status;
# Cleanup (Note that slave IO thread is not running)
connection slave;
drop table t1;
+delete from mysql.user where user='rpl';
connection master;
drop table t1;
diff --git a/mysql-test/t/rpl_sp004.test b/mysql-test/t/rpl_sp004.test
index 055a13cc157..967e7007c15 100644
--- a/mysql-test/t/rpl_sp004.test
+++ b/mysql-test/t/rpl_sp004.test
@@ -91,7 +91,7 @@ sync_slave_with_master;
# If the test fails, you will need to diff the dumps to see why.
--- exec diff $MYSQLTEST_VARDIR/tmp/sp004_master.sql $MYSQLTEST_VARDIR/tmp/sp004_slave.sql
+diff_files $MYSQLTEST_VARDIR/tmp/sp004_master.sql $MYSQLTEST_VARDIR/tmp/sp004_slave.sql;
# End of 5.0 test case
diff --git a/mysql-test/t/rpl_switch_stm_row_mixed.test b/mysql-test/t/rpl_switch_stm_row_mixed.test
index bffa5905f1f..494e73fda49 100644
--- a/mysql-test/t/rpl_switch_stm_row_mixed.test
+++ b/mysql-test/t/rpl_switch_stm_row_mixed.test
@@ -19,6 +19,8 @@ create database mysqltest1;
--enable_warnings
use mysqltest1;
+# Save binlog format
+set @my_binlog_format= @@global.binlog_format;
# play with switching
set session binlog_format=mixed;
@@ -531,7 +533,7 @@ sync_slave_with_master;
# will be created. You will need to go to the mysql-test dir and diff
# the files your self to see what is not matching
---exec diff $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql;
connection master;
--replace_column 2 # 5 #
@@ -559,8 +561,12 @@ drop database mysqltest1;
--exec $MYSQL_DUMP --compact --order-by-primary --skip-extended-insert --no-create-info mysqltest1 > $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql
# the old mysqldump output on slave is the same as what it was on
# master before restoring on master.
---exec diff $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql;
+diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql;
}
drop database mysqltest1;
sync_slave_with_master;
+
+connection master;
+# Restore binlog format setting
+set global binlog_format =@my_binlog_format;
diff --git a/mysql-test/t/rpl_temporary.test b/mysql-test/t/rpl_temporary.test
index fc336db1a3a..09b8b83f25f 100644
--- a/mysql-test/t/rpl_temporary.test
+++ b/mysql-test/t/rpl_temporary.test
@@ -1,3 +1,5 @@
+# Test need anonymous user when connection are made as "zedjzlcsjhd"
+source include/add_anonymous_users.inc;
-- source include/master-slave.inc
@@ -191,7 +193,14 @@ drop table t1;
#
#14157: utf8 encoding in binlog without set character_set_client
#
---exec $MYSQL --character-sets-dir=../sql/share/charsets/ --default-character-set=latin1 test -e 'create table t1 (a int); set names latin1; create temporary table `` (a int); insert into `` values (1); insert into t1 select * from ``'
+--write_file $MYSQLTEST_VARDIR/tmp/bug14157.sql
+create table t1 (a int);
+set names latin1;
+create temporary table `` (a int);
+insert into `` values (1);
+insert into t1 select * from ``
+EOF
+--exec $MYSQL --character-sets-dir=../sql/share/charsets/ --default-character-set=latin1 test < $MYSQLTEST_VARDIR/tmp/bug14157.sql
sync_slave_with_master;
#connection slave;
@@ -200,4 +209,7 @@ select * from t1;
connection master;
drop table t1;
+# Delete the anonymous users
+source include/delete_anonymous_users.inc;
+
# End of 5.1 tests
diff --git a/mysql-test/t/sp-ucs2.test b/mysql-test/t/sp-ucs2.test
new file mode 100644
index 00000000000..7dd88b04871
--- /dev/null
+++ b/mysql-test/t/sp-ucs2.test
@@ -0,0 +1,28 @@
+-- source include/have_ucs2.inc
+
+delimiter |;
+
+#
+# BUG#17615: problem with character set
+#
+--disable_warnings
+drop function if exists bug17615|
+--enable_warnings
+
+create table t3 (a varchar(256) unicode)|
+
+create function bug17615() returns varchar(256) unicode
+begin
+ declare tmp_res varchar(256) unicode;
+ set tmp_res= 'foo string';
+ return tmp_res;
+end|
+
+insert into t3 values(bug17615())|
+select * from t3|
+
+drop function bug17615|
+drop table t3|
+
+
+delimiter ;|
diff --git a/mysql-test/t/sp.test b/mysql-test/t/sp.test
index 6c7fde71e78..76b94198161 100644
--- a/mysql-test/t/sp.test
+++ b/mysql-test/t/sp.test
@@ -12,6 +12,8 @@
# Tests that destroys system tables (e.g. mysql.proc) for error testing
# go to sp-destruct.
# Tests that require --with-geometry go into sp_gis.test
+# Tests that require multibyte character sets, which are not always available,
+# go into separate files (e.g. sp-ucs2.test)
use test;
@@ -5544,29 +5546,6 @@ drop table t3|
#
-# BUG#17615: problem with character set
-#
---disable_warnings
-drop function if exists bug17615|
---enable_warnings
-
-create table t3 (a varchar(256) unicode)|
-
-create function bug17615() returns varchar(256) unicode
-begin
- declare tmp_res varchar(256) unicode;
- set tmp_res= 'foo string';
- return tmp_res;
-end|
-
-insert into t3 values(bug17615())|
-select * from t3|
-
-drop function bug17615|
-drop table t3|
-
-
-#
# BUG#17476: Stored procedure not returning data when it is called first
# time per connection
#
@@ -6774,6 +6753,7 @@ SELECT bug23760_rc_test(ROW_COUNT())|
DROP TABLE bug23760, bug23760_log|
DROP PROCEDURE bug23760_update_log|
DROP PROCEDURE bug23760_test_row_count|
+DROP PROCEDURE bug23760_test_row_count2|
DROP FUNCTION bug23760_rc_test|
#
diff --git a/mysql-test/t/trigger-grant.test b/mysql-test/t/trigger-grant.test
index 2a0cf829bae..8145212ed5b 100644
--- a/mysql-test/t/trigger-grant.test
+++ b/mysql-test/t/trigger-grant.test
@@ -359,9 +359,21 @@ CREATE TRIGGER trg5 BEFORE DELETE ON t1
FOR EACH ROW
SET @a = 5;
---system grep -v '^definers=' $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG > $MYSQLTEST_VARDIR/tmp/t1.TRG
---system echo "definers='' '@' '@abc@def@@' '@hostname' '@abcdef@@@hostname'" >> $MYSQLTEST_VARDIR/tmp/t1.TRG
---system mv $MYSQLTEST_VARDIR/tmp/t1.TRG $MYSQLTEST_VARDIR/master-data/mysqltest_db1/t1.TRG
+# Replace definers with the "weird" definers
+perl;
+use strict;
+use warnings;
+my $fname= "$ENV{'MYSQLTEST_VARDIR'}/master-data/mysqltest_db1/t1.TRG";
+open(FILE, "<", $fname) or die;
+my @content= grep($_ !~ /^definers=/, <FILE>);
+close FILE;
+open(FILE, ">", $fname) or die;
+# Use binary file mode to avoid CR/LF's being added on windows
+binmode FILE;
+print FILE @content;
+print FILE "definers='' '\@' '\@abc\@def\@\@' '\@hostname' '\@abcdef\@\@\@hostname'\n";
+close FILE;
+EOF
--echo
diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test
index cd8f2d48eea..e08b2de0f85 100644
--- a/mysql-test/t/type_blob.test
+++ b/mysql-test/t/type_blob.test
@@ -307,22 +307,21 @@ drop table t1;
create table t1 (id integer auto_increment unique,imagem LONGBLOB not null default '');
insert into t1 (id) values (1);
# We have to clean up the path in the results for safe comparison
---replace_result $MYSQL_TEST_DIR ../..
-eval select
- charset(load_file('$MYSQL_TEST_DIR/std_data/words.dat')),
- collation(load_file('$MYSQL_TEST_DIR/std_data/words.dat')),
- coercibility(load_file('$MYSQL_TEST_DIR/std_data/words.dat'));
---replace_result $MYSQL_TEST_DIR ../..
-eval explain extended select
- charset(load_file('$MYSQL_TEST_DIR/std_data/words.dat')),
- collation(load_file('$MYSQL_TEST_DIR/std_data/words.dat')),
- coercibility(load_file('$MYSQL_TEST_DIR/std_data/words.dat'));
---replace_result $MYSQL_TEST_DIR ../..
-eval update t1 set imagem=load_file('$MYSQL_TEST_DIR/std_data/words.dat') where id=1;
+eval select
+ charset(load_file('../std_data_ln/words.dat')),
+ collation(load_file('../std_data_ln/words.dat')),
+ coercibility(load_file('../std_data_ln/words.dat'));
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval explain extended select
+ charset(load_file('$MYSQLTEST_VARDIR/std_data_ln/words.dat')),
+ collation(load_file('$MYSQLTEST_VARDIR/std_data_ln/words.dat')),
+ coercibility(load_file('$MYSQLTEST_VARDIR/std_data_ln/words.dat'));
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval update t1 set imagem=load_file('$MYSQLTEST_VARDIR/std_data_ln/words.dat') where id=1;
select if(imagem is null, "ERROR", "OK"),length(imagem) from t1 where id = 1;
drop table t1;
---replace_result $MYSQL_TEST_DIR ../..
-eval create table t1 select load_file('$MYSQL_TEST_DIR/std_data/words.dat') l;
+--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
+eval create table t1 select load_file('$MYSQLTEST_VARDIR/std_data_ln/words.dat') l;
# We mask out the Privileges column because it differs for embedded server
--replace_column 8 #
show full fields from t1;
diff --git a/mysql-test/t/type_varchar.test b/mysql-test/t/type_varchar.test
index 3ba80514ff9..1b27a92e95c 100644
--- a/mysql-test/t/type_varchar.test
+++ b/mysql-test/t/type_varchar.test
@@ -3,7 +3,7 @@ drop table if exists t1, t2;
--enable_warnings
create table t1 (v varchar(30), c char(3), e enum('abc','def','ghi'), t text);
-system cp $MYSQL_TEST_DIR/std_data/vchar.frm $MYSQLTEST_VARDIR/master-data/test/;
+copy_file $MYSQL_TEST_DIR/std_data/vchar.frm $MYSQLTEST_VARDIR/master-data/test/vchar.frm;
truncate table vchar;
show create table t1;
show create table vchar;
@@ -162,7 +162,8 @@ create table t3 (
en varchar(255) character set utf8,
cz varchar(255) character set utf8
);
-system cp $MYSQL_TEST_DIR/std_data/14897.frm $MYSQLTEST_VARDIR/master-data/test/t3.frm;
+remove_file $MYSQLTEST_VARDIR/master-data/test/t3.frm;
+copy_file $MYSQL_TEST_DIR/std_data/14897.frm $MYSQLTEST_VARDIR/master-data/test/t3.frm;
truncate table t3;
insert into t3 (id, en, cz) values
(1,'en string 1','cz string 1'),
diff --git a/mysql-test/t/varbinary.test b/mysql-test/t/varbinary.test
index 2f0c1c83e84..2d055920c22 100644
--- a/mysql-test/t/varbinary.test
+++ b/mysql-test/t/varbinary.test
@@ -83,4 +83,5 @@ insert into t1 values("aaa ");
select length(a) from t1;
alter table t1 modify a varchar(255);
select length(a) from t1;
+drop table t1;
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 4f91b75ced1..d381ed62bc7 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -18,12 +18,11 @@ set @my_key_buffer_size =@@global.key_buffer_size;
set @my_max_binlog_cache_size =@@global.max_binlog_cache_size;
set @my_max_binlog_size =@@global.max_binlog_size;
set @my_max_connect_errors =@@global.max_connect_errors;
+set @my_max_connections =@@global.max_connections;
set @my_max_delayed_threads =@@global.max_delayed_threads;
set @my_max_heap_table_size =@@global.max_heap_table_size;
set @my_max_insert_delayed_threads=@@global.max_insert_delayed_threads;
set @my_max_join_size =@@global.max_join_size;
-set @my_max_user_connections =@@global.max_user_connections;
-set @my_max_write_lock_count =@@global.max_write_lock_count;
set @my_myisam_data_pointer_size =@@global.myisam_data_pointer_size;
set @my_net_buffer_length =@@global.net_buffer_length;
set @my_net_write_timeout =@@global.net_write_timeout;
@@ -689,6 +688,17 @@ select @@&;
--error ER_PARSE_ERROR
select @@@;
+#
+# Bug#20166 mysql-test-run.pl does not test system privilege tables creation
+#
+# Don't actually output, since it depends on the system
+--replace_column 1 #
+select @@hostname;
+--error 1238
+set @@hostname= "anothername";
+--replace_column 2 #
+show variables like 'hostname';
+
--echo End of 5.0 tests
# This is at the very after the versioned tests, since it involves doing
@@ -707,12 +717,13 @@ set global key_buffer_size =@my_key_buffer_size;
set global max_binlog_cache_size =default; #@my_max_binlog_cache_size;
set global max_binlog_size =@my_max_binlog_size;
set global max_connect_errors =@my_max_connect_errors;
+set global max_connections =@my_max_connections;
set global max_delayed_threads =@my_max_delayed_threads;
set global max_heap_table_size =@my_max_heap_table_size;
set global max_insert_delayed_threads=@my_max_insert_delayed_threads;
set global max_join_size =@my_max_join_size;
-set global max_user_connections =@my_max_user_connections;
-set global max_write_lock_count =@my_max_write_lock_count;
+set global max_user_connections =default;
+set global max_write_lock_count =default;
set global myisam_data_pointer_size =@my_myisam_data_pointer_size;
set global net_buffer_length =@my_net_buffer_length;
set global net_write_timeout =@my_net_write_timeout;
diff --git a/mysql-test/t/xa.test b/mysql-test/t/xa.test
index 92405bac137..0d564727fe3 100644
--- a/mysql-test/t/xa.test
+++ b/mysql-test/t/xa.test
@@ -37,7 +37,7 @@ begin;
--error 1399
create table t2 (a int);
-connect (con1,localhost,,,);
+connect (con1,localhost,root,,);
connection con1;
--error 1440
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c
index e40490776f8..d2ace12da4d 100644
--- a/mysys/mf_iocache.c
+++ b/mysys/mf_iocache.c
@@ -170,24 +170,28 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
info->arg = 0;
info->alloced_buffer = 0;
info->buffer=0;
+ info->seek_not_done= 0;
- pos= my_tell(file, MYF(0));
- if ((pos == (my_off_t) -1) && (my_errno == ESPIPE))
+ if (file >= 0)
{
- /*
- This kind of object doesn't support seek() or tell(). Don't set a flag
- that will make us again try to seek() later and fail.
- */
- info->seek_not_done= 0;
- /*
- Additionally, if we're supposed to start somewhere other than the
- the beginning of whatever this file is, then somebody made a bad
- assumption.
- */
- DBUG_ASSERT(seek_offset == 0);
+ pos= my_tell(file, MYF(0));
+ if ((pos == (my_off_t) -1) && (my_errno == ESPIPE))
+ {
+ /*
+ This kind of object doesn't support seek() or tell(). Don't set a
+ flag that will make us again try to seek() later and fail.
+ */
+ info->seek_not_done= 0;
+ /*
+ Additionally, if we're supposed to start somewhere other than the
+ the beginning of whatever this file is, then somebody made a bad
+ assumption.
+ */
+ DBUG_ASSERT(seek_offset == 0);
+ }
+ else
+ info->seek_not_done= test(seek_offset != pos);
}
- else
- info->seek_not_done= test(file >= 0 && seek_offset != pos);
info->disk_writes= 0;
#ifdef THREAD
diff --git a/mysys/my_symlink2.c b/mysys/my_symlink2.c
index 279672be11c..6ea22790998 100644
--- a/mysys/my_symlink2.c
+++ b/mysys/my_symlink2.c
@@ -33,7 +33,9 @@ File my_create_with_symlink(const char *linkname, const char *filename,
int create_link;
char abs_linkname[FN_REFLEN];
DBUG_ENTER("my_create_with_symlink");
- DBUG_PRINT("enter", ("linkname: %s filename: %s", linkname, filename));
+ DBUG_PRINT("enter", ("linkname: %s filename: %s",
+ linkname ? linkname : "(null)",
+ filename ? filename : "(null)"));
if (my_disable_symlinks)
{
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index 591fa23831e..934202b5c60 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -29,8 +29,7 @@ bin_SCRIPTS = @server_scripts@ \
mysql_find_rows \
mysqlhotcopy \
mysqldumpslow \
- mysqld_multi \
- mysql_create_system_tables
+ mysqld_multi
noinst_SCRIPTS = make_binary_distribution \
make_sharedlib_distribution
@@ -52,18 +51,20 @@ EXTRA_SCRIPTS = make_binary_distribution.sh \
mysqlhotcopy.sh \
mysqldumpslow.sh \
mysqld_multi.sh \
- mysqld_safe.sh \
- mysql_create_system_tables.sh
+ mysqld_safe.sh
EXTRA_DIST = $(EXTRA_SCRIPTS) \
mysqlaccess.conf \
mysqlbug \
- make_win_bin_dist
+ make_win_bin_dist \
+ mysql_system_tables_fix.sql
-dist_pkgdata_DATA = fill_help_tables.sql mysql_fix_privilege_tables.sql
+dist_pkgdata_DATA = fill_help_tables.sql \
+ mysql_fix_privilege_tables.sql \
+ mysql_system_tables.sql \
+ mysql_system_tables_data.sql \
+ mysql_test_data_timezone.sql
-# mysqlbug should be distributed built so that people can report build
-# failures with it.
CLEANFILES = @server_scripts@ \
make_binary_distribution \
make_sharedlib_distribution \
@@ -81,13 +82,23 @@ CLEANFILES = @server_scripts@ \
mysqldumpslow \
mysql_tableinfo \
mysqld_multi \
- mysql_create_system_tables
+ mysql_fix_privilege_tables.sql
+# mysqlbug should be distributed built so that people can report build
+# failures with it.
DISTCLEANFILES = mysqlbug
# We want the right version and configure comand line in mysqlbug
mysqlbug: ${top_builddir}/config.status mysqlbug.sh
+# Build mysql_fix_privilege_tables.sql from the files that contain
+# the system tables for this version of MySQL plus any commands
+# needed to upgrade the system tables from an older version
+mysql_fix_privilege_tables.sql: mysql_system_tables.sql \
+ mysql_system_tables_fix.sql
+ @echo "Building $@";
+ @cat mysql_system_tables.sql mysql_system_tables_fix.sql > $@
+
SUFFIXES = .sh
.sh:
diff --git a/scripts/make_binary_distribution.sh b/scripts/make_binary_distribution.sh
index 11430601d06..fb72666baba 100644
--- a/scripts/make_binary_distribution.sh
+++ b/scripts/make_binary_distribution.sh
@@ -254,7 +254,6 @@ copyfileto $BASE/mysql-test \
netware/mysql_test_run.nlm netware/install_test_db.ncf
$CP mysql-test/lib/*.pl $BASE/mysql-test/lib
-$CP mysql-test/lib/*.sql $BASE/mysql-test/lib
$CP mysql-test/t/*.def $BASE/mysql-test/t
$CP mysql-test/include/*.inc $BASE/mysql-test/include
$CP mysql-test/include/*.test $BASE/mysql-test/include
diff --git a/scripts/make_win_bin_dist b/scripts/make_win_bin_dist
index b98e0667d56..146dcad95f1 100755
--- a/scripts/make_win_bin_dist
+++ b/scripts/make_win_bin_dist
@@ -291,7 +291,6 @@ cp mysql-test/README $DESTDIR/mysql-test/
cp mysql-test/install_test_db.sh $DESTDIR/mysql-test/install_test_db
cp mysql-test/include/*.inc $DESTDIR/mysql-test/include/
cp mysql-test/lib/*.pl $DESTDIR/mysql-test/lib/
-cp mysql-test/lib/*.sql $DESTDIR/mysql-test/lib/
cp mysql-test/r/*.require $DESTDIR/mysql-test/r/
# Need this trick, or we get "argument list too long".
ABS_DST=`pwd`/$DESTDIR
diff --git a/scripts/mysql_create_system_tables.sh b/scripts/mysql_create_system_tables.sh
deleted file mode 100644
index cc86def1a5c..00000000000
--- a/scripts/mysql_create_system_tables.sh
+++ /dev/null
@@ -1,924 +0,0 @@
-#!/bin/sh
-# Copyright (C) 1997-2003 MySQL AB
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-
-# This script writes on stdout SQL commands to generate all not
-# existing MySQL system tables. It also replaces the help tables with
-# new context from the manual (from fill_help_tables.sql).
-
-# $1 - "test" or "real" or "verbose" variant of database
-# $2 - path to mysql-database directory
-# $3 - hostname
-# $4 - windows option
-
-if test "$1" = ""
-then
- echo "
-This script writes on stdout SQL commands to generate all not
-existing MySQL system tables. It also replaces the help tables with
-new context from the manual (from fill_help_tables.sql).
-
-Usage:
- mysql_create_system_tables [test|verbose|real] <path to mysql-database directory> <hostname> <windows option>
-"
- exit
-fi
-
-mdata=$2
-hostname=$3
-windows=$4
-
-# Initialize variables
-c_d="" i_d=""
-c_s="" i_s=""
-c_h="" i_h=""
-c_u="" i_u=""
-c_f="" i_f=""
-c_t="" c_c=""
-c_ht=""
-c_hc=""
-c_hr=""
-c_hk=""
-i_ht=""
-c_tzn="" c_tz="" c_tzt="" c_tztt="" c_tzls="" c_pl=""
-i_tzn="" i_tz="" i_tzt="" i_tztt="" i_tzls="" i_pl=""
-c_p="" c_pp=""
-c_gl="" c_sl=""
-c_ev=""
-
-# Check for old tables
-if test ! -f $mdata/db.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing db table" 1>&2;
- fi
-
- # mysqld --bootstrap wants one command/line
- c_d="$c_d CREATE TABLE db ("
- c_d="$c_d Host char(60) binary DEFAULT '' NOT NULL,"
- c_d="$c_d Db char(64) binary DEFAULT '' NOT NULL,"
- c_d="$c_d User char(16) binary DEFAULT '' NOT NULL,"
- c_d="$c_d Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_d="$c_d PRIMARY KEY Host (Host,Db,User),"
- c_d="$c_d KEY User (User)"
- c_d="$c_d ) engine=MyISAM"
- c_d="$c_d CHARACTER SET utf8 COLLATE utf8_bin"
- c_d="$c_d comment='Database privileges';"
-
- i_d="INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
- INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');"
-fi
-
-if test ! -f $mdata/host.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing host table" 1>&2;
- fi
-
- c_h="$c_h CREATE TABLE host ("
- c_h="$c_h Host char(60) binary DEFAULT '' NOT NULL,"
- c_h="$c_h Db char(64) binary DEFAULT '' NOT NULL,"
- c_h="$c_h Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_h="$c_h PRIMARY KEY Host (Host,Db)"
- c_h="$c_h ) engine=MyISAM"
- c_h="$c_h CHARACTER SET utf8 COLLATE utf8_bin"
- c_h="$c_h comment='Host privileges; Merged with database privileges';"
-fi
-
-if test ! -f $mdata/user.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing user table" 1>&2;
- fi
-
- c_u="$c_u CREATE TABLE user ("
- c_u="$c_u Host char(60) binary DEFAULT '' NOT NULL,"
- c_u="$c_u User char(16) binary DEFAULT '' NOT NULL,"
- c_u="$c_u Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL,"
- c_u="$c_u Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_u="$c_u ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL,"
- c_u="$c_u ssl_cipher BLOB NOT NULL,"
- c_u="$c_u x509_issuer BLOB NOT NULL,"
- c_u="$c_u x509_subject BLOB NOT NULL,"
- c_u="$c_u max_questions int(11) unsigned DEFAULT 0 NOT NULL,"
- c_u="$c_u max_updates int(11) unsigned DEFAULT 0 NOT NULL,"
- c_u="$c_u max_connections int(11) unsigned DEFAULT 0 NOT NULL,"
- c_u="$c_u max_user_connections int(11) unsigned DEFAULT 0 NOT NULL,"
- c_u="$c_u PRIMARY KEY Host (Host,User)"
- c_u="$c_u ) engine=MyISAM"
- c_u="$c_u CHARACTER SET utf8 COLLATE utf8_bin"
- c_u="$c_u comment='Users and global privileges';"
-
- if test "$1" = "test"
- then
- i_u="INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
- INSERT INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
- REPLACE INTO user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
- INSERT INTO user (host,user) values ('localhost','');
- INSERT INTO user (host,user) values ('$hostname','');"
- else
- i_u="INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);"
- if test "$windows" = "0"
- then
- i_u="$i_u
- INSERT INTO user VALUES ('$hostname','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
- INSERT INTO user (host,user) values ('$hostname','');
- INSERT INTO user (host,user) values ('localhost','');"
- else
- i_u="$i_u
- INSERT INTO user (host,user) VALUES ('localhost','');"
- fi
- fi
-fi
-
-# Check for old tables
-if test ! -f $mdata/servers.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing servers table" 1>&2;
- fi
-
- c_s="
-CREATE TABLE servers ("
- c_s="$c_s Server_name char(64) NOT NULL,"
- c_s="$c_s Host char(64) NOT NULL,"
- c_s="$c_s Db char(64) NOT NULL,"
- c_s="$c_s Username char(64) NOT NULL,"
- c_s="$c_s Password char(64) NOT NULL,"
- c_s="$c_s Port INT(4),"
- c_s="$c_s Socket char(64),"
- c_s="$c_s Wrapper char(64) NOT NULL,"
- c_s="$c_s Owner char(64) NOT NULL,"
- c_s="$c_s PRIMARY KEY (Server_name))"
- c_s="$c_s CHARACTER SET utf8 comment='MySQL Foreign Servers table';"
-
- i_s="INSERT INTO servers VALUES
- ('test','localhost','test','root','', 0,
- '','mysql','root');
- "
-fi
-
-if test ! -f $mdata/func.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing func table" 1>&2;
- fi
-
- c_f="$c_f CREATE TABLE func ("
- c_f="$c_f name char(64) binary DEFAULT '' NOT NULL,"
- c_f="$c_f ret tinyint(1) DEFAULT '0' NOT NULL,"
- c_f="$c_f dl char(128) DEFAULT '' NOT NULL,"
- c_f="$c_f type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL,"
- c_f="$c_f PRIMARY KEY (name)"
- c_f="$c_f ) engine=MyISAM"
- c_f="$c_f CHARACTER SET utf8 COLLATE utf8_bin"
- c_f="$c_f comment='User defined functions';"
-fi
-
-if test ! -f $mdata/plugin.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing plugin table" 1>&2;
- fi
-
- c_pl="$c_pl CREATE TABLE plugin ("
- c_pl="$c_pl name char(64) binary DEFAULT '' NOT NULL,"
- c_pl="$c_pl dl char(128) DEFAULT '' NOT NULL,"
- c_pl="$c_pl PRIMARY KEY (name)"
- c_pl="$c_pl ) engine=MyISAM"
- c_pl="$c_pl CHARACTER SET utf8 COLLATE utf8_bin"
- c_pl="$c_pl comment='MySQL plugins';"
-fi
-
-if test ! -f $mdata/tables_priv.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing tables_priv table" 1>&2;
- fi
-
- c_t="$c_t CREATE TABLE tables_priv ("
- c_t="$c_t Host char(60) binary DEFAULT '' NOT NULL,"
- c_t="$c_t Db char(64) binary DEFAULT '' NOT NULL,"
- c_t="$c_t User char(16) binary DEFAULT '' NOT NULL,"
- c_t="$c_t Table_name char(64) binary DEFAULT '' NOT NULL,"
- c_t="$c_t Grantor char(77) DEFAULT '' NOT NULL,"
- c_t="$c_t Timestamp timestamp,"
- c_t="$c_t Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') COLLATE utf8_general_ci DEFAULT '' NOT NULL,"
- c_t="$c_t Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL,"
- c_t="$c_t PRIMARY KEY (Host,Db,User,Table_name),"
- c_t="$c_t KEY Grantor (Grantor)"
- c_t="$c_t ) engine=MyISAM"
- c_t="$c_t CHARACTER SET utf8 COLLATE utf8_bin"
- c_t="$c_t comment='Table privileges';"
-fi
-
-if test ! -f $mdata/columns_priv.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing columns_priv table" 1>&2;
- fi
-
- c_c="$c_c CREATE TABLE columns_priv ("
- c_c="$c_c Host char(60) binary DEFAULT '' NOT NULL,"
- c_c="$c_c Db char(64) binary DEFAULT '' NOT NULL,"
- c_c="$c_c User char(16) binary DEFAULT '' NOT NULL,"
- c_c="$c_c Table_name char(64) binary DEFAULT '' NOT NULL,"
- c_c="$c_c Column_name char(64) binary DEFAULT '' NOT NULL,"
- c_c="$c_c Timestamp timestamp,"
- c_c="$c_c Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL,"
- c_c="$c_c PRIMARY KEY (Host,Db,User,Table_name,Column_name)"
- c_c="$c_c ) engine=MyISAM"
- c_c="$c_c CHARACTER SET utf8 COLLATE utf8_bin"
- c_c="$c_c comment='Column privileges';"
-fi
-
-if test ! -f $mdata/procs_priv.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing procs_priv table" 1>&2;
- fi
-
- c_pp="$c_pp CREATE TABLE procs_priv ("
- c_pp="$c_pp Host char(60) binary DEFAULT '' NOT NULL,"
- c_pp="$c_pp Db char(64) binary DEFAULT '' NOT NULL,"
- c_pp="$c_pp User char(16) binary DEFAULT '' NOT NULL,"
- c_pp="$c_pp Routine_name char(64) binary DEFAULT '' NOT NULL,"
- c_pp="$c_pp Routine_type enum('FUNCTION','PROCEDURE') NOT NULL,"
- c_pp="$c_pp Grantor char(77) DEFAULT '' NOT NULL,"
- c_pp="$c_pp Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL,"
- c_pp="$c_pp Timestamp timestamp,"
- c_pp="$c_pp PRIMARY KEY (Host,Db,User,Routine_name,Routine_type),"
- c_pp="$c_pp KEY Grantor (Grantor)"
- c_pp="$c_pp ) engine=MyISAM"
- c_pp="$c_pp CHARACTER SET utf8 COLLATE utf8_bin"
- c_pp="$c_pp comment='Procedure privileges';"
-fi
-
-if test ! -f $mdata/help_topic.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing help_topic table" 1>&2;
- fi
-
- c_ht="$c_ht CREATE TABLE help_topic ("
- c_ht="$c_ht help_topic_id int unsigned not null,"
- c_ht="$c_ht name char(64) not null,"
- c_ht="$c_ht help_category_id smallint unsigned not null,"
- c_ht="$c_ht description text not null,"
- c_ht="$c_ht example text not null,"
- c_ht="$c_ht url char(128) not null,"
- c_ht="$c_ht primary key (help_topic_id),"
- c_ht="$c_ht unique index (name)"
- c_ht="$c_ht ) engine=MyISAM"
- c_ht="$c_ht CHARACTER SET utf8"
- c_ht="$c_ht comment='help topics';"
-fi
-
-old_categories="yes"
-
-if test ! -f $mdata/help_category.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing help_category table" 1>&2;
- fi
-
- c_hc="$c_hc CREATE TABLE help_category ("
- c_hc="$c_hc help_category_id smallint unsigned not null,"
- c_hc="$c_hc name char(64) not null,"
- c_hc="$c_hc parent_category_id smallint unsigned null,"
- c_hc="$c_hc url char(128) not null,"
- c_hc="$c_hc primary key (help_category_id),"
- c_hc="$c_hc unique index (name)"
- c_hc="$c_hc ) engine=MyISAM"
- c_hc="$c_hc CHARACTER SET utf8"
- c_hc="$c_hc comment='help categories';"
-fi
-
-if test ! -f $mdata/help_keyword.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing help_keyword table" 1>&2;
- fi
-
- c_hk="$c_hk CREATE TABLE help_keyword ("
- c_hk="$c_hk help_keyword_id int unsigned not null,"
- c_hk="$c_hk name char(64) not null,"
- c_hk="$c_hk primary key (help_keyword_id),"
- c_hk="$c_hk unique index (name)"
- c_hk="$c_hk ) engine=MyISAM"
- c_hk="$c_hk CHARACTER SET utf8"
- c_hk="$c_hk comment='help keywords';"
-fi
-
-if test ! -f $mdata/help_relation.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing help_relation table" 1>&2;
- fi
-
- c_hr="$c_hr CREATE TABLE help_relation ("
- c_hr="$c_hr help_topic_id int unsigned not null references help_topic,"
- c_hr="$c_hr help_keyword_id int unsigned not null references help_keyword,"
- c_hr="$c_hr primary key (help_keyword_id, help_topic_id)"
- c_hr="$c_hr ) engine=MyISAM"
- c_hr="$c_hr CHARACTER SET utf8"
- c_hr="$c_hr comment='keyword-topic relation';"
-fi
-
-
-if test ! -f $mdata/time_zone_name.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing time_zone_name table" 1>&2;
- fi
-
- c_tzn="$c_tzn CREATE TABLE time_zone_name ("
- c_tzn="$c_tzn Name char(64) NOT NULL,"
- c_tzn="$c_tzn Time_zone_id int unsigned NOT NULL,"
- c_tzn="$c_tzn PRIMARY KEY Name (Name)"
- c_tzn="$c_tzn ) engine=MyISAM CHARACTER SET utf8"
- c_tzn="$c_tzn comment='Time zone names';"
-
- if test "$1" = "test"
- then
- i_tzn="$i_tzn INSERT INTO time_zone_name (Name, Time_Zone_id) VALUES"
- i_tzn="$i_tzn ('MET', 1), ('UTC', 2), ('Universal', 2), "
- i_tzn="$i_tzn ('Europe/Moscow',3), ('leap/Europe/Moscow',4), "
- i_tzn="$i_tzn ('Japan', 5);"
- fi
-fi
-
-if test ! -f $mdata/time_zone.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing time_zone table" 1>&2;
- fi
-
- c_tz="$c_tz CREATE TABLE time_zone ("
- c_tz="$c_tz Time_zone_id int unsigned NOT NULL auto_increment,"
- c_tz="$c_tz Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,"
- c_tz="$c_tz PRIMARY KEY TzId (Time_zone_id)"
- c_tz="$c_tz ) engine=MyISAM CHARACTER SET utf8"
- c_tz="$c_tz comment='Time zones';"
-
- if test "$1" = "test"
- then
- i_tz="$i_tz INSERT INTO time_zone (Time_zone_id, Use_leap_seconds)"
- i_tz="$i_tz VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y'), (5,'N');"
- fi
-fi
-
-if test ! -f $mdata/time_zone_transition.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing time_zone_transition table" 1>&2;
- fi
-
- c_tzt="$c_tzt CREATE TABLE time_zone_transition ("
- c_tzt="$c_tzt Time_zone_id int unsigned NOT NULL,"
- c_tzt="$c_tzt Transition_time bigint signed NOT NULL,"
- c_tzt="$c_tzt Transition_type_id int unsigned NOT NULL,"
- c_tzt="$c_tzt PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time)"
- c_tzt="$c_tzt ) engine=MyISAM CHARACTER SET utf8"
- c_tzt="$c_tzt comment='Time zone transitions';"
-
- if test "$1" = "test"
- then
- i_tzt="$i_tzt INSERT INTO time_zone_transition"
- i_tzt="$i_tzt (Time_zone_id, Transition_time, Transition_type_id)"
- i_tzt="$i_tzt VALUES"
- i_tzt="$i_tzt (1, -1693706400, 0) ,(1, -1680483600, 1)"
- i_tzt="$i_tzt ,(1, -1663455600, 2) ,(1, -1650150000, 3)"
- i_tzt="$i_tzt ,(1, -1632006000, 2) ,(1, -1618700400, 3)"
- i_tzt="$i_tzt ,(1, -938905200, 2) ,(1, -857257200, 3)"
- i_tzt="$i_tzt ,(1, -844556400, 2) ,(1, -828226800, 3)"
- i_tzt="$i_tzt ,(1, -812502000, 2) ,(1, -796777200, 3)"
- i_tzt="$i_tzt ,(1, 228877200, 2) ,(1, 243997200, 3)"
- i_tzt="$i_tzt ,(1, 260326800, 2) ,(1, 276051600, 3)"
- i_tzt="$i_tzt ,(1, 291776400, 2) ,(1, 307501200, 3)"
- i_tzt="$i_tzt ,(1, 323830800, 2) ,(1, 338950800, 3)"
- i_tzt="$i_tzt ,(1, 354675600, 2) ,(1, 370400400, 3)"
- i_tzt="$i_tzt ,(1, 386125200, 2) ,(1, 401850000, 3)"
- i_tzt="$i_tzt ,(1, 417574800, 2) ,(1, 433299600, 3)"
- i_tzt="$i_tzt ,(1, 449024400, 2) ,(1, 465354000, 3)"
- i_tzt="$i_tzt ,(1, 481078800, 2) ,(1, 496803600, 3)"
- i_tzt="$i_tzt ,(1, 512528400, 2) ,(1, 528253200, 3)"
- i_tzt="$i_tzt ,(1, 543978000, 2) ,(1, 559702800, 3)"
- i_tzt="$i_tzt ,(1, 575427600, 2) ,(1, 591152400, 3)"
- i_tzt="$i_tzt ,(1, 606877200, 2) ,(1, 622602000, 3)"
- i_tzt="$i_tzt ,(1, 638326800, 2) ,(1, 654656400, 3)"
- i_tzt="$i_tzt ,(1, 670381200, 2) ,(1, 686106000, 3)"
- i_tzt="$i_tzt ,(1, 701830800, 2) ,(1, 717555600, 3)"
- i_tzt="$i_tzt ,(1, 733280400, 2) ,(1, 749005200, 3)"
- i_tzt="$i_tzt ,(1, 764730000, 2) ,(1, 780454800, 3)"
- i_tzt="$i_tzt ,(1, 796179600, 2) ,(1, 811904400, 3)"
- i_tzt="$i_tzt ,(1, 828234000, 2) ,(1, 846378000, 3)"
- i_tzt="$i_tzt ,(1, 859683600, 2) ,(1, 877827600, 3)"
- i_tzt="$i_tzt ,(1, 891133200, 2) ,(1, 909277200, 3)"
- i_tzt="$i_tzt ,(1, 922582800, 2) ,(1, 941331600, 3)"
- i_tzt="$i_tzt ,(1, 954032400, 2) ,(1, 972781200, 3)"
- i_tzt="$i_tzt ,(1, 985482000, 2) ,(1, 1004230800, 3)"
- i_tzt="$i_tzt ,(1, 1017536400, 2) ,(1, 1035680400, 3)"
- i_tzt="$i_tzt ,(1, 1048986000, 2) ,(1, 1067130000, 3)"
- i_tzt="$i_tzt ,(1, 1080435600, 2) ,(1, 1099184400, 3)"
- i_tzt="$i_tzt ,(1, 1111885200, 2) ,(1, 1130634000, 3)"
- i_tzt="$i_tzt ,(1, 1143334800, 2) ,(1, 1162083600, 3)"
- i_tzt="$i_tzt ,(1, 1174784400, 2) ,(1, 1193533200, 3)"
- i_tzt="$i_tzt ,(1, 1206838800, 2) ,(1, 1224982800, 3)"
- i_tzt="$i_tzt ,(1, 1238288400, 2) ,(1, 1256432400, 3)"
- i_tzt="$i_tzt ,(1, 1269738000, 2) ,(1, 1288486800, 3)"
- i_tzt="$i_tzt ,(1, 1301187600, 2) ,(1, 1319936400, 3)"
- i_tzt="$i_tzt ,(1, 1332637200, 2) ,(1, 1351386000, 3)"
- i_tzt="$i_tzt ,(1, 1364691600, 2) ,(1, 1382835600, 3)"
- i_tzt="$i_tzt ,(1, 1396141200, 2) ,(1, 1414285200, 3)"
- i_tzt="$i_tzt ,(1, 1427590800, 2) ,(1, 1445734800, 3)"
- i_tzt="$i_tzt ,(1, 1459040400, 2) ,(1, 1477789200, 3)"
- i_tzt="$i_tzt ,(1, 1490490000, 2) ,(1, 1509238800, 3)"
- i_tzt="$i_tzt ,(1, 1521939600, 2) ,(1, 1540688400, 3)"
- i_tzt="$i_tzt ,(1, 1553994000, 2) ,(1, 1572138000, 3)"
- i_tzt="$i_tzt ,(1, 1585443600, 2) ,(1, 1603587600, 3)"
- i_tzt="$i_tzt ,(1, 1616893200, 2) ,(1, 1635642000, 3)"
- i_tzt="$i_tzt ,(1, 1648342800, 2) ,(1, 1667091600, 3)"
- i_tzt="$i_tzt ,(1, 1679792400, 2) ,(1, 1698541200, 3)"
- i_tzt="$i_tzt ,(1, 1711846800, 2) ,(1, 1729990800, 3)"
- i_tzt="$i_tzt ,(1, 1743296400, 2) ,(1, 1761440400, 3)"
- i_tzt="$i_tzt ,(1, 1774746000, 2) ,(1, 1792890000, 3)"
- i_tzt="$i_tzt ,(1, 1806195600, 2) ,(1, 1824944400, 3)"
- i_tzt="$i_tzt ,(1, 1837645200, 2) ,(1, 1856394000, 3)"
- i_tzt="$i_tzt ,(1, 1869094800, 2) ,(1, 1887843600, 3)"
- i_tzt="$i_tzt ,(1, 1901149200, 2) ,(1, 1919293200, 3)"
- i_tzt="$i_tzt ,(1, 1932598800, 2) ,(1, 1950742800, 3)"
- i_tzt="$i_tzt ,(1, 1964048400, 2) ,(1, 1982797200, 3)"
- i_tzt="$i_tzt ,(1, 1995498000, 2) ,(1, 2014246800, 3)"
- i_tzt="$i_tzt ,(1, 2026947600, 2) ,(1, 2045696400, 3)"
- i_tzt="$i_tzt ,(1, 2058397200, 2) ,(1, 2077146000, 3)"
- i_tzt="$i_tzt ,(1, 2090451600, 2) ,(1, 2108595600, 3)"
- i_tzt="$i_tzt ,(1, 2121901200, 2) ,(1, 2140045200, 3)"
- i_tzt="$i_tzt ,(3, -1688265000, 2) ,(3, -1656819048, 1)"
- i_tzt="$i_tzt ,(3, -1641353448, 2) ,(3, -1627965048, 3)"
- i_tzt="$i_tzt ,(3, -1618716648, 1) ,(3, -1596429048, 3)"
- i_tzt="$i_tzt ,(3, -1593829848, 5) ,(3, -1589860800, 4)"
- i_tzt="$i_tzt ,(3, -1542427200, 5) ,(3, -1539493200, 6)"
- i_tzt="$i_tzt ,(3, -1525323600, 5) ,(3, -1522728000, 4)"
- i_tzt="$i_tzt ,(3, -1491188400, 7) ,(3, -1247536800, 4)"
- i_tzt="$i_tzt ,(3, 354920400, 5) ,(3, 370728000, 4)"
- i_tzt="$i_tzt ,(3, 386456400, 5) ,(3, 402264000, 4)"
- i_tzt="$i_tzt ,(3, 417992400, 5) ,(3, 433800000, 4)"
- i_tzt="$i_tzt ,(3, 449614800, 5) ,(3, 465346800, 8)"
- i_tzt="$i_tzt ,(3, 481071600, 9) ,(3, 496796400, 8)"
- i_tzt="$i_tzt ,(3, 512521200, 9) ,(3, 528246000, 8)"
- i_tzt="$i_tzt ,(3, 543970800, 9) ,(3, 559695600, 8)"
- i_tzt="$i_tzt ,(3, 575420400, 9) ,(3, 591145200, 8)"
- i_tzt="$i_tzt ,(3, 606870000, 9) ,(3, 622594800, 8)"
- i_tzt="$i_tzt ,(3, 638319600, 9) ,(3, 654649200, 8)"
- i_tzt="$i_tzt ,(3, 670374000, 10) ,(3, 686102400, 11)"
- i_tzt="$i_tzt ,(3, 695779200, 8) ,(3, 701812800, 5)"
- i_tzt="$i_tzt ,(3, 717534000, 4) ,(3, 733273200, 9)"
- i_tzt="$i_tzt ,(3, 748998000, 8) ,(3, 764722800, 9)"
- i_tzt="$i_tzt ,(3, 780447600, 8) ,(3, 796172400, 9)"
- i_tzt="$i_tzt ,(3, 811897200, 8) ,(3, 828226800, 9)"
- i_tzt="$i_tzt ,(3, 846370800, 8) ,(3, 859676400, 9)"
- i_tzt="$i_tzt ,(3, 877820400, 8) ,(3, 891126000, 9)"
- i_tzt="$i_tzt ,(3, 909270000, 8) ,(3, 922575600, 9)"
- i_tzt="$i_tzt ,(3, 941324400, 8) ,(3, 954025200, 9)"
- i_tzt="$i_tzt ,(3, 972774000, 8) ,(3, 985474800, 9)"
- i_tzt="$i_tzt ,(3, 1004223600, 8) ,(3, 1017529200, 9)"
- i_tzt="$i_tzt ,(3, 1035673200, 8) ,(3, 1048978800, 9)"
- i_tzt="$i_tzt ,(3, 1067122800, 8) ,(3, 1080428400, 9)"
- i_tzt="$i_tzt ,(3, 1099177200, 8) ,(3, 1111878000, 9)"
- i_tzt="$i_tzt ,(3, 1130626800, 8) ,(3, 1143327600, 9)"
- i_tzt="$i_tzt ,(3, 1162076400, 8) ,(3, 1174777200, 9)"
- i_tzt="$i_tzt ,(3, 1193526000, 8) ,(3, 1206831600, 9)"
- i_tzt="$i_tzt ,(3, 1224975600, 8) ,(3, 1238281200, 9)"
- i_tzt="$i_tzt ,(3, 1256425200, 8) ,(3, 1269730800, 9)"
- i_tzt="$i_tzt ,(3, 1288479600, 8) ,(3, 1301180400, 9)"
- i_tzt="$i_tzt ,(3, 1319929200, 8) ,(3, 1332630000, 9)"
- i_tzt="$i_tzt ,(3, 1351378800, 8) ,(3, 1364684400, 9)"
- i_tzt="$i_tzt ,(3, 1382828400, 8) ,(3, 1396134000, 9)"
- i_tzt="$i_tzt ,(3, 1414278000, 8) ,(3, 1427583600, 9)"
- i_tzt="$i_tzt ,(3, 1445727600, 8) ,(3, 1459033200, 9)"
- i_tzt="$i_tzt ,(3, 1477782000, 8) ,(3, 1490482800, 9)"
- i_tzt="$i_tzt ,(3, 1509231600, 8) ,(3, 1521932400, 9)"
- i_tzt="$i_tzt ,(3, 1540681200, 8) ,(3, 1553986800, 9)"
- i_tzt="$i_tzt ,(3, 1572130800, 8) ,(3, 1585436400, 9)"
- i_tzt="$i_tzt ,(3, 1603580400, 8) ,(3, 1616886000, 9)"
- i_tzt="$i_tzt ,(3, 1635634800, 8) ,(3, 1648335600, 9)"
- i_tzt="$i_tzt ,(3, 1667084400, 8) ,(3, 1679785200, 9)"
- i_tzt="$i_tzt ,(3, 1698534000, 8) ,(3, 1711839600, 9)"
- i_tzt="$i_tzt ,(3, 1729983600, 8) ,(3, 1743289200, 9)"
- i_tzt="$i_tzt ,(3, 1761433200, 8) ,(3, 1774738800, 9)"
- i_tzt="$i_tzt ,(3, 1792882800, 8) ,(3, 1806188400, 9)"
- i_tzt="$i_tzt ,(3, 1824937200, 8) ,(3, 1837638000, 9)"
- i_tzt="$i_tzt ,(3, 1856386800, 8) ,(3, 1869087600, 9)"
- i_tzt="$i_tzt ,(3, 1887836400, 8) ,(3, 1901142000, 9)"
- i_tzt="$i_tzt ,(3, 1919286000, 8) ,(3, 1932591600, 9)"
- i_tzt="$i_tzt ,(3, 1950735600, 8) ,(3, 1964041200, 9)"
- i_tzt="$i_tzt ,(3, 1982790000, 8) ,(3, 1995490800, 9)"
- i_tzt="$i_tzt ,(3, 2014239600, 8) ,(3, 2026940400, 9)"
- i_tzt="$i_tzt ,(3, 2045689200, 8) ,(3, 2058390000, 9)"
- i_tzt="$i_tzt ,(3, 2077138800, 8) ,(3, 2090444400, 9)"
- i_tzt="$i_tzt ,(3, 2108588400, 8) ,(3, 2121894000, 9)"
- i_tzt="$i_tzt ,(3, 2140038000, 8)"
- i_tzt="$i_tzt ,(4, -1688265000, 2) ,(4, -1656819048, 1)"
- i_tzt="$i_tzt ,(4, -1641353448, 2) ,(4, -1627965048, 3)"
- i_tzt="$i_tzt ,(4, -1618716648, 1) ,(4, -1596429048, 3)"
- i_tzt="$i_tzt ,(4, -1593829848, 5) ,(4, -1589860800, 4)"
- i_tzt="$i_tzt ,(4, -1542427200, 5) ,(4, -1539493200, 6)"
- i_tzt="$i_tzt ,(4, -1525323600, 5) ,(4, -1522728000, 4)"
- i_tzt="$i_tzt ,(4, -1491188400, 7) ,(4, -1247536800, 4)"
- i_tzt="$i_tzt ,(4, 354920409, 5) ,(4, 370728010, 4)"
- i_tzt="$i_tzt ,(4, 386456410, 5) ,(4, 402264011, 4)"
- i_tzt="$i_tzt ,(4, 417992411, 5) ,(4, 433800012, 4)"
- i_tzt="$i_tzt ,(4, 449614812, 5) ,(4, 465346812, 8)"
- i_tzt="$i_tzt ,(4, 481071612, 9) ,(4, 496796413, 8)"
- i_tzt="$i_tzt ,(4, 512521213, 9) ,(4, 528246013, 8)"
- i_tzt="$i_tzt ,(4, 543970813, 9) ,(4, 559695613, 8)"
- i_tzt="$i_tzt ,(4, 575420414, 9) ,(4, 591145214, 8)"
- i_tzt="$i_tzt ,(4, 606870014, 9) ,(4, 622594814, 8)"
- i_tzt="$i_tzt ,(4, 638319615, 9) ,(4, 654649215, 8)"
- i_tzt="$i_tzt ,(4, 670374016, 10) ,(4, 686102416, 11)"
- i_tzt="$i_tzt ,(4, 695779216, 8) ,(4, 701812816, 5)"
- i_tzt="$i_tzt ,(4, 717534017, 4) ,(4, 733273217, 9)"
- i_tzt="$i_tzt ,(4, 748998018, 8) ,(4, 764722818, 9)"
- i_tzt="$i_tzt ,(4, 780447619, 8) ,(4, 796172419, 9)"
- i_tzt="$i_tzt ,(4, 811897219, 8) ,(4, 828226820, 9)"
- i_tzt="$i_tzt ,(4, 846370820, 8) ,(4, 859676420, 9)"
- i_tzt="$i_tzt ,(4, 877820421, 8) ,(4, 891126021, 9)"
- i_tzt="$i_tzt ,(4, 909270021, 8) ,(4, 922575622, 9)"
- i_tzt="$i_tzt ,(4, 941324422, 8) ,(4, 954025222, 9)"
- i_tzt="$i_tzt ,(4, 972774022, 8) ,(4, 985474822, 9)"
- i_tzt="$i_tzt ,(4, 1004223622, 8) ,(4, 1017529222, 9)"
- i_tzt="$i_tzt ,(4, 1035673222, 8) ,(4, 1048978822, 9)"
- i_tzt="$i_tzt ,(4, 1067122822, 8) ,(4, 1080428422, 9)"
- i_tzt="$i_tzt ,(4, 1099177222, 8) ,(4, 1111878022, 9)"
- i_tzt="$i_tzt ,(4, 1130626822, 8) ,(4, 1143327622, 9)"
- i_tzt="$i_tzt ,(4, 1162076422, 8) ,(4, 1174777222, 9)"
- i_tzt="$i_tzt ,(4, 1193526022, 8) ,(4, 1206831622, 9)"
- i_tzt="$i_tzt ,(4, 1224975622, 8) ,(4, 1238281222, 9)"
- i_tzt="$i_tzt ,(4, 1256425222, 8) ,(4, 1269730822, 9)"
- i_tzt="$i_tzt ,(4, 1288479622, 8) ,(4, 1301180422, 9)"
- i_tzt="$i_tzt ,(4, 1319929222, 8) ,(4, 1332630022, 9)"
- i_tzt="$i_tzt ,(4, 1351378822, 8) ,(4, 1364684422, 9)"
- i_tzt="$i_tzt ,(4, 1382828422, 8) ,(4, 1396134022, 9)"
- i_tzt="$i_tzt ,(4, 1414278022, 8) ,(4, 1427583622, 9)"
- i_tzt="$i_tzt ,(4, 1445727622, 8) ,(4, 1459033222, 9)"
- i_tzt="$i_tzt ,(4, 1477782022, 8) ,(4, 1490482822, 9)"
- i_tzt="$i_tzt ,(4, 1509231622, 8) ,(4, 1521932422, 9)"
- i_tzt="$i_tzt ,(4, 1540681222, 8) ,(4, 1553986822, 9)"
- i_tzt="$i_tzt ,(4, 1572130822, 8) ,(4, 1585436422, 9)"
- i_tzt="$i_tzt ,(4, 1603580422, 8) ,(4, 1616886022, 9)"
- i_tzt="$i_tzt ,(4, 1635634822, 8) ,(4, 1648335622, 9)"
- i_tzt="$i_tzt ,(4, 1667084422, 8) ,(4, 1679785222, 9)"
- i_tzt="$i_tzt ,(4, 1698534022, 8) ,(4, 1711839622, 9)"
- i_tzt="$i_tzt ,(4, 1729983622, 8) ,(4, 1743289222, 9)"
- i_tzt="$i_tzt ,(4, 1761433222, 8) ,(4, 1774738822, 9)"
- i_tzt="$i_tzt ,(4, 1792882822, 8) ,(4, 1806188422, 9)"
- i_tzt="$i_tzt ,(4, 1824937222, 8) ,(4, 1837638022, 9)"
- i_tzt="$i_tzt ,(4, 1856386822, 8) ,(4, 1869087622, 9)"
- i_tzt="$i_tzt ,(4, 1887836422, 8) ,(4, 1901142022, 9)"
- i_tzt="$i_tzt ,(4, 1919286022, 8) ,(4, 1932591622, 9)"
- i_tzt="$i_tzt ,(4, 1950735622, 8) ,(4, 1964041222, 9)"
- i_tzt="$i_tzt ,(4, 1982790022, 8) ,(4, 1995490822, 9)"
- i_tzt="$i_tzt ,(4, 2014239622, 8) ,(4, 2026940422, 9)"
- i_tzt="$i_tzt ,(4, 2045689222, 8) ,(4, 2058390022, 9)"
- i_tzt="$i_tzt ,(4, 2077138822, 8) ,(4, 2090444422, 9)"
- i_tzt="$i_tzt ,(4, 2108588422, 8) ,(4, 2121894022, 9)"
- i_tzt="$i_tzt ,(4, 2140038022, 8)"
- i_tzt="$i_tzt ,(5, -1009875600, 1);"
- fi
-fi
-
-if test ! -f $mdata/time_zone_transition_type.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing time_zone_transition_type table" 1>&2;
- fi
-
- c_tztt="$c_tztt CREATE TABLE time_zone_transition_type ("
- c_tztt="$c_tztt Time_zone_id int unsigned NOT NULL,"
- c_tztt="$c_tztt Transition_type_id int unsigned NOT NULL,"
- c_tztt="$c_tztt Offset int signed DEFAULT 0 NOT NULL,"
- c_tztt="$c_tztt Is_DST tinyint unsigned DEFAULT 0 NOT NULL,"
- c_tztt="$c_tztt Abbreviation char(8) DEFAULT '' NOT NULL,"
- c_tztt="$c_tztt PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id)"
- c_tztt="$c_tztt ) engine=MyISAM CHARACTER SET utf8"
- c_tztt="$c_tztt comment='Time zone transition types';"
-
- if test "$1" = "test"
- then
- i_tztt="$i_tztt INSERT INTO time_zone_transition_type (Time_zone_id,"
- i_tztt="$i_tztt Transition_type_id, Offset, Is_DST, Abbreviation) VALUES"
- i_tztt="$i_tztt (1, 0, 7200, 1, 'MEST') ,(1, 1, 3600, 0, 'MET')"
- i_tztt="$i_tztt ,(1, 2, 7200, 1, 'MEST') ,(1, 3, 3600, 0, 'MET')"
- i_tztt="$i_tztt ,(2, 0, 0, 0, 'UTC')"
- i_tztt="$i_tztt ,(3, 0, 9000, 0, 'MMT') ,(3, 1, 12648, 1, 'MST')"
- i_tztt="$i_tztt ,(3, 2, 9048, 0, 'MMT') ,(3, 3, 16248, 1, 'MDST')"
- i_tztt="$i_tztt ,(3, 4, 10800, 0, 'MSK') ,(3, 5, 14400, 1, 'MSD')"
- i_tztt="$i_tztt ,(3, 6, 18000, 1, 'MSD') ,(3, 7, 7200, 0, 'EET')"
- i_tztt="$i_tztt ,(3, 8, 10800, 0, 'MSK') ,(3, 9, 14400, 1, 'MSD')"
- i_tztt="$i_tztt ,(3, 10, 10800, 1, 'EEST') ,(3, 11, 7200, 0, 'EET')"
- i_tztt="$i_tztt ,(4, 0, 9000, 0, 'MMT') ,(4, 1, 12648, 1, 'MST')"
- i_tztt="$i_tztt ,(4, 2, 9048, 0, 'MMT') ,(4, 3, 16248, 1, 'MDST')"
- i_tztt="$i_tztt ,(4, 4, 10800, 0, 'MSK') ,(4, 5, 14400, 1, 'MSD')"
- i_tztt="$i_tztt ,(4, 6, 18000, 1, 'MSD') ,(4, 7, 7200, 0, 'EET')"
- i_tztt="$i_tztt ,(4, 8, 10800, 0, 'MSK') ,(4, 9, 14400, 1, 'MSD')"
- i_tztt="$i_tztt ,(4, 10, 10800, 1, 'EEST') ,(4, 11, 7200, 0, 'EET')"
- i_tztt="$i_tztt ,(5, 0, 32400, 0, 'CJT') ,(5, 1, 32400, 0, 'JST');"
- fi
-fi
-
-if test ! -f $mdata/time_zone_leap_second.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing time_zone_leap_second table" 1>&2;
- fi
-
- c_tzls="$c_tzls CREATE TABLE time_zone_leap_second ("
- c_tzls="$c_tzls Transition_time bigint signed NOT NULL,"
- c_tzls="$c_tzls Correction int signed NOT NULL,"
- c_tzls="$c_tzls PRIMARY KEY TranTime (Transition_time)"
- c_tzls="$c_tzls ) engine=MyISAM CHARACTER SET utf8"
- c_tzls="$c_tzls comment='Leap seconds information for time zones';"
-
- if test "$1" = "test"
- then
- i_tzls="$i_tzls INSERT INTO time_zone_leap_second "
- i_tzls="$i_tzls (Transition_time, Correction) VALUES "
- i_tzls="$i_tzls (78796800, 1) ,(94694401, 2) ,(126230402, 3)"
- i_tzls="$i_tzls ,(157766403, 4) ,(189302404, 5) ,(220924805, 6)"
- i_tzls="$i_tzls ,(252460806, 7) ,(283996807, 8) ,(315532808, 9)"
- i_tzls="$i_tzls ,(362793609, 10) ,(394329610, 11) ,(425865611, 12)"
- i_tzls="$i_tzls ,(489024012, 13) ,(567993613, 14) ,(631152014, 15)"
- i_tzls="$i_tzls ,(662688015, 16) ,(709948816, 17) ,(741484817, 18)"
- i_tzls="$i_tzls ,(773020818, 19) ,(820454419, 20) ,(867715220, 21)"
- i_tzls="$i_tzls ,(915148821, 22);"
- fi
-fi
-
-if test ! -f $mdata/proc.frm
-then
- c_p="$c_p CREATE TABLE proc ("
- c_p="$c_p db char(64) collate utf8_bin DEFAULT '' NOT NULL,"
- c_p="$c_p name char(64) DEFAULT '' NOT NULL,"
- c_p="$c_p type enum('FUNCTION','PROCEDURE') NOT NULL,"
- c_p="$c_p specific_name char(64) DEFAULT '' NOT NULL,"
- c_p="$c_p language enum('SQL') DEFAULT 'SQL' NOT NULL,"
- c_p="$c_p sql_data_access enum('CONTAINS_SQL',"
- c_p="$c_p 'NO_SQL',"
- c_p="$c_p 'READS_SQL_DATA',"
- c_p="$c_p 'MODIFIES_SQL_DATA'"
- c_p="$c_p ) DEFAULT 'CONTAINS_SQL' NOT NULL,"
- c_p="$c_p is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL,"
- c_p="$c_p security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL,"
- c_p="$c_p param_list blob DEFAULT '' NOT NULL,"
- c_p="$c_p returns char(64) DEFAULT '' NOT NULL,"
- c_p="$c_p body longblob DEFAULT '' NOT NULL,"
- c_p="$c_p definer char(77) collate utf8_bin DEFAULT '' NOT NULL,"
- c_p="$c_p created timestamp,"
- c_p="$c_p modified timestamp,"
- c_p="$c_p sql_mode set("
- c_p="$c_p 'REAL_AS_FLOAT',"
- c_p="$c_p 'PIPES_AS_CONCAT',"
- c_p="$c_p 'ANSI_QUOTES',"
- c_p="$c_p 'IGNORE_SPACE',"
- c_p="$c_p 'NOT_USED',"
- c_p="$c_p 'ONLY_FULL_GROUP_BY',"
- c_p="$c_p 'NO_UNSIGNED_SUBTRACTION',"
- c_p="$c_p 'NO_DIR_IN_CREATE',"
- c_p="$c_p 'POSTGRESQL',"
- c_p="$c_p 'ORACLE',"
- c_p="$c_p 'MSSQL',"
- c_p="$c_p 'DB2',"
- c_p="$c_p 'MAXDB',"
- c_p="$c_p 'NO_KEY_OPTIONS',"
- c_p="$c_p 'NO_TABLE_OPTIONS',"
- c_p="$c_p 'NO_FIELD_OPTIONS',"
- c_p="$c_p 'MYSQL323',"
- c_p="$c_p 'MYSQL40',"
- c_p="$c_p 'ANSI',"
- c_p="$c_p 'NO_AUTO_VALUE_ON_ZERO',"
- c_p="$c_p 'NO_BACKSLASH_ESCAPES',"
- c_p="$c_p 'STRICT_TRANS_TABLES',"
- c_p="$c_p 'STRICT_ALL_TABLES',"
- c_p="$c_p 'NO_ZERO_IN_DATE',"
- c_p="$c_p 'NO_ZERO_DATE',"
- c_p="$c_p 'INVALID_DATES',"
- c_p="$c_p 'ERROR_FOR_DIVISION_BY_ZERO',"
- c_p="$c_p 'TRADITIONAL',"
- c_p="$c_p 'NO_AUTO_CREATE_USER',"
- c_p="$c_p 'HIGH_NOT_PRECEDENCE'"
- c_p="$c_p ) DEFAULT '' NOT NULL,"
- c_p="$c_p comment char(64) collate utf8_bin DEFAULT '' NOT NULL,"
- c_p="$c_p PRIMARY KEY (db,name,type)"
- c_p="$c_p ) engine=MyISAM"
- c_p="$c_p character set utf8"
- c_p="$c_p comment='Stored Procedures';"
-fi
-
-
-if test ! -f $mdata/general_log.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing general_log table" 1>&2;
- fi
- c_gl="$c_gl CREATE PROCEDURE create_general_log_table() BEGIN DECLARE is_csv_enabled int DEFAULT 0; SELECT @@have_csv = 'YES' INTO is_csv_enabled; IF (is_csv_enabled) THEN CREATE TABLE general_log (event_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT, thread_id INTEGER, server_id INTEGER, command_type VARCHAR(64), argument MEDIUMTEXT) engine=CSV CHARACTER SET utf8 comment='General log'; END IF; END;
-CALL create_general_log_table();
-DROP PROCEDURE create_general_log_table;"
-fi
-
-
-if test ! -f $mdata/slow_log.frm
-then
- if test "$1" = "verbose" ; then
- echo "Preparing slow_log table" 1>&2;
- fi
- c_sl="$c_sl CREATE PROCEDURE create_slow_log_table() BEGIN DECLARE is_csv_enabled int DEFAULT 0; SELECT @@have_csv = 'YES' INTO is_csv_enabled; IF (is_csv_enabled) THEN CREATE TABLE slow_log (start_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT NOT NULL, query_time TIME NOT NULL, lock_time TIME NOT NULL, rows_sent INTEGER NOT NULL, rows_examined INTEGER NOT NULL, db VARCHAR(512), last_insert_id INTEGER, insert_id INTEGER, server_id INTEGER, sql_text MEDIUMTEXT NOT NULL) engine=CSV CHARACTER SET utf8 comment='Slow log'; END IF; END;
-CALL create_slow_log_table();
-DROP PROCEDURE create_slow_log_table;"
-fi
-
-if test ! -f $mdata/event.frm
-then
- c_ev="$c_ev CREATE TABLE event ("
- c_ev="$c_ev db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',"
- c_ev="$c_ev name char(64) CHARACTER SET utf8 NOT NULL default '',"
- c_ev="$c_ev body longblob NOT NULL,"
- c_ev="$c_ev definer char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',"
- c_ev="$c_ev execute_at DATETIME default NULL,"
- c_ev="$c_ev interval_value int(11) default NULL,"
- c_ev="$c_ev interval_field ENUM('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK',"
- c_ev="$c_ev 'SECOND','MICROSECOND', 'YEAR_MONTH','DAY_HOUR',"
- c_ev="$c_ev 'DAY_MINUTE','DAY_SECOND',"
- c_ev="$c_ev 'HOUR_MINUTE','HOUR_SECOND',"
- c_ev="$c_ev 'MINUTE_SECOND','DAY_MICROSECOND',"
- c_ev="$c_ev 'HOUR_MICROSECOND','MINUTE_MICROSECOND',"
- c_ev="$c_ev 'SECOND_MICROSECOND') default NULL,"
- c_ev="$c_ev created TIMESTAMP NOT NULL,"
- c_ev="$c_ev modified TIMESTAMP NOT NULL,"
- c_ev="$c_ev last_executed DATETIME default NULL,"
- c_ev="$c_ev starts DATETIME default NULL,"
- c_ev="$c_ev ends DATETIME default NULL,"
- c_ev="$c_ev status ENUM('ENABLED','DISABLED') NOT NULL default 'ENABLED',"
- c_ev="$c_ev on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP',"
- c_ev="$c_ev sql_mode set("
- c_ev="$c_ev 'REAL_AS_FLOAT',"
- c_ev="$c_ev 'PIPES_AS_CONCAT',"
- c_ev="$c_ev 'ANSI_QUOTES',"
- c_ev="$c_ev 'IGNORE_SPACE',"
- c_ev="$c_ev 'NOT_USED',"
- c_ev="$c_ev 'ONLY_FULL_GROUP_BY',"
- c_ev="$c_ev 'NO_UNSIGNED_SUBTRACTION',"
- c_ev="$c_ev 'NO_DIR_IN_CREATE',"
- c_ev="$c_ev 'POSTGRESQL',"
- c_ev="$c_ev 'ORACLE',"
- c_ev="$c_ev 'MSSQL',"
- c_ev="$c_ev 'DB2',"
- c_ev="$c_ev 'MAXDB',"
- c_ev="$c_ev 'NO_KEY_OPTIONS',"
- c_ev="$c_ev 'NO_TABLE_OPTIONS',"
- c_ev="$c_ev 'NO_FIELD_OPTIONS',"
- c_ev="$c_ev 'MYSQL323',"
- c_ev="$c_ev 'MYSQL40',"
- c_ev="$c_ev 'ANSI',"
- c_ev="$c_ev 'NO_AUTO_VALUE_ON_ZERO',"
- c_ev="$c_ev 'NO_BACKSLASH_ESCAPES',"
- c_ev="$c_ev 'STRICT_TRANS_TABLES',"
- c_ev="$c_ev 'STRICT_ALL_TABLES',"
- c_ev="$c_ev 'NO_ZERO_IN_DATE',"
- c_ev="$c_ev 'NO_ZERO_DATE',"
- c_ev="$c_ev 'INVALID_DATES',"
- c_ev="$c_ev 'ERROR_FOR_DIVISION_BY_ZERO',"
- c_ev="$c_ev 'TRADITIONAL',"
- c_ev="$c_ev 'NO_AUTO_CREATE_USER',"
- c_ev="$c_ev 'HIGH_NOT_PRECEDENCE'"
- c_ev="$c_ev ) DEFAULT '' NOT NULL,"
- c_ev="$c_ev comment char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '',"
- c_ev="$c_ev PRIMARY KEY (db, name)"
- c_ev="$c_ev ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';"
-fi
-
-cat << END_OF_DATA
-use mysql;
-set sql_mode='';
-set storage_engine=myisam;
-$c_d
-$i_d
-
-$c_h
-$i_h
-
-$c_u
-$i_u
-
-$c_f
-$i_f
-
-$c_pl
-$i_pl
-
-$c_s
-$i_s
-
-$c_t
-$c_c
-
-$c_ht
-$c_hc
-$c_hr
-$c_hk
-
-$c_tzn
-$i_tzn
-$c_tz
-$i_tz
-$c_tzt
-$i_tzt
-$c_tztt
-$i_tztt
-$c_tzls
-$i_tzls
-
-$c_p
-$c_pp
-
-$c_gl
-$c_sl
-$c_ev
-CREATE TABLE IF NOT EXISTS mysql.ndb_binlog_index (Position BIGINT UNSIGNED NOT NULL, File VARCHAR(255) NOT NULL, epoch BIGINT UNSIGNED NOT NULL, inserts BIGINT UNSIGNED NOT NULL, updates BIGINT UNSIGNED NOT NULL, deletes BIGINT UNSIGNED NOT NULL, schemaops BIGINT UNSIGNED NOT NULL, PRIMARY KEY(epoch)) ENGINE=MYISAM;
-
-END_OF_DATA
-
diff --git a/scripts/mysql_fix_privilege_tables.sh b/scripts/mysql_fix_privilege_tables.sh
index 9fa2b48ce1c..a353273dc28 100644
--- a/scripts/mysql_fix_privilege_tables.sh
+++ b/scripts/mysql_fix_privilege_tables.sh
@@ -175,7 +175,7 @@ s_echo()
}
s_echo "This script updates all the mysql privilege tables to be usable by"
-s_echo "MySQL 5.1 and above."
+s_echo "the current version of MySQL"
s_echo ""
if test $verbose = 1
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index 59645d090c4..da2438c606c 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -14,8 +14,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-# This scripts creates the privilege tables db, host, user, tables_priv,
-# columns_priv, procs_priv in the mysql database, as well as the func table.
+# This scripts creates the MySQL Server system tables
#
# All unrecognized arguments to this script are passed to mysqld.
@@ -30,6 +29,14 @@ case "$1" in
;;
esac
+s_echo()
+{
+ if test "$in_rpm" -eq 0 -a "$windows" -eq 0
+ then
+ echo $1
+ fi
+}
+
parse_arguments() {
# We only need to pass arguments through to the server if we don't
# handle them here. So, we collect unrecognized options (passed on
@@ -53,9 +60,20 @@ parse_arguments() {
# where a chown of datadir won't help)
user=`echo "$arg" | sed -e 's/^[^=]*=//'` ;;
--skip-name-resolve) ip_only=1 ;;
- --verbose) verbose=1 ;;
+ --verbose) verbose=1 ;; # Obsolete
--rpm) in_rpm=1 ;;
- --windows) windows=1 ;;
+
+ --windows)
+ # This is actually a "cross bootstrap" argument used when
+ # building the MySQL system tables on a different host
+ # than the target. The platform independent
+ # files that are created in --datadir on the host can
+ # be copied to the target system, the most common use for
+ # this feature is in the windows installer which will take
+ # the files from datadir and include them as part of the install
+ # package.
+ windows=1 ;;
+
*)
if test -n "$pick_args"
then
@@ -93,8 +111,6 @@ bindir=
basedir=
srcdir=
force=0
-verbose=0
-fill_help_tables=""
parse_arguments `$print_defaults $defaults mysqld mysql_install_db`
parse_arguments PICK-ARGS-FROM-ARGV "$@"
@@ -119,29 +135,52 @@ else
fi
fi
-# find fill_help_tables.sh
+# Find SQL scripts needed for bootstrap
+fill_help_tables="fill_help_tables.sql"
+create_system_tables="mysql_system_tables.sql"
+fill_system_tables="mysql_system_tables_data.sql"
if test -n "$srcdir"
then
- fill_help_tables=$srcdir/scripts/fill_help_tables.sql
+ fill_help_tables=$srcdir/scripts/$fill_help_tables
+ create_system_tables=$srcdir/scripts/$create_system_tables
+ fill_system_tables=$srcdir/scripts/$fill_system_tables
else
for i in $basedir/support-files $basedir/share $basedir/share/mysql \
$basedir/scripts `pwd` `pwd`/scripts @pkgdatadir@
do
- if test -f $i/fill_help_tables.sql
+ if test -f $i/$fill_help_tables
then
pkgdatadir=$i
fi
done
- fill_help_tables=$pkgdatadir/fill_help_tables.sql
+ fill_help_tables=$pkgdatadir/$fill_help_tables
+ create_system_tables=$pkgdatadir/$create_system_tables
+ fill_system_tables=$pkgdatadir/$fill_system_tables
+fi
+
+if test ! -f $create_system_tables
+then
+ echo "FATAL ERROR: Could not find SQL file '$create_system_tables' in"
+ echo "@pkgdatadir@ or inside $basedir"
+ exit 1;
fi
if test ! -f $fill_help_tables
then
- echo "Could not find help file 'fill_help_tables.sql' in @pkgdatadir@ or inside $basedir".
+ echo "FATAL ERROR: Could not find help file '$fill_help_tables' in"
+ echo "@pkgdatadir@ or inside $basedir"
exit 1;
fi
+if test ! -f $fill_system_tables
+then
+ echo "FATAL ERROR: Could not find help file '$fill_system_tables' in"
+ echo "@pkgdatadir@ or inside $basedir"
+ exit 1;
+fi
+
+# Find executables and paths
mdata=$ldata/mysql
mysqld=$execdir/mysqld
mysqld_opt=""
@@ -167,7 +206,7 @@ then
echo "FATAL ERROR $mysqld not found!"
exit 1
else
- echo "Didn't find $mysqld"
+ echo "FATAL ERROR Didn't find $mysqld"
echo "You should do a 'make install' before executing this script"
exit 1
fi
@@ -187,9 +226,10 @@ then
then
echo "Neither host '$hostname' nor 'localhost' could be looked up with"
echo "$bindir/resolveip"
- echo "Please configure the 'hostname' command to return a correct hostname."
- echo "If you want to solve this at a later stage, restart this script with"
- echo "the --force option"
+ echo "Please configure the 'hostname' command to return a correct"
+ echo "hostname."
+ echo "If you want to solve this at a later stage, restart this script"
+ echo "with the --force option"
exit 1
fi
echo "WARNING: The host '$hostname' could not be looked up with resolveip."
@@ -208,101 +248,113 @@ then
fi
# Create database directories mysql & test
-
- if test ! -d $ldata; then mkdir $ldata; chmod 700 $ldata ; fi
- if test ! -d $ldata/mysql; then mkdir $ldata/mysql; chmod 700 $ldata/mysql ; fi
- if test ! -d $ldata/test; then mkdir $ldata/test; chmod 700 $ldata/test ; fi
- if test -w / -a ! -z "$user"; then
- chown $user $ldata $ldata/mysql $ldata/test;
- fi
-
-if test ! -f $mdata/db.frm
-then
- c_d="yes"
+if test ! -d $ldata; then
+ mkdir $ldata;
+ chmod 700 $ldata ;
+fi
+if test ! -d $ldata/mysql; then
+ mkdir $ldata/mysql;
+ chmod 700 $ldata/mysql ;
+fi
+if test ! -d $ldata/test; then
+ mkdir $ldata/test;
+ chmod 700 $ldata/test ;
+fi
+if test -w / -a ! -z "$user"; then
+ chown $user $ldata $ldata/mysql $ldata/test;
fi
-if test $verbose = 1
+# Check is "db" table already exist
+if test ! -f $mdata/db.frm
then
- create_option="verbose"
-else
- create_option="real"
+ db_table_already_exist="yes"
fi
if test -n "$user"; then
args="$args --user=$user"
fi
-if test "$in_rpm" -eq 0 -a "$windows" -eq 0
-then
- echo "Installing all prepared tables"
-fi
+# Peform the install of system tables
mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}"
mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \
---skip-grant-tables --basedir=$basedir --datadir=$ldata --skip-innodb \
---skip-ndbcluster $args --max_allowed_packet=8M --net_buffer_length=16K"
-if $scriptdir/mysql_create_system_tables $create_option $mdata $hostname $windows \
- | eval "$mysqld_install_cmd_line"
+--basedir=$basedir --datadir=$ldata --skip-innodb \
+--skip-ndbcluster $args --max_allowed_packet=8M \
+--net_buffer_length=16K"
+
+# Pipe mysql_system_tables.sql to "mysqld --bootstrap"
+s_echo "Installing MySQL system tables..."
+if `(echo "use mysql;"; cat $create_system_tables $fill_system_tables) | $mysqld_install_cmd_line`
then
+ s_echo "OK"
+
if test -n "$fill_help_tables"
then
- if test "$in_rpm" -eq 0 -a "$windows" -eq 0
- then
- echo "Fill help tables"
- fi
- (echo "use mysql;"; cat $fill_help_tables) | eval "$mysqld_install_cmd_line"
- res=$?
- if test $res != 0
+ s_echo "Filling help tables..."
+ # Pipe fill_help_tables.sql to "mysqld --bootstrap"
+ if `(echo "use mysql;"; cat $fill_help_tables) | $mysqld_install_cmd_line`
then
+ # Fill suceeded
+ s_echo "OK"
+ else
echo ""
echo "WARNING: HELP FILES ARE NOT COMPLETELY INSTALLED!"
echo "The \"HELP\" command might not work properly"
echo ""
fi
fi
- if test "$in_rpm" = 0 -a "$windows" = 0
- then
- echo ""
- echo "To start mysqld at boot time you have to copy support-files/mysql.server"
- echo "to the right place for your system"
- echo
- fi
+
+ s_echo ""
+ s_echo "To start mysqld at boot time you have to copy"
+ s_echo "support-files/mysql.server to the right place for your system"
+ s_echo
+
if test "$windows" -eq 0
then
- echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
- echo "To do so, start the server, then issue the following commands:"
- echo "$bindir/mysqladmin -u root password 'new-password'"
- echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"
- echo "See the manual for more instructions."
- #
- # Print message about upgrading unless we have created a new db table.
- if test -z "$c_d"
- then
+ # A root password should of course also be set on Windows!
+ # The reason for not displaying these prompts here is that when
+ # executing this script with the --windows argument the script
+ # is used to generate system tables mainly used by the
+ # windows installer. And thus the password should not be set until
+ # those files has been copied to the target system
+ echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
+ echo "To do so, start the server, then issue the following commands:"
+ echo "$bindir/mysqladmin -u root password 'new-password'"
+ echo "$bindir/mysqladmin -u root -h $hostname password 'new-password'"
+ echo "See the manual for more instructions."
+
+ # Print message about upgrading unless we have created a new db table.
+ if test -z "$db_table_already_exist"
+ then
+ echo
+ echo "NOTE: If you are upgrading from a previous MySQL verision you "
+ echo "should run '$bindir/mysql_upgrade', to make sure all tables have "
+ echo "been upgraded for this version of MySQL"
+ fi
echo
- echo "NOTE: If you are upgrading from a MySQL <= 3.22.10 you should run"
- echo "the $bindir/mysql_fix_privilege_tables. Otherwise you will not be"
- echo "able to use the new GRANT command!"
- fi
- echo
- if test "$in_rpm" = "0"
- then
- echo "You can start the MySQL daemon with:"
- echo "cd @prefix@ ; $bindir/mysqld_safe &"
+
+ if test "$in_rpm" = "0"
+ then
+ echo "You can start the MySQL daemon with:"
+ echo "cd @prefix@ ; $bindir/mysqld_safe &"
+ echo
+ echo "You can test the MySQL daemon with mysql-test-run.pl"
+ echo "cd mysql-test ; perl mysql-test-run.pl"
+ echo
+ fi
+ echo "Please report any problems with the @scriptdir@/mysqlbug script!"
echo
- fi
- echo "Please report any problems with the @scriptdir@/mysqlbug script!"
- echo
- echo "The latest information about MySQL is available on the web at"
- echo "http://www.mysql.com"
- echo "Support MySQL by buying support/licenses at http://shop.mysql.com"
+ echo "The latest information about MySQL is available on the web at"
+ echo "http://www.mysql.com"
+ echo "Support MySQL by buying support/licenses at http://shop.mysql.com"
fi
exit 0
else
echo "Installation of system tables failed!"
echo
echo "Examine the logs in $ldata for more information."
- echo "You can also try to start the mysqld daemon with:"
+ echo "You can try to start the mysqld daemon with:"
echo "$mysqld --skip-grant &"
- echo "You can use the command line tool"
+ echo "and use the command line tool"
echo "$bindir/mysql to connect to the mysql"
echo "database and look at the grant tables:"
echo
diff --git a/scripts/mysql_system_tables.sql b/scripts/mysql_system_tables.sql
new file mode 100644
index 00000000000..7be5c94ad80
--- /dev/null
+++ b/scripts/mysql_system_tables.sql
@@ -0,0 +1,77 @@
+--
+-- The system tables of MySQL Server
+--
+
+set storage_engine=myisam;
+
+CREATE TABLE IF NOT EXISTS db ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db,User), KEY User (User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Database privileges';
+
+
+CREATE TABLE IF NOT EXISTS host ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY Host (Host,Db) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Host privileges; Merged with database privileges';
+
+
+CREATE TABLE IF NOT EXISTS user ( Host char(60) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Password char(41) character set latin1 collate latin1_bin DEFAULT '' NOT NULL, Select_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Insert_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Update_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Delete_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Drop_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Reload_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Shutdown_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Process_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, File_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Grant_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, References_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Index_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_db_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Super_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_tmp_table_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Lock_tables_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Execute_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_slave_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Repl_client_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Show_view_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Alter_routine_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Create_user_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Event_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, Trigger_priv enum('N','Y') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci DEFAULT '' NOT NULL, ssl_cipher BLOB NOT NULL, x509_issuer BLOB NOT NULL, x509_subject BLOB NOT NULL, max_questions int(11) unsigned DEFAULT 0 NOT NULL, max_updates int(11) unsigned DEFAULT 0 NOT NULL, max_connections int(11) unsigned DEFAULT 0 NOT NULL, max_user_connections int(11) unsigned DEFAULT 0 NOT NULL, PRIMARY KEY Host (Host,User) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges';
+
+
+CREATE TABLE IF NOT EXISTS func ( name char(64) binary DEFAULT '' NOT NULL, ret tinyint(1) DEFAULT '0' NOT NULL, dl char(128) DEFAULT '' NOT NULL, type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='User defined functions';
+
+
+CREATE TABLE IF NOT EXISTS plugin ( name char(64) binary DEFAULT '' NOT NULL, dl char(128) DEFAULT '' NOT NULL, PRIMARY KEY (name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='MySQL plugins';
+
+
+CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', Host char(64) NOT NULL DEFAULT '', Db char(64) NOT NULL DEFAULT '', Username char(64) NOT NULL DEFAULT '', Password char(64) NOT NULL DEFAULT '', Port INT(4) NOT NULL DEFAULT '0', Socket char(64) NOT NULL DEFAULT '', Wrapper char(64) NOT NULL DEFAULT '', Owner char(64) NOT NULL DEFAULT '', PRIMARY KEY (Server_name)) CHARACTER SET utf8 comment='MySQL Foreign Servers table';
+
+
+CREATE TABLE IF NOT EXISTS tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Timestamp timestamp(14), Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges';
+
+CREATE TABLE IF NOT EXISTS columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp(14), Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges';
+
+
+CREATE TABLE IF NOT EXISTS help_topic ( help_topic_id int unsigned not null, name char(64) not null, help_category_id smallint unsigned not null, description text not null, example text not null, url char(128) not null, primary key (help_topic_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help topics';
+
+
+CREATE TABLE IF NOT EXISTS help_category ( help_category_id smallint unsigned not null, name char(64) not null, parent_category_id smallint unsigned null, url char(128) not null, primary key (help_category_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help categories';
+
+
+CREATE TABLE IF NOT EXISTS help_relation ( help_topic_id int unsigned not null references help_topic, help_keyword_id int unsigned not null references help_keyword, primary key (help_keyword_id, help_topic_id) ) engine=MyISAM CHARACTER SET utf8 comment='keyword-topic relation';
+
+
+CREATE TABLE IF NOT EXISTS help_keyword ( help_keyword_id int unsigned not null, name char(64) not null, primary key (help_keyword_id), unique index (name) ) engine=MyISAM CHARACTER SET utf8 comment='help keywords';
+
+
+CREATE TABLE IF NOT EXISTS time_zone_name ( Name char(64) NOT NULL, Time_zone_id int unsigned NOT NULL, PRIMARY KEY Name (Name) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone names';
+
+
+CREATE TABLE IF NOT EXISTS time_zone ( Time_zone_id int unsigned NOT NULL auto_increment, Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL, PRIMARY KEY TzId (Time_zone_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zones';
+
+
+CREATE TABLE IF NOT EXISTS time_zone_transition ( Time_zone_id int unsigned NOT NULL, Transition_time bigint signed NOT NULL, Transition_type_id int unsigned NOT NULL, PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transitions';
+
+
+CREATE TABLE IF NOT EXISTS time_zone_transition_type ( Time_zone_id int unsigned NOT NULL, Transition_type_id int unsigned NOT NULL, Offset int signed DEFAULT 0 NOT NULL, Is_DST tinyint unsigned DEFAULT 0 NOT NULL, Abbreviation char(8) DEFAULT '' NOT NULL, PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id) ) engine=MyISAM CHARACTER SET utf8 comment='Time zone transition types';
+
+
+CREATE TABLE IF NOT EXISTS time_zone_leap_second ( Transition_time bigint signed NOT NULL, Correction int signed NOT NULL, PRIMARY KEY TranTime (Transition_time) ) engine=MyISAM CHARACTER SET utf8 comment='Leap seconds information for time zones';
+
+
+CREATE TABLE IF NOT EXISTS proc ( db char(64) collate utf8_bin DEFAULT '' NOT NULL, name char(64) DEFAULT '' NOT NULL, type enum('FUNCTION','PROCEDURE') NOT NULL, specific_name char(64) DEFAULT '' NOT NULL, language enum('SQL') DEFAULT 'SQL' NOT NULL, sql_data_access enum('CONTAINS_SQL', 'NO_SQL', 'READS_SQL_DATA', 'MODIFIES_SQL_DATA' ) DEFAULT 'CONTAINS_SQL' NOT NULL, is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL, security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL, param_list blob NOT NULL, returns char(64) DEFAULT '' NOT NULL, body longblob NOT NULL, definer char(77) collate utf8_bin DEFAULT '' NOT NULL, created timestamp, modified timestamp, sql_mode set( 'REAL_AS_FLOAT', 'PIPES_AS_CONCAT', 'ANSI_QUOTES', 'IGNORE_SPACE', 'NOT_USED', 'ONLY_FULL_GROUP_BY', 'NO_UNSIGNED_SUBTRACTION', 'NO_DIR_IN_CREATE', 'POSTGRESQL', 'ORACLE', 'MSSQL', 'DB2', 'MAXDB', 'NO_KEY_OPTIONS', 'NO_TABLE_OPTIONS', 'NO_FIELD_OPTIONS', 'MYSQL323', 'MYSQL40', 'ANSI', 'NO_AUTO_VALUE_ON_ZERO', 'NO_BACKSLASH_ESCAPES', 'STRICT_TRANS_TABLES', 'STRICT_ALL_TABLES', 'NO_ZERO_IN_DATE', 'NO_ZERO_DATE', 'INVALID_DATES', 'ERROR_FOR_DIVISION_BY_ZERO', 'TRADITIONAL', 'NO_AUTO_CREATE_USER', 'HIGH_NOT_PRECEDENCE' ) DEFAULT '' NOT NULL, comment char(64) collate utf8_bin DEFAULT '' NOT NULL, PRIMARY KEY (db,name,type) ) engine=MyISAM character set utf8 comment='Stored Procedures';
+
+
+CREATE TABLE IF NOT EXISTS procs_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(16) binary DEFAULT '' NOT NULL, Routine_name char(64) binary DEFAULT '' NOT NULL, Routine_type enum('FUNCTION','PROCEDURE') NOT NULL, Grantor char(77) DEFAULT '' NOT NULL, Proc_priv set('Execute','Alter Routine','Grant') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Timestamp timestamp(14), PRIMARY KEY (Host,Db,User,Routine_name,Routine_type), KEY Grantor (Grantor) ) engine=MyISAM CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
+
+
+CREATE PROCEDURE create_general_log_table() BEGIN DECLARE is_csv_enabled int DEFAULT 0; SELECT @@have_csv = 'YES' INTO is_csv_enabled; IF (is_csv_enabled) THEN CREATE TABLE IF NOT EXISTS general_log (event_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT, thread_id INTEGER, server_id INTEGER, command_type VARCHAR(64), argument MEDIUMTEXT) engine=CSV CHARACTER SET utf8 comment='General log'; END IF; END;
+CALL create_general_log_table();
+DROP PROCEDURE create_general_log_table;
+
+
+CREATE PROCEDURE create_slow_log_table() BEGIN DECLARE is_csv_enabled int DEFAULT 0; SELECT @@have_csv = 'YES' INTO is_csv_enabled; IF (is_csv_enabled) THEN CREATE TABLE IF NOT EXISTS slow_log (start_time TIMESTAMP NOT NULL, user_host MEDIUMTEXT NOT NULL, query_time TIME NOT NULL, lock_time TIME NOT NULL, rows_sent INTEGER NOT NULL, rows_examined INTEGER NOT NULL, db VARCHAR(512), last_insert_id INTEGER, insert_id INTEGER, server_id INTEGER, sql_text MEDIUMTEXT NOT NULL) engine=CSV CHARACTER SET utf8 comment='Slow log'; END IF; END;
+CALL create_slow_log_table();
+DROP PROCEDURE create_slow_log_table;
+
+
+CREATE TABLE IF NOT EXISTS event ( db char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', name char(64) CHARACTER SET utf8 NOT NULL default '', body longblob NOT NULL, definer char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', execute_at DATETIME default NULL, interval_value int(11) default NULL, interval_field ENUM('YEAR','QUARTER','MONTH','DAY','HOUR','MINUTE','WEEK','SECOND','MICROSECOND','YEAR_MONTH','DAY_HOUR','DAY_MINUTE','DAY_SECOND','HOUR_MINUTE','HOUR_SECOND','MINUTE_SECOND','DAY_MICROSECOND','HOUR_MICROSECOND','MINUTE_MICROSECOND','SECOND_MICROSECOND') default NULL, created TIMESTAMP NOT NULL, modified TIMESTAMP NOT NULL, last_executed DATETIME default NULL, starts DATETIME default NULL, ends DATETIME default NULL, status ENUM('ENABLED','DISABLED') NOT NULL default 'ENABLED', on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP', sql_mode set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') DEFAULT '' NOT NULL, comment char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL default '', PRIMARY KEY (db, name) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT 'Events';
+
+
+CREATE TABLE IF NOT EXISTS ndb_binlog_index (Position BIGINT UNSIGNED NOT NULL, File VARCHAR(255) NOT NULL, epoch BIGINT UNSIGNED NOT NULL, inserts BIGINT UNSIGNED NOT NULL, updates BIGINT UNSIGNED NOT NULL, deletes BIGINT UNSIGNED NOT NULL, schemaops BIGINT UNSIGNED NOT NULL, PRIMARY KEY(epoch)) ENGINE=MYISAM;
+
diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql
new file mode 100644
index 00000000000..0ac6f59b9ea
--- /dev/null
+++ b/scripts/mysql_system_tables_data.sql
@@ -0,0 +1,13 @@
+--
+-- The inital data for system tables of MySQL Server
+--
+
+-- default grants for anyone to access database 'test' and 'test_%'
+INSERT INTO db VALUES ('%','test','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
+INSERT INTO db VALUES ('%','test\_%','','Y','Y','Y','Y','Y','Y','N','Y','Y','Y','Y','Y','Y','Y','Y','N','N','Y','Y');
+
+-- default users allowing root access from local machine
+INSERT INTO user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
+REPLACE INTO user VALUES (@@hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
+REPLACE INTO user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0);
+
diff --git a/scripts/mysql_fix_privilege_tables.sql b/scripts/mysql_system_tables_fix.sql
index 9cdea507493..a35cc00d132 100644
--- a/scripts/mysql_fix_privilege_tables.sql
+++ b/scripts/mysql_system_tables_fix.sql
@@ -1,6 +1,7 @@
-# This script converts any old privilege tables to privilege tables suitable
-# for this version of MySQL
-# You can safely ignore all 'Duplicate column' and 'Unknown column' errors"
+# This part converts any old privilege tables to privilege tables suitable
+# for current version of MySQL
+
+# You can safely ignore all 'Duplicate column' and 'Unknown column' errors
# because these just mean that your tables are already up to date.
# This script is safe to run even if your tables are already up to date!
@@ -11,20 +12,6 @@
set sql_mode='';
set storage_engine=MyISAM;
-CREATE TABLE IF NOT EXISTS func (
- name char(64) binary DEFAULT '' NOT NULL,
- ret tinyint(1) DEFAULT '0' NOT NULL,
- dl char(128) DEFAULT '' NOT NULL,
- type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL,
- PRIMARY KEY (name)
-) CHARACTER SET utf8 COLLATE utf8_bin;
-
-CREATE TABLE IF NOT EXISTS plugin (
- name char(64) binary DEFAULT '' NOT NULL,
- dl char(128) DEFAULT '' NOT NULL,
- PRIMARY KEY (name)
-) CHARACTER SET utf8 COLLATE utf8_bin;
-
ALTER TABLE user add File_priv enum('N','Y') COLLATE utf8_general_ci NOT NULL;
# Detect whether or not we had the Grant_priv column
@@ -42,7 +29,7 @@ UPDATE host SET References_priv=Create_priv,Index_priv=Create_priv,Alter_priv=Cr
#
# The second alter changes ssl_type to new 4.0.2 format
-# Adding columns needed by GRANT .. REQUIRE (openssl)"
+# Adding columns needed by GRANT .. REQUIRE (openssl)
ALTER TABLE user
ADD ssl_type enum('','ANY','X509', 'SPECIFIED') COLLATE utf8_general_ci NOT NULL,
@@ -54,21 +41,6 @@ ALTER TABLE user MODIFY ssl_type enum('','ANY','X509', 'SPECIFIED') NOT NULL;
#
# tables_priv
#
-CREATE TABLE IF NOT EXISTS tables_priv (
- Host char(60) binary DEFAULT '' NOT NULL,
- Db char(64) binary DEFAULT '' NOT NULL,
- User char(16) binary DEFAULT '' NOT NULL,
- Table_name char(64) binary DEFAULT '' NOT NULL,
- Grantor char(77) DEFAULT '' NOT NULL,
- Timestamp timestamp(14),
- Table_priv set('Select','Insert','Update','Delete','Create',
- 'Drop','Grant','References','Index','Alter')
- COLLATE utf8_general_ci DEFAULT '' NOT NULL,
- Column_priv set('Select','Insert','Update','References')
- COLLATE utf8_general_ci DEFAULT '' NOT NULL,
- PRIMARY KEY (Host,Db,User,Table_name)
-) CHARACTER SET utf8 COLLATE utf8_bin;
-# Fix collation of set fields
ALTER TABLE tables_priv
ADD KEY Grantor (Grantor);
@@ -93,16 +65,6 @@ ALTER TABLE tables_priv
#
# columns_priv
#
-CREATE TABLE IF NOT EXISTS columns_priv (
- Host char(60) DEFAULT '' NOT NULL,
- Db char(64) DEFAULT '' NOT NULL,
- User char(16) DEFAULT '' NOT NULL,
- Table_name char(64) DEFAULT '' NOT NULL,
- Column_name char(64) DEFAULT '' NOT NULL,
- Timestamp timestamp(14),
- Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL,
- PRIMARY KEY (Host,Db,User,Table_name,Column_name)
-) CHARACTER SET utf8 COLLATE utf8_bin;
#
# Name change of Type -> Column_priv from MySQL 3.22.12
#
@@ -131,7 +93,7 @@ ALTER TABLE columns_priv
ALTER TABLE func add type enum ('function','aggregate') COLLATE utf8_general_ci NOT NULL;
#
-# Change the user,db and host tables to MySQL 4.0 format
+# Change the user,db and host tables to current format
#
# Detect whether we had Show_db_priv
@@ -154,6 +116,7 @@ UPDATE user SET Show_db_priv= Select_priv, Super_priv=Process_priv, Execute_priv
# Add fields that can be used to limit number of questions and connections
# for some users.
+
ALTER TABLE user
ADD max_questions int(11) NOT NULL DEFAULT 0 AFTER x509_subject,
ADD max_updates int(11) unsigned NOT NULL DEFAULT 0 AFTER max_questions,
@@ -254,7 +217,7 @@ ALTER TABLE func
#
# Detect whether we had Create_view_priv
-#
+#
SET @hadCreateViewPriv:=0;
SELECT @hadCreateViewPriv:=1 FROM user WHERE Create_view_priv LIKE '%';
@@ -331,7 +294,7 @@ UPDATE db SET Create_routine_priv=Create_priv, Alter_routine_priv=Alter_priv, Ex
UPDATE host SET Create_routine_priv=Create_priv, Alter_routine_priv=Alter_priv, Execute_priv=Select_priv where @hadCreateRoutinePriv = 0;
#
-# Add max_user_connections resource limit
+# Add max_user_connections resource limit
#
ALTER TABLE user ADD max_user_connections int(11) unsigned DEFAULT '0' NOT NULL AFTER max_connections;
@@ -348,22 +311,9 @@ UPDATE user LEFT JOIN db USING (Host,User) SET Create_user_priv='Y'
WHERE @hadCreateUserPriv = 0 AND
(user.Grant_priv = 'Y' OR db.Grant_priv = 'Y');
---
--- procs_priv
---
-CREATE TABLE IF NOT EXISTS procs_priv (
- Host char(60) binary DEFAULT '' NOT NULL,
- Db char(64) binary DEFAULT '' NOT NULL,
- User char(16) binary DEFAULT '' NOT NULL,
- Routine_name char(64) binary DEFAULT '' NOT NULL,
- Routine_type enum('FUNCTION','PROCEDURE') NOT NULL,
- Grantor char(77) DEFAULT '' NOT NULL,
- Proc_priv set('Execute','Alter Routine','Grant')
- COLLATE utf8_general_ci DEFAULT '' NOT NULL,
- Timestamp timestamp(14),
- PRIMARY KEY (Host, Db, User, Routine_name, Routine_type),
- KEY Grantor (Grantor)
-) CHARACTER SET utf8 COLLATE utf8_bin comment='Procedure privileges';
+#
+# procs_priv
+#
ALTER TABLE procs_priv
ENGINE=MyISAM,
@@ -380,159 +330,9 @@ ALTER TABLE procs_priv
ALTER TABLE procs_priv
MODIFY Timestamp timestamp(14) AFTER Proc_priv;
---
--- servers
---
-CREATE TABLE servers (
- Server_name char(64) NOT NULL DEFAULT '',
- Host char(64) NOT NULL DEFAULT '',
- Db char(64) NOT NULL DEFAULT '',
- Username char(64) NOT NULL DEFAULT '',
- Password char(64) NOT NULL DEFAULT '',
- Port INT(4) NOT NULL DEFAULT '0',
- Socket char(64) NOT NULL DEFAULT '',
- Wrapper char(64) NOT NULL DEFAULT '',
- Owner char(64) NOT NULL DEFAULT '',
- PRIMARY KEY (Server_name))
- CHARACTER SET utf8 comment='MySQL Foreign Servers table';
-
---
--- help_topic
---
-CREATE TABLE IF NOT EXISTS help_topic (
-help_topic_id int unsigned not null,
-name varchar(64) not null,
-help_category_id smallint unsigned not null,
-description text not null,
-example text not null,
-url varchar(128) not null,
-primary key (help_topic_id), unique index (name)
-) CHARACTER SET utf8 comment='help topics';
-
-CREATE TABLE IF NOT EXISTS help_category (
-help_category_id smallint unsigned not null,
-name varchar(64) not null,
-parent_category_id smallint unsigned null,
-url varchar(128) not null,
-primary key (help_category_id),
-unique index (name)
-) CHARACTER SET utf8 comment='help categories';
-
-CREATE TABLE IF NOT EXISTS help_relation (
-help_topic_id int unsigned not null references help_topic,
-help_keyword_id int unsigned not null references help_keyword,
-primary key (help_keyword_id, help_topic_id)
-) CHARACTER SET utf8 comment='keyword-topic relation';
-
-CREATE TABLE IF NOT EXISTS help_keyword (
-help_keyword_id int unsigned not null,
-name varchar(64) not null,
-primary key (help_keyword_id),
-unique index (name)
-) CHARACTER SET utf8 comment='help keywords';
-
-#
-# Create missing time zone related tables
-#
-
-CREATE TABLE IF NOT EXISTS time_zone_name (
-Name char(64) NOT NULL,
-Time_zone_id int unsigned NOT NULL,
-PRIMARY KEY Name (Name)
-) CHARACTER SET utf8 comment='Time zone names';
-
-CREATE TABLE IF NOT EXISTS time_zone (
-Time_zone_id int unsigned NOT NULL auto_increment,
-Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL,
-PRIMARY KEY TzId (Time_zone_id)
-) CHARACTER SET utf8 comment='Time zones';
-# Make enum field case-insensitive
-ALTER TABLE time_zone
- MODIFY Use_leap_seconds enum('Y','N') COLLATE utf8_general_ci DEFAULT 'N' NOT NULL;
-
-CREATE TABLE IF NOT EXISTS time_zone_transition (
-Time_zone_id int unsigned NOT NULL,
-Transition_time bigint signed NOT NULL,
-Transition_type_id int unsigned NOT NULL,
-PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time)
-) CHARACTER SET utf8 comment='Time zone transitions';
-
-CREATE TABLE IF NOT EXISTS time_zone_transition_type (
-Time_zone_id int unsigned NOT NULL,
-Transition_type_id int unsigned NOT NULL,
-Offset int signed DEFAULT 0 NOT NULL,
-Is_DST tinyint unsigned DEFAULT 0 NOT NULL,
-Abbreviation char(8) DEFAULT '' NOT NULL,
-PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id)
-) CHARACTER SET utf8 comment='Time zone transition types';
-
-CREATE TABLE IF NOT EXISTS time_zone_leap_second (
-Transition_time bigint signed NOT NULL,
-Correction int signed NOT NULL,
-PRIMARY KEY TranTime (Transition_time)
-) CHARACTER SET utf8 comment='Leap seconds information for time zones';
-
-
-#
-# Create proc table if it does not exists
-#
-
-CREATE TABLE IF NOT EXISTS proc (
- db char(64) collate utf8_bin DEFAULT '' NOT NULL,
- name char(64) DEFAULT '' NOT NULL,
- type enum('FUNCTION','PROCEDURE') NOT NULL,
- specific_name char(64) DEFAULT '' NOT NULL,
- language enum('SQL') DEFAULT 'SQL' NOT NULL,
- sql_data_access enum('CONTAINS_SQL',
- 'NO_SQL',
- 'READS_SQL_DATA',
- 'MODIFIES_SQL_DATA'
- ) DEFAULT 'CONTAINS_SQL' NOT NULL,
- is_deterministic enum('YES','NO') DEFAULT 'NO' NOT NULL,
- security_type enum('INVOKER','DEFINER') DEFAULT 'DEFINER' NOT NULL,
- param_list blob DEFAULT '' NOT NULL,
- returns char(64) DEFAULT '' NOT NULL,
- body longblob DEFAULT '' NOT NULL,
- definer char(77) collate utf8_bin DEFAULT '' NOT NULL,
- created timestamp,
- modified timestamp,
- sql_mode set(
- 'REAL_AS_FLOAT',
- 'PIPES_AS_CONCAT',
- 'ANSI_QUOTES',
- 'IGNORE_SPACE',
- 'NOT_USED',
- 'ONLY_FULL_GROUP_BY',
- 'NO_UNSIGNED_SUBTRACTION',
- 'NO_DIR_IN_CREATE',
- 'POSTGRESQL',
- 'ORACLE',
- 'MSSQL',
- 'DB2',
- 'MAXDB',
- 'NO_KEY_OPTIONS',
- 'NO_TABLE_OPTIONS',
- 'NO_FIELD_OPTIONS',
- 'MYSQL323',
- 'MYSQL40',
- 'ANSI',
- 'NO_AUTO_VALUE_ON_ZERO',
- 'NO_BACKSLASH_ESCAPES',
- 'STRICT_TRANS_TABLES',
- 'STRICT_ALL_TABLES',
- 'NO_ZERO_IN_DATE',
- 'NO_ZERO_DATE',
- 'INVALID_DATES',
- 'ERROR_FOR_DIVISION_BY_ZERO',
- 'TRADITIONAL',
- 'NO_AUTO_CREATE_USER',
- 'HIGH_NOT_PRECEDENCE'
- ) DEFAULT '' NOT NULL,
- comment char(64) collate utf8_bin DEFAULT '' NOT NULL,
- PRIMARY KEY (db,name,type)
-) engine=MyISAM
- character set utf8
- comment='Stored Procedures';
+#
+# proc
+#
# Correct the name fields to not binary, and expand sql_data_access
ALTER TABLE proc MODIFY name char(64) DEFAULT '' NOT NULL,
diff --git a/scripts/mysql_test_data_timezone.sql b/scripts/mysql_test_data_timezone.sql
new file mode 100644
index 00000000000..e52df2149f2
--- /dev/null
+++ b/scripts/mysql_test_data_timezone.sql
@@ -0,0 +1,5 @@
+INSERT INTO time_zone_name (Name, Time_Zone_id) VALUES ('MET', 1), ('UTC', 2), ('Universal', 2), ('Europe/Moscow',3), ('leap/Europe/Moscow',4), ('Japan', 5);
+INSERT INTO time_zone (Time_zone_id, Use_leap_seconds) VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y'), (5,'N');
+INSERT INTO time_zone_transition (Time_zone_id, Transition_time, Transition_type_id) VALUES (1, -1693706400, 0) ,(1, -1680483600, 1) ,(1, -1663455600, 2) ,(1, -1650150000, 3) ,(1, -1632006000, 2) ,(1, -1618700400, 3) ,(1, -938905200, 2) ,(1, -857257200, 3) ,(1, -844556400, 2) ,(1, -828226800, 3) ,(1, -812502000, 2) ,(1, -796777200, 3) ,(1, 228877200, 2) ,(1, 243997200, 3) ,(1, 260326800, 2) ,(1, 276051600, 3) ,(1, 291776400, 2) ,(1, 307501200, 3) ,(1, 323830800, 2) ,(1, 338950800, 3) ,(1, 354675600, 2) ,(1, 370400400, 3) ,(1, 386125200, 2) ,(1, 401850000, 3) ,(1, 417574800, 2) ,(1, 433299600, 3) ,(1, 449024400, 2) ,(1, 465354000, 3) ,(1, 481078800, 2) ,(1, 496803600, 3) ,(1, 512528400, 2) ,(1, 528253200, 3) ,(1, 543978000, 2) ,(1, 559702800, 3) ,(1, 575427600, 2) ,(1, 591152400, 3) ,(1, 606877200, 2) ,(1, 622602000, 3) ,(1, 638326800, 2) ,(1, 654656400, 3) ,(1, 670381200, 2) ,(1, 686106000, 3) ,(1, 701830800, 2) ,(1, 717555600, 3) ,(1, 733280400, 2) ,(1, 749005200, 3) ,(1, 764730000, 2) ,(1, 780454800, 3) ,(1, 796179600, 2) ,(1, 811904400, 3) ,(1, 828234000, 2) ,(1, 846378000, 3) ,(1, 859683600, 2) ,(1, 877827600, 3) ,(1, 891133200, 2) ,(1, 909277200, 3) ,(1, 922582800, 2) ,(1, 941331600, 3) ,(1, 954032400, 2) ,(1, 972781200, 3) ,(1, 985482000, 2) ,(1, 1004230800, 3) ,(1, 1017536400, 2) ,(1, 1035680400, 3) ,(1, 1048986000, 2) ,(1, 1067130000, 3) ,(1, 1080435600, 2) ,(1, 1099184400, 3) ,(1, 1111885200, 2) ,(1, 1130634000, 3) ,(1, 1143334800, 2) ,(1, 1162083600, 3) ,(1, 1174784400, 2) ,(1, 1193533200, 3) ,(1, 1206838800, 2) ,(1, 1224982800, 3) ,(1, 1238288400, 2) ,(1, 1256432400, 3) ,(1, 1269738000, 2) ,(1, 1288486800, 3) ,(1, 1301187600, 2) ,(1, 1319936400, 3) ,(1, 1332637200, 2) ,(1, 1351386000, 3) ,(1, 1364691600, 2) ,(1, 1382835600, 3) ,(1, 1396141200, 2) ,(1, 1414285200, 3) ,(1, 1427590800, 2) ,(1, 1445734800, 3) ,(1, 1459040400, 2) ,(1, 1477789200, 3) ,(1, 1490490000, 2) ,(1, 1509238800, 3) ,(1, 1521939600, 2) ,(1, 1540688400, 3) ,(1, 1553994000, 2) ,(1, 1572138000, 3) ,(1, 1585443600, 2) ,(1, 1603587600, 3) ,(1, 1616893200, 2) ,(1, 1635642000, 3) ,(1, 1648342800, 2) ,(1, 1667091600, 3) ,(1, 1679792400, 2) ,(1, 1698541200, 3) ,(1, 1711846800, 2) ,(1, 1729990800, 3) ,(1, 1743296400, 2) ,(1, 1761440400, 3) ,(1, 1774746000, 2) ,(1, 1792890000, 3) ,(1, 1806195600, 2) ,(1, 1824944400, 3) ,(1, 1837645200, 2) ,(1, 1856394000, 3) ,(1, 1869094800, 2) ,(1, 1887843600, 3) ,(1, 1901149200, 2) ,(1, 1919293200, 3) ,(1, 1932598800, 2) ,(1, 1950742800, 3) ,(1, 1964048400, 2) ,(1, 1982797200, 3) ,(1, 1995498000, 2) ,(1, 2014246800, 3) ,(1, 2026947600, 2) ,(1, 2045696400, 3) ,(1, 2058397200, 2) ,(1, 2077146000, 3) ,(1, 2090451600, 2) ,(1, 2108595600, 3) ,(1, 2121901200, 2) ,(1, 2140045200, 3) ,(3, -1688265000, 2) ,(3, -1656819048, 1) ,(3, -1641353448, 2) ,(3, -1627965048, 3) ,(3, -1618716648, 1) ,(3, -1596429048, 3) ,(3, -1593829848, 5) ,(3, -1589860800, 4) ,(3, -1542427200, 5) ,(3, -1539493200, 6) ,(3, -1525323600, 5) ,(3, -1522728000, 4) ,(3, -1491188400, 7) ,(3, -1247536800, 4) ,(3, 354920400, 5) ,(3, 370728000, 4) ,(3, 386456400, 5) ,(3, 402264000, 4) ,(3, 417992400, 5) ,(3, 433800000, 4) ,(3, 449614800, 5) ,(3, 465346800, 8) ,(3, 481071600, 9) ,(3, 496796400, 8) ,(3, 512521200, 9) ,(3, 528246000, 8) ,(3, 543970800, 9) ,(3, 559695600, 8) ,(3, 575420400, 9) ,(3, 591145200, 8) ,(3, 606870000, 9) ,(3, 622594800, 8) ,(3, 638319600, 9) ,(3, 654649200, 8) ,(3, 670374000, 10) ,(3, 686102400, 11) ,(3, 695779200, 8) ,(3, 701812800, 5) ,(3, 717534000, 4) ,(3, 733273200, 9) ,(3, 748998000, 8) ,(3, 764722800, 9) ,(3, 780447600, 8) ,(3, 796172400, 9) ,(3, 811897200, 8) ,(3, 828226800, 9) ,(3, 846370800, 8) ,(3, 859676400, 9) ,(3, 877820400, 8) ,(3, 891126000, 9) ,(3, 909270000, 8) ,(3, 922575600, 9) ,(3, 941324400, 8) ,(3, 954025200, 9) ,(3, 972774000, 8) ,(3, 985474800, 9) ,(3, 1004223600, 8) ,(3, 1017529200, 9) ,(3, 1035673200, 8) ,(3, 1048978800, 9) ,(3, 1067122800, 8) ,(3, 1080428400, 9) ,(3, 1099177200, 8) ,(3, 1111878000, 9) ,(3, 1130626800, 8) ,(3, 1143327600, 9) ,(3, 1162076400, 8) ,(3, 1174777200, 9) ,(3, 1193526000, 8) ,(3, 1206831600, 9) ,(3, 1224975600, 8) ,(3, 1238281200, 9) ,(3, 1256425200, 8) ,(3, 1269730800, 9) ,(3, 1288479600, 8) ,(3, 1301180400, 9) ,(3, 1319929200, 8) ,(3, 1332630000, 9) ,(3, 1351378800, 8) ,(3, 1364684400, 9) ,(3, 1382828400, 8) ,(3, 1396134000, 9) ,(3, 1414278000, 8) ,(3, 1427583600, 9) ,(3, 1445727600, 8) ,(3, 1459033200, 9) ,(3, 1477782000, 8) ,(3, 1490482800, 9) ,(3, 1509231600, 8) ,(3, 1521932400, 9) ,(3, 1540681200, 8) ,(3, 1553986800, 9) ,(3, 1572130800, 8) ,(3, 1585436400, 9) ,(3, 1603580400, 8) ,(3, 1616886000, 9) ,(3, 1635634800, 8) ,(3, 1648335600, 9) ,(3, 1667084400, 8) ,(3, 1679785200, 9) ,(3, 1698534000, 8) ,(3, 1711839600, 9) ,(3, 1729983600, 8) ,(3, 1743289200, 9) ,(3, 1761433200, 8) ,(3, 1774738800, 9) ,(3, 1792882800, 8) ,(3, 1806188400, 9) ,(3, 1824937200, 8) ,(3, 1837638000, 9) ,(3, 1856386800, 8) ,(3, 1869087600, 9) ,(3, 1887836400, 8) ,(3, 1901142000, 9) ,(3, 1919286000, 8) ,(3, 1932591600, 9) ,(3, 1950735600, 8) ,(3, 1964041200, 9) ,(3, 1982790000, 8) ,(3, 1995490800, 9) ,(3, 2014239600, 8) ,(3, 2026940400, 9) ,(3, 2045689200, 8) ,(3, 2058390000, 9) ,(3, 2077138800, 8) ,(3, 2090444400, 9) ,(3, 2108588400, 8) ,(3, 2121894000, 9) ,(3, 2140038000, 8) ,(4, -1688265000, 2) ,(4, -1656819048, 1) ,(4, -1641353448, 2) ,(4, -1627965048, 3) ,(4, -1618716648, 1) ,(4, -1596429048, 3) ,(4, -1593829848, 5) ,(4, -1589860800, 4) ,(4, -1542427200, 5) ,(4, -1539493200, 6) ,(4, -1525323600, 5) ,(4, -1522728000, 4) ,(4, -1491188400, 7) ,(4, -1247536800, 4) ,(4, 354920409, 5) ,(4, 370728010, 4) ,(4, 386456410, 5) ,(4, 402264011, 4) ,(4, 417992411, 5) ,(4, 433800012, 4) ,(4, 449614812, 5) ,(4, 465346812, 8) ,(4, 481071612, 9) ,(4, 496796413, 8) ,(4, 512521213, 9) ,(4, 528246013, 8) ,(4, 543970813, 9) ,(4, 559695613, 8) ,(4, 575420414, 9) ,(4, 591145214, 8) ,(4, 606870014, 9) ,(4, 622594814, 8) ,(4, 638319615, 9) ,(4, 654649215, 8) ,(4, 670374016, 10) ,(4, 686102416, 11) ,(4, 695779216, 8) ,(4, 701812816, 5) ,(4, 717534017, 4) ,(4, 733273217, 9) ,(4, 748998018, 8) ,(4, 764722818, 9) ,(4, 780447619, 8) ,(4, 796172419, 9) ,(4, 811897219, 8) ,(4, 828226820, 9) ,(4, 846370820, 8) ,(4, 859676420, 9) ,(4, 877820421, 8) ,(4, 891126021, 9) ,(4, 909270021, 8) ,(4, 922575622, 9) ,(4, 941324422, 8) ,(4, 954025222, 9) ,(4, 972774022, 8) ,(4, 985474822, 9) ,(4, 1004223622, 8) ,(4, 1017529222, 9) ,(4, 1035673222, 8) ,(4, 1048978822, 9) ,(4, 1067122822, 8) ,(4, 1080428422, 9) ,(4, 1099177222, 8) ,(4, 1111878022, 9) ,(4, 1130626822, 8) ,(4, 1143327622, 9) ,(4, 1162076422, 8) ,(4, 1174777222, 9) ,(4, 1193526022, 8) ,(4, 1206831622, 9) ,(4, 1224975622, 8) ,(4, 1238281222, 9) ,(4, 1256425222, 8) ,(4, 1269730822, 9) ,(4, 1288479622, 8) ,(4, 1301180422, 9) ,(4, 1319929222, 8) ,(4, 1332630022, 9) ,(4, 1351378822, 8) ,(4, 1364684422, 9) ,(4, 1382828422, 8) ,(4, 1396134022, 9) ,(4, 1414278022, 8) ,(4, 1427583622, 9) ,(4, 1445727622, 8) ,(4, 1459033222, 9) ,(4, 1477782022, 8) ,(4, 1490482822, 9) ,(4, 1509231622, 8) ,(4, 1521932422, 9) ,(4, 1540681222, 8) ,(4, 1553986822, 9) ,(4, 1572130822, 8) ,(4, 1585436422, 9) ,(4, 1603580422, 8) ,(4, 1616886022, 9) ,(4, 1635634822, 8) ,(4, 1648335622, 9) ,(4, 1667084422, 8) ,(4, 1679785222, 9) ,(4, 1698534022, 8) ,(4, 1711839622, 9) ,(4, 1729983622, 8) ,(4, 1743289222, 9) ,(4, 1761433222, 8) ,(4, 1774738822, 9) ,(4, 1792882822, 8) ,(4, 1806188422, 9) ,(4, 1824937222, 8) ,(4, 1837638022, 9) ,(4, 1856386822, 8) ,(4, 1869087622, 9) ,(4, 1887836422, 8) ,(4, 1901142022, 9) ,(4, 1919286022, 8) ,(4, 1932591622, 9) ,(4, 1950735622, 8) ,(4, 1964041222, 9) ,(4, 1982790022, 8) ,(4, 1995490822, 9) ,(4, 2014239622, 8) ,(4, 2026940422, 9) ,(4, 2045689222, 8) ,(4, 2058390022, 9) ,(4, 2077138822, 8) ,(4, 2090444422, 9) ,(4, 2108588422, 8) ,(4, 2121894022, 9) ,(4, 2140038022, 8) ,(5, -1009875600, 1);
+INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset, Is_DST, Abbreviation) VALUES (1, 0, 7200, 1, 'MEST') ,(1, 1, 3600, 0, 'MET') ,(1, 2, 7200, 1, 'MEST') ,(1, 3, 3600, 0, 'MET') ,(2, 0, 0, 0, 'UTC') ,(3, 0, 9000, 0, 'MMT') ,(3, 1, 12648, 1, 'MST') ,(3, 2, 9048, 0, 'MMT') ,(3, 3, 16248, 1, 'MDST') ,(3, 4, 10800, 0, 'MSK') ,(3, 5, 14400, 1, 'MSD') ,(3, 6, 18000, 1, 'MSD') ,(3, 7, 7200, 0, 'EET') ,(3, 8, 10800, 0, 'MSK') ,(3, 9, 14400, 1, 'MSD') ,(3, 10, 10800, 1, 'EEST') ,(3, 11, 7200, 0, 'EET') ,(4, 0, 9000, 0, 'MMT') ,(4, 1, 12648, 1, 'MST') ,(4, 2, 9048, 0, 'MMT') ,(4, 3, 16248, 1, 'MDST') ,(4, 4, 10800, 0, 'MSK') ,(4, 5, 14400, 1, 'MSD') ,(4, 6, 18000, 1, 'MSD') ,(4, 7, 7200, 0, 'EET') ,(4, 8, 10800, 0, 'MSK') ,(4, 9, 14400, 1, 'MSD') ,(4, 10, 10800, 1, 'EEST') ,(4, 11, 7200, 0, 'EET') ,(5, 0, 32400, 0, 'CJT') ,(5, 1, 32400, 0, 'JST');
+INSERT INTO time_zone_leap_second (Transition_time, Correction) VALUES (78796800, 1) ,(94694401, 2) ,(126230402, 3) ,(157766403, 4) ,(189302404, 5) ,(220924805, 6) ,(252460806, 7) ,(283996807, 8) ,(315532808, 9) ,(362793609, 10) ,(394329610, 11) ,(425865611, 12) ,(489024012, 13) ,(567993613, 14) ,(631152014, 15) ,(662688015, 16) ,(709948816, 17) ,(741484817, 18) ,(773020818, 19) ,(820454419, 20) ,(867715220, 21) ,(915148821, 22);
diff --git a/sql-common/my_time.c b/sql-common/my_time.c
index a26e38b2123..e62003d13ed 100644
--- a/sql-common/my_time.c
+++ b/sql-common/my_time.c
@@ -206,7 +206,7 @@ str_to_datetime(const char *str, uint length, MYSQL_TIME *l_time,
digits= (uint) (pos-str);
start_loop= 0; /* Start of scan loop */
date_len[format_position[0]]= 0; /* Length of year field */
- if (pos == end)
+ if (pos == end || *pos == '.')
{
/* Found date in internal format (only numbers like YYYYMMDD) */
year_length= (digits == 4 || digits == 8 || digits >= 14) ? 4 : 2;
diff --git a/sql/Makefile.am b/sql/Makefile.am
index c3a692615dd..ac14ed3e883 100644
--- a/sql/Makefile.am
+++ b/sql/Makefile.am
@@ -26,7 +26,7 @@ INCLUDES = @ZLIB_INCLUDES@ \
WRAPLIBS= @WRAPLIBS@
SUBDIRS = share
libexec_PROGRAMS = mysqld
-noinst_PROGRAMS = gen_lex_hash
+EXTRA_PROGRAMS = gen_lex_hash
bin_PROGRAMS = mysql_tzinfo_to_sql
gen_lex_hash_LDFLAGS = @NOINST_LDFLAGS@
SUPPORTING_LIBS = $(top_builddir)/vio/libvio.a \
@@ -130,6 +130,7 @@ EXTRA_DIST = udf_example.c udf_example.def $(BUILT_MAINT_SRC) \
nt_servc.cc nt_servc.h message.mc CMakeLists.txt \
udf_example.c udf_example.def
CLEANFILES = lex_hash.h sql_yacc.output
+DISTCLEANFILES = $(EXTRA_PROGRAMS)
MAINTAINERCLEANFILES = $(BUILT_MAINT_SRC)
AM_YFLAGS = -d --verbose
@@ -152,11 +153,13 @@ link_sources: mysql_tzinfo_to_sql.cc
mysql_tzinfo_to_sql.o: $(mysql_tzinfo_to_sql_SOURCES)
$(CXXCOMPILE) -c $(INCLUDES) -DTZINFO2SQL $<
-# FIXME seems like now "lex_hash.h" differs depending on configure
-# flags, so can't pregenerate and include in source TAR. Revert to
-# dist pregenerated if this changes, so the file doesn't differ.
-lex_hash.h: gen_lex_hash$(EXEEXT)
- ./gen_lex_hash$(EXEEXT) > $@
+# This generates lex_hash.h
+# NOTE Built sources should depend on their sources not the tool
+# this avoid the rebuild of the built files in a source dist
+lex_hash.h: gen_lex_hash.cc lex.h
+ $(MAKE) $(AM_MAKEFLAGS) gen_lex_hash$(EXEEXT)
+ ./gen_lex_hash$(EXEEXT) > $@-t
+ $(MV) $@-t $@
# the following three should eventually be moved out of this directory
ha_ndbcluster.o:ha_ndbcluster.cc ha_ndbcluster.h
diff --git a/sql/event_queue.cc b/sql/event_queue.cc
index 296c30506f6..fb1653d6d8f 100644
--- a/sql/event_queue.cc
+++ b/sql/event_queue.cc
@@ -150,13 +150,6 @@ Event_queue::init_queue(THD *thd)
goto err;
}
- if (sizeof(my_time_t) != sizeof(time_t))
- {
- sql_print_error("SCHEDULER: sizeof(my_time_t) != sizeof(time_t) ."
- "The scheduler may not work correctly. Stopping");
- goto err;
- }
-
UNLOCK_QUEUE_DATA();
DBUG_RETURN(FALSE);
diff --git a/sql/field.cc b/sql/field.cc
index d406459b6c7..488a5d591a3 100644
--- a/sql/field.cc
+++ b/sql/field.cc
@@ -5436,27 +5436,30 @@ int Field_newdate::store(const char *from,uint len,CHARSET_INFO *cs)
{
ASSERT_COLUMN_MARKED_FOR_WRITE;
TIME l_time;
- long tmp;
int error;
THD *thd= table ? table->in_use : current_thd;
- if (str_to_datetime(from, len, &l_time,
- (TIME_FUZZY_DATE |
- (thd->variables.sql_mode &
- (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE |
- MODE_INVALID_DATES))),
- &error) <= MYSQL_TIMESTAMP_ERROR)
+ enum enum_mysql_timestamp_type ret;
+ if ((ret= str_to_datetime(from, len, &l_time,
+ (TIME_FUZZY_DATE |
+ (thd->variables.sql_mode &
+ (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE |
+ MODE_INVALID_DATES))),
+ &error)) <= MYSQL_TIMESTAMP_ERROR)
{
- tmp= 0L;
+ int3store(ptr,0L);
error= 2;
}
else
- tmp= l_time.day + l_time.month*32 + l_time.year*16*32;
+ {
+ int3store(ptr, l_time.day + l_time.month*32 + l_time.year*16*32);
+ if(!error && (ret != MYSQL_TIMESTAMP_DATE))
+ return 2;
+ }
if (error)
set_datetime_warning(MYSQL_ERROR::WARN_LEVEL_WARN, WARN_DATA_TRUNCATED,
from, len, MYSQL_TIMESTAMP_DATE, 1);
- int3store(ptr,tmp);
return error;
}
diff --git a/sql/item.cc b/sql/item.cc
index a01a68de783..43f182307f1 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -3800,7 +3800,18 @@ bool Item_field::fix_fields(THD *thd, Item **reference)
use the field from the Item_field in the select list and leave
the Item_field instance in place.
*/
- set_field((*((Item_field**)res))->field);
+
+ Field *field= (*((Item_field**)res))->field;
+
+ if (field == NULL)
+ {
+ /* The column to which we link isn't valid. */
+ my_error(ER_BAD_FIELD_ERROR, MYF(0), (*res)->name,
+ current_thd->where);
+ return(1);
+ }
+
+ set_field(field);
return 0;
}
else
diff --git a/sql/item_geofunc.cc b/sql/item_geofunc.cc
index 35a9f026b1d..78741483c0b 100644
--- a/sql/item_geofunc.cc
+++ b/sql/item_geofunc.cc
@@ -38,6 +38,7 @@ void Item_geometry_func::fix_length_and_dec()
collation.set(&my_charset_bin);
decimals=0;
max_length=MAX_BLOB_WIDTH;
+ maybe_null= 1;
}
int Item_geometry_func::get_geometry_type() const
@@ -66,11 +67,8 @@ String *Item_func_geometry_from_text::val_str(String *str)
return 0;
str->length(0);
str->q_append(srid);
- if (!Geometry::create_from_wkt(&buffer, &trs, str, 0))
- /* We shouldn't return NULL here as NULL is a legal spatial object */
- /* Geometry::bad_spatial_data will produce error message beeing stored*/
- /* in GEOMETRY field */
- return &Geometry::bad_geometry_data;
+ if ((null_value= !Geometry::create_from_wkt(&buffer, &trs, str, 0)))
+ return 0;
return str;
}
@@ -124,6 +122,7 @@ String *Item_func_as_wkt::val_str(String *str)
void Item_func_as_wkt::fix_length_and_dec()
{
max_length=MAX_BLOB_WIDTH;
+ maybe_null= 1;
}
@@ -389,7 +388,8 @@ String *Item_func_spatial_collection::val_str(String *str)
for (i= 0; i < arg_count; ++i)
{
String *res= args[i]->val_str(&arg_value);
- if (args[i]->null_value)
+ uint32 len;
+ if (args[i]->null_value || ((len= res->length()) < WKB_HEADER_SIZE))
goto err;
if (coll_type == Geometry::wkb_geometrycollection)
@@ -398,13 +398,12 @@ String *Item_func_spatial_collection::val_str(String *str)
In the case of GeometryCollection we don't need any checkings
for item types, so just copy them into target collection
*/
- if (str->append(res->ptr(), res->length(), (uint32) 512))
+ if (str->append(res->ptr(), len, (uint32) 512))
goto err;
}
else
{
enum Geometry::wkbType wkb_type;
- uint32 len=res->length();
const char *data= res->ptr() + 1;
/*
@@ -412,8 +411,6 @@ String *Item_func_spatial_collection::val_str(String *str)
are of specific type, let's do this checking now
*/
- if (len < 5)
- goto err;
wkb_type= (Geometry::wkbType) uint4korr(data);
data+= 4;
len-= 5;
@@ -535,9 +532,13 @@ longlong Item_func_spatial_rel::val_int()
longlong Item_func_isempty::val_int()
{
DBUG_ASSERT(fixed == 1);
- String tmp;
- null_value=0;
- return args[0]->null_value ? 1 : 0;
+ String tmp;
+ String *swkb= args[0]->val_str(&tmp);
+ Geometry_buffer buffer;
+
+ null_value= args[0]->null_value ||
+ !(Geometry::construct(&buffer, swkb->ptr(), swkb->length()));
+ return null_value ? 1 : 0;
}
@@ -545,10 +546,11 @@ longlong Item_func_issimple::val_int()
{
DBUG_ASSERT(fixed == 1);
String tmp;
- String *wkb=args[0]->val_str(&tmp);
-
- if ((null_value= (!wkb || args[0]->null_value)))
- return 0;
+ String *swkb= args[0]->val_str(&tmp);
+ Geometry_buffer buffer;
+
+ null_value= args[0]->null_value ||
+ !(Geometry::construct(&buffer, swkb->ptr(), swkb->length()));
/* TODO: Ramil or Holyfoot, add real IsSimple calculation */
return 0;
}
diff --git a/sql/item_geofunc.h b/sql/item_geofunc.h
index 5361a02aa83..068caa447ef 100644
--- a/sql/item_geofunc.h
+++ b/sql/item_geofunc.h
@@ -34,6 +34,7 @@ public:
enum_field_types field_type() const { return MYSQL_TYPE_GEOMETRY; }
Field *tmp_table_field(TABLE *t_arg);
virtual int get_geometry_type() const;
+ bool is_null() { (void) val_int(); return null_value; }
};
class Item_func_geometry_from_text: public Item_geometry_func
@@ -81,6 +82,7 @@ public:
void fix_length_and_dec()
{
max_length=20; // "GeometryCollection" is the most long
+ maybe_null= 1;
};
};
@@ -225,6 +227,8 @@ public:
}
}
void print(String *str) { Item_func::print(str); }
+ void fix_length_and_dec() { maybe_null= 1; }
+ bool is_null() { (void) val_int(); return null_value; }
};
class Item_func_isempty: public Item_bool_func
@@ -234,6 +238,7 @@ public:
longlong val_int();
optimize_type select_optimize() const { return OPTIMIZE_NONE; }
const char *func_name() const { return "isempty"; }
+ void fix_length_and_dec() { maybe_null= 1; }
};
class Item_func_issimple: public Item_bool_func
@@ -243,6 +248,7 @@ public:
longlong val_int();
optimize_type select_optimize() const { return OPTIMIZE_NONE; }
const char *func_name() const { return "issimple"; }
+ void fix_length_and_dec() { maybe_null= 1; }
};
class Item_func_isclosed: public Item_bool_func
@@ -252,6 +258,7 @@ public:
longlong val_int();
optimize_type select_optimize() const { return OPTIMIZE_NONE; }
const char *func_name() const { return "isclosed"; }
+ void fix_length_and_dec() { maybe_null= 1; }
};
class Item_func_dimension: public Item_int_func
@@ -261,7 +268,7 @@ public:
Item_func_dimension(Item *a): Item_int_func(a) {}
longlong val_int();
const char *func_name() const { return "dimension"; }
- void fix_length_and_dec() { max_length=10; }
+ void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
};
class Item_func_x: public Item_real_func
@@ -271,6 +278,11 @@ public:
Item_func_x(Item *a): Item_real_func(a) {}
double val_real();
const char *func_name() const { return "x"; }
+ void fix_length_and_dec()
+ {
+ Item_real_func::fix_length_and_dec();
+ maybe_null= 1;
+ }
};
@@ -281,6 +293,11 @@ public:
Item_func_y(Item *a): Item_real_func(a) {}
double val_real();
const char *func_name() const { return "y"; }
+ void fix_length_and_dec()
+ {
+ Item_real_func::fix_length_and_dec();
+ maybe_null= 1;
+ }
};
@@ -291,7 +308,7 @@ public:
Item_func_numgeometries(Item *a): Item_int_func(a) {}
longlong val_int();
const char *func_name() const { return "numgeometries"; }
- void fix_length_and_dec() { max_length=10; }
+ void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
};
@@ -302,7 +319,7 @@ public:
Item_func_numinteriorring(Item *a): Item_int_func(a) {}
longlong val_int();
const char *func_name() const { return "numinteriorrings"; }
- void fix_length_and_dec() { max_length=10; }
+ void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
};
@@ -313,7 +330,7 @@ public:
Item_func_numpoints(Item *a): Item_int_func(a) {}
longlong val_int();
const char *func_name() const { return "numpoints"; }
- void fix_length_and_dec() { max_length=10; }
+ void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
};
@@ -324,6 +341,11 @@ public:
Item_func_area(Item *a): Item_real_func(a) {}
double val_real();
const char *func_name() const { return "area"; }
+ void fix_length_and_dec()
+ {
+ Item_real_func::fix_length_and_dec();
+ maybe_null= 1;
+ }
};
@@ -334,6 +356,11 @@ public:
Item_func_glength(Item *a): Item_real_func(a) {}
double val_real();
const char *func_name() const { return "glength"; }
+ void fix_length_and_dec()
+ {
+ Item_real_func::fix_length_and_dec();
+ maybe_null= 1;
+ }
};
@@ -344,7 +371,7 @@ public:
Item_func_srid(Item *a): Item_int_func(a) {}
longlong val_int();
const char *func_name() const { return "srid"; }
- void fix_length_and_dec() { max_length= 10; }
+ void fix_length_and_dec() { max_length= 10; maybe_null= 1; }
};
#define GEOM_NEW(thd, obj_constructor) new (thd->mem_root) obj_constructor
diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc
index acc522b1b46..b96567cf1ff 100644
--- a/sql/item_strfunc.cc
+++ b/sql/item_strfunc.cc
@@ -2271,8 +2271,10 @@ String *Item_func_repeat::val_str(String *str)
if (args[0]->null_value || args[1]->null_value)
goto err; // string and/or delim are null
null_value= 0;
- if ((count <= 0) && !args[1]->unsigned_flag) // For nicer SQL code
+
+ if (count == 0 || count < 0 && !args[1]->unsigned_flag)
return &my_empty_string;
+
/* Assumes that the maximum length of a String is < INT_MAX32. */
/* Bounds check on count: If this is triggered, we will error. */
if ((ulonglong) count > INT_MAX32)
@@ -2800,6 +2802,11 @@ String *Item_load_file::val_str(String *str)
(void) fn_format(path, file_name->c_ptr(), mysql_real_data_home, "",
MY_RELATIVE_PATH | MY_UNPACK_FILENAME);
+ /* Read only allowed from within dir specified by secure_file_priv */
+ if (opt_secure_file_priv &&
+ strncmp(opt_secure_file_priv, path, strlen(opt_secure_file_priv)))
+ goto err;
+
if (!my_stat(path, &stat_info, MYF(0)))
goto err;
diff --git a/sql/log.cc b/sql/log.cc
index 3b7d0c84106..3bb8d9576ba 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -66,7 +66,7 @@ sql_print_message_func sql_print_message_handlers[3] =
char *make_default_log_name(char *buff,const char* log_ext)
{
- strmake(buff, glob_hostname, FN_REFLEN-5);
+ strmake(buff, pidfile_name, FN_REFLEN-5);
return fn_format(buff, buff, mysql_data_home, log_ext,
MYF(MY_UNPACK_FILENAME|MY_APPEND_EXT));
}
@@ -2290,7 +2290,7 @@ const char *MYSQL_LOG::generate_name(const char *log_name,
TODO: The following should be using fn_format(); We just need to
first change fn_format() to cut the file name if it's too long.
*/
- strmake(buff, glob_hostname, FN_REFLEN - 5);
+ strmake(buff, pidfile_name, FN_REFLEN - 5);
strmov(fn_ext(buff), suffix);
return (const char *)buff;
}
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index c812aa800c9..b61ad2c29f8 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -1630,6 +1630,7 @@ extern my_bool opt_slave_compressed_protocol, use_temp_pool;
extern my_bool opt_readonly, lower_case_file_system;
extern my_bool opt_enable_named_pipe, opt_sync_frm, opt_allow_suspicious_udfs;
extern my_bool opt_secure_auth;
+extern char* opt_secure_file_priv;
extern my_bool opt_log_slow_admin_statements;
extern my_bool sp_automatic_privileges, opt_noacl;
extern my_bool opt_old_style_user_limits, trust_function_creators;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 8a6d00e44a1..e2eac3f3b9a 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -400,6 +400,7 @@ extern my_bool innobase_log_archive,
innobase_use_native_aio,
innobase_file_per_table, innobase_locks_unsafe_for_binlog,
innobase_rollback_on_timeout,
+ innobase_stats_on_metadata,
innobase_create_status_file;
extern "C" {
extern ulong srv_max_buf_pool_modified_pct;
@@ -437,6 +438,7 @@ extern enum ndb_distribution opt_ndb_distribution_id;
my_bool opt_readonly, use_temp_pool, relay_log_purge;
my_bool opt_sync_frm, opt_allow_suspicious_udfs;
my_bool opt_secure_auth= 0;
+char* opt_secure_file_priv= 0;
my_bool opt_log_slow_admin_statements= 0;
my_bool lower_case_file_system= 0;
my_bool opt_large_pages= 0;
@@ -1245,6 +1247,7 @@ void clean_up(bool print_message)
#endif
x_free(opt_bin_logname);
x_free(opt_relay_logname);
+ x_free(opt_secure_file_priv);
bitmap_free(&temp_pool);
free_max_user_conn();
#ifdef HAVE_REPLICATION
@@ -2170,7 +2173,10 @@ static void check_data_home(const char *path)
extern "C" sig_handler handle_segfault(int sig)
{
+ time_t curr_time;
+ struct tm tm;
THD *thd=current_thd;
+
/*
Strictly speaking, one needs a mutex here
but since we have got SIGSEGV already, things are a mess
@@ -2184,11 +2190,17 @@ extern "C" sig_handler handle_segfault(int sig)
}
segfaulted = 1;
+
+ curr_time= time(NULL);
+ localtime_r(&curr_time, &tm);
+
fprintf(stderr,"\
-mysqld got signal %d;\n\
+%02d%02d%02d %2d:%02d:%02d - mysqld got signal %d;\n\
This could be because you hit a bug. It is also possible that this binary\n\
or one of the libraries it was linked against is corrupt, improperly built,\n\
or misconfigured. This error can also be caused by malfunctioning hardware.\n",
+ tm.tm_year % 100, tm.tm_mon+1, tm.tm_mday,
+ tm.tm_hour, tm.tm_min, tm.tm_sec,
sig);
fprintf(stderr, "\
We will try our best to scrape up some info that will hopefully help diagnose\n\
@@ -2747,9 +2759,15 @@ static int init_common_variables(const char *conf_file_name, int argc,
*/
mysql_bin_log.init_pthread_objects();
- if (gethostname(glob_hostname,sizeof(glob_hostname)-4) < 0)
- strmov(glob_hostname,"mysql");
- strmake(pidfile_name, glob_hostname, sizeof(pidfile_name)-5);
+ if (gethostname(glob_hostname,sizeof(glob_hostname)) < 0)
+ {
+ strmake(glob_hostname, STRING_WITH_LEN("localhost"));
+ sql_print_warning("gethostname failed, using '%s' as hostname",
+ glob_hostname);
+ strmake(pidfile_name, STRING_WITH_LEN("mysql"));
+ }
+ else
+ strmake(pidfile_name, glob_hostname, sizeof(pidfile_name)-5);
strmov(fn_ext(pidfile_name),".pid"); // Add proper extension
/*
@@ -2846,10 +2864,33 @@ static int init_common_variables(const char *conf_file_name, int argc,
#ifdef USE_REGEX
my_regex_init(&my_charset_latin1);
#endif
- if (!(default_charset_info= get_charset_by_csname(default_character_set_name,
- MY_CS_PRIMARY,
- MYF(MY_WME))))
- return 1;
+ /*
+ Process a comma-separated character set list and choose
+ the first available character set. This is mostly for
+ test purposes, to be able to start "mysqld" even if
+ the requested character set is not available (see bug#18743).
+ */
+ for (;;)
+ {
+ char *next_character_set_name= strchr(default_character_set_name, ',');
+ if (next_character_set_name)
+ *next_character_set_name++= '\0';
+ if (!(default_charset_info=
+ get_charset_by_csname(default_character_set_name,
+ MY_CS_PRIMARY, MYF(MY_WME))))
+ {
+ if (next_character_set_name)
+ {
+ default_character_set_name= next_character_set_name;
+ default_collation_name= 0; // Ignore collation
+ }
+ else
+ return 1; // Eof of the list
+ }
+ else
+ break;
+ }
+
if (default_collation_name)
{
CHARSET_INFO *default_collation;
@@ -3184,7 +3225,7 @@ static int init_server_components()
if (opt_error_log)
{
if (!log_error_file_ptr[0])
- fn_format(log_error_file, glob_hostname, mysql_data_home, ".err",
+ fn_format(log_error_file, pidfile_name, mysql_data_home, ".err",
MY_REPLACE_EXT); /* replace '.<domain>' by '.err', bug#4997 */
else
fn_format(log_error_file, log_error_file_ptr, mysql_data_home, ".err",
@@ -4943,6 +4984,7 @@ enum options_mysqld
OPT_INNODB_SYNC_SPIN_LOOPS,
OPT_INNODB_CONCURRENCY_TICKETS,
OPT_INNODB_THREAD_SLEEP_DELAY,
+ OPT_INNODB_STATS_ON_METADATA,
OPT_BDB_CACHE_SIZE,
OPT_BDB_CACHE_PARTS,
OPT_BDB_LOG_BUFFER_SIZE,
@@ -4994,7 +5036,8 @@ enum options_mysqld
OPT_SLOW_LOG,
OPT_MERGE,
OPT_THREAD_HANDLING,
- OPT_INNODB_ROLLBACK_ON_TIMEOUT
+ OPT_INNODB_ROLLBACK_ON_TIMEOUT,
+ OPT_SECURE_FILE_PRIV
};
@@ -5289,6 +5332,10 @@ Disable with --skip-innodb-doublewrite.", (gptr*) &innobase_use_doublewrite,
"Enable SHOW INNODB STATUS output in the innodb_status.<pid> file",
(gptr*) &innobase_create_status_file, (gptr*) &innobase_create_status_file,
0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
+ {"innodb_stats_on_metadata", OPT_INNODB_STATS_ON_METADATA,
+ "Enable statistics gathering for metadata commands such as SHOW TABLE STATUS (on by default)",
+ (gptr*) &innobase_stats_on_metadata, (gptr*) &innobase_stats_on_metadata,
+ 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"innodb_support_xa", OPT_INNODB_SUPPORT_XA,
"Enable InnoDB support for the XA two-phase commit",
(gptr*) &global_system_variables.innodb_support_xa,
@@ -5697,6 +5744,10 @@ Can't be set to 1 if --log-slave-updates is used.",
{"secure-auth", OPT_SECURE_AUTH, "Disallow authentication for accounts that have old (pre-4.1) passwords.",
(gptr*) &opt_secure_auth, (gptr*) &opt_secure_auth, 0, GET_BOOL, NO_ARG,
my_bool(0), 0, 0, 0, 0, 0},
+ {"secure-file-priv", OPT_SECURE_FILE_PRIV,
+ "Limit LOAD DATA, SELECT ... OUTFILE, and LOAD_FILE() to files within specified directory",
+ (gptr*) &opt_secure_file_priv, (gptr*) &opt_secure_file_priv, 0,
+ GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"server-id", OPT_SERVER_ID,
"Uniquely identifies the server instance in the community of replication partners.",
(gptr*) &server_id, (gptr*) &server_id, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 0,
@@ -7073,6 +7124,7 @@ static void mysql_init_variables(void)
opt_logname= opt_update_logname= opt_binlog_index_name= opt_slow_logname= 0;
opt_tc_log_file= (char *)"tc.log"; // no hostname in tc_log file name !
opt_secure_auth= 0;
+ opt_secure_file_priv= 0;
opt_bootstrap= opt_myisam_log= 0;
mqh_used= 0;
segfaulted= kill_in_progress= 0;
@@ -8139,6 +8191,16 @@ static void fix_paths(void)
exit(1);
}
#endif /* HAVE_REPLICATION */
+ /*
+ Convert the secure-file-priv option to system format, allowing
+ a quick strcmp to check if read or write is in an allowed dir
+ */
+ if (opt_secure_file_priv)
+ {
+ convert_dirname(buff, opt_secure_file_priv, NullS);
+ my_free(opt_secure_file_priv, MYF(0));
+ opt_secure_file_priv= my_strdup(buff, MYF(MY_FAE));
+ }
}
@@ -8334,7 +8396,8 @@ my_bool innobase_log_archive,
innobase_use_checksums,
innobase_file_per_table,
innobase_locks_unsafe_for_binlog,
- innobase_rollback_on_timeout;
+ innobase_rollback_on_timeout,
+ innobase_stats_on_metadata;
extern "C" {
ulong srv_max_buf_pool_modified_pct;
diff --git a/sql/set_var.cc b/sql/set_var.cc
index df9297917b3..03a982087fe 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -78,7 +78,8 @@ extern my_bool innobase_log_archive,
innobase_use_checksums,
innobase_file_per_table,
innobase_locks_unsafe_for_binlog,
- innobase_rollback_on_timeout;
+ innobase_rollback_on_timeout,
+ innobase_stats_on_metadata;
extern "C" {
extern ulong srv_max_buf_pool_modified_pct;
@@ -415,6 +416,8 @@ sys_query_cache_wlock_invalidate("query_cache_wlock_invalidate",
&SV::query_cache_wlock_invalidate);
#endif /* HAVE_QUERY_CACHE */
sys_var_bool_ptr sys_secure_auth("secure_auth", &opt_secure_auth);
+sys_var_const_str_ptr sys_secure_file_priv("secure_file_priv",
+ &opt_secure_file_priv);
sys_var_long_ptr sys_server_id("server_id", &server_id, fix_server_id);
sys_var_bool_ptr sys_slave_compressed_protocol("slave_compressed_protocol",
&opt_slave_compressed_protocol);
@@ -661,6 +664,10 @@ sys_var_thd_time_zone sys_time_zone("time_zone");
/* Read only variables */
+/* Global read-only variable containing hostname */
+sys_var_const_str sys_hostname("hostname", glob_hostname);
+
+
sys_var_have_variable sys_have_compress("have_compress", &have_compress);
sys_var_have_variable sys_have_crypt("have_crypt", &have_crypt);
sys_var_have_variable sys_have_csv_db("have_csv", &have_csv_db);
@@ -677,7 +684,6 @@ 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);
/* Global read-only variable describing server license */
sys_var_const_str sys_license("license", STRINGIFY_ARG(LICENSE));
-
/* Global variables which enable|disable logging */
sys_var_log_state sys_var_general_log("general_log", &opt_log,
QUERY_LOG_GENERAL);
@@ -786,6 +792,7 @@ SHOW_VAR init_vars[]= {
{sys_var_general_log.name, (char*) &opt_log, SHOW_MY_BOOL},
{sys_var_general_log_path.name, (char*) &sys_var_general_log_path, SHOW_SYS},
{sys_group_concat_max_len.name, (char*) &sys_group_concat_max_len, SHOW_SYS},
+ {sys_hostname.name, (char*) &sys_hostname, SHOW_SYS},
{sys_have_compress.name, (char*) &have_compress, SHOW_HAVE},
{sys_have_crypt.name, (char*) &have_crypt, SHOW_HAVE},
{sys_have_csv_db.name, (char*) &have_csv_db, SHOW_HAVE},
@@ -829,6 +836,7 @@ SHOW_VAR init_vars[]= {
{"innodb_mirrored_log_groups", (char*) &innobase_mirrored_log_groups, SHOW_LONG},
{"innodb_open_files", (char*) &innobase_open_files, SHOW_LONG },
{"innodb_rollback_on_timeout", (char*) &innobase_rollback_on_timeout, SHOW_MY_BOOL},
+ {"innodb_stats_on_metadata", (char*) &innobase_stats_on_metadata, SHOW_MY_BOOL},
{sys_innodb_support_xa.name, (char*) &sys_innodb_support_xa, SHOW_SYS},
{sys_innodb_sync_spin_loops.name, (char*) &sys_innodb_sync_spin_loops, SHOW_SYS},
{sys_innodb_table_locks.name, (char*) &sys_innodb_table_locks, SHOW_SYS},
@@ -967,6 +975,7 @@ SHOW_VAR init_vars[]= {
#endif
{sys_rpl_recovery_rank.name,(char*) &sys_rpl_recovery_rank, SHOW_SYS},
{"secure_auth", (char*) &sys_secure_auth, SHOW_SYS},
+ {"secure_file_priv", (char*) &sys_secure_file_priv, SHOW_SYS},
#ifdef HAVE_SMEM
{"shared_memory", (char*) &opt_enable_shared_memory, SHOW_MY_BOOL},
{"shared_memory_base_name", (char*) &shared_memory_base_name, SHOW_CHAR_PTR},
diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt
index 29fde49bbd6..1d9c7c814fd 100644
--- a/sql/share/errmsg.txt
+++ b/sql/share/errmsg.txt
@@ -51,54 +51,54 @@ ER_YES
spa "SI"
ukr ""
ER_CANT_CREATE_FILE
- cze "Nemohu vytvo-Bit soubor '%-.64s' (chybov kd: %d)"
- dan "Kan ikke oprette filen '%-.64s' (Fejlkode: %d)"
- nla "Kan file '%-.64s' niet aanmaken (Errcode: %d)"
+ cze "Nemohu vytvo-Bit soubor '%-.200s' (chybov kd: %d)"
+ dan "Kan ikke oprette filen '%-.200s' (Fejlkode: %d)"
+ nla "Kan file '%-.200s' niet aanmaken (Errcode: %d)"
eng "Can't create file '%-.200s' (errno: %d)"
- est "Ei suuda luua faili '%-.64s' (veakood: %d)"
- fre "Ne peut crer le fichier '%-.64s' (Errcode: %d)"
- ger "Kann Datei '%-.64s' nicht erzeugen (Fehler: %d)"
- greek " '%-.64s' ( : %d)"
- hun "A '%-.64s' file nem hozhato letre (hibakod: %d)"
- ita "Impossibile creare il file '%-.64s' (errno: %d)"
- jpn "'%-.64s' ե뤬ޤ (errno: %d)"
- kor "ȭ '%-.64s' ߽ϴ. (ȣ: %d)"
- nor "Kan ikke opprette fila '%-.64s' (Feilkode: %d)"
- norwegian-ny "Kan ikkje opprette fila '%-.64s' (Feilkode: %d)"
- pol "Nie mona stworzy pliku '%-.64s' (Kod bdu: %d)"
- por "No pode criar o arquivo '%-.64s' (erro no. %d)"
- rum "Nu pot sa creez fisierul '%-.64s' (Eroare: %d)"
- rus " '%-.64s' (: %d)"
- serbian "Ne mogu da kreiram file '%-.64s' (errno: %d)"
- slo "Nemem vytvori sbor '%-.64s' (chybov kd: %d)"
- spa "No puedo crear archivo '%-.64s' (Error: %d)"
- swe "Kan inte skapa filen '%-.64s' (Felkod: %d)"
- ukr " '%-.64s' (: %d)"
+ est "Ei suuda luua faili '%-.200s' (veakood: %d)"
+ fre "Ne peut crer le fichier '%-.200s' (Errcode: %d)"
+ ger "Kann Datei '%-.200s' nicht erzeugen (Fehler: %d)"
+ greek " '%-.200s' ( : %d)"
+ hun "A '%-.200s' file nem hozhato letre (hibakod: %d)"
+ ita "Impossibile creare il file '%-.200s' (errno: %d)"
+ jpn "'%-.200s' ե뤬ޤ (errno: %d)"
+ kor "ȭ '%-.200s' ߽ϴ. (ȣ: %d)"
+ nor "Kan ikke opprette fila '%-.200s' (Feilkode: %d)"
+ norwegian-ny "Kan ikkje opprette fila '%-.200s' (Feilkode: %d)"
+ pol "Nie mona stworzy pliku '%-.200s' (Kod bdu: %d)"
+ por "No pode criar o arquivo '%-.200s' (erro no. %d)"
+ rum "Nu pot sa creez fisierul '%-.200s' (Eroare: %d)"
+ rus " '%-.200s' (: %d)"
+ serbian "Ne mogu da kreiram file '%-.200s' (errno: %d)"
+ slo "Nemem vytvori sbor '%-.200s' (chybov kd: %d)"
+ spa "No puedo crear archivo '%-.200s' (Error: %d)"
+ swe "Kan inte skapa filen '%-.200s' (Felkod: %d)"
+ ukr " '%-.200s' (: %d)"
ER_CANT_CREATE_TABLE
- cze "Nemohu vytvo-Bit tabulku '%-.64s' (chybov kd: %d)"
- dan "Kan ikke oprette tabellen '%-.64s' (Fejlkode: %d)"
- nla "Kan tabel '%-.64s' niet aanmaken (Errcode: %d)"
+ cze "Nemohu vytvo-Bit tabulku '%-.200s' (chybov kd: %d)"
+ dan "Kan ikke oprette tabellen '%-.200s' (Fejlkode: %d)"
+ nla "Kan tabel '%-.200s' niet aanmaken (Errcode: %d)"
eng "Can't create table '%-.200s' (errno: %d)"
- jps "'%-.64s' e[u܂.(errno: %d)",
- est "Ei suuda luua tabelit '%-.64s' (veakood: %d)"
- fre "Ne peut crer la table '%-.64s' (Errcode: %d)"
- ger "Kann Tabelle '%-.64s' nicht erzeugen (Fehler: %d)"
- greek " '%-.64s' ( : %d)"
- hun "A '%-.64s' tabla nem hozhato letre (hibakod: %d)"
- ita "Impossibile creare la tabella '%-.64s' (errno: %d)"
- jpn "'%-.64s' ơ֥뤬ޤ.(errno: %d)"
- kor "̺ '%-.64s' ߽ϴ. (ȣ: %d)"
- nor "Kan ikke opprette tabellen '%-.64s' (Feilkode: %d)"
- norwegian-ny "Kan ikkje opprette tabellen '%-.64s' (Feilkode: %d)"
- pol "Nie mona stworzy tabeli '%-.64s' (Kod bdu: %d)"
- por "No pode criar a tabela '%-.64s' (erro no. %d)"
- rum "Nu pot sa creez tabla '%-.64s' (Eroare: %d)"
- rus " '%-.64s' (: %d)"
- serbian "Ne mogu da kreiram tabelu '%-.64s' (errno: %d)"
- slo "Nemem vytvori tabuku '%-.64s' (chybov kd: %d)"
- spa "No puedo crear tabla '%-.64s' (Error: %d)"
- swe "Kan inte skapa tabellen '%-.64s' (Felkod: %d)"
- ukr " '%-.64s' (: %d)"
+ jps "'%-.200s' e[u܂.(errno: %d)",
+ est "Ei suuda luua tabelit '%-.200s' (veakood: %d)"
+ fre "Ne peut crer la table '%-.200s' (Errcode: %d)"
+ ger "Kann Tabelle '%-.200s' nicht erzeugen (Fehler: %d)"
+ greek " '%-.200s' ( : %d)"
+ hun "A '%-.200s' tabla nem hozhato letre (hibakod: %d)"
+ ita "Impossibile creare la tabella '%-.200s' (errno: %d)"
+ jpn "'%-.200s' ơ֥뤬ޤ.(errno: %d)"
+ kor "̺ '%-.200s' ߽ϴ. (ȣ: %d)"
+ nor "Kan ikke opprette tabellen '%-.200s' (Feilkode: %d)"
+ norwegian-ny "Kan ikkje opprette tabellen '%-.200s' (Feilkode: %d)"
+ pol "Nie mona stworzy tabeli '%-.200s' (Kod bdu: %d)"
+ por "No pode criar a tabela '%-.200s' (erro no. %d)"
+ rum "Nu pot sa creez tabla '%-.200s' (Eroare: %d)"
+ rus " '%-.200s' (: %d)"
+ serbian "Ne mogu da kreiram tabelu '%-.200s' (errno: %d)"
+ slo "Nemem vytvori tabuku '%-.200s' (chybov kd: %d)"
+ spa "No puedo crear tabla '%-.200s' (Error: %d)"
+ swe "Kan inte skapa tabellen '%-.200s' (Felkod: %d)"
+ ukr " '%-.200s' (: %d)"
ER_CANT_CREATE_DB
cze "Nemohu vytvo-Bit databzi '%-.64s' (chybov kd: %d)"
dan "Kan ikke oprette databasen '%-.64s' (Fejlkode: %d)"
@@ -275,30 +275,30 @@ ER_CANT_FIND_SYSTEM_REC
swe "Hittar inte posten i systemregistret"
ukr " ϧ æ"
ER_CANT_GET_STAT
- cze "Nemohu z-Bskat stav '%-.64s' (chybov kd: %d)"
- dan "Kan ikke lse status af '%-.64s' (Fejlkode: %d)"
- nla "Kan de status niet krijgen van '%-.64s' (Errcode: %d)"
+ cze "Nemohu z-Bskat stav '%-.200s' (chybov kd: %d)"
+ dan "Kan ikke lse status af '%-.200s' (Fejlkode: %d)"
+ nla "Kan de status niet krijgen van '%-.200s' (Errcode: %d)"
eng "Can't get status of '%-.200s' (errno: %d)"
- jps "'%-.64s' ̃XeC^X܂. (errno: %d)",
- est "Ei suuda lugeda '%-.64s' olekut (veakood: %d)"
- fre "Ne peut obtenir le status de '%-.64s' (Errcode: %d)"
- ger "Kann Status von '%-.64s' nicht ermitteln (Fehler: %d)"
- greek " '%-.64s' ( : %d)"
- hun "A(z) '%-.64s' statusza nem allapithato meg (hibakod: %d)"
- ita "Impossibile leggere lo stato di '%-.64s' (errno: %d)"
- jpn "'%-.64s' Υƥޤ. (errno: %d)"
- kor "'%-.64s' ¸ ߽ϴ. (ȣ: %d)"
- nor "Kan ikke lese statusen til '%-.64s' (Feilkode: %d)"
- norwegian-ny "Kan ikkje lese statusen til '%-.64s' (Feilkode: %d)"
- pol "Nie mona otrzyma statusu '%-.64s' (Kod bdu: %d)"
- por "No pode obter o status de '%-.64s' (erro no. %d)"
- rum "Nu pot sa obtin statusul lui '%-.64s' (Eroare: %d)"
- rus " '%-.64s' (: %d)"
- serbian "Ne mogu da dobijem stanje file-a '%-.64s' (errno: %d)"
- slo "Nemem zisti stav '%-.64s' (chybov kd: %d)"
- spa "No puedo obtener el estado de '%-.64s' (Error: %d)"
- swe "Kan inte lsa filinformationen (stat) frn '%-.64s' (Felkod: %d)"
- ukr " '%-.64s' (: %d)"
+ jps "'%-.200s' ̃XeC^X܂. (errno: %d)",
+ est "Ei suuda lugeda '%-.200s' olekut (veakood: %d)"
+ fre "Ne peut obtenir le status de '%-.200s' (Errcode: %d)"
+ ger "Kann Status von '%-.200s' nicht ermitteln (Fehler: %d)"
+ greek " '%-.200s' ( : %d)"
+ hun "A(z) '%-.200s' statusza nem allapithato meg (hibakod: %d)"
+ ita "Impossibile leggere lo stato di '%-.200s' (errno: %d)"
+ jpn "'%-.200s' Υƥޤ. (errno: %d)"
+ kor "'%-.200s' ¸ ߽ϴ. (ȣ: %d)"
+ nor "Kan ikke lese statusen til '%-.200s' (Feilkode: %d)"
+ norwegian-ny "Kan ikkje lese statusen til '%-.200s' (Feilkode: %d)"
+ pol "Nie mona otrzyma statusu '%-.200s' (Kod bdu: %d)"
+ por "No pode obter o status de '%-.200s' (erro no. %d)"
+ rum "Nu pot sa obtin statusul lui '%-.200s' (Eroare: %d)"
+ rus " '%-.200s' (: %d)"
+ serbian "Ne mogu da dobijem stanje file-a '%-.200s' (errno: %d)"
+ slo "Nemem zisti stav '%-.200s' (chybov kd: %d)"
+ spa "No puedo obtener el estado de '%-.200s' (Error: %d)"
+ swe "Kan inte lsa filinformationen (stat) frn '%-.200s' (Felkod: %d)"
+ ukr " '%-.200s' (: %d)"
ER_CANT_GET_WD
cze "Chyba p-Bi zjiovn pracovn adres (chybov kd: %d)"
dan "Kan ikke lse aktive folder (Fejlkode: %d)"
@@ -350,55 +350,55 @@ ER_CANT_LOCK
swe "Kan inte lsa filen. (Felkod: %d)"
ukr " (: %d)"
ER_CANT_OPEN_FILE
- cze "Nemohu otev-Bt soubor '%-.64s' (chybov kd: %d)"
- dan "Kan ikke bne fil: '%-.64s' (Fejlkode: %d)"
- nla "Kan de file '%-.64s' niet openen (Errcode: %d)"
+ cze "Nemohu otev-Bt soubor '%-.200s' (chybov kd: %d)"
+ dan "Kan ikke bne fil: '%-.200s' (Fejlkode: %d)"
+ nla "Kan de file '%-.200s' niet openen (Errcode: %d)"
eng "Can't open file: '%-.200s' (errno: %d)"
- jps "'%-.64s' t@CJł܂ (errno: %d)",
- est "Ei suuda avada faili '%-.64s' (veakood: %d)"
- fre "Ne peut ouvrir le fichier: '%-.64s' (Errcode: %d)"
- ger "Kann Datei '%-.64s' nicht ffnen (Fehler: %d)"
- greek " : '%-.64s' ( : %d)"
- hun "A '%-.64s' file nem nyithato meg (hibakod: %d)"
- ita "Impossibile aprire il file: '%-.64s' (errno: %d)"
- jpn "'%-.64s' ե򳫤Ǥޤ (errno: %d)"
- kor "ȭ ߽ϴ.: '%-.64s' (ȣ: %d)"
- nor "Kan ikke pne fila: '%-.64s' (Feilkode: %d)"
- norwegian-ny "Kan ikkje pne fila: '%-.64s' (Feilkode: %d)"
- pol "Nie mona otworzy pliku: '%-.64s' (Kod bdu: %d)"
- por "No pode abrir o arquivo '%-.64s' (erro no. %d)"
- rum "Nu pot sa deschid fisierul: '%-.64s' (Eroare: %d)"
- rus " : '%-.64s' (: %d)"
- serbian "Ne mogu da otvorim file: '%-.64s' (errno: %d)"
- slo "Nemem otvori sbor: '%-.64s' (chybov kd: %d)"
- spa "No puedo abrir archivo: '%-.64s' (Error: %d)"
- swe "Kan inte anvnda '%-.64s' (Felkod: %d)"
- ukr " צ : '%-.64s' (: %d)"
+ jps "'%-.200s' t@CJł܂ (errno: %d)",
+ est "Ei suuda avada faili '%-.200s' (veakood: %d)"
+ fre "Ne peut ouvrir le fichier: '%-.200s' (Errcode: %d)"
+ ger "Kann Datei '%-.200s' nicht ffnen (Fehler: %d)"
+ greek " : '%-.200s' ( : %d)"
+ hun "A '%-.200s' file nem nyithato meg (hibakod: %d)"
+ ita "Impossibile aprire il file: '%-.200s' (errno: %d)"
+ jpn "'%-.200s' ե򳫤Ǥޤ (errno: %d)"
+ kor "ȭ ߽ϴ.: '%-.200s' (ȣ: %d)"
+ nor "Kan ikke pne fila: '%-.200s' (Feilkode: %d)"
+ norwegian-ny "Kan ikkje pne fila: '%-.200s' (Feilkode: %d)"
+ pol "Nie mona otworzy pliku: '%-.200s' (Kod bdu: %d)"
+ por "No pode abrir o arquivo '%-.200s' (erro no. %d)"
+ rum "Nu pot sa deschid fisierul: '%-.200s' (Eroare: %d)"
+ rus " : '%-.200s' (: %d)"
+ serbian "Ne mogu da otvorim file: '%-.200s' (errno: %d)"
+ slo "Nemem otvori sbor: '%-.200s' (chybov kd: %d)"
+ spa "No puedo abrir archivo: '%-.200s' (Error: %d)"
+ swe "Kan inte anvnda '%-.200s' (Felkod: %d)"
+ ukr " צ : '%-.200s' (: %d)"
ER_FILE_NOT_FOUND
- cze "Nemohu naj-Bt soubor '%-.64s' (chybov kd: %d)"
- dan "Kan ikke finde fila: '%-.64s' (Fejlkode: %d)"
- nla "Kan de file: '%-.64s' niet vinden (Errcode: %d)"
+ cze "Nemohu naj-Bt soubor '%-.200s' (chybov kd: %d)"
+ dan "Kan ikke finde fila: '%-.200s' (Fejlkode: %d)"
+ nla "Kan de file: '%-.200s' niet vinden (Errcode: %d)"
eng "Can't find file: '%-.200s' (errno: %d)"
- jps "'%-.64s' t@Ct鎖ł܂.(errno: %d)",
- est "Ei suuda leida faili '%-.64s' (veakood: %d)"
- fre "Ne peut trouver le fichier: '%-.64s' (Errcode: %d)"
- ger "Kann Datei '%-.64s' nicht finden (Fehler: %d)"
- greek " : '%-.64s' ( : %d)"
- hun "A(z) '%-.64s' file nem talalhato (hibakod: %d)"
- ita "Impossibile trovare il file: '%-.64s' (errno: %d)"
- jpn "'%-.64s' եդǤޤ.(errno: %d)"
- kor "ȭ ã ߽ϴ.: '%-.64s' (ȣ: %d)"
- nor "Kan ikke finne fila: '%-.64s' (Feilkode: %d)"
- norwegian-ny "Kan ikkje finne fila: '%-.64s' (Feilkode: %d)"
- pol "Nie mona znale pliku: '%-.64s' (Kod bdu: %d)"
- por "No pode encontrar o arquivo '%-.64s' (erro no. %d)"
- rum "Nu pot sa gasesc fisierul: '%-.64s' (Eroare: %d)"
- rus " : '%-.64s' (: %d)"
- serbian "Ne mogu da pronaem file: '%-.64s' (errno: %d)"
- slo "Nemem njs sbor: '%-.64s' (chybov kd: %d)"
- spa "No puedo encontrar archivo: '%-.64s' (Error: %d)"
- swe "Hittar inte filen '%-.64s' (Felkod: %d)"
- ukr " : '%-.64s' (: %d)"
+ jps "'%-.200s' t@Ct鎖ł܂.(errno: %d)",
+ est "Ei suuda leida faili '%-.200s' (veakood: %d)"
+ fre "Ne peut trouver le fichier: '%-.200s' (Errcode: %d)"
+ ger "Kann Datei '%-.200s' nicht finden (Fehler: %d)"
+ greek " : '%-.200s' ( : %d)"
+ hun "A(z) '%-.200s' file nem talalhato (hibakod: %d)"
+ ita "Impossibile trovare il file: '%-.200s' (errno: %d)"
+ jpn "'%-.200s' եդǤޤ.(errno: %d)"
+ kor "ȭ ã ߽ϴ.: '%-.200s' (ȣ: %d)"
+ nor "Kan ikke finne fila: '%-.200s' (Feilkode: %d)"
+ norwegian-ny "Kan ikkje finne fila: '%-.200s' (Feilkode: %d)"
+ pol "Nie mona znale pliku: '%-.200s' (Kod bdu: %d)"
+ por "No pode encontrar o arquivo '%-.200s' (erro no. %d)"
+ rum "Nu pot sa gasesc fisierul: '%-.200s' (Eroare: %d)"
+ rus " : '%-.200s' (: %d)"
+ serbian "Ne mogu da pronaem file: '%-.200s' (errno: %d)"
+ slo "Nemem njs sbor: '%-.200s' (chybov kd: %d)"
+ spa "No puedo encontrar archivo: '%-.200s' (Error: %d)"
+ swe "Hittar inte filen '%-.200s' (Felkod: %d)"
+ ukr " : '%-.200s' (: %d)"
ER_CANT_READ_DIR
cze "Nemohu -Bst adres '%-.64s' (chybov kd: %d)"
dan "Kan ikke lse folder '%-.64s' (Fejlkode: %d)"
@@ -480,7 +480,7 @@ ER_DISK_FULL
jps "Disk full (%s). N炷܂ł܂Ă...",
est "Ketas tis (%s). Ootame kuni tekib vaba ruumi..."
fre "Disque plein (%s). J'attend que quelqu'un libre de l'espace..."
- ger "Festplatte voll (%-.64s). Warte, bis jemand Platz schafft ..."
+ ger "Festplatte voll (%s). Warte, bis jemand Platz schafft ..."
greek " (%s). , ..."
hun "A lemez megtelt (%s)."
ita "Disco pieno (%s). In attesa che qualcuno liberi un po' di spazio..."
@@ -546,80 +546,80 @@ ER_ERROR_ON_CLOSE
swe "Fick fel vid stngning av '%-.64s' (Felkod: %d)"
ukr " '%-.64s' (: %d)"
ER_ERROR_ON_READ
- cze "Chyba p-Bi ten souboru '%-.64s' (chybov kd: %d)"
- dan "Fejl ved lsning af '%-.64s' (Fejlkode: %d)"
- nla "Fout bij het lezen van file '%-.64s' (Errcode: %d)"
+ cze "Chyba p-Bi ten souboru '%-.200s' (chybov kd: %d)"
+ dan "Fejl ved lsning af '%-.200s' (Fejlkode: %d)"
+ nla "Fout bij het lezen van file '%-.200s' (Errcode: %d)"
eng "Error reading file '%-.200s' (errno: %d)"
- jps "'%-.64s' t@C̓ǂݍ݃G[ (errno: %d)",
- est "Viga faili '%-.64s' lugemisel (veakood: %d)"
- fre "Erreur en lecture du fichier '%-.64s' (Errcode: %d)"
- ger "Fehler beim Lesen der Datei '%-.64s' (Fehler: %d)"
- greek " '%-.64s' ( : %d)"
- hun "Hiba a '%-.64s'file olvasasakor. (hibakod: %d)"
- ita "Errore durante la lettura del file '%-.64s' (errno: %d)"
- jpn "'%-.64s' եɤ߹ߥ顼 (errno: %d)"
- kor "'%-.64s'ȭ б (ȣ: %d)"
- nor "Feil ved lesing av '%-.64s' (Feilkode: %d)"
- norwegian-ny "Feil ved lesing av '%-.64s' (Feilkode: %d)"
- pol "B?d podczas odczytu pliku '%-.64s' (Kod bdu: %d)"
- por "Erro ao ler arquivo '%-.64s' (erro no. %d)"
- rum "Eroare citind fisierul '%-.64s' (errno: %d)"
- rus " '%-.64s' (: %d)"
- serbian "Greka pri itanju file-a '%-.64s' (errno: %d)"
- slo "Chyba pri tan sboru '%-.64s' (chybov kd: %d)"
- spa "Error leyendo el fichero '%-.64s' (Error: %d)"
- swe "Fick fel vid lsning av '%-.64s' (Felkod %d)"
- ukr " '%-.64s' (: %d)"
+ jps "'%-.200s' t@C̓ǂݍ݃G[ (errno: %d)",
+ est "Viga faili '%-.200s' lugemisel (veakood: %d)"
+ fre "Erreur en lecture du fichier '%-.200s' (Errcode: %d)"
+ ger "Fehler beim Lesen der Datei '%-.200s' (Fehler: %d)"
+ greek " '%-.200s' ( : %d)"
+ hun "Hiba a '%-.200s'file olvasasakor. (hibakod: %d)"
+ ita "Errore durante la lettura del file '%-.200s' (errno: %d)"
+ jpn "'%-.200s' եɤ߹ߥ顼 (errno: %d)"
+ kor "'%-.200s'ȭ б (ȣ: %d)"
+ nor "Feil ved lesing av '%-.200s' (Feilkode: %d)"
+ norwegian-ny "Feil ved lesing av '%-.200s' (Feilkode: %d)"
+ pol "B?d podczas odczytu pliku '%-.200s' (Kod bdu: %d)"
+ por "Erro ao ler arquivo '%-.200s' (erro no. %d)"
+ rum "Eroare citind fisierul '%-.200s' (errno: %d)"
+ rus " '%-.200s' (: %d)"
+ serbian "Greka pri itanju file-a '%-.200s' (errno: %d)"
+ slo "Chyba pri tan sboru '%-.200s' (chybov kd: %d)"
+ spa "Error leyendo el fichero '%-.200s' (Error: %d)"
+ swe "Fick fel vid lsning av '%-.200s' (Felkod %d)"
+ ukr " '%-.200s' (: %d)"
ER_ERROR_ON_RENAME
- cze "Chyba p-Bi pejmenovn '%-.64s' na '%-.64s' (chybov kd: %d)"
- dan "Fejl ved omdbning af '%-.64s' til '%-.64s' (Fejlkode: %d)"
- nla "Fout bij het hernoemen van '%-.64s' naar '%-.64s' (Errcode: %d)"
+ cze "Chyba p-Bi pejmenovn '%-.150s' na '%-.150s' (chybov kd: %d)"
+ dan "Fejl ved omdbning af '%-.150s' til '%-.150s' (Fejlkode: %d)"
+ nla "Fout bij het hernoemen van '%-.150s' naar '%-.150s' (Errcode: %d)"
eng "Error on rename of '%-.150s' to '%-.150s' (errno: %d)"
- jps "'%-.64s' '%-.64s' rename ł܂ (errno: %d)",
- est "Viga faili '%-.64s' mbernimetamisel '%-.64s'-ks (veakood: %d)"
- fre "Erreur en renommant '%-.64s' en '%-.64s' (Errcode: %d)"
- ger "Fehler beim Umbenennen von '%-.64s' in '%-.64s' (Fehler: %d)"
- greek " '%-.64s' to '%-.64s' ( : %d)"
- hun "Hiba a '%-.64s' file atnevezesekor. (hibakod: %d)"
- ita "Errore durante la rinominazione da '%-.64s' a '%-.64s' (errno: %d)"
- jpn "'%-.64s' '%-.64s' rename Ǥޤ (errno: %d)"
- kor "'%-.64s' '%-.64s' ̸ (ȣ: %d)"
- nor "Feil ved omdping av '%-.64s' til '%-.64s' (Feilkode: %d)"
- norwegian-ny "Feil ved omdyping av '%-.64s' til '%-.64s' (Feilkode: %d)"
- pol "B?d podczas zmieniania nazwy '%-.64s' na '%-.64s' (Kod bdu: %d)"
- por "Erro ao renomear '%-.64s' para '%-.64s' (erro no. %d)"
- rum "Eroare incercind sa renumesc '%-.64s' in '%-.64s' (errno: %d)"
- rus " '%-.64s' '%-.64s' (: %d)"
- serbian "Greka pri promeni imena '%-.64s' na '%-.64s' (errno: %d)"
- slo "Chyba pri premenovvan '%-.64s' na '%-.64s' (chybov kd: %d)"
- spa "Error en el renombrado de '%-.64s' a '%-.64s' (Error: %d)"
- swe "Kan inte byta namn frn '%-.64s' till '%-.64s' (Felkod: %d)"
- ukr " '%-.64s' '%-.64s' (: %d)"
+ jps "'%-.150s' '%-.150s' rename ł܂ (errno: %d)",
+ est "Viga faili '%-.150s' mbernimetamisel '%-.150s'-ks (veakood: %d)"
+ fre "Erreur en renommant '%-.150s' en '%-.150s' (Errcode: %d)"
+ ger "Fehler beim Umbenennen von '%-.150s' in '%-.150s' (Fehler: %d)"
+ greek " '%-.150s' to '%-.150s' ( : %d)"
+ hun "Hiba a '%-.150s' file atnevezesekor '%-.150s'. (hibakod: %d)"
+ ita "Errore durante la rinominazione da '%-.150s' a '%-.150s' (errno: %d)"
+ jpn "'%-.150s' '%-.150s' rename Ǥޤ (errno: %d)"
+ kor "'%-.150s' '%-.150s' ̸ (ȣ: %d)"
+ nor "Feil ved omdping av '%-.150s' til '%-.150s' (Feilkode: %d)"
+ norwegian-ny "Feil ved omdyping av '%-.150s' til '%-.150s' (Feilkode: %d)"
+ pol "B?d podczas zmieniania nazwy '%-.150s' na '%-.150s' (Kod bdu: %d)"
+ por "Erro ao renomear '%-.150s' para '%-.150s' (erro no. %d)"
+ rum "Eroare incercind sa renumesc '%-.150s' in '%-.150s' (errno: %d)"
+ rus " '%-.150s' '%-.150s' (: %d)"
+ serbian "Greka pri promeni imena '%-.150s' na '%-.150s' (errno: %d)"
+ slo "Chyba pri premenovvan '%-.150s' na '%-.150s' (chybov kd: %d)"
+ spa "Error en el renombrado de '%-.150s' a '%-.150s' (Error: %d)"
+ swe "Kan inte byta namn frn '%-.150s' till '%-.150s' (Felkod: %d)"
+ ukr " '%-.150s' '%-.150s' (: %d)"
ER_ERROR_ON_WRITE
- cze "Chyba p-Bi zpisu do souboru '%-.64s' (chybov kd: %d)"
- dan "Fejl ved skriving av filen '%-.64s' (Fejlkode: %d)"
- nla "Fout bij het wegschrijven van file '%-.64s' (Errcode: %d)"
+ cze "Chyba p-Bi zpisu do souboru '%-.200s' (chybov kd: %d)"
+ dan "Fejl ved skriving av filen '%-.200s' (Fejlkode: %d)"
+ nla "Fout bij het wegschrijven van file '%-.200s' (Errcode: %d)"
eng "Error writing file '%-.200s' (errno: %d)"
- jps "'%-.64s' t@Cł܂ (errno: %d)",
- est "Viga faili '%-.64s' kirjutamisel (veakood: %d)"
- fre "Erreur d'criture du fichier '%-.64s' (Errcode: %d)"
- ger "Fehler beim Speichern der Datei '%-.64s' (Fehler: %d)"
- greek " '%-.64s' ( : %d)"
- hun "Hiba a '%-.64s' file irasakor. (hibakod: %d)"
- ita "Errore durante la scrittura del file '%-.64s' (errno: %d)"
- jpn "'%-.64s' ե񤯻Ǥޤ (errno: %d)"
- kor "'%-.64s'ȭ (ȣ: %d)"
- nor "Feil ved skriving av fila '%-.64s' (Feilkode: %d)"
- norwegian-ny "Feil ved skriving av fila '%-.64s' (Feilkode: %d)"
- pol "B?d podczas zapisywania pliku '%-.64s' (Kod bdu: %d)"
- por "Erro ao gravar arquivo '%-.64s' (erro no. %d)"
- rum "Eroare scriind fisierul '%-.64s' (errno: %d)"
- rus " '%-.64s' (: %d)"
- serbian "Greka pri upisu '%-.64s' (errno: %d)"
- slo "Chyba pri zpise do sboru '%-.64s' (chybov kd: %d)"
- spa "Error escribiendo el archivo '%-.64s' (Error: %d)"
- swe "Fick fel vid skrivning till '%-.64s' (Felkod %d)"
- ukr " '%-.64s' (: %d)"
+ jps "'%-.200s' t@Cł܂ (errno: %d)",
+ est "Viga faili '%-.200s' kirjutamisel (veakood: %d)"
+ fre "Erreur d'criture du fichier '%-.200s' (Errcode: %d)"
+ ger "Fehler beim Speichern der Datei '%-.200s' (Fehler: %d)"
+ greek " '%-.200s' ( : %d)"
+ hun "Hiba a '%-.200s' file irasakor. (hibakod: %d)"
+ ita "Errore durante la scrittura del file '%-.200s' (errno: %d)"
+ jpn "'%-.200s' ե񤯻Ǥޤ (errno: %d)"
+ kor "'%-.200s'ȭ (ȣ: %d)"
+ nor "Feil ved skriving av fila '%-.200s' (Feilkode: %d)"
+ norwegian-ny "Feil ved skriving av fila '%-.200s' (Feilkode: %d)"
+ pol "B?d podczas zapisywania pliku '%-.200s' (Kod bdu: %d)"
+ por "Erro ao gravar arquivo '%-.200s' (erro no. %d)"
+ rum "Eroare scriind fisierul '%-.200s' (errno: %d)"
+ rus " '%-.200s' (: %d)"
+ serbian "Greka pri upisu '%-.200s' (errno: %d)"
+ slo "Chyba pri zpise do sboru '%-.200s' (chybov kd: %d)"
+ spa "Error escribiendo el archivo '%-.200s' (Error: %d)"
+ swe "Fick fel vid skrivning till '%-.200s' (Felkod %d)"
+ ukr " '%-.200s' (: %d)"
ER_FILE_USED
cze "'%-.64s' je zam-Ben proti zmnm"
dan "'%-.64s' er lst mod opdateringer"
@@ -741,7 +741,7 @@ ER_ILLEGAL_HA
serbian "Handler tabela za '%-.64s' nema ovu opciju"
slo "Obsluha tabuky '%-.64s' nem tento parameter"
spa "El manejador de la tabla de '%-.64s' no tiene esta opcion"
- swe "Registrets databas har inte denna facilitet"
+ swe "Tabellhanteraren for tabell '%-.64s' stdjer ej detta"
ukr " æ '%-.64s' æ Ԧ"
ER_KEY_NOT_FOUND
cze "Nemohu naj-Bt zznam v '%-.64s'"
@@ -766,58 +766,58 @@ ER_KEY_NOT_FOUND
serbian "Ne mogu da pronaem slog u '%-.64s'"
slo "Nemem njs zznam v '%-.64s'"
spa "No puedo encontrar el registro en '%-.64s'"
- swe "Hittar inte posten"
+ swe "Hittar inte posten '%-.64s'"
ukr " '%-.64s'"
ER_NOT_FORM_FILE
- cze "Nespr-Bvn informace v souboru '%-.64s'"
- dan "Forkert indhold i: '%-.64s'"
- nla "Verkeerde info in file: '%-.64s'"
+ cze "Nespr-Bvn informace v souboru '%-.200s'"
+ dan "Forkert indhold i: '%-.200s'"
+ nla "Verkeerde info in file: '%-.200s'"
eng "Incorrect information in file: '%-.200s'"
- jps "t@C '%-.64s' info ԈĂ悤ł",
- est "Vigane informatsioon failis '%-.64s'"
- fre "Information erronne dans le fichier: '%-.64s'"
- ger "Falsche Information in Datei '%-.64s'"
- greek " : '%-.64s'"
- hun "Ervenytelen info a file-ban: '%-.64s'"
- ita "Informazione errata nel file: '%-.64s'"
- jpn "ե '%-.64s' info ְäƤ褦Ǥ"
- kor "ȭ Ȯ : '%-.64s'"
- nor "Feil informasjon i filen: '%-.64s'"
- norwegian-ny "Feil informasjon i fila: '%-.64s'"
- pol "Niewa?ciwa informacja w pliku: '%-.64s'"
- por "Informao incorreta no arquivo '%-.64s'"
- rum "Informatie incorecta in fisierul: '%-.64s'"
- rus " '%-.64s'"
- serbian "Pogrena informacija u file-u: '%-.64s'"
- slo "Nesprvna informcia v sbore: '%-.64s'"
- spa "Informacion erronea en el archivo: '%-.64s'"
- swe "Felaktig fil: '%-.64s'"
- ukr " æ ̦: '%-.64s'"
+ jps "t@C '%-.200s' info ԈĂ悤ł",
+ est "Vigane informatsioon failis '%-.200s'"
+ fre "Information erronne dans le fichier: '%-.200s'"
+ ger "Falsche Information in Datei '%-.200s'"
+ greek " : '%-.200s'"
+ hun "Ervenytelen info a file-ban: '%-.200s'"
+ ita "Informazione errata nel file: '%-.200s'"
+ jpn "ե '%-.200s' info ְäƤ褦Ǥ"
+ kor "ȭ Ȯ : '%-.200s'"
+ nor "Feil informasjon i filen: '%-.200s'"
+ norwegian-ny "Feil informasjon i fila: '%-.200s'"
+ pol "Niewa?ciwa informacja w pliku: '%-.200s'"
+ por "Informao incorreta no arquivo '%-.200s'"
+ rum "Informatie incorecta in fisierul: '%-.200s'"
+ rus " '%-.200s'"
+ serbian "Pogrena informacija u file-u: '%-.200s'"
+ slo "Nesprvna informcia v sbore: '%-.200s'"
+ spa "Informacion erronea en el archivo: '%-.200s'"
+ swe "Felaktig fil: '%-.200s'"
+ ukr " æ ̦: '%-.200s'"
ER_NOT_KEYFILE
- cze "Nespr-Bvn kl pro tabulku '%-.64s'; pokuste se ho opravit"
- dan "Fejl i indeksfilen til tabellen '%-.64s'; prv at reparere den"
- nla "Verkeerde zoeksleutel file voor tabel: '%-.64s'; probeer het te repareren"
+ cze "Nespr-Bvn kl pro tabulku '%-.200s'; pokuste se ho opravit"
+ dan "Fejl i indeksfilen til tabellen '%-.200s'; prv at reparere den"
+ nla "Verkeerde zoeksleutel file voor tabel: '%-.200s'; probeer het te repareren"
eng "Incorrect key file for table '%-.200s'; try to repair it"
- jps "'%-.64s' e[u key file ԈĂ悤ł. CĂ",
- est "Tabeli '%-.64s' vtmefail on vigane; proovi seda parandada"
- fre "Index corrompu dans la table: '%-.64s'; essayez de le rparer"
- ger "Fehlerhafte Index-Datei fr Tabelle '%-.64s'; versuche zu reparieren"
- greek " (key file) : '%-.64s'; , !"
- hun "Ervenytelen kulcsfile a tablahoz: '%-.64s'; probalja kijavitani!"
- ita "File chiave errato per la tabella : '%-.64s'; prova a riparalo"
- jpn "'%-.64s' ơ֥ key file ְäƤ褦Ǥ. 򤷤Ƥ"
- kor "'%-.64s' ̺ Ȯ Ű . Ͻÿ!"
- nor "Tabellen '%-.64s' har feil i nkkelfilen; forsk reparer den"
- norwegian-ny "Tabellen '%-.64s' har feil i nykkelfila; prv reparere den"
- pol "Niewa?ciwy plik kluczy dla tabeli: '%-.64s'; sprbuj go naprawi"
- por "Arquivo de ndice incorreto para tabela '%-.64s'; tente repar-lo"
- rum "Cheia fisierului incorecta pentru tabela: '%-.64s'; incearca s-o repari"
- rus " : '%-.64s'. "
- serbian "Pogrean key file za tabelu: '%-.64s'; probajte da ga ispravite"
- slo "Nesprvny k pre tabuku '%-.64s'; pokste sa ho opravi"
- spa "Clave de archivo erronea para la tabla: '%-.64s'; intente repararlo"
- swe "Fatalt fel vid hantering av register '%-.64s'; kr en reparation"
- ukr " æ: '%-.64s'; צ"
+ jps "'%-.200s' e[u key file ԈĂ悤ł. CĂ",
+ est "Tabeli '%-.200s' vtmefail on vigane; proovi seda parandada"
+ fre "Index corrompu dans la table: '%-.200s'; essayez de le rparer"
+ ger "Fehlerhafte Index-Datei fr Tabelle '%-.200s'; versuche zu reparieren"
+ greek " (key file) : '%-.200s'; , !"
+ hun "Ervenytelen kulcsfile a tablahoz: '%-.200s'; probalja kijavitani!"
+ ita "File chiave errato per la tabella : '%-.200s'; prova a riparalo"
+ jpn "'%-.200s' ơ֥ key file ְäƤ褦Ǥ. 򤷤Ƥ"
+ kor "'%-.200s' ̺ Ȯ Ű . Ͻÿ!"
+ nor "Tabellen '%-.200s' har feil i nkkelfilen; forsk reparer den"
+ norwegian-ny "Tabellen '%-.200s' har feil i nykkelfila; prv reparere den"
+ pol "Niewa?ciwy plik kluczy dla tabeli: '%-.200s'; sprbuj go naprawi"
+ por "Arquivo de ndice incorreto para tabela '%-.200s'; tente repar-lo"
+ rum "Cheia fisierului incorecta pentru tabela: '%-.200s'; incearca s-o repari"
+ rus " : '%-.200s'. "
+ serbian "Pogrean key file za tabelu: '%-.200s'; probajte da ga ispravite"
+ slo "Nesprvny k pre tabuku '%-.200s'; pokste sa ho opravi"
+ spa "Clave de archivo erronea para la tabla: '%-.200s'; intente repararlo"
+ swe "Fatalt fel vid hantering av register '%-.200s'; kr en reparation"
+ ukr " æ: '%-.200s'; צ"
ER_OLD_KEYFILE
cze "Star-B klov soubor pro '%-.64s'; opravte ho."
dan "Gammel indeksfil for tabellen '%-.64s'; reparer den"
@@ -1072,7 +1072,7 @@ ER_ACCESS_DENIED_ERROR 28000
jps "[U[ '%-.32s'@'%-.64s' ۂ܂.uUsing password: %s)",
est "Ligips keelatud kasutajale '%-.32s'@'%-.64s' (kasutab parooli: %s)"
fre "Accs refus pour l'utilisateur: '%-.32s'@'@%-.64s' (mot de passe: %s)"
- ger "Benutzer '%-.32s'@'%-.64s' hat keine Zugriffsberechtigung (verwendetes Passwort: %-.64s)"
+ ger "Benutzer '%-.32s'@'%-.64s' hat keine Zugriffsberechtigung (verwendetes Passwort: %s)"
greek " : '%-.32s'@'%-.64s' ( password: %s)"
hun "A(z) '%-.32s'@'%-.64s' felhasznalo szamara tiltott eleres. (Hasznalja a jelszot: %s)"
ita "Accesso non consentito per l'utente: '%-.32s'@'%-.64s' (Password: %s)"
@@ -1239,28 +1239,28 @@ ER_BAD_TABLE_ERROR 42S02
swe "Oknd tabell '%-.100s'"
ukr "צ '%-.100s'"
ER_NON_UNIQ_ERROR 23000
- cze "Sloupec '%-.64s' v %s nen-B zcela jasn"
- dan "Felt: '%-.64s' i tabel %s er ikke entydigt"
- nla "Kolom: '%-.64s' in %s is niet eenduidig"
+ cze "Sloupec '%-.64s' v %-.64s nen-B zcela jasn"
+ dan "Felt: '%-.64s' i tabel %-.64s er ikke entydigt"
+ nla "Kolom: '%-.64s' in %-.64s is niet eenduidig"
eng "Column '%-.64s' in %-.64s is ambiguous"
est "Vli '%-.64s' %-.64s-s ei ole hene"
- fre "Champ: '%-.64s' dans %s est ambigu"
+ fre "Champ: '%-.64s' dans %-.64s est ambigu"
ger "Feld '%-.64s' in %-.64s ist nicht eindeutig"
greek " : '%-.64s' %-.64s "
hun "A(z) '%-.64s' oszlop %-.64s-ben ketertelmu"
ita "Colonna: '%-.64s' di %-.64s e` ambigua"
jpn "Column: '%-.64s' in %-.64s is ambiguous"
kor "Į: '%-.64s' in '%-.64s' ȣ"
- nor "Felt: '%-.64s' i tabell %s er ikke entydig"
- norwegian-ny "Kolonne: '%-.64s' i tabell %s er ikkje eintydig"
- pol "Kolumna: '%-.64s' w %s jest dwuznaczna"
+ nor "Felt: '%-.64s' i tabell %-.64s er ikke entydig"
+ norwegian-ny "Kolonne: '%-.64s' i tabell %-.64s er ikkje eintydig"
+ pol "Kolumna: '%-.64s' w %-.64s jest dwuznaczna"
por "Coluna '%-.64s' em '%-.64s' ambgua"
rum "Coloana: '%-.64s' in %-.64s este ambigua"
rus " '%-.64s' %-.64s "
serbian "Kolona '%-.64s' u %-.64s nije jedinstvena u kontekstu"
slo "Pole: '%-.64s' v %-.64s je nejasn"
- spa "La columna: '%-.64s' en %s es ambigua"
- swe "Kolumn '%-.64s' i %s r inte unik"
+ spa "La columna: '%-.64s' en %-.64s es ambigua"
+ swe "Kolumn '%-.64s' i %-.64s r inte unik"
ukr " '%-.64s' %-.64s "
ER_SERVER_SHUTDOWN 08S01
cze "Prob-Bh ukonovn prce serveru"
@@ -1288,29 +1288,29 @@ ER_SERVER_SHUTDOWN 08S01
swe "Servern gr nu ned"
ukr "դ "
ER_BAD_FIELD_ERROR 42S22 S0022
- cze "Nezn-Bm sloupec '%-.64s' v %s"
- dan "Ukendt kolonne '%-.64s' i tabel %s"
- nla "Onbekende kolom '%-.64s' in %s"
+ cze "Nezn-Bm sloupec '%-.64s' v %-.64s"
+ dan "Ukendt kolonne '%-.64s' i tabel %-.64s"
+ nla "Onbekende kolom '%-.64s' in %-.64s"
eng "Unknown column '%-.64s' in '%-.64s'"
jps "'%-.64s' column '%-.64s' ɂ͂܂.",
est "Tundmatu tulp '%-.64s' '%-.64s'-s"
- fre "Champ '%-.64s' inconnu dans %s"
+ fre "Champ '%-.64s' inconnu dans %-.64s"
ger "Unbekanntes Tabellenfeld '%-.64s' in %-.64s"
greek " '%-.64s' '%-.64s'"
hun "A(z) '%-.64s' oszlop ervenytelen '%-.64s'-ben"
ita "Colonna sconosciuta '%-.64s' in '%-.64s'"
jpn "'%-.64s' column '%-.64s' ˤϤޤ."
kor "Unknown Į '%-.64s' in '%-.64s'"
- nor "Ukjent kolonne '%-.64s' i tabell %s"
- norwegian-ny "Ukjent felt '%-.64s' i tabell %s"
- pol "Nieznana kolumna '%-.64s' w %s"
+ nor "Ukjent kolonne '%-.64s' i tabell %-.64s"
+ norwegian-ny "Ukjent felt '%-.64s' i tabell %-.64s"
+ pol "Nieznana kolumna '%-.64s' w %-.64s"
por "Coluna '%-.64s' desconhecida em '%-.64s'"
rum "Coloana invalida '%-.64s' in '%-.64s'"
rus " '%-.64s' '%-.64s'"
serbian "Nepoznata kolona '%-.64s' u '%-.64s'"
slo "Neznme pole '%-.64s' v '%-.64s'"
- spa "La columna '%-.64s' en %s es desconocida"
- swe "Oknd kolumn '%-.64s' i %s"
+ spa "La columna '%-.64s' en %-.64s es desconocida"
+ swe "Oknd kolumn '%-.64s' i %-.64s"
ukr "צ '%-.64s' '%-.64s'"
ER_WRONG_FIELD_WITH_GROUP 42000 S1009
cze "Pou-Bit '%-.64s' nebylo v group by"
@@ -1404,29 +1404,29 @@ ER_WRONG_VALUE_COUNT 21S01
swe "Antalet kolumner motsvarar inte antalet vrden"
ukr "˦ æ Ц ˦˦ "
ER_TOO_LONG_IDENT 42000 S1009
- cze "Jm-Bno identifiktoru '%-.64s' je pli dlouh"
- dan "Navnet '%-.64s' er for langt"
- nla "Naam voor herkenning '%-.64s' is te lang"
+ cze "Jm-Bno identifiktoru '%-.100s' je pli dlouh"
+ dan "Navnet '%-.100s' er for langt"
+ nla "Naam voor herkenning '%-.100s' is te lang"
eng "Identifier name '%-.100s' is too long"
jps "Identifier name '%-.100s' ͒܂",
est "Identifikaatori '%-.100s' nimi on liiga pikk"
- fre "Le nom de l'identificateur '%-.64s' est trop long"
+ fre "Le nom de l'identificateur '%-.100s' est trop long"
ger "Name des Bezeichners '%-.100s' ist zu lang"
greek " identifier name '%-.100s' "
hun "A(z) '%-.100s' azonositonev tul hosszu."
ita "Il nome dell'identificatore '%-.100s' e` troppo lungo"
jpn "Identifier name '%-.100s' Ĺޤ"
kor "Identifier '%-.100s' ʹ 決."
- nor "Identifikator '%-.64s' er for lang"
- norwegian-ny "Identifikator '%-.64s' er for lang"
- pol "Nazwa identyfikatora '%-.64s' jest zbyt duga"
+ nor "Identifikator '%-.100s' er for lang"
+ norwegian-ny "Identifikator '%-.100s' er for lang"
+ pol "Nazwa identyfikatora '%-.100s' jest zbyt duga"
por "Nome identificador '%-.100s' longo demais"
rum "Numele indentificatorului '%-.100s' este prea lung"
rus " '%-.100s'"
serbian "Ime '%-.100s' je predugako"
slo "Meno identifiktora '%-.100s' je prli dlh"
- spa "El nombre del identificador '%-.64s' es demasiado grande"
- swe "Kolumnnamn '%-.64s' r fr lngt"
+ spa "El nombre del identificador '%-.100s' es demasiado grande"
+ swe "Kolumnnamn '%-.100s' r fr lngt"
ukr "' Ʀ '%-.100s' "
ER_DUP_FIELDNAME 42S21 S1009
cze "Zdvojen-B jmno sloupce '%-.64s'"
@@ -1479,7 +1479,7 @@ ER_DUP_KEYNAME 42000 S1009
swe "Nyckelnamn '%-.64s' finns flera gnger"
ukr " ' '%-.64s'"
ER_DUP_ENTRY 23000 S1009
- cze "Zvojen-B kl '%-.64s' (slo kle %d)"
+ cze "Zdvojen-B kl '%-.64s' (slo kle %d)"
dan "Ens vrdier '%-.64s' for indeks %d"
nla "Dubbele ingang '%-.64s' voor zoeksleutel %d"
eng "Duplicate entry '%-.64s' for key %d"
@@ -1526,30 +1526,30 @@ ER_WRONG_FIELD_SPEC 42000 S1009
spa "Especificador de columna erroneo para la columna '%-.64s'"
swe "Felaktigt kolumntyp fr kolumn '%-.64s'"
ukr "צ Ʀ '%-.64s'"
-ER_PARSE_ERROR 42000
- cze "%s bl-Bzko '%-.64s' na dku %d"
- dan "%s nr '%-.64s' p linje %d"
- nla "%s bij '%-.64s' in regel %d"
+ER_PARSE_ERROR 42000 s1009
+ cze "%s bl-Bzko '%-.80s' na dku %d"
+ dan "%s nr '%-.80s' p linje %d"
+ nla "%s bij '%-.80s' in regel %d"
eng "%s near '%-.80s' at line %d"
jps "%s : '%-.80s' t : %d s",
est "%s '%-.80s' ligidal real %d"
- fre "%s prs de '%-.64s' la ligne %d"
+ fre "%s prs de '%-.80s' la ligne %d"
ger "%s bei '%-.80s' in Zeile %d"
greek "%s '%-.80s' %d"
hun "A %s a '%-.80s'-hez kozeli a %d sorban"
ita "%s vicino a '%-.80s' linea %d"
jpn "%s : '%-.80s' ն : %d "
- kor "'%-.64s' ϴ. ('%-.80s' ɾ %d)"
- nor "%s nr '%-.64s' p linje %d"
- norwegian-ny "%s attmed '%-.64s' p line %d"
- pol "%s obok '%-.64s' w linii %d"
+ kor "'%s' ϴ. ('%-.80s' ɾ %d)"
+ nor "%s nr '%-.80s' p linje %d"
+ norwegian-ny "%s attmed '%-.80s' p line %d"
+ pol "%s obok '%-.80s' w linii %d"
por "%s prximo a '%-.80s' na linha %d"
rum "%s linga '%-.80s' pe linia %d"
rus "%s '%-.80s' %d"
serbian "'%s' u iskazu '%-.80s' na liniji %d"
slo "%s blzko '%-.80s' na riadku %d"
- spa "%s cerca '%-.64s' en la linea %d"
- swe "%s nra '%-.64s' p rad %d"
+ spa "%s cerca '%-.80s' en la linea %d"
+ swe "%s nra '%-.80s' p rad %d"
ukr "%s ¦ '%-.80s' æ %d"
ER_EMPTY_QUERY 42000
cze "V-Bsledek dotazu je przdn"
@@ -1821,30 +1821,30 @@ ER_WRONG_AUTO_KEY 42000 S1009
swe "Det fr finnas endast ett AUTO_INCREMENT-flt och detta mste vara en nyckel"
ukr "צ æ; , "
ER_READY
- cze "%s: p-Bipraven na spojen"
- dan "%s: klar til tilslutninger"
- nla "%s: klaar voor verbindingen"
+ cze "%s: p-Bipraven na spojen\nVersion: '%s' socket: '%s' port: %d""
+ dan "%s: klar til tilslutninger\nVersion: '%s' socket: '%s' port: %d""
+ nla "%s: klaar voor verbindingen\nVersion: '%s' socket: '%s' port: %d""
eng "%s: ready for connections.\nVersion: '%s' socket: '%s' port: %d"
- jps "%s: ",
- est "%s: ootab hendusi"
- fre "%s: Prt pour des connexions"
- ger "%-.64s: Bereit fr Verbindungen.\nVersion: '%2' Socket: '%s' Port: %d"
- greek "%s: "
- hun "%s: kapcsolatra kesz"
- ita "%s: Pronto per le connessioni\n"
- jpn "%s: λ"
- kor "%s: غԴϴ"
- nor "%s: klar for tilkoblinger"
- norwegian-ny "%s: klar for tilkoblingar"
- pol "%s: gotowe do po?czenia"
- por "%s: Pronto para conexes"
- rum "%s: sint gata pentru conectii"
- rus "%s: .\n: '%s' : '%s' : %d %s"
- serbian "%s: Spreman za konekcije\n"
- slo "%s: pripraven na spojenie"
- spa "%s: preparado para conexiones"
- swe "%s: klar att ta emot klienter"
- ukr "%s: '!"
+ jps "%s: \nVersion: '%s' socket: '%s' port: %d"",
+ est "%s: ootab hendusi\nVersion: '%s' socket: '%s' port: %d""
+ fre "%s: Prt pour des connexions\nVersion: '%s' socket: '%s' port: %d""
+ ger "%s: Bereit fr Verbindungen.\nVersion: '%s' Socket: '%s' Port: %d"
+ greek "%s: \nVersion: '%s' socket: '%s' port: %d""
+ hun "%s: kapcsolatra kesz\nVersion: '%s' socket: '%s' port: %d""
+ ita "%s: Pronto per le connessioni\nVersion: '%s' socket: '%s' port: %d""
+ jpn "%s: λ\nVersion: '%s' socket: '%s' port: %d""
+ kor "%s: غԴϴ\nVersion: '%s' socket: '%s' port: %d""
+ nor "%s: klar for tilkoblinger\nVersion: '%s' socket: '%s' port: %d""
+ norwegian-ny "%s: klar for tilkoblingar\nVersion: '%s' socket: '%s' port: %d""
+ pol "%s: gotowe do po?czenia\nVersion: '%s' socket: '%s' port: %d""
+ por "%s: Pronto para conexes\nVersion: '%s' socket: '%s' port: %d""
+ rum "%s: sint gata pentru conectii\nVersion: '%s' socket: '%s' port: %d""
+ rus "%s: .\n: '%s' : '%s' : %d"
+ serbian "%s: Spreman za konekcije\nVersion: '%s' socket: '%s' port: %d""
+ slo "%s: pripraven na spojenie\nVersion: '%s' socket: '%s' port: %d""
+ spa "%s: preparado para conexiones\nVersion: '%s' socket: '%s' port: %d""
+ swe "%s: klar att ta emot klienter\nVersion: '%s' socket: '%s' port: %d""
+ ukr "%s: '!\nVersion: '%s' socket: '%s' port: %d""
ER_NORMAL_SHUTDOWN
cze "%s: norm-Bln ukonen\n"
dan "%s: Normal nedlukning\n"
@@ -1852,7 +1852,7 @@ ER_NORMAL_SHUTDOWN
eng "%s: Normal shutdown\n"
est "%s: MySQL lpetas\n"
fre "%s: Arrt normal du serveur\n"
- ger "%-.64s: Normal heruntergefahren\n"
+ ger "%s: Normal heruntergefahren\n"
greek "%s: shutdown\n"
hun "%s: Normal leallitas\n"
ita "%s: Shutdown normale\n"
@@ -1876,7 +1876,7 @@ ER_GOT_SIGNAL
jps "%s: Got signal %d. f!\n",
est "%s: sain signaali %d. Lpetan!\n"
fre "%s: Reu le signal %d. Abandonne!\n"
- ger "%-.64s: Signal %d erhalten. Abbruch!\n"
+ ger "%s: Signal %d erhalten. Abbruch!\n"
greek "%s: %d. !\n"
hun "%s: %d jelzes. Megszakitva!\n"
ita "%s: Ricevuto segnale %d. Interruzione!\n"
@@ -1901,7 +1901,7 @@ ER_SHUTDOWN_COMPLETE
jps "%s: Shutdown \n",
est "%s: Lpp\n"
fre "%s: Arrt du serveur termin\n"
- ger "%-.64s: Herunterfahren beendet\n"
+ ger "%s: Herunterfahren beendet\n"
greek "%s: Shutdown \n"
hun "%s: A leallitas kesz\n"
ita "%s: Shutdown completato\n"
@@ -1919,29 +1919,29 @@ ER_SHUTDOWN_COMPLETE
swe "%s: Avslutning klar\n"
ukr "%s: \n"
ER_FORCING_CLOSE 08S01
- cze "%s: n-Bsiln uzaven threadu %ld uivatele '%-.64s'\n"
- dan "%s: Forceret nedlukning af trd: %ld bruger: '%-.64s'\n"
- nla "%s: Afsluiten afgedwongen van thread %ld gebruiker: '%-.64s'\n"
+ cze "%s: n-Bsiln uzaven threadu %ld uivatele '%-.32s'\n"
+ dan "%s: Forceret nedlukning af trd: %ld bruger: '%-.32s'\n"
+ nla "%s: Afsluiten afgedwongen van thread %ld gebruiker: '%-.32s'\n"
eng "%s: Forcing close of thread %ld user: '%-.32s'\n"
- jps "%s: Xbh %ld I user: '%-.64s'\n",
+ jps "%s: Xbh %ld I user: '%-.32s'\n",
est "%s: Sulgen juga lime %ld kasutaja: '%-.32s'\n"
- fre "%s: Arrt forc de la tche (thread) %ld utilisateur: '%-.64s'\n"
+ fre "%s: Arrt forc de la tche (thread) %ld utilisateur: '%-.32s'\n"
ger "%s: Thread %ld zwangsweise beendet. Benutzer: '%-.32s'\n"
- greek "%s: thread %ld user: '%-.64s'\n"
- hun "%s: A(z) %ld thread kenyszeritett zarasa. Felhasznalo: '%-.64s'\n"
- ita "%s: Forzata la chiusura del thread %ld utente: '%-.64s'\n"
- jpn "%s: å %ld λ user: '%-.64s'\n"
- kor "%s: thread %ld user: '%-.64s'\n"
- nor "%s: Ptvinget avslutning av trd %ld bruker: '%-.64s'\n"
- norwegian-ny "%s: Ptvinga avslutning av trd %ld brukar: '%-.64s'\n"
- pol "%s: Wymuszenie zamknicia w?tku %ld uytkownik: '%-.64s'\n"
+ greek "%s: thread %ld user: '%-.32s'\n"
+ hun "%s: A(z) %ld thread kenyszeritett zarasa. Felhasznalo: '%-.32s'\n"
+ ita "%s: Forzata la chiusura del thread %ld utente: '%-.32s'\n"
+ jpn "%s: å %ld λ user: '%-.32s'\n"
+ kor "%s: thread %ld user: '%-.32s'\n"
+ nor "%s: Ptvinget avslutning av trd %ld bruker: '%-.32s'\n"
+ norwegian-ny "%s: Ptvinga avslutning av trd %ld brukar: '%-.32s'\n"
+ pol "%s: Wymuszenie zamknicia w?tku %ld uytkownik: '%-.32s'\n"
por "%s: Forando finalizao da 'thread' %ld - usurio '%-.32s'\n"
rum "%s: Terminare fortata a thread-ului %ld utilizatorului: '%-.32s'\n"
rus "%s: %ld : '%-.32s'\n"
serbian "%s: Usiljeno gaenje thread-a %ld koji pripada korisniku: '%-.32s'\n"
- slo "%s: nsiln ukonenie vlkna %ld uvatea '%-.64s'\n"
- spa "%s: Forzando a cerrar el thread %ld usuario: '%-.64s'\n"
- swe "%s: Stnger av trd %ld; anvndare: '%-.64s'\n"
+ slo "%s: nsiln ukonenie vlkna %ld uvatea '%-.32s'\n"
+ spa "%s: Forzando a cerrar el thread %ld usuario: '%-.32s'\n"
+ swe "%s: Stnger av trd %ld; anvndare: '%-.32s'\n"
ukr "%s: Ǧ %ld : '%-.32s'\n"
ER_IPSOCK_ERROR 08S01
cze "Nemohu vytvo-Bit IP socket"
@@ -2041,55 +2041,55 @@ ER_BLOBS_AND_NO_TERMINATED 42000 S1009
swe "Man kan inte anvnda fast radlngd med blobs. Anvnd 'fields terminated by'"
ukr " BLOB. 'fields terminated by'"
ER_TEXTFILE_NOT_READABLE
- cze "Soubor '%-.64s' mus-B bt v adresi databze nebo iteln pro vechny"
- dan "Filen '%-.64s' skal vre i database-folderen og kunne lses af alle"
- nla "Het bestand '%-.64s' dient in de database directory voor the komen of leesbaar voor iedereen te zijn."
+ cze "Soubor '%-.128s' mus-B bt v adresi databze nebo iteln pro vechny"
+ dan "Filen '%-.128s' skal vre i database-folderen og kunne lses af alle"
+ nla "Het bestand '%-.128s' dient in de database directory voor the komen of leesbaar voor iedereen te zijn."
eng "The file '%-.128s' must be in the database directory or be readable by all"
- jps "t@C '%-.64s' databse directory ɂ邩SẴ[U[ǂ߂悤ɋ‚ĂȂ΂Ȃ܂.",
- est "Fail '%-.64s' peab asuma andmebaasi kataloogis vi olema kigile loetav"
- fre "Le fichier '%-.64s' doit tre dans le rpertoire de la base et lisible par tous"
- ger "Datei '%-.64s' muss im Datenbank-Verzeichnis vorhanden oder lesbar fr alle sein"
- greek " '%-.64s' database directory "
- hun "A(z) '%-.64s'-nak az adatbazis konyvtarban kell lennie, vagy mindenki szamara olvashatonak"
- ita "Il file '%-.64s' deve essere nella directory del database e deve essere leggibile da tutti"
- jpn "ե '%-.64s' databse directory ˤ뤫ƤΥ桼ɤ褦˵ĤƤʤФʤޤ."
- kor "'%-.64s' ȭϴ Ÿ̽ 丮 ϰų ο б Ͽ մϴ."
- nor "Filen '%-.64s' m vre i database-katalogen for vre lesbar for alle"
- norwegian-ny "Filen '%-.64s' m vre i database-katalogen for vre lesbar for alle"
- pol "Plik '%-.64s' musi znajdowa sie w katalogu bazy danych lub mie prawa czytania przez wszystkich"
- por "Arquivo '%-.64s' tem que estar no diretrio do banco de dados ou ter leitura possvel para todos"
- rum "Fisierul '%-.64s' trebuie sa fie in directorul bazei de data sau trebuie sa poata sa fie citit de catre toata lumea (verifica permisiile)"
- rus " '%-.64s' , , "
- serbian "File '%-.64s' mora biti u direktorijumu gde su file-ovi baze i mora imati odgovarajua prava pristupa"
- slo "Sbor '%-.64s' mus by v adresri databzy, alebo itaten pre vetkch"
- spa "El archivo '%-.64s' debe estar en el directorio de la base de datos o ser de lectura por todos"
- swe "Textfilen '%.64s' mste finnas i databasbiblioteket eller vara lsbar fr alla"
- ukr " '%-.64s' æ Ӧ"
+ jps "t@C '%-.128s' databse directory ɂ邩SẴ[U[ǂ߂悤ɋ‚ĂȂ΂Ȃ܂.",
+ est "Fail '%-.128s' peab asuma andmebaasi kataloogis vi olema kigile loetav"
+ fre "Le fichier '%-.128s' doit tre dans le rpertoire de la base et lisible par tous"
+ ger "Datei '%-.128s' muss im Datenbank-Verzeichnis vorhanden oder lesbar fr alle sein"
+ greek " '%-.128s' database directory "
+ hun "A(z) '%-.128s'-nak az adatbazis konyvtarban kell lennie, vagy mindenki szamara olvashatonak"
+ ita "Il file '%-.128s' deve essere nella directory del database e deve essere leggibile da tutti"
+ jpn "ե '%-.128s' databse directory ˤ뤫ƤΥ桼ɤ褦˵ĤƤʤФʤޤ."
+ kor "'%-.128s' ȭϴ Ÿ̽ 丮 ϰų ο б Ͽ մϴ."
+ nor "Filen '%-.128s' m vre i database-katalogen for vre lesbar for alle"
+ norwegian-ny "Filen '%-.128s' m vre i database-katalogen for vre lesbar for alle"
+ pol "Plik '%-.128s' musi znajdowa sie w katalogu bazy danych lub mie prawa czytania przez wszystkich"
+ por "Arquivo '%-.128s' tem que estar no diretrio do banco de dados ou ter leitura possvel para todos"
+ rum "Fisierul '%-.128s' trebuie sa fie in directorul bazei de data sau trebuie sa poata sa fie citit de catre toata lumea (verifica permisiile)"
+ rus " '%-.128s' , , "
+ serbian "File '%-.128s' mora biti u direktorijumu gde su file-ovi baze i mora imati odgovarajua prava pristupa"
+ slo "Sbor '%-.128s' mus by v adresri databzy, alebo itaten pre vetkch"
+ spa "El archivo '%-.128s' debe estar en el directorio de la base de datos o ser de lectura por todos"
+ swe "Textfilen '%-.128s' mste finnas i databasbiblioteket eller vara lsbar fr alla"
+ ukr " '%-.128s' æ Ӧ"
ER_FILE_EXISTS_ERROR
- cze "Soubor '%-.64s' ji-B existuje"
- dan "Filen '%-.64s' eksisterer allerede"
- nla "Het bestand '%-.64s' bestaat reeds"
+ cze "Soubor '%-.200s' ji-B existuje"
+ dan "Filen '%-.200s' eksisterer allerede"
+ nla "Het bestand '%-.200s' bestaat reeds"
eng "File '%-.200s' already exists"
- jps "File '%-.64s' ͊ɑ݂܂",
- est "Fail '%-.80s' juba eksisteerib"
- fre "Le fichier '%-.64s' existe dj"
- ger "Datei '%-.80s' bereits vorhanden"
- greek " '%-.64s' "
- hun "A '%-.64s' file mar letezik."
- ita "Il file '%-.64s' esiste gia`"
- jpn "File '%-.64s' ϴ¸ߤޤ"
- kor "'%-.64s' ȭ ̹ մϴ."
- nor "Filen '%-.64s' eksisterte allerede"
- norwegian-ny "Filen '%-.64s' eksisterte allereide"
- pol "Plik '%-.64s' ju istnieje"
- por "Arquivo '%-.80s' j existe"
- rum "Fisierul '%-.80s' exista deja"
- rus " '%-.80s' "
- serbian "File '%-.80s' ve postoji"
- slo "Sbor '%-.64s' u existuje"
- spa "El archivo '%-.64s' ya existe"
- swe "Filen '%-.64s' existerar redan"
- ukr " '%-.80s' դ"
+ jps "File '%-.200s' ͊ɑ݂܂",
+ est "Fail '%-.200s' juba eksisteerib"
+ fre "Le fichier '%-.200s' existe dj"
+ ger "Datei '%-.200s' bereits vorhanden"
+ greek " '%-.200s' "
+ hun "A '%-.200s' file mar letezik."
+ ita "Il file '%-.200s' esiste gia`"
+ jpn "File '%-.200s' ϴ¸ߤޤ"
+ kor "'%-.200s' ȭ ̹ մϴ."
+ nor "Filen '%-.200s' eksisterte allerede"
+ norwegian-ny "Filen '%-.200s' eksisterte allereide"
+ pol "Plik '%-.200s' ju istnieje"
+ por "Arquivo '%-.200s' j existe"
+ rum "Fisierul '%-.200s' exista deja"
+ rus " '%-.200s' "
+ serbian "File '%-.200s' ve postoji"
+ slo "Sbor '%-.200s' u existuje"
+ spa "El archivo '%-.200s' ya existe"
+ swe "Filen '%-.200s' existerar redan"
+ ukr " '%-.200s' դ"
ER_LOAD_INFO
cze "Z-Bznam: %ld Vymazno: %ld Peskoeno: %ld Varovn: %ld"
dan "Poster: %ld Fjernet: %ld Sprunget over: %ld Advarsler: %ld"
@@ -2319,51 +2319,51 @@ ER_NO_TABLES_USED
swe "Inga tabeller angivna"
ukr " "
ER_TOO_BIG_SET
- cze "P-Bli mnoho etzc pro sloupec %s a SET"
+ cze "P-Bli mnoho etzc pro sloupec %-.64s a SET"
dan "For mange tekststrenge til specifikationen af SET i kolonne %-.64s"
- nla "Teveel strings voor kolom %s en SET"
+ nla "Teveel strings voor kolom %-.64s en SET"
eng "Too many strings for column %-.64s and SET"
est "Liiga palju string tulbale %-.64s tbile SET"
- fre "Trop de chanes dans la colonne %s avec SET"
+ fre "Trop de chanes dans la colonne %-.64s avec SET"
ger "Zu viele Strings fr Feld %-.64s und SET angegeben"
greek " strings %-.64s SET"
hun "Tul sok karakter: %-.64s es SET"
ita "Troppe stringhe per la colonna %-.64s e la SET"
kor "Į %-.64s SET Ʈ ʹ ϴ."
- nor "For mange tekststrenger kolonne %s og SET"
- norwegian-ny "For mange tekststrengar felt %s og SET"
- pol "Zbyt wiele acuchw dla kolumny %s i polecenia SET"
+ nor "For mange tekststrenger kolonne %-.64s og SET"
+ norwegian-ny "For mange tekststrengar felt %-.64s og SET"
+ pol "Zbyt wiele acuchw dla kolumny %-.64s i polecenia SET"
por "'Strings' demais para coluna '%-.64s' e SET"
rum "Prea multe siruri pentru coloana %-.64s si SET"
rus " %-.64s SET"
serbian "Previe string-ova za kolonu '%-.64s' i komandu 'SET'"
slo "Prli mnoho reazcov pre pole %-.64s a SET"
- spa "Muchas strings para columna %s y SET"
- swe "Fr mnga alternativ till kolumn %s fr SET"
+ spa "Muchas strings para columna %-.64s y SET"
+ swe "Fr mnga alternativ till kolumn %-.64s fr SET"
ukr " %-.64s SET"
ER_NO_UNIQUE_LOGFILE
- cze "Nemohu vytvo-Bit jednoznan jmno logovacho souboru %s.(1-999)\n"
- dan "Kan ikke lave unikt log-filnavn %s.(1-999)\n"
- nla "Het is niet mogelijk een unieke naam te maken voor de logfile %s.(1-999)\n"
+ cze "Nemohu vytvo-Bit jednoznan jmno logovacho souboru %-.200s.(1-999)\n"
+ dan "Kan ikke lave unikt log-filnavn %-.200s.(1-999)\n"
+ nla "Het is niet mogelijk een unieke naam te maken voor de logfile %-.200s.(1-999)\n"
eng "Can't generate a unique log-filename %-.200s.(1-999)\n"
- est "Ei suuda luua unikaalset logifaili nime %-.64s.(1-999)\n"
- fre "Ne peut gnrer un unique nom de journal %s.(1-999)\n"
- ger "Kann keinen eindeutigen Dateinamen fr die Logdatei %-.64s(1-999) erzeugen\n"
- greek " unique log-filename %-.64s.(1-999)\n"
- hun "Egyedi log-filenev nem generalhato: %-.64s.(1-999)\n"
- ita "Impossibile generare un nome del file log unico %-.64s.(1-999)\n"
- kor "Unique αȭ '%-.64s' ϴ.(1-999)\n"
- nor "Kan ikke lage unikt loggfilnavn %s.(1-999)\n"
- norwegian-ny "Kan ikkje lage unikt loggfilnavn %s.(1-999)\n"
- pol "Nie mona stworzy unikalnej nazwy pliku z logiem %s.(1-999)\n"
- por "No pode gerar um nome de arquivo de 'log' nico '%-.64s'.(1-999)\n"
- rum "Nu pot sa generez un nume de log unic %-.64s.(1-999)\n"
- rus " %-.64s.(1-999)\n"
- serbian "Ne mogu da generiem jedinstveno ime log-file-a: '%-.64s.(1-999)'\n"
- slo "Nemem vytvori uniktne meno log-sboru %-.64s.(1-999)\n"
- spa "No puede crear un unico archivo log %s.(1-999)\n"
- swe "Kan inte generera ett unikt filnamn %s.(1-999)\n"
- ukr " Φ ' log- %-.64s.(1-999)\n"
+ est "Ei suuda luua unikaalset logifaili nime %-.200s.(1-999)\n"
+ fre "Ne peut gnrer un unique nom de journal %-.200s.(1-999)\n"
+ ger "Kann keinen eindeutigen Dateinamen fr die Logdatei %-.200s(1-999) erzeugen\n"
+ greek " unique log-filename %-.200s.(1-999)\n"
+ hun "Egyedi log-filenev nem generalhato: %-.200s.(1-999)\n"
+ ita "Impossibile generare un nome del file log unico %-.200s.(1-999)\n"
+ kor "Unique αȭ '%-.200s' ϴ.(1-999)\n"
+ nor "Kan ikke lage unikt loggfilnavn %-.200s.(1-999)\n"
+ norwegian-ny "Kan ikkje lage unikt loggfilnavn %-.200s.(1-999)\n"
+ pol "Nie mona stworzy unikalnej nazwy pliku z logiem %-.200s.(1-999)\n"
+ por "No pode gerar um nome de arquivo de 'log' nico '%-.200s'.(1-999)\n"
+ rum "Nu pot sa generez un nume de log unic %-.200s.(1-999)\n"
+ rus " %-.200s.(1-999)\n"
+ serbian "Ne mogu da generiem jedinstveno ime log-file-a: '%-.200s.(1-999)'\n"
+ slo "Nemem vytvori uniktne meno log-sboru %-.200s.(1-999)\n"
+ spa "No puede crear un unico archivo log %-.200s.(1-999)\n"
+ swe "Kan inte generera ett unikt filnamn %-.200s.(1-999)\n"
+ ukr " Φ ' log- %-.200s.(1-999)\n"
ER_TABLE_NOT_LOCKED_FOR_WRITE
cze "Tabulka '%-.64s' byla zam-Bena s READ a neme bt zmnna"
dan "Tabellen '%-.64s' var lst med READ ls og kan ikke opdateres"
@@ -2439,54 +2439,54 @@ ER_BLOB_CANT_HAVE_DEFAULT 42000
swe "BLOB flt '%-.64s' kan inte ha ett DEFAULT-vrde"
ukr " BLOB '%-.64s' "
ER_WRONG_DB_NAME 42000
- cze "Nep-Bpustn jmno databze '%-.64s'"
- dan "Ugyldigt database navn '%-.64s'"
- nla "Databasenaam '%-.64s' is niet getoegestaan"
+ cze "Nep-Bpustn jmno databze '%-.100s'"
+ dan "Ugyldigt database navn '%-.100s'"
+ nla "Databasenaam '%-.100s' is niet getoegestaan"
eng "Incorrect database name '%-.100s'"
jps "w肵 database '%-.100s' ԈĂ܂",
est "Vigane andmebaasi nimi '%-.100s'"
- fre "Nom de base de donne illgal: '%-.64s'"
+ fre "Nom de base de donne illgal: '%-.100s'"
ger "Unerlaubter Datenbankname '%-.100s'"
greek " '%-.100s'"
hun "Hibas adatbazisnev: '%-.100s'"
ita "Nome database errato '%-.100s'"
jpn "ꤷ database ̾ '%-.100s' ְäƤޤ"
kor "'%-.100s' Ÿ̽ ̸ Ȯմϴ."
- nor "Ugyldig database navn '%-.64s'"
- norwegian-ny "Ugyldig database namn '%-.64s'"
- pol "Niedozwolona nazwa bazy danych '%-.64s'"
+ nor "Ugyldig database navn '%-.100s'"
+ norwegian-ny "Ugyldig database namn '%-.100s'"
+ pol "Niedozwolona nazwa bazy danych '%-.100s'"
por "Nome de banco de dados '%-.100s' incorreto"
rum "Numele bazei de date este incorect '%-.100s'"
rus " '%-.100s'"
serbian "Pogreno ime baze '%-.100s'"
slo "Neprpustn meno databzy '%-.100s'"
- spa "Nombre de base de datos ilegal '%-.64s'"
- swe "Felaktigt databasnamn '%-.64s'"
+ spa "Nombre de base de datos ilegal '%-.100s'"
+ swe "Felaktigt databasnamn '%-.100s'"
ukr "צ ' '%-.100s'"
ER_WRONG_TABLE_NAME 42000
- cze "Nep-Bpustn jmno tabulky '%-.64s'"
- dan "Ugyldigt tabel navn '%-.64s'"
- nla "Niet toegestane tabelnaam '%-.64s'"
+ cze "Nep-Bpustn jmno tabulky '%-.100s'"
+ dan "Ugyldigt tabel navn '%-.100s'"
+ nla "Niet toegestane tabelnaam '%-.100s'"
eng "Incorrect table name '%-.100s'"
jps "w肵 table '%-.100s' ͂܂Ă܂",
est "Vigane tabeli nimi '%-.100s'"
- fre "Nom de table illgal: '%-.64s'"
+ fre "Nom de table illgal: '%-.100s'"
ger "Unerlaubter Tabellenname '%-.100s'"
greek " '%-.100s'"
hun "Hibas tablanev: '%-.100s'"
ita "Nome tabella errato '%-.100s'"
jpn "ꤷ table ̾ '%-.100s' ϤޤäƤޤ"
kor "'%-.100s' ̺ ̸ Ȯմϴ."
- nor "Ugyldig tabell navn '%-.64s'"
- norwegian-ny "Ugyldig tabell namn '%-.64s'"
- pol "Niedozwolona nazwa tabeli '%-.64s'..."
+ nor "Ugyldig tabell navn '%-.100s'"
+ norwegian-ny "Ugyldig tabell namn '%-.100s'"
+ pol "Niedozwolona nazwa tabeli '%-.100s'..."
por "Nome de tabela '%-.100s' incorreto"
rum "Numele tabelei este incorect '%-.100s'"
rus " '%-.100s'"
serbian "Pogreno ime tabele '%-.100s'"
slo "Neprpustn meno tabuky '%-.100s'"
- spa "Nombre de tabla ilegal '%-.64s'"
- swe "Felaktigt tabellnamn '%-.64s'"
+ spa "Nombre de tabla ilegal '%-.100s'"
+ swe "Felaktigt tabellnamn '%-.100s'"
ukr "צ ' æ '%-.100s'"
ER_TOO_BIG_SELECT 42000
cze "Zadan-B SELECT by prochzel pli mnoho zznam a trval velmi dlouho. Zkontrolujte tvar WHERE a je-li SELECT v podku, pouijte SET SQL_BIG_SELECTS=1"
@@ -2534,97 +2534,97 @@ ER_UNKNOWN_ERROR
swe "Oidentifierat fel"
ukr "צ "
ER_UNKNOWN_PROCEDURE 42000
- cze "Nezn-Bm procedura %s"
- dan "Ukendt procedure %s"
- nla "Onbekende procedure %s"
+ cze "Nezn-Bm procedura %-.64s"
+ dan "Ukendt procedure %-.64s"
+ nla "Onbekende procedure %-.64s"
eng "Unknown procedure '%-.64s'"
est "Tundmatu protseduur '%-.64s'"
- fre "Procdure %s inconnue"
+ fre "Procdure %-.64s inconnue"
ger "Unbekannte Prozedur '%-.64s'"
greek " '%-.64s'"
hun "Ismeretlen eljaras: '%-.64s'"
ita "Procedura '%-.64s' sconosciuta"
kor "˼ ๮ : '%-.64s'"
- nor "Ukjent prosedyre %s"
- norwegian-ny "Ukjend prosedyre %s"
- pol "Unkown procedure %s"
+ nor "Ukjent prosedyre %-.64s"
+ norwegian-ny "Ukjend prosedyre %-.64s"
+ pol "Unkown procedure %-.64s"
por "'Procedure' '%-.64s' desconhecida"
rum "Procedura unknown '%-.64s'"
rus " '%-.64s'"
serbian "Nepoznata procedura '%-.64s'"
slo "Neznm procedra '%-.64s'"
- spa "Procedimiento desconocido %s"
- swe "Oknd procedur: %s"
+ spa "Procedimiento desconocido %-.64s"
+ swe "Oknd procedur: %-.64s"
ukr "צ '%-.64s'"
ER_WRONG_PARAMCOUNT_TO_PROCEDURE 42000
- cze "Chybn-B poet parametr procedury %s"
- dan "Forkert antal parametre til proceduren %s"
- nla "Foutief aantal parameters doorgegeven aan procedure %s"
+ cze "Chybn-B poet parametr procedury %-.64s"
+ dan "Forkert antal parametre til proceduren %-.64s"
+ nla "Foutief aantal parameters doorgegeven aan procedure %-.64s"
eng "Incorrect parameter count to procedure '%-.64s'"
est "Vale parameetrite hulk protseduurile '%-.64s'"
- fre "Mauvais nombre de paramtres pour la procedure %s"
+ fre "Mauvais nombre de paramtres pour la procedure %-.64s"
ger "Falsche Parameterzahl fr Prozedur '%-.64s'"
greek " '%-.64s'"
hun "Rossz parameter a(z) '%-.64s'eljaras szamitasanal"
ita "Numero di parametri errato per la procedura '%-.64s'"
kor "'%-.64s' ๮ Ȯ Ķ"
- nor "Feil parameter antall til prosedyren %s"
- norwegian-ny "Feil parameter tal til prosedyra %s"
- pol "Incorrect parameter count to procedure %s"
+ nor "Feil parameter antall til prosedyren %-.64s"
+ norwegian-ny "Feil parameter tal til prosedyra %-.64s"
+ pol "Incorrect parameter count to procedure %-.64s"
por "Nmero de parmetros incorreto para a 'procedure' '%-.64s'"
rum "Procedura '%-.64s' are un numar incorect de parametri"
rus " '%-.64s'"
serbian "Pogrean broj parametara za proceduru '%-.64s'"
slo "Chybn poet parametrov procedry '%-.64s'"
- spa "Equivocado parametro count para procedimiento %s"
- swe "Felaktigt antal parametrar till procedur %s"
+ spa "Equivocado parametro count para procedimiento %-.64s"
+ swe "Felaktigt antal parametrar till procedur %-.64s"
ukr " ˦˦ Ҧ '%-.64s'"
ER_WRONG_PARAMETERS_TO_PROCEDURE
- cze "Chybn-B parametry procedury %s"
- dan "Forkert(e) parametre til proceduren %s"
- nla "Foutieve parameters voor procedure %s"
+ cze "Chybn-B parametry procedury %-.64s"
+ dan "Forkert(e) parametre til proceduren %-.64s"
+ nla "Foutieve parameters voor procedure %-.64s"
eng "Incorrect parameters to procedure '%-.64s'"
est "Vigased parameetrid protseduurile '%-.64s'"
- fre "Paramtre erron pour la procedure %s"
+ fre "Paramtre erron pour la procedure %-.64s"
ger "Falsche Parameter fr Prozedur '%-.64s'"
greek " '%-.64s'"
hun "Rossz parameter a(z) '%-.64s' eljarasban"
ita "Parametri errati per la procedura '%-.64s'"
kor "'%-.64s' ๮ Ȯ Ķ"
- nor "Feil parametre til prosedyren %s"
- norwegian-ny "Feil parameter til prosedyra %s"
- pol "Incorrect parameters to procedure %s"
+ nor "Feil parametre til prosedyren %-.64s"
+ norwegian-ny "Feil parameter til prosedyra %-.64s"
+ pol "Incorrect parameters to procedure %-.64s"
por "Parmetros incorretos para a 'procedure' '%-.64s'"
rum "Procedura '%-.64s' are parametrii incorecti"
rus " '%-.64s'"
serbian "Pogreni parametri prosleeni proceduri '%-.64s'"
slo "Chybn parametre procedry '%-.64s'"
- spa "Equivocados parametros para procedimiento %s"
- swe "Felaktiga parametrar till procedur %s"
+ spa "Equivocados parametros para procedimiento %-.64s"
+ swe "Felaktiga parametrar till procedur %-.64s"
ukr " '%-.64s'"
ER_UNKNOWN_TABLE 42S02
- cze "Nezn-Bm tabulka '%-.64s' v %s"
- dan "Ukendt tabel '%-.64s' i %s"
- nla "Onbekende tabel '%-.64s' in %s"
+ cze "Nezn-Bm tabulka '%-.64s' v %-.32s"
+ dan "Ukendt tabel '%-.64s' i %-.32s"
+ nla "Onbekende tabel '%-.64s' in %-.32s"
eng "Unknown table '%-.64s' in %-.32s"
est "Tundmatu tabel '%-.64s' %-.32s-s"
- fre "Table inconnue '%-.64s' dans %s"
- ger "Unbekannte Tabelle '%-.64s' in '%-.64s'"
- greek " '%-.64s' %s"
- hun "Ismeretlen tabla: '%-.64s' %s-ban"
- ita "Tabella '%-.64s' sconosciuta in %s"
- jpn "Unknown table '%-.64s' in %s"
- kor "˼ ̺ '%-.64s' (Ÿ̽ %s)"
- nor "Ukjent tabell '%-.64s' i %s"
- norwegian-ny "Ukjend tabell '%-.64s' i %s"
- pol "Unknown table '%-.64s' in %s"
+ fre "Table inconnue '%-.64s' dans %-.32s"
+ ger "Unbekannte Tabelle '%-.64s' in '%-.32s'"
+ greek " '%-.64s' %-.32s"
+ hun "Ismeretlen tabla: '%-.64s' %-.32s-ban"
+ ita "Tabella '%-.64s' sconosciuta in %-.32s"
+ jpn "Unknown table '%-.64s' in %-.32s"
+ kor "˼ ̺ '%-.64s' (Ÿ̽ %-.32s)"
+ nor "Ukjent tabell '%-.64s' i %-.32s"
+ norwegian-ny "Ukjend tabell '%-.64s' i %-.32s"
+ pol "Unknown table '%-.64s' in %-.32s"
por "Tabela '%-.64s' desconhecida em '%-.32s'"
rum "Tabla '%-.64s' invalida in %-.32s"
rus " '%-.64s' %-.32s"
serbian "Nepoznata tabela '%-.64s' u '%-.32s'"
- slo "Neznma tabuka '%-.64s' v %s"
- spa "Tabla desconocida '%-.64s' in %s"
- swe "Oknd tabell '%-.64s' i '%-.64s'"
+ slo "Neznma tabuka '%-.64s' v %-.32s"
+ spa "Tabla desconocida '%-.64s' in %-.32s"
+ swe "Oknd tabell '%-.64s' i '%-.32s'"
ukr "צ '%-.64s' %-.32s"
ER_FIELD_SPECIFIED_TWICE 42000
cze "Polo-Bka '%-.64s' je zadna dvakrt"
@@ -2803,27 +2803,27 @@ ER_TOO_MANY_FIELDS
swe "Fr mnga flt"
ukr " æ"
ER_TOO_BIG_ROWSIZE 42000
- cze "-Bdek je pli velk. Maximln velikost dku, nepotaje poloky blob, je %d. Muste zmnit nkter poloky na blob"
- dan "For store poster. Max post strrelse, uden BLOB's, er %d. Du m lave nogle felter til BLOB's"
- nla "Rij-grootte is groter dan toegestaan. Maximale rij grootte, blobs niet meegeteld, is %d. U dient sommige velden in blobs te veranderen."
+ cze "-Bdek je pli velk. Maximln velikost dku, nepotaje poloky blob, je %ld. Muste zmnit nkter poloky na blob"
+ dan "For store poster. Max post strrelse, uden BLOB's, er %ld. Du m lave nogle felter til BLOB's"
+ nla "Rij-grootte is groter dan toegestaan. Maximale rij grootte, blobs niet meegeteld, is %ld. U dient sommige velden in blobs te veranderen."
eng "Row size too large. The maximum row size for the used table type, not counting BLOBs, is %ld. You have to change some columns to TEXT or BLOBs"
- jps "row size 傫܂. BLOB ܂܂Ȃꍇ row size ̍ő %d ł. ‚ field BLOB ɕςĂ.",
- est "Liiga pikk kirje. Kirje maksimumpikkus arvestamata BLOB-tpi vlju on %d. Muuda mned vljad BLOB-tpi vljadeks"
- fre "Ligne trop grande. Le taille maximale d'une ligne, sauf les BLOBs, est %d. Changez le type de quelques colonnes en BLOB"
+ jps "row size 傫܂. BLOB ܂܂Ȃꍇ row size ̍ő %ld ł. ‚ field BLOB ɕςĂ.",
+ est "Liiga pikk kirje. Kirje maksimumpikkus arvestamata BLOB-tpi vlju on %ld. Muuda mned vljad BLOB-tpi vljadeks"
+ fre "Ligne trop grande. Le taille maximale d'une ligne, sauf les BLOBs, est %ld. Changez le type de quelques colonnes en BLOB"
ger "Zeilenlnge zu gro. Die maximale Zeilenlnge fr den verwendeten Tabellentyp (ohne BLOB-Felder) betrgt %ld. Einige Felder mssen in BLOB oder TEXT umgewandelt werden"
- greek " . , blobs, %d. blobs"
- hun "Tul nagy sormeret. A maximalis sormeret (nem szamolva a blob objektumokat) %d. Nehany mezot meg kell valtoztatnia"
- ita "Riga troppo grande. La massima grandezza di una riga, non contando i BLOB, e` %d. Devi cambiare alcuni campi in BLOB"
- jpn "row size 礭ޤ. BLOB ޤޤʤ row size κ %d Ǥ. Ĥ field BLOB ѤƤ."
- kor "ʹ ū row Դϴ. BLOB ʰ ִ row %dԴϴ. 󸶰 ʵ BLOB ٲټž ڱ.."
- por "Tamanho de linha grande demais. O mximo tamanho de linha, no contando BLOBs, %d. Voc tem que mudar alguns campos para BLOBs"
- rum "Marimea liniei (row) prea mare. Marimea maxima a liniei, excluzind BLOB-urile este de %d. Trebuie sa schimbati unele cimpuri in BLOB-uri"
- rus " . , BLOB, - %d. , BLOB"
- serbian "Prevelik slog. Maksimalna veliina sloga, ne raunajui BLOB polja, je %d. Trebali bi da promenite tip nekih polja u BLOB"
- slo "Riadok je prli vek. Maximlna vekos riadku, okrem 'BLOB', je %d. Muste zmeni niektor poloky na BLOB"
- spa "Tamao de lnea muy grande. Mximo tamao de lnea, no contando blob, es %d. Tu tienes que cambiar algunos campos para blob"
- swe "Fr stor total radlngd. Den hgst tilltna radlngden, frutom BLOBs, r %d. ndra ngra av dina flt till BLOB"
- ukr " . ¦ , BLOB, %d. Ҧ ˦ æ BLOB"
+ greek " . , blobs, %ld. blobs"
+ hun "Tul nagy sormeret. A maximalis sormeret (nem szamolva a blob objektumokat) %ld. Nehany mezot meg kell valtoztatnia"
+ ita "Riga troppo grande. La massima grandezza di una riga, non contando i BLOB, e` %ld. Devi cambiare alcuni campi in BLOB"
+ jpn "row size 礭ޤ. BLOB ޤޤʤ row size κ %ld Ǥ. Ĥ field BLOB ѤƤ."
+ kor "ʹ ū row Դϴ. BLOB ʰ ִ row %ldԴϴ. 󸶰 ʵ BLOB ٲټž ڱ.."
+ por "Tamanho de linha grande demais. O mximo tamanho de linha, no contando BLOBs, %ld. Voc tem que mudar alguns campos para BLOBs"
+ rum "Marimea liniei (row) prea mare. Marimea maxima a liniei, excluzind BLOB-urile este de %ld. Trebuie sa schimbati unele cimpuri in BLOB-uri"
+ rus " . , BLOB, - %ld. , BLOB"
+ serbian "Prevelik slog. Maksimalna veliina sloga, ne raunajui BLOB polja, je %ld. Trebali bi da promenite tip nekih polja u BLOB"
+ slo "Riadok je prli vek. Maximlna vekos riadku, okrem 'BLOB', je %ld. Muste zmeni niektor poloky na BLOB"
+ spa "Tamao de lnea muy grande. Mximo tamao de lnea, no contando blob, es %ld. Tu tienes que cambiar algunos campos para blob"
+ swe "Fr stor total radlngd. Den hgst tilltna radlngden, frutom BLOBs, r %ld. ndra ngra av dina flt till BLOB"
+ ukr " . ¦ , BLOB, %ld. Ҧ ˦ æ BLOB"
ER_STACK_OVERRUN
cze "P-Beteen zsobnku threadu: pouito %ld z %ld. Pouijte 'mysqld -O thread_stack=#' k zadn vtho zsobnku"
dan "Thread stack brugt: Brugt: %ld af en %ld stak. Brug 'mysqld -O thread_stack=#' for at allokere en strre stak om ndvendigt"
@@ -3026,14 +3026,14 @@ ER_FUNCTION_NOT_DEFINED
ukr "æ '%-.64s' "
ER_HOST_IS_BLOCKED
cze "Stroj '%-.64s' je zablokov-Bn kvli mnoha chybm pi pipojovn. Odblokujete pouitm 'mysqladmin flush-hosts'"
- dan "Vrten er blokeret p grund af mange fejlforesprgsler. Ls op med 'mysqladmin flush-hosts'"
+ dan "Vrten '%-.64s' er blokeret p grund af mange fejlforesprgsler. Ls op med 'mysqladmin flush-hosts'"
nla "Host '%-.64s' is geblokkeeerd vanwege te veel verbindings fouten. Deblokkeer met 'mysqladmin flush-hosts'"
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 tttu. Blokeeringu saab thistada 'mysqladmin flush-hosts' ksuga"
fre "L'hte '%-.64s' est bloqu cause d'un trop grand nombre d'erreur de connexion. Dbloquer le par 'mysqladmin flush-hosts'"
ger "Host '%-.64s' blockiert wegen zu vieler Verbindungsfehler. Aufheben der Blockierung mit 'mysqladmin flush-hosts'"
- greek " . 'mysqladmin flush-hosts'"
+ greek " '%-.64s' . 'mysqladmin flush-hosts'"
hun "A '%-.64s' host blokkolodott, tul sok kapcsolodasi hiba miatt. Hasznalja a 'mysqladmin flush-hosts' parancsot"
ita "Sistema '%-.64s' bloccato a causa di troppi errori di connessione. Per sbloccarlo: 'mysqladmin flush-hosts'"
jpn "Host '%-.64s' many connection error Τᡢݤޤ. 'mysqladmin flush-hosts' DzƤ"
@@ -3054,7 +3054,7 @@ ER_HOST_NOT_PRIVILEGED
est "Masinal '%-.64s' puudub ligips sellele MySQL serverile"
fre "Le hte '%-.64s' n'est pas authoris se connecter ce serveur MySQL"
ger "Host '%-.64s' hat keine Berechtigung, sich mit diesem MySQL-Server zu verbinden"
- greek " MySQL server"
+ greek " '%-.64s' MySQL server"
hun "A '%-.64s' host szamara nem engedelyezett a kapcsolodas ehhez a MySQL szerverhez"
ita "Al sistema '%-.64s' non e` consentita la connessione a questo server MySQL"
jpn "Host '%-.64s' MySQL server ³ĤƤޤ"
@@ -3368,27 +3368,27 @@ ER_GRANT_WRONG_HOST_OR_USER 42000
swe "Felaktigt maskinnamn eller anvndarnamn anvnt med GRANT"
ukr " host user GRANT "
ER_NO_SUCH_TABLE 42S02
- cze "Tabulka '%-.64s.%s' neexistuje"
+ cze "Tabulka '%-.64s.%-.64s' neexistuje"
dan "Tabellen '%-.64s.%-.64s' eksisterer ikke"
- nla "Tabel '%-.64s.%s' bestaat niet"
+ nla "Tabel '%-.64s.%-.64s' bestaat niet"
eng "Table '%-.64s.%-.64s' doesn't exist"
est "Tabelit '%-.64s.%-.64s' ei eksisteeri"
- fre "La table '%-.64s.%s' n'existe pas"
+ fre "La table '%-.64s.%-.64s' n'existe pas"
ger "Tabelle '%-.64s.%-.64s' existiert nicht"
- hun "A '%-.64s.%s' tabla nem letezik"
- ita "La tabella '%-.64s.%s' non esiste"
- jpn "Table '%-.64s.%s' doesn't exist"
- kor "̺ '%-.64s.%s' ʽϴ."
- nor "Table '%-.64s.%s' doesn't exist"
- norwegian-ny "Table '%-.64s.%s' doesn't exist"
- pol "Table '%-.64s.%s' doesn't exist"
+ hun "A '%-.64s.%-.64s' tabla nem letezik"
+ ita "La tabella '%-.64s.%-.64s' non esiste"
+ jpn "Table '%-.64s.%-.64s' doesn't exist"
+ kor "̺ '%-.64s.%-.64s' ʽϴ."
+ nor "Table '%-.64s.%-.64s' doesn't exist"
+ norwegian-ny "Table '%-.64s.%-.64s' doesn't exist"
+ pol "Table '%-.64s.%-.64s' doesn't exist"
por "Tabela '%-.64s.%-.64s' no existe"
rum "Tabela '%-.64s.%-.64s' nu exista"
rus " '%-.64s.%-.64s' "
serbian "Tabela '%-.64s.%-.64s' ne postoji"
- slo "Table '%-.64s.%s' doesn't exist"
- spa "Tabla '%-.64s.%s' no existe"
- swe "Det finns ingen tabell som heter '%-.64s.%s'"
+ slo "Table '%-.64s.%-.64s' doesn't exist"
+ spa "Tabla '%-.64s.%-.64s' no existe"
+ swe "Det finns ingen tabell som heter '%-.64s.%-.64s'"
ukr " '%-.64s.%-.64s' դ"
ER_NONEXISTING_TABLE_GRANT 42000
cze "Neexistuje odpov-Bdajc grant pro uivatele '%-.32s' na stroji '%-.64s' pro tabulku '%-.64s'"
@@ -3487,27 +3487,27 @@ ER_TOO_MANY_DELAYED_THREADS
swe "Det finns redan 'max_delayed_threads' trdar i anvnding"
ukr " Ǧ դ"
ER_ABORTING_CONNECTION 08S01
- cze "Zru-Beno spojen %ld do databze: '%-.64s' uivatel: '%-.64s' (%s)"
- dan "Afbrudt forbindelse %ld til database: '%-.64s' bruger: '%-.64s' (%-.64s)"
- nla "Afgebroken verbinding %ld naar db: '%-.64s' gebruiker: '%-.64s' (%s)"
+ cze "Zru-Beno spojen %ld do databze: '%-.64s' uivatel: '%-.32s' (%-.64s)"
+ dan "Afbrudt forbindelse %ld til database: '%-.64s' bruger: '%-.32s' (%-.64s)"
+ nla "Afgebroken verbinding %ld naar db: '%-.64s' gebruiker: '%-.32s' (%-.64s)"
eng "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)"
est "hendus katkestatud %ld andmebaasile: '%-.64s' kasutajale: '%-.32s' (%-.64s)"
- fre "Connection %ld avorte vers la bd: '%-.64s' utilisateur: '%-.64s' (%s)"
- ger "Abbruch der Verbindung %ld zur Datenbank '%-.64s'. Benutzer: '%-.64s' (%-.64s)"
- hun "Megszakitott kapcsolat %ld db: '%-.64s' adatbazishoz, felhasznalo: '%-.64s' (%s)"
- ita "Interrotta la connessione %ld al db: '%-.64s' utente: '%-.64s' (%s)"
- jpn "Aborted connection %ld to db: '%-.64s' user: '%-.64s' (%s)"
- kor "Ÿ̽ %ld ߴܵ : '%-.64s' : '%-.64s' (%s)"
- nor "Aborted connection %ld to db: '%-.64s' user: '%-.64s' (%s)"
- norwegian-ny "Aborted connection %ld to db: '%-.64s' user: '%-.64s' (%s)"
- pol "Aborted connection %ld to db: '%-.64s' user: '%-.64s' (%s)"
+ fre "Connection %ld avorte vers la bd: '%-.64s' utilisateur: '%-.32s' (%-.64s)"
+ ger "Abbruch der Verbindung %ld zur Datenbank '%-.64s'. Benutzer: '%-.32s' (%-.64s)"
+ hun "Megszakitott kapcsolat %ld db: '%-.64s' adatbazishoz, felhasznalo: '%-.32s' (%-.64s)"
+ ita "Interrotta la connessione %ld al db: '%-.64s' utente: '%-.32s' (%-.64s)"
+ jpn "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)"
+ kor "Ÿ̽ %ld ߴܵ : '%-.64s' : '%-.32s' (%-.64s)"
+ nor "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)"
+ norwegian-ny "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)"
+ pol "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)"
por "Conexo %ld abortou para o banco de dados '%-.64s' - usurio '%-.32s' (%-.64s)"
rum "Conectie terminata %ld la baza de date: '%-.64s' utilizator: '%-.32s' (%-.64s)"
rus " %ld '%-.64s' '%-.32s' (%-.64s)"
serbian "Prekinuta konekcija broj %ld ka bazi: '%-.64s' korisnik je bio: '%-.32s' (%-.64s)"
- slo "Aborted connection %ld to db: '%-.64s' user: '%-.64s' (%s)"
- spa "Conexin abortada %ld para db: '%-.64s' usuario: '%-.64s' (%s)"
- swe "Avbrt lnken fr trd %ld till db '%-.64s', anvndare '%-.64s' (%s)"
+ slo "Aborted connection %ld to db: '%-.64s' user: '%-.32s' (%-.64s)"
+ spa "Conexin abortada %ld para db: '%-.64s' usuario: '%-.32s' (%-.64s)"
+ swe "Avbrt lnken fr trd %ld till db '%-.64s', anvndare '%-.32s' (%-.64s)"
ukr " ' %ld : '%-.64s' : '%-.32s' (%-.64s)"
ER_NET_PACKET_TOO_LARGE 08S01
cze "Zji-Btn pchoz packet del ne 'max_allowed_packet'"
@@ -3986,7 +3986,7 @@ ER_CHECK_NOT_IMPLEMENTED 42000
por "O manipulador de tabela no suporta %s"
rum "The handler for the table doesn't support %s"
rus " : %s"
- serbian "Handler za ovu tabelu ne dozvoljava 'check' odnosno 'repair' komande"
+ serbian "Handler za ovu tabelu ne dozvoljava %s komande"
slo "The handler for the table doesn't support %s"
spa "El manipulador de la tabla no permite soporte para %s"
swe "Tabellhanteraren fr denna tabell kan inte gra %s"
@@ -4654,14 +4654,14 @@ ER_NO_DEFAULT 42000
spa "Variable '%-.64s' no tiene un valor patrn"
swe "Variabel '%-.64s' har inte ett DEFAULT-vrde"
ER_WRONG_VALUE_FOR_VAR 42000
- nla "Variabele '%-.64s' kan niet worden gewijzigd naar de waarde '%-.64s'"
- eng "Variable '%-.64s' can't be set to the value of '%-.64s'"
- ger "Variable '%-.64s' kann nicht auf '%-.64s' gesetzt werden"
- ita "Alla variabile '%-.64s' non puo' essere assegato il valore '%-.64s'"
- por "Varivel '%-.64s' no pode ser configurada para o valor de '%-.64s'"
- rus " '%-.64s' '%-.64s'"
- spa "Variable '%-.64s' no puede ser configurada para el valor de '%-.64s'"
- swe "Variabel '%-.64s' kan inte sttas till '%-.64s'"
+ nla "Variabele '%-.64s' kan niet worden gewijzigd naar de waarde '%-.200s'"
+ eng "Variable '%-.64s' can't be set to the value of '%-.200s'"
+ ger "Variable '%-.64s' kann nicht auf '%-.200s' gesetzt werden"
+ ita "Alla variabile '%-.64s' non puo' essere assegato il valore '%-.200s'"
+ por "Varivel '%-.64s' no pode ser configurada para o valor de '%-.200s'"
+ rus " '%-.64s' '%-.200s'"
+ spa "Variable '%-.64s' no puede ser configurada para el valor de '%-.200s'"
+ swe "Variabel '%-.64s' kan inte sttas till '%-.200s'"
ER_WRONG_TYPE_FOR_VAR 42000
nla "Foutief argumenttype voor variabele '%-.64s'"
eng "Incorrect argument type to variable '%-.64s'"
@@ -5220,9 +5220,9 @@ ER_FPARSER_BAD_HEADER
ukr "צ ̦ '%-.64s'"
ER_FPARSER_EOF_IN_COMMENT
eng "Unexpected end of file while parsing comment '%-.200s'"
- ger "Unerwartetes Dateiende beim Parsen des Kommentars '%-.64s'"
- rus " '%-.64s'"
- ukr "Ħ ˦ Ҧ '%-.64s'"
+ ger "Unerwartetes Dateiende beim Parsen des Kommentars '%-.200s'"
+ rus " '%-.200s'"
+ ukr "Ħ ˦ Ҧ '%-.200s'"
ER_FPARSER_ERROR_IN_PARAMETER
eng "Error while parsing parameter '%-.64s' (line: '%-.64s')"
ger "Fehler beim Parsen des Parameters '%-.64s' (Zeile: '%-.64s')"
@@ -5307,7 +5307,7 @@ ER_TRG_ON_VIEW_OR_TEMP_TABLE
ger "'%-.64s' des Triggers ist View oder temporre Tabelle"
ER_TRG_CANT_CHANGE_ROW
eng "Updating of %s row is not allowed in %strigger"
- ger "Aktualisieren einer %s-Zeile ist in einem %-Trigger nicht erlaubt"
+ ger "Aktualisieren einer %s-Zeile ist in einem %s-Trigger nicht erlaubt"
ER_TRG_NO_SUCH_ROW_IN_TRG
eng "There is no %s row in %s trigger"
ger "Es gibt keine %s-Zeile im %s-Trigger"
@@ -5389,7 +5389,7 @@ ER_LOGGING_PROHIBIT_CHANGING_OF
ger "Binrlogs und Replikation verhindern Wechsel des globalen Servers %s"
ER_NO_FILE_MAPPING
eng "Can't map file: %-.200s, errno: %d"
- ger "Kann Datei nicht abbilden: %-.64s, Fehler: %d"
+ ger "Kann Datei nicht abbilden: %-.200s, Fehler: %d"
ER_WRONG_MAGIC
eng "Wrong magic in %-.64s"
ger "Falsche magische Zahlen in %-.64s"
@@ -5524,7 +5524,7 @@ ER_CONNECT_TO_FOREIGN_DATA_SOURCE
eng "Unable to connect to foreign data source: %.64s"
ger "Kann nicht mit Fremddatenquelle verbinden: %.64s"
ER_QUERY_ON_FOREIGN_DATA_SOURCE
- eng "There was a problem processing the query on the foreign data source. Data source error: %-.64"
+ eng "There was a problem processing the query on the foreign data source. Data source error: %-.64s"
ger "Bei der Verarbeitung der Abfrage ist in der Fremddatenquelle ein Problem aufgetreten. Datenquellenfehlermeldung: %-.64s"
ER_FOREIGN_DATA_SOURCE_DOESNT_EXIST
eng "The foreign data source you are trying to reference does not exist. Data source error: %-.64s"
@@ -5606,7 +5606,7 @@ ER_SP_RECURSION_LIMIT
ger "Rekursionsgrenze %d (durch Variable max_sp_recursion_depth gegeben) wurde fr Routine %.64s berschritten"
ER_SP_PROC_TABLE_CORRUPT
eng "Failed to load routine %-.64s. The table mysql.proc is missing, corrupt, or contains bad data (internal code %d)"
- ger "Routine %-64s konnte nicht geladen werden. Die Tabelle mysql.proc fehlt, ist beschdigt, oder enthlt fehlerhaften Daten (interner Code: %d)"
+ ger "Routine %-.64s konnte nicht geladen werden. Die Tabelle mysql.proc fehlt, ist beschdigt, oder enthlt fehlerhaften Daten (interner Code: %d)"
ER_FOREIGN_SERVER_EXISTS
eng "The foreign server, %s, you are trying to create already exists."
ER_SP_WRONG_NAME 42000
diff --git a/sql/spatial.cc b/sql/spatial.cc
index 6cadb0f3aad..e0680ed182c 100644
--- a/sql/spatial.cc
+++ b/sql/spatial.cc
@@ -216,23 +216,24 @@ static uint32 wkb_get_uint(const char *ptr, Geometry::wkbByteOrder bo)
}
-int Geometry::create_from_wkb(Geometry_buffer *buffer,
- const char *wkb, uint32 len, String *res)
+Geometry *Geometry::create_from_wkb(Geometry_buffer *buffer,
+ const char *wkb, uint32 len, String *res)
{
uint32 geom_type;
Geometry *geom;
if (len < WKB_HEADER_SIZE)
- return 1;
+ return NULL;
geom_type= wkb_get_uint(wkb+1, (wkbByteOrder)wkb[0]);
if (!(geom= create_by_typeid(buffer, (int) geom_type)) ||
res->reserve(WKB_HEADER_SIZE, 512))
- return 1;
+ return NULL;
res->q_append((char) wkb_ndr);
res->q_append(geom_type);
- return geom->init_from_wkb(wkb+WKB_HEADER_SIZE, len - WKB_HEADER_SIZE,
- (wkbByteOrder) wkb[0], res);
+
+ return geom->init_from_wkb(wkb + WKB_HEADER_SIZE, len - WKB_HEADER_SIZE,
+ (wkbByteOrder) wkb[0], res) ? geom : NULL;
}
diff --git a/sql/spatial.h b/sql/spatial.h
index f0c8b7bba28..0c0452b5abc 100644
--- a/sql/spatial.h
+++ b/sql/spatial.h
@@ -246,8 +246,8 @@ public:
static Geometry *create_from_wkt(Geometry_buffer *buffer,
Gis_read_stream *trs, String *wkt,
bool init_stream=1);
- static int create_from_wkb(Geometry_buffer *buffer,
- const char *wkb, uint32 len, String *res);
+ static Geometry *create_from_wkb(Geometry_buffer *buffer, const char *wkb,
+ uint32 len, String *res);
int as_wkt(String *wkt, const char **end)
{
uint32 len= get_class_info()->m_name.length;
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index cdb75e763b6..444d4112005 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -261,7 +261,9 @@ THD::THD()
#endif
client_capabilities= 0; // minimalistic client
net.last_error[0]=0; // If error on boot
+#ifdef HAVE_QUERY_CACHE
query_cache_init_query(&net); // If error on boot
+#endif
ull=0;
system_thread= NON_SYSTEM_THREAD;
cleanup_done= abort_on_warning= no_warnings_for_error= 0;
@@ -1214,7 +1216,7 @@ static File create_file(THD *thd, char *path, sql_exchange *exchange,
IO_CACHE *cache)
{
File file;
- uint option= MY_UNPACK_FILENAME;
+ uint option= MY_UNPACK_FILENAME | MY_RELATIVE_PATH;
#ifdef DONT_ALLOW_FULL_LOAD_DATA_PATHS
option|= MY_REPLACE_DIR; // Force use of db directory
@@ -1228,7 +1230,15 @@ static File create_file(THD *thd, char *path, sql_exchange *exchange,
}
else
(void) fn_format(path, exchange->file_name, mysql_real_data_home, "", option);
-
+
+ if (opt_secure_file_priv &&
+ strncmp(opt_secure_file_priv, path, strlen(opt_secure_file_priv)))
+ {
+ /* Write only allowed to dir or subdir specified by secure_file_priv */
+ my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--secure-file-priv");
+ return -1;
+ }
+
if (!access(path, F_OK))
{
my_error(ER_FILE_EXISTS_ERROR, MYF(0), exchange->file_name);
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 10667eaf548..5ab019703f0 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -1711,7 +1711,7 @@ private:
/*
- Used to hold information about file and file structure in exchainge
+ Used to hold information about file and file structure in exchange
via non-DB file (...INTO OUTFILE..., ...LOAD DATA...)
XXX: We never call destructor for objects of this class.
*/
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index 802eed5116e..09066e875bd 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -305,6 +305,15 @@ bool mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
if ((stat_info.st_mode & S_IFIFO) == S_IFIFO)
is_fifo = 1;
#endif
+
+ if (opt_secure_file_priv &&
+ strncmp(opt_secure_file_priv, name, strlen(opt_secure_file_priv)))
+ {
+ /* Read only allowed from within dir specified by secure_file_priv */
+ my_error(ER_OPTION_PREVENTS_STATEMENT, MYF(0), "--secure-file-priv");
+ DBUG_RETURN(TRUE);
+ }
+
}
if ((file=my_open(name,O_RDONLY,MYF(MY_WME))) < 0)
DBUG_RETURN(TRUE);
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index 3dbc5c2601a..dcd01af6efc 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -369,6 +369,7 @@ pthread_handler_t handle_bootstrap(void *arg)
thd->query= thd->memdup_w_gap(buff, length+1,
thd->db_length+1+QUERY_CACHE_FLAGS_SIZE);
thd->query[length] = '\0';
+ DBUG_PRINT("query",("%-.4096s",thd->query));
/*
We don't need to obtain LOCK_thread_count here because in bootstrap
mode we have only one thread.
@@ -377,16 +378,26 @@ pthread_handler_t handle_bootstrap(void *arg)
thd->set_time();
mysql_parse(thd,thd->query,length);
close_thread_tables(thd); // Free tables
+
if (thd->is_fatal_error)
break;
+
+ if (thd->net.report_error)
+ {
+ /* The query failed, send error to log and abort bootstrap */
+ net_send_error(thd);
+ thd->fatal_error();
+ break;
+ }
+
free_root(thd->mem_root,MYF(MY_KEEP_PREALLOC));
#ifdef USING_TRANSACTIONS
free_root(&thd->transaction.mem_root,MYF(MY_KEEP_PREALLOC));
#endif
}
- /* thd->fatal_error should be set in case something went wrong */
end:
+ /* Remember the exit code of bootstrap */
bootstrap_error= thd->is_fatal_error;
net_end(&thd->net);
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index 5c61f172ecd..1e59a12bdc9 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -336,7 +336,7 @@ end:
tables - table list containing one open table for which the
trigger is created.
stmt_query - [OUT] after successful return, this string contains
- well-formed statement for creation this trigger.
+ well-formed statement for creating this trigger.
NOTE
- Assumes that trigger name is fully qualified.
@@ -376,7 +376,7 @@ bool Table_triggers_list::create_trigger(THD *thd, TABLE_LIST *tables,
}
/* We don't allow creation of several triggers of the same type yet */
- if (bodies[lex->trg_chistics.event][lex->trg_chistics.action_time])
+ if (bodies[lex->trg_chistics.event][lex->trg_chistics.action_time] != 0)
{
my_error(ER_NOT_SUPPORTED_YET, MYF(0),
"multiple triggers with the same action time"
@@ -669,7 +669,7 @@ static bool save_trigger_file(Table_triggers_list *triggers, const char *db,
tables - table list containing one open table for which trigger
is dropped.
stmt_query - [OUT] after successful return, this string contains
- well-formed statement for creation this trigger.
+ well-formed statement for deleting this trigger.
RETURN VALUE
False - success
diff --git a/sql/tztime.cc b/sql/tztime.cc
index e236ceb11d7..914c7be46de 100644
--- a/sql/tztime.cc
+++ b/sql/tztime.cc
@@ -780,6 +780,8 @@ gmt_sec_to_TIME(TIME *tmp, my_time_t sec_in_utc, const TIME_ZONE_INFO *sp)
static my_time_t
sec_since_epoch(int year, int mon, int mday, int hour, int min ,int sec)
{
+ /* Guard against my_time_t overflow(on system with 32 bit my_time_t) */
+ DBUG_ASSERT(!(year == TIMESTAMP_MAX_YEAR && mon == 1 && mday > 17));
#ifndef WE_WANT_TO_HANDLE_UNORMALIZED_DATES
/*
It turns out that only whenever month is normalized or unnormalized
@@ -960,12 +962,12 @@ TIME_to_gmt_sec(const TIME *t, const TIME_ZONE_INFO *sp,
*/
if (shift)
{
- if (local_t > (my_time_t) (TIMESTAMP_MAX_VALUE - shift*86400L +
+ if (local_t > (my_time_t) (TIMESTAMP_MAX_VALUE - shift * SECS_PER_DAY +
sp->revtis[i].rt_offset - saved_seconds))
{
DBUG_RETURN(0); /* my_time_t overflow */
}
- local_t+= shift*86400L;
+ local_t+= shift * SECS_PER_DAY;
}
if (sp->revtis[i].rt_type)
@@ -1353,6 +1355,7 @@ my_time_t
Time_zone_offset::TIME_to_gmt_sec(const TIME *t, my_bool *in_dst_time_gap) const
{
my_time_t local_t;
+ int shift= 0;
/*
Check timestamp range.we have to do this as calling function relies on
@@ -1361,10 +1364,24 @@ Time_zone_offset::TIME_to_gmt_sec(const TIME *t, my_bool *in_dst_time_gap) const
if (!validate_timestamp_range(t))
return 0;
- local_t= sec_since_epoch(t->year, t->month, t->day,
+ /*
+ Do a temporary shift of the boundary dates to avoid
+ overflow of my_time_t if the time value is near it's
+ maximum range
+ */
+ if ((t->year == TIMESTAMP_MAX_YEAR) && (t->month == 1) && t->day > 4)
+ shift= 2;
+
+ local_t= sec_since_epoch(t->year, t->month, (t->day - shift),
t->hour, t->minute, t->second) -
offset;
+ if (shift)
+ {
+ /* Add back the shifted time */
+ local_t+= shift * SECS_PER_DAY;
+ }
+
if (local_t >= TIMESTAMP_MIN_VALUE && local_t <= TIMESTAMP_MAX_VALUE)
return local_t;
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 14e93cca66f..e9309f4f8b8 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -179,6 +179,7 @@ my_bool innobase_file_per_table = FALSE;
my_bool innobase_locks_unsafe_for_binlog = FALSE;
my_bool innobase_rollback_on_timeout = FALSE;
my_bool innobase_create_status_file = FALSE;
+my_bool innobase_stats_on_metadata = TRUE;
static char *internal_innobase_data_file_path = NULL;
@@ -1564,6 +1565,8 @@ innobase_init(void *p)
srv_max_n_open_files = (ulint) innobase_open_files;
srv_innodb_status = (ibool) innobase_create_status_file;
+ srv_stats_on_metadata = (ibool) innobase_stats_on_metadata;
+
srv_print_verbose_log = mysqld_embedded ? 0 : 1;
/* Store the default charset-collation number of this MySQL
@@ -5522,15 +5525,17 @@ ha_innobase::info(
ib_table = prebuilt->table;
if (flag & HA_STATUS_TIME) {
- /* In sql_show we call with this flag: update then statistics
- so that they are up-to-date */
+ if (srv_stats_on_metadata) {
+ /* In sql_show we call with this flag: update then statistics
+ so that they are up-to-date */
- prebuilt->trx->op_info = (char*)"updating table statistics";
+ prebuilt->trx->op_info = (char*)"updating table statistics";
- dict_update_statistics(ib_table);
+ dict_update_statistics(ib_table);
- prebuilt->trx->op_info = (char*)
- "returning various info to MySQL";
+ prebuilt->trx->op_info = (char*)
+ "returning various info to MySQL";
+ }
my_snprintf(path, sizeof(path), "%s/%s%s",
mysql_data_home, ib_table->name, reg_ext);
diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h
index bc19f6fbf93..339238a584e 100644
--- a/storage/innobase/handler/ha_innodb.h
+++ b/storage/innobase/handler/ha_innodb.h
@@ -224,7 +224,8 @@ extern my_bool innobase_log_archive,
innobase_use_native_aio,
innobase_file_per_table, innobase_locks_unsafe_for_binlog,
innobase_rollback_on_timeout,
- innobase_create_status_file;
+ innobase_create_status_file,
+ innobase_stats_on_metadata;
extern "C" {
extern ulong srv_max_buf_pool_modified_pct;
extern ulong srv_max_purge_lag;
diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
index 9b617841f4c..1ad695f700c 100644
--- a/storage/innobase/include/srv0srv.h
+++ b/storage/innobase/include/srv0srv.h
@@ -124,6 +124,8 @@ extern ulint srv_fast_shutdown; /* If this is 1, do not do a
transactions). */
extern ibool srv_innodb_status;
+extern ibool srv_stats_on_metadata;
+
extern ibool srv_use_doublewrite_buf;
extern ibool srv_use_checksums;
diff --git a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
index 5d92b913934..2a177ed26cd 100644
--- a/storage/innobase/srv/srv0srv.c
+++ b/storage/innobase/srv/srv0srv.c
@@ -317,6 +317,8 @@ ulint srv_fast_shutdown = 0;
/* Generate a innodb_status.<pid> file */
ibool srv_innodb_status = FALSE;
+ibool srv_stats_on_metadata = TRUE;
+
ibool srv_use_doublewrite_buf = TRUE;
ibool srv_use_checksums = TRUE;