auto-merge
This commit is contained in:
commit
b925e40fc0
@ -47,8 +47,13 @@ check_cpu () {
|
|||||||
model_name=`sysctl -n hw.model`
|
model_name=`sysctl -n hw.model`
|
||||||
;;
|
;;
|
||||||
Darwin)
|
Darwin)
|
||||||
cpu_family=`uname -p`
|
cpu_family=`sysctl -n machdep.cpu.vendor`
|
||||||
model_name=`machine`
|
model_name=`sysctl -n machdep.cpu.brand_string`
|
||||||
|
if [ -z "$cpu_family" -o -z "$model_name" ]
|
||||||
|
then
|
||||||
|
cpu_family=`uname -p`
|
||||||
|
model_name=`machine`
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
cpu_family=`uname -m`;
|
cpu_family=`uname -m`;
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.7 FATAL_ERROR)
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
|
||||||
|
|
||||||
PROJECT(MySql)
|
PROJECT(MySql)
|
||||||
|
|
||||||
|
@ -71,7 +71,7 @@ mysqldump_SOURCES= mysqldump.c \
|
|||||||
$(top_srcdir)/mysys/mf_getdate.c
|
$(top_srcdir)/mysys/mf_getdate.c
|
||||||
|
|
||||||
mysqlimport_SOURCES= mysqlimport.c
|
mysqlimport_SOURCES= mysqlimport.c
|
||||||
|
mysqlimport_CFLAGS= -DTHREAD -UUNDEF_THREADS_HACK
|
||||||
mysqlimport_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
|
mysqlimport_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
|
||||||
@CLIENT_EXTRA_LDFLAGS@ \
|
@CLIENT_EXTRA_LDFLAGS@ \
|
||||||
$(LIBMYSQLCLIENT_LA) \
|
$(LIBMYSQLCLIENT_LA) \
|
||||||
@ -80,14 +80,14 @@ mysqlimport_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
|
|||||||
mysqlshow_SOURCES= mysqlshow.c
|
mysqlshow_SOURCES= mysqlshow.c
|
||||||
|
|
||||||
mysqlslap_SOURCES= mysqlslap.c
|
mysqlslap_SOURCES= mysqlslap.c
|
||||||
mysqlslap_CFLAGS= -DTHREAD -UUNDEF_THREADS_HACK
|
mysqlslap_CFLAGS= -DTHREAD -UMYSQL_CLIENT_NO_THREADS
|
||||||
mysqlslap_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
|
mysqlslap_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
|
||||||
@CLIENT_EXTRA_LDFLAGS@ \
|
@CLIENT_EXTRA_LDFLAGS@ \
|
||||||
$(LIBMYSQLCLIENT_LA) \
|
$(LIBMYSQLCLIENT_LA) \
|
||||||
$(top_builddir)/mysys/libmysys.a
|
$(top_builddir)/mysys/libmysys.a
|
||||||
|
|
||||||
mysqltest_SOURCES= mysqltest.cc
|
mysqltest_SOURCES= mysqltest.cc
|
||||||
mysqltest_CXXFLAGS= -DTHREAD -UUNDEF_THREADS_HACK
|
mysqltest_CXXFLAGS= -DTHREAD -UMYSQL_CLIENT_NO_THREADS
|
||||||
mysqltest_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
|
mysqltest_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
|
||||||
@CLIENT_EXTRA_LDFLAGS@ \
|
@CLIENT_EXTRA_LDFLAGS@ \
|
||||||
$(LIBMYSQLCLIENT_LA) \
|
$(LIBMYSQLCLIENT_LA) \
|
||||||
@ -99,7 +99,7 @@ mysql_upgrade_SOURCES= mysql_upgrade.c \
|
|||||||
$(top_srcdir)/mysys/my_getpagesize.c
|
$(top_srcdir)/mysys/my_getpagesize.c
|
||||||
|
|
||||||
# Fix for mit-threads
|
# Fix for mit-threads
|
||||||
DEFS = -DUNDEF_THREADS_HACK \
|
DEFS = -DMYSQL_CLIENT_NO_THREADS \
|
||||||
-DDEFAULT_MYSQL_HOME="\"$(prefix)\"" \
|
-DDEFAULT_MYSQL_HOME="\"$(prefix)\"" \
|
||||||
-DDATADIR="\"$(localstatedir)\""
|
-DDATADIR="\"$(localstatedir)\""
|
||||||
|
|
||||||
|
@ -170,6 +170,8 @@ static const char *xmlmeta[] = {
|
|||||||
"<", "<",
|
"<", "<",
|
||||||
">", ">",
|
">", ">",
|
||||||
"\"", """,
|
"\"", """,
|
||||||
|
/* Turn \0 into a space. Why not �? That's not valid XML or HTML. */
|
||||||
|
"\0", " ",
|
||||||
0, 0
|
0, 0
|
||||||
};
|
};
|
||||||
static const char *day_names[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
|
static const char *day_names[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
|
||||||
@ -2302,8 +2304,10 @@ extern "C" char **new_mysql_completion (const char *text, int start, int end);
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(USE_NEW_READLINE_INTERFACE)
|
#if defined(USE_NEW_READLINE_INTERFACE)
|
||||||
|
static int fake_magic_space(int, int);
|
||||||
extern "C" char *no_completion(const char*,int)
|
extern "C" char *no_completion(const char*,int)
|
||||||
#elif defined(USE_LIBEDIT_INTERFACE)
|
#elif defined(USE_LIBEDIT_INTERFACE)
|
||||||
|
static int fake_magic_space(const char *, int);
|
||||||
extern "C" int no_completion(const char*,int)
|
extern "C" int no_completion(const char*,int)
|
||||||
#else
|
#else
|
||||||
extern "C" char *no_completion()
|
extern "C" char *no_completion()
|
||||||
@ -2380,6 +2384,18 @@ static int not_in_history(const char *line)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(USE_NEW_READLINE_INTERFACE)
|
||||||
|
static int fake_magic_space(int, int)
|
||||||
|
#else
|
||||||
|
static int fake_magic_space(const char *, int)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
rl_insert(1, ' ');
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void initialize_readline (char *name)
|
static void initialize_readline (char *name)
|
||||||
{
|
{
|
||||||
/* Allow conditional parsing of the ~/.inputrc file. */
|
/* Allow conditional parsing of the ~/.inputrc file. */
|
||||||
@ -2389,12 +2405,15 @@ static void initialize_readline (char *name)
|
|||||||
#if defined(USE_NEW_READLINE_INTERFACE)
|
#if defined(USE_NEW_READLINE_INTERFACE)
|
||||||
rl_attempted_completion_function= (rl_completion_func_t*)&new_mysql_completion;
|
rl_attempted_completion_function= (rl_completion_func_t*)&new_mysql_completion;
|
||||||
rl_completion_entry_function= (rl_compentry_func_t*)&no_completion;
|
rl_completion_entry_function= (rl_compentry_func_t*)&no_completion;
|
||||||
|
|
||||||
|
rl_add_defun("magic-space", (rl_command_func_t *)&fake_magic_space, -1);
|
||||||
#elif defined(USE_LIBEDIT_INTERFACE)
|
#elif defined(USE_LIBEDIT_INTERFACE)
|
||||||
#ifdef HAVE_LOCALE_H
|
#ifdef HAVE_LOCALE_H
|
||||||
setlocale(LC_ALL,""); /* so as libedit use isprint */
|
setlocale(LC_ALL,""); /* so as libedit use isprint */
|
||||||
#endif
|
#endif
|
||||||
rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
|
rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
|
||||||
rl_completion_entry_function= &no_completion;
|
rl_completion_entry_function= &no_completion;
|
||||||
|
rl_add_defun("magic-space", (Function*)&fake_magic_space, -1);
|
||||||
#else
|
#else
|
||||||
rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
|
rl_attempted_completion_function= (CPPFunction*)&new_mysql_completion;
|
||||||
rl_completion_entry_function= &no_completion;
|
rl_completion_entry_function= &no_completion;
|
||||||
@ -3308,6 +3327,9 @@ print_table_data(MYSQL_RES *result)
|
|||||||
uint visible_length;
|
uint visible_length;
|
||||||
uint extra_padding;
|
uint extra_padding;
|
||||||
|
|
||||||
|
if (off)
|
||||||
|
(void) tee_fputs(" ", PAGER);
|
||||||
|
|
||||||
if (cur[off] == NULL)
|
if (cur[off] == NULL)
|
||||||
{
|
{
|
||||||
buffer= "NULL";
|
buffer= "NULL";
|
||||||
@ -3342,7 +3364,7 @@ print_table_data(MYSQL_RES *result)
|
|||||||
else
|
else
|
||||||
tee_print_sized_data(buffer, data_length, field_max_length+extra_padding, FALSE);
|
tee_print_sized_data(buffer, data_length, field_max_length+extra_padding, FALSE);
|
||||||
}
|
}
|
||||||
tee_fputs(" | ", PAGER);
|
tee_fputs(" |", PAGER);
|
||||||
}
|
}
|
||||||
(void) tee_fputs("\n", PAGER);
|
(void) tee_fputs("\n", PAGER);
|
||||||
}
|
}
|
||||||
@ -3482,11 +3504,29 @@ print_table_data_vertically(MYSQL_RES *result)
|
|||||||
mysql_field_seek(result,0);
|
mysql_field_seek(result,0);
|
||||||
tee_fprintf(PAGER,
|
tee_fprintf(PAGER,
|
||||||
"*************************** %d. row ***************************\n", row_count);
|
"*************************** %d. row ***************************\n", row_count);
|
||||||
|
|
||||||
|
ulong *lengths= mysql_fetch_lengths(result);
|
||||||
|
|
||||||
for (uint off=0; off < mysql_num_fields(result); off++)
|
for (uint off=0; off < mysql_num_fields(result); off++)
|
||||||
{
|
{
|
||||||
field= mysql_fetch_field(result);
|
field= mysql_fetch_field(result);
|
||||||
tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name);
|
tee_fprintf(PAGER, "%*s: ",(int) max_length,field->name);
|
||||||
tee_fprintf(PAGER, "%s\n",cur[off] ? (char*) cur[off] : "NULL");
|
if (cur[off])
|
||||||
|
{
|
||||||
|
unsigned int i;
|
||||||
|
const char *p;
|
||||||
|
|
||||||
|
for (i= 0, p= cur[off]; i < lengths[off]; i+= 1, p+= 1)
|
||||||
|
{
|
||||||
|
if (*p == '\0')
|
||||||
|
tee_putc((int)' ', PAGER);
|
||||||
|
else
|
||||||
|
tee_putc((int)*p, PAGER);
|
||||||
|
}
|
||||||
|
tee_putc('\n', PAGER);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
tee_fprintf(PAGER, "NULL\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3553,7 +3593,7 @@ xmlencode_print(const char *src, uint length)
|
|||||||
tee_fputs("NULL", PAGER);
|
tee_fputs("NULL", PAGER);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
for (const char *p = src; *p && length; *p++, length--)
|
for (const char *p = src; length; *p++, length--)
|
||||||
{
|
{
|
||||||
const char *t;
|
const char *t;
|
||||||
if ((t = array_value(xmlmeta, *p)))
|
if ((t = array_value(xmlmeta, *p)))
|
||||||
@ -3573,7 +3613,12 @@ safe_put_field(const char *pos,ulong length)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (opt_raw_data)
|
if (opt_raw_data)
|
||||||
tee_fputs(pos, PAGER);
|
{
|
||||||
|
unsigned long i;
|
||||||
|
/* Can't use tee_fputs(), it stops with NUL characters. */
|
||||||
|
for (i= 0; i < length; i++, pos++)
|
||||||
|
tee_putc(*pos, PAGER);
|
||||||
|
}
|
||||||
else for (const char *end=pos+length ; pos != end ; pos++)
|
else for (const char *end=pos+length ; pos != end ; pos++)
|
||||||
{
|
{
|
||||||
#ifdef USE_MB
|
#ifdef USE_MB
|
||||||
|
@ -253,8 +253,12 @@ get_one_option(int optid, const struct my_option *opt,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'b': /* --basedir */
|
case 'b': /* --basedir */
|
||||||
case 'v': /* --verbose */
|
|
||||||
case 'd': /* --datadir */
|
case 'd': /* --datadir */
|
||||||
|
fprintf(stderr, "%s: the '--%s' option is always ignored\n",
|
||||||
|
my_progname, optid == 'b' ? "basedir" : "datadir");
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
|
||||||
|
case 'v': /* --verbose */
|
||||||
case 'f': /* --force */
|
case 'f': /* --force */
|
||||||
add_option= FALSE;
|
add_option= FALSE;
|
||||||
break;
|
break;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <mysql.h>
|
#include <mysql.h>
|
||||||
|
|
||||||
#define ADMIN_VERSION "8.42"
|
#define ADMIN_VERSION "8.42"
|
||||||
#define MAX_MYSQL_VAR 256
|
#define MAX_MYSQL_VAR 512
|
||||||
#define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */
|
#define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */
|
||||||
#define MAX_TRUNC_LENGTH 3
|
#define MAX_TRUNC_LENGTH 3
|
||||||
|
|
||||||
@ -371,7 +371,7 @@ int main(int argc,char *argv[])
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
while (!interrupted && (!opt_count_iterations || nr_iterations))
|
while (!interrupted)
|
||||||
{
|
{
|
||||||
new_line = 0;
|
new_line = 0;
|
||||||
if ((error=execute_commands(&mysql,argc,commands)))
|
if ((error=execute_commands(&mysql,argc,commands)))
|
||||||
@ -395,11 +395,11 @@ int main(int argc,char *argv[])
|
|||||||
}
|
}
|
||||||
if (interval)
|
if (interval)
|
||||||
{
|
{
|
||||||
|
if (opt_count_iterations && --nr_iterations == 0)
|
||||||
|
break;
|
||||||
sleep(interval);
|
sleep(interval);
|
||||||
if (new_line)
|
if (new_line)
|
||||||
puts("");
|
puts("");
|
||||||
if (opt_count_iterations)
|
|
||||||
nr_iterations--;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
@ -743,6 +743,9 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
|||||||
mysql_error(mysql));
|
mysql_error(mysql));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DBUG_ASSERT(mysql_num_rows(res) < MAX_MYSQL_VAR);
|
||||||
|
|
||||||
if (!opt_vertical)
|
if (!opt_vertical)
|
||||||
print_header(res);
|
print_header(res);
|
||||||
else
|
else
|
||||||
|
@ -17,10 +17,8 @@
|
|||||||
|
|
||||||
TODO: print the catalog (some USE catalog.db ????).
|
TODO: print the catalog (some USE catalog.db ????).
|
||||||
|
|
||||||
Standalone program to read a MySQL binary log (or relay log);
|
Standalone program to read a MySQL binary log (or relay log).
|
||||||
can read files produced by 3.23, 4.x, 5.0 servers.
|
|
||||||
|
|
||||||
Can read binlogs from 3.23/4.x/5.0 and relay logs from 4.x/5.0.
|
|
||||||
Should be able to read any file of these categories, even with
|
Should be able to read any file of these categories, even with
|
||||||
--start-position.
|
--start-position.
|
||||||
An important fact: the Format_desc event of the log is at most the 3rd event
|
An important fact: the Format_desc event of the log is at most the 3rd event
|
||||||
@ -988,10 +986,13 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
#endif
|
#endif
|
||||||
{"base64-output", OPT_BASE64_OUTPUT_MODE,
|
{"base64-output", OPT_BASE64_OUTPUT_MODE,
|
||||||
|
/* 'unspec' is not mentioned because it is just a placeholder. */
|
||||||
"Determine when the output statements should be base64-encoded BINLOG "
|
"Determine when the output statements should be base64-encoded BINLOG "
|
||||||
"statements: 'never' disables it and works only for binlogs without "
|
"statements: 'never' disables it and works only for binlogs without "
|
||||||
"row-based events; 'auto' is the default and prints base64 only when "
|
"row-based events; 'auto' is the default and prints base64 only when "
|
||||||
"necessary (i.e., for row-based events and format description events); "
|
"necessary (i.e., for row-based events and format description events); "
|
||||||
|
"'decode-rows' suppresses BINLOG statements for row events, but does "
|
||||||
|
"not exit as an error if a row event is found, unlike 'never'; "
|
||||||
"'always' prints base64 whenever possible. 'always' is for debugging "
|
"'always' prints base64 whenever possible. 'always' is for debugging "
|
||||||
"only and should not be used in a production system. The default is "
|
"only and should not be used in a production system. The default is "
|
||||||
"'auto'. --base64-output is a short form for --base64-output=always."
|
"'auto'. --base64-output is a short form for --base64-output=always."
|
||||||
|
@ -442,7 +442,7 @@ static int process_selected_tables(char *db, char **table_names, int tables)
|
|||||||
{
|
{
|
||||||
if (use_db(db))
|
if (use_db(db))
|
||||||
return 1;
|
return 1;
|
||||||
if (opt_all_in_1)
|
if (opt_all_in_1 && what_to_do != DO_UPGRADE)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
We need table list in form `a`, `b`, `c`
|
We need table list in form `a`, `b`, `c`
|
||||||
@ -536,7 +536,7 @@ static int process_all_tables_in_db(char *database)
|
|||||||
|
|
||||||
num_columns= mysql_num_fields(res);
|
num_columns= mysql_num_fields(res);
|
||||||
|
|
||||||
if (opt_all_in_1)
|
if (opt_all_in_1 && what_to_do != DO_UPGRADE)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
We need table list in form `a`, `b`, `c`
|
We need table list in form `a`, `b`, `c`
|
||||||
|
@ -3137,6 +3137,12 @@ static void dump_table(char *table, char *db)
|
|||||||
dynstr_append_checked(&query_string, filename);
|
dynstr_append_checked(&query_string, filename);
|
||||||
dynstr_append_checked(&query_string, "'");
|
dynstr_append_checked(&query_string, "'");
|
||||||
|
|
||||||
|
dynstr_append_checked(&query_string, " /*!50137 CHARACTER SET ");
|
||||||
|
dynstr_append_checked(&query_string, default_charset == mysql_universal_client_charset ?
|
||||||
|
my_charset_bin.name : /* backward compatibility */
|
||||||
|
default_charset);
|
||||||
|
dynstr_append_checked(&query_string, " */");
|
||||||
|
|
||||||
if (fields_terminated || enclosed || opt_enclosed || escaped)
|
if (fields_terminated || enclosed || opt_enclosed || escaped)
|
||||||
dynstr_append_checked(&query_string, " FIELDS");
|
dynstr_append_checked(&query_string, " FIELDS");
|
||||||
|
|
||||||
@ -3821,6 +3827,10 @@ static int dump_all_databases()
|
|||||||
return 1;
|
return 1;
|
||||||
while ((row= mysql_fetch_row(tableres)))
|
while ((row= mysql_fetch_row(tableres)))
|
||||||
{
|
{
|
||||||
|
if (mysql_get_server_version(mysql) >= 50003 &&
|
||||||
|
!my_strcasecmp(&my_charset_latin1, row[0], "information_schema"))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (dump_all_tables_in_db(row[0]))
|
if (dump_all_tables_in_db(row[0]))
|
||||||
result=1;
|
result=1;
|
||||||
}
|
}
|
||||||
@ -3835,6 +3845,10 @@ static int dump_all_databases()
|
|||||||
}
|
}
|
||||||
while ((row= mysql_fetch_row(tableres)))
|
while ((row= mysql_fetch_row(tableres)))
|
||||||
{
|
{
|
||||||
|
if (mysql_get_server_version(mysql) >= 50003 &&
|
||||||
|
!my_strcasecmp(&my_charset_latin1, row[0], "information_schema"))
|
||||||
|
continue;
|
||||||
|
|
||||||
if (dump_all_views_in_db(row[0]))
|
if (dump_all_views_in_db(row[0]))
|
||||||
result=1;
|
result=1;
|
||||||
}
|
}
|
||||||
@ -3941,10 +3955,6 @@ int init_dumping_tables(char *qdatabase)
|
|||||||
|
|
||||||
static int init_dumping(char *database, int init_func(char*))
|
static int init_dumping(char *database, int init_func(char*))
|
||||||
{
|
{
|
||||||
if (mysql_get_server_version(mysql) >= 50003 &&
|
|
||||||
!my_strcasecmp(&my_charset_latin1, database, "information_schema"))
|
|
||||||
return 1;
|
|
||||||
|
|
||||||
if (mysql_select_db(mysql, database))
|
if (mysql_select_db(mysql, database))
|
||||||
{
|
{
|
||||||
DB_error(mysql, "when selecting the database");
|
DB_error(mysql, "when selecting the database");
|
||||||
@ -4003,6 +4013,7 @@ static int dump_all_tables_in_db(char *database)
|
|||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
if (opt_xml)
|
if (opt_xml)
|
||||||
print_xml_tag(md_result_file, "", "\n", "database", "name=", database, NullS);
|
print_xml_tag(md_result_file, "", "\n", "database", "name=", database, NullS);
|
||||||
|
|
||||||
if (lock_tables)
|
if (lock_tables)
|
||||||
{
|
{
|
||||||
DYNAMIC_STRING query;
|
DYNAMIC_STRING query;
|
||||||
@ -4236,7 +4247,10 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
|||||||
}
|
}
|
||||||
end= pos;
|
end= pos;
|
||||||
|
|
||||||
if (lock_tables)
|
/* Can't LOCK TABLES in INFORMATION_SCHEMA, so don't try. */
|
||||||
|
if (lock_tables &&
|
||||||
|
!(mysql_get_server_version(mysql) >= 50003 &&
|
||||||
|
!my_strcasecmp(&my_charset_latin1, db, "information_schema")))
|
||||||
{
|
{
|
||||||
if (mysql_real_query(mysql, lock_tables_query.str,
|
if (mysql_real_query(mysql, lock_tables_query.str,
|
||||||
lock_tables_query.length-1))
|
lock_tables_query.length-1))
|
||||||
@ -4802,7 +4816,8 @@ static my_bool get_view_structure(char *table, char* db)
|
|||||||
result_table);
|
result_table);
|
||||||
check_io(sql_file);
|
check_io(sql_file);
|
||||||
}
|
}
|
||||||
fprintf(sql_file, "/*!50001 DROP TABLE %s*/;\n", opt_quoted_table);
|
/* Table might not exist if this view was dumped with --tab. */
|
||||||
|
fprintf(sql_file, "/*!50001 DROP TABLE IF EXISTS %s*/;\n", opt_quoted_table);
|
||||||
if (opt_drop)
|
if (opt_drop)
|
||||||
{
|
{
|
||||||
fprintf(sql_file, "/*!50001 DROP VIEW IF EXISTS %s*/;\n",
|
fprintf(sql_file, "/*!50001 DROP VIEW IF EXISTS %s*/;\n",
|
||||||
|
@ -303,7 +303,8 @@ static int get_options(int *argc, char ***argv)
|
|||||||
static int write_to_table(char *filename, MYSQL *mysql)
|
static int write_to_table(char *filename, MYSQL *mysql)
|
||||||
{
|
{
|
||||||
char tablename[FN_REFLEN], hard_path[FN_REFLEN],
|
char tablename[FN_REFLEN], hard_path[FN_REFLEN],
|
||||||
sql_statement[FN_REFLEN*16+256], *end;
|
escaped_name[FN_REFLEN * 2 + 1],
|
||||||
|
sql_statement[FN_REFLEN*16+256], *end, *pos;
|
||||||
DBUG_ENTER("write_to_table");
|
DBUG_ENTER("write_to_table");
|
||||||
DBUG_PRINT("enter",("filename: %s",filename));
|
DBUG_PRINT("enter",("filename: %s",filename));
|
||||||
|
|
||||||
@ -338,15 +339,25 @@ static int write_to_table(char *filename, MYSQL *mysql)
|
|||||||
fprintf(stdout, "Loading data from SERVER file: %s into %s\n",
|
fprintf(stdout, "Loading data from SERVER file: %s into %s\n",
|
||||||
hard_path, tablename);
|
hard_path, tablename);
|
||||||
}
|
}
|
||||||
|
mysql_real_escape_string(mysql, escaped_name, hard_path,
|
||||||
|
(unsigned long) strlen(hard_path));
|
||||||
sprintf(sql_statement, "LOAD DATA %s %s INFILE '%s'",
|
sprintf(sql_statement, "LOAD DATA %s %s INFILE '%s'",
|
||||||
opt_low_priority ? "LOW_PRIORITY" : "",
|
opt_low_priority ? "LOW_PRIORITY" : "",
|
||||||
opt_local_file ? "LOCAL" : "", hard_path);
|
opt_local_file ? "LOCAL" : "", escaped_name);
|
||||||
end= strend(sql_statement);
|
end= strend(sql_statement);
|
||||||
if (replace)
|
if (replace)
|
||||||
end= strmov(end, " REPLACE");
|
end= strmov(end, " REPLACE");
|
||||||
if (ignore)
|
if (ignore)
|
||||||
end= strmov(end, " IGNORE");
|
end= strmov(end, " IGNORE");
|
||||||
end= strmov(strmov(end, " INTO TABLE "), tablename);
|
end= strmov(end, " INTO TABLE `");
|
||||||
|
/* Turn any ` into `` in table name. */
|
||||||
|
for (pos= tablename; *pos; pos++)
|
||||||
|
{
|
||||||
|
if (*pos == '`')
|
||||||
|
*end++= '`';
|
||||||
|
*end++= *pos;
|
||||||
|
}
|
||||||
|
end= strmov(end, "`");
|
||||||
|
|
||||||
if (fields_terminated || enclosed || opt_enclosed || escaped)
|
if (fields_terminated || enclosed || opt_enclosed || escaped)
|
||||||
end= strmov(end, " FIELDS");
|
end= strmov(end, " FIELDS");
|
||||||
|
@ -565,8 +565,7 @@ static struct my_option my_long_options[] =
|
|||||||
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"csv", OPT_SLAP_CSV,
|
{"csv", OPT_SLAP_CSV,
|
||||||
"Generate CSV output to named file or to stdout if no file is named.",
|
"Generate CSV output to named file or to stdout if no file is named.",
|
||||||
(uchar**) &opt_csv_str, (uchar**) &opt_csv_str, 0, GET_STR,
|
NULL, NULL, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
OPT_ARG, 0, 0, 0, 0, 0, 0},
|
|
||||||
#ifdef DBUG_OFF
|
#ifdef DBUG_OFF
|
||||||
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
||||||
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@ -740,6 +739,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||||||
DBUG_PUSH(argument ? argument : default_dbug_option);
|
DBUG_PUSH(argument ? argument : default_dbug_option);
|
||||||
debug_check_flag= 1;
|
debug_check_flag= 1;
|
||||||
break;
|
break;
|
||||||
|
case OPT_SLAP_CSV:
|
||||||
|
if (!argument)
|
||||||
|
argument= (char *)"-"; /* use stdout */
|
||||||
|
opt_csv_str= argument;
|
||||||
|
break;
|
||||||
#include <sslopt-case.h>
|
#include <sslopt-case.h>
|
||||||
case 'V':
|
case 'V':
|
||||||
print_version();
|
print_version();
|
||||||
|
@ -31,7 +31,7 @@ noinst_HEADERS = readline.h chardefs.h keymaps.h \
|
|||||||
|
|
||||||
EXTRA_DIST= emacs_keymap.c vi_keymap.c
|
EXTRA_DIST= emacs_keymap.c vi_keymap.c
|
||||||
|
|
||||||
DEFS = -DUNDEF_THREADS_HACK -DHAVE_CONFIG_H -DNO_KILL_INTR
|
DEFS = -DMYSQL_CLIENT_NO_THREADS -DHAVE_CONFIG_H -DNO_KILL_INTR
|
||||||
|
|
||||||
# Don't update the files from bitkeeper
|
# Don't update the files from bitkeeper
|
||||||
%::SCCS/s.%
|
%::SCCS/s.%
|
||||||
|
@ -10,7 +10,7 @@ AC_CANONICAL_SYSTEM
|
|||||||
#
|
#
|
||||||
# When changing major version number please also check switch statement
|
# When changing major version number please also check switch statement
|
||||||
# in mysqlbinlog::check_master_version().
|
# in mysqlbinlog::check_master_version().
|
||||||
AM_INIT_AUTOMAKE(mysql, 5.1.37)
|
AM_INIT_AUTOMAKE(mysql, 5.1.38)
|
||||||
AM_CONFIG_HEADER([include/config.h:config.h.in])
|
AM_CONFIG_HEADER([include/config.h:config.h.in])
|
||||||
|
|
||||||
PROTOCOL_VERSION=10
|
PROTOCOL_VERSION=10
|
||||||
|
@ -17,15 +17,6 @@
|
|||||||
|
|
||||||
#define BIG_TABLES
|
#define BIG_TABLES
|
||||||
|
|
||||||
#ifdef __WIN2000__
|
|
||||||
/* We have to do this define before including windows.h to get the AWE API
|
|
||||||
functions */
|
|
||||||
#define _WIN32_WINNT 0x0500
|
|
||||||
#else
|
|
||||||
/* Get NT 4.0 functions */
|
|
||||||
#define _WIN32_WINNT 0x0400
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
#if defined(_MSC_VER) && _MSC_VER >= 1400
|
||||||
/* Avoid endless warnings about sprintf() etc. being unsafe. */
|
/* Avoid endless warnings about sprintf() etc. being unsafe. */
|
||||||
#define _CRT_SECURE_NO_DEPRECATE 1
|
#define _CRT_SECURE_NO_DEPRECATE 1
|
||||||
|
@ -441,7 +441,8 @@ enum ha_base_keytype {
|
|||||||
#define HA_ERR_INITIALIZATION 174 /* Error during initialization */
|
#define HA_ERR_INITIALIZATION 174 /* Error during initialization */
|
||||||
#define HA_ERR_FILE_TOO_SHORT 175 /* File too short */
|
#define HA_ERR_FILE_TOO_SHORT 175 /* File too short */
|
||||||
#define HA_ERR_WRONG_CRC 176 /* Wrong CRC on page */
|
#define HA_ERR_WRONG_CRC 176 /* Wrong CRC on page */
|
||||||
#define HA_ERR_LAST 176 /* Copy of last error nr */
|
#define HA_ERR_TOO_MANY_CONCURRENT_TRXS 177 /*Too many active concurrent transactions */
|
||||||
|
#define HA_ERR_LAST 177 /* Copy of last error nr */
|
||||||
|
|
||||||
/* Number of different errors */
|
/* Number of different errors */
|
||||||
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
|
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
|
||||||
|
@ -276,7 +276,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The client defines this to avoid all thread code */
|
/* The client defines this to avoid all thread code */
|
||||||
#if defined(UNDEF_THREADS_HACK)
|
#if defined(MYSQL_CLIENT_NO_THREADS) || defined(UNDEF_THREADS_HACK)
|
||||||
#undef THREAD
|
#undef THREAD
|
||||||
#undef HAVE_LINUXTHREADS
|
#undef HAVE_LINUXTHREADS
|
||||||
#undef HAVE_NPTL
|
#undef HAVE_NPTL
|
||||||
|
@ -47,6 +47,7 @@ typedef struct st_mymerge_info /* Struct from h_info */
|
|||||||
ulonglong deleted; /* Deleted records in database */
|
ulonglong deleted; /* Deleted records in database */
|
||||||
ulonglong recpos; /* Pos for last used record */
|
ulonglong recpos; /* Pos for last used record */
|
||||||
ulonglong data_file_length;
|
ulonglong data_file_length;
|
||||||
|
ulonglong dupp_key_pos; /* Offset of the Duplicate key in the merge table */
|
||||||
uint reclength; /* Recordlength */
|
uint reclength; /* Recordlength */
|
||||||
int errkey; /* With key was dupplicated on err */
|
int errkey; /* With key was dupplicated on err */
|
||||||
uint options; /* HA_OPTION_... used */
|
uint options; /* HA_OPTION_... used */
|
||||||
@ -88,7 +89,8 @@ extern MYRG_INFO *myrg_parent_open(const char *parent_name,
|
|||||||
void *callback_param);
|
void *callback_param);
|
||||||
extern int myrg_attach_children(MYRG_INFO *m_info, int handle_locking,
|
extern int myrg_attach_children(MYRG_INFO *m_info, int handle_locking,
|
||||||
MI_INFO *(*callback)(void*),
|
MI_INFO *(*callback)(void*),
|
||||||
void *callback_param);
|
void *callback_param,
|
||||||
|
my_bool *need_compat_check);
|
||||||
extern int myrg_detach_children(MYRG_INFO *m_info);
|
extern int myrg_detach_children(MYRG_INFO *m_info);
|
||||||
extern int myrg_panic(enum ha_panic_function function);
|
extern int myrg_panic(enum ha_panic_function function);
|
||||||
extern int myrg_rfirst(MYRG_INFO *file,uchar *buf,int inx);
|
extern int myrg_rfirst(MYRG_INFO *file,uchar *buf,int inx);
|
||||||
|
@ -109,6 +109,14 @@ typedef my_socket YASSL_SOCKET_T;
|
|||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
|
|
||||||
|
enum enum_ssl_init_error
|
||||||
|
{
|
||||||
|
SSL_INITERR_NOERROR= 0, SSL_INITERR_CERT, SSL_INITERR_KEY,
|
||||||
|
SSL_INITERR_NOMATCH, SSL_INITERR_BAD_PATHS, SSL_INITERR_CIPHERS,
|
||||||
|
SSL_INITERR_MEMFAIL, SSL_INITERR_LASTERR
|
||||||
|
};
|
||||||
|
const char* sslGetErrString(enum enum_ssl_init_error err);
|
||||||
|
|
||||||
struct st_VioSSLFd
|
struct st_VioSSLFd
|
||||||
{
|
{
|
||||||
SSL_CTX *ssl_context;
|
SSL_CTX *ssl_context;
|
||||||
@ -124,7 +132,7 @@ struct st_VioSSLFd
|
|||||||
struct st_VioSSLFd
|
struct st_VioSSLFd
|
||||||
*new_VioSSLAcceptorFd(const char *key_file, const char *cert_file,
|
*new_VioSSLAcceptorFd(const char *key_file, const char *cert_file,
|
||||||
const char *ca_file,const char *ca_path,
|
const char *ca_file,const char *ca_path,
|
||||||
const char *cipher);
|
const char *cipher, enum enum_ssl_init_error* error);
|
||||||
void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd);
|
void free_vio_ssl_acceptor_fd(struct st_VioSSLFd *fd);
|
||||||
#endif /* HAVE_OPENSSL */
|
#endif /* HAVE_OPENSSL */
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
# This file is public domain and comes with NO WARRANTY of any kind
|
# This file is public domain and comes with NO WARRANTY of any kind
|
||||||
|
|
||||||
target = libmysqlclient.la
|
target = libmysqlclient.la
|
||||||
target_defs = -DUNDEF_THREADS_HACK -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@
|
target_defs = -DMYSQL_CLIENT_NO_THREADS -DDONT_USE_RAID @LIB_EXTRA_CCFLAGS@
|
||||||
LIBS = @CLIENT_LIBS@
|
LIBS = @CLIENT_LIBS@
|
||||||
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
|
INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \
|
||||||
$(openssl_includes) @ZLIB_INCLUDES@
|
$(openssl_includes) @ZLIB_INCLUDES@
|
||||||
@ -104,7 +104,7 @@ do-lib-dist:
|
|||||||
echo "# A very minimal Makefile to compile" > $$dir/Makefile; \
|
echo "# A very minimal Makefile to compile" > $$dir/Makefile; \
|
||||||
echo "# the minimized libmysql library" >> $$dir/Makefile; \
|
echo "# the minimized libmysql library" >> $$dir/Makefile; \
|
||||||
echo "# This file is autogenerated from Makefile.am" >> $$dir/Makefile; \
|
echo "# This file is autogenerated from Makefile.am" >> $$dir/Makefile; \
|
||||||
echo 'CFLAGS= -I. -DUNDEF_THREADS_HACK' >>$$dir/Makefile; \
|
echo 'CFLAGS= -I. -DMYSQL_CLIENT_NO_THREADS' >>$$dir/Makefile; \
|
||||||
echo "obj=$$objs" >>$$dir/Makefile; \
|
echo "obj=$$objs" >>$$dir/Makefile; \
|
||||||
echo 'all: libmysql.a' >>$$dir/Makefile; \
|
echo 'all: libmysql.a' >>$$dir/Makefile; \
|
||||||
echo 'libmysql.a: $$(obj)' >>$$dir/Makefile; \
|
echo 'libmysql.a: $$(obj)' >>$$dir/Makefile; \
|
||||||
|
@ -79,4 +79,4 @@ public:
|
|||||||
uint emb_count_querycache_size(THD *thd);
|
uint emb_count_querycache_size(THD *thd);
|
||||||
int emb_load_querycache_result(THD *thd, Querycache_stream *src);
|
int emb_load_querycache_result(THD *thd, Querycache_stream *src);
|
||||||
void emb_store_querycache_result(Querycache_stream *dst, THD* thd);
|
void emb_store_querycache_result(Querycache_stream *dst, THD* thd);
|
||||||
void net_send_eof(THD *thd, uint server_status, uint total_warn_count);
|
bool net_send_eof(THD *thd, uint server_status, uint total_warn_count);
|
||||||
|
@ -803,11 +803,11 @@ MYSQL_DATA *THD::alloc_new_dataset()
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
static
|
static
|
||||||
void
|
bool
|
||||||
write_eof_packet(THD *thd, uint server_status, uint total_warn_count)
|
write_eof_packet(THD *thd, uint server_status, uint total_warn_count)
|
||||||
{
|
{
|
||||||
if (!thd->mysql) // bootstrap file handling
|
if (!thd->mysql) // bootstrap file handling
|
||||||
return;
|
return FALSE;
|
||||||
/*
|
/*
|
||||||
The following test should never be true, but it's better to do it
|
The following test should never be true, but it's better to do it
|
||||||
because if 'is_fatal_error' is set the server is not going to execute
|
because if 'is_fatal_error' is set the server is not going to execute
|
||||||
@ -822,6 +822,7 @@ write_eof_packet(THD *thd, uint server_status, uint total_warn_count)
|
|||||||
*/
|
*/
|
||||||
thd->cur_data->embedded_info->warning_count=
|
thd->cur_data->embedded_info->warning_count=
|
||||||
(thd->spcont ? 0 : min(total_warn_count, 65535));
|
(thd->spcont ? 0 : min(total_warn_count, 65535));
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1032,31 +1033,34 @@ bool Protocol_binary::write()
|
|||||||
@sa Server implementation of net_send_ok in protocol.cc for
|
@sa Server implementation of net_send_ok in protocol.cc for
|
||||||
description of the arguments.
|
description of the arguments.
|
||||||
|
|
||||||
@return The function does not return errors.
|
@return
|
||||||
|
@retval TRUE An error occurred
|
||||||
|
@retval FALSE Success
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
bool
|
||||||
net_send_ok(THD *thd,
|
net_send_ok(THD *thd,
|
||||||
uint server_status, uint total_warn_count,
|
uint server_status, uint total_warn_count,
|
||||||
ha_rows affected_rows, ulonglong id, const char *message)
|
ha_rows affected_rows, ulonglong id, const char *message)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("emb_net_send_ok");
|
DBUG_ENTER("emb_net_send_ok");
|
||||||
MYSQL_DATA *data;
|
MYSQL_DATA *data;
|
||||||
|
bool error;
|
||||||
MYSQL *mysql= thd->mysql;
|
MYSQL *mysql= thd->mysql;
|
||||||
|
|
||||||
if (!mysql) // bootstrap file handling
|
if (!mysql) // bootstrap file handling
|
||||||
DBUG_VOID_RETURN;
|
DBUG_RETURN(FALSE);
|
||||||
if (!(data= thd->alloc_new_dataset()))
|
if (!(data= thd->alloc_new_dataset()))
|
||||||
return;
|
return TRUE;
|
||||||
data->embedded_info->affected_rows= affected_rows;
|
data->embedded_info->affected_rows= affected_rows;
|
||||||
data->embedded_info->insert_id= id;
|
data->embedded_info->insert_id= id;
|
||||||
if (message)
|
if (message)
|
||||||
strmake(data->embedded_info->info, message,
|
strmake(data->embedded_info->info, message,
|
||||||
sizeof(data->embedded_info->info)-1);
|
sizeof(data->embedded_info->info)-1);
|
||||||
|
|
||||||
write_eof_packet(thd, server_status, total_warn_count);
|
error= write_eof_packet(thd, server_status, total_warn_count);
|
||||||
thd->cur_data= 0;
|
thd->cur_data= 0;
|
||||||
DBUG_VOID_RETURN;
|
DBUG_RETURN(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1065,27 +1069,41 @@ net_send_ok(THD *thd,
|
|||||||
|
|
||||||
@sa net_send_ok
|
@sa net_send_ok
|
||||||
|
|
||||||
@return This function does not return errors.
|
@return
|
||||||
|
@retval TRUE An error occurred
|
||||||
|
@retval FALSE Success
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
bool
|
||||||
net_send_eof(THD *thd, uint server_status, uint total_warn_count)
|
net_send_eof(THD *thd, uint server_status, uint total_warn_count)
|
||||||
{
|
{
|
||||||
write_eof_packet(thd, server_status, total_warn_count);
|
bool error= write_eof_packet(thd, server_status, total_warn_count);
|
||||||
thd->cur_data= 0;
|
thd->cur_data= 0;
|
||||||
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void net_send_error_packet(THD *thd, uint sql_errno, const char *err)
|
bool net_send_error_packet(THD *thd, uint sql_errno, const char *err)
|
||||||
{
|
{
|
||||||
MYSQL_DATA *data= thd->cur_data ? thd->cur_data : thd->alloc_new_dataset();
|
MYSQL_DATA *data= thd->cur_data;
|
||||||
struct embedded_query_result *ei= data->embedded_info;
|
struct embedded_query_result *ei;
|
||||||
|
|
||||||
|
if (!thd->mysql) // bootstrap file handling
|
||||||
|
{
|
||||||
|
fprintf(stderr, "ERROR: %d %s\n", sql_errno, err);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!data)
|
||||||
|
data= thd->alloc_new_dataset();
|
||||||
|
|
||||||
|
ei= data->embedded_info;
|
||||||
ei->last_errno= sql_errno;
|
ei->last_errno= sql_errno;
|
||||||
strmake(ei->info, err, sizeof(ei->info)-1);
|
strmake(ei->info, err, sizeof(ei->info)-1);
|
||||||
strmov(ei->sqlstate, mysql_errno_to_sqlstate(sql_errno));
|
strmov(ei->sqlstate, mysql_errno_to_sqlstate(sql_errno));
|
||||||
ei->server_status= thd->server_status;
|
ei->server_status= thd->server_status;
|
||||||
thd->cur_data= 0;
|
thd->cur_data= 0;
|
||||||
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -258,3 +258,15 @@ dec $it;
|
|||||||
}
|
}
|
||||||
show master status /* must show new binlog index after rotating */;
|
show master status /* must show new binlog index after rotating */;
|
||||||
drop table t3;
|
drop table t3;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #45998: database crashes when running "create as select"
|
||||||
|
--echo #
|
||||||
|
CREATE DATABASE test1;
|
||||||
|
USE test1;
|
||||||
|
DROP DATABASE test1;
|
||||||
|
CREATE TABLE test.t1(a int);
|
||||||
|
INSERT INTO test.t1 VALUES (1), (2);
|
||||||
|
CREATE TABLE test.t2 SELECT * FROM test.t1;
|
||||||
|
USE test;
|
||||||
|
DROP TABLES t1, t2;
|
||||||
|
@ -0,0 +1,63 @@
|
|||||||
|
#
|
||||||
|
# BUG#45214
|
||||||
|
# The common part of the "rpl_get_master_version_and_clock" test.
|
||||||
|
# Restart slave under network disconnection between slave and master
|
||||||
|
# following the steps:
|
||||||
|
# 1 - Got DBUG_SYNC_POINT lock
|
||||||
|
# 2 - Set DBUG_SYNC_POINT before call mysql_real_query(...) function in get_master_version_and_clock(...) function and hang here
|
||||||
|
# 3 - shutdown master server for simulating network disconnection
|
||||||
|
# 4 - Release DBUG_SYNC_POINT lock
|
||||||
|
# 5 - Check if the slave I/O thread tries to reconnect to master.
|
||||||
|
#
|
||||||
|
# Note: Please make sure initialize the $debug_lock when call the test script.
|
||||||
|
#
|
||||||
|
connection slave;
|
||||||
|
if (`SELECT '$debug_lock' = ''`)
|
||||||
|
{
|
||||||
|
--die Cannot continue. Please set value for $debug_lock.
|
||||||
|
}
|
||||||
|
|
||||||
|
# Restart slave
|
||||||
|
--disable_warnings
|
||||||
|
stop slave;
|
||||||
|
source include/wait_for_slave_to_stop.inc;
|
||||||
|
start slave;
|
||||||
|
source include/wait_for_slave_to_start.inc;
|
||||||
|
connection master;
|
||||||
|
# Write file to make mysql-test-run.pl expect the "crash", but don't start
|
||||||
|
# it until it's told to
|
||||||
|
--write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
|
wait
|
||||||
|
EOF
|
||||||
|
|
||||||
|
# Send shutdown to the connected server and give
|
||||||
|
# it 10 seconds to die before zapping it
|
||||||
|
shutdown_server 10;
|
||||||
|
|
||||||
|
connection slave;
|
||||||
|
eval SELECT RELEASE_LOCK($debug_lock);
|
||||||
|
|
||||||
|
# Show slave last IO errno
|
||||||
|
connection slave;
|
||||||
|
source include/wait_for_slave_io_error.inc;
|
||||||
|
let $last_io_errno= query_get_value("show slave status", Last_IO_Errno, 1);
|
||||||
|
echo Slave_IO_Errno= $last_io_errno;
|
||||||
|
|
||||||
|
# Write file to make mysql-test-run.pl start up the server again
|
||||||
|
--append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
|
||||||
|
restart
|
||||||
|
EOF
|
||||||
|
|
||||||
|
connection master;
|
||||||
|
# Turn on reconnect
|
||||||
|
--enable_reconnect
|
||||||
|
|
||||||
|
# Call script that will poll the server waiting for it to be back online again
|
||||||
|
--source include/wait_until_connected_again.inc
|
||||||
|
|
||||||
|
# Turn off reconnect again
|
||||||
|
--disable_reconnect
|
||||||
|
|
||||||
|
connection slave;
|
||||||
|
source include/wait_for_slave_to_start.inc;
|
||||||
|
|
@ -1498,43 +1498,12 @@ INSERT INTO t1 VALUES
|
|||||||
(4,1,3,'pk',NULL),(5,1,3,'c2',NULL),
|
(4,1,3,'pk',NULL),(5,1,3,'c2',NULL),
|
||||||
(2,1,4,'c_extra',NULL),(3,1,4,'c_extra',NULL);
|
(2,1,4,'c_extra',NULL),(3,1,4,'c_extra',NULL);
|
||||||
|
|
||||||
EXPLAIN SELECT * FROM t1 WHERE tid = 1 AND vid = 3 ORDER BY idx DESC;
|
EXPLAIN SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE tid = 1 AND vid = 3 ORDER BY idx DESC;
|
||||||
|
|
||||||
SELECT * FROM t1 WHERE tid = 1 AND vid = 3 ORDER BY idx DESC;
|
SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE tid = 1 AND vid = 3 ORDER BY idx DESC;
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
#
|
|
||||||
# Bug#21704: Renaming column does not update FK definition.
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
|
||||||
# --disable_warnings
|
|
||||||
# DROP TABLE IF EXISTS t1;
|
|
||||||
# DROP TABLE IF EXISTS t2;
|
|
||||||
# --enable_warnings
|
|
||||||
#
|
|
||||||
# CREATE TABLE t1(id INT PRIMARY KEY)
|
|
||||||
# ENGINE=innodb;
|
|
||||||
#
|
|
||||||
# CREATE TABLE t2(
|
|
||||||
# t1_id INT PRIMARY KEY,
|
|
||||||
# CONSTRAINT fk1 FOREIGN KEY (t1_id) REFERENCES t1(id))
|
|
||||||
# ENGINE=innodb;
|
|
||||||
#
|
|
||||||
# --echo
|
|
||||||
#
|
|
||||||
# --disable_result_log
|
|
||||||
# --error ER_ERROR_ON_RENAME
|
|
||||||
# ALTER TABLE t1 CHANGE id id2 INT;
|
|
||||||
# --enable_result_log
|
|
||||||
#
|
|
||||||
# --echo
|
|
||||||
#
|
|
||||||
# DROP TABLE t2;
|
|
||||||
# DROP TABLE t1;
|
|
||||||
#
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug #44290: explain crashes for subquery with distinct in
|
--echo # Bug #44290: explain crashes for subquery with distinct in
|
||||||
--echo # SQL_SELECT::test_quick_select
|
--echo # SQL_SELECT::test_quick_select
|
||||||
|
@ -139,9 +139,9 @@ INSERT INTO global_suppressions VALUES
|
|||||||
("Cannot find or open table test\/bug29807 from"),
|
("Cannot find or open table test\/bug29807 from"),
|
||||||
|
|
||||||
/* innodb foreign key tests that fail in ALTER or RENAME produce this */
|
/* innodb foreign key tests that fail in ALTER or RENAME produce this */
|
||||||
("InnoDB: Error: in ALTER TABLE `test`.`t[12]`"),
|
("InnoDB: Error: in ALTER TABLE `test`.`t[123]`"),
|
||||||
("InnoDB: Error: in RENAME TABLE table `test`.`t1`"),
|
("InnoDB: Error: in RENAME TABLE table `test`.`t1`"),
|
||||||
("InnoDB: Error: table `test`.`t[12]` does not exist in the InnoDB internal"),
|
("InnoDB: Error: table `test`.`t[123]` does not exist in the InnoDB internal"),
|
||||||
|
|
||||||
/* Test case for Bug#14233 produces the following warnings: */
|
/* Test case for Bug#14233 produces the following warnings: */
|
||||||
("Stored routine 'test'.'bug14233_1': invalid value in column mysql.proc"),
|
("Stored routine 'test'.'bug14233_1': invalid value in column mysql.proc"),
|
||||||
|
@ -89,7 +89,7 @@ static void die(const char* fmt, ...)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void kill_child (void)
|
static void kill_child(void)
|
||||||
{
|
{
|
||||||
int status= 0;
|
int status= 0;
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ static void kill_child (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void handle_abort (int sig)
|
extern "C" void handle_abort(int sig)
|
||||||
{
|
{
|
||||||
message("Got signal %d, child_pid: %d, sending ABRT", sig, child_pid);
|
message("Got signal %d, child_pid: %d, sending ABRT", sig, child_pid);
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ static void handle_abort (int sig)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void handle_signal (int sig)
|
extern "C" void handle_signal(int sig)
|
||||||
{
|
{
|
||||||
message("Got signal %d, child_pid: %d", sig, child_pid);
|
message("Got signal %d, child_pid: %d", sig, child_pid);
|
||||||
terminated= 1;
|
terminated= 1;
|
||||||
@ -235,7 +235,8 @@ int main(int argc, char* const argv[] )
|
|||||||
|
|
||||||
// Signal that child is ready
|
// Signal that child is ready
|
||||||
buf= 37;
|
buf= 37;
|
||||||
write(pfd[1], &buf, 1);
|
if ((write(pfd[1], &buf, 1)) < 1)
|
||||||
|
die("Failed to signal that child is ready");
|
||||||
// Close write end
|
// Close write end
|
||||||
close(pfd[1]);
|
close(pfd[1]);
|
||||||
|
|
||||||
@ -246,8 +247,10 @@ int main(int argc, char* const argv[] )
|
|||||||
close(pfd[1]); // Close unused write end
|
close(pfd[1]); // Close unused write end
|
||||||
|
|
||||||
// Wait for child to signal it's ready
|
// Wait for child to signal it's ready
|
||||||
read(pfd[0], &buf, 1);
|
if ((read(pfd[0], &buf, 1)) < 1)
|
||||||
if(buf != 37)
|
die("Failed to read signal from child");
|
||||||
|
|
||||||
|
if (buf != 37)
|
||||||
die("Didn't get 37 from pipe");
|
die("Didn't get 37 from pipe");
|
||||||
close(pfd[0]); // Close read end
|
close(pfd[0]); // Close read end
|
||||||
|
|
||||||
@ -272,7 +275,7 @@ int main(int argc, char* const argv[] )
|
|||||||
if (WIFEXITED(status))
|
if (WIFEXITED(status))
|
||||||
{
|
{
|
||||||
// Process has exited, collect return status
|
// Process has exited, collect return status
|
||||||
int ret_code= WEXITSTATUS(status);
|
ret_code= WEXITSTATUS(status);
|
||||||
message("Child exit: %d", ret_code);
|
message("Child exit: %d", ret_code);
|
||||||
// Exit with exit status of the child
|
// Exit with exit status of the child
|
||||||
exit(ret_code);
|
exit(ret_code);
|
||||||
@ -287,6 +290,6 @@ int main(int argc, char* const argv[] )
|
|||||||
}
|
}
|
||||||
kill_child();
|
kill_child();
|
||||||
|
|
||||||
exit(1);
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
29
mysql-test/r/bug40113.result
Normal file
29
mysql-test/r/bug40113.result
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
#
|
||||||
|
# Bug #40113: Embedded SELECT inside UPDATE or DELETE can timeout
|
||||||
|
# without error
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a int, b int, PRIMARY KEY (a,b)) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 (a,b) VALUES (1070109,99);
|
||||||
|
CREATE TABLE t2 (b int, a int, PRIMARY KEY (b)) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t2 (b,a) VALUES (7,1070109);
|
||||||
|
SELECT * FROM t1;
|
||||||
|
a b
|
||||||
|
1070109 99
|
||||||
|
BEGIN;
|
||||||
|
SELECT b FROM t2 WHERE b=7 FOR UPDATE;
|
||||||
|
b
|
||||||
|
7
|
||||||
|
BEGIN;
|
||||||
|
SELECT b FROM t2 WHERE b=7 FOR UPDATE;
|
||||||
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||||
|
INSERT INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7));
|
||||||
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||||
|
UPDATE t1 SET a='7000000' WHERE a=(SELECT a FROM t2 WHERE b=7);
|
||||||
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||||
|
DELETE FROM t1 WHERE a=(SELECT a FROM t2 WHERE b=7);
|
||||||
|
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
|
||||||
|
SELECT * FROM t1;
|
||||||
|
a b
|
||||||
|
1070109 99
|
||||||
|
DROP TABLE t2, t1;
|
||||||
|
End of 5.0 tests
|
14
mysql-test/r/bug46080.result
Normal file
14
mysql-test/r/bug46080.result
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
#
|
||||||
|
# Bug #46080: group_concat(... order by) crashes server when
|
||||||
|
# sort_buffer_size cannot allocate
|
||||||
|
#
|
||||||
|
CREATE TABLE t1(a CHAR(255));
|
||||||
|
INSERT INTO t1 VALUES ('a');
|
||||||
|
SET @@SESSION.sort_buffer_size=5*16*1000000;
|
||||||
|
SET @@SESSION.max_heap_table_size=5*1000000;
|
||||||
|
# Must not crash.
|
||||||
|
SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a;
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET @@SESSION.sort_buffer_size=default;
|
||||||
|
SET @@SESSION.max_heap_table_size=default;
|
||||||
|
End of 5.0 tests
|
@ -1894,4 +1894,18 @@ DROP TABLE t1;
|
|||||||
create table `me:i`(id int);
|
create table `me:i`(id int);
|
||||||
drop table `me:i`;
|
drop table `me:i`;
|
||||||
|
|
||||||
|
# --
|
||||||
|
# -- Bug#45829: CREATE TABLE TRANSACTIONAL PAGE_CHECKSUM ROW_FORMAT=PAGE accepted, does nothing
|
||||||
|
# --
|
||||||
|
|
||||||
|
drop table if exists t1,t2,t3;
|
||||||
|
create table t1 (a int) transactional=0;
|
||||||
|
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 'transactional=0' at line 1
|
||||||
|
create table t2 (a int) page_checksum=1;
|
||||||
|
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'page_checksum=1' at line 1
|
||||||
|
create table t3 (a int) row_format=page;
|
||||||
|
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 'page' at line 1
|
||||||
|
|
||||||
|
# -- End of Bug#45829
|
||||||
|
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -383,3 +383,21 @@ select t2.* from (select * from t1) as A inner join t2 on A.ID = t2.FID;
|
|||||||
ID DATA FID
|
ID DATA FID
|
||||||
drop table t1, t2;
|
drop table t1, t2;
|
||||||
drop user mysqltest_1;
|
drop user mysqltest_1;
|
||||||
|
# End of 4.1 tests
|
||||||
|
SELECT 0 FROM
|
||||||
|
(SELECT 0) t01, (SELECT 0) t02, (SELECT 0) t03, (SELECT 0) t04, (SELECT 0) t05,
|
||||||
|
(SELECT 0) t06, (SELECT 0) t07, (SELECT 0) t08, (SELECT 0) t09, (SELECT 0) t10,
|
||||||
|
(SELECT 0) t11, (SELECT 0) t12, (SELECT 0) t13, (SELECT 0) t14, (SELECT 0) t15,
|
||||||
|
(SELECT 0) t16, (SELECT 0) t17, (SELECT 0) t18, (SELECT 0) t19, (SELECT 0) t20,
|
||||||
|
(SELECT 0) t21, (SELECT 0) t22, (SELECT 0) t23, (SELECT 0) t24, (SELECT 0) t25,
|
||||||
|
(SELECT 0) t26, (SELECT 0) t27, (SELECT 0) t28, (SELECT 0) t29, (SELECT 0) t30,
|
||||||
|
(SELECT 0) t31, (SELECT 0) t32, (SELECT 0) t33, (SELECT 0) t34, (SELECT 0) t35,
|
||||||
|
(SELECT 0) t36, (SELECT 0) t37, (SELECT 0) t38, (SELECT 0) t39, (SELECT 0) t40,
|
||||||
|
(SELECT 0) t41, (SELECT 0) t42, (SELECT 0) t43, (SELECT 0) t44, (SELECT 0) t45,
|
||||||
|
(SELECT 0) t46, (SELECT 0) t47, (SELECT 0) t48, (SELECT 0) t49, (SELECT 0) t50,
|
||||||
|
(SELECT 0) t51, (SELECT 0) t52, (SELECT 0) t53, (SELECT 0) t54, (SELECT 0) t55,
|
||||||
|
(SELECT 0) t56, (SELECT 0) t57, (SELECT 0) t58, (SELECT 0) t59, (SELECT 0) t60,
|
||||||
|
(SELECT 0) t61;
|
||||||
|
0
|
||||||
|
0
|
||||||
|
# End of 5.0 tests
|
||||||
|
@ -543,3 +543,11 @@ awrd bwrd cwrd
|
|||||||
awrd bwrd cwrd
|
awrd bwrd cwrd
|
||||||
awrd bwrd cwrd
|
awrd bwrd cwrd
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (col text, FULLTEXT KEY full_text (col));
|
||||||
|
PREPARE s FROM
|
||||||
|
"SELECT MATCH (col) AGAINST('findme') FROM t1 ORDER BY MATCH (col) AGAINST('findme')"
|
||||||
|
;
|
||||||
|
EXECUTE s;
|
||||||
|
MATCH (col) AGAINST('findme')
|
||||||
|
DEALLOCATE PREPARE s;
|
||||||
|
DROP TABLE t1;
|
||||||
|
55
mysql-test/r/innodb_bug21704.result
Normal file
55
mysql-test/r/innodb_bug21704.result
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
#
|
||||||
|
# Bug#21704: Renaming column does not update FK definition.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Test that it's not possible to rename columns participating in a
|
||||||
|
# foreign key (either in the referencing or referenced table).
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
DROP TABLE IF EXISTS t2;
|
||||||
|
DROP TABLE IF EXISTS t3;
|
||||||
|
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ROW_FORMAT=COMPACT ENGINE=INNODB;
|
||||||
|
CREATE TABLE t2 (a INT PRIMARY KEY, b INT,
|
||||||
|
CONSTRAINT fk1 FOREIGN KEY (a) REFERENCES t1(a))
|
||||||
|
ROW_FORMAT=COMPACT ENGINE=INNODB;
|
||||||
|
CREATE TABLE t3 (a INT PRIMARY KEY, b INT, KEY(b), C INT,
|
||||||
|
CONSTRAINT fk2 FOREIGN KEY (b) REFERENCES t3 (a))
|
||||||
|
ROW_FORMAT=COMPACT ENGINE=INNODB;
|
||||||
|
INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
|
||||||
|
INSERT INTO t2 VALUES (1,1),(2,2),(3,3);
|
||||||
|
INSERT INTO t3 VALUES (1,1,1),(2,2,2),(3,3,3);
|
||||||
|
|
||||||
|
# Test renaming the column in the referenced table.
|
||||||
|
|
||||||
|
ALTER TABLE t1 CHANGE a c INT;
|
||||||
|
ERROR HY000: Error on rename of '#sql-temporary' to './test/t1' (errno: 150)
|
||||||
|
# Ensure that online column rename works.
|
||||||
|
ALTER TABLE t1 CHANGE b c INT;
|
||||||
|
affected rows: 0
|
||||||
|
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||||
|
|
||||||
|
# Test renaming the column in the referencing table
|
||||||
|
|
||||||
|
ALTER TABLE t2 CHANGE a c INT;
|
||||||
|
ERROR HY000: Error on rename of '#sql-temporary' to './test/t2' (errno: 150)
|
||||||
|
# Ensure that online column rename works.
|
||||||
|
ALTER TABLE t2 CHANGE b c INT;
|
||||||
|
affected rows: 0
|
||||||
|
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||||
|
|
||||||
|
# Test with self-referential constraints
|
||||||
|
|
||||||
|
ALTER TABLE t3 CHANGE a d INT;
|
||||||
|
ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150)
|
||||||
|
ALTER TABLE t3 CHANGE b d INT;
|
||||||
|
ERROR HY000: Error on rename of '#sql-temporary' to './test/t3' (errno: 150)
|
||||||
|
# Ensure that online column rename works.
|
||||||
|
ALTER TABLE t3 CHANGE c d INT;
|
||||||
|
affected rows: 0
|
||||||
|
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||||
|
|
||||||
|
# Cleanup.
|
||||||
|
|
||||||
|
DROP TABLE t3;
|
||||||
|
DROP TABLE t2;
|
||||||
|
DROP TABLE t1;
|
@ -11,11 +11,15 @@ set global innodb_commit_concurrency=42;
|
|||||||
select @@innodb_commit_concurrency;
|
select @@innodb_commit_concurrency;
|
||||||
@@innodb_commit_concurrency
|
@@innodb_commit_concurrency
|
||||||
42
|
42
|
||||||
|
set global innodb_commit_concurrency=DEFAULT;
|
||||||
|
select @@innodb_commit_concurrency;
|
||||||
|
@@innodb_commit_concurrency
|
||||||
|
1
|
||||||
set global innodb_commit_concurrency=0;
|
set global innodb_commit_concurrency=0;
|
||||||
ERROR HY000: Incorrect arguments to SET
|
ERROR HY000: Incorrect arguments to SET
|
||||||
select @@innodb_commit_concurrency;
|
select @@innodb_commit_concurrency;
|
||||||
@@innodb_commit_concurrency
|
@@innodb_commit_concurrency
|
||||||
42
|
1
|
||||||
set global innodb_commit_concurrency=1;
|
set global innodb_commit_concurrency=1;
|
||||||
select @@innodb_commit_concurrency;
|
select @@innodb_commit_concurrency;
|
||||||
@@innodb_commit_concurrency
|
@@innodb_commit_concurrency
|
||||||
|
@ -16,3 +16,7 @@ set global innodb_commit_concurrency=0;
|
|||||||
select @@innodb_commit_concurrency;
|
select @@innodb_commit_concurrency;
|
||||||
@@innodb_commit_concurrency
|
@@innodb_commit_concurrency
|
||||||
0
|
0
|
||||||
|
set global innodb_commit_concurrency=DEFAULT;
|
||||||
|
select @@innodb_commit_concurrency;
|
||||||
|
@@innodb_commit_concurrency
|
||||||
|
0
|
||||||
|
@ -1701,10 +1701,10 @@ INSERT INTO t1 VALUES
|
|||||||
(4,1,2,'c2',NULL),(5,1,2,'c1',NULL),(2,1,3,'c2',NULL),(3,1,3,'c2',NULL),
|
(4,1,2,'c2',NULL),(5,1,2,'c1',NULL),(2,1,3,'c2',NULL),(3,1,3,'c2',NULL),
|
||||||
(4,1,3,'pk',NULL),(5,1,3,'c2',NULL),
|
(4,1,3,'pk',NULL),(5,1,3,'c2',NULL),
|
||||||
(2,1,4,'c_extra',NULL),(3,1,4,'c_extra',NULL);
|
(2,1,4,'c_extra',NULL),(3,1,4,'c_extra',NULL);
|
||||||
EXPLAIN SELECT * FROM t1 WHERE tid = 1 AND vid = 3 ORDER BY idx DESC;
|
EXPLAIN SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE tid = 1 AND vid = 3 ORDER BY idx DESC;
|
||||||
id select_type table type possible_keys key key_len ref rows Extra
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
1 SIMPLE t1 index vid PRIMARY 12 NULL 16 Using where
|
1 SIMPLE t1 index NULL PRIMARY 12 NULL 16 Using where
|
||||||
SELECT * FROM t1 WHERE tid = 1 AND vid = 3 ORDER BY idx DESC;
|
SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE tid = 1 AND vid = 3 ORDER BY idx DESC;
|
||||||
vid tid idx name type
|
vid tid idx name type
|
||||||
3 1 4 c_extra NULL
|
3 1 4 c_extra NULL
|
||||||
3 1 3 c2 NULL
|
3 1 3 c2 NULL
|
||||||
@ -2137,4 +2137,75 @@ GROUP BY t1.b;
|
|||||||
a b c d a b e a b
|
a b c d a b e a b
|
||||||
1 1 1 0 1 1 2 1 1
|
1 1 1 0 1 1 2 1 1
|
||||||
DROP TABLE t1, t2, t3;
|
DROP TABLE t1, t2, t3;
|
||||||
|
#
|
||||||
|
# Bug #45828: Optimizer won't use partial primary key if another
|
||||||
|
# index can prevent filesort
|
||||||
|
#
|
||||||
|
CREATE TABLE `t1` (
|
||||||
|
c1 int NOT NULL,
|
||||||
|
c2 int NOT NULL,
|
||||||
|
c3 int NOT NULL,
|
||||||
|
PRIMARY KEY (c1,c2),
|
||||||
|
KEY (c3)
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (5,2,1246276747);
|
||||||
|
INSERT INTO t1 VALUES (2,1,1246281721);
|
||||||
|
INSERT INTO t1 VALUES (7,3,1246281756);
|
||||||
|
INSERT INTO t1 VALUES (4,2,1246282139);
|
||||||
|
INSERT INTO t1 VALUES (3,1,1246282230);
|
||||||
|
INSERT INTO t1 VALUES (1,0,1246282712);
|
||||||
|
INSERT INTO t1 VALUES (8,3,1246282765);
|
||||||
|
INSERT INTO t1 SELECT c1+10,c2+10,c3+10 FROM t1;
|
||||||
|
INSERT INTO t1 SELECT c1+100,c2+100,c3+100 from t1;
|
||||||
|
INSERT INTO t1 SELECT c1+1000,c2+1000,c3+1000 from t1;
|
||||||
|
INSERT INTO t1 SELECT c1+10000,c2+10000,c3+10000 from t1;
|
||||||
|
INSERT INTO t1 SELECT c1+100000,c2+100000,c3+100000 from t1;
|
||||||
|
INSERT INTO t1 SELECT c1+1000000,c2+1000000,c3+1000000 from t1;
|
||||||
|
SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
|
||||||
|
c1 c2 c3
|
||||||
|
EXPLAIN SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 ref PRIMARY,c3 PRIMARY 4 const 1 Using where; Using filesort
|
||||||
|
EXPLAIN SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 ref PRIMARY PRIMARY 4 const 1 Using where; Using filesort
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
c1 int NOT NULL,
|
||||||
|
c2 int NOT NULL,
|
||||||
|
c3 int NOT NULL,
|
||||||
|
KEY (c1,c2),
|
||||||
|
KEY (c3)
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
explain SELECT * FROM t2 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t2 ref c1,c3 c1 4 const 1 Using where; Using filesort
|
||||||
|
DROP TABLE t1,t2;
|
||||||
|
#
|
||||||
|
# 36259: Optimizing with ORDER BY
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
a INT NOT NULL AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL,
|
||||||
|
d VARCHAR(5),
|
||||||
|
e INT NOT NULL,
|
||||||
|
PRIMARY KEY (a), KEY i2 (b,c,d)
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 (b,c,d,e) VALUES (1,1,'a',1), (2,2,'b',2);
|
||||||
|
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||||
|
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||||
|
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||||
|
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||||
|
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||||
|
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||||
|
EXPLAIN SELECT * FROM t1 WHERE b=1 AND c=1 ORDER BY a;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 ref i2 i2 8 const,const 1 Using where; Using filesort
|
||||||
|
EXPLAIN SELECT * FROM t1 FORCE INDEX(i2) WHERE b=1 and c=1 ORDER BY a;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 ref i2 i2 8 const,const 1 Using where; Using filesort
|
||||||
|
EXPLAIN SELECT * FROM t1 FORCE INDEX(PRIMARY) WHERE b=1 AND c=1 ORDER BY a;
|
||||||
|
id select_type table type possible_keys key key_len ref rows Extra
|
||||||
|
1 SIMPLE t1 index NULL PRIMARY 4 NULL 128 Using where
|
||||||
|
DROP TABLE t1;
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
@ -833,3 +833,16 @@ Table Op Msg_type Msg_text
|
|||||||
test.t2 check status OK
|
test.t2 check status OK
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
##################################################################
|
##################################################################
|
||||||
|
#
|
||||||
|
# Bug #46075: Assertion failed: 0, file .\protocol.cc, line 416
|
||||||
|
#
|
||||||
|
CREATE TABLE t1(a INT);
|
||||||
|
SET max_heap_table_size = 16384;
|
||||||
|
SET @old_myisam_data_pointer_size = @@myisam_data_pointer_size;
|
||||||
|
SET GLOBAL myisam_data_pointer_size = 2;
|
||||||
|
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
|
||||||
|
INSERT IGNORE INTO t1 SELECT t1.a FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6,t1 t7;
|
||||||
|
Got one of the listed errors
|
||||||
|
SET GLOBAL myisam_data_pointer_size = @old_myisam_data_pointer_size;
|
||||||
|
DROP TABLE t1;
|
||||||
|
End of 5.0 tests
|
||||||
|
@ -2115,6 +2115,52 @@ insert into m1 (col1) values (1);
|
|||||||
insert into m1 (col1) values (1);
|
insert into m1 (col1) values (1);
|
||||||
ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
|
ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
|
||||||
drop table m1, t1;
|
drop table m1, t1;
|
||||||
|
#
|
||||||
|
# Bug#45800 crash when replacing into a merge table and there is a duplicate
|
||||||
|
#
|
||||||
|
# Replace duplicate value in child table when merge table doesn't have key
|
||||||
|
CREATE TABLE t1 (c1 INT PRIMARY KEY) ENGINE=MyISAM;
|
||||||
|
CREATE TABLE m1 (c1 INT NOT NULL) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||||
|
INSERT INTO m1 VALUES (666);
|
||||||
|
SELECT * FROM m1;
|
||||||
|
c1
|
||||||
|
666
|
||||||
|
# insert the duplicate value into the merge table
|
||||||
|
REPLACE INTO m1 VALUES (666);
|
||||||
|
SELECT * FROM m1;
|
||||||
|
c1
|
||||||
|
666
|
||||||
|
DROP TABLE m1, t1;
|
||||||
|
# Insert... on duplicate key update (with duplicate values in the table)
|
||||||
|
CREATE TABLE t1 (c1 INT PRIMARY KEY) ENGINE=MyISAM;
|
||||||
|
CREATE TABLE m1 (c1 INT NOT NULL) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||||
|
INSERT INTO m1 VALUES (666);
|
||||||
|
SELECT * FROM m1;
|
||||||
|
c1
|
||||||
|
666
|
||||||
|
# insert the duplicate value into the merge table
|
||||||
|
INSERT INTO m1 VALUES (666) ON DUPLICATE KEY UPDATE c1=c1+1;
|
||||||
|
SELECT * FROM m1;
|
||||||
|
c1
|
||||||
|
667
|
||||||
|
DROP TABLE m1, t1;
|
||||||
|
# Insert duplicate value on MERGE table, where, MERGE has a key but MyISAM has more keys
|
||||||
|
CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE (c1), UNIQUE (c2));
|
||||||
|
CREATE TABLE m1 (c1 INT, c2 INT, UNIQUE (c1)) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||||
|
INSERT INTO m1 VALUES (1,2);
|
||||||
|
# insert the duplicate value into the merge table
|
||||||
|
INSERT INTO m1 VALUES (3,2);
|
||||||
|
ERROR 23000: Duplicate entry '' for key '*UNKNOWN*'
|
||||||
|
DROP TABLE m1,t1;
|
||||||
|
# Try to define MERGE and MyISAM with keys on different columns
|
||||||
|
CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE (c1));
|
||||||
|
CREATE TABLE m1 (c1 INT, c2 INT, UNIQUE (c2)) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||||
|
# Try accessing the merge table for inserts (error occurs)
|
||||||
|
INSERT INTO m1 VALUES (1,2);
|
||||||
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
|
INSERT INTO m1 VALUES (1,4);
|
||||||
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
|
DROP TABLE m1,t1;
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
col1 INT(10)
|
col1 INT(10)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||||
@ -2127,4 +2173,38 @@ SELECT * FROM m1;
|
|||||||
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
DROP TABLE m1, t1;
|
DROP TABLE m1, t1;
|
||||||
|
#
|
||||||
|
# Bug #45796: invalid memory reads and writes when altering merge and
|
||||||
|
# base tables
|
||||||
|
#
|
||||||
|
CREATE TABLE t1(c1 INT) ENGINE=MyISAM;
|
||||||
|
CREATE TABLE m1(c1 INT) ENGINE=MERGE UNION=(t1);
|
||||||
|
ALTER TABLE m1 ADD INDEX idx_c1(c1);
|
||||||
|
SELECT * FROM m1;
|
||||||
|
ERROR HY000: Unable to open underlying table which is differently defined or of non-MyISAM type or doesn't exist
|
||||||
|
ALTER TABLE t1 ADD INDEX idx_c1(c1);
|
||||||
|
SELECT * FROM m1;
|
||||||
|
c1
|
||||||
|
DROP TABLE m1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# Bug45781 infinite hang/crash in "opening tables" after handler tries to
|
||||||
|
# open merge table
|
||||||
|
#
|
||||||
|
DROP TABLE IF EXISTS m1,t1;
|
||||||
|
CREATE TABLE t1(a int)engine=myisam;
|
||||||
|
CREATE TABLE t2(a int)engine=myisam;
|
||||||
|
CREATE TABLE t3(a int)engine=myisam;
|
||||||
|
CREATE TABLE t4(a int)engine=myisam;
|
||||||
|
CREATE TABLE t5(a int)engine=myisam;
|
||||||
|
CREATE TABLE t6(a int)engine=myisam;
|
||||||
|
CREATE TABLE t7(a int)engine=myisam;
|
||||||
|
CREATE TABLE m1(a int)engine=merge union=(t1,t2,t3,t4,t5,t6,t7);
|
||||||
|
SELECT 1 FROM m1;
|
||||||
|
1
|
||||||
|
HANDLER m1 OPEN;
|
||||||
|
ERROR HY000: Table storage engine for 'm1' doesn't have this option
|
||||||
|
DROP TABLE m1,t1,t2,t3,t4,t5,t6,t7;
|
||||||
|
SELECT 1 FROM m1;
|
||||||
|
ERROR 42S02: Table 'test.m1' doesn't exist
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
@ -162,8 +162,8 @@ ERROR 1049 (42000) at line 1: Unknown database 'invalid'
|
|||||||
ERROR 1049 (42000) at line 1: Unknown database 'invalid'
|
ERROR 1049 (42000) at line 1: Unknown database 'invalid'
|
||||||
Test connect with dbname + hostname
|
Test connect with dbname + hostname
|
||||||
Test connect with dbname + _invalid_ hostname
|
Test connect with dbname + _invalid_ hostname
|
||||||
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
|
ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno)
|
||||||
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'invalid_hostname' (errno)
|
ERROR 2003 (HY000) at line 1: Can't connect to MySQL server on 'invalid_hostname' (errno)
|
||||||
The commands reported in the bug report
|
The commands reported in the bug report
|
||||||
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
|
ERROR 2005 (HY000) at line 1: Unknown MySQL server host 'cyril has found a bug :)XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' (errno)
|
||||||
Too long dbname
|
Too long dbname
|
||||||
@ -207,5 +207,27 @@ Warning (Code 1286): Unknown table engine 'nonexistent2'
|
|||||||
Warning (Code 1266): Using storage engine MyISAM for table 't2'
|
Warning (Code 1266): Using storage engine MyISAM for table 't2'
|
||||||
Error (Code 1050): Table 't2' already exists
|
Error (Code 1050): Table 't2' already exists
|
||||||
drop tables t1, t2;
|
drop tables t1, t2;
|
||||||
<TABLE BORDER=1><TR><TH><</TH></TR><TR><TD>< & ></TD></TR></TABLE>
|
<TABLE BORDER=1><TR><TH><</TH></TR><TR><TD>< & ></TD></TR></TABLE>create table t1 (a char(5));
|
||||||
|
insert into t1 values ('\0b\0');
|
||||||
|
a
|
||||||
|
\0b\0
|
||||||
|
a
|
||||||
|
\0b\0
|
||||||
|
+------+
|
||||||
|
| a |
|
||||||
|
+------+
|
||||||
|
| b |
|
||||||
|
+------+
|
||||||
|
*************************** 1. row ***************************
|
||||||
|
a: b
|
||||||
|
<TABLE BORDER=1><TR><TH>a</TH></TR><TR><TD> b </TD></TR></TABLE><?xml version="1.0"?>
|
||||||
|
|
||||||
|
<resultset statement="select a from t1
|
||||||
|
" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<row>
|
||||||
|
<field name="a"> b </field>
|
||||||
|
</row>
|
||||||
|
</resultset>
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
End of tests
|
End of tests
|
||||||
|
@ -186,4 +186,18 @@ a
|
|||||||
500
|
500
|
||||||
DROP DATABASE `a@b`;
|
DROP DATABASE `a@b`;
|
||||||
USE test;
|
USE test;
|
||||||
|
#
|
||||||
|
# Bug #31821: --all-in-1 and --fix-table-names don't work together
|
||||||
|
#
|
||||||
|
drop table if exists `#mysql50#t1-1`;
|
||||||
|
create table `#mysql50#t1-1` (a int);
|
||||||
|
show tables like 't1-1';
|
||||||
|
Tables_in_test (t1-1)
|
||||||
|
t1-1
|
||||||
|
drop table `t1-1`;
|
||||||
|
create table `#mysql50#t1-1` (a int);
|
||||||
|
show tables like 't1-1';
|
||||||
|
Tables_in_test (t1-1)
|
||||||
|
t1-1
|
||||||
|
drop table `t1-1`;
|
||||||
End of 5.1 tests
|
End of 5.1 tests
|
||||||
|
@ -1991,7 +1991,7 @@ SET character_set_client = utf8;
|
|||||||
`a` varchar(30)
|
`a` varchar(30)
|
||||||
) ENGINE=MyISAM */;
|
) ENGINE=MyISAM */;
|
||||||
SET character_set_client = @saved_cs_client;
|
SET character_set_client = @saved_cs_client;
|
||||||
/*!50001 DROP TABLE `v2`*/;
|
/*!50001 DROP TABLE IF EXISTS `v2`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
@ -2085,7 +2085,7 @@ SET character_set_client = utf8;
|
|||||||
`a` int(11)
|
`a` int(11)
|
||||||
) ENGINE=MyISAM */;
|
) ENGINE=MyISAM */;
|
||||||
SET character_set_client = @saved_cs_client;
|
SET character_set_client = @saved_cs_client;
|
||||||
/*!50001 DROP TABLE `v1`*/;
|
/*!50001 DROP TABLE IF EXISTS `v1`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
||||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
@ -2159,7 +2159,7 @@ SET character_set_client = utf8;
|
|||||||
`a` varchar(30)
|
`a` varchar(30)
|
||||||
) ENGINE=MyISAM */;
|
) ENGINE=MyISAM */;
|
||||||
SET character_set_client = @saved_cs_client;
|
SET character_set_client = @saved_cs_client;
|
||||||
/*!50001 DROP TABLE `v2`*/;
|
/*!50001 DROP TABLE IF EXISTS `v2`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
@ -2293,7 +2293,7 @@ SET character_set_client = utf8;
|
|||||||
`c` varchar(30)
|
`c` varchar(30)
|
||||||
) ENGINE=MyISAM */;
|
) ENGINE=MyISAM */;
|
||||||
SET character_set_client = @saved_cs_client;
|
SET character_set_client = @saved_cs_client;
|
||||||
/*!50001 DROP TABLE `v1`*/;
|
/*!50001 DROP TABLE IF EXISTS `v1`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
||||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
@ -2307,7 +2307,7 @@ SET character_set_client = @saved_cs_client;
|
|||||||
/*!50001 SET character_set_client = @saved_cs_client */;
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
/*!50001 SET character_set_results = @saved_cs_results */;
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
/*!50001 SET collation_connection = @saved_col_connection */;
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
/*!50001 DROP TABLE `v2`*/;
|
/*!50001 DROP TABLE IF EXISTS `v2`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
@ -2321,7 +2321,7 @@ SET character_set_client = @saved_cs_client;
|
|||||||
/*!50001 SET character_set_client = @saved_cs_client */;
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
/*!50001 SET character_set_results = @saved_cs_results */;
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
/*!50001 SET collation_connection = @saved_col_connection */;
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
/*!50001 DROP TABLE `v3`*/;
|
/*!50001 DROP TABLE IF EXISTS `v3`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v3`*/;
|
/*!50001 DROP VIEW IF EXISTS `v3`*/;
|
||||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
@ -3054,7 +3054,7 @@ SET character_set_client = utf8;
|
|||||||
SET character_set_client = @saved_cs_client;
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
USE `test`;
|
USE `test`;
|
||||||
/*!50001 DROP TABLE `v0`*/;
|
/*!50001 DROP TABLE IF EXISTS `v0`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v0`*/;
|
/*!50001 DROP VIEW IF EXISTS `v0`*/;
|
||||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
@ -3068,7 +3068,7 @@ USE `test`;
|
|||||||
/*!50001 SET character_set_client = @saved_cs_client */;
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
/*!50001 SET character_set_results = @saved_cs_results */;
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
/*!50001 SET collation_connection = @saved_col_connection */;
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
/*!50001 DROP TABLE `v1`*/;
|
/*!50001 DROP TABLE IF EXISTS `v1`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
||||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
@ -3082,7 +3082,7 @@ USE `test`;
|
|||||||
/*!50001 SET character_set_client = @saved_cs_client */;
|
/*!50001 SET character_set_client = @saved_cs_client */;
|
||||||
/*!50001 SET character_set_results = @saved_cs_results */;
|
/*!50001 SET character_set_results = @saved_cs_results */;
|
||||||
/*!50001 SET collation_connection = @saved_col_connection */;
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
/*!50001 DROP TABLE `v2`*/;
|
/*!50001 DROP TABLE IF EXISTS `v2`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
@ -3320,7 +3320,7 @@ insert into t values(5, 51);
|
|||||||
create view v1 as select qty, price, qty*price as value from t;
|
create view v1 as select qty, price, qty*price as value from t;
|
||||||
create view v2 as select qty from v1;
|
create view v2 as select qty from v1;
|
||||||
mysqldump {
|
mysqldump {
|
||||||
/*!50001 DROP TABLE `v1`*/;
|
/*!50001 DROP TABLE IF EXISTS `v1`*/;
|
||||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
@ -3335,7 +3335,7 @@ mysqldump {
|
|||||||
/*!50001 SET collation_connection = @saved_col_connection */;
|
/*!50001 SET collation_connection = @saved_col_connection */;
|
||||||
|
|
||||||
} mysqldump {
|
} mysqldump {
|
||||||
/*!50001 DROP TABLE `v2`*/;
|
/*!50001 DROP TABLE IF EXISTS `v2`*/;
|
||||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
@ -3434,7 +3434,7 @@ SET character_set_client = utf8;
|
|||||||
SET character_set_client = @saved_cs_client;
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
USE `mysqldump_test_db`;
|
USE `mysqldump_test_db`;
|
||||||
/*!50001 DROP TABLE `v1`*/;
|
/*!50001 DROP TABLE IF EXISTS `v1`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
||||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
@ -3496,7 +3496,7 @@ SET character_set_client = @saved_cs_client;
|
|||||||
USE `mysqldump_tables`;
|
USE `mysqldump_tables`;
|
||||||
|
|
||||||
USE `mysqldump_views`;
|
USE `mysqldump_views`;
|
||||||
/*!50001 DROP TABLE `nasishnasifu`*/;
|
/*!50001 DROP TABLE IF EXISTS `nasishnasifu`*/;
|
||||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
/*!50001 SET @saved_col_connection = @@collation_connection */;
|
||||||
@ -3563,9 +3563,6 @@ grant REPLICATION CLIENT on *.* to mysqltest_1@localhost;
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
drop user mysqltest_1@localhost;
|
drop user mysqltest_1@localhost;
|
||||||
#
|
#
|
||||||
# Bug#21527 mysqldump incorrectly tries to LOCK TABLES on the
|
|
||||||
# information_schema database.
|
|
||||||
#
|
|
||||||
# Bug#21424 mysqldump failing to export/import views
|
# Bug#21424 mysqldump failing to export/import views
|
||||||
#
|
#
|
||||||
create database mysqldump_myDB;
|
create database mysqldump_myDB;
|
||||||
@ -3605,6 +3602,39 @@ drop user myDB_User@localhost;
|
|||||||
drop database mysqldump_myDB;
|
drop database mysqldump_myDB;
|
||||||
use test;
|
use test;
|
||||||
#
|
#
|
||||||
|
# Bug #21527 mysqldump incorrectly tries to LOCK TABLES on the
|
||||||
|
# information_schema database.
|
||||||
|
#
|
||||||
|
# Bug #33762: mysqldump can not dump INFORMATION_SCHEMA
|
||||||
|
#
|
||||||
|
DROP TABLE IF EXISTS `TABLES`;
|
||||||
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
|
/*!40101 SET character_set_client = utf8 */;
|
||||||
|
CREATE TEMPORARY TABLE `TABLES` (
|
||||||
|
`TABLE_CATALOG` varchar(512) DEFAULT NULL,
|
||||||
|
`TABLE_SCHEMA` varchar(64) NOT NULL DEFAULT '',
|
||||||
|
`TABLE_NAME` varchar(64) NOT NULL DEFAULT '',
|
||||||
|
`TABLE_TYPE` varchar(64) NOT NULL DEFAULT '',
|
||||||
|
`ENGINE` varchar(64) DEFAULT NULL,
|
||||||
|
`VERSION` bigint(21) unsigned DEFAULT NULL,
|
||||||
|
`ROW_FORMAT` varchar(10) DEFAULT NULL,
|
||||||
|
`TABLE_ROWS` bigint(21) unsigned DEFAULT NULL,
|
||||||
|
`AVG_ROW_LENGTH` bigint(21) unsigned DEFAULT NULL,
|
||||||
|
`DATA_LENGTH` bigint(21) unsigned DEFAULT NULL,
|
||||||
|
`MAX_DATA_LENGTH` bigint(21) unsigned DEFAULT NULL,
|
||||||
|
`INDEX_LENGTH` bigint(21) unsigned DEFAULT NULL,
|
||||||
|
`DATA_FREE` bigint(21) unsigned DEFAULT NULL,
|
||||||
|
`AUTO_INCREMENT` bigint(21) unsigned DEFAULT NULL,
|
||||||
|
`CREATE_TIME` datetime DEFAULT NULL,
|
||||||
|
`UPDATE_TIME` datetime DEFAULT NULL,
|
||||||
|
`CHECK_TIME` datetime DEFAULT NULL,
|
||||||
|
`TABLE_COLLATION` varchar(32) DEFAULT NULL,
|
||||||
|
`CHECKSUM` bigint(21) unsigned DEFAULT NULL,
|
||||||
|
`CREATE_OPTIONS` varchar(255) DEFAULT NULL,
|
||||||
|
`TABLE_COMMENT` varchar(80) NOT NULL DEFAULT ''
|
||||||
|
) ENGINE=MEMORY DEFAULT CHARSET=utf8;
|
||||||
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
#
|
||||||
# Bug#19745 mysqldump --xml produces invalid xml
|
# Bug#19745 mysqldump --xml produces invalid xml
|
||||||
#
|
#
|
||||||
DROP TABLE IF EXISTS t1;
|
DROP TABLE IF EXISTS t1;
|
||||||
@ -3855,7 +3885,7 @@ SET character_set_client = utf8;
|
|||||||
`c` int(11)
|
`c` int(11)
|
||||||
) ENGINE=MyISAM */;
|
) ENGINE=MyISAM */;
|
||||||
SET character_set_client = @saved_cs_client;
|
SET character_set_client = @saved_cs_client;
|
||||||
/*!50001 DROP TABLE `v2`*/;
|
/*!50001 DROP TABLE IF EXISTS `v2`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
/*!50001 DROP VIEW IF EXISTS `v2`*/;
|
||||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
@ -4006,6 +4036,181 @@ UNLOCK TABLES;
|
|||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
create table t1 (a text , b text);
|
||||||
|
create table t2 (a text , b text);
|
||||||
|
insert t1 values ("Duck, Duck", "goose");
|
||||||
|
insert t1 values ("Duck, Duck", "pidgeon");
|
||||||
|
insert t2 values ("We the people", "in order to perform");
|
||||||
|
insert t2 values ("a more perfect", "union");
|
||||||
|
select * from t1;
|
||||||
|
a b
|
||||||
|
Duck, Duck goose
|
||||||
|
Duck, Duck pidgeon
|
||||||
|
select * from t2;
|
||||||
|
a b
|
||||||
|
We the people in order to perform
|
||||||
|
a more perfect union
|
||||||
|
test.t1: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0
|
||||||
|
test.t2: Records: 2 Deleted: 0 Skipped: 0 Warnings: 0
|
||||||
|
select * from t1;
|
||||||
|
a b
|
||||||
|
Duck, Duck goose
|
||||||
|
Duck, Duck pidgeon
|
||||||
|
Duck, Duck goose
|
||||||
|
Duck, Duck pidgeon
|
||||||
|
select * from t2;
|
||||||
|
a b
|
||||||
|
We the people in order to perform
|
||||||
|
a more perfect union
|
||||||
|
We the people in order to perform
|
||||||
|
a more perfect union
|
||||||
|
create table words(a varchar(255));
|
||||||
|
create table words2(b varchar(255));
|
||||||
|
select * from t1;
|
||||||
|
a b
|
||||||
|
Duck, Duck goose
|
||||||
|
Duck, Duck pidgeon
|
||||||
|
Duck, Duck goose
|
||||||
|
Duck, Duck pidgeon
|
||||||
|
Duck, Duck goose
|
||||||
|
Duck, Duck pidgeon
|
||||||
|
select * from t2;
|
||||||
|
a b
|
||||||
|
We the people in order to perform
|
||||||
|
a more perfect union
|
||||||
|
We the people in order to perform
|
||||||
|
a more perfect union
|
||||||
|
We the people in order to perform
|
||||||
|
a more perfect union
|
||||||
|
select * from words;
|
||||||
|
a
|
||||||
|
Aarhus
|
||||||
|
Aaron
|
||||||
|
Ababa
|
||||||
|
aback
|
||||||
|
abaft
|
||||||
|
abandon
|
||||||
|
abandoned
|
||||||
|
abandoning
|
||||||
|
abandonment
|
||||||
|
abandons
|
||||||
|
Aarhus
|
||||||
|
Aaron
|
||||||
|
Ababa
|
||||||
|
aback
|
||||||
|
abaft
|
||||||
|
abandon
|
||||||
|
abandoned
|
||||||
|
abandoning
|
||||||
|
abandonment
|
||||||
|
abandons
|
||||||
|
abase
|
||||||
|
abased
|
||||||
|
abasement
|
||||||
|
abasements
|
||||||
|
abases
|
||||||
|
abash
|
||||||
|
abashed
|
||||||
|
abashes
|
||||||
|
abashing
|
||||||
|
abasing
|
||||||
|
abate
|
||||||
|
abated
|
||||||
|
abatement
|
||||||
|
abatements
|
||||||
|
abater
|
||||||
|
abates
|
||||||
|
abating
|
||||||
|
Abba
|
||||||
|
abbe
|
||||||
|
abbey
|
||||||
|
abbeys
|
||||||
|
abbot
|
||||||
|
abbots
|
||||||
|
Abbott
|
||||||
|
abbreviate
|
||||||
|
abbreviated
|
||||||
|
abbreviates
|
||||||
|
abbreviating
|
||||||
|
abbreviation
|
||||||
|
abbreviations
|
||||||
|
Abby
|
||||||
|
abdomen
|
||||||
|
abdomens
|
||||||
|
abdominal
|
||||||
|
abduct
|
||||||
|
abducted
|
||||||
|
abduction
|
||||||
|
abductions
|
||||||
|
abductor
|
||||||
|
abductors
|
||||||
|
abducts
|
||||||
|
Abe
|
||||||
|
abed
|
||||||
|
Abel
|
||||||
|
Abelian
|
||||||
|
Abelson
|
||||||
|
Aberdeen
|
||||||
|
Abernathy
|
||||||
|
aberrant
|
||||||
|
aberration
|
||||||
|
select * from words2;
|
||||||
|
b
|
||||||
|
abase
|
||||||
|
abased
|
||||||
|
abasement
|
||||||
|
abasements
|
||||||
|
abases
|
||||||
|
abash
|
||||||
|
abashed
|
||||||
|
abashes
|
||||||
|
abashing
|
||||||
|
abasing
|
||||||
|
abate
|
||||||
|
abated
|
||||||
|
abatement
|
||||||
|
abatements
|
||||||
|
abater
|
||||||
|
abates
|
||||||
|
abating
|
||||||
|
Abba
|
||||||
|
abbe
|
||||||
|
abbey
|
||||||
|
abbeys
|
||||||
|
abbot
|
||||||
|
abbots
|
||||||
|
Abbott
|
||||||
|
abbreviate
|
||||||
|
abbreviated
|
||||||
|
abbreviates
|
||||||
|
abbreviating
|
||||||
|
abbreviation
|
||||||
|
abbreviations
|
||||||
|
Abby
|
||||||
|
abdomen
|
||||||
|
abdomens
|
||||||
|
abdominal
|
||||||
|
abduct
|
||||||
|
abducted
|
||||||
|
abduction
|
||||||
|
abductions
|
||||||
|
abductor
|
||||||
|
abductors
|
||||||
|
abducts
|
||||||
|
Abe
|
||||||
|
abed
|
||||||
|
Abel
|
||||||
|
Abelian
|
||||||
|
Abelson
|
||||||
|
Aberdeen
|
||||||
|
Abernathy
|
||||||
|
aberrant
|
||||||
|
aberration
|
||||||
|
drop table words;
|
||||||
|
mysql-import: Error: 1146, Table 'test.words' doesn't exist, when using table: words
|
||||||
|
drop table t1;
|
||||||
|
drop table t2;
|
||||||
|
drop table words2;
|
||||||
#
|
#
|
||||||
# Bug#16853 mysqldump doesn't show events
|
# Bug#16853 mysqldump doesn't show events
|
||||||
#
|
#
|
||||||
@ -4099,7 +4304,7 @@ SET character_set_client = utf8;
|
|||||||
SET character_set_client = @saved_cs_client;
|
SET character_set_client = @saved_cs_client;
|
||||||
|
|
||||||
USE `mysqldump_test_db`;
|
USE `mysqldump_test_db`;
|
||||||
/*!50001 DROP TABLE `v1`*/;
|
/*!50001 DROP TABLE IF EXISTS `v1`*/;
|
||||||
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
/*!50001 DROP VIEW IF EXISTS `v1`*/;
|
||||||
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
/*!50001 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
/*!50001 SET @saved_cs_results = @@character_set_results */;
|
||||||
@ -4225,6 +4430,25 @@ DROP DATABASE mysqldump_test_db;
|
|||||||
|
|
||||||
# -- End of test case for Bug#32538.
|
# -- End of test case for Bug#32538.
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#37377 Incorrect DROP TABLE statement in dump of a VIEW using --tab
|
||||||
|
#
|
||||||
|
create table t1 (a int);
|
||||||
|
create view v1 as select a from t1;
|
||||||
|
drop view v1;
|
||||||
|
drop table t1;
|
||||||
|
drop view v1;
|
||||||
|
drop table t1;
|
||||||
|
#
|
||||||
|
# Bug#28071 mysqlimport does not quote or escape table name
|
||||||
|
#
|
||||||
|
drop table if exists `load`;
|
||||||
|
create table `load` (a varchar(255));
|
||||||
|
test.load: Records: 70 Deleted: 0 Skipped: 0 Warnings: 0
|
||||||
|
select count(*) from `load`;
|
||||||
|
count(*)
|
||||||
|
70
|
||||||
|
drop table `load`;
|
||||||
SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT;
|
SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT;
|
||||||
|
|
||||||
Bug #34861 - mysqldump with --tab gives weird output for triggers.
|
Bug #34861 - mysqldump with --tab gives weird output for triggers.
|
||||||
@ -4278,5 +4502,64 @@ DROP PROCEDURE IF EXISTS pr1;
|
|||||||
DROP TRIGGER IF EXISTS tr1;
|
DROP TRIGGER IF EXISTS tr1;
|
||||||
DROP TABLE IF EXISTS t1;
|
DROP TABLE IF EXISTS t1;
|
||||||
#
|
#
|
||||||
|
# Bug #30946: mysqldump silently ignores --default-character-set
|
||||||
|
# when used with --tab
|
||||||
|
#
|
||||||
|
# Also see outfile_loaddata.test
|
||||||
|
#
|
||||||
|
SET NAMES utf8;
|
||||||
|
CREATE TABLE t1 (a INT, b CHAR(10) CHARSET koi8r, c CHAR(10) CHARSET latin1);
|
||||||
|
CREATE TABLE t2 LIKE t1;
|
||||||
|
INSERT INTO t1 VALUES (1, 'ABC-Ð<>БВ', 'DEF-ÂÃÄ'), (2, NULL, NULL);
|
||||||
|
# error on multi-character ENCLOSED/ESCAPED BY
|
||||||
|
# default '--default-charset' (binary):
|
||||||
|
##################################################
|
||||||
|
1 ABC-áâ÷ DEF-ÂÃÄ
|
||||||
|
2 \N \N
|
||||||
|
##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary;
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
a b c
|
||||||
|
1 ABC-Ð<>БВ DEF-ÂÃÄ
|
||||||
|
2 NULL NULL
|
||||||
|
# utf8:
|
||||||
|
##################################################
|
||||||
|
1 ABC-Ð<>БВ DEF-ÂÃÄ
|
||||||
|
2 \N \N
|
||||||
|
##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET utf8;
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
a b c
|
||||||
|
1 ABC-Ð<>БВ DEF-ÂÃÄ
|
||||||
|
2 NULL NULL
|
||||||
|
# latin1 (data corruption is expected):
|
||||||
|
##################################################
|
||||||
|
1 ABC-??? DEF-ÂÃÄ
|
||||||
|
2 \N \N
|
||||||
|
##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET latin1 ;
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
a b c
|
||||||
|
1 ABC-??? DEF-ÂÃÄ
|
||||||
|
1 ABC-Ð<>БВ DEF-ÂÃÄ
|
||||||
|
2 NULL NULL
|
||||||
|
# koi8r (data corruption is expected):
|
||||||
|
##################################################
|
||||||
|
1 ABC-áâ÷ DEF-???
|
||||||
|
2 \N \N
|
||||||
|
##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET koi8r;
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
a b c
|
||||||
|
1 ABC-Ð<>БВ DEF-???
|
||||||
|
1 ABC-Ð<>БВ DEF-ÂÃÄ
|
||||||
|
2 NULL NULL
|
||||||
|
SET NAMES default;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
#
|
||||||
# End of 5.1 tests
|
# End of 5.1 tests
|
||||||
#
|
#
|
||||||
|
@ -91,13 +91,152 @@ SELECT HEX(c1) FROM t1;
|
|||||||
HEX(c1)
|
HEX(c1)
|
||||||
C3
|
C3
|
||||||
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug32533.txt' FIELDS ENCLOSED BY 0xC3 FROM t1;
|
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/bug32533.txt' FIELDS ENCLOSED BY 0xC3 FROM t1;
|
||||||
|
Warnings:
|
||||||
|
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||||
TRUNCATE t1;
|
TRUNCATE t1;
|
||||||
SELECT HEX(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug32533.txt'));
|
SELECT HEX(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug32533.txt'));
|
||||||
HEX(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug32533.txt'))
|
HEX(LOAD_FILE('MYSQLTEST_VARDIR/tmp/bug32533.txt'))
|
||||||
C35CC3C30A
|
C35CC3C30A
|
||||||
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug32533.txt' INTO TABLE t1 FIELDS ENCLOSED BY 0xC3;
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/bug32533.txt' INTO TABLE t1 FIELDS ENCLOSED BY 0xC3;
|
||||||
|
Warnings:
|
||||||
|
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||||
SELECT HEX(c1) FROM t1;
|
SELECT HEX(c1) FROM t1;
|
||||||
HEX(c1)
|
HEX(c1)
|
||||||
C3
|
C3
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
# End of 5.0 tests.
|
# End of 5.0 tests.
|
||||||
|
#
|
||||||
|
# Bug #30946: mysqldump silently ignores --default-character-set
|
||||||
|
# when used with --tab
|
||||||
|
#
|
||||||
|
# Also see mysqldump.test
|
||||||
|
#
|
||||||
|
SET NAMES utf8;
|
||||||
|
CREATE TABLE t1 (a INT, b CHAR(10) CHARSET koi8r, c CHAR(10) CHARSET latin1);
|
||||||
|
CREATE TABLE t2 LIKE t1;
|
||||||
|
INSERT INTO t1 VALUES (1, 'ABC-Ð<>БВ', 'DEF-ÂÃÄ'), (2, NULL, NULL);
|
||||||
|
# Error on multi-character ENCLOSED/ESCAPED BY
|
||||||
|
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS ENCLOSED BY '12345';
|
||||||
|
ERROR 42000: Field separator argument is not what is expected; check the manual
|
||||||
|
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS ESCAPED BY '12345';
|
||||||
|
ERROR 42000: Field separator argument is not what is expected; check the manual
|
||||||
|
# "Not implemented" warning on multibyte ENCLOSED/ESCAPED BY character,
|
||||||
|
# LOAD DATA rises error or has unpredictable result -- to be fixed later
|
||||||
|
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS ENCLOSED BY 'ÑŠ';
|
||||||
|
Warnings:
|
||||||
|
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||||
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary FIELDS ENCLOSED BY 'ÑŠ';
|
||||||
|
ERROR 42000: Field separator argument is not what is expected; check the manual
|
||||||
|
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS ESCAPED BY 'ÑŠ';
|
||||||
|
Warnings:
|
||||||
|
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||||
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary FIELDS ESCAPED BY 'ÑŠ';
|
||||||
|
ERROR 42000: Field separator argument is not what is expected; check the manual
|
||||||
|
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FIELDS TERMINATED BY 'ÑŠ';
|
||||||
|
Warnings:
|
||||||
|
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||||
|
##################################################
|
||||||
|
1ÑŠABC-áâ÷ÑŠDEF-ÂÃÄ
|
||||||
|
2ÑŠ\NÑŠ\N
|
||||||
|
##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary FIELDS TERMINATED BY 'ÑŠ';
|
||||||
|
Warnings:
|
||||||
|
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||||
|
Warning 1265 Data truncated for column 'a' at row 1
|
||||||
|
Warning 1261 Row 1 doesn't contain data for all columns
|
||||||
|
Warning 1261 Row 1 doesn't contain data for all columns
|
||||||
|
Warning 1265 Data truncated for column 'a' at row 2
|
||||||
|
Warning 1261 Row 2 doesn't contain data for all columns
|
||||||
|
Warning 1261 Row 2 doesn't contain data for all columns
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
a b c
|
||||||
|
1 NULL NULL
|
||||||
|
1 ABC-Ð<>БВ DEF-ÂÃÄ
|
||||||
|
2 NULL NULL
|
||||||
|
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' LINES STARTING BY 'ÑŠ';
|
||||||
|
Warnings:
|
||||||
|
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||||
|
##################################################
|
||||||
|
ÑŠ1 ABC-áâ÷ DEF-ÂÃÄ
|
||||||
|
ÑŠ2 \N \N
|
||||||
|
##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary LINES STARTING BY 'ÑŠ';
|
||||||
|
Warnings:
|
||||||
|
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
a b c
|
||||||
|
1 ABC-Ð<>БВ DEF-ÂÃÄ
|
||||||
|
2 NULL NULL
|
||||||
|
SELECT * FROM t1 INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' LINES TERMINATED BY 'ÑŠ';
|
||||||
|
Warnings:
|
||||||
|
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||||
|
##################################################
|
||||||
|
1 ABC-áâ÷ DEF-ÂÃÄÑŠ2 \N \NÑŠ##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary LINES TERMINATED BY 'ÑŠ';
|
||||||
|
Warnings:
|
||||||
|
Warning 1638 Non-ASCII separator arguments are not fully supported
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
a b c
|
||||||
|
1 ABC-Ð<>БВ DEF-ÂÃÄ
|
||||||
|
1 ABC-Ð<>БВ DEF-ÂÃÄÑŠ2
|
||||||
|
2 NULL NULL
|
||||||
|
# Default (binary) charset:
|
||||||
|
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' FROM t1;
|
||||||
|
##################################################
|
||||||
|
1 ABC-áâ÷ DEF-ÂÃÄ
|
||||||
|
2 \N \N
|
||||||
|
##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET binary;
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
a b c
|
||||||
|
1 ABC-Ð<>БВ DEF-ÂÃÄ
|
||||||
|
2 NULL NULL
|
||||||
|
# latin1 charset (INTO OUTFILE warning is expected):
|
||||||
|
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' CHARACTER SET latin1 FROM t1;
|
||||||
|
Warnings:
|
||||||
|
Warning 1366 Incorrect string value: '\xE1\xE2\xF7' for column 'b' at row 1
|
||||||
|
##################################################
|
||||||
|
1 ABC-??? DEF-ÂÃÄ
|
||||||
|
2 \N \N
|
||||||
|
##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET latin1 ;
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
a b c
|
||||||
|
1 ABC-??? DEF-ÂÃÄ
|
||||||
|
1 ABC-Ð<>БВ DEF-ÂÃÄ
|
||||||
|
2 NULL NULL
|
||||||
|
# KOI8-R charset (INTO OUTFILE warning is expected):
|
||||||
|
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' CHARACTER SET koi8r FROM t1;
|
||||||
|
Warnings:
|
||||||
|
Warning 1366 Incorrect string value: '\xC2\xC3\xC4' for column 'c' at row 1
|
||||||
|
##################################################
|
||||||
|
1 ABC-áâ÷ DEF-???
|
||||||
|
2 \N \N
|
||||||
|
##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET koi8r;
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
a b c
|
||||||
|
1 ABC-Ð<>БВ DEF-???
|
||||||
|
1 ABC-Ð<>БВ DEF-ÂÃÄ
|
||||||
|
2 NULL NULL
|
||||||
|
# UTF-8 charset:
|
||||||
|
SELECT * INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' CHARACTER SET utf8 FROM t1;
|
||||||
|
##################################################
|
||||||
|
1 ABC-Ð<>БВ DEF-ÂÃÄ
|
||||||
|
2 \N \N
|
||||||
|
##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/t1.txt' INTO TABLE t2 CHARACTER SET utf8;
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
a b c
|
||||||
|
1 ABC-Ð<>БВ DEF-ÂÃÄ
|
||||||
|
2 NULL NULL
|
||||||
|
SET NAMES default;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
# End of 5.1 tests.
|
||||||
|
@ -1068,7 +1068,13 @@ partition by range (a)
|
|||||||
subpartition by hash(a)
|
subpartition by hash(a)
|
||||||
(partition p0 values less than (0),
|
(partition p0 values less than (0),
|
||||||
partition p1 values less than (1) (subpartition sp0));
|
partition p1 values less than (1) (subpartition sp0));
|
||||||
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '))' at line 5
|
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'subpartition sp0))' at line 5
|
||||||
|
create table t1 (a int, b int)
|
||||||
|
partition by list (a)
|
||||||
|
subpartition by hash(a)
|
||||||
|
(partition p0 values in (0),
|
||||||
|
partition p1 values in (1) (subpartition sp0));
|
||||||
|
ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'subpartition sp0))' at line 5
|
||||||
create table t1 (a int)
|
create table t1 (a int)
|
||||||
partition by hash (a)
|
partition by hash (a)
|
||||||
(partition p0 (subpartition sp0));
|
(partition p0 (subpartition sp0));
|
||||||
|
81
mysql-test/r/partition_not_embedded.result
Normal file
81
mysql-test/r/partition_not_embedded.result
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
DROP TABLE IF EXISTS t1, t2;
|
||||||
|
# Bug#30102 test
|
||||||
|
CREATE TABLE t1 (a INT)
|
||||||
|
PARTITION BY RANGE (a)
|
||||||
|
(PARTITION p0 VALUES LESS THAN (6),
|
||||||
|
PARTITION `p1....................` VALUES LESS THAN (9),
|
||||||
|
PARTITION p2 VALUES LESS THAN MAXVALUE);
|
||||||
|
# List of files in database `test`, all original t1-files here
|
||||||
|
t1#P#p0.MYD
|
||||||
|
t1#P#p0.MYI
|
||||||
|
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||||
|
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||||
|
t1#P#p2.MYD
|
||||||
|
t1#P#p2.MYI
|
||||||
|
t1.frm
|
||||||
|
t1.par
|
||||||
|
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
# Renaming to a file name where the first partition is 250 chars
|
||||||
|
# and the second partition is 350 chars
|
||||||
|
RENAME TABLE t1 TO `t2_new..............................................end`;
|
||||||
|
Got one of the listed errors
|
||||||
|
# List of files in database `test`, should not be any t2-files here
|
||||||
|
# List of files in database `test`, should be all t1-files here
|
||||||
|
t1#P#p0.MYD
|
||||||
|
t1#P#p0.MYI
|
||||||
|
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||||
|
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||||
|
t1#P#p2.MYD
|
||||||
|
t1#P#p2.MYI
|
||||||
|
t1.frm
|
||||||
|
t1.par
|
||||||
|
SELECT * FROM t1;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
10
|
||||||
|
2
|
||||||
|
3
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
# List of files in database `test`, should be all t1-files here
|
||||||
|
t1#P#p0.MYD
|
||||||
|
t1#P#p0.MYI
|
||||||
|
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||||
|
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||||
|
t1#P#p2.MYD
|
||||||
|
t1#P#p2.MYI
|
||||||
|
t1.frm
|
||||||
|
t1.par
|
||||||
|
# Renaming to a file name where the first partition is 156 chars
|
||||||
|
# and the second partition is 256 chars
|
||||||
|
RENAME TABLE t1 TO `t2_............................_end`;
|
||||||
|
Got one of the listed errors
|
||||||
|
# List of files in database `test`, should not be any t2-files here
|
||||||
|
# List of files in database `test`, should be all t1-files here
|
||||||
|
t1#P#p0.MYD
|
||||||
|
t1#P#p0.MYI
|
||||||
|
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||||
|
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||||
|
t1#P#p2.MYD
|
||||||
|
t1#P#p2.MYI
|
||||||
|
t1.frm
|
||||||
|
t1.par
|
||||||
|
SELECT * FROM t1;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
10
|
||||||
|
2
|
||||||
|
3
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
DROP TABLE t1;
|
||||||
|
# Should not be any files left here
|
||||||
|
# End of bug#30102 test.
|
66
mysql-test/r/partition_rename_longfilename.result
Normal file
66
mysql-test/r/partition_rename_longfilename.result
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
DROP TABLE IF EXISTS t1, t2;
|
||||||
|
CREATE TABLE t1 (a INT)
|
||||||
|
PARTITION BY RANGE (a)
|
||||||
|
(PARTITION p0 VALUES LESS THAN (6),
|
||||||
|
PARTITION `p1....................` VALUES LESS THAN (9),
|
||||||
|
PARTITION p2 VALUES LESS THAN MAXVALUE);
|
||||||
|
# List of files in database `test`, all original t1-files here
|
||||||
|
t1#P#p0.MYD
|
||||||
|
t1#P#p0.MYI
|
||||||
|
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||||
|
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||||
|
t1#P#p2.MYD
|
||||||
|
t1#P#p2.MYI
|
||||||
|
t1.frm
|
||||||
|
t1.par
|
||||||
|
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
# Renaming to a file name where the first partition is 155 chars
|
||||||
|
# and the second partition is 255 chars
|
||||||
|
RENAME TABLE t1 TO `t2_............................end`;
|
||||||
|
# List of files in database `test`, should not be any t1-files here
|
||||||
|
# List of files in database `test`, should be all t2-files here
|
||||||
|
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend#P#p0.MYD
|
||||||
|
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend#P#p0.MYI
|
||||||
|
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||||
|
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||||
|
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend#P#p2.MYD
|
||||||
|
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend#P#p2.MYI
|
||||||
|
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend.frm
|
||||||
|
t2_@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002eend.par
|
||||||
|
SELECT * FROM `t2_............................end`;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
10
|
||||||
|
2
|
||||||
|
3
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
RENAME TABLE `t2_............................end` to t1;
|
||||||
|
# List of files in database `test`, should be all t1-files here
|
||||||
|
t1#P#p0.MYD
|
||||||
|
t1#P#p0.MYI
|
||||||
|
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYD
|
||||||
|
t1#P#p1@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e@002e.MYI
|
||||||
|
t1#P#p2.MYD
|
||||||
|
t1#P#p2.MYI
|
||||||
|
t1.frm
|
||||||
|
t1.par
|
||||||
|
SELECT * FROM t1;
|
||||||
|
a
|
||||||
|
1
|
||||||
|
10
|
||||||
|
2
|
||||||
|
3
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
DROP TABLE t1;
|
||||||
|
# Should not be any files left here
|
||||||
|
# End of bug#30102 test.
|
@ -249,3 +249,25 @@ DROP PROCEDURE p1;
|
|||||||
DELETE FROM mysql.user WHERE User='mysqltest_1';
|
DELETE FROM mysql.user WHERE User='mysqltest_1';
|
||||||
FLUSH PRIVILEGES;
|
FLUSH PRIVILEGES;
|
||||||
set @@global.concurrent_insert= @old_concurrent_insert;
|
set @@global.concurrent_insert= @old_concurrent_insert;
|
||||||
|
#
|
||||||
|
# Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
|
||||||
|
#
|
||||||
|
SELECT GET_LOCK('Bug44521', 0);
|
||||||
|
GET_LOCK('Bug44521', 0)
|
||||||
|
1
|
||||||
|
** Connection con1
|
||||||
|
CREATE PROCEDURE p()
|
||||||
|
BEGIN
|
||||||
|
SELECT 1;
|
||||||
|
SELECT GET_LOCK('Bug44521', 100);
|
||||||
|
SELECT 2;
|
||||||
|
END$
|
||||||
|
CALL p();;
|
||||||
|
** Default connection
|
||||||
|
SELECT RELEASE_LOCK('Bug44521');
|
||||||
|
RELEASE_LOCK('Bug44521')
|
||||||
|
1
|
||||||
|
DROP PROCEDURE p;
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
# -- End of 5.1 tests
|
||||||
|
# ------------------------------------------------------------------
|
||||||
|
@ -4361,6 +4361,28 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
|
|||||||
Warnings:
|
Warnings:
|
||||||
Note 1003 select 1 AS `1` from `test`.`t1` where <in_optimizer>(1,<exists>(select 1 AS `1` from `test`.`t1` where (`test`.`t1`.`a` > 3) group by `test`.`t1`.`a` having (<cache>(1) = <ref_null_helper>(1))))
|
Note 1003 select 1 AS `1` from `test`.`t1` where <in_optimizer>(1,<exists>(select 1 AS `1` from `test`.`t1` where (`test`.`t1`.`a` > 3) group by `test`.`t1`.`a` having (<cache>(1) = <ref_null_helper>(1))))
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# Bug#45061: Incorrectly market field caused wrong result.
|
||||||
|
#
|
||||||
|
CREATE TABLE `C` (
|
||||||
|
`int_nokey` int(11) NOT NULL,
|
||||||
|
`int_key` int(11) NOT NULL,
|
||||||
|
KEY `int_key` (`int_key`)
|
||||||
|
);
|
||||||
|
INSERT INTO `C` VALUES (9,9), (0,0), (8,6), (3,6), (7,6), (0,4),
|
||||||
|
(1,7), (9,4), (0,8), (9,4), (0,7), (5,5), (0,0), (8,5), (8,7),
|
||||||
|
(5,2), (1,8), (7,0), (0,9), (9,5);
|
||||||
|
SELECT * FROM C WHERE `int_key` IN (SELECT `int_nokey`);
|
||||||
|
int_nokey int_key
|
||||||
|
9 9
|
||||||
|
0 0
|
||||||
|
5 5
|
||||||
|
0 0
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM C WHERE `int_key` IN (SELECT `int_nokey`);
|
||||||
|
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||||
|
1 PRIMARY C ALL NULL NULL NULL NULL 20 100.00 Using where
|
||||||
|
DROP TABLE C;
|
||||||
|
# End of test for bug#45061.
|
||||||
End of 5.0 tests.
|
End of 5.0 tests.
|
||||||
CREATE TABLE t1 (a INT, b INT);
|
CREATE TABLE t1 (a INT, b INT);
|
||||||
INSERT INTO t1 VALUES (2,22),(1,11),(2,22);
|
INSERT INTO t1 VALUES (2,22),(1,11),(2,22);
|
||||||
|
@ -35,4 +35,11 @@ CREATE DATABASE IF NOT EXISTS init_file;
|
|||||||
CREATE TABLE IF NOT EXISTS init_file.startup ( startdate DATETIME );
|
CREATE TABLE IF NOT EXISTS init_file.startup ( startdate DATETIME );
|
||||||
INSERT INTO init_file.startup VALUES ( NOW() );
|
INSERT INTO init_file.startup VALUES ( NOW() );
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#43587 "Putting event_scheduler=1 in init SQL file crashes mysqld"
|
||||||
|
#
|
||||||
|
|
||||||
|
SET GLOBAL event_scheduler = 'ON';
|
||||||
|
CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DISABLE DO SELECT 1;
|
||||||
|
DROP EVENT ev1;
|
||||||
|
SET GLOBAL event_scheduler = 'OFF';
|
||||||
|
@ -1298,3 +1298,14 @@ show master status /* must show new binlog index after rotating */;
|
|||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
master-bin.000002 106
|
master-bin.000002 106
|
||||||
drop table t3;
|
drop table t3;
|
||||||
|
#
|
||||||
|
# Bug #45998: database crashes when running "create as select"
|
||||||
|
#
|
||||||
|
CREATE DATABASE test1;
|
||||||
|
USE test1;
|
||||||
|
DROP DATABASE test1;
|
||||||
|
CREATE TABLE test.t1(a int);
|
||||||
|
INSERT INTO test.t1 VALUES (1), (2);
|
||||||
|
CREATE TABLE test.t2 SELECT * FROM test.t1;
|
||||||
|
USE test;
|
||||||
|
DROP TABLES t1, t2;
|
||||||
|
@ -773,3 +773,14 @@ show master status /* must show new binlog index after rotating */;
|
|||||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||||
master-bin.000002 106
|
master-bin.000002 106
|
||||||
drop table t3;
|
drop table t3;
|
||||||
|
#
|
||||||
|
# Bug #45998: database crashes when running "create as select"
|
||||||
|
#
|
||||||
|
CREATE DATABASE test1;
|
||||||
|
USE test1;
|
||||||
|
DROP DATABASE test1;
|
||||||
|
CREATE TABLE test.t1(a int);
|
||||||
|
INSERT INTO test.t1 VALUES (1), (2);
|
||||||
|
CREATE TABLE test.t2 SELECT * FROM test.t1;
|
||||||
|
USE test;
|
||||||
|
DROP TABLES t1, t2;
|
||||||
|
@ -28,3 +28,23 @@ UPDATE t1 SET b='4' WHERE a=1 LIMIT 1;
|
|||||||
UPDATE t1 SET b='5' WHERE a=2 ORDER BY a LIMIT 1;
|
UPDATE t1 SET b='5' WHERE a=2 ORDER BY a LIMIT 1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
DROP DATABASE b42851;
|
DROP DATABASE b42851;
|
||||||
|
USE test;
|
||||||
|
#
|
||||||
|
# Bug#46265: Can not disable warning about unsafe statements for binary logging
|
||||||
|
#
|
||||||
|
SET @old_log_warnings = @@log_warnings;
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(10));
|
||||||
|
SET GLOBAL LOG_WARNINGS = 0;
|
||||||
|
INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
|
||||||
|
Warnings:
|
||||||
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
|
SET GLOBAL LOG_WARNINGS = 1;
|
||||||
|
INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
|
||||||
|
Warnings:
|
||||||
|
Note 1592 Statement may not be safe to log in statement format.
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET GLOBAL log_warnings = @old_log_warnings;
|
||||||
|
# Count the number of times the "Unsafe" message was printed
|
||||||
|
# to the error log.
|
||||||
|
Occurrences: 1
|
||||||
|
@ -1 +1 @@
|
|||||||
--binlog-ignore-db=b42851
|
--binlog-ignore-db=b42851 --log-error
|
||||||
|
@ -56,6 +56,8 @@ SET SQL_LOG_BIN= 1;
|
|||||||
|
|
||||||
-- echo ### FILTERED database => assertion: warnings ARE NOT shown
|
-- echo ### FILTERED database => assertion: warnings ARE NOT shown
|
||||||
|
|
||||||
|
let $old_db= `SELECT DATABASE()`;
|
||||||
|
|
||||||
CREATE DATABASE b42851;
|
CREATE DATABASE b42851;
|
||||||
USE b42851;
|
USE b42851;
|
||||||
|
|
||||||
@ -71,3 +73,36 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
# clean up
|
# clean up
|
||||||
DROP DATABASE b42851;
|
DROP DATABASE b42851;
|
||||||
|
|
||||||
|
eval USE $old_db;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#46265: Can not disable warning about unsafe statements for binary logging
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SET @old_log_warnings = @@log_warnings;
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
--enable_warnings
|
||||||
|
CREATE TABLE t1 (a VARCHAR(36), b VARCHAR(10));
|
||||||
|
SET GLOBAL LOG_WARNINGS = 0;
|
||||||
|
INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
|
||||||
|
SET GLOBAL LOG_WARNINGS = 1;
|
||||||
|
INSERT INTO t1 VALUES(UUID(), 'Bug#46265');
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
SET GLOBAL log_warnings = @old_log_warnings;
|
||||||
|
|
||||||
|
let LOG_ERROR= `SELECT @@GLOBAL.log_error`;
|
||||||
|
|
||||||
|
--echo # Count the number of times the "Unsafe" message was printed
|
||||||
|
--echo # to the error log.
|
||||||
|
|
||||||
|
perl;
|
||||||
|
$log_error= $ENV{'LOG_ERROR'};
|
||||||
|
open(FILE, "$log_error") or die("Unable to open $log_error: $!\n");
|
||||||
|
$count = () = grep(/Bug#46265/g,<FILE>);
|
||||||
|
print "Occurrences: $count\n";
|
||||||
|
close(FILE);
|
||||||
|
EOF
|
||||||
|
20
mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45983.result
Normal file
20
mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_45983.result
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
set ibmdb2i_create_index_option=1;
|
||||||
|
drop schema if exists test1;
|
||||||
|
create schema test1;
|
||||||
|
use test1;
|
||||||
|
CREATE TABLE t1 (f int primary key, index(f)) engine=ibmdb2i;
|
||||||
|
drop table t1;
|
||||||
|
CREATE TABLE t1 (f char(10) collate utf8_bin primary key, index(f)) engine=ibmdb2i;
|
||||||
|
drop table t1;
|
||||||
|
CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, index(f)) engine=ibmdb2i;
|
||||||
|
drop table t1;
|
||||||
|
CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, i int, index i(i,f)) engine=ibmdb2i;
|
||||||
|
drop table t1;
|
||||||
|
create table fd (SQSSEQ CHAR(10)) engine=ibmdb2i;
|
||||||
|
select * from fd;
|
||||||
|
SQSSEQ
|
||||||
|
*HEX
|
||||||
|
*HEX
|
||||||
|
*HEX
|
||||||
|
*HEX
|
||||||
|
drop table fd;
|
47
mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45983.test
Normal file
47
mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_45983.test
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
source suite/ibmdb2i/include/have_ibmdb2i.inc;
|
||||||
|
|
||||||
|
# Confirm that ibmdb2i_create_index_option causes additional *HEX sorted indexes to be created for all non-binary keys.
|
||||||
|
|
||||||
|
set ibmdb2i_create_index_option=1;
|
||||||
|
--disable_warnings
|
||||||
|
drop schema if exists test1;
|
||||||
|
create schema test1;
|
||||||
|
use test1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
--disable_abort_on_error
|
||||||
|
--error 0,255
|
||||||
|
exec system "DLTF QGPL/FDOUT" > /dev/null;
|
||||||
|
--enable_abort_on_error
|
||||||
|
|
||||||
|
#No additional index because no string fields in key
|
||||||
|
CREATE TABLE t1 (f int primary key, index(f)) engine=ibmdb2i;
|
||||||
|
--error 255
|
||||||
|
exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
|
||||||
|
--error 255
|
||||||
|
exec system "DSPFD FILE(\"test1\"/\"f___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
#No additional index because binary sorting
|
||||||
|
CREATE TABLE t1 (f char(10) collate utf8_bin primary key, index(f)) engine=ibmdb2i;
|
||||||
|
--error 255
|
||||||
|
exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
|
||||||
|
--error 255
|
||||||
|
exec system "DSPFD FILE(\"test1\"/\"f___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, index(f)) engine=ibmdb2i;
|
||||||
|
exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
|
||||||
|
exec system "DSPFD FILE(\"test1\"/\"f___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
CREATE TABLE t1 (f char(10) collate latin1_swedish_ci primary key, i int, index i(i,f)) engine=ibmdb2i;
|
||||||
|
exec system "DSPFD FILE(\"test1\"/PRIM0001) TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
|
||||||
|
exec system "DSPFD FILE(\"test1\"/\"i___H_t1\") TYPE(*SEQ) OUTPUT(*OUTFILE) OUTFILE(QGPL/FDOUT) OUTMBR(*FIRST *ADD)" > /dev/null;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
|
||||||
|
create table fd (SQSSEQ CHAR(10)) engine=ibmdb2i;
|
||||||
|
system system "CPYF FROMFILE(QGPL/FDOUT) TOFILE(\"test1\"/\"fd\") mbropt(*replace) fmtopt(*drop *map)" > /dev/null;
|
||||||
|
select * from fd;
|
||||||
|
drop table fd;
|
@ -381,12 +381,12 @@ Table Create Table
|
|||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
PRIMARY KEY (`c1`)
|
PRIMARY KEY (`c1`)
|
||||||
) ENGINE=MEMORY AUTO_INCREMENT=28 DEFAULT CHARSET=latin1
|
) ENGINE=MEMORY AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
|
||||||
/*!50100 PARTITION BY HASH (c1)
|
/*!50100 PARTITION BY HASH (c1)
|
||||||
PARTITIONS 2 */
|
PARTITIONS 2 */
|
||||||
SELECT * FROM t1 ORDER BY c1;
|
SELECT * FROM t1 ORDER BY c1;
|
||||||
c1
|
c1
|
||||||
27
|
1
|
||||||
INSERT INTO t1 VALUES (100);
|
INSERT INTO t1 VALUES (100);
|
||||||
INSERT INTO t1 VALUES (NULL);
|
INSERT INTO t1 VALUES (NULL);
|
||||||
DELETE FROM t1 WHERE c1 >= 100;
|
DELETE FROM t1 WHERE c1 >= 100;
|
||||||
|
@ -381,12 +381,12 @@ Table Create Table
|
|||||||
t1 CREATE TABLE `t1` (
|
t1 CREATE TABLE `t1` (
|
||||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
PRIMARY KEY (`c1`)
|
PRIMARY KEY (`c1`)
|
||||||
) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=latin1
|
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
|
||||||
/*!50100 PARTITION BY HASH (c1)
|
/*!50100 PARTITION BY HASH (c1)
|
||||||
PARTITIONS 2 */
|
PARTITIONS 2 */
|
||||||
SELECT * FROM t1 ORDER BY c1;
|
SELECT * FROM t1 ORDER BY c1;
|
||||||
c1
|
c1
|
||||||
27
|
1
|
||||||
INSERT INTO t1 VALUES (100);
|
INSERT INTO t1 VALUES (100);
|
||||||
INSERT INTO t1 VALUES (NULL);
|
INSERT INTO t1 VALUES (NULL);
|
||||||
DELETE FROM t1 WHERE c1 >= 100;
|
DELETE FROM t1 WHERE c1 >= 100;
|
||||||
|
@ -33,12 +33,10 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
|||||||
show binlog events from <binlog_start>;
|
show binlog events from <binlog_start>;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query # # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 2' WHERE f = 'red'
|
|
||||||
master-bin.000001 # Query # # ROLLBACK
|
|
||||||
master-bin.000001 # Query # # BEGIN
|
|
||||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 2' WHERE i = 3
|
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 2' WHERE i = 3
|
||||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
master-bin.000001 # Query # # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
|
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 2' WHERE f = 'red'
|
||||||
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (2 * 10),"brown")
|
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (2 * 10),"brown")
|
||||||
master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown")
|
master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown")
|
||||||
master-bin.000001 # Query # # ROLLBACK
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
@ -56,12 +54,10 @@ COMMIT;
|
|||||||
show binlog events from <binlog_start>;
|
show binlog events from <binlog_start>;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query # # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 2' WHERE f = 'red'
|
|
||||||
master-bin.000001 # Query # # ROLLBACK
|
|
||||||
master-bin.000001 # Query # # BEGIN
|
|
||||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 2' WHERE i = 3
|
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 2' WHERE i = 3
|
||||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
master-bin.000001 # Query # # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
|
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 2' WHERE f = 'red'
|
||||||
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (2 * 10),"brown")
|
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (2 * 10),"brown")
|
||||||
master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown")
|
master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown")
|
||||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
@ -79,12 +75,10 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
|||||||
show binlog events from <binlog_start>;
|
show binlog events from <binlog_start>;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query # # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 1' WHERE f = 'red'
|
|
||||||
master-bin.000001 # Query # # ROLLBACK
|
|
||||||
master-bin.000001 # Query # # BEGIN
|
|
||||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 1' WHERE i = 3
|
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 1' WHERE i = 3
|
||||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
master-bin.000001 # Query # # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
|
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 1' WHERE f = 'red'
|
||||||
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (1 * 10),"brown")
|
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (1 * 10),"brown")
|
||||||
master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown")
|
master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown")
|
||||||
master-bin.000001 # Query # # ROLLBACK
|
master-bin.000001 # Query # # ROLLBACK
|
||||||
@ -100,17 +94,13 @@ COMMIT;
|
|||||||
show binlog events from <binlog_start>;
|
show binlog events from <binlog_start>;
|
||||||
Log_name Pos Event_type Server_id End_log_pos Info
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
master-bin.000001 # Query # # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 1' WHERE f = 'red'
|
|
||||||
master-bin.000001 # Query # # ROLLBACK
|
|
||||||
master-bin.000001 # Query # # BEGIN
|
|
||||||
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 1' WHERE i = 3
|
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 1' WHERE i = 3
|
||||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
master-bin.000001 # Query # # BEGIN
|
master-bin.000001 # Query # # BEGIN
|
||||||
|
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 1' WHERE f = 'red'
|
||||||
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (1 * 10),"brown")
|
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (1 * 10),"brown")
|
||||||
master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown")
|
master-bin.000001 # Query # # use `test`; INSERT INTO n VALUES (now(),"brown")
|
||||||
master-bin.000001 # Xid # # COMMIT /* XID */
|
master-bin.000001 # Xid # # COMMIT /* XID */
|
||||||
source include/diff_master_slave.inc;
|
|
||||||
source include/diff_master_slave.inc;
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# Cleanup
|
# Cleanup
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -0,0 +1,40 @@
|
|||||||
|
stop slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
reset master;
|
||||||
|
reset slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
start slave;
|
||||||
|
SELECT IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP");
|
||||||
|
IS_FREE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP")
|
||||||
|
1
|
||||||
|
SELECT GET_LOCK("debug_lock.before_get_UNIX_TIMESTAMP", 1000);
|
||||||
|
GET_LOCK("debug_lock.before_get_UNIX_TIMESTAMP", 1000)
|
||||||
|
1
|
||||||
|
set global debug= 'd,debug_lock.before_get_UNIX_TIMESTAMP';
|
||||||
|
stop slave;
|
||||||
|
start slave;
|
||||||
|
SELECT RELEASE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP");
|
||||||
|
RELEASE_LOCK("debug_lock.before_get_UNIX_TIMESTAMP")
|
||||||
|
1
|
||||||
|
Slave_IO_Errno= 2013
|
||||||
|
SELECT IS_FREE_LOCK("debug_lock.before_get_SERVER_ID");
|
||||||
|
IS_FREE_LOCK("debug_lock.before_get_SERVER_ID")
|
||||||
|
1
|
||||||
|
SELECT GET_LOCK("debug_lock.before_get_SERVER_ID", 1000);
|
||||||
|
GET_LOCK("debug_lock.before_get_SERVER_ID", 1000)
|
||||||
|
1
|
||||||
|
set global debug= 'd,debug_lock.before_get_SERVER_ID';
|
||||||
|
stop slave;
|
||||||
|
start slave;
|
||||||
|
SELECT RELEASE_LOCK("debug_lock.before_get_SERVER_ID");
|
||||||
|
RELEASE_LOCK("debug_lock.before_get_SERVER_ID")
|
||||||
|
1
|
||||||
|
Slave_IO_Errno= 2013
|
||||||
|
set global debug= '';
|
||||||
|
reset master;
|
||||||
|
include/stop_slave.inc
|
||||||
|
change master to master_port=SLAVE_PORT;
|
||||||
|
start slave;
|
||||||
|
*** must be having the replicate-same-server-id IO thread error ***
|
||||||
|
Slave_IO_Errno= 1593
|
||||||
|
Slave_IO_Error= Fatal error: The slave I/O thread stops because master and slave have equal MySQL server ids; these ids must be different for replication to work (or the --replicate-same-server-id option must be used on slave but this does not always make sense; please check the manual before using it).
|
@ -19,5 +19,50 @@ fn16456()
|
|||||||
timestamp
|
timestamp
|
||||||
set binlog_format=STATEMENT;
|
set binlog_format=STATEMENT;
|
||||||
select fn16456();
|
select fn16456();
|
||||||
ERROR HY000: Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events
|
ERROR HY000: This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its declaration and binary logging is enabled (you *might* want to use the less safe log_bin_trust_function_creators variable)
|
||||||
|
drop function fn16456;
|
||||||
|
set global log_bin_trust_function_creators=0;
|
||||||
|
create function fn16456()
|
||||||
|
returns int deterministic
|
||||||
|
begin
|
||||||
|
return unix_timestamp();
|
||||||
|
end|
|
||||||
|
set binlog_format=ROW;
|
||||||
|
select fn16456();
|
||||||
|
fn16456()
|
||||||
|
timestamp
|
||||||
|
set binlog_format=STATEMENT;
|
||||||
|
select fn16456();
|
||||||
|
fn16456()
|
||||||
|
timestamp
|
||||||
|
drop function fn16456;
|
||||||
|
set global log_bin_trust_function_creators=0;
|
||||||
|
create function fn16456()
|
||||||
|
returns int no sql
|
||||||
|
begin
|
||||||
|
return unix_timestamp();
|
||||||
|
end|
|
||||||
|
set binlog_format=ROW;
|
||||||
|
select fn16456();
|
||||||
|
fn16456()
|
||||||
|
timestamp
|
||||||
|
set binlog_format=STATEMENT;
|
||||||
|
select fn16456();
|
||||||
|
fn16456()
|
||||||
|
timestamp
|
||||||
|
drop function fn16456;
|
||||||
|
set global log_bin_trust_function_creators=0;
|
||||||
|
create function fn16456()
|
||||||
|
returns int reads sql data
|
||||||
|
begin
|
||||||
|
return unix_timestamp();
|
||||||
|
end|
|
||||||
|
set binlog_format=ROW;
|
||||||
|
select fn16456();
|
||||||
|
fn16456()
|
||||||
|
timestamp
|
||||||
|
set binlog_format=STATEMENT;
|
||||||
|
select fn16456();
|
||||||
|
fn16456()
|
||||||
|
timestamp
|
||||||
drop function fn16456;
|
drop function fn16456;
|
||||||
|
@ -24,3 +24,48 @@ Slave_open_temp_tables 0
|
|||||||
[on master]
|
[on master]
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
[on slave]
|
[on slave]
|
||||||
|
stop slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
reset master;
|
||||||
|
reset slave;
|
||||||
|
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||||
|
start slave;
|
||||||
|
CREATE TABLE t1 (a int);
|
||||||
|
CREATE TABLE t2 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) );
|
||||||
|
CREATE TABLE t3 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) );
|
||||||
|
CREATE TRIGGER tr1 AFTER DELETE ON t2 FOR EACH ROW INSERT INTO t3 () VALUES ();
|
||||||
|
CREATE TEMPORARY TABLE t1_tmp (i1 int);
|
||||||
|
ALTER TABLE t1_tmp ADD COLUMN b INT;
|
||||||
|
DELETE FROM t2;
|
||||||
|
CREATE TEMPORARY TABLE t2_tmp (a int);
|
||||||
|
ALTER TABLE t1_tmp ADD COLUMN c INT;
|
||||||
|
### assertion: assert that there is one open temp table on slave
|
||||||
|
SHOW STATUS LIKE 'Slave_open_temp_tables';
|
||||||
|
Variable_name Value
|
||||||
|
Slave_open_temp_tables 1
|
||||||
|
DROP TABLE t1_tmp, t2;
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
DROP TEMPORARY TABLE t2_tmp;
|
||||||
|
INSERT INTO t1 VALUES (2);
|
||||||
|
### assertion: assert that slave has no temporary tables opened
|
||||||
|
SHOW STATUS LIKE 'Slave_open_temp_tables';
|
||||||
|
Variable_name Value
|
||||||
|
Slave_open_temp_tables 0
|
||||||
|
DROP TABLE t3, t1;
|
||||||
|
show binlog events from <binlog_start>;
|
||||||
|
Log_name Pos Event_type Server_id End_log_pos Info
|
||||||
|
slave-bin.000001 # Query # # use `test`; CREATE TABLE t1 (a int)
|
||||||
|
slave-bin.000001 # Query # # use `test`; CREATE TABLE t2 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) )
|
||||||
|
slave-bin.000001 # Query # # use `test`; CREATE TABLE t3 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) )
|
||||||
|
slave-bin.000001 # Query # # use `test`; CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER DELETE ON t2 FOR EACH ROW INSERT INTO t3 () VALUES ()
|
||||||
|
slave-bin.000001 # Query # # use `test`; CREATE TEMPORARY TABLE t1_tmp (i1 int)
|
||||||
|
slave-bin.000001 # Query # # use `test`; ALTER TABLE t1_tmp ADD COLUMN b INT
|
||||||
|
slave-bin.000001 # Query # # use `test`; DROP TABLE `t2` /* generated by server */
|
||||||
|
slave-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `t1_tmp` /* generated by server */
|
||||||
|
slave-bin.000001 # Query # # BEGIN
|
||||||
|
slave-bin.000001 # Table_map # # table_id: # (test.t1)
|
||||||
|
slave-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
|
||||||
|
slave-bin.000001 # Query # # COMMIT
|
||||||
|
slave-bin.000001 # Query # # use `test`; DROP TEMPORARY TABLE IF EXISTS `t2_tmp` /* generated by server */
|
||||||
|
slave-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (2)
|
||||||
|
slave-bin.000001 # Query # # use `test`; DROP TABLE t3, t1
|
||||||
|
@ -125,13 +125,14 @@ while ($type)
|
|||||||
connection master;
|
connection master;
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
connection master;
|
# Re-enable this after fixing BUG#46130
|
||||||
let $diff_statement= SELECT * FROM t order by i;
|
#connection master;
|
||||||
source include/diff_master_slave.inc;
|
#let $diff_statement= SELECT * FROM t order by i;
|
||||||
|
#source include/diff_master_slave.inc;
|
||||||
|
|
||||||
connection master;
|
#connection master;
|
||||||
let $diff_statement= SELECT * FROM n order by d, f;
|
#let $diff_statement= SELECT * FROM n order by d, f;
|
||||||
source include/diff_master_slave.inc;
|
#source include/diff_master_slave.inc;
|
||||||
|
|
||||||
--echo ########################################################################
|
--echo ########################################################################
|
||||||
--echo # Cleanup
|
--echo # Cleanup
|
||||||
|
60
mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
Normal file
60
mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
#
|
||||||
|
# BUG#45214
|
||||||
|
# This test verifies if the slave I/O tread tries to reconnect to
|
||||||
|
# master when it tries to get the values of the UNIX_TIMESTAMP, SERVER_ID,
|
||||||
|
# COLLATION_SERVER and TIME_ZONE from master under network disconnection.
|
||||||
|
# The COLLATION_SERVER and TIME_ZONE are got only on master server version 4.
|
||||||
|
# So they can't be verified by test case here.
|
||||||
|
# Finish the following tests by calling its common test script:
|
||||||
|
# extra/rpl_tests/rpl_get_master_version_and_clock.test.
|
||||||
|
# And meanwhile this test checks that the slave I/O thread refuses to start if slave
|
||||||
|
# and master have the same server id (because this is a useless setup,
|
||||||
|
# and otherwise SHOW SLAVE STATUS shows progress but all queries are
|
||||||
|
# ignored, which has caught our customers), unless
|
||||||
|
# --replicate-same-server-id.
|
||||||
|
#
|
||||||
|
|
||||||
|
source include/master-slave.inc;
|
||||||
|
source include/have_debug.inc;
|
||||||
|
#Test case 1: Try to get the value of the UNIX_TIMESTAMP from master under network disconnection
|
||||||
|
connection slave;
|
||||||
|
let $debug_saved= `select @@global.debug`;
|
||||||
|
|
||||||
|
let $debug_lock= "debug_lock.before_get_UNIX_TIMESTAMP";
|
||||||
|
eval SELECT IS_FREE_LOCK($debug_lock);
|
||||||
|
eval SELECT GET_LOCK($debug_lock, 1000);
|
||||||
|
|
||||||
|
set global debug= 'd,debug_lock.before_get_UNIX_TIMESTAMP';
|
||||||
|
source extra/rpl_tests/rpl_get_master_version_and_clock.test;
|
||||||
|
|
||||||
|
#Test case 2: Try to get the value of the SERVER_ID from master under network disconnection
|
||||||
|
connection slave;
|
||||||
|
let $debug_lock= "debug_lock.before_get_SERVER_ID";
|
||||||
|
eval SELECT IS_FREE_LOCK($debug_lock);
|
||||||
|
eval SELECT GET_LOCK($debug_lock, 1000);
|
||||||
|
|
||||||
|
set global debug= 'd,debug_lock.before_get_SERVER_ID';
|
||||||
|
source extra/rpl_tests/rpl_get_master_version_and_clock.test;
|
||||||
|
|
||||||
|
eval set global debug= '$debug_saved';
|
||||||
|
|
||||||
|
#Test case 3: This test checks that the slave I/O thread refuses to start
|
||||||
|
#if slave and master have the same server id.
|
||||||
|
connection slave;
|
||||||
|
reset master;
|
||||||
|
# replicate ourselves
|
||||||
|
source include/stop_slave.inc;
|
||||||
|
--replace_result $SLAVE_MYPORT SLAVE_PORT
|
||||||
|
eval change master to master_port=$SLAVE_MYPORT;
|
||||||
|
start slave;
|
||||||
|
|
||||||
|
let $slave_param= Last_IO_Errno;
|
||||||
|
let $slave_param_value= 1593;
|
||||||
|
source include/wait_for_slave_param.inc;
|
||||||
|
--echo *** must be having the replicate-same-server-id IO thread error ***
|
||||||
|
let $last_io_errno= query_get_value("show slave status", Last_IO_Errno, 1);
|
||||||
|
let $last_io_error= query_get_value("show slave status", Last_IO_Error, 1);
|
||||||
|
echo Slave_IO_Errno= $last_io_errno;
|
||||||
|
echo Slave_IO_Error= $last_io_error;
|
||||||
|
|
||||||
|
# End of tests
|
@ -1,6 +1,7 @@
|
|||||||
-- source include/have_log_bin.inc
|
-- source include/have_log_bin.inc
|
||||||
|
|
||||||
# Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
|
# Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
|
||||||
|
# BUG#41166 stored function requires "deterministic" if binlog_format is "statement"
|
||||||
|
|
||||||
# save status
|
# save status
|
||||||
|
|
||||||
@ -55,15 +56,131 @@ select fn16456();
|
|||||||
|
|
||||||
set binlog_format=STATEMENT;
|
set binlog_format=STATEMENT;
|
||||||
|
|
||||||
--error ER_BINLOG_ROW_RBR_TO_SBR
|
--error ER_BINLOG_UNSAFE_ROUTINE
|
||||||
select fn16456();
|
select fn16456();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# clean
|
||||||
|
|
||||||
|
drop function fn16456;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# success in definition with deterministic
|
||||||
|
|
||||||
|
set global log_bin_trust_function_creators=0;
|
||||||
|
|
||||||
|
delimiter |;
|
||||||
|
create function fn16456()
|
||||||
|
returns int deterministic
|
||||||
|
begin
|
||||||
|
return unix_timestamp();
|
||||||
|
end|
|
||||||
|
delimiter ;|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# allow funcall in RBR
|
||||||
|
|
||||||
|
set binlog_format=ROW;
|
||||||
|
|
||||||
|
--replace_column 1 timestamp
|
||||||
|
select fn16456();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# allow funcall in SBR
|
||||||
|
|
||||||
|
set binlog_format=STATEMENT;
|
||||||
|
|
||||||
|
--replace_column 1 timestamp
|
||||||
|
select fn16456();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# clean
|
||||||
|
|
||||||
|
drop function fn16456;
|
||||||
|
|
||||||
|
|
||||||
|
# success in definition with NO SQL
|
||||||
|
|
||||||
|
set global log_bin_trust_function_creators=0;
|
||||||
|
|
||||||
|
delimiter |;
|
||||||
|
create function fn16456()
|
||||||
|
returns int no sql
|
||||||
|
begin
|
||||||
|
return unix_timestamp();
|
||||||
|
end|
|
||||||
|
delimiter ;|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# allow funcall in RBR
|
||||||
|
|
||||||
|
set binlog_format=ROW;
|
||||||
|
|
||||||
|
--replace_column 1 timestamp
|
||||||
|
select fn16456();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# allow funcall in SBR
|
||||||
|
|
||||||
|
set binlog_format=STATEMENT;
|
||||||
|
|
||||||
|
--replace_column 1 timestamp
|
||||||
|
select fn16456();
|
||||||
|
|
||||||
|
|
||||||
|
# clean
|
||||||
|
|
||||||
|
drop function fn16456;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# success in definition with reads sql data
|
||||||
|
|
||||||
|
set global log_bin_trust_function_creators=0;
|
||||||
|
|
||||||
|
delimiter |;
|
||||||
|
create function fn16456()
|
||||||
|
returns int reads sql data
|
||||||
|
begin
|
||||||
|
return unix_timestamp();
|
||||||
|
end|
|
||||||
|
delimiter ;|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# allow funcall in RBR
|
||||||
|
|
||||||
|
set binlog_format=ROW;
|
||||||
|
|
||||||
|
--replace_column 1 timestamp
|
||||||
|
select fn16456();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# allow funcall in SBR
|
||||||
|
|
||||||
|
set binlog_format=STATEMENT;
|
||||||
|
|
||||||
|
--replace_column 1 timestamp
|
||||||
|
select fn16456();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
# clean
|
||||||
|
|
||||||
|
drop function fn16456;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# restore status
|
# restore status
|
||||||
|
|
||||||
drop function fn16456;
|
|
||||||
|
|
||||||
--disable_query_log
|
--disable_query_log
|
||||||
eval set binlog_format=$oblf;
|
eval set binlog_format=$oblf;
|
||||||
eval set global log_bin_trust_function_creators=$otfc;
|
eval set global log_bin_trust_function_creators=$otfc;
|
||||||
|
@ -51,3 +51,98 @@ DROP TABLE t1;
|
|||||||
|
|
||||||
--echo [on slave]
|
--echo [on slave]
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG#43046: mixed mode switch to row format with temp table lead to wrong
|
||||||
|
# result
|
||||||
|
#
|
||||||
|
# NOTES
|
||||||
|
# =====
|
||||||
|
#
|
||||||
|
# 1. Temporary tables cannot be logged using the row-based
|
||||||
|
# format. Thus, once row-based logging is used, all subsequent
|
||||||
|
# statements using that table are unsafe, and we approximate this
|
||||||
|
# condition by treating all statements made by that client as
|
||||||
|
# unsafe until the client no longer holds any temporary tables.
|
||||||
|
#
|
||||||
|
# 2. Two different connections can use the same temporary table
|
||||||
|
# name without conflicting with each other or with an
|
||||||
|
# existing non-TEMPORARY table of the same name.
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
# ===========
|
||||||
|
#
|
||||||
|
# The test is implemented as follows:
|
||||||
|
# 1. create regular tables
|
||||||
|
# 2. create a temporary table t1_tmp: should be logged as statement
|
||||||
|
# 3. issue an alter table: should be logged as statement
|
||||||
|
# 4. issue statement that forces switch to RBR
|
||||||
|
# 5. create another temporary table t2_tmp: should not be logged
|
||||||
|
# 6. issue alter table on t1_tmp: should not be logged
|
||||||
|
# 7. drop t1_tmp and regular table on same statement: should log both in
|
||||||
|
# statement format (but different statements)
|
||||||
|
# 8. issue deterministic insert: logged as row (because t2_tmp still
|
||||||
|
# exists).
|
||||||
|
# 9. drop t2_tmp and issue deterministic statement: should log drop and
|
||||||
|
# query in statement format (show switch back to STATEMENT format)
|
||||||
|
# 10. in the end the slave should not have open temp tables.
|
||||||
|
#
|
||||||
|
|
||||||
|
connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,);
|
||||||
|
-- source include/master-slave-reset.inc
|
||||||
|
-- connection master
|
||||||
|
|
||||||
|
# action: setup environment
|
||||||
|
CREATE TABLE t1 (a int);
|
||||||
|
CREATE TABLE t2 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) );
|
||||||
|
CREATE TABLE t3 ( i1 INT NOT NULL AUTO_INCREMENT, PRIMARY KEY (i1) );
|
||||||
|
CREATE TRIGGER tr1 AFTER DELETE ON t2 FOR EACH ROW INSERT INTO t3 () VALUES ();
|
||||||
|
|
||||||
|
# assertion: assert that CREATE is logged as STATEMENT
|
||||||
|
CREATE TEMPORARY TABLE t1_tmp (i1 int);
|
||||||
|
|
||||||
|
# assertion: assert that ALTER TABLE is logged as STATEMENT
|
||||||
|
ALTER TABLE t1_tmp ADD COLUMN b INT;
|
||||||
|
|
||||||
|
# action: force switch to RBR
|
||||||
|
DELETE FROM t2;
|
||||||
|
|
||||||
|
# assertion: assert that t2_tmp will not make into the binlog (RBR logging atm)
|
||||||
|
CREATE TEMPORARY TABLE t2_tmp (a int);
|
||||||
|
|
||||||
|
# assertion: assert that ALTER TABLE on t1_tmp will not make into the binlog
|
||||||
|
ALTER TABLE t1_tmp ADD COLUMN c INT;
|
||||||
|
|
||||||
|
-- echo ### assertion: assert that there is one open temp table on slave
|
||||||
|
-- sync_slave_with_master
|
||||||
|
SHOW STATUS LIKE 'Slave_open_temp_tables';
|
||||||
|
|
||||||
|
-- connection master
|
||||||
|
|
||||||
|
# assertion: assert that both drops are logged
|
||||||
|
DROP TABLE t1_tmp, t2;
|
||||||
|
|
||||||
|
# assertion: assert that statement is logged as row (master still has one
|
||||||
|
# opened temporary table - t2_tmp.
|
||||||
|
INSERT INTO t1 VALUES (1);
|
||||||
|
|
||||||
|
# assertion: assert that DROP TABLE *is* logged despite CREATE is not.
|
||||||
|
DROP TEMPORARY TABLE t2_tmp;
|
||||||
|
|
||||||
|
# assertion: assert that statement is now logged as STMT (mixed mode switches
|
||||||
|
# back to STATEMENT).
|
||||||
|
INSERT INTO t1 VALUES (2);
|
||||||
|
|
||||||
|
-- sync_slave_with_master
|
||||||
|
|
||||||
|
-- echo ### assertion: assert that slave has no temporary tables opened
|
||||||
|
SHOW STATUS LIKE 'Slave_open_temp_tables';
|
||||||
|
|
||||||
|
-- connection master
|
||||||
|
|
||||||
|
# action: drop remaining tables
|
||||||
|
DROP TABLE t3, t1;
|
||||||
|
|
||||||
|
-- sync_slave_with_master
|
||||||
|
|
||||||
|
-- source include/show_binlog_events.inc
|
||||||
|
1
mysql-test/t/bug40113-master.opt
Normal file
1
mysql-test/t/bug40113-master.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--innodb_lock_wait_timeout=1
|
46
mysql-test/t/bug40113.test
Normal file
46
mysql-test/t/bug40113.test
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
--source include/have_innodb.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #40113: Embedded SELECT inside UPDATE or DELETE can timeout
|
||||||
|
--echo # without error
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a int, b int, PRIMARY KEY (a,b)) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
INSERT INTO t1 (a,b) VALUES (1070109,99);
|
||||||
|
|
||||||
|
CREATE TABLE t2 (b int, a int, PRIMARY KEY (b)) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
INSERT INTO t2 (b,a) VALUES (7,1070109);
|
||||||
|
|
||||||
|
SELECT * FROM t1;
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
SELECT b FROM t2 WHERE b=7 FOR UPDATE;
|
||||||
|
|
||||||
|
CONNECT (addconroot, localhost, root,,);
|
||||||
|
CONNECTION addconroot;
|
||||||
|
|
||||||
|
BEGIN;
|
||||||
|
|
||||||
|
--error ER_LOCK_WAIT_TIMEOUT
|
||||||
|
SELECT b FROM t2 WHERE b=7 FOR UPDATE;
|
||||||
|
|
||||||
|
--error ER_LOCK_WAIT_TIMEOUT
|
||||||
|
INSERT INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7));
|
||||||
|
|
||||||
|
--error ER_LOCK_WAIT_TIMEOUT
|
||||||
|
UPDATE t1 SET a='7000000' WHERE a=(SELECT a FROM t2 WHERE b=7);
|
||||||
|
|
||||||
|
--error ER_LOCK_WAIT_TIMEOUT
|
||||||
|
DELETE FROM t1 WHERE a=(SELECT a FROM t2 WHERE b=7);
|
||||||
|
|
||||||
|
SELECT * FROM t1;
|
||||||
|
|
||||||
|
CONNECTION default;
|
||||||
|
DISCONNECT addconroot;
|
||||||
|
|
||||||
|
DROP TABLE t2, t1;
|
||||||
|
|
||||||
|
--echo End of 5.0 tests
|
1
mysql-test/t/bug46080-master.opt
Normal file
1
mysql-test/t/bug46080-master.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--skip-grant-tables --skip-name-resolve --safemalloc-mem-limit=4000000
|
22
mysql-test/t/bug46080.test
Normal file
22
mysql-test/t/bug46080.test
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
--echo #
|
||||||
|
--echo # Bug #46080: group_concat(... order by) crashes server when
|
||||||
|
--echo # sort_buffer_size cannot allocate
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1(a CHAR(255));
|
||||||
|
INSERT INTO t1 VALUES ('a');
|
||||||
|
|
||||||
|
SET @@SESSION.sort_buffer_size=5*16*1000000;
|
||||||
|
SET @@SESSION.max_heap_table_size=5*1000000;
|
||||||
|
|
||||||
|
--echo # Must not crash.
|
||||||
|
--disable_result_log
|
||||||
|
--error 0,5
|
||||||
|
SELECT GROUP_CONCAT(a ORDER BY a) FROM t1 GROUP BY a;
|
||||||
|
--enable_result_log
|
||||||
|
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET @@SESSION.sort_buffer_size=default;
|
||||||
|
SET @@SESSION.max_heap_table_size=default;
|
||||||
|
|
||||||
|
--echo End of 5.0 tests
|
@ -1539,5 +1539,29 @@ DROP TABLE t1;
|
|||||||
create table `me:i`(id int);
|
create table `me:i`(id int);
|
||||||
drop table `me:i`;
|
drop table `me:i`;
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#45829 CREATE TABLE TRANSACTIONAL PAGE_CHECKSUM ROW_FORMAT=PAGE accepted, does nothing
|
||||||
|
#
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # --
|
||||||
|
--echo # -- Bug#45829: CREATE TABLE TRANSACTIONAL PAGE_CHECKSUM ROW_FORMAT=PAGE accepted, does nothing
|
||||||
|
--echo # --
|
||||||
|
--echo
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists t1,t2,t3;
|
||||||
|
--enable_warnings
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
create table t1 (a int) transactional=0;
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
create table t2 (a int) page_checksum=1;
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
create table t3 (a int) row_format=page;
|
||||||
|
--echo
|
||||||
|
--echo # -- End of Bug#45829
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
--echo End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
@ -56,3 +56,54 @@ select hex(s1), hex(convert(s1 using utf8)) from t1 order by binary s1;
|
|||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
--echo End of 5.0 tests
|
--echo End of 5.0 tests
|
||||||
|
|
||||||
|
|
||||||
|
--echo Start of 5.4 tests
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # WL#3997 New euckr characters
|
||||||
|
--echo #
|
||||||
|
SET NAMES utf8;
|
||||||
|
CREATE TABLE t1 (a varchar(10) character set euckr);
|
||||||
|
INSERT INTO t1 VALUES (0xA2E6), (0xA2E7);
|
||||||
|
SELECT hex(a), hex(@utf8:=convert(a using utf8)), hex(convert(@utf8 using euckr)) FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # WL#3332 Korean Enhancements
|
||||||
|
--echo # euckr valid codes are now [81..FE][41..5A,61..7A,81..FE]
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a binary(1), key(a));
|
||||||
|
--disable_query_log
|
||||||
|
let $1=255;
|
||||||
|
while($1)
|
||||||
|
{
|
||||||
|
eval INSERT INTO t1 VALUES (unhex(hex($1)));
|
||||||
|
dec $1;
|
||||||
|
}
|
||||||
|
--enable_query_log
|
||||||
|
|
||||||
|
CREATE TABLE t2 (s VARCHAR(4), a VARCHAR(1) CHARACTER SET euckr);
|
||||||
|
--disable_warnings
|
||||||
|
INSERT INTO t2
|
||||||
|
SELECT hex(concat(t11.a, t12.a)), concat(t11.a, t12.a)
|
||||||
|
FROM t1 t11, t1 t12
|
||||||
|
WHERE t11.a >= 0x81 AND t11.a <= 0xFE
|
||||||
|
AND t12.a >= 0x41 AND t12.a <= 0xFE
|
||||||
|
ORDER BY t11.a, t12.a;
|
||||||
|
--enable_warnings
|
||||||
|
SELECT s as bad_code FROM t2 WHERE a='' ORDER BY s;
|
||||||
|
DELETE FROM t2 WHERE a='';
|
||||||
|
ALTER TABLE t2 ADD u VARCHAR(1) CHARACTER SET utf8, ADD a2 VARCHAR(1) CHARACTER SET euckr;
|
||||||
|
--disable_warnings
|
||||||
|
UPDATE t2 SET u=a, a2=u;
|
||||||
|
--enable_warnings
|
||||||
|
SELECT s as unassigned_code FROM t2 WHERE u='?';
|
||||||
|
DELETE FROM t2 WHERE u='?';
|
||||||
|
# Make sure there are no euckr->utf8->euckr roundtrip problems
|
||||||
|
SELECT count(*) as roundtrip_problem_chars FROM t2 WHERE hex(a) <> hex(a2);
|
||||||
|
SELECT s, hex(a), hex(u), hex(a2) FROM t2 ORDER BY s;
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
--echo End of 5.4 tests
|
||||||
|
@ -279,4 +279,26 @@ disconnect con1;
|
|||||||
connection default;
|
connection default;
|
||||||
drop user mysqltest_1;
|
drop user mysqltest_1;
|
||||||
|
|
||||||
# End of 4.1 tests
|
--echo # End of 4.1 tests
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #41156: List of derived tables acts like a chain of
|
||||||
|
# mutually-nested subqueries
|
||||||
|
#
|
||||||
|
|
||||||
|
SELECT 0 FROM
|
||||||
|
(SELECT 0) t01, (SELECT 0) t02, (SELECT 0) t03, (SELECT 0) t04, (SELECT 0) t05,
|
||||||
|
(SELECT 0) t06, (SELECT 0) t07, (SELECT 0) t08, (SELECT 0) t09, (SELECT 0) t10,
|
||||||
|
(SELECT 0) t11, (SELECT 0) t12, (SELECT 0) t13, (SELECT 0) t14, (SELECT 0) t15,
|
||||||
|
(SELECT 0) t16, (SELECT 0) t17, (SELECT 0) t18, (SELECT 0) t19, (SELECT 0) t20,
|
||||||
|
(SELECT 0) t21, (SELECT 0) t22, (SELECT 0) t23, (SELECT 0) t24, (SELECT 0) t25,
|
||||||
|
(SELECT 0) t26, (SELECT 0) t27, (SELECT 0) t28, (SELECT 0) t29, (SELECT 0) t30,
|
||||||
|
(SELECT 0) t31, (SELECT 0) t32, (SELECT 0) t33, (SELECT 0) t34, (SELECT 0) t35,
|
||||||
|
(SELECT 0) t36, (SELECT 0) t37, (SELECT 0) t38, (SELECT 0) t39, (SELECT 0) t40,
|
||||||
|
(SELECT 0) t41, (SELECT 0) t42, (SELECT 0) t43, (SELECT 0) t44, (SELECT 0) t45,
|
||||||
|
(SELECT 0) t46, (SELECT 0) t47, (SELECT 0) t48, (SELECT 0) t49, (SELECT 0) t50,
|
||||||
|
(SELECT 0) t51, (SELECT 0) t52, (SELECT 0) t53, (SELECT 0) t54, (SELECT 0) t55,
|
||||||
|
(SELECT 0) t56, (SELECT 0) t57, (SELECT 0) t58, (SELECT 0) t59, (SELECT 0) t60,
|
||||||
|
(SELECT 0) t61; # 61 == MAX_TABLES
|
||||||
|
|
||||||
|
--echo # End of 5.0 tests
|
||||||
|
@ -471,3 +471,16 @@ CREATE TABLE t1(a VARCHAR(64), FULLTEXT(a));
|
|||||||
INSERT INTO t1 VALUES('awrd bwrd cwrd'),('awrd bwrd cwrd'),('awrd bwrd cwrd');
|
INSERT INTO t1 VALUES('awrd bwrd cwrd'),('awrd bwrd cwrd'),('awrd bwrd cwrd');
|
||||||
SELECT * FROM t1 WHERE MATCH(a) AGAINST('+awrd bwrd* +cwrd*' IN BOOLEAN MODE);
|
SELECT * FROM t1 WHERE MATCH(a) AGAINST('+awrd bwrd* +cwrd*' IN BOOLEAN MODE);
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# BUG#37740 Server crashes on execute statement with full text search and match against
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (col text, FULLTEXT KEY full_text (col));
|
||||||
|
|
||||||
|
PREPARE s FROM
|
||||||
|
"SELECT MATCH (col) AGAINST('findme') FROM t1 ORDER BY MATCH (col) AGAINST('findme')"
|
||||||
|
;
|
||||||
|
|
||||||
|
EXECUTE s;
|
||||||
|
DEALLOCATE PREPARE s;
|
||||||
|
DROP TABLE t1;
|
||||||
|
96
mysql-test/t/innodb_bug21704.test
Normal file
96
mysql-test/t/innodb_bug21704.test
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
-- source include/have_innodb.inc
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#21704: Renaming column does not update FK definition.
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # Test that it's not possible to rename columns participating in a
|
||||||
|
--echo # foreign key (either in the referencing or referenced table).
|
||||||
|
--echo
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t1;
|
||||||
|
DROP TABLE IF EXISTS t2;
|
||||||
|
DROP TABLE IF EXISTS t3;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
CREATE TABLE t1 (a INT PRIMARY KEY, b INT) ROW_FORMAT=COMPACT ENGINE=INNODB;
|
||||||
|
|
||||||
|
CREATE TABLE t2 (a INT PRIMARY KEY, b INT,
|
||||||
|
CONSTRAINT fk1 FOREIGN KEY (a) REFERENCES t1(a))
|
||||||
|
ROW_FORMAT=COMPACT ENGINE=INNODB;
|
||||||
|
|
||||||
|
CREATE TABLE t3 (a INT PRIMARY KEY, b INT, KEY(b), C INT,
|
||||||
|
CONSTRAINT fk2 FOREIGN KEY (b) REFERENCES t3 (a))
|
||||||
|
ROW_FORMAT=COMPACT ENGINE=INNODB;
|
||||||
|
|
||||||
|
INSERT INTO t1 VALUES (1,1),(2,2),(3,3);
|
||||||
|
INSERT INTO t2 VALUES (1,1),(2,2),(3,3);
|
||||||
|
INSERT INTO t3 VALUES (1,1,1),(2,2,2),(3,3,3);
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # Test renaming the column in the referenced table.
|
||||||
|
--echo
|
||||||
|
|
||||||
|
# mysqltest first does replace_regex, then replace_result
|
||||||
|
--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||||
|
# Embedded server doesn't chdir to data directory
|
||||||
|
--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
|
||||||
|
--error ER_ERROR_ON_RENAME
|
||||||
|
ALTER TABLE t1 CHANGE a c INT;
|
||||||
|
|
||||||
|
--echo # Ensure that online column rename works.
|
||||||
|
|
||||||
|
--enable_info
|
||||||
|
ALTER TABLE t1 CHANGE b c INT;
|
||||||
|
--disable_info
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # Test renaming the column in the referencing table
|
||||||
|
--echo
|
||||||
|
|
||||||
|
# mysqltest first does replace_regex, then replace_result
|
||||||
|
--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||||
|
# Embedded server doesn't chdir to data directory
|
||||||
|
--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
|
||||||
|
--error ER_ERROR_ON_RENAME
|
||||||
|
ALTER TABLE t2 CHANGE a c INT;
|
||||||
|
|
||||||
|
--echo # Ensure that online column rename works.
|
||||||
|
|
||||||
|
--enable_info
|
||||||
|
ALTER TABLE t2 CHANGE b c INT;
|
||||||
|
--disable_info
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # Test with self-referential constraints
|
||||||
|
--echo
|
||||||
|
|
||||||
|
# mysqltest first does replace_regex, then replace_result
|
||||||
|
--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||||
|
# Embedded server doesn't chdir to data directory
|
||||||
|
--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
|
||||||
|
--error ER_ERROR_ON_RENAME
|
||||||
|
ALTER TABLE t3 CHANGE a d INT;
|
||||||
|
|
||||||
|
# mysqltest first does replace_regex, then replace_result
|
||||||
|
--replace_regex /'[^']*test\/#sql-[0-9a-f_]*'/'#sql-temporary'/
|
||||||
|
# Embedded server doesn't chdir to data directory
|
||||||
|
--replace_result $MYSQLTEST_VARDIR . mysqld.1/data/ ''
|
||||||
|
--error ER_ERROR_ON_RENAME
|
||||||
|
ALTER TABLE t3 CHANGE b d INT;
|
||||||
|
|
||||||
|
--echo # Ensure that online column rename works.
|
||||||
|
|
||||||
|
--enable_info
|
||||||
|
ALTER TABLE t3 CHANGE c d INT;
|
||||||
|
--disable_info
|
||||||
|
|
||||||
|
--echo
|
||||||
|
--echo # Cleanup.
|
||||||
|
--echo
|
||||||
|
|
||||||
|
DROP TABLE t3;
|
||||||
|
DROP TABLE t2;
|
||||||
|
DROP TABLE t1;
|
@ -12,6 +12,8 @@ set global innodb_commit_concurrency=1;
|
|||||||
select @@innodb_commit_concurrency;
|
select @@innodb_commit_concurrency;
|
||||||
set global innodb_commit_concurrency=42;
|
set global innodb_commit_concurrency=42;
|
||||||
select @@innodb_commit_concurrency;
|
select @@innodb_commit_concurrency;
|
||||||
|
set global innodb_commit_concurrency=DEFAULT;
|
||||||
|
select @@innodb_commit_concurrency;
|
||||||
--error ER_WRONG_ARGUMENTS
|
--error ER_WRONG_ARGUMENTS
|
||||||
set global innodb_commit_concurrency=0;
|
set global innodb_commit_concurrency=0;
|
||||||
select @@innodb_commit_concurrency;
|
select @@innodb_commit_concurrency;
|
||||||
|
@ -15,3 +15,5 @@ set global innodb_commit_concurrency=42;
|
|||||||
select @@innodb_commit_concurrency;
|
select @@innodb_commit_concurrency;
|
||||||
set global innodb_commit_concurrency=0;
|
set global innodb_commit_concurrency=0;
|
||||||
select @@innodb_commit_concurrency;
|
select @@innodb_commit_concurrency;
|
||||||
|
set global innodb_commit_concurrency=DEFAULT;
|
||||||
|
select @@innodb_commit_concurrency;
|
||||||
|
@ -380,4 +380,85 @@ SELECT * FROM t1, t2, t3
|
|||||||
|
|
||||||
DROP TABLE t1, t2, t3;
|
DROP TABLE t1, t2, t3;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #45828: Optimizer won't use partial primary key if another
|
||||||
|
--echo # index can prevent filesort
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
# Create the table
|
||||||
|
CREATE TABLE `t1` (
|
||||||
|
c1 int NOT NULL,
|
||||||
|
c2 int NOT NULL,
|
||||||
|
c3 int NOT NULL,
|
||||||
|
PRIMARY KEY (c1,c2),
|
||||||
|
KEY (c3)
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
# populate with data
|
||||||
|
INSERT INTO t1 VALUES (5,2,1246276747);
|
||||||
|
INSERT INTO t1 VALUES (2,1,1246281721);
|
||||||
|
INSERT INTO t1 VALUES (7,3,1246281756);
|
||||||
|
INSERT INTO t1 VALUES (4,2,1246282139);
|
||||||
|
INSERT INTO t1 VALUES (3,1,1246282230);
|
||||||
|
INSERT INTO t1 VALUES (1,0,1246282712);
|
||||||
|
INSERT INTO t1 VALUES (8,3,1246282765);
|
||||||
|
INSERT INTO t1 SELECT c1+10,c2+10,c3+10 FROM t1;
|
||||||
|
INSERT INTO t1 SELECT c1+100,c2+100,c3+100 from t1;
|
||||||
|
INSERT INTO t1 SELECT c1+1000,c2+1000,c3+1000 from t1;
|
||||||
|
INSERT INTO t1 SELECT c1+10000,c2+10000,c3+10000 from t1;
|
||||||
|
INSERT INTO t1 SELECT c1+100000,c2+100000,c3+100000 from t1;
|
||||||
|
INSERT INTO t1 SELECT c1+1000000,c2+1000000,c3+1000000 from t1;
|
||||||
|
|
||||||
|
# query and no rows will match the c1 condition, whereas all will match c3
|
||||||
|
SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
|
||||||
|
|
||||||
|
# SHOULD use the pk.
|
||||||
|
# index on c3 will be used instead of primary key
|
||||||
|
EXPLAIN SELECT * FROM t1 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
|
||||||
|
|
||||||
|
# if we force the primary key, we can see the estimate is 1
|
||||||
|
EXPLAIN SELECT * FROM t1 FORCE INDEX (PRIMARY) WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE t2 (
|
||||||
|
c1 int NOT NULL,
|
||||||
|
c2 int NOT NULL,
|
||||||
|
c3 int NOT NULL,
|
||||||
|
KEY (c1,c2),
|
||||||
|
KEY (c3)
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
# SHOULD use the pk.
|
||||||
|
# if we switch it from a primary key to a regular index, it works correctly as well
|
||||||
|
explain SELECT * FROM t2 WHERE c1 = 99999999 AND c3 > 1 ORDER BY c3;
|
||||||
|
|
||||||
|
DROP TABLE t1,t2;
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # 36259: Optimizing with ORDER BY
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1 (
|
||||||
|
a INT NOT NULL AUTO_INCREMENT,
|
||||||
|
b INT NOT NULL,
|
||||||
|
c INT NOT NULL,
|
||||||
|
d VARCHAR(5),
|
||||||
|
e INT NOT NULL,
|
||||||
|
PRIMARY KEY (a), KEY i2 (b,c,d)
|
||||||
|
) ENGINE=InnoDB;
|
||||||
|
|
||||||
|
INSERT INTO t1 (b,c,d,e) VALUES (1,1,'a',1), (2,2,'b',2);
|
||||||
|
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||||
|
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||||
|
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||||
|
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||||
|
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||||
|
INSERT INTO t1 (b,c,d,e) SELECT RAND()*10000, RAND()*10000, d, e FROM t1;
|
||||||
|
EXPLAIN SELECT * FROM t1 WHERE b=1 AND c=1 ORDER BY a;
|
||||||
|
EXPLAIN SELECT * FROM t1 FORCE INDEX(i2) WHERE b=1 and c=1 ORDER BY a;
|
||||||
|
EXPLAIN SELECT * FROM t1 FORCE INDEX(PRIMARY) WHERE b=1 AND c=1 ORDER BY a;
|
||||||
|
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
@ -36,9 +36,15 @@ rollback;
|
|||||||
connection b;
|
connection b;
|
||||||
reap;
|
reap;
|
||||||
rollback;
|
rollback;
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
connection a;
|
||||||
|
disconnect a;
|
||||||
|
--source include/wait_until_disconnected.inc
|
||||||
|
connection b;
|
||||||
|
disconnect b;
|
||||||
|
--source include/wait_until_disconnected.inc
|
||||||
connection default;
|
connection default;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
drop function f1;
|
drop function f1;
|
||||||
disconnect a;
|
|
||||||
disconnect b;
|
|
||||||
SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
|
SET @@global.log_bin_trust_function_creators= @old_log_bin_trust_function_creators;
|
||||||
|
@ -394,3 +394,24 @@ check table t2 extended;
|
|||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
--echo ##################################################################
|
--echo ##################################################################
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #46075: Assertion failed: 0, file .\protocol.cc, line 416
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1(a INT);
|
||||||
|
# To force MyISAM temp. table in the following INSERT ... SELECT.
|
||||||
|
SET max_heap_table_size = 16384;
|
||||||
|
# To overflow the temp. table.
|
||||||
|
SET @old_myisam_data_pointer_size = @@myisam_data_pointer_size;
|
||||||
|
SET GLOBAL myisam_data_pointer_size = 2;
|
||||||
|
|
||||||
|
INSERT INTO t1 VALUES (1), (2), (3), (4), (5);
|
||||||
|
|
||||||
|
--error ER_RECORD_FILE_FULL,ER_RECORD_FILE_FULL
|
||||||
|
INSERT IGNORE INTO t1 SELECT t1.a FROM t1,t1 t2,t1 t3,t1 t4,t1 t5,t1 t6,t1 t7;
|
||||||
|
|
||||||
|
# Cleanup
|
||||||
|
SET GLOBAL myisam_data_pointer_size = @old_myisam_data_pointer_size;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo End of 5.0 tests
|
||||||
|
@ -1515,6 +1515,49 @@ insert into m1 (col1) values (1);
|
|||||||
|
|
||||||
drop table m1, t1;
|
drop table m1, t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#45800 crash when replacing into a merge table and there is a duplicate
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo # Replace duplicate value in child table when merge table doesn't have key
|
||||||
|
CREATE TABLE t1 (c1 INT PRIMARY KEY) ENGINE=MyISAM;
|
||||||
|
CREATE TABLE m1 (c1 INT NOT NULL) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||||
|
INSERT INTO m1 VALUES (666);
|
||||||
|
SELECT * FROM m1;
|
||||||
|
--echo # insert the duplicate value into the merge table
|
||||||
|
REPLACE INTO m1 VALUES (666);
|
||||||
|
SELECT * FROM m1;
|
||||||
|
DROP TABLE m1, t1;
|
||||||
|
|
||||||
|
--echo # Insert... on duplicate key update (with duplicate values in the table)
|
||||||
|
CREATE TABLE t1 (c1 INT PRIMARY KEY) ENGINE=MyISAM;
|
||||||
|
CREATE TABLE m1 (c1 INT NOT NULL) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||||
|
INSERT INTO m1 VALUES (666);
|
||||||
|
SELECT * FROM m1;
|
||||||
|
--echo # insert the duplicate value into the merge table
|
||||||
|
INSERT INTO m1 VALUES (666) ON DUPLICATE KEY UPDATE c1=c1+1;
|
||||||
|
SELECT * FROM m1;
|
||||||
|
DROP TABLE m1, t1;
|
||||||
|
|
||||||
|
--echo # Insert duplicate value on MERGE table, where, MERGE has a key but MyISAM has more keys
|
||||||
|
CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE (c1), UNIQUE (c2));
|
||||||
|
CREATE TABLE m1 (c1 INT, c2 INT, UNIQUE (c1)) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||||
|
INSERT INTO m1 VALUES (1,2);
|
||||||
|
--echo # insert the duplicate value into the merge table
|
||||||
|
--error ER_DUP_ENTRY
|
||||||
|
INSERT INTO m1 VALUES (3,2);
|
||||||
|
DROP TABLE m1,t1;
|
||||||
|
|
||||||
|
--echo # Try to define MERGE and MyISAM with keys on different columns
|
||||||
|
CREATE TABLE t1 (c1 INT, c2 INT, UNIQUE (c1));
|
||||||
|
CREATE TABLE m1 (c1 INT, c2 INT, UNIQUE (c2)) ENGINE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1);
|
||||||
|
--echo # Try accessing the merge table for inserts (error occurs)
|
||||||
|
--error ER_WRONG_MRG_TABLE
|
||||||
|
INSERT INTO m1 VALUES (1,2);
|
||||||
|
--error ER_WRONG_MRG_TABLE
|
||||||
|
INSERT INTO m1 VALUES (1,4);
|
||||||
|
DROP TABLE m1,t1;
|
||||||
|
|
||||||
#
|
#
|
||||||
#Bug #44040 MySQL allows creating a MERGE table upon VIEWs but crashes
|
#Bug #44040 MySQL allows creating a MERGE table upon VIEWs but crashes
|
||||||
#when using it
|
#when using it
|
||||||
@ -1535,4 +1578,48 @@ SELECT * FROM m1;
|
|||||||
|
|
||||||
DROP VIEW v1;
|
DROP VIEW v1;
|
||||||
DROP TABLE m1, t1;
|
DROP TABLE m1, t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #45796: invalid memory reads and writes when altering merge and
|
||||||
|
--echo # base tables
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t1(c1 INT) ENGINE=MyISAM;
|
||||||
|
CREATE TABLE m1(c1 INT) ENGINE=MERGE UNION=(t1);
|
||||||
|
ALTER TABLE m1 ADD INDEX idx_c1(c1);
|
||||||
|
# Open the MERGE table and allocate buffers based on children's definition.
|
||||||
|
--error ER_WRONG_MRG_TABLE
|
||||||
|
SELECT * FROM m1;
|
||||||
|
# Change the child table definition.
|
||||||
|
ALTER TABLE t1 ADD INDEX idx_c1(c1);
|
||||||
|
# Check that old buffers are not reused
|
||||||
|
SELECT * FROM m1;
|
||||||
|
|
||||||
|
DROP TABLE m1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug45781 infinite hang/crash in "opening tables" after handler tries to
|
||||||
|
--echo # open merge table
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS m1,t1;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
CREATE TABLE t1(a int)engine=myisam;
|
||||||
|
CREATE TABLE t2(a int)engine=myisam;
|
||||||
|
CREATE TABLE t3(a int)engine=myisam;
|
||||||
|
CREATE TABLE t4(a int)engine=myisam;
|
||||||
|
CREATE TABLE t5(a int)engine=myisam;
|
||||||
|
CREATE TABLE t6(a int)engine=myisam;
|
||||||
|
CREATE TABLE t7(a int)engine=myisam;
|
||||||
|
CREATE TABLE m1(a int)engine=merge union=(t1,t2,t3,t4,t5,t6,t7);
|
||||||
|
SELECT 1 FROM m1;
|
||||||
|
--error ER_ILLEGAL_HA
|
||||||
|
HANDLER m1 OPEN;
|
||||||
|
DROP TABLE m1,t1,t2,t3,t4,t5,t6,t7;
|
||||||
|
--error ER_NO_SUCH_TABLE
|
||||||
|
SELECT 1 FROM m1; # Should not hang!
|
||||||
|
|
||||||
--echo End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
@ -387,5 +387,19 @@ drop tables t1, t2;
|
|||||||
#
|
#
|
||||||
--exec $MYSQL --html test -e "select '< & >' as '<'"
|
--exec $MYSQL --html test -e "select '< & >' as '<'"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug #27884: mysql client + null byte
|
||||||
|
#
|
||||||
|
create table t1 (a char(5));
|
||||||
|
insert into t1 values ('\0b\0');
|
||||||
|
--exec $MYSQL test -e "select a from t1"
|
||||||
|
--exec $MYSQL -r test -e "select a from t1"
|
||||||
|
--exec $MYSQL -s test -e "select a from t1"
|
||||||
|
--exec $MYSQL --table test -e "select a from t1"
|
||||||
|
--exec $MYSQL --vertical test -e "select a from t1"
|
||||||
|
--exec $MYSQL --html test -e "select a from t1"
|
||||||
|
--exec $MYSQL --xml test -e "select a from t1"
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
--echo
|
--echo
|
||||||
--echo End of tests
|
--echo End of tests
|
||||||
|
@ -7,6 +7,26 @@
|
|||||||
select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade;
|
select LENGTH("$MYSQL_UPGRADE")>0 as have_mysql_upgrade;
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
|
#
|
||||||
|
# Hack:
|
||||||
|
#
|
||||||
|
# If running with Valgrind ($VALGRIND_TEST <> 0) then the resource
|
||||||
|
# consumption (CPU) for upgrading a large log table will be intense.
|
||||||
|
# Therefore, truncate the log table in advance and issue a statement
|
||||||
|
# that should be logged.
|
||||||
|
#
|
||||||
|
if (`SELECT $VALGRIND_TEST`)
|
||||||
|
{
|
||||||
|
--disable_query_log
|
||||||
|
--disable_result_log
|
||||||
|
--disable_abort_on_error
|
||||||
|
TRUNCATE TABLE mysql.general_log;
|
||||||
|
SELECT 1;
|
||||||
|
--enable_abort_on_error
|
||||||
|
--enable_result_log
|
||||||
|
--enable_query_log
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Basic test that we can run mysql_upgrde and that it finds the
|
# Basic test that we can run mysql_upgrde and that it finds the
|
||||||
# expected binaries it uses.
|
# expected binaries it uses.
|
||||||
|
@ -193,5 +193,22 @@ DROP DATABASE `a@b`;
|
|||||||
|
|
||||||
USE test;
|
USE test;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #31821: --all-in-1 and --fix-table-names don't work together
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists `#mysql50#t1-1`;
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
create table `#mysql50#t1-1` (a int);
|
||||||
|
--exec $MYSQL_CHECK --all-in-1 --fix-table-names --databases test
|
||||||
|
show tables like 't1-1';
|
||||||
|
drop table `t1-1`;
|
||||||
|
|
||||||
|
create table `#mysql50#t1-1` (a int);
|
||||||
|
--exec $MYSQL_CHECK --all-in-1 --fix-table-names test "#mysql50#t1-1"
|
||||||
|
show tables like 't1-1';
|
||||||
|
drop table `t1-1`;
|
||||||
|
|
||||||
--echo End of 5.1 tests
|
--echo End of 5.1 tests
|
||||||
|
@ -1394,9 +1394,6 @@ drop table t1;
|
|||||||
drop user mysqltest_1@localhost;
|
drop user mysqltest_1@localhost;
|
||||||
|
|
||||||
|
|
||||||
--echo #
|
|
||||||
--echo # Bug#21527 mysqldump incorrectly tries to LOCK TABLES on the
|
|
||||||
--echo # information_schema database.
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug#21424 mysqldump failing to export/import views
|
--echo # Bug#21424 mysqldump failing to export/import views
|
||||||
--echo #
|
--echo #
|
||||||
@ -1463,6 +1460,13 @@ disconnect root;
|
|||||||
--remove_file $MYSQLTEST_VARDIR/tmp/bug21527.sql
|
--remove_file $MYSQLTEST_VARDIR/tmp/bug21527.sql
|
||||||
use test;
|
use test;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #21527 mysqldump incorrectly tries to LOCK TABLES on the
|
||||||
|
--echo # information_schema database.
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #33762: mysqldump can not dump INFORMATION_SCHEMA
|
||||||
|
--echo #
|
||||||
|
--exec $MYSQL_DUMP --compact --opt -d information_schema TABLES
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug#19745 mysqldump --xml produces invalid xml
|
--echo # Bug#19745 mysqldump --xml produces invalid xml
|
||||||
@ -1492,8 +1496,11 @@ INSERT INTO t1 VALUES (1), (2);
|
|||||||
--exec $MYSQL_DUMP --tab=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaa test
|
||||||
|
|
||||||
@ -1698,9 +1705,6 @@ DROP TABLE t1;
|
|||||||
# Added for use-thread option
|
# Added for use-thread option
|
||||||
#
|
#
|
||||||
|
|
||||||
# THIS PART OF THE TEST IS DISABLED UNTIL Bug#32991 IS FIXED
|
|
||||||
if ($bug32991_fixed) {
|
|
||||||
|
|
||||||
create table t1 (a text , b text);
|
create table t1 (a text , b text);
|
||||||
create table t2 (a text , b text);
|
create table t2 (a text , b text);
|
||||||
insert t1 values ("Duck, Duck", "goose");
|
insert t1 values ("Duck, Duck", "goose");
|
||||||
@ -1738,8 +1742,6 @@ drop table t2;
|
|||||||
|
|
||||||
drop table words2;
|
drop table words2;
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # Bug#16853 mysqldump doesn't show events
|
--echo # Bug#16853 mysqldump doesn't show events
|
||||||
--echo #
|
--echo #
|
||||||
@ -1948,8 +1950,50 @@ DROP DATABASE mysqldump_test_db;
|
|||||||
--echo # -- End of test case for Bug#32538.
|
--echo # -- End of test case for Bug#32538.
|
||||||
--echo
|
--echo
|
||||||
|
|
||||||
# We reset concurrent_inserts value to whatever it was at the start of the test
|
--echo #
|
||||||
# This line must be executed _after_ all test cases.
|
--echo # Bug#37377 Incorrect DROP TABLE statement in dump of a VIEW using --tab
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
create table t1 (a int);
|
||||||
|
create view v1 as select a from t1;
|
||||||
|
|
||||||
|
--exec $MYSQL_DUMP --skip-comments --tab=$MYSQLTEST_VARDIR/tmp/ test t1 v1
|
||||||
|
|
||||||
|
drop view v1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/t1.sql
|
||||||
|
--exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/v1.sql
|
||||||
|
|
||||||
|
drop view v1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
--remove_file $MYSQLTEST_VARDIR/tmp/t1.sql
|
||||||
|
--remove_file $MYSQLTEST_VARDIR/tmp/t1.txt
|
||||||
|
--remove_file $MYSQLTEST_VARDIR/tmp/v1.sql
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#28071 mysqlimport does not quote or escape table name
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
drop table if exists `load`;
|
||||||
|
--enable_warnings
|
||||||
|
create table `load` (a varchar(255));
|
||||||
|
|
||||||
|
--copy_file std_data/words.dat $MYSQLTEST_VARDIR/tmp/load.txt
|
||||||
|
|
||||||
|
--exec $MYSQL_IMPORT --ignore test $MYSQLTEST_VARDIR/tmp/load.txt
|
||||||
|
|
||||||
|
select count(*) from `load`;
|
||||||
|
|
||||||
|
--remove_file $MYSQLTEST_VARDIR/tmp/load.txt
|
||||||
|
|
||||||
|
drop table `load`;
|
||||||
|
|
||||||
|
# We reset concurrent_inserts value to whatever it was at the start of the
|
||||||
|
# test This line must be executed _after_ all test cases.
|
||||||
SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT;
|
SET @@GLOBAL.CONCURRENT_INSERT = @OLD_CONCURRENT_INSERT;
|
||||||
|
|
||||||
|
|
||||||
@ -2008,6 +2052,88 @@ DROP TABLE IF EXISTS t1;
|
|||||||
|
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #30946: mysqldump silently ignores --default-character-set
|
||||||
|
--echo # when used with --tab
|
||||||
|
--echo #
|
||||||
|
--echo # Also see outfile_loaddata.test
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SET NAMES utf8;
|
||||||
|
CREATE TABLE t1 (a INT, b CHAR(10) CHARSET koi8r, c CHAR(10) CHARSET latin1);
|
||||||
|
CREATE TABLE t2 LIKE t1;
|
||||||
|
INSERT INTO t1 VALUES (1, 'ABC-АБВ', 'DEF-ÂÃÄ'), (2, NULL, NULL);
|
||||||
|
|
||||||
|
--let $file=$MYSQLTEST_VARDIR/tmp/t1.txt
|
||||||
|
|
||||||
|
|
||||||
|
--echo # error on multi-character ENCLOSED/ESCAPED BY
|
||||||
|
|
||||||
|
--error 2
|
||||||
|
--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-enclosed-by='12345' test t1
|
||||||
|
--remove_file $file
|
||||||
|
|
||||||
|
--error 2
|
||||||
|
--exec $MYSQL_DUMP --tab=$MYSQLTEST_VARDIR/tmp/ --fields-escaped-by='12345' test t1
|
||||||
|
--remove_file $file
|
||||||
|
|
||||||
|
--echo # default '--default-charset' (binary):
|
||||||
|
|
||||||
|
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --tab=$MYSQLTEST_VARDIR/tmp/ test t1
|
||||||
|
--echo ##################################################
|
||||||
|
--cat_file $file
|
||||||
|
--echo ##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary
|
||||||
|
--remove_file $file
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
|
||||||
|
|
||||||
|
--echo # utf8:
|
||||||
|
|
||||||
|
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --default-character-set=utf8 --tab=$MYSQLTEST_VARDIR/tmp/ test t1
|
||||||
|
--echo ##################################################
|
||||||
|
--cat_file $file
|
||||||
|
--echo ##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET utf8
|
||||||
|
--remove_file $file
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
|
||||||
|
|
||||||
|
--echo # latin1 (data corruption is expected):
|
||||||
|
|
||||||
|
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --default-character-set=latin1 --tab=$MYSQLTEST_VARDIR/tmp/ test t1
|
||||||
|
--echo ##################################################
|
||||||
|
--cat_file $file
|
||||||
|
--echo ##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET latin1
|
||||||
|
--remove_file $file
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
|
||||||
|
|
||||||
|
--echo # koi8r (data corruption is expected):
|
||||||
|
|
||||||
|
--exec $MYSQL_DUMP --character-sets-dir=$CHARSETSDIR --default-character-set=koi8r --tab=$MYSQLTEST_VARDIR/tmp/ test t1
|
||||||
|
--echo ##################################################
|
||||||
|
--cat_file $file
|
||||||
|
--echo ##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET koi8r
|
||||||
|
--remove_file $file
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
|
||||||
|
|
||||||
|
SET NAMES default;
|
||||||
|
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 5.1 tests
|
--echo # End of 5.1 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
@ -111,3 +111,146 @@ SELECT HEX(c1) FROM t1;
|
|||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo # End of 5.0 tests.
|
--echo # End of 5.0 tests.
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #30946: mysqldump silently ignores --default-character-set
|
||||||
|
--echo # when used with --tab
|
||||||
|
--echo #
|
||||||
|
--echo # Also see mysqldump.test
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
SET NAMES utf8;
|
||||||
|
CREATE TABLE t1 (a INT, b CHAR(10) CHARSET koi8r, c CHAR(10) CHARSET latin1);
|
||||||
|
CREATE TABLE t2 LIKE t1;
|
||||||
|
INSERT INTO t1 VALUES (1, 'ABC-АБВ', 'DEF-ÂÃÄ'), (2, NULL, NULL);
|
||||||
|
|
||||||
|
--let $file=$MYSQLTEST_VARDIR/tmp/t1.txt
|
||||||
|
|
||||||
|
|
||||||
|
--echo # Error on multi-character ENCLOSED/ESCAPED BY
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--error 1083
|
||||||
|
--eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ENCLOSED BY '12345'
|
||||||
|
--remove_file $file
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--error 1083
|
||||||
|
--eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ESCAPED BY '12345'
|
||||||
|
--remove_file $file
|
||||||
|
|
||||||
|
|
||||||
|
--echo # "Not implemented" warning on multibyte ENCLOSED/ESCAPED BY character,
|
||||||
|
--echo # LOAD DATA rises error or has unpredictable result -- to be fixed later
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ENCLOSED BY 'ъ'
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--error 1083 # backward compatibility
|
||||||
|
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary FIELDS ENCLOSED BY 'ъ'
|
||||||
|
--remove_file $file
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS ESCAPED BY 'ъ'
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--error 1083 # backward compatibility
|
||||||
|
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary FIELDS ESCAPED BY 'ъ'
|
||||||
|
--remove_file $file
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval SELECT * FROM t1 INTO OUTFILE '$file' FIELDS TERMINATED BY 'ъ'
|
||||||
|
--echo ##################################################
|
||||||
|
--cat_file $file
|
||||||
|
--echo ##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary FIELDS TERMINATED BY 'ъ'
|
||||||
|
--remove_file $file
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval SELECT * FROM t1 INTO OUTFILE '$file' LINES STARTING BY 'ъ'
|
||||||
|
--echo ##################################################
|
||||||
|
--cat_file $file
|
||||||
|
--echo ##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary LINES STARTING BY 'ъ'
|
||||||
|
--remove_file $file
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval SELECT * FROM t1 INTO OUTFILE '$file' LINES TERMINATED BY 'ъ'
|
||||||
|
--echo ##################################################
|
||||||
|
--cat_file $file
|
||||||
|
--echo ##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary LINES TERMINATED BY 'ъ'
|
||||||
|
--remove_file $file
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
|
||||||
|
--echo # Default (binary) charset:
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval SELECT * INTO OUTFILE '$file' FROM t1
|
||||||
|
--echo ##################################################
|
||||||
|
--cat_file $file
|
||||||
|
--echo ##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET binary
|
||||||
|
--remove_file $file
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
|
||||||
|
|
||||||
|
--echo # latin1 charset (INTO OUTFILE warning is expected):
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval SELECT * INTO OUTFILE '$file' CHARACTER SET latin1 FROM t1
|
||||||
|
--echo ##################################################
|
||||||
|
--cat_file $file
|
||||||
|
--echo ##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET latin1
|
||||||
|
--remove_file $file
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
|
||||||
|
|
||||||
|
--echo # KOI8-R charset (INTO OUTFILE warning is expected):
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval SELECT * INTO OUTFILE '$file' CHARACTER SET koi8r FROM t1
|
||||||
|
--echo ##################################################
|
||||||
|
--cat_file $file
|
||||||
|
--echo ##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET koi8r
|
||||||
|
--remove_file $file
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
|
||||||
|
|
||||||
|
--echo # UTF-8 charset:
|
||||||
|
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval SELECT * INTO OUTFILE '$file' CHARACTER SET utf8 FROM t1
|
||||||
|
--echo ##################################################
|
||||||
|
--cat_file $file
|
||||||
|
--echo ##################################################
|
||||||
|
TRUNCATE t2;
|
||||||
|
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||||
|
--eval LOAD DATA INFILE '$file' INTO TABLE t2 CHARACTER SET utf8
|
||||||
|
--remove_file $file
|
||||||
|
SELECT * FROM t1 UNION SELECT * FROM t2 ORDER BY a, b, c;
|
||||||
|
|
||||||
|
|
||||||
|
SET NAMES default;
|
||||||
|
|
||||||
|
DROP TABLE t1, t2;
|
||||||
|
|
||||||
|
###########################################################################
|
||||||
|
--echo # End of 5.1 tests.
|
||||||
|
@ -1019,6 +1019,17 @@ subpartition by hash(a)
|
|||||||
(partition p0 values less than (0),
|
(partition p0 values less than (0),
|
||||||
partition p1 values less than (1) (subpartition sp0));
|
partition p1 values less than (1) (subpartition sp0));
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug 46354 Crash with subpartition
|
||||||
|
#
|
||||||
|
--error ER_PARSE_ERROR
|
||||||
|
create table t1 (a int, b int)
|
||||||
|
partition by list (a)
|
||||||
|
subpartition by hash(a)
|
||||||
|
(partition p0 values in (0),
|
||||||
|
partition p1 values in (1) (subpartition sp0));
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# BUG 15961 No error when subpartition defined without subpartition by clause
|
# BUG 15961 No error when subpartition defined without subpartition by clause
|
||||||
#
|
#
|
||||||
|
53
mysql-test/t/partition_not_embedded.test
Normal file
53
mysql-test/t/partition_not_embedded.test
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
-- source include/have_partition.inc
|
||||||
|
-- source include/not_embedded.inc
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t1, t2;
|
||||||
|
--enable_warnings
|
||||||
|
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#30102: rename table does corrupt tables with partition files on failure
|
||||||
|
#
|
||||||
|
--echo # Bug#30102 test
|
||||||
|
CREATE TABLE t1 (a INT)
|
||||||
|
PARTITION BY RANGE (a)
|
||||||
|
(PARTITION p0 VALUES LESS THAN (6),
|
||||||
|
PARTITION `p1....................` VALUES LESS THAN (9),
|
||||||
|
PARTITION p2 VALUES LESS THAN MAXVALUE);
|
||||||
|
# partition p1 is 't1#P#p1' + @002e * 20 = 107 characters + file ending
|
||||||
|
# total path lenght of './test/t1#P#p1@002e@002e<...>@002e.MY[ID]' is 118 chars
|
||||||
|
--echo # List of files in database `test`, all original t1-files here
|
||||||
|
--list_files $MYSQLD_DATADIR/test t1*
|
||||||
|
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
--echo # Renaming to a file name where the first partition is 250 chars
|
||||||
|
--echo # and the second partition is 350 chars
|
||||||
|
# 7,7 avoids the error message, which is not deterministic.
|
||||||
|
--error 7,7
|
||||||
|
RENAME TABLE t1 TO `t2_new..............................................end`;
|
||||||
|
# 1234567890123456789012345678901234567890123456
|
||||||
|
--echo # List of files in database `test`, should not be any t2-files here
|
||||||
|
--list_files $MYSQLD_DATADIR/test t2*
|
||||||
|
--echo # List of files in database `test`, should be all t1-files here
|
||||||
|
--list_files $MYSQLD_DATADIR/test t1*
|
||||||
|
--sorted_result
|
||||||
|
SELECT * FROM t1;
|
||||||
|
--echo # List of files in database `test`, should be all t1-files here
|
||||||
|
--list_files $MYSQLD_DATADIR/test t1*
|
||||||
|
--echo # Renaming to a file name where the first partition is 156 chars
|
||||||
|
--echo # and the second partition is 256 chars
|
||||||
|
# 7,7 avoids the error message, which is not deterministic.
|
||||||
|
--error 7,7
|
||||||
|
RENAME TABLE t1 TO `t2_............................_end`;
|
||||||
|
# 1234567890123456789012345678
|
||||||
|
# 7 + 4 + 5 + 28 * 5 = 16 + 140 = 156
|
||||||
|
--echo # List of files in database `test`, should not be any t2-files here
|
||||||
|
--list_files $MYSQLD_DATADIR/test t2*
|
||||||
|
--echo # List of files in database `test`, should be all t1-files here
|
||||||
|
--list_files $MYSQLD_DATADIR/test t1*
|
||||||
|
--sorted_result
|
||||||
|
SELECT * FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
--echo # Should not be any files left here
|
||||||
|
--list_files $MYSQLD_DATADIR/test t1*
|
||||||
|
--list_files $MYSQLD_DATADIR/test t2*
|
||||||
|
--echo # End of bug#30102 test.
|
50
mysql-test/t/partition_rename_longfilename.test
Normal file
50
mysql-test/t/partition_rename_longfilename.test
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
-- source include/not_windows.inc
|
||||||
|
-- source include/have_partition.inc
|
||||||
|
-- source include/not_embedded.inc
|
||||||
|
--disable_warnings
|
||||||
|
DROP TABLE IF EXISTS t1, t2;
|
||||||
|
--enable_warnings
|
||||||
|
let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Bug#30102: rename table does corrupt tables with partition files on failure
|
||||||
|
# This test case renames the table such that the partition file name
|
||||||
|
# is 255 chars long. Due the restriction of 260 char path name (including drive label)
|
||||||
|
# this will fail in windows.
|
||||||
|
# Other tests related to this bug can be found in partition_not_embedded.test
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (a INT)
|
||||||
|
PARTITION BY RANGE (a)
|
||||||
|
(PARTITION p0 VALUES LESS THAN (6),
|
||||||
|
PARTITION `p1....................` VALUES LESS THAN (9),
|
||||||
|
PARTITION p2 VALUES LESS THAN MAXVALUE);
|
||||||
|
# partition p1 is 't1#P#p1' + @002e * 20 = 107 characters + file ending
|
||||||
|
# total path lenght of './test/t1#P#p1@002e@002e<...>@002e.MY[ID]' is 118 chars
|
||||||
|
--echo # List of files in database `test`, all original t1-files here
|
||||||
|
--list_files $MYSQLD_DATADIR/test t1*
|
||||||
|
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
--echo # Renaming to a file name where the first partition is 155 chars
|
||||||
|
--echo # and the second partition is 255 chars
|
||||||
|
RENAME TABLE t1 TO `t2_............................end`;
|
||||||
|
# 1234567890123456789012345678
|
||||||
|
# t2_ + end
|
||||||
|
# .MY[ID] or .frm
|
||||||
|
# #P#p[012]
|
||||||
|
# 28 * @002e
|
||||||
|
# 6 + 4 + 5 + 28 * 5 = 155
|
||||||
|
--echo # List of files in database `test`, should not be any t1-files here
|
||||||
|
--list_files $MYSQLD_DATADIR/test t1*
|
||||||
|
--echo # List of files in database `test`, should be all t2-files here
|
||||||
|
--list_files $MYSQLD_DATADIR/test t2*
|
||||||
|
--sorted_result
|
||||||
|
SELECT * FROM `t2_............................end`;
|
||||||
|
RENAME TABLE `t2_............................end` to t1;
|
||||||
|
--echo # List of files in database `test`, should be all t1-files here
|
||||||
|
--list_files $MYSQLD_DATADIR/test t1*
|
||||||
|
--sorted_result
|
||||||
|
SELECT * FROM t1;
|
||||||
|
DROP TABLE t1;
|
||||||
|
--echo # Should not be any files left here
|
||||||
|
--list_files $MYSQLD_DATADIR/test t1*
|
||||||
|
--list_files $MYSQLD_DATADIR/test t2*
|
||||||
|
--echo # End of bug#30102 test.
|
@ -380,3 +380,39 @@ set @@global.concurrent_insert= @old_concurrent_insert;
|
|||||||
# Wait till all disconnects are completed
|
# Wait till all disconnects are completed
|
||||||
--source include/wait_until_count_sessions.inc
|
--source include/wait_until_count_sessions.inc
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#44521 Prepared Statement: CALL p() - crashes: `! thd->main_da.is_sent' failed et.al.
|
||||||
|
--echo #
|
||||||
|
SELECT GET_LOCK('Bug44521', 0);
|
||||||
|
--connect (con1,localhost,root,,)
|
||||||
|
--echo ** Connection con1
|
||||||
|
delimiter $;
|
||||||
|
CREATE PROCEDURE p()
|
||||||
|
BEGIN
|
||||||
|
SELECT 1;
|
||||||
|
SELECT GET_LOCK('Bug44521', 100);
|
||||||
|
SELECT 2;
|
||||||
|
END$
|
||||||
|
delimiter ;$
|
||||||
|
--send CALL p();
|
||||||
|
--connection default
|
||||||
|
--echo ** Default connection
|
||||||
|
let $wait_condition=
|
||||||
|
SELECT count(*) = 1 FROM information_schema.processlist
|
||||||
|
WHERE state = "User lock" AND info = "SELECT GET_LOCK('Bug44521', 100)";
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
let $conid =
|
||||||
|
`SELECT id FROM information_schema.processlist
|
||||||
|
WHERE state = "User lock" AND info = "SELECT GET_LOCK('Bug44521', 100)"`;
|
||||||
|
dirty_close con1;
|
||||||
|
SELECT RELEASE_LOCK('Bug44521');
|
||||||
|
let $wait_condition=
|
||||||
|
SELECT count(*) = 0 FROM information_schema.processlist
|
||||||
|
WHERE id = $conid;
|
||||||
|
--source include/wait_condition.inc
|
||||||
|
DROP PROCEDURE p;
|
||||||
|
|
||||||
|
--echo # ------------------------------------------------------------------
|
||||||
|
--echo # -- End of 5.1 tests
|
||||||
|
--echo # ------------------------------------------------------------------
|
||||||
|
@ -3315,6 +3315,27 @@ EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE 1 IN (SELECT 1 FROM t1 GROUP BY a);
|
|||||||
EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE 1 IN (SELECT 1 FROM t1 WHERE a > 3 GROUP BY a);
|
EXPLAIN EXTENDED SELECT 1 FROM t1 WHERE 1 IN (SELECT 1 FROM t1 WHERE a > 3 GROUP BY a);
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug#45061: Incorrectly market field caused wrong result.
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE `C` (
|
||||||
|
`int_nokey` int(11) NOT NULL,
|
||||||
|
`int_key` int(11) NOT NULL,
|
||||||
|
KEY `int_key` (`int_key`)
|
||||||
|
);
|
||||||
|
|
||||||
|
INSERT INTO `C` VALUES (9,9), (0,0), (8,6), (3,6), (7,6), (0,4),
|
||||||
|
(1,7), (9,4), (0,8), (9,4), (0,7), (5,5), (0,0), (8,5), (8,7),
|
||||||
|
(5,2), (1,8), (7,0), (0,9), (9,5);
|
||||||
|
|
||||||
|
--disable_warnings
|
||||||
|
SELECT * FROM C WHERE `int_key` IN (SELECT `int_nokey`);
|
||||||
|
EXPLAIN EXTENDED SELECT * FROM C WHERE `int_key` IN (SELECT `int_nokey`);
|
||||||
|
--enable_warnings
|
||||||
|
|
||||||
|
DROP TABLE C;
|
||||||
|
--echo # End of test for bug#45061.
|
||||||
|
|
||||||
--echo End of 5.0 tests.
|
--echo End of 5.0 tests.
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -32,11 +32,11 @@
|
|||||||
DESCRIPTION
|
DESCRIPTION
|
||||||
init_dynamic_array() initiates array and allocate space for
|
init_dynamic_array() initiates array and allocate space for
|
||||||
init_alloc eilements.
|
init_alloc eilements.
|
||||||
Array is usable even if space allocation failed.
|
Array is usable even if space allocation failed, hence, the
|
||||||
|
function never returns TRUE.
|
||||||
Static buffers must begin immediately after the array structure.
|
Static buffers must begin immediately after the array structure.
|
||||||
|
|
||||||
RETURN VALUE
|
RETURN VALUE
|
||||||
TRUE my_malloc_ci() failed
|
|
||||||
FALSE Ok
|
FALSE Ok
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -63,12 +63,12 @@ my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size,
|
|||||||
array->size_of_element=element_size;
|
array->size_of_element=element_size;
|
||||||
if ((array->buffer= init_buffer))
|
if ((array->buffer= init_buffer))
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
if (!(array->buffer=(uchar*) my_malloc_ci(element_size*init_alloc,
|
/*
|
||||||
MYF(MY_WME))))
|
Since the dynamic array is usable even if allocation fails here malloc
|
||||||
{
|
should not throw an error
|
||||||
|
*/
|
||||||
|
if (!(array->buffer= (char*) my_malloc_ci(element_size*init_alloc, MYF(0))))
|
||||||
array->max_element=0;
|
array->max_element=0;
|
||||||
DBUG_RETURN(TRUE);
|
|
||||||
}
|
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ static const char *handler_error_messages[]=
|
|||||||
"The event could not be processed no other hanlder error happened",
|
"The event could not be processed no other hanlder error happened",
|
||||||
"Got a fatal error during initialzaction of handler",
|
"Got a fatal error during initialzaction of handler",
|
||||||
"File to short; Expected more data in file",
|
"File to short; Expected more data in file",
|
||||||
"Read page with wrong checksum"
|
"Read page with wrong checksum",
|
||||||
|
"Too many active concurrent transactions"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1430,13 +1430,7 @@ Event_job_data::execute(THD *thd, bool drop)
|
|||||||
thd->variables.sql_mode= sql_mode;
|
thd->variables.sql_mode= sql_mode;
|
||||||
thd->variables.time_zone= time_zone;
|
thd->variables.time_zone= time_zone;
|
||||||
|
|
||||||
/*
|
thd->set_query(sp_sql.c_ptr_safe(), sp_sql.length());
|
||||||
Peculiar initialization order is a crutch to avoid races in SHOW
|
|
||||||
PROCESSLIST which reads thd->{query/query_length} without a mutex.
|
|
||||||
*/
|
|
||||||
thd->query_length= 0;
|
|
||||||
thd->query= sp_sql.c_ptr_safe();
|
|
||||||
thd->query_length= sp_sql.length();
|
|
||||||
|
|
||||||
{
|
{
|
||||||
Parser_state parser_state(thd, thd->query, thd->query_length);
|
Parser_state parser_state(thd, thd->query, thd->query_length);
|
||||||
@ -1497,13 +1491,8 @@ end_no_lex_start:
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
ulong saved_master_access;
|
ulong saved_master_access;
|
||||||
/*
|
|
||||||
Peculiar initialization order is a crutch to avoid races in SHOW
|
thd->set_query(sp_sql.c_ptr_safe(), sp_sql.length());
|
||||||
PROCESSLIST which reads thd->{query/query_length} without a mutex.
|
|
||||||
*/
|
|
||||||
thd->query_length= 0;
|
|
||||||
thd->query= sp_sql.c_ptr_safe();
|
|
||||||
thd->query_length= sp_sql.length();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
NOTE: even if we run in read-only mode, we should be able to lock
|
NOTE: even if we run in read-only mode, we should be able to lock
|
||||||
@ -1528,8 +1517,7 @@ end_no_lex_start:
|
|||||||
thd->end_statement();
|
thd->end_statement();
|
||||||
thd->cleanup_after_query();
|
thd->cleanup_after_query();
|
||||||
/* Avoid races with SHOW PROCESSLIST */
|
/* Avoid races with SHOW PROCESSLIST */
|
||||||
thd->query_length= 0;
|
thd->set_query(NULL, 0);
|
||||||
thd->query= NULL;
|
|
||||||
|
|
||||||
DBUG_PRINT("info", ("EXECUTED %s.%s ret: %d", dbname.str, name.str, ret));
|
DBUG_PRINT("info", ("EXECUTED %s.%s ret: %d", dbname.str, name.str, ret));
|
||||||
|
|
||||||
|
@ -158,6 +158,7 @@ deinit_event_thread(THD *thd)
|
|||||||
thread_count--;
|
thread_count--;
|
||||||
thread_running--;
|
thread_running--;
|
||||||
delete thd;
|
delete thd;
|
||||||
|
pthread_cond_broadcast(&COND_thread_count);
|
||||||
pthread_mutex_unlock(&LOCK_thread_count);
|
pthread_mutex_unlock(&LOCK_thread_count);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -418,6 +419,7 @@ Event_scheduler::start()
|
|||||||
thread_count--;
|
thread_count--;
|
||||||
thread_running--;
|
thread_running--;
|
||||||
delete new_thd;
|
delete new_thd;
|
||||||
|
pthread_cond_broadcast(&COND_thread_count);
|
||||||
pthread_mutex_unlock(&LOCK_thread_count);
|
pthread_mutex_unlock(&LOCK_thread_count);
|
||||||
}
|
}
|
||||||
end:
|
end:
|
||||||
@ -550,6 +552,7 @@ error:
|
|||||||
thread_count--;
|
thread_count--;
|
||||||
thread_running--;
|
thread_running--;
|
||||||
delete new_thd;
|
delete new_thd;
|
||||||
|
pthread_cond_broadcast(&COND_thread_count);
|
||||||
pthread_mutex_unlock(&LOCK_thread_count);
|
pthread_mutex_unlock(&LOCK_thread_count);
|
||||||
}
|
}
|
||||||
delete event_name;
|
delete event_name;
|
||||||
@ -625,13 +628,13 @@ Event_scheduler::stop()
|
|||||||
DBUG_PRINT("info", ("Scheduler thread has id %lu",
|
DBUG_PRINT("info", ("Scheduler thread has id %lu",
|
||||||
scheduler_thd->thread_id));
|
scheduler_thd->thread_id));
|
||||||
/* Lock from delete */
|
/* Lock from delete */
|
||||||
pthread_mutex_lock(&scheduler_thd->LOCK_delete);
|
pthread_mutex_lock(&scheduler_thd->LOCK_thd_data);
|
||||||
/* This will wake up the thread if it waits on Queue's conditional */
|
/* This will wake up the thread if it waits on Queue's conditional */
|
||||||
sql_print_information("Event Scheduler: Killing the scheduler thread, "
|
sql_print_information("Event Scheduler: Killing the scheduler thread, "
|
||||||
"thread id %lu",
|
"thread id %lu",
|
||||||
scheduler_thd->thread_id);
|
scheduler_thd->thread_id);
|
||||||
scheduler_thd->awake(THD::KILL_CONNECTION);
|
scheduler_thd->awake(THD::KILL_CONNECTION);
|
||||||
pthread_mutex_unlock(&scheduler_thd->LOCK_delete);
|
pthread_mutex_unlock(&scheduler_thd->LOCK_thd_data);
|
||||||
|
|
||||||
/* thd could be 0x0, when shutting down */
|
/* thd could be 0x0, when shutting down */
|
||||||
sql_print_information("Event Scheduler: "
|
sql_print_information("Event Scheduler: "
|
||||||
|
@ -852,22 +852,23 @@ Events::fill_schema_events(THD *thd, TABLE_LIST *tables, COND * /* cond */)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/**
|
||||||
Inits the scheduler's structures.
|
Initializes the scheduler's structures.
|
||||||
|
|
||||||
SYNOPSIS
|
@param opt_noacl_or_bootstrap
|
||||||
Events::init()
|
TRUE if there is --skip-grant-tables or --bootstrap
|
||||||
|
option. In that case we disable the event scheduler.
|
||||||
|
|
||||||
NOTES
|
@note This function is not synchronized.
|
||||||
This function is not synchronized.
|
|
||||||
|
|
||||||
RETURN VALUE
|
@retval FALSE Perhaps there was an error, and the event scheduler
|
||||||
FALSE OK
|
is disabled. But the error is not fatal and the
|
||||||
TRUE Error in case the scheduler can't start
|
server start up can continue.
|
||||||
|
@retval TRUE Fatal error. Startup must terminate (call unireg_abort()).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Events::init(my_bool opt_noacl)
|
Events::init(my_bool opt_noacl_or_bootstrap)
|
||||||
{
|
{
|
||||||
|
|
||||||
THD *thd;
|
THD *thd;
|
||||||
@ -875,11 +876,6 @@ Events::init(my_bool opt_noacl)
|
|||||||
|
|
||||||
DBUG_ENTER("Events::init");
|
DBUG_ENTER("Events::init");
|
||||||
|
|
||||||
/* Disable the scheduler if running with --skip-grant-tables */
|
|
||||||
if (opt_noacl)
|
|
||||||
opt_event_scheduler= EVENTS_DISABLED;
|
|
||||||
|
|
||||||
|
|
||||||
/* We need a temporary THD during boot */
|
/* We need a temporary THD during boot */
|
||||||
if (!(thd= new THD()))
|
if (!(thd= new THD()))
|
||||||
{
|
{
|
||||||
@ -908,23 +904,30 @@ Events::init(my_bool opt_noacl)
|
|||||||
/*
|
/*
|
||||||
Since we allow event DDL even if the scheduler is disabled,
|
Since we allow event DDL even if the scheduler is disabled,
|
||||||
check the system tables, as we might need them.
|
check the system tables, as we might need them.
|
||||||
|
|
||||||
|
If run with --skip-grant-tables or --bootstrap, don't try to do the
|
||||||
|
check of system tables and don't complain: in these modes the tables
|
||||||
|
are most likely not there and we're going to disable the event
|
||||||
|
scheduler anyway.
|
||||||
*/
|
*/
|
||||||
if (Event_db_repository::check_system_tables(thd))
|
if (opt_noacl_or_bootstrap || Event_db_repository::check_system_tables(thd))
|
||||||
{
|
{
|
||||||
sql_print_error("Event Scheduler: An error occurred when initializing "
|
if (! opt_noacl_or_bootstrap)
|
||||||
"system tables.%s",
|
{
|
||||||
opt_event_scheduler == EVENTS_DISABLED ?
|
sql_print_error("Event Scheduler: An error occurred when initializing "
|
||||||
"" : " Disabling the Event Scheduler.");
|
"system tables. Disabling the Event Scheduler.");
|
||||||
|
check_system_tables_error= TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Disable the scheduler since the system tables are not up to date */
|
/* Disable the scheduler since the system tables are not up to date */
|
||||||
opt_event_scheduler= EVENTS_DISABLED;
|
opt_event_scheduler= EVENTS_DISABLED;
|
||||||
check_system_tables_error= TRUE;
|
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Was disabled explicitly from the command line, or because we're running
|
Was disabled explicitly from the command line, or because we're running
|
||||||
with --skip-grant-tables, or because we have no system tables.
|
with --skip-grant-tables, or --bootstrap, or because we have no system
|
||||||
|
tables.
|
||||||
*/
|
*/
|
||||||
if (opt_event_scheduler == Events::EVENTS_DISABLED)
|
if (opt_event_scheduler == Events::EVENTS_DISABLED)
|
||||||
goto end;
|
goto end;
|
||||||
@ -941,7 +944,7 @@ Events::init(my_bool opt_noacl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (event_queue->init_queue(thd) || load_events_from_db(thd) ||
|
if (event_queue->init_queue(thd) || load_events_from_db(thd) ||
|
||||||
opt_event_scheduler == EVENTS_ON && scheduler->start())
|
(opt_event_scheduler == EVENTS_ON && scheduler->start()))
|
||||||
{
|
{
|
||||||
sql_print_error("Event Scheduler: Error while loading from disk.");
|
sql_print_error("Event Scheduler: Error while loading from disk.");
|
||||||
res= TRUE; /* fatal error: request unireg_abort */
|
res= TRUE; /* fatal error: request unireg_abort */
|
||||||
|
39
sql/field.cc
39
sql/field.cc
@ -6271,48 +6271,15 @@ check_string_copy_error(Field_str *field,
|
|||||||
const char *end,
|
const char *end,
|
||||||
CHARSET_INFO *cs)
|
CHARSET_INFO *cs)
|
||||||
{
|
{
|
||||||
const char *pos, *end_orig;
|
const char *pos;
|
||||||
char tmp[64], *t;
|
char tmp[32];
|
||||||
|
|
||||||
if (!(pos= well_formed_error_pos) &&
|
if (!(pos= well_formed_error_pos) &&
|
||||||
!(pos= cannot_convert_error_pos))
|
!(pos= cannot_convert_error_pos))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
end_orig= end;
|
convert_to_printable(tmp, sizeof(tmp), pos, (end - pos), cs, 6);
|
||||||
set_if_smaller(end, pos + 6);
|
|
||||||
|
|
||||||
for (t= tmp; pos < end; pos++)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
If the source string is ASCII compatible (mbminlen==1)
|
|
||||||
and the source character is in ASCII printable range (0x20..0x7F),
|
|
||||||
then display the character as is.
|
|
||||||
|
|
||||||
Otherwise, if the source string is not ASCII compatible (e.g. UCS2),
|
|
||||||
or the source character is not in the printable range,
|
|
||||||
then print the character using HEX notation.
|
|
||||||
*/
|
|
||||||
if (((unsigned char) *pos) >= 0x20 &&
|
|
||||||
((unsigned char) *pos) <= 0x7F &&
|
|
||||||
cs->mbminlen == 1)
|
|
||||||
{
|
|
||||||
*t++= *pos;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
*t++= '\\';
|
|
||||||
*t++= 'x';
|
|
||||||
*t++= _dig_vec_upper[((unsigned char) *pos) >> 4];
|
|
||||||
*t++= _dig_vec_upper[((unsigned char) *pos) & 15];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (end_orig > end)
|
|
||||||
{
|
|
||||||
*t++= '.';
|
|
||||||
*t++= '.';
|
|
||||||
*t++= '.';
|
|
||||||
}
|
|
||||||
*t= '\0';
|
|
||||||
push_warning_printf(field->table->in_use,
|
push_warning_printf(field->table->in_use,
|
||||||
field->table->in_use->abort_on_warning ?
|
field->table->in_use->abort_on_warning ?
|
||||||
MYSQL_ERROR::WARN_LEVEL_ERROR :
|
MYSQL_ERROR::WARN_LEVEL_ERROR :
|
||||||
|
@ -253,8 +253,7 @@ static void run_query(THD *thd, char *buf, char *end,
|
|||||||
const char* found_semicolon= NULL;
|
const char* found_semicolon= NULL;
|
||||||
|
|
||||||
bzero((char*) &thd->net, sizeof(NET));
|
bzero((char*) &thd->net, sizeof(NET));
|
||||||
thd->query_length= end - buf;
|
thd->set_query(buf, (uint) (end - buf));
|
||||||
thd->query= buf;
|
|
||||||
thd->variables.pseudo_thread_id= thread_id;
|
thd->variables.pseudo_thread_id= thread_id;
|
||||||
thd->transaction.stmt.modified_non_trans_table= FALSE;
|
thd->transaction.stmt.modified_non_trans_table= FALSE;
|
||||||
if (disable_binlog)
|
if (disable_binlog)
|
||||||
@ -297,8 +296,7 @@ static void run_query(THD *thd, char *buf, char *end,
|
|||||||
thd->main_da.reset_diagnostics_area();
|
thd->main_da.reset_diagnostics_area();
|
||||||
|
|
||||||
thd->options= save_thd_options;
|
thd->options= save_thd_options;
|
||||||
thd->query_length= save_thd_query_length;
|
thd->set_query(save_thd_query, save_thd_query_length);
|
||||||
thd->query= save_thd_query;
|
|
||||||
thd->variables.pseudo_thread_id= save_thread_id;
|
thd->variables.pseudo_thread_id= save_thread_id;
|
||||||
thd->status_var= save_thd_status_var;
|
thd->status_var= save_thd_status_var;
|
||||||
thd->transaction.all= save_thd_transaction_all;
|
thd->transaction.all= save_thd_transaction_all;
|
||||||
|
@ -423,12 +423,9 @@ bool ha_partition::initialize_partition(MEM_ROOT *mem_root)
|
|||||||
|
|
||||||
int ha_partition::delete_table(const char *name)
|
int ha_partition::delete_table(const char *name)
|
||||||
{
|
{
|
||||||
int error;
|
|
||||||
DBUG_ENTER("ha_partition::delete_table");
|
DBUG_ENTER("ha_partition::delete_table");
|
||||||
|
|
||||||
if ((error= del_ren_cre_table(name, NULL, NULL, NULL)))
|
DBUG_RETURN(del_ren_cre_table(name, NULL, NULL, NULL));
|
||||||
DBUG_RETURN(error);
|
|
||||||
DBUG_RETURN(handler::delete_table(name));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -456,12 +453,9 @@ int ha_partition::delete_table(const char *name)
|
|||||||
|
|
||||||
int ha_partition::rename_table(const char *from, const char *to)
|
int ha_partition::rename_table(const char *from, const char *to)
|
||||||
{
|
{
|
||||||
int error;
|
|
||||||
DBUG_ENTER("ha_partition::rename_table");
|
DBUG_ENTER("ha_partition::rename_table");
|
||||||
|
|
||||||
if ((error= del_ren_cre_table(from, to, NULL, NULL)))
|
DBUG_RETURN(del_ren_cre_table(from, to, NULL, NULL));
|
||||||
DBUG_RETURN(error);
|
|
||||||
DBUG_RETURN(handler::rename_table(from, to));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1807,6 +1801,15 @@ uint ha_partition::del_ren_cre_table(const char *from,
|
|||||||
DBUG_PRINT("enter", ("from: (%s) to: (%s)", from, to));
|
DBUG_PRINT("enter", ("from: (%s) to: (%s)", from, to));
|
||||||
name_buffer_ptr= m_name_buffer_ptr;
|
name_buffer_ptr= m_name_buffer_ptr;
|
||||||
file= m_file;
|
file= m_file;
|
||||||
|
if (to == NULL && table_arg == NULL)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
Delete table, start by delete the .par file. If error, break, otherwise
|
||||||
|
delete as much as possible.
|
||||||
|
*/
|
||||||
|
if ((error= handler::delete_table(from)))
|
||||||
|
DBUG_RETURN(error);
|
||||||
|
}
|
||||||
/*
|
/*
|
||||||
Since ha_partition has HA_FILE_BASED, it must alter underlying table names
|
Since ha_partition has HA_FILE_BASED, it must alter underlying table names
|
||||||
if they do not have HA_FILE_BASED and lower_case_table_names == 2.
|
if they do not have HA_FILE_BASED and lower_case_table_names == 2.
|
||||||
@ -1828,6 +1831,8 @@ uint ha_partition::del_ren_cre_table(const char *from,
|
|||||||
create_partition_name(to_buff, to_path, name_buffer_ptr,
|
create_partition_name(to_buff, to_path, name_buffer_ptr,
|
||||||
NORMAL_PART_NAME, FALSE);
|
NORMAL_PART_NAME, FALSE);
|
||||||
error= (*file)->ha_rename_table(from_buff, to_buff);
|
error= (*file)->ha_rename_table(from_buff, to_buff);
|
||||||
|
if (error)
|
||||||
|
goto rename_error;
|
||||||
}
|
}
|
||||||
else if (table_arg == NULL) // delete branch
|
else if (table_arg == NULL) // delete branch
|
||||||
error= (*file)->ha_delete_table(from_buff);
|
error= (*file)->ha_delete_table(from_buff);
|
||||||
@ -1843,6 +1848,15 @@ uint ha_partition::del_ren_cre_table(const char *from,
|
|||||||
save_error= error;
|
save_error= error;
|
||||||
i++;
|
i++;
|
||||||
} while (*(++file));
|
} while (*(++file));
|
||||||
|
if (to != NULL)
|
||||||
|
{
|
||||||
|
if ((error= handler::rename_table(from, to)))
|
||||||
|
{
|
||||||
|
/* Try to revert everything, ignore errors */
|
||||||
|
(void) handler::rename_table(to, from);
|
||||||
|
goto rename_error;
|
||||||
|
}
|
||||||
|
}
|
||||||
DBUG_RETURN(save_error);
|
DBUG_RETURN(save_error);
|
||||||
create_error:
|
create_error:
|
||||||
name_buffer_ptr= m_name_buffer_ptr;
|
name_buffer_ptr= m_name_buffer_ptr;
|
||||||
@ -1850,7 +1864,21 @@ create_error:
|
|||||||
{
|
{
|
||||||
create_partition_name(from_buff, from_path, name_buffer_ptr, NORMAL_PART_NAME,
|
create_partition_name(from_buff, from_path, name_buffer_ptr, NORMAL_PART_NAME,
|
||||||
FALSE);
|
FALSE);
|
||||||
VOID((*file)->ha_delete_table((const char*) from_buff));
|
(void) (*file)->ha_delete_table((const char*) from_buff);
|
||||||
|
name_buffer_ptr= strend(name_buffer_ptr) + 1;
|
||||||
|
}
|
||||||
|
DBUG_RETURN(error);
|
||||||
|
rename_error:
|
||||||
|
name_buffer_ptr= m_name_buffer_ptr;
|
||||||
|
for (abort_file= file, file= m_file; file < abort_file; file++)
|
||||||
|
{
|
||||||
|
/* Revert the rename, back from 'to' to the original 'from' */
|
||||||
|
create_partition_name(from_buff, from_path, name_buffer_ptr,
|
||||||
|
NORMAL_PART_NAME, FALSE);
|
||||||
|
create_partition_name(to_buff, to_path, name_buffer_ptr,
|
||||||
|
NORMAL_PART_NAME, FALSE);
|
||||||
|
/* Ignore error here */
|
||||||
|
(void) (*file)->ha_rename_table(to_buff, from_buff);
|
||||||
name_buffer_ptr= strend(name_buffer_ptr) + 1;
|
name_buffer_ptr= strend(name_buffer_ptr) + 1;
|
||||||
}
|
}
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
@ -3179,6 +3207,7 @@ int ha_partition::delete_row(const uchar *buf)
|
|||||||
int ha_partition::delete_all_rows()
|
int ha_partition::delete_all_rows()
|
||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
|
bool truncate= FALSE;
|
||||||
handler **file;
|
handler **file;
|
||||||
THD *thd= ha_thd();
|
THD *thd= ha_thd();
|
||||||
DBUG_ENTER("ha_partition::delete_all_rows");
|
DBUG_ENTER("ha_partition::delete_all_rows");
|
||||||
@ -3190,12 +3219,16 @@ int ha_partition::delete_all_rows()
|
|||||||
ha_data->next_auto_inc_val= 0;
|
ha_data->next_auto_inc_val= 0;
|
||||||
ha_data->auto_inc_initialized= FALSE;
|
ha_data->auto_inc_initialized= FALSE;
|
||||||
unlock_auto_increment();
|
unlock_auto_increment();
|
||||||
|
truncate= TRUE;
|
||||||
}
|
}
|
||||||
file= m_file;
|
file= m_file;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if ((error= (*file)->ha_delete_all_rows()))
|
if ((error= (*file)->ha_delete_all_rows()))
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
|
/* Ignore the error */
|
||||||
|
if (truncate)
|
||||||
|
(void) (*file)->ha_reset_auto_increment(0);
|
||||||
} while (*(++file));
|
} while (*(++file));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
@ -62,7 +62,9 @@ static const LEX_STRING sys_table_aliases[]=
|
|||||||
};
|
};
|
||||||
|
|
||||||
const char *ha_row_type[] = {
|
const char *ha_row_type[] = {
|
||||||
"", "FIXED", "DYNAMIC", "COMPRESSED", "REDUNDANT", "COMPACT", "PAGE", "?","?","?"
|
"", "FIXED", "DYNAMIC", "COMPRESSED", "REDUNDANT", "COMPACT",
|
||||||
|
/* Reserved to be "PAGE" in future versions */ "?",
|
||||||
|
"?","?","?"
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *tx_isolation_names[] =
|
const char *tx_isolation_names[] =
|
||||||
@ -342,6 +344,7 @@ int ha_init_errors(void)
|
|||||||
SETMSG(HA_ERR_TABLE_READONLY, ER(ER_OPEN_AS_READONLY));
|
SETMSG(HA_ERR_TABLE_READONLY, ER(ER_OPEN_AS_READONLY));
|
||||||
SETMSG(HA_ERR_AUTOINC_READ_FAILED, ER(ER_AUTOINC_READ_FAILED));
|
SETMSG(HA_ERR_AUTOINC_READ_FAILED, ER(ER_AUTOINC_READ_FAILED));
|
||||||
SETMSG(HA_ERR_AUTOINC_ERANGE, ER(ER_WARN_DATA_OUT_OF_RANGE));
|
SETMSG(HA_ERR_AUTOINC_ERANGE, ER(ER_WARN_DATA_OUT_OF_RANGE));
|
||||||
|
SETMSG(HA_ERR_TOO_MANY_CONCURRENT_TRXS, ER(ER_TOO_MANY_CONCURRENT_TRXS));
|
||||||
|
|
||||||
/* Register the error messages for use with my_error(). */
|
/* Register the error messages for use with my_error(). */
|
||||||
return my_error_register(errmsgs, HA_ERR_FIRST, HA_ERR_LAST);
|
return my_error_register(errmsgs, HA_ERR_FIRST, HA_ERR_LAST);
|
||||||
@ -2747,6 +2750,9 @@ void handler::print_error(int error, myf errflag)
|
|||||||
case HA_ERR_AUTOINC_ERANGE:
|
case HA_ERR_AUTOINC_ERANGE:
|
||||||
textno= ER_WARN_DATA_OUT_OF_RANGE;
|
textno= ER_WARN_DATA_OUT_OF_RANGE;
|
||||||
break;
|
break;
|
||||||
|
case HA_ERR_TOO_MANY_CONCURRENT_TRXS:
|
||||||
|
textno= ER_TOO_MANY_CONCURRENT_TRXS;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
/* The error was "unknown" to this function.
|
/* The error was "unknown" to this function.
|
||||||
@ -2973,6 +2979,7 @@ uint handler::get_dup_key(int error)
|
|||||||
*/
|
*/
|
||||||
int handler::delete_table(const char *name)
|
int handler::delete_table(const char *name)
|
||||||
{
|
{
|
||||||
|
int saved_error= 0;
|
||||||
int error= 0;
|
int error= 0;
|
||||||
int enoent_or_zero= ENOENT; // Error if no file was deleted
|
int enoent_or_zero= ENOENT; // Error if no file was deleted
|
||||||
char buff[FN_REFLEN];
|
char buff[FN_REFLEN];
|
||||||
@ -2982,21 +2989,31 @@ int handler::delete_table(const char *name)
|
|||||||
fn_format(buff, name, "", *ext, MY_UNPACK_FILENAME|MY_APPEND_EXT);
|
fn_format(buff, name, "", *ext, MY_UNPACK_FILENAME|MY_APPEND_EXT);
|
||||||
if (my_delete_with_symlink(buff, MYF(0)))
|
if (my_delete_with_symlink(buff, MYF(0)))
|
||||||
{
|
{
|
||||||
if ((error= my_errno) != ENOENT)
|
if (my_errno != ENOENT)
|
||||||
break;
|
{
|
||||||
|
/*
|
||||||
|
If error on the first existing file, return the error.
|
||||||
|
Otherwise delete as much as possible.
|
||||||
|
*/
|
||||||
|
if (enoent_or_zero)
|
||||||
|
return my_errno;
|
||||||
|
saved_error= my_errno;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
enoent_or_zero= 0; // No error for ENOENT
|
enoent_or_zero= 0; // No error for ENOENT
|
||||||
error= enoent_or_zero;
|
error= enoent_or_zero;
|
||||||
}
|
}
|
||||||
return error;
|
return saved_error ? saved_error : error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int handler::rename_table(const char * from, const char * to)
|
int handler::rename_table(const char * from, const char * to)
|
||||||
{
|
{
|
||||||
int error= 0;
|
int error= 0;
|
||||||
for (const char **ext= bas_ext(); *ext ; ext++)
|
const char **ext, **start_ext;
|
||||||
|
start_ext= bas_ext();
|
||||||
|
for (ext= start_ext; *ext ; ext++)
|
||||||
{
|
{
|
||||||
if (rename_file_ext(from, to, *ext))
|
if (rename_file_ext(from, to, *ext))
|
||||||
{
|
{
|
||||||
@ -3005,6 +3022,12 @@ int handler::rename_table(const char * from, const char * to)
|
|||||||
error= 0;
|
error= 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
/* Try to revert the rename. Ignore errors. */
|
||||||
|
for (; ext >= start_ext; ext--)
|
||||||
|
rename_file_ext(to, from, *ext);
|
||||||
|
}
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -280,7 +280,9 @@ enum legacy_db_type
|
|||||||
|
|
||||||
enum row_type { ROW_TYPE_NOT_USED=-1, ROW_TYPE_DEFAULT, ROW_TYPE_FIXED,
|
enum row_type { ROW_TYPE_NOT_USED=-1, ROW_TYPE_DEFAULT, ROW_TYPE_FIXED,
|
||||||
ROW_TYPE_DYNAMIC, ROW_TYPE_COMPRESSED,
|
ROW_TYPE_DYNAMIC, ROW_TYPE_COMPRESSED,
|
||||||
ROW_TYPE_REDUNDANT, ROW_TYPE_COMPACT, ROW_TYPE_PAGE };
|
ROW_TYPE_REDUNDANT, ROW_TYPE_COMPACT,
|
||||||
|
/** Unused. Reserved for future versions. */
|
||||||
|
ROW_TYPE_PAGE };
|
||||||
|
|
||||||
enum enum_binlog_func {
|
enum enum_binlog_func {
|
||||||
BFN_RESET_LOGS= 1,
|
BFN_RESET_LOGS= 1,
|
||||||
@ -323,7 +325,9 @@ enum enum_binlog_command {
|
|||||||
#define HA_CREATE_USED_PASSWORD (1L << 17)
|
#define HA_CREATE_USED_PASSWORD (1L << 17)
|
||||||
#define HA_CREATE_USED_CONNECTION (1L << 18)
|
#define HA_CREATE_USED_CONNECTION (1L << 18)
|
||||||
#define HA_CREATE_USED_KEY_BLOCK_SIZE (1L << 19)
|
#define HA_CREATE_USED_KEY_BLOCK_SIZE (1L << 19)
|
||||||
|
/** Unused. Reserved for future versions. */
|
||||||
#define HA_CREATE_USED_TRANSACTIONAL (1L << 20)
|
#define HA_CREATE_USED_TRANSACTIONAL (1L << 20)
|
||||||
|
/** Unused. Reserved for future versions. */
|
||||||
#define HA_CREATE_USED_PAGE_CHECKSUM (1L << 21)
|
#define HA_CREATE_USED_PAGE_CHECKSUM (1L << 21)
|
||||||
|
|
||||||
typedef ulonglong my_xid; // this line is the same as in log_event.h
|
typedef ulonglong my_xid; // this line is the same as in log_event.h
|
||||||
@ -914,13 +918,14 @@ typedef struct st_ha_create_information
|
|||||||
uint options; /* OR of HA_CREATE_ options */
|
uint options; /* OR of HA_CREATE_ options */
|
||||||
uint merge_insert_method;
|
uint merge_insert_method;
|
||||||
uint extra_size; /* length of extra data segment */
|
uint extra_size; /* length of extra data segment */
|
||||||
/* 0 not used, 1 if not transactional, 2 if transactional */
|
/** Transactional or not. Unused; reserved for future versions. */
|
||||||
enum ha_choice transactional;
|
enum ha_choice transactional;
|
||||||
bool table_existed; /* 1 in create if table existed */
|
bool table_existed; /* 1 in create if table existed */
|
||||||
bool frm_only; /* 1 if no ha_create_table() */
|
bool frm_only; /* 1 if no ha_create_table() */
|
||||||
bool varchar; /* 1 if table has a VARCHAR */
|
bool varchar; /* 1 if table has a VARCHAR */
|
||||||
enum ha_storage_media storage_media; /* DEFAULT, DISK or MEMORY */
|
enum ha_storage_media storage_media; /* DEFAULT, DISK or MEMORY */
|
||||||
enum ha_choice page_checksum; /* If we have page_checksums */
|
/** Per-page checksums or not. Unused; reserved for future versions. */
|
||||||
|
enum ha_choice page_checksum;
|
||||||
} HA_CREATE_INFO;
|
} HA_CREATE_INFO;
|
||||||
|
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user