mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
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
This commit is contained in:
commit
a69a96e26a
196 changed files with 4052 additions and 4116 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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 \
|
||||
|
|
45
client/echo.c
Normal file
45
client/echo.c
Normal file
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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,6 +4479,40 @@ int parse_args(int argc, char **argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
Write the content of str into file
|
||||
|
||||
SYNOPSIS
|
||||
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_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);
|
||||
fname= buff;
|
||||
}
|
||||
fn_format(buff, fname, "", "", MY_UNPACK_FILENAME);
|
||||
|
||||
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
|
||||
|
@ -4194,21 +4526,7 @@ int parse_args(int argc, char **argv)
|
|||
|
||||
void str_to_file(const char *fname, char *str, int size)
|
||||
{
|
||||
int fd;
|
||||
char buff[FN_REFLEN];
|
||||
if (!test_if_hard_path(fname))
|
||||
{
|
||||
strxmov(buff, opt_basedir, fname, NullS);
|
||||
fname= buff;
|
||||
}
|
||||
fn_format(buff, fname, "", "", MY_UNPACK_FILENAME);
|
||||
|
||||
if ((fd= my_open(buff, O_WRONLY | O_CREAT | O_TRUNC,
|
||||
MYF(MY_WME | MY_FFNF))) < 0)
|
||||
die("Could not open %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));
|
||||
str_to_file2(fname, str, size, FALSE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
119
extra/comp_err.c
119
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(¤t_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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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
|
||||
|
||||
#endif
|
||||
Using the system built in time_t is not an option as
|
||||
we rely on the above requirements in the time functions
|
||||
|
||||
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
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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 'ƒ\'"
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
7
mysql-test/include/add_anonymous_users.inc
Normal file
7
mysql-test/include/add_anonymous_users.inc
Normal file
|
@ -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;
|
5
mysql-test/include/delete_anonymous_users.inc
Normal file
5
mysql-test/include/delete_anonymous_users.inc
Normal file
|
@ -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;
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
228
mysql-test/include/mix2_ucs2.inc
Normal file
228
mysql-test/include/mix2_ucs2.inc
Normal file
|
@ -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;
|
||||
|
|
@ -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 ;
|
||||
|
||||
|
||||
|
|
|
@ -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;
|
|
@ -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 ($) {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -11365,3 +11365,13 @@ select hex(a) from t1;
|
|||
hex(a)
|
||||
82A0
|
||||
drop table t1;
|
||||
ソ
|
||||
ソ
|
||||
c_cp932
|
||||
ソ
|
||||
ソ
|
||||
ソ
|
||||
繧ス
|
||||
繧ス
|
||||
ソ
|
||||
ソ
|
||||
|
|
|
@ -11365,3 +11365,13 @@ select hex(a) from t1;
|
|||
hex(a)
|
||||
82A0
|
||||
drop table t1;
|
||||
ソ
|
||||
ソ
|
||||
c_cp932
|
||||
ソ
|
||||
ソ
|
||||
ソ
|
||||
繧ス
|
||||
繧ス
|
||||
ソ
|
||||
ソ
|
||||
|
|
8
mysql-test/r/bootstrap.result
Normal file
8
mysql-test/r/bootstrap.result
Normal file
|
@ -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;
|
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
|
313
mysql-test/r/innodb-ucs2.result
Normal file
313
mysql-test/r/innodb-ucs2.result
Normal file
|
@ -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
|
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -383,3 +383,4 @@ id data
|
|||
7 130
|
||||
8 140
|
||||
9 150
|
||||
drop table t1;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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;
|
||||
|
|
312
mysql-test/r/mix2_myisam_ucs2.result
Normal file
312
mysql-test/r/mix2_myisam_ucs2.result
Normal file
|
@ -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;
|
|
@ -61,16 +61,6 @@ database()
|
|||
test
|
||||
unlock tables;
|
||||
drop table t1;
|
||||
ソ
|
||||
ソ
|
||||
c_cp932
|
||||
ソ
|
||||
ソ
|
||||
ソ
|
||||
繧ス
|
||||
繧ス
|
||||
ソ
|
||||
ソ
|
||||
+----------------------+------------+--------+
|
||||
| concat('>',col1,'<') | col2 | col3 |
|
||||
+----------------------+------------+--------+
|
||||
|
|
10
mysql-test/r/mysql_cp932.result
Normal file
10
mysql-test/r/mysql_cp932.result
Normal file
|
@ -0,0 +1,10 @@
|
|||
ソ
|
||||
ソ
|
||||
c_cp932
|
||||
ソ
|
||||
ソ
|
||||
ソ
|
||||
繧ス
|
||||
繧ス
|
||||
ソ
|
||||
ソ
|
|
@ -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
|
||||
|
|
19
mysql-test/r/mysqlbinlog-cp932.result
Normal file
19
mysql-test/r/mysqlbinlog-cp932.result
Normal file
|
@ -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
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Binary file not shown.
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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%';
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -31,3 +31,4 @@ a
|
|||
2
|
||||
DROP PROCEDURE IF EXISTS test.p1;
|
||||
DROP TABLE IF EXISTS test.t1;
|
||||
DROP TABLE IF EXISTS test.t2;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
14
mysql-test/r/sp-ucs2.result
Normal file
14
mysql-test/r/sp-ucs2.result
Normal file
|
@ -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|
|
|
@ -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|
|
||||
|
|
|
@ -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 #
|
||||
|
|
|
@ -78,3 +78,4 @@ alter table t1 modify a varchar(255);
|
|||
select length(a) from t1;
|
||||
length(a)
|
||||
6
|
||||
drop table t1;
|
||||
|
|
|
@ -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;
|
||||
|
|
46
mysql-test/t/bootstrap.test
Normal file
46
mysql-test/t/bootstrap.test
Normal file
|
@ -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;
|
||||
|
|
@ -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;
|
||||
|
||||
#
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -1 +1 @@
|
|||
--default-collation=ucs2_unicode_ci --default-character-set=ucs2
|
||||
--default-collation=ucs2_unicode_ci --default-character-set=ucs2,latin1
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
-- source include/have_ucs2.inc
|
||||
|
||||
#
|
||||
# MySQL Bug#15276: MySQL ignores collation-server
|
||||
#
|
||||
|
|
|
@ -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
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue