mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
merge mysql-5.5->mysql-5.5-security
This commit is contained in:
69
.bzrignore
69
.bzrignore
@ -43,7 +43,6 @@
|
||||
*.vcxproj
|
||||
*.vcxproj.filters
|
||||
*/*.dir/*
|
||||
*.dir
|
||||
Debug
|
||||
MySql.sdf
|
||||
Win32
|
||||
@ -497,7 +496,6 @@ contrib/*.ds?
|
||||
contrib/*.vcproj
|
||||
core
|
||||
core.*
|
||||
core.2430
|
||||
cscope.in.out
|
||||
cscope.out
|
||||
cscope.po.out
|
||||
@ -1314,6 +1312,7 @@ mysql-max-4.0.2-alpha-pc-linux-gnu-i686.tar.gz
|
||||
mysql-test/*.ds?
|
||||
mysql-test/*.vcproj
|
||||
mysql-test/.DS_Store
|
||||
mysql-test/collections/default.release
|
||||
mysql-test/funcs_1.log
|
||||
mysql-test/funcs_1.tar
|
||||
mysql-test/gmon.out
|
||||
@ -1335,81 +1334,17 @@ mysql-test/r/*.err
|
||||
mysql-test/r/*.log
|
||||
mysql-test/r/*.out
|
||||
mysql-test/r/*.reject
|
||||
mysql-test/r/alter_table.err
|
||||
mysql-test/r/archive.err
|
||||
mysql-test/r/backup.log
|
||||
mysql-test/r/bdb-alter-table-1.err
|
||||
mysql-test/r/bdb-alter-table-2.err
|
||||
mysql-test/r/bdb-crash.err
|
||||
mysql-test/r/bdb-deadlock.err
|
||||
mysql-test/r/bdb.err
|
||||
mysql-test/r/bdb.log
|
||||
mysql-test/r/bdb_cache.err
|
||||
mysql-test/r/blackhole.log
|
||||
mysql-test/r/client_test.err
|
||||
mysql-test/r/csv.err
|
||||
mysql-test/r/ctype_ucs.err
|
||||
mysql-test/r/derived.err
|
||||
mysql-test/r/events.log
|
||||
mysql-test/r/events_bugs.log
|
||||
mysql-test/r/events_logs_tests.log
|
||||
mysql-test/r/exampledb.err
|
||||
mysql-test/r/func_encrypt.err
|
||||
mysql-test/r/im_client_port.log
|
||||
mysql-test/r/index_merge_load.result
|
||||
mysql-test/r/isam.err
|
||||
mysql-test/r/lowercase_table2.err
|
||||
mysql-test/r/max_allowed_packet_func.result
|
||||
mysql-test/r/multi_update.err
|
||||
mysql-test/r/mysql_protocols.err
|
||||
mysql-test/r/mysqlbinlog.err
|
||||
mysql-test/r/mysqlbinlog2.err
|
||||
mysql-test/r/mysqldump.err
|
||||
mysql-test/r/mysqltest.err
|
||||
mysql-test/r/mysqltest.log
|
||||
mysql-test/r/ndb_alter_table.err
|
||||
mysql-test/r/ndb_autodiscover.err
|
||||
mysql-test/r/ndb_autodiscover2.err
|
||||
mysql-test/r/ndb_basic.err
|
||||
mysql-test/r/ndb_blob.err
|
||||
mysql-test/r/ndb_cache.err
|
||||
mysql-test/r/ndb_charset.err
|
||||
mysql-test/r/ndb_index.err
|
||||
mysql-test/r/ndb_index_ordered.err
|
||||
mysql-test/r/ndb_index_unique.err
|
||||
mysql-test/r/ndb_insert.err
|
||||
mysql-test/r/ndb_limit.err
|
||||
mysql-test/r/ndb_lock.err
|
||||
mysql-test/r/ndb_minmax.err
|
||||
mysql-test/r/ndb_replace.err
|
||||
mysql-test/r/ndb_subquery.err
|
||||
mysql-test/r/ndb_transaction.err
|
||||
mysql-test/r/ndb_truncate.err
|
||||
mysql-test/r/ndb_types.err
|
||||
mysql-test/r/ndb_update.err
|
||||
mysql-test/r/openssl_1.err
|
||||
mysql-test/r/ps_1general.err
|
||||
mysql-test/r/ps_6bdb.err
|
||||
mysql-test/r/ps_7ndb.err
|
||||
mysql-test/r/query_cache.err
|
||||
mysql-test/r/query_cache_merge.err
|
||||
mysql-test/r/raid.err
|
||||
mysql-test/r/repair.err
|
||||
mysql-test/r/replace.err
|
||||
mysql-test/r/rpl000001.err
|
||||
mysql-test/r/rpl000001.eval
|
||||
mysql-test/r/rpl000002.eval
|
||||
mysql-test/r/rpl000014.eval
|
||||
mysql-test/r/rpl000015.err
|
||||
mysql-test/r/rpl000015.eval
|
||||
mysql-test/r/rpl000016.eval
|
||||
mysql-test/r/rpl_log.eval
|
||||
mysql-test/r/slave-running.eval
|
||||
mysql-test/r/slave-stopped.eval
|
||||
mysql-test/r/symlink.log
|
||||
mysql-test/r/system_mysql_db.log
|
||||
mysql-test/r/tmp.result
|
||||
mysql-test/r/udf.log
|
||||
mysql-test/reg.log
|
||||
mysql-test/rpl.log
|
||||
mysql-test/share/mysql
|
||||
@ -3104,9 +3039,7 @@ sql/share/swedish
|
||||
sql/share/ukrainian
|
||||
libmysqld/examples/mysqltest.cc
|
||||
libmysqld/sql_signal.cc
|
||||
libmysqld/rpl_handler.cc
|
||||
libmysqld/debug_sync.cc
|
||||
libmysqld/rpl_handler.cc
|
||||
dbug/tests
|
||||
libmysqld/mdl.cc
|
||||
client/transaction.h
|
||||
|
@ -54,6 +54,9 @@ ADD_DEPENDENCIES(mysql_upgrade GenFixPrivs)
|
||||
MYSQL_ADD_EXECUTABLE(mysqlshow mysqlshow.c)
|
||||
TARGET_LINK_LIBRARIES(mysqlshow mysqlclient)
|
||||
|
||||
MYSQL_ADD_EXECUTABLE(mysql_plugin mysql_plugin.c)
|
||||
TARGET_LINK_LIBRARIES(mysql_plugin mysqlclient)
|
||||
|
||||
MYSQL_ADD_EXECUTABLE(mysqlbinlog mysqlbinlog.cc)
|
||||
TARGET_LINK_LIBRARIES(mysqlbinlog mysqlclient)
|
||||
|
||||
@ -69,7 +72,7 @@ IF(WIN32)
|
||||
MYSQL_ADD_EXECUTABLE(echo echo.c)
|
||||
ENDIF(WIN32)
|
||||
|
||||
SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap
|
||||
SET_TARGET_PROPERTIES (mysqlcheck mysqldump mysqlimport mysql_upgrade mysqlshow mysqlslap mysql_plugin
|
||||
PROPERTIES HAS_CXX TRUE)
|
||||
|
||||
ADD_DEFINITIONS(-DHAVE_DLOPEN)
|
||||
|
@ -4308,7 +4308,7 @@ sql_real_connect(char *host,char *database,char *user,char *password,
|
||||
{
|
||||
char init_command[100];
|
||||
sprintf(init_command,
|
||||
"SET SQL_SAFE_UPDATES=1,SQL_SELECT_LIMIT=%lu,SQL_MAX_JOIN_SIZE=%lu",
|
||||
"SET SQL_SAFE_UPDATES=1,SQL_SELECT_LIMIT=%lu,MAX_JOIN_SIZE=%lu",
|
||||
select_limit,max_join_size);
|
||||
mysql_options(&mysql, MYSQL_INIT_COMMAND, init_command);
|
||||
}
|
||||
|
1202
client/mysql_plugin.c
Normal file
1202
client/mysql_plugin.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -118,6 +118,41 @@ static char **default_argv;
|
||||
static const char *load_default_groups[]= { "mysqltest", "client", 0 };
|
||||
static char line_buffer[MAX_DELIMITER_LENGTH], *line_buffer_pos= line_buffer;
|
||||
|
||||
/* Info on properties that can be set with --enable_X and --disable_X */
|
||||
|
||||
struct property {
|
||||
my_bool *var; /* Actual variable */
|
||||
my_bool set; /* Has been set for ONE command */
|
||||
my_bool old; /* If set, thus is the old value */
|
||||
my_bool reverse; /* Varible is true if disabled */
|
||||
const char *env_name; /* Env. variable name */
|
||||
};
|
||||
|
||||
static struct property prop_list[] = {
|
||||
{ &abort_on_error, 0, 1, 0, "$ENABLED_ABORT_ON_ERROR" },
|
||||
{ &disable_connect_log, 0, 1, 1, "$ENABLED_CONNECT_LOG" },
|
||||
{ &disable_info, 0, 1, 1, "$ENABLED_INFO" },
|
||||
{ &display_metadata, 0, 0, 0, "$ENABLED_METADATA" },
|
||||
{ &ps_protocol_enabled, 0, 0, 0, "$ENABLED_PS_PROTOCOL" },
|
||||
{ &disable_query_log, 0, 0, 1, "$ENABLED_QUERY_LOG" },
|
||||
{ &disable_result_log, 0, 0, 1, "$ENABLED_RESULT_LOG" },
|
||||
{ &disable_warnings, 0, 0, 1, "$ENABLED_WARNINGS" }
|
||||
};
|
||||
|
||||
static my_bool once_property= FALSE;
|
||||
|
||||
enum enum_prop {
|
||||
P_ABORT= 0,
|
||||
P_CONNECT,
|
||||
P_INFO,
|
||||
P_META,
|
||||
P_PS,
|
||||
P_QUERY,
|
||||
P_RESULT,
|
||||
P_WARN,
|
||||
P_MAX
|
||||
};
|
||||
|
||||
static uint start_lineno= 0; /* Start line of current command */
|
||||
static uint my_end_arg= 0;
|
||||
|
||||
@ -463,6 +498,7 @@ TYPELIB command_typelib= {array_elements(command_names),"",
|
||||
DYNAMIC_STRING ds_res;
|
||||
/* Points to ds_warning in run_query, so it can be freed */
|
||||
DYNAMIC_STRING *ds_warn= 0;
|
||||
struct st_command *curr_command= 0;
|
||||
|
||||
char builtin_echo[FN_REFLEN];
|
||||
|
||||
@ -494,6 +530,7 @@ void str_to_file(const char *fname, char *str, int size);
|
||||
void str_to_file2(const char *fname, char *str, int size, my_bool append);
|
||||
|
||||
void fix_win_paths(const char *val, int len);
|
||||
const char *get_errname_from_code (uint error_code);
|
||||
|
||||
#ifdef __WIN__
|
||||
void free_tmp_sh_file();
|
||||
@ -711,6 +748,7 @@ void handle_error(struct st_command*,
|
||||
unsigned int err_errno, const char *err_error,
|
||||
const char *err_sqlstate, DYNAMIC_STRING *ds);
|
||||
void handle_no_error(struct st_command*);
|
||||
void revert_properties();
|
||||
|
||||
#ifdef EMBEDDED_LIBRARY
|
||||
|
||||
@ -1173,6 +1211,7 @@ void handle_command_error(struct st_command *command, uint error)
|
||||
{
|
||||
DBUG_PRINT("info", ("command \"%.*s\" failed with expected error: %d",
|
||||
command->first_word_len, command->query, error));
|
||||
revert_properties();
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
if (command->expected_errors.count > 0)
|
||||
@ -1187,6 +1226,7 @@ void handle_command_error(struct st_command *command, uint error)
|
||||
command->first_word_len, command->query,
|
||||
command->expected_errors.err[0].code.errnum);
|
||||
}
|
||||
revert_properties();
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
@ -2263,6 +2303,51 @@ void var_set_int(const char* name, int value)
|
||||
void var_set_errno(int sql_errno)
|
||||
{
|
||||
var_set_int("$mysql_errno", sql_errno);
|
||||
var_set_string("$mysql_errname", get_errname_from_code(sql_errno));
|
||||
}
|
||||
|
||||
/* Functions to handle --disable and --enable properties */
|
||||
|
||||
void set_once_property(enum_prop prop, my_bool val)
|
||||
{
|
||||
property &pr= prop_list[prop];
|
||||
pr.set= 1;
|
||||
pr.old= *pr.var;
|
||||
*pr.var= val;
|
||||
var_set_int(pr.env_name, (val != pr.reverse));
|
||||
once_property= TRUE;
|
||||
}
|
||||
|
||||
void set_property(st_command *command, enum_prop prop, my_bool val)
|
||||
{
|
||||
char* p= command->first_argument;
|
||||
if (p && !strcmp (p, "ONCE"))
|
||||
{
|
||||
command->last_argument= p + 4;
|
||||
set_once_property(prop, val);
|
||||
return;
|
||||
}
|
||||
property &pr= prop_list[prop];
|
||||
*pr.var= val;
|
||||
pr.set= 0;
|
||||
var_set_int(pr.env_name, (val != pr.reverse));
|
||||
}
|
||||
|
||||
void revert_properties()
|
||||
{
|
||||
if (! once_property)
|
||||
return;
|
||||
for (int i= 0; i < (int) P_MAX; i++)
|
||||
{
|
||||
property &pr= prop_list[i];
|
||||
if (pr.set)
|
||||
{
|
||||
*pr.var= pr.old;
|
||||
pr.set= 0;
|
||||
var_set_int(pr.env_name, (pr.old != pr.reverse));
|
||||
}
|
||||
}
|
||||
once_property=FALSE;
|
||||
}
|
||||
|
||||
|
||||
@ -2317,8 +2402,15 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
|
||||
do_eval(&ds_query, query, end, FALSE);
|
||||
|
||||
if (mysql_real_query(mysql, ds_query.str, ds_query.length))
|
||||
die("Error running query '%s': %d %s", ds_query.str,
|
||||
mysql_errno(mysql), mysql_error(mysql));
|
||||
{
|
||||
handle_error (curr_command, mysql_errno(mysql), mysql_error(mysql),
|
||||
mysql_sqlstate(mysql), &ds_res);
|
||||
/* If error was acceptable, return empty string */
|
||||
dynstr_free(&ds_query);
|
||||
eval_expr(var, "", 0);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
if (!(res= mysql_store_result(mysql)))
|
||||
die("Query '%s' didn't return a result set", ds_query.str);
|
||||
dynstr_free(&ds_query);
|
||||
@ -2472,8 +2564,15 @@ void var_set_query_get_value(struct st_command *command, VAR *var)
|
||||
|
||||
/* Run the query */
|
||||
if (mysql_real_query(mysql, ds_query.str, ds_query.length))
|
||||
die("Error running query '%s': %d %s", ds_query.str,
|
||||
mysql_errno(mysql), mysql_error(mysql));
|
||||
{
|
||||
handle_error (curr_command, mysql_errno(mysql), mysql_error(mysql),
|
||||
mysql_sqlstate(mysql), &ds_res);
|
||||
/* If error was acceptable, return empty string */
|
||||
dynstr_free(&ds_query);
|
||||
eval_expr(var, "", 0);
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
if (!(res= mysql_store_result(mysql)))
|
||||
die("Query '%s' didn't return a result set", ds_query.str);
|
||||
|
||||
@ -4424,6 +4523,7 @@ void do_let(struct st_command *command)
|
||||
var_set(var_name, var_name_end, let_rhs_expr.str,
|
||||
(let_rhs_expr.str + let_rhs_expr.length));
|
||||
dynstr_free(&let_rhs_expr);
|
||||
revert_properties();
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
@ -4670,8 +4770,7 @@ void do_shutdown_server(struct st_command *command)
|
||||
}
|
||||
|
||||
|
||||
#if MYSQL_VERSION_ID >= 50000
|
||||
/* List of error names to error codes, available from 5.0 */
|
||||
/* List of error names to error codes */
|
||||
typedef struct
|
||||
{
|
||||
const char *name;
|
||||
@ -4681,6 +4780,7 @@ typedef struct
|
||||
|
||||
static st_error global_error_names[] =
|
||||
{
|
||||
{ "<No error>", -1, "" },
|
||||
#include <mysqld_ername.h>
|
||||
{ 0, 0, 0 }
|
||||
};
|
||||
@ -4711,16 +4811,28 @@ uint get_errcode_from_name(char *error_name, char *error_end)
|
||||
die("Unknown SQL error name '%s'", error_name);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
#else
|
||||
uint get_errcode_from_name(char *error_name __attribute__((unused)),
|
||||
char *error_end __attribute__((unused)))
|
||||
|
||||
const char *get_errname_from_code (uint error_code)
|
||||
{
|
||||
abort_not_in_this_version();
|
||||
return 0; /* Never reached */
|
||||
st_error *e= global_error_names;
|
||||
|
||||
DBUG_ENTER("get_errname_from_code");
|
||||
DBUG_PRINT("enter", ("error_code: %d", error_code));
|
||||
|
||||
if (! error_code)
|
||||
{
|
||||
DBUG_RETURN("");
|
||||
}
|
||||
for (; e->name; e++)
|
||||
{
|
||||
if (e->code == error_code)
|
||||
{
|
||||
DBUG_RETURN(e->name);
|
||||
}
|
||||
}
|
||||
/* Apparently, errors without known names may occur */
|
||||
DBUG_RETURN("<Unknown>");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
void do_get_errcodes(struct st_command *command)
|
||||
{
|
||||
@ -5252,6 +5364,7 @@ do_handle_error:
|
||||
|
||||
var_set_errno(0);
|
||||
handle_no_error(command);
|
||||
revert_properties();
|
||||
return 1; /* Connected */
|
||||
}
|
||||
|
||||
@ -7207,6 +7320,7 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
|
||||
|
||||
/* If we come here the query is both executed and read successfully */
|
||||
handle_no_error(command);
|
||||
revert_properties();
|
||||
|
||||
end:
|
||||
|
||||
@ -7340,6 +7454,7 @@ void handle_error(struct st_command *command,
|
||||
dynstr_append(ds,"Got one of the listed errors\n");
|
||||
}
|
||||
/* OK */
|
||||
revert_properties();
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
@ -7367,6 +7482,7 @@ void handle_error(struct st_command *command,
|
||||
command->expected_errors.err[0].code.sqlstate);
|
||||
}
|
||||
|
||||
revert_properties();
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
@ -7400,7 +7516,6 @@ void handle_no_error(struct st_command *command)
|
||||
die("query '%s' succeeded - should have failed with sqlstate %s...",
|
||||
command->query, command->expected_errors.err[0].code.sqlstate);
|
||||
}
|
||||
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
@ -7602,7 +7717,7 @@ end:
|
||||
dynstr_free(&ds_prepare_warnings);
|
||||
dynstr_free(&ds_execute_warnings);
|
||||
}
|
||||
|
||||
revert_properties();
|
||||
|
||||
/* Close the statement if - no reconnect, need new prepare */
|
||||
if (mysql->reconnect)
|
||||
@ -8452,6 +8567,8 @@ int main(int argc, char **argv)
|
||||
{
|
||||
command->last_argument= command->first_argument;
|
||||
processed = 1;
|
||||
/* Need to remember this for handle_error() */
|
||||
curr_command= command;
|
||||
switch (command->type) {
|
||||
case Q_CONNECT:
|
||||
do_connect(command);
|
||||
@ -8461,60 +8578,46 @@ int main(int argc, char **argv)
|
||||
case Q_DIRTY_CLOSE:
|
||||
do_close_connection(command); break;
|
||||
case Q_ENABLE_QUERY_LOG:
|
||||
disable_query_log= 0;
|
||||
var_set_int("$ENABLED_QUERY_LOG", 1);
|
||||
set_property(command, P_QUERY, 0);
|
||||
break;
|
||||
case Q_DISABLE_QUERY_LOG:
|
||||
disable_query_log= 1;
|
||||
var_set_int("$ENABLED_QUERY_LOG", 0);
|
||||
set_property(command, P_QUERY, 1);
|
||||
break;
|
||||
case Q_ENABLE_ABORT_ON_ERROR:
|
||||
abort_on_error= 1;
|
||||
var_set_int("$ENABLED_ABORT_ON_ERROR", 1);
|
||||
set_property(command, P_ABORT, 1);
|
||||
break;
|
||||
case Q_DISABLE_ABORT_ON_ERROR:
|
||||
abort_on_error= 0;
|
||||
var_set_int("$ENABLED_ABORT_ON_ERROR", 0);
|
||||
set_property(command, P_ABORT, 0);
|
||||
break;
|
||||
case Q_ENABLE_RESULT_LOG:
|
||||
disable_result_log= 0;
|
||||
var_set_int("$ENABLED_RESULT_LOG", 1);
|
||||
set_property(command, P_RESULT, 0);
|
||||
break;
|
||||
case Q_DISABLE_RESULT_LOG:
|
||||
disable_result_log=1;
|
||||
var_set_int("$ENABLED_RESULT_LOG", 0);
|
||||
set_property(command, P_RESULT, 1);
|
||||
break;
|
||||
case Q_ENABLE_CONNECT_LOG:
|
||||
disable_connect_log=0;
|
||||
var_set_int("$ENABLED_CONNECT_LOG", 1);
|
||||
set_property(command, P_CONNECT, 0);
|
||||
break;
|
||||
case Q_DISABLE_CONNECT_LOG:
|
||||
disable_connect_log=1;
|
||||
var_set_int("$ENABLED_CONNECT_LOG", 0);
|
||||
set_property(command, P_CONNECT, 1);
|
||||
break;
|
||||
case Q_ENABLE_WARNINGS:
|
||||
disable_warnings= 0;
|
||||
var_set_int("$ENABLED_WARNINGS", 1);
|
||||
set_property(command, P_WARN, 0);
|
||||
break;
|
||||
case Q_DISABLE_WARNINGS:
|
||||
disable_warnings= 1;
|
||||
var_set_int("$ENABLED_WARNINGS", 0);
|
||||
set_property(command, P_WARN, 1);
|
||||
break;
|
||||
case Q_ENABLE_INFO:
|
||||
disable_info= 0;
|
||||
var_set_int("$ENABLED_INFO", 1);
|
||||
set_property(command, P_INFO, 0);
|
||||
break;
|
||||
case Q_DISABLE_INFO:
|
||||
disable_info= 1;
|
||||
var_set_int("$ENABLED_INFO", 0);
|
||||
set_property(command, P_INFO, 1);
|
||||
break;
|
||||
case Q_ENABLE_METADATA:
|
||||
display_metadata= 1;
|
||||
var_set_int("$ENABLED_METADATA", 1);
|
||||
set_property(command, P_META, 1);
|
||||
break;
|
||||
case Q_DISABLE_METADATA:
|
||||
display_metadata= 0;
|
||||
var_set_int("$ENABLED_METADATA", 0);
|
||||
set_property(command, P_META, 0);
|
||||
break;
|
||||
case Q_SOURCE: do_source(command); break;
|
||||
case Q_SLEEP: do_sleep(command, 0); break;
|
||||
@ -8730,12 +8833,12 @@ int main(int argc, char **argv)
|
||||
do_set_charset(command);
|
||||
break;
|
||||
case Q_DISABLE_PS_PROTOCOL:
|
||||
ps_protocol_enabled= 0;
|
||||
set_property(command, P_PS, 0);
|
||||
/* Close any open statements */
|
||||
close_statements();
|
||||
break;
|
||||
case Q_ENABLE_PS_PROTOCOL:
|
||||
ps_protocol_enabled= ps_protocol;
|
||||
set_property(command, P_PS, ps_protocol);
|
||||
break;
|
||||
case Q_DISABLE_RECONNECT:
|
||||
set_reconnect(&cur_con->mysql, 0);
|
||||
|
@ -94,8 +94,8 @@ ENDIF()
|
||||
IF(NOT CPACK_SOURCE_PACKAGE_FILE_NAME)
|
||||
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "mysql-${VERSION}")
|
||||
ENDIF()
|
||||
SET(CPACK_PACKAGE_CONTACT "MySQL Build Team <build@mysql.com>")
|
||||
SET(CPACK_PACKAGE_VENDOR "Sun Microsystems, Inc")
|
||||
SET(CPACK_PACKAGE_CONTACT "MySQL Release Engineering <mysql-build@oss.oracle.com>")
|
||||
SET(CPACK_PACKAGE_VENDOR "Oracle Corporation")
|
||||
SET(CPACK_SOURCE_GENERATOR "TGZ")
|
||||
INCLUDE(cpack_source_ignore_files)
|
||||
|
||||
|
@ -196,6 +196,10 @@ MACRO(MYSQL_ADD_PLUGIN)
|
||||
# Install dynamic library
|
||||
MYSQL_INSTALL_TARGETS(${target} DESTINATION ${INSTALL_PLUGINDIR} COMPONENT Server)
|
||||
INSTALL_DEBUG_TARGET(${target} DESTINATION ${INSTALL_PLUGINDIR}/debug)
|
||||
# Add installed files to list for RPMs
|
||||
FILE(APPEND ${CMAKE_BINARY_DIR}/support-files/plugins.files
|
||||
"%attr(755, root, root) %{_prefix}/${INSTALL_PLUGINDIR}/${ARG_MODULE_OUTPUT_NAME}.so\n"
|
||||
"%attr(755, root, root) %{_prefix}/${INSTALL_PLUGINDIR}/debug/${ARG_MODULE_OUTPUT_NAME}.so\n")
|
||||
# For internal testing in PB2, append collections files
|
||||
IF(DEFINED ENV{PB2WORKDIR})
|
||||
PLUGIN_APPEND_COLLECTIONS(${plugin})
|
||||
|
@ -25,12 +25,7 @@
|
||||
Published with a permission.
|
||||
*/
|
||||
|
||||
/* needed to have access to 64 bit file functions */
|
||||
#define _LARGEFILE_SOURCE
|
||||
#define _LARGEFILE64_SOURCE
|
||||
|
||||
#define _XOPEN_SOURCE 500 /* needed to include getopt.h on some platforms. */
|
||||
|
||||
#include <my_global.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
@ -53,7 +48,6 @@
|
||||
/* another argument to specify page ranges... seek to right spot and go from there */
|
||||
|
||||
typedef unsigned long int ulint;
|
||||
typedef unsigned char uchar;
|
||||
|
||||
/* innodb function in name; modified slightly to not have the ASM version (lots of #ifs that didn't apply) */
|
||||
ulint mach_read_from_4(uchar *b)
|
||||
|
@ -21,6 +21,15 @@ typedef enum
|
||||
decimal_round_mode;
|
||||
typedef int32 decimal_digit_t;
|
||||
|
||||
/**
|
||||
intg is the number of *decimal* digits (NOT number of decimal_digit_t's !)
|
||||
before the point
|
||||
frac is the number of decimal digits after the point
|
||||
len is the length of buf (length of allocated space) in decimal_digit_t's,
|
||||
not in bytes
|
||||
sign false means positive, true means negative
|
||||
buf is an array of decimal_digit_t's
|
||||
*/
|
||||
typedef struct st_decimal_t {
|
||||
int intg, frac, len;
|
||||
my_bool sign;
|
||||
|
@ -51,6 +51,7 @@ typedef struct st_heapinfo /* Struct from heap_info */
|
||||
uint reclength; /* Length of one record */
|
||||
int errkey;
|
||||
ulonglong auto_increment;
|
||||
time_t create_time;
|
||||
} HEAPINFO;
|
||||
|
||||
|
||||
@ -147,6 +148,7 @@ typedef struct st_heap_share
|
||||
uint open_count;
|
||||
uchar *del_link; /* Link to next block with del. rec */
|
||||
char * name; /* Name of "memory-file" */
|
||||
time_t create_time;
|
||||
THR_LOCK lock;
|
||||
mysql_mutex_t intern_lock; /* Locking for use with _locking */
|
||||
my_bool delete_on_close;
|
||||
|
@ -446,8 +446,10 @@ enum ha_base_keytype {
|
||||
#define HA_ERR_FILE_TOO_SHORT 175 /* File too short */
|
||||
#define HA_ERR_WRONG_CRC 176 /* Wrong CRC on page */
|
||||
#define HA_ERR_TOO_MANY_CONCURRENT_TRXS 177 /*Too many active concurrent transactions */
|
||||
#define HA_ERR_INDEX_COL_TOO_LONG 178 /* Index column length exceeds limit */
|
||||
#define HA_ERR_LAST 178 /* Copy of last error nr */
|
||||
#define HA_ERR_INDEX_COL_TOO_LONG 178 /* Index column length exceeds limit */
|
||||
#define HA_ERR_INDEX_CORRUPT 179 /* Index corrupted */
|
||||
#define HA_ERR_UNDO_REC_TOO_BIG 180 /* Undo log record too big */
|
||||
#define HA_ERR_LAST 180 /* Copy of last error nr */
|
||||
|
||||
/* Number of different errors */
|
||||
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
|
||||
|
@ -603,6 +603,8 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
||||
#define FN_LIBCHAR '\\'
|
||||
#define FN_LIBCHAR2 '/'
|
||||
#define FN_DIRSEP "/\\" /* Valid directory separators */
|
||||
#define FN_EXEEXT ".exe"
|
||||
#define FN_SOEXT ".dll"
|
||||
#define FN_ROOTDIR "\\"
|
||||
#define FN_DEVCHAR ':'
|
||||
#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
|
||||
@ -611,6 +613,8 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
||||
#define FN_LIBCHAR '/'
|
||||
#define FN_LIBCHAR2 '/'
|
||||
#define FN_DIRSEP "/" /* Valid directory separators */
|
||||
#define FN_EXEEXT ""
|
||||
#define FN_SOEXT ".so"
|
||||
#define FN_ROOTDIR "/"
|
||||
#endif
|
||||
|
||||
|
@ -71,7 +71,7 @@ typedef struct st_mysql_xid MYSQL_XID;
|
||||
Plugin API. Common for all plugin types.
|
||||
*/
|
||||
|
||||
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0102
|
||||
#define MYSQL_PLUGIN_INTERFACE_VERSION 0x0103
|
||||
|
||||
/*
|
||||
The allowable types of plugins
|
||||
@ -120,7 +120,7 @@ __MYSQL_DECLARE_PLUGIN(NAME, \
|
||||
builtin_ ## NAME ## _sizeof_struct_st_plugin, \
|
||||
builtin_ ## NAME ## _plugin)
|
||||
|
||||
#define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0}}
|
||||
#define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0,0,0,0,0}}
|
||||
|
||||
/*
|
||||
declarations for SHOW STATUS support in plugins
|
||||
@ -143,6 +143,14 @@ struct st_mysql_show_var {
|
||||
typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, char *);
|
||||
|
||||
|
||||
/*
|
||||
Constants for plugin flags.
|
||||
*/
|
||||
|
||||
#define PLUGIN_OPT_NO_INSTALL 1UL /* Not dynamically loadable */
|
||||
#define PLUGIN_OPT_NO_UNINSTALL 2UL /* Not dynamically unloadable */
|
||||
|
||||
|
||||
/*
|
||||
declarations for server variables and command line options
|
||||
*/
|
||||
@ -415,6 +423,7 @@ struct st_mysql_plugin
|
||||
struct st_mysql_show_var *status_vars;
|
||||
struct st_mysql_sys_var **system_vars;
|
||||
void * __reserved1; /* reserved for dependency checking */
|
||||
unsigned long flags; /* flags for plugin */
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -101,6 +101,7 @@ struct st_mysql_plugin
|
||||
struct st_mysql_show_var *status_vars;
|
||||
struct st_mysql_sys_var **system_vars;
|
||||
void * __reserved1;
|
||||
unsigned long flags;
|
||||
};
|
||||
#include "plugin_ftparser.h"
|
||||
#include "plugin.h"
|
||||
|
@ -101,6 +101,7 @@ struct st_mysql_plugin
|
||||
struct st_mysql_show_var *status_vars;
|
||||
struct st_mysql_sys_var **system_vars;
|
||||
void * __reserved1;
|
||||
unsigned long flags;
|
||||
};
|
||||
#include "plugin_ftparser.h"
|
||||
#include "plugin.h"
|
||||
|
@ -101,6 +101,7 @@ struct st_mysql_plugin
|
||||
struct st_mysql_show_var *status_vars;
|
||||
struct st_mysql_sys_var **system_vars;
|
||||
void * __reserved1;
|
||||
unsigned long flags;
|
||||
};
|
||||
#include "plugin_ftparser.h"
|
||||
struct st_mysql_daemon
|
||||
|
@ -22,6 +22,24 @@ template <> void error_log_print<error_log_level::INFO>(const char *fmt, ...);
|
||||
template <> void error_log_print<error_log_level::WARNING>(const char *fmt, ...);
|
||||
template <> void error_log_print<error_log_level::ERROR>(const char *fmt, ...);
|
||||
|
||||
/**
|
||||
Option indicating desired level of logging. Values:
|
||||
|
||||
0 - no logging
|
||||
1 - log only error messages
|
||||
2 - additionally log warnings
|
||||
3 - additionally log info notes
|
||||
4 - also log debug messages
|
||||
|
||||
Value of this option should be taken into account in the
|
||||
implementation of error_log_vprint() function (see
|
||||
log_client.cc).
|
||||
|
||||
Note: No error or debug messages are logged in production code
|
||||
(see logging macros in common.h).
|
||||
*/
|
||||
int opt_auth_win_log_level= 2;
|
||||
|
||||
|
||||
/** Connection class **************************************************/
|
||||
|
||||
|
@ -41,13 +41,15 @@ struct error_log_level
|
||||
typedef enum {INFO, WARNING, ERROR} type;
|
||||
};
|
||||
|
||||
extern "C" int opt_auth_win_log_level;
|
||||
unsigned int get_log_level(void);
|
||||
void set_log_level(unsigned int);
|
||||
|
||||
|
||||
/*
|
||||
If DEBUG_ERROR_LOG is defined then error logging happens only
|
||||
in debug-copiled code. Otherwise ERROR_LOG() expands to
|
||||
error_log_print() even in production code. Note that in client
|
||||
plugin, error_log_print() will print nothing if opt_auth_win_clinet_log
|
||||
is 0.
|
||||
error_log_print() even in production code.
|
||||
|
||||
Note: Macro ERROR_LOG() can use printf-like format string like this:
|
||||
|
||||
@ -57,8 +59,6 @@ struct error_log_level
|
||||
to fprintf() (see error_log_vprint() function).
|
||||
*/
|
||||
|
||||
extern "C" int opt_auth_win_client_log;
|
||||
|
||||
#if defined(DEBUG_ERROR_LOG) && defined(DBUG_OFF)
|
||||
#define ERROR_LOG(Level, Msg) do {} while (0)
|
||||
#else
|
||||
@ -67,7 +67,7 @@ extern "C" int opt_auth_win_client_log;
|
||||
|
||||
|
||||
void error_log_vprint(error_log_level::type level,
|
||||
const char *fmt, va_list args);
|
||||
const char *fmt, va_list args);
|
||||
|
||||
template <error_log_level::type Level>
|
||||
void error_log_print(const char *fmt, ...)
|
||||
@ -96,7 +96,7 @@ const char* get_last_error_message(Error_message_buf);
|
||||
|
||||
#define DBUG_PRINT_DO(Keyword, Msg) \
|
||||
do { \
|
||||
if (2 > opt_auth_win_client_log) break; \
|
||||
if (4 > get_log_level()) break; \
|
||||
fprintf(stderr, "winauth: %s: ", Keyword); \
|
||||
debug_msg Msg; \
|
||||
} while (0)
|
||||
|
@ -161,6 +161,21 @@ int Handshake_client::write_packet(Blob &data)
|
||||
keep all the data.
|
||||
*/
|
||||
unsigned block_count= data.len()/512 + ((data.len() % 512) ? 1 : 0);
|
||||
|
||||
#if !defined(DBUG_OFF) && defined(WINAUTH_USE_DBUG_LIB)
|
||||
|
||||
/*
|
||||
For testing purposes, use wrong block count to see how server
|
||||
handles this.
|
||||
*/
|
||||
DBUG_EXECUTE_IF("winauth_first_packet_test",{
|
||||
block_count= data.len() == 601 ? 0 :
|
||||
data.len() == 602 ? 1 :
|
||||
block_count;
|
||||
});
|
||||
|
||||
#endif
|
||||
|
||||
DBUG_ASSERT(block_count < (unsigned)0x100);
|
||||
saved_byte= data[254];
|
||||
data[254] = block_count;
|
||||
@ -323,13 +338,13 @@ int win_auth_handshake_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
|
||||
int opt_val= opt ? atoi(opt) : 0;
|
||||
if (opt && !opt_val)
|
||||
{
|
||||
if (!strncasecmp("on", opt, 2)) opt_val= 1;
|
||||
if (!strncasecmp("yes", opt, 3)) opt_val= 1;
|
||||
if (!strncasecmp("true", opt, 4)) opt_val= 1;
|
||||
if (!strncasecmp("debug", opt, 5)) opt_val= 2;
|
||||
if (!strncasecmp("dbug", opt, 4)) opt_val= 2;
|
||||
if (!strncasecmp("on", opt, 2)) opt_val= 2;
|
||||
if (!strncasecmp("yes", opt, 3)) opt_val= 2;
|
||||
if (!strncasecmp("true", opt, 4)) opt_val= 2;
|
||||
if (!strncasecmp("debug", opt, 5)) opt_val= 4;
|
||||
if (!strncasecmp("dbug", opt, 4)) opt_val= 4;
|
||||
}
|
||||
opt_auth_win_client_log= opt_val;
|
||||
set_log_level(opt_val);
|
||||
}
|
||||
|
||||
ERROR_LOG(INFO, ("Authentication handshake for account %s", mysql->user));
|
||||
|
@ -16,36 +16,32 @@
|
||||
#include <my_global.h>
|
||||
#include "common.h"
|
||||
|
||||
/**
|
||||
This option is set in win_auth_handshake_client() function
|
||||
in handshake_client.cc.
|
||||
|
||||
Values:
|
||||
0 - no logging
|
||||
1 - log error/warning/info messages
|
||||
2 - also log debug messages
|
||||
|
||||
Note: No error or debug messages are logged in production code
|
||||
(see logging macros in common.h).
|
||||
*/
|
||||
int opt_auth_win_client_log= 0;
|
||||
|
||||
|
||||
// Client-side logging function
|
||||
|
||||
void error_log_vprint(error_log_level::type level,
|
||||
const char *fmt, va_list args)
|
||||
{
|
||||
if (0 == opt_auth_win_client_log)
|
||||
return;
|
||||
|
||||
const char *level_string= "";
|
||||
int log_level= get_log_level();
|
||||
|
||||
switch (level)
|
||||
{
|
||||
case error_log_level::INFO: level_string= "Note"; break;
|
||||
case error_log_level::WARNING: level_string= "Warning"; break;
|
||||
case error_log_level::ERROR: level_string= "ERROR"; break;
|
||||
case error_log_level::INFO:
|
||||
if (3 > log_level)
|
||||
return;
|
||||
level_string= "Note";
|
||||
break;
|
||||
case error_log_level::WARNING:
|
||||
if (2 > log_level)
|
||||
return;
|
||||
level_string= "Warning";
|
||||
break;
|
||||
case error_log_level::ERROR:
|
||||
if (1 > log_level)
|
||||
return;
|
||||
level_string= "ERROR";
|
||||
break;
|
||||
}
|
||||
|
||||
fprintf(stderr, "Windows Authentication Plugin %s: ", level_string);
|
||||
@ -53,3 +49,17 @@ void error_log_vprint(error_log_level::type level,
|
||||
fputc('\n', stderr);
|
||||
fflush(stderr);
|
||||
}
|
||||
|
||||
|
||||
// Trivial implementation of log-level setting storage.
|
||||
|
||||
void set_log_level(unsigned int level)
|
||||
{
|
||||
opt_auth_win_log_level= level;
|
||||
}
|
||||
|
||||
|
||||
unsigned int get_log_level(void)
|
||||
{
|
||||
return opt_auth_win_log_level;
|
||||
}
|
||||
|
@ -22,6 +22,11 @@
|
||||
extern uint mysql_port;
|
||||
extern char * mysql_unix_port;
|
||||
|
||||
/*
|
||||
Note: CLIENT_CAPABILITIES is also defined in sql/client_settings.h.
|
||||
When adding capabilities here, consider if they should be also added to
|
||||
the server's version.
|
||||
*/
|
||||
#define CLIENT_CAPABILITIES (CLIENT_LONG_PASSWORD | \
|
||||
CLIENT_LONG_FLAG | \
|
||||
CLIENT_TRANSACTIONS | \
|
||||
|
@ -132,3 +132,26 @@ ADD_CUSTOM_TARGET(test-bt-debug
|
||||
COMMAND ${MTR_FORCE} --comment=debug --timer --skip-ndbcluster --skip-rpl --report-features ${EXP}
|
||||
)
|
||||
|
||||
# Process .in files with includes in collections/
|
||||
|
||||
MACRO(PROCESS_COLLECTION_INCLUDE collin collection)
|
||||
FILE(STRINGS ${collin} inlines)
|
||||
FOREACH(line ${inlines})
|
||||
IF(${line} MATCHES "#include .*")
|
||||
STRING(REPLACE "#include " "collections/" incfile ${line})
|
||||
FILE(READ ${incfile} contents)
|
||||
FILE(APPEND ${collection} "${contents}")
|
||||
ELSE()
|
||||
FILE(APPEND ${collection} "${line}\n")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
ENDMACRO()
|
||||
|
||||
FILE(GLOB infiles "collections/*.in")
|
||||
FOREACH(collin ${infiles})
|
||||
STRING(REPLACE ".in" "" collection ${collin})
|
||||
# Only generate file once
|
||||
IF(NOT EXISTS ${collection})
|
||||
PROCESS_COLLECTION_INCLUDE(${collin} ${collection})
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
@ -28,3 +28,11 @@ these steps:
|
||||
5) The commands from the collection are run line by line via execv() or
|
||||
similar system calls. They are not run as a shell script. Shell
|
||||
expansions are not guaranteed to work and most likely won't.
|
||||
|
||||
The directory may contain collections that are "super sets" of others,
|
||||
identified by a file name suffix ".in". These files may contain lines
|
||||
"#include <filename>", or lines with mysql-test-run.pl invocations.
|
||||
CMake will create a new file without the .in suffix where
|
||||
the include lines are replaced with the contents of the referred
|
||||
file. Filename is local to the collections directory, and includes do
|
||||
not nest.
|
||||
|
@ -1,3 +1,9 @@
|
||||
# This file contains the old default.release, the plan is to replace that
|
||||
# with something like the below (remove space after #):
|
||||
|
||||
# include default.daily
|
||||
# include default.weekly
|
||||
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=debug --vardir=var-debug --skip-ndbcluster --skip-rpl --report-features --debug-server
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=normal --vardir=var-normal --skip-ndbcluster --report-features
|
||||
perl mysql-test-run.pl --force --timer --parallel=auto --experimental=collections/default.experimental --comment=ps --vardir=var-ps --skip-ndbcluster --ps-protocol
|
@ -1,59 +0,0 @@
|
||||
# BUG#59338 Inconsistency in binlog for statements that don't change any rows STATEMENT SBR
|
||||
# In SBR, if a statement does not fail, it is always written to the binary log,
|
||||
# regardless if rows are changed or not. If there is a failure, a statement is
|
||||
# only written to the binary log if a non-transactional (.e.g. MyIsam) engine
|
||||
# is updated. INSERT ON DUPLICATE KEY UPDATE was not following the rule above
|
||||
# and was not written to the binary log, if then engine was Innodb.
|
||||
#
|
||||
# In this test case, we check if INSERT ON DUPLICATE KEY UPDATE that does not
|
||||
# change anything is still written to the binary log.
|
||||
|
||||
# Prepare environment
|
||||
--connection master
|
||||
|
||||
eval CREATE TABLE t1 (
|
||||
a INT UNSIGNED NOT NULL PRIMARY KEY
|
||||
) ENGINE=$engine_type;
|
||||
|
||||
eval CREATE TABLE t2 (
|
||||
a INT UNSIGNED
|
||||
) ENGINE=$engine_type;
|
||||
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (1);
|
||||
|
||||
# An insert duplicate that does not update anything must be written to the binary
|
||||
# log in SBR and MIXED modes. We check this property by summing a before and after
|
||||
# the update and comparing the binlog positions. The sum should be the same at both
|
||||
# points and the statement should be in the binary log.
|
||||
--let $binlog_file= query_get_value("SHOW MASTER STATUS", File, 1)
|
||||
--let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1)
|
||||
--let $statement_file=INSERT INTO t1 SELECT t2.a FROM t2 ORDER BY t2.a ON DUPLICATE KEY UPDATE t1.a= t1.a
|
||||
--eval $statement_file
|
||||
|
||||
--let $assert_cond= SUM(a) = 1 FROM t1
|
||||
--let $assert_text= Sum of elements in t1 should be 1.
|
||||
--source include/assert.inc
|
||||
|
||||
if (`SELECT @@BINLOG_FORMAT = 'ROW'`)
|
||||
{
|
||||
--let $binlog_position_cmp= =
|
||||
--let $assert_cond= [SHOW MASTER STATUS, Position, 1] $binlog_position_cmp $binlog_start
|
||||
--let $assert_text= In SBR or MIXED modes, the event in the binlog should be the same that was executed. In RBR mode, binlog position should stay unchanged.
|
||||
}
|
||||
if (`SELECT @@BINLOG_FORMAT != 'ROW'`)
|
||||
{
|
||||
--let $assert_cond= \'[\'SHOW BINLOG EVENTS IN "$binlog_file" FROM $binlog_start LIMIT 1, 1\', Info, 1]\' LIKE \'%$statement_file\'
|
||||
--let $assert_text= In SBR or MIXED modes, the event in the binlog should be the same that was executed. In RBR mode, binlog position should stay unchanged.
|
||||
}
|
||||
--source include/assert.inc
|
||||
|
||||
# Compare master and slave
|
||||
--sync_slave_with_master
|
||||
--let $diff_tables= master:test.t1 , slave:test.t1
|
||||
--source include/diff_tables.inc
|
||||
|
||||
# Clean up
|
||||
--connection master
|
||||
drop table t1, t2;
|
||||
--sync_slave_with_master
|
@ -77,6 +77,7 @@ eval create table t2(b int auto_increment, c int, key(b)) engine=$engine_type;
|
||||
insert into t1 values (10);
|
||||
insert into t1 values (null),(null),(null);
|
||||
insert into t2 values (5,0);
|
||||
--disable_warnings ONCE
|
||||
insert into t2 (c) select * from t1 ORDER BY a;
|
||||
select * from t2 ORDER BY b;
|
||||
sync_slave_with_master;
|
||||
@ -113,8 +114,10 @@ set @@session.sql_auto_is_null=1;
|
||||
eval create table t1(a int auto_increment, key(a)) engine=$engine_type;
|
||||
eval create table t2(a int) engine=$engine_type;
|
||||
insert into t1 (a) values (null);
|
||||
--disable_warnings
|
||||
insert into t2 (a) select a from t1 where a is null;
|
||||
insert into t2 (a) select a from t1 where a is null;
|
||||
--enable_warnings
|
||||
select * from t2;
|
||||
sync_slave_with_master;
|
||||
connection slave;
|
||||
@ -172,17 +175,15 @@ begin
|
||||
end|
|
||||
delimiter ;|
|
||||
|
||||
--disable_warnings
|
||||
--disable_warnings ONCE
|
||||
insert into t1 (last_id) values (0);
|
||||
--enable_warnings
|
||||
|
||||
drop trigger t1_bi;
|
||||
|
||||
# Check that nested call doesn't affect outer context.
|
||||
select last_insert_id();
|
||||
--disable_warnings
|
||||
--disable_warnings ONCE
|
||||
select bug15728_insert();
|
||||
--enable_warnings
|
||||
select last_insert_id();
|
||||
insert into t1 (last_id) values (bug15728());
|
||||
# This should be exactly one greater than in the previous call.
|
||||
@ -190,9 +191,8 @@ select last_insert_id();
|
||||
|
||||
# BUG#20339 - stored procedure using LAST_INSERT_ID() does not
|
||||
# replicate statement-based
|
||||
--disable_warnings
|
||||
--disable_warnings ONCE
|
||||
drop procedure if exists foo;
|
||||
--enable_warnings
|
||||
delimiter |;
|
||||
create procedure foo()
|
||||
begin
|
||||
@ -252,6 +252,7 @@ select * from t1 order by n;
|
||||
# table's counter, the counter for next row is bigger than the
|
||||
# after-value of the updated row.
|
||||
connection master;
|
||||
--disable_warnings ONCE
|
||||
insert into t1 values (NULL,400),(3,500),(NULL,600) on duplicate key UPDATE n=1000;
|
||||
select * from t1 order by n;
|
||||
sync_slave_with_master;
|
||||
@ -270,6 +271,7 @@ delete from t1 where b <> 100;
|
||||
select * from t1 order by n;
|
||||
|
||||
connection master;
|
||||
--disable_warnings ONCE
|
||||
insert into t1 values(null,100),(null,350) on duplicate key update n=2;
|
||||
select * from t1 order by n;
|
||||
sync_slave_with_master;
|
||||
@ -287,6 +289,7 @@ connection master;
|
||||
# testcase with INSERT VALUES
|
||||
eval CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY AUTO_INCREMENT, b INT,
|
||||
UNIQUE(b)) ENGINE=$engine_type;
|
||||
--disable_warnings ONCE
|
||||
INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
sync_slave_with_master;
|
||||
@ -314,19 +317,23 @@ INSERT INTO t2 (field_a, field_b, field_c) VALUES (3, 'c', '3c');
|
||||
INSERT INTO t2 (field_a, field_b, field_c) VALUES (4, 'd', '4d');
|
||||
INSERT INTO t2 (field_a, field_b, field_c) VALUES (5, 'e', '5e');
|
||||
# Updating table t1 based on values from table t2
|
||||
--disable_warnings
|
||||
INSERT INTO t1 (field_1, field_2, field_3)
|
||||
SELECT t2.field_a, t2.field_b, t2.field_c
|
||||
FROM t2
|
||||
ON DUPLICATE KEY UPDATE
|
||||
t1.field_3 = t2.field_c;
|
||||
--enable_warnings
|
||||
# Inserting new record into t2
|
||||
INSERT INTO t2 (field_a, field_b, field_c) VALUES (6, 'f', '6f');
|
||||
# Updating t1 again
|
||||
--disable_warnings
|
||||
INSERT INTO t1 (field_1, field_2, field_3)
|
||||
SELECT t2.field_a, t2.field_b, t2.field_c
|
||||
FROM t2
|
||||
ON DUPLICATE KEY UPDATE
|
||||
t1.field_3 = t2.field_c;
|
||||
--enable_warnings
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
sync_slave_with_master;
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
@ -433,9 +440,8 @@ delimiter ;|
|
||||
|
||||
INSERT INTO t1 VALUES (NULL, -1);
|
||||
CALL p1();
|
||||
--disable_warnings
|
||||
--disable_warnings ONCE
|
||||
SELECT f1();
|
||||
--enable_warnings
|
||||
INSERT INTO t1 VALUES (NULL, f2()), (NULL, LAST_INSERT_ID()),
|
||||
(NULL, LAST_INSERT_ID()), (NULL, f2()), (NULL, f2());
|
||||
INSERT INTO t1 VALUES (NULL, f2());
|
||||
@ -504,16 +510,14 @@ insert into t2 (id) values(1),(2),(3);
|
||||
delete from t2;
|
||||
set sql_log_bin=1;
|
||||
#inside SELECT, then inside INSERT
|
||||
--disable_warnings
|
||||
--disable_warnings ONCE
|
||||
select insid();
|
||||
--enable_warnings
|
||||
set sql_log_bin=0;
|
||||
insert into t2 (id) values(5),(6),(7);
|
||||
delete from t2 where id>=5;
|
||||
set sql_log_bin=1;
|
||||
--disable_warnings
|
||||
--disable_warnings ONCE
|
||||
insert into t1 select insid();
|
||||
--enable_warnings
|
||||
select * from t1 order by id;
|
||||
select * from t2 order by id;
|
||||
|
||||
@ -537,6 +541,7 @@ begin
|
||||
insert into t2 values(null,3);
|
||||
end|
|
||||
delimiter ;|
|
||||
--disable_warnings ONCE
|
||||
call foo();
|
||||
select * from t1 order by n;
|
||||
select * from t2 order by id;
|
||||
|
@ -31,7 +31,7 @@ INSERT INTO t2 VALUES (3, 5);
|
||||
INSERT INTO t2 VALUES (4, 3);
|
||||
INSERT INTO t2 VALUES (5, 4);
|
||||
INSERT INTO t2 VALUES (6, 6);
|
||||
|
||||
--disable_warnings ONCE
|
||||
INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a;
|
||||
--let $assert_cond= COUNT(*) = 6 FROM t1
|
||||
--let $assert_text= Count of elements in t1 should be 6.
|
||||
@ -51,25 +51,70 @@ INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a;
|
||||
--let $binlog_file= query_get_value("SHOW MASTER STATUS", File, 1)
|
||||
--let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1)
|
||||
--let $statement_file=INSERT IGNORE INTO t1 SELECT NULL, t2.b FROM t2 ORDER BY t2.a
|
||||
--disable_warnings ONCE
|
||||
--eval $statement_file
|
||||
|
||||
--let $assert_cond= COUNT(*) = 6 FROM t1
|
||||
--let $assert_text= Count of elements in t1 should be 6.
|
||||
--source include/assert.inc
|
||||
|
||||
if (`SELECT @@BINLOG_FORMAT = 'ROW'`)
|
||||
if (`SELECT @@BINLOG_FORMAT != 'STATEMENT'`)
|
||||
{
|
||||
--let $binlog_position_cmp= =
|
||||
--let $assert_cond= [SHOW MASTER STATUS, Position, 1] $binlog_position_cmp $binlog_start
|
||||
--let $assert_text= In SBR or MIXED modes, the event in the binlog should be the same that was executed. In RBR mode, binlog position should stay unchanged.
|
||||
}
|
||||
if (`SELECT @@BINLOG_FORMAT != 'ROW'`)
|
||||
if (`SELECT @@BINLOG_FORMAT = 'STATEMENT'`)
|
||||
{
|
||||
--let $assert_cond= \'[\'SHOW BINLOG EVENTS IN "$binlog_file" FROM $binlog_start LIMIT 2, 1\', Info, 1]\' LIKE \'%$statement_file\'
|
||||
--let $assert_text= In SBR or MIXED modes, the event in the binlog should be the same that was executed. In RBR mode, binlog position should stay unchanged.
|
||||
}
|
||||
|
||||
--source include/assert.inc
|
||||
|
||||
# An insert duplicate that does not update anything must be written to the binary
|
||||
# log in SBR and MIXED modes. We check this property by summing a before and after
|
||||
# the update and comparing the binlog positions. The sum should be the same at both
|
||||
# points and the statement should be in the binary log.
|
||||
--disable_warnings
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
--enable_warnings
|
||||
eval CREATE TABLE t1 (
|
||||
a INT UNSIGNED NOT NULL PRIMARY KEY
|
||||
) ENGINE=$engine_type;
|
||||
|
||||
eval CREATE TABLE t2 (
|
||||
a INT UNSIGNED
|
||||
) ENGINE=$engine_type;
|
||||
|
||||
INSERT INTO t1 VALUES (1);
|
||||
INSERT INTO t2 VALUES (1);
|
||||
|
||||
--let $binlog_file= query_get_value("SHOW MASTER STATUS", File, 1)
|
||||
--let $binlog_start= query_get_value("SHOW MASTER STATUS", Position, 1)
|
||||
--let $statement_file=INSERT INTO t1 SELECT t2.a FROM t2 ORDER BY t2.a ON DUPLICATE KEY UPDATE t1.a= t1.a
|
||||
--disable_warnings ONCE
|
||||
--eval $statement_file
|
||||
|
||||
--let $assert_cond= SUM(a) = 1 FROM t1
|
||||
--let $assert_text= Sum of elements in t1 should be 1.
|
||||
--source include/assert.inc
|
||||
|
||||
if (`SELECT @@BINLOG_FORMAT != 'STATEMENT'`)
|
||||
{
|
||||
--let $binlog_position_cmp= =
|
||||
--let $assert_cond= [SHOW MASTER STATUS, Position, 1] $binlog_position_cmp $binlog_start
|
||||
--let $assert_text= In SBR or MIXED modes, the event in the binlog should be the same that was executed. In RBR mode, binlog position should stay unchanged.
|
||||
}
|
||||
if (`SELECT @@BINLOG_FORMAT = 'STATEMENT'`)
|
||||
{
|
||||
--let $assert_cond= \'[\'SHOW BINLOG EVENTS IN "$binlog_file" FROM $binlog_start LIMIT 1, 1\', Info, 1]\' LIKE \'%$statement_file\'
|
||||
--let $assert_text= In SBR or MIXED modes, the event in the binlog should be the same that was executed. In RBR mode, binlog position should stay unchanged.
|
||||
}
|
||||
--source include/assert.inc
|
||||
|
||||
|
||||
# Clean up
|
||||
--connection master
|
||||
drop table t1, t2;
|
||||
|
@ -521,10 +521,34 @@ commit;
|
||||
call p_verify_status_increment(2, 2, 2, 2);
|
||||
--echo # 15. Read-write statement: UPDATE IGNORE, change 0 rows.
|
||||
--echo #
|
||||
--disable_warnings
|
||||
update ignore t1 set a=2 where a=1;
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
--enable_warnings
|
||||
if (`select @@binlog_format = 'STATEMENT'`)
|
||||
{
|
||||
--disable_query_log
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
--enable_query_log
|
||||
}
|
||||
if (`select @@binlog_format != 'STATEMENT'`)
|
||||
{
|
||||
--disable_query_log
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
--enable_query_log
|
||||
}
|
||||
commit;
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
if (`select @@binlog_format = 'STATEMENT'`)
|
||||
{
|
||||
--disable_query_log
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
--enable_query_log
|
||||
}
|
||||
if (`select @@binlog_format != 'STATEMENT'`)
|
||||
{
|
||||
--disable_query_log
|
||||
call p_verify_status_increment(1, 0, 1, 0);
|
||||
--enable_query_log
|
||||
}
|
||||
--echo #
|
||||
--echo # Create a stored function that modifies a
|
||||
--echo # non-transactional table. Demonstrate that changes in
|
||||
@ -603,7 +627,9 @@ call p_verify_status_increment(2, 0, 1, 0);
|
||||
|
||||
--echo # 21. Read-write statement: UPDATE, change 0 (transactional) rows.
|
||||
--echo #
|
||||
--disable_warnings
|
||||
update t1 set a=2 where a=f1()+10;
|
||||
--enable_warnings
|
||||
call p_verify_status_increment(2, 0, 1, 0);
|
||||
commit;
|
||||
call p_verify_status_increment(2, 0, 1, 0);
|
||||
@ -703,7 +729,9 @@ call p_verify_status_increment(4, 4, 4, 4);
|
||||
--echo #
|
||||
insert into t2 select a from t1;
|
||||
commit;
|
||||
--disable_warnings
|
||||
replace into t2 select a from t1;
|
||||
--enable_warnings
|
||||
commit;
|
||||
call p_verify_status_increment(8, 8, 8, 8);
|
||||
#
|
||||
|
8
mysql-test/include/daemon_example_bad_format.ini
Normal file
8
mysql-test/include/daemon_example_bad_format.ini
Normal file
@ -0,0 +1,8 @@
|
||||
#
|
||||
# Plugin configuration file. Place the following on a separate line:
|
||||
#
|
||||
# library binary file name (without .so or .dll)
|
||||
# component_name
|
||||
# [component_name] - additional components in plugin
|
||||
#
|
||||
libdaemon_example
|
9
mysql-test/include/daemon_example_bad_soname.ini
Normal file
9
mysql-test/include/daemon_example_bad_soname.ini
Normal file
@ -0,0 +1,9 @@
|
||||
#
|
||||
# Plugin configuration file. Place the following on a separate line:
|
||||
#
|
||||
# library binary file name (without .so or .dll)
|
||||
# component_name
|
||||
# [component_name] - additional components in plugin
|
||||
#
|
||||
libdaemon_BADNAME
|
||||
daemon_BADNAME
|
@ -27,7 +27,8 @@ BEGIN
|
||||
-- Dump all global variables except those
|
||||
-- that are supposed to change
|
||||
SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE variable_name != 'timestamp' ORDER BY VARIABLE_NAME;
|
||||
WHERE variable_name NOT IN ('timestamp', 'innodb_file_format_max')
|
||||
ORDER BY VARIABLE_NAME;
|
||||
|
||||
-- Dump all databases, there should be none
|
||||
-- except those that was created during bootstrap
|
||||
@ -72,3 +73,13 @@ BEGIN
|
||||
mysql.user;
|
||||
|
||||
END||
|
||||
|
||||
--
|
||||
-- Procedure used by test case used to force all
|
||||
-- servers to restart after testcase and thus skipping
|
||||
-- check test case after test
|
||||
--
|
||||
CREATE DEFINER=root@localhost PROCEDURE force_restart()
|
||||
BEGIN
|
||||
SELECT 1 INTO OUTFILE 'force_restart';
|
||||
END||
|
||||
|
@ -26,7 +26,7 @@ perl;
|
||||
|
||||
# And substitute the content some environment variables with their
|
||||
# names:
|
||||
@env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_LIBDIR MYSQL_CHARSETSDIR MYSQL_SHAREDIR/;
|
||||
@env=qw/MYSQLTEST_VARDIR MYSQL_TEST_DIR MYSQL_CHARSETSDIR MYSQL_SHAREDIR/;
|
||||
|
||||
$re1=join('|', @skipvars, @plugins);
|
||||
$re2=join('|', @plugins);
|
||||
|
@ -39,3 +39,4 @@ ha_archive storage/archive ARCHIVE_PLUGIN
|
||||
ha_blackhole storage/blackhole BLACKHOLE_PLUGIN
|
||||
ha_federated storage/federated FEDERATED_PLUGIN
|
||||
mypluglib plugin/fulltext SIMPLE_PARSER
|
||||
libdaemon_example plugin/daemon_example DAEMONEXAMPLE
|
||||
|
@ -81,7 +81,7 @@ sub _gdb {
|
||||
return if $? >> 8;
|
||||
return unless $gdb_output;
|
||||
|
||||
resfile_print <<EOF, $gdb_output, "\n";
|
||||
resfile_print <<EOF . $gdb_output . "\n";
|
||||
Output from gdb follows. The first stack trace is from the failing thread.
|
||||
The following stack traces are from all threads (so the failing one is
|
||||
duplicated).
|
||||
@ -245,7 +245,7 @@ sub _cdb {
|
||||
$cdb_output=~ s/^Child\-SP RetAddr Call Site//gm;
|
||||
$cdb_output=~ s/\+0x([0-9a-fA-F]+)//gm;
|
||||
|
||||
resfile_print <<EOF, $cdb_output, "\n";
|
||||
resfile_print <<EOF . $cdb_output . "\n";
|
||||
Output from cdb follows. Faulting thread is printed twice,with and without function parameters
|
||||
Search for STACK_TEXT to see the stack trace of
|
||||
the faulting thread. Callstacks of other threads are printed after it.
|
||||
|
@ -337,17 +337,41 @@ sub collect_one_suite($)
|
||||
for my $skip (@disabled_collection)
|
||||
{
|
||||
if ( open(DISABLED, $skip ) )
|
||||
{
|
||||
while ( <DISABLED> )
|
||||
{
|
||||
chomp;
|
||||
if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
|
||||
{
|
||||
$disabled{$1}= $2 if not exists $disabled{$1};
|
||||
}
|
||||
}
|
||||
close DISABLED;
|
||||
}
|
||||
{
|
||||
# $^O on Windows considered not generic enough
|
||||
my $plat= (IS_WINDOWS) ? 'windows' : $^O;
|
||||
|
||||
while ( <DISABLED> )
|
||||
{
|
||||
chomp;
|
||||
#diasble the test case if platform matches
|
||||
if ( /\@/ )
|
||||
{
|
||||
if ( /\@$plat/ )
|
||||
{
|
||||
/^\s*(\S+)\s*\@$plat.*:\s*(.*?)\s*$/ ;
|
||||
$disabled{$1}= $2 if not exists $disabled{$1};
|
||||
}
|
||||
elsif ( /\@!(\S*)/ )
|
||||
{
|
||||
if ( $1 ne $plat)
|
||||
{
|
||||
/^\s*(\S+)\s*\@!.*:\s*(.*?)\s*$/ ;
|
||||
$disabled{$1}= $2 if not exists $disabled{$1};
|
||||
}
|
||||
}
|
||||
}
|
||||
elsif ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
|
||||
{
|
||||
chomp;
|
||||
if ( /^\s*(\S+)\s*:\s*(.*?)\s*$/ )
|
||||
{
|
||||
$disabled{$1}= $2 if not exists $disabled{$1};
|
||||
}
|
||||
}
|
||||
}
|
||||
close DISABLED;
|
||||
}
|
||||
}
|
||||
|
||||
# Read suite.opt file
|
||||
|
@ -238,9 +238,9 @@ GetOptions("server-host=s", "server-logs-dir=s", "server-port=s",
|
||||
"test-duration=i", "test-suffix=s", "check-tests-file",
|
||||
"verbose", "log-error-details", "cleanup", "mysqltest=s",
|
||||
# OBN: (changing 'abort-on-error' to numberic for WL-4626/4685)
|
||||
"abort-on-error=i" => \$opt_abort_on_error, "help") || usage();
|
||||
"abort-on-error=i" => \$opt_abort_on_error, "help") || usage(1);
|
||||
|
||||
usage() if ($opt_help);
|
||||
usage(0) if ($opt_help);
|
||||
|
||||
#$opt_abort_on_error=1;
|
||||
|
||||
@ -1131,6 +1131,7 @@ sub sig_TERM_handler
|
||||
|
||||
sub usage
|
||||
{
|
||||
my $retcode= shift;
|
||||
print <<EOF;
|
||||
|
||||
The MySQL Stress suite Ver $stress_suite_version
|
||||
@ -1234,7 +1235,7 @@ perl mysql-stress-test.pl \
|
||||
--cleanup \
|
||||
|
||||
EOF
|
||||
exit(0);
|
||||
exit($retcode);
|
||||
}
|
||||
|
||||
|
||||
|
@ -168,6 +168,7 @@ my $opt_suites;
|
||||
|
||||
our $opt_verbose= 0; # Verbose output, enable with --verbose
|
||||
our $exe_mysql;
|
||||
our $exe_mysql_plugin;
|
||||
our $exe_mysqladmin;
|
||||
our $exe_mysqltest;
|
||||
our $exe_libtool;
|
||||
@ -180,6 +181,8 @@ our @opt_combinations;
|
||||
our @opt_extra_mysqld_opt;
|
||||
our @opt_mysqld_envs;
|
||||
|
||||
my $opt_stress;
|
||||
|
||||
my $opt_compress;
|
||||
my $opt_ssl;
|
||||
my $opt_skip_ssl;
|
||||
@ -221,10 +224,13 @@ our %gprof_dirs;
|
||||
our $glob_debugger= 0;
|
||||
our $opt_gdb;
|
||||
our $opt_client_gdb;
|
||||
my $opt_boot_gdb;
|
||||
our $opt_dbx;
|
||||
our $opt_client_dbx;
|
||||
my $opt_boot_dbx;
|
||||
our $opt_ddd;
|
||||
our $opt_client_ddd;
|
||||
my $opt_boot_ddd;
|
||||
our $opt_manual_gdb;
|
||||
our $opt_manual_dbx;
|
||||
our $opt_manual_ddd;
|
||||
@ -379,6 +385,7 @@ sub main {
|
||||
}
|
||||
}
|
||||
}
|
||||
mtr_report("Using suites: $opt_suites") unless @opt_cases;
|
||||
|
||||
init_timers();
|
||||
|
||||
@ -422,8 +429,8 @@ sub main {
|
||||
}
|
||||
$ENV{MTR_PARALLEL} = $opt_parallel;
|
||||
|
||||
if ($opt_parallel > 1 && $opt_start_exit) {
|
||||
mtr_warning("Parallel and --start-and-exit cannot be combined\n" .
|
||||
if ($opt_parallel > 1 && ($opt_start_exit || $opt_stress)) {
|
||||
mtr_warning("Parallel cannot be used with --start-and-exit or --stress\n" .
|
||||
"Setting parallel to 1");
|
||||
$opt_parallel= 1;
|
||||
}
|
||||
@ -449,8 +456,9 @@ sub main {
|
||||
#
|
||||
read_plugin_defs("include/plugin.defs");
|
||||
|
||||
# Also read from any plugin local plugin.defs
|
||||
for (glob "$basedir/plugin/*/tests/mtr/plugin.defs") {
|
||||
# Also read from any plugin local or suite specific plugin.defs
|
||||
for (glob "$basedir/plugin/*/tests/mtr/plugin.defs".
|
||||
" suite/*/plugin.defs") {
|
||||
read_plugin_defs($_);
|
||||
}
|
||||
|
||||
@ -652,8 +660,9 @@ sub run_test_server ($$$) {
|
||||
my $core_file= $File::Find::name;
|
||||
my $core_name= basename($core_file);
|
||||
|
||||
if ($core_name =~ /^core/ or # Starting with core
|
||||
(IS_WINDOWS and $core_name =~ /\.dmp$/)){
|
||||
# Name beginning with core, not ending in .gz
|
||||
if (($core_name =~ /^core/ and $core_name !~ /\.gz$/)
|
||||
or (IS_WINDOWS and $core_name =~ /\.dmp$/)){
|
||||
# Ending with .dmp
|
||||
mtr_report(" - found '$core_name'",
|
||||
"($num_saved_cores/$opt_max_save_core)");
|
||||
@ -1096,14 +1105,17 @@ sub command_line_setup {
|
||||
'gdb' => \$opt_gdb,
|
||||
'client-gdb' => \$opt_client_gdb,
|
||||
'manual-gdb' => \$opt_manual_gdb,
|
||||
'boot-gdb' => \$opt_boot_gdb,
|
||||
'manual-debug' => \$opt_manual_debug,
|
||||
'ddd' => \$opt_ddd,
|
||||
'client-ddd' => \$opt_client_ddd,
|
||||
'manual-ddd' => \$opt_manual_ddd,
|
||||
'boot-ddd' => \$opt_boot_ddd,
|
||||
'dbx' => \$opt_dbx,
|
||||
'client-dbx' => \$opt_client_dbx,
|
||||
'manual-dbx' => \$opt_manual_dbx,
|
||||
'debugger=s' => \$opt_debugger,
|
||||
'boot-dbx' => \$opt_boot_dbx,
|
||||
'client-debugger=s' => \$opt_client_debugger,
|
||||
'strace-client:s' => \$opt_strace_client,
|
||||
'max-save-core=i' => \$opt_max_save_core,
|
||||
@ -1172,6 +1184,7 @@ sub command_line_setup {
|
||||
'report-times' => \$opt_report_times,
|
||||
'result-file' => \$opt_resfile,
|
||||
'unit-tests!' => \$opt_ctest,
|
||||
'stress=s' => \$opt_stress,
|
||||
|
||||
'help|h' => \$opt_usage,
|
||||
# list-options is internal, not listed in help
|
||||
@ -1625,6 +1638,22 @@ sub command_line_setup {
|
||||
mtr_error("--wait-all can only be used with --start options");
|
||||
}
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Gather stress-test options and modify behavior
|
||||
# --------------------------------------------------------------------------
|
||||
|
||||
if ($opt_stress)
|
||||
{
|
||||
$opt_stress=~ s/,/ /g;
|
||||
$opt_user_args= 1;
|
||||
mtr_error("--stress cannot be combined with named ordinary suites or tests")
|
||||
if $opt_suites || @opt_cases;
|
||||
$opt_suites="stress";
|
||||
@opt_cases= ("wrapper");
|
||||
$ENV{MST_OPTIONS}= $opt_stress;
|
||||
$opt_ctest= 0;
|
||||
}
|
||||
|
||||
# --------------------------------------------------------------------------
|
||||
# Check timeout arguments
|
||||
# --------------------------------------------------------------------------
|
||||
@ -1950,6 +1979,7 @@ sub executable_setup () {
|
||||
# Look for the client binaries
|
||||
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
|
||||
$exe_mysql= mtr_exe_exists("$path_client_bindir/mysql");
|
||||
$exe_mysql_plugin= mtr_exe_exists("$path_client_bindir/mysql_plugin");
|
||||
|
||||
$exe_mysql_embedded= mtr_exe_maybe_exists("$basedir/libmysqld/examples/mysql_embedded");
|
||||
|
||||
@ -2130,8 +2160,10 @@ sub find_plugin($$)
|
||||
my $lib_plugin=
|
||||
mtr_file_exists(vs_config_dirs($location,$plugin_filename),
|
||||
"$basedir/lib/plugin/".$plugin_filename,
|
||||
"$basedir/lib64/plugin/".$plugin_filename,
|
||||
"$basedir/$location/.libs/".$plugin_filename,
|
||||
"$basedir/lib/mysql/plugin/".$plugin_filename,
|
||||
"$basedir/lib64/mysql/plugin/".$plugin_filename,
|
||||
);
|
||||
return $lib_plugin;
|
||||
}
|
||||
@ -2293,12 +2325,6 @@ sub environment_setup {
|
||||
$ENV{'DEFAULT_MASTER_PORT'}= $mysqld_variables{'port'};
|
||||
$ENV{'MYSQL_TMP_DIR'}= $opt_tmpdir;
|
||||
$ENV{'MYSQLTEST_VARDIR'}= $opt_vardir;
|
||||
# Used for guessing default plugin dir, we can't really know for sure
|
||||
$ENV{'MYSQL_LIBDIR'}= "$basedir/lib";
|
||||
# Override if this does not exist, but lib64 does (best effort)
|
||||
if (! -d "$basedir/lib" && -d "$basedir/lib64") {
|
||||
$ENV{'MYSQL_LIBDIR'}= "$basedir/lib64";
|
||||
}
|
||||
$ENV{'MYSQL_BINDIR'}= "$bindir";
|
||||
$ENV{'MYSQL_SHAREDIR'}= $path_language;
|
||||
$ENV{'MYSQL_CHARSETSDIR'}= $path_charsetsdir;
|
||||
@ -2357,8 +2383,15 @@ sub environment_setup {
|
||||
$ENV{'MYSQLADMIN'}= native_path($exe_mysqladmin);
|
||||
$ENV{'MYSQL_CLIENT_TEST'}= mysql_client_test_arguments();
|
||||
$ENV{'EXE_MYSQL'}= $exe_mysql;
|
||||
$ENV{'MYSQL_PLUGIN'}= $exe_mysql_plugin;
|
||||
$ENV{'MYSQL_EMBEDDED'}= $exe_mysql_embedded;
|
||||
|
||||
my $exe_mysqld= find_mysqld($basedir);
|
||||
$ENV{'MYSQLD'}= $exe_mysqld;
|
||||
my $extra_opts= join (" ", @opt_extra_mysqld_opt);
|
||||
$ENV{'MYSQLD_CMD'}= "$exe_mysqld --defaults-group-suffix=.1 ".
|
||||
"--defaults-file=$path_config_file $extra_opts";
|
||||
|
||||
# ----------------------------------------------------
|
||||
# bug25714 executable may _not_ exist in
|
||||
# some versions, test using it should be skipped
|
||||
@ -3234,6 +3267,19 @@ sub mysql_install_db {
|
||||
# ----------------------------------------------------------------------
|
||||
my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql";
|
||||
|
||||
if ($opt_boot_gdb) {
|
||||
gdb_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
|
||||
$bootstrap_sql_file);
|
||||
}
|
||||
if ($opt_boot_dbx) {
|
||||
dbx_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
|
||||
$bootstrap_sql_file);
|
||||
}
|
||||
if ($opt_boot_ddd) {
|
||||
ddd_arguments(\$args, \$exe_mysqld_bootstrap, $mysqld->name(),
|
||||
$bootstrap_sql_file);
|
||||
}
|
||||
|
||||
my $path_sql= my_find_file($install_basedir,
|
||||
["mysql", "sql/share", "share/mysql",
|
||||
"share", "scripts"],
|
||||
@ -4152,6 +4198,11 @@ sub extract_server_log ($$) {
|
||||
else
|
||||
{
|
||||
push(@lines, $line);
|
||||
if (scalar(@lines) > 1000000) {
|
||||
$Ferr = undef;
|
||||
mtr_warning("Too much log from test, bailing out from extracting");
|
||||
return ();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -5556,19 +5607,21 @@ sub gdb_arguments {
|
||||
my $args= shift;
|
||||
my $exe= shift;
|
||||
my $type= shift;
|
||||
my $input= shift;
|
||||
|
||||
# Write $args to gdb init file
|
||||
my $str= join " ", map { s/"/\\"/g; "\"$_\""; } @$$args;
|
||||
my $gdb_init_file= "$opt_vardir/tmp/gdbinit.$type";
|
||||
|
||||
# Remove the old gdbinit file
|
||||
unlink($gdb_init_file);
|
||||
|
||||
# Put $args into a single string
|
||||
my $str= join(" ", @$$args);
|
||||
my $runline= $input ? "run $str < $input" : "run $str";
|
||||
|
||||
# write init file for mysqld or client
|
||||
mtr_tofile($gdb_init_file,
|
||||
"set args $str\n" .
|
||||
"break main\n" .
|
||||
"run");
|
||||
$runline);
|
||||
|
||||
if ( $opt_manual_gdb )
|
||||
{
|
||||
@ -5607,20 +5660,22 @@ sub ddd_arguments {
|
||||
my $args= shift;
|
||||
my $exe= shift;
|
||||
my $type= shift;
|
||||
my $input= shift;
|
||||
|
||||
# Write $args to ddd init file
|
||||
my $str= join " ", map { s/"/\\"/g; "\"$_\""; } @$$args;
|
||||
my $gdb_init_file= "$opt_vardir/tmp/gdbinit.$type";
|
||||
|
||||
# Remove the old gdbinit file
|
||||
unlink($gdb_init_file);
|
||||
|
||||
# Put $args into a single string
|
||||
my $str= join(" ", @$$args);
|
||||
my $runline= $input ? "run $str < $input" : "run $str";
|
||||
|
||||
# write init file for mysqld or client
|
||||
mtr_tofile($gdb_init_file,
|
||||
"file $$exe\n" .
|
||||
"set args $str\n" .
|
||||
"break main\n" .
|
||||
"run");
|
||||
$runline);
|
||||
|
||||
if ( $opt_manual_ddd )
|
||||
{
|
||||
@ -5656,14 +5711,16 @@ sub dbx_arguments {
|
||||
my $args= shift;
|
||||
my $exe= shift;
|
||||
my $type= shift;
|
||||
my $input= shift;
|
||||
|
||||
# Put $args into a single string
|
||||
my $str= join " ", @$$args;
|
||||
my $runline= $input ? "run $str < $input" : "run $str";
|
||||
|
||||
if ( $opt_manual_dbx ) {
|
||||
print "\nTo start dbx for $type, type in another window:\n";
|
||||
print "cd $glob_mysql_test_dir; dbx -c \"stop in main; " .
|
||||
"run $str\" $$exe\n";
|
||||
"$runline\" $$exe\n";
|
||||
|
||||
# Indicate the exe should not be started
|
||||
$$exe= undef;
|
||||
@ -5682,7 +5739,7 @@ sub dbx_arguments {
|
||||
|
||||
mtr_add_arg($$args, "dbx");
|
||||
mtr_add_arg($$args, "-c");
|
||||
mtr_add_arg($$args, "stop in main; run $str");
|
||||
mtr_add_arg($$args, "stop in main; $runline");
|
||||
mtr_add_arg($$args, "$$exe");
|
||||
|
||||
$$exe= "xterm";
|
||||
@ -6018,11 +6075,15 @@ Options to run test on running server
|
||||
|
||||
Options for debugging the product
|
||||
|
||||
boot-dbx Start bootstrap server in dbx
|
||||
boot-ddd Start bootstrap server in ddd
|
||||
boot-gdb Start bootstrap server in gdb
|
||||
client-dbx Start mysqltest client in dbx
|
||||
client-ddd Start mysqltest client in ddd
|
||||
client-debugger=NAME Start mysqltest in the selected debugger
|
||||
client-gdb Start mysqltest client in gdb
|
||||
client-dbx Start mysqltest client in dbx
|
||||
ddd Start mysqld in ddd
|
||||
dbx Start the mysqld(s) in dbx
|
||||
ddd Start the mysqld(s) in ddd
|
||||
debug Dump trace output for all servers and client programs
|
||||
debug-common Same as debug, but sets 'd' debug flags to
|
||||
"query,info,error,enter,exit"
|
||||
@ -6030,7 +6091,6 @@ Options for debugging the product
|
||||
tracing
|
||||
debugger=NAME Start mysqld in the selected debugger
|
||||
gdb Start the mysqld(s) in gdb
|
||||
dbx Start the mysqld(s) in dbx
|
||||
manual-debug Let user manually start mysqld in debugger, before
|
||||
running test(s)
|
||||
manual-gdb Let user manually start mysqld in gdb, before running
|
||||
@ -6128,6 +6188,8 @@ Misc options
|
||||
nounit-tests Do not run unit tests. Normally run if configured
|
||||
and if not running named tests/suites
|
||||
unit-tests Run unit tests even if they would otherwise not be run
|
||||
stress=ARGS Run stress test, providing options to
|
||||
mysql-stress-test.pl. Options are separated by comma.
|
||||
|
||||
Some options that control enabling a feature for normal test runs,
|
||||
can be turned off by prepending 'no' to the option, e.g. --notimer.
|
||||
|
24
mysql-test/r/auth_rpl.result
Normal file
24
mysql-test/r/auth_rpl.result
Normal file
@ -0,0 +1,24 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
[connection slave]
|
||||
include/stop_slave.inc
|
||||
[connection master]
|
||||
CREATE USER 'plug_user' IDENTIFIED WITH 'test_plugin_server' AS 'plug_user';
|
||||
GRANT REPLICATION SLAVE ON *.* TO plug_user;
|
||||
FLUSH PRIVILEGES;
|
||||
[connection slave]
|
||||
CHANGE MASTER TO
|
||||
MASTER_USER= 'plug_user',
|
||||
MASTER_PASSWORD= 'plug_user';
|
||||
include/start_slave.inc
|
||||
# Slave in-sync with master now.
|
||||
SELECT user, plugin, authentication_string FROM mysql.user WHERE user LIKE 'plug_user';
|
||||
user plugin authentication_string
|
||||
plug_user test_plugin_server plug_user
|
||||
# Cleanup (on slave).
|
||||
include/stop_slave.inc
|
||||
CHANGE MASTER TO MASTER_USER='root';
|
||||
DROP USER 'plug_user';
|
||||
# Cleanup (on master).
|
||||
DROP USER 'plug_user';
|
||||
include/rpl_end.inc
|
@ -549,11 +549,9 @@ SUCCESS
|
||||
# 15. Read-write statement: UPDATE IGNORE, change 0 rows.
|
||||
#
|
||||
update ignore t1 set a=2 where a=1;
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
SUCCESS
|
||||
|
||||
commit;
|
||||
call p_verify_status_increment(2, 2, 1, 0);
|
||||
SUCCESS
|
||||
|
||||
#
|
||||
|
@ -83,5 +83,18 @@ a a b filler
|
||||
SET SESSION debug = DEFAULT;
|
||||
DROP TABLE t1, t2;
|
||||
#
|
||||
# Bug#11747970 34660: CRASH WHEN FEDERATED TABLE LOSES CONNECTION DURING INSERT ... SELECT
|
||||
#
|
||||
CREATE TABLE t1(f1 INT, KEY(f1));
|
||||
CREATE TABLE t2(f1 INT);
|
||||
INSERT INTO t1 VALUES (1),(2);
|
||||
INSERT INTO t2 VALUES (1),(2);
|
||||
SET SESSION debug='d,bug11747970_simulate_error';
|
||||
INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1);
|
||||
Warnings:
|
||||
Error 1105 Unknown error
|
||||
SET SESSION debug = DEFAULT;
|
||||
DROP TABLE t1,t2;
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
@ -7,6 +7,6 @@ PRIMARY KEY (`ID_MEMBER`,`ID_BOARD`),
|
||||
KEY `logTime` (`logTime`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_bulgarian_ci;
|
||||
INSERT INTO `t_bug21476` VALUES (2,2,1154870939,0),(1,2,1154870957,0),(2,183,1154941362,0),(2,84,1154904301,0),(1,84,1154905867,0),(2,13,1154947484,10271),(3,84,1154880549,0),(1,6,1154892183,0),(2,25,1154947581,10271),(3,25,1154904760,0),(1,25,1154947373,10271),(1,179,1154899992,0),(2,179,1154899410,0),(5,25,1154901666,0),(2,329,1154902026,0),(3,329,1154902040,0),(1,329,1154902058,0),(1,13,1154930841,0),(3,85,1154904987,0),(1,183,1154929665,0),(3,13,1154931268,0),(1,85,1154936888,0),(1,169,1154937959,0),(2,169,1154941717,0),(3,183,1154939810,0),(3,169,1154941734,0);
|
||||
Assertion: mysql_errno 1436 == 1436
|
||||
Assertion: mysql_errname ER_STACK_OVERRUN_NEED_MORE == ER_STACK_OVERRUN_NEED_MORE
|
||||
DROP TABLE `t_bug21476`;
|
||||
End of 5.0 tests.
|
||||
|
@ -2791,5 +2791,40 @@ SELECT CONV(1,-2147483648,-2147483648);
|
||||
CONV(1,-2147483648,-2147483648)
|
||||
NULL
|
||||
#
|
||||
# Bug#12985030 SIMPLE QUERY WITH DECIMAL NUMBERS LEAKS MEMORY
|
||||
#
|
||||
SELECT (rpad(1.0,2048,1)) IS NOT FALSE;
|
||||
(rpad(1.0,2048,1)) IS NOT FALSE
|
||||
1
|
||||
SELECT ((+0) IN
|
||||
((0b111111111111111111111111111111111111111111111111111),(rpad(1.0,2048,1)),
|
||||
(32767.1)));
|
||||
((+0) IN
|
||||
((0b111111111111111111111111111111111111111111111111111),(rpad(1.0,2048,1)),
|
||||
(32767.1)))
|
||||
0
|
||||
SELECT ((rpad(1.0,2048,1)) = ('4(') ^ (0.1));
|
||||
((rpad(1.0,2048,1)) = ('4(') ^ (0.1))
|
||||
0
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: '4('
|
||||
SELECT
|
||||
pow((rpad(10.0,2048,1)),(b'1111111111111111111111111111111111111111111'));
|
||||
ERROR 22003: DOUBLE value is out of range in 'pow(rpad(10.0,2048,1),0x07ffffffffff)'
|
||||
SELECT ((rpad(1.0,2048,1)) + (0) ^ ('../'));
|
||||
((rpad(1.0,2048,1)) + (0) ^ ('../'))
|
||||
1.011111111111111
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: '../'
|
||||
SELECT stddev_samp(rpad(1.0,2048,1));
|
||||
stddev_samp(rpad(1.0,2048,1))
|
||||
NULL
|
||||
SELECT ((127.1) not in ((rpad(1.0,2048,1)),(''),(-1.1)));
|
||||
((127.1) not in ((rpad(1.0,2048,1)),(''),(-1.1)))
|
||||
1
|
||||
SELECT ((0xf3) * (rpad(1.0,2048,1)) << (0xcc));
|
||||
((0xf3) * (rpad(1.0,2048,1)) << (0xcc))
|
||||
0
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
@ -1676,7 +1676,7 @@ c (SELECT a FROM t1 WHERE b = c)
|
||||
SELECT b c, (SELECT a FROM t1 WHERE b = c)
|
||||
FROM t1
|
||||
HAVING b = 10;
|
||||
ERROR 42000: non-grouping field 'b' is used in HAVING clause
|
||||
ERROR 42000: Non-grouping field 'b' is used in HAVING clause
|
||||
SELECT MAX(b) c, (SELECT a FROM t1 WHERE b = c)
|
||||
FROM t1
|
||||
HAVING b = 10;
|
||||
@ -1892,6 +1892,38 @@ a AVG(t1.b) t11c t12c
|
||||
1 4.0000 6 6
|
||||
2 2.0000 7 7
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#11765254 (58200): Assertion failed: param.sort_length when grouping
|
||||
# by functions
|
||||
#
|
||||
SET SQL_BIG_TABLES=1;
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (0),(0);
|
||||
SELECT 1 FROM t1 GROUP BY IF(`a`,'','');
|
||||
1
|
||||
1
|
||||
SELECT 1 FROM t1 GROUP BY TRIM(LEADING RAND() FROM '');
|
||||
1
|
||||
1
|
||||
SELECT 1 FROM t1 GROUP BY SUBSTRING('',SLEEP(0),'');
|
||||
1
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
Warning 1292 Truncated incorrect INTEGER value: ''
|
||||
SELECT 1 FROM t1 GROUP BY SUBSTRING(SYSDATE() FROM 'K' FOR 'jxW<');
|
||||
1
|
||||
1
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'K'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'jxW<'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'K'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'jxW<'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'K'
|
||||
Warning 1292 Truncated incorrect INTEGER value: 'jxW<'
|
||||
DROP TABLE t1;
|
||||
SET SQL_BIG_TABLES=0;
|
||||
# End of 5.1 tests
|
||||
#
|
||||
# Bug#49771: Incorrect MIN (date) when minimum value is 0000-00-00
|
||||
|
@ -419,7 +419,7 @@ select f1 from t1 group by f1 having max(f1)=f1;
|
||||
f1
|
||||
set session sql_mode='ONLY_FULL_GROUP_BY';
|
||||
select f1 from t1 having max(f1)=f1;
|
||||
ERROR 42000: non-grouping field 'f1' is used in HAVING clause
|
||||
ERROR 42000: Non-grouping field 'f1' is used in HAVING clause
|
||||
select f1 from t1 group by f1 having max(f1)=f1;
|
||||
f1
|
||||
set session sql_mode='';
|
||||
|
@ -715,8 +715,8 @@ create table t1 (c char(10)) engine=memory;
|
||||
create table t2 (c varchar(10)) engine=memory;
|
||||
show table status like 't_';
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 0 11 0 # 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 12 0 # 0 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 0 11 0 # 0 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 12 0 # 0 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
drop table t1, t2;
|
||||
CREATE TABLE t1(a VARCHAR(1), b VARCHAR(2), c VARCHAR(256),
|
||||
KEY(a), KEY(b), KEY(c)) ENGINE=MEMORY;
|
||||
|
@ -1849,5 +1849,119 @@ unlock tables;
|
||||
drop table t1;
|
||||
drop view v1;
|
||||
#
|
||||
# Test for bug #12828477 - "MDL SUBSYSTEM CREATES BIG OVERHEAD FOR
|
||||
# CERTAIN QUERIES TO INFORMATION_SCHEMA".
|
||||
#
|
||||
# Check that metadata locks which are acquired during the process
|
||||
# of opening tables/.FRMs/.TRG files while filling I_S table are
|
||||
# not kept to the end of statement. Keeping the locks has caused
|
||||
# performance problems in cases when big number of tables (.FRMs
|
||||
# or .TRG files) were scanned as cost of new lock acquisition has
|
||||
# increased linearly.
|
||||
drop database if exists mysqltest;
|
||||
create database mysqltest;
|
||||
use mysqltest;
|
||||
create table t0 (i int);
|
||||
create table t1 (j int);
|
||||
create table t2 (k int);
|
||||
#
|
||||
# Test that we don't keep locks in case when we to fill
|
||||
# I_S table we perform full-blown table open.
|
||||
#
|
||||
# Acquire lock on 't2' so upcoming RENAME is
|
||||
# blocked.
|
||||
lock tables t2 read;
|
||||
#
|
||||
# Switching to connection 'con12828477_1'.
|
||||
#
|
||||
# The below RENAME should wait on 't2' while
|
||||
# keeping X lock on 't1'.
|
||||
rename table t1 to t3, t2 to t1, t3 to t2;
|
||||
#
|
||||
# Switching to connection 'con12828477_2'.
|
||||
#
|
||||
# Wait while the above RENAME is blocked.
|
||||
# Issue query to I_S which will open 't0' and get
|
||||
# blocked on 't1' because of RENAME.
|
||||
select table_name, auto_increment from information_schema.tables where table_schema='mysqltest';
|
||||
#
|
||||
# Switching to connection 'con12828477_3'.
|
||||
#
|
||||
# Wait while the above SELECT is blocked.
|
||||
#
|
||||
# Check that it holds no lock on 't0' so it can be renamed.
|
||||
rename table t0 to t4;
|
||||
#
|
||||
# Switching to connection 'default'.
|
||||
#
|
||||
#
|
||||
# Unblock the first RENAME.
|
||||
unlock tables;
|
||||
#
|
||||
# Switching to connection 'con12828477_1'.
|
||||
#
|
||||
# Reap the first RENAME
|
||||
#
|
||||
# Switching to connection 'con12828477_2'.
|
||||
#
|
||||
# Reap SELECT to I_S.
|
||||
table_name auto_increment
|
||||
t0 NULL
|
||||
t1 NULL
|
||||
t2 NULL
|
||||
#
|
||||
# Switching to connection 'default'.
|
||||
#
|
||||
#
|
||||
# Now test that we don't keep locks in case when we to fill
|
||||
# I_S table we read .FRM or .TRG file only (this was the case
|
||||
# for which problem existed).
|
||||
#
|
||||
rename table t4 to t0;
|
||||
# Acquire lock on 't2' so upcoming RENAME is
|
||||
# blocked.
|
||||
lock tables t2 read;
|
||||
#
|
||||
# Switching to connection 'con12828477_1'.
|
||||
#
|
||||
# The below RENAME should wait on 't2' while
|
||||
# keeping X lock on 't1'.
|
||||
rename table t1 to t3, t2 to t1, t3 to t2;
|
||||
#
|
||||
# Switching to connection 'con12828477_2'.
|
||||
#
|
||||
# Wait while the above RENAME is blocked.
|
||||
# Issue query to I_S which will open 't0' and get
|
||||
# blocked on 't1' because of RENAME.
|
||||
select event_object_table, trigger_name from information_schema.triggers where event_object_schema='mysqltest';
|
||||
#
|
||||
# Switching to connection 'con12828477_3'.
|
||||
#
|
||||
# Wait while the above SELECT is blocked.
|
||||
#
|
||||
# Check that it holds no lock on 't0' so it can be renamed.
|
||||
rename table t0 to t4;
|
||||
#
|
||||
# Switching to connection 'default'.
|
||||
#
|
||||
#
|
||||
# Unblock the first RENAME.
|
||||
unlock tables;
|
||||
#
|
||||
# Switching to connection 'con12828477_1'.
|
||||
#
|
||||
# Reap the first RENAME
|
||||
#
|
||||
# Switching to connection 'con12828477_2'.
|
||||
#
|
||||
# Reap SELECT to I_S.
|
||||
event_object_table trigger_name
|
||||
#
|
||||
# Switching to connection 'default'.
|
||||
#
|
||||
#
|
||||
# Clean-up.
|
||||
drop database mysqltest;
|
||||
#
|
||||
# End of 5.5 tests
|
||||
#
|
||||
|
@ -118,3 +118,35 @@ Aborted: file is not compressed
|
||||
DROP TABLE t1,t2,t3;
|
||||
DROP TABLE mysql_db1.t1;
|
||||
DROP DATABASE mysql_db1;
|
||||
#
|
||||
# BUG#11761180 - 53646: MYISAMPACK CORRUPTS TABLES WITH FULLTEXT INDEXES
|
||||
#
|
||||
CREATE TABLE t1(a CHAR(4), FULLTEXT(a));
|
||||
INSERT INTO t1 VALUES('aaaa'),('bbbb'),('cccc');
|
||||
FLUSH TABLE t1;
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa' IN BOOLEAN MODE);
|
||||
a
|
||||
aaaa
|
||||
SELECT * FROM t1 WHERE MATCH(a) AGAINST('aaaa');
|
||||
a
|
||||
aaaa
|
||||
DROP TABLE t1;
|
||||
# Test table with key_reflength > rec_reflength
|
||||
CREATE TABLE t1(a CHAR(30), FULLTEXT(a));
|
||||
# Populating a table, so it's index file exceeds 65K
|
||||
# Populating a table, so index file has second level fulltext tree
|
||||
FLUSH TABLE t1;
|
||||
# Compressing table
|
||||
# Fixing index (repair by sort)
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
FLUSH TABLE t1;
|
||||
# Fixing index (repair with keycache)
|
||||
CHECK TABLE t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
DROP TABLE t1;
|
||||
|
110
mysql-test/r/mysql_plugin.result
Normal file
110
mysql-test/r/mysql_plugin.result
Normal file
@ -0,0 +1,110 @@
|
||||
#
|
||||
# Ensure the plugin isn't loaded.
|
||||
#
|
||||
SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name;
|
||||
name dl
|
||||
#
|
||||
# Enable the plugin...
|
||||
#
|
||||
#
|
||||
# Ensure the plugin is now loaded.
|
||||
#
|
||||
SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name;
|
||||
name dl
|
||||
daemon_example libdaemon_example.so
|
||||
#
|
||||
# Disable the plugin...
|
||||
#
|
||||
#
|
||||
# Ensure the plugin isn't loaded.
|
||||
#
|
||||
SELECT * FROM mysql.plugin WHERE name = 'daemon_example' ORDER BY name;
|
||||
name dl
|
||||
#
|
||||
# Attempt to load non-existant plugin
|
||||
#
|
||||
ERROR: Cannot read plugin config file NOT_THERE_AT_ALL. File does not exist.
|
||||
#
|
||||
# Attempt to use non-existant plugin.ini file
|
||||
#
|
||||
ERROR: Cannot read plugin config file daemon_example. File does not exist.
|
||||
#
|
||||
# Attempt to omit the plugin
|
||||
#
|
||||
ERROR: No plugin specified.
|
||||
#
|
||||
# Attempt to omit DISABLE|ENABLE
|
||||
#
|
||||
ERROR: missing operation. Please specify either '<plugin> ENABLE' or '<plugin> DISABLE'.
|
||||
#
|
||||
# Attempt to use bad paths - datadir
|
||||
#
|
||||
ERROR: Cannot access datadir at '/data_not_there/'.
|
||||
#
|
||||
# Attempt to use bad paths - basedir
|
||||
#
|
||||
ERROR: Cannot access basedir at '/basedir_not_there/'.
|
||||
#
|
||||
# Attempt to use bad paths - plugin_dir
|
||||
#
|
||||
ERROR: Cannot read plugin config file daemon_example. File does not exist.
|
||||
#
|
||||
# Attempt to use bad paths - mysqld
|
||||
#
|
||||
ERROR: Cannot access mysqld path '/mysqld_not_there/'.
|
||||
#
|
||||
# Attempt to use bad paths - my_print_defaults
|
||||
#
|
||||
ERROR: Cannot access my-print-defaults path '/my_print_defaults_not_there/'.
|
||||
#
|
||||
# Missing library
|
||||
#
|
||||
ERROR: The plugin library is missing or in a different location.
|
||||
#
|
||||
# Bad format for config file
|
||||
#
|
||||
ERROR: Cannot read plugin config file daemon_example. Bad format in plugin configuration file.
|
||||
#
|
||||
# Missing base_dir option
|
||||
#
|
||||
ERROR: Missing --basedir option.
|
||||
#
|
||||
# Missing data_dir option
|
||||
#
|
||||
ERROR: Missing --datadir option.
|
||||
#
|
||||
# Missing plugin_dir option
|
||||
#
|
||||
ERROR: Missing --plugin_dir option.
|
||||
#
|
||||
# Show the help.
|
||||
#
|
||||
mysql_plugin Ver V.V.VV Distrib XX.XX.XX
|
||||
Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
|
||||
Enable or disable plugins.
|
||||
|
||||
Usage: mysql_plugin [options] <plugin> ENABLE|DISABLE
|
||||
|
||||
Options:
|
||||
-?, --help Display this help and exit.
|
||||
-b, --basedir=name The basedir for the server.
|
||||
-d, --datadir=name The datadir for the server.
|
||||
-p, --plugin-dir=name
|
||||
The plugin dir for the server.
|
||||
-i, --plugin-ini=name
|
||||
Read plugin information from configuration file specified
|
||||
instead of from <plugin-dir>/<plugin_name>.ini.
|
||||
-n, --no-defaults Do not read values from configuration file.
|
||||
-P, --print-defaults
|
||||
Show default values from configuration file.
|
||||
-m, --mysqld=name Path to mysqld executable. Example: /sbin/temp1/mysql/bin
|
||||
-f, --my-print-defaults=name
|
||||
Path to my_print_defaults executable. Example:
|
||||
/source/temp11/extra
|
||||
-v, --verbose More verbose output; you can use this multiple times to
|
||||
get even more verbose output.
|
||||
-V, --version Output version information and exit.
|
||||
|
||||
|
||||
mysql_plugin Ver V.V.VV Distrib XX.XX.XX
|
@ -1,6 +1,5 @@
|
||||
select 0 as "before_use_test" ;
|
||||
before_use_test
|
||||
0
|
||||
-1 before test
|
||||
<No error> before test
|
||||
select otto from (select 1 as otto) as t1;
|
||||
otto
|
||||
1
|
||||
@ -21,27 +20,32 @@ mysqltest: At line 1: query 'select friedrich from (select 1 as otto) as t1' fai
|
||||
select otto from (select 1 as otto) as t1;
|
||||
otto
|
||||
1
|
||||
|
||||
select 0 as "after_successful_stmt_errno" ;
|
||||
after_successful_stmt_errno
|
||||
0
|
||||
garbage ;
|
||||
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 'garbage' at line 1
|
||||
ER_PARSE_ERROR
|
||||
select 1064 as "after_wrong_syntax_errno" ;
|
||||
after_wrong_syntax_errno
|
||||
1064
|
||||
garbage ;
|
||||
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 'garbage' at line 1
|
||||
ER_PARSE_ERROR
|
||||
select 1064 as "after_let_var_equal_value" ;
|
||||
after_let_var_equal_value
|
||||
1064
|
||||
garbage ;
|
||||
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 'garbage' at line 1
|
||||
set @my_var= 'abc' ;
|
||||
|
||||
select 0 as "after_set_var_equal_value" ;
|
||||
after_set_var_equal_value
|
||||
0
|
||||
garbage ;
|
||||
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 'garbage' at line 1
|
||||
ER_PARSE_ERROR
|
||||
select 1064 as "after_disable_warnings_command" ;
|
||||
after_disable_warnings_command
|
||||
1064
|
||||
@ -49,6 +53,7 @@ drop table if exists t1 ;
|
||||
garbage ;
|
||||
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 'garbage' at line 1
|
||||
drop table if exists t1 ;
|
||||
|
||||
select 0 as "after_disable_warnings" ;
|
||||
after_disable_warnings
|
||||
0
|
||||
@ -56,6 +61,7 @@ garbage ;
|
||||
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 'garbage' at line 1
|
||||
select 3 from t1 ;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ER_NO_SUCH_TABLE
|
||||
select 1146 as "after_minus_masked" ;
|
||||
after_minus_masked
|
||||
1146
|
||||
@ -63,6 +69,7 @@ garbage ;
|
||||
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 'garbage' at line 1
|
||||
select 3 from t1 ;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ER_NO_SUCH_TABLE
|
||||
select 1146 as "after_!_masked" ;
|
||||
after_!_masked
|
||||
1146
|
||||
@ -75,6 +82,7 @@ garbage ;
|
||||
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 'garbage' at line 1
|
||||
prepare stmt from "select 3 from t1" ;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ER_NO_SUCH_TABLE
|
||||
select 1146 as "after_failing_prepare" ;
|
||||
after_failing_prepare
|
||||
1146
|
||||
@ -82,6 +90,7 @@ create table t1 ( f1 char(10));
|
||||
garbage ;
|
||||
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 'garbage' at line 1
|
||||
prepare stmt from "select 3 from t1" ;
|
||||
|
||||
select 0 as "after_successful_prepare" ;
|
||||
after_successful_prepare
|
||||
0
|
||||
@ -89,6 +98,7 @@ garbage ;
|
||||
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 'garbage' at line 1
|
||||
execute stmt;
|
||||
3
|
||||
|
||||
select 0 as "after_successful_execute" ;
|
||||
after_successful_execute
|
||||
0
|
||||
@ -97,6 +107,7 @@ garbage ;
|
||||
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 'garbage' at line 1
|
||||
execute stmt;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ER_NO_SUCH_TABLE
|
||||
select 1146 as "after_failing_execute" ;
|
||||
after_failing_execute
|
||||
1146
|
||||
@ -104,12 +115,14 @@ garbage ;
|
||||
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 'garbage' at line 1
|
||||
execute __stmt_;
|
||||
ERROR HY000: Unknown prepared statement handler (__stmt_) given to EXECUTE
|
||||
ER_UNKNOWN_STMT_HANDLER
|
||||
select 1243 as "after_failing_execute" ;
|
||||
after_failing_execute
|
||||
1243
|
||||
garbage ;
|
||||
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 'garbage' at line 1
|
||||
deallocate prepare stmt;
|
||||
|
||||
select 0 as "after_successful_deallocate" ;
|
||||
after_successful_deallocate
|
||||
0
|
||||
@ -117,11 +130,13 @@ garbage ;
|
||||
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 'garbage' at line 1
|
||||
deallocate prepare __stmt_;
|
||||
ERROR HY000: Unknown prepared statement handler (__stmt_) given to DEALLOCATE PREPARE
|
||||
ER_UNKNOWN_STMT_HANDLER
|
||||
select 1243 as "after_failing_deallocate" ;
|
||||
after_failing_deallocate
|
||||
1243
|
||||
garbage ;
|
||||
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 'garbage' at line 1
|
||||
ER_PARSE_ERROR
|
||||
select 1064 as "after_--disable_abort_on_error" ;
|
||||
after_--disable_abort_on_error
|
||||
1064
|
||||
@ -131,18 +146,46 @@ select 3 from t1 ;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
select 3 from t1 ;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
ER_NO_SUCH_TABLE
|
||||
select 1146 as "after_!errno_masked_error" ;
|
||||
after_!errno_masked_error
|
||||
1146
|
||||
mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1000...
|
||||
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 'garbage' at line 1
|
||||
is empty
|
||||
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 'nonsense' at line 1
|
||||
is empty
|
||||
garbage ;
|
||||
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 'garbage' at line 1
|
||||
ER_PARSE_ERROR
|
||||
select 1064 as "after_--enable_abort_on_error" ;
|
||||
after_--enable_abort_on_error
|
||||
1064
|
||||
select 3 from t1 ;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
mysqltest: At line 1: query 'select 3 from t1' failed with wrong errno 1146: 'Table 'test.t1' doesn't exist', instead of 1064...
|
||||
garbage;
|
||||
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 'garbage' at line 1
|
||||
select 2;
|
||||
select 3;
|
||||
3
|
||||
3
|
||||
select 5;
|
||||
ERROR 42S02: Table 'test.t1' doesn't exist
|
||||
select 7;
|
||||
7
|
||||
7
|
||||
mysqltest: At line 1: End of line junk detected: "OCNE"
|
||||
connect con1,localhost,root,,;
|
||||
select 5 from t1;
|
||||
lower
|
||||
case
|
||||
name
|
||||
abc
|
||||
xyz
|
||||
is empty
|
||||
is empty
|
||||
"Yes it's empty"
|
||||
hello
|
||||
hello
|
||||
;;;;;;;;
|
||||
@ -315,7 +358,7 @@ insert into t1 values ('$dollar');
|
||||
$dollar
|
||||
`select 42`
|
||||
drop table t1;
|
||||
mysqltest: At line 1: Error running query 'failing query': 1064 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 'failing query' at line 1
|
||||
mysqltest: At line 1: query 'let $var2= `failing query`' failed: 1064: 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 'failing query' at line 1
|
||||
mysqltest: At line 1: Missing required argument 'filename' to command 'source'
|
||||
mysqltest: At line 1: Could not open './non_existingFile' for reading, errno: 2
|
||||
mysqltest: In included file "MYSQLTEST_VARDIR/tmp/recursive.sql":
|
||||
@ -847,7 +890,7 @@ mysqltest: At line 1: Could not find column 'column_not_exists' in the result of
|
||||
mysqltest: At line 1: Query 'SET @A = 1' didn't return a result set
|
||||
mysqltest: At line 1: Could not find column '1 AS B' in the result of 'SELECT 1 AS A'
|
||||
value= No such row
|
||||
mysqltest: At line 1: Error running query 'SHOW COLNS FROM t1': 1064 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 'COLNS FROM t1' at line 1
|
||||
mysqltest: At line 1: query 'let $value= query_get_value(SHOW COLNS FROM t1, Field, 1)' failed: 1064: 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 'COLNS FROM t1' at line 1
|
||||
|
||||
Field Type Null Key Default Extra
|
||||
a int(11) YES -><- NULL
|
||||
|
@ -36,7 +36,6 @@ call mtr.add_suppression("nnoDB: Error: table `test`.`t1` .* Partition.* InnoDB
|
||||
#
|
||||
# Bug#55091: Server crashes on ADD PARTITION after a failed attempt
|
||||
#
|
||||
SET @old_innodb_file_format_max = @@global.innodb_file_format_max;
|
||||
SET @old_innodb_file_format = @@global.innodb_file_format;
|
||||
SET @old_innodb_file_per_table = @@global.innodb_file_per_table;
|
||||
SET @old_innodb_strict_mode = @@global.innodb_strict_mode;
|
||||
@ -104,7 +103,6 @@ DROP TABLE t1;
|
||||
SET @@global.innodb_strict_mode = @old_innodb_strict_mode;
|
||||
SET @@global.innodb_file_format = @old_innodb_file_format;
|
||||
SET @@global.innodb_file_per_table = @old_innodb_file_per_table;
|
||||
SET @@global.innodb_file_format_max = @old_innodb_file_format_max;
|
||||
SET NAMES utf8;
|
||||
CREATE TABLE `t``\""e` (a INT, PRIMARY KEY (a))
|
||||
ENGINE=InnoDB
|
||||
|
@ -30,7 +30,7 @@ ERROR HY000: You are using safe update mode and you tried to update a table with
|
||||
delete from t1 where a+0=1;
|
||||
ERROR HY000: You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column
|
||||
select 1 from t1,t1 as t2,t1 as t3,t1 as t4,t1 as t5;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
update t1 set b="a" limit 1;
|
||||
update t1 set b="a" where b="b" limit 2;
|
||||
delete from t1 where b="test" limit 1;
|
||||
@ -42,7 +42,7 @@ SELECT @@MAX_JOIN_SIZE, @@SQL_BIG_SELECTS;
|
||||
2 0
|
||||
insert into t1 values (null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a"),(null,"a");
|
||||
SELECT * from t1 order by a;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
SET SQL_BIG_SELECTS=1;
|
||||
SELECT * from t1 order by a;
|
||||
a b
|
||||
@ -52,7 +52,7 @@ a b
|
||||
5 a
|
||||
SET MAX_JOIN_SIZE=2;
|
||||
SELECT * from t1;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
SET MAX_JOIN_SIZE=DEFAULT;
|
||||
SELECT * from t1;
|
||||
a b
|
||||
@ -82,12 +82,12 @@ insert into t1 select * from t1;
|
||||
insert into t1 select * from t1;
|
||||
set local max_join_size=8;
|
||||
select * from (select * from t1) x;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
set local max_join_size=1;
|
||||
select * from (select a.a as aa, b.a as ba from t1 a, t1 b) x;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
set local max_join_size=1;
|
||||
select * from (select 1 union select 2 union select 3) x;
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
ERROR 42000: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
|
||||
drop table t1;
|
||||
SET SQL_SAFE_UPDATES=0,SQL_SELECT_LIMIT=DEFAULT, MAX_JOIN_SIZE=DEFAULT;
|
||||
|
@ -460,57 +460,57 @@ insert into t2 values (1),(2);
|
||||
insert into t3 values (1,1),(2,2);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 2 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 2 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 2 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 2 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
insert into t1 values (3),(4);
|
||||
insert into t2 values (3),(4);
|
||||
insert into t3 values (3,3),(4,4);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 4 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
insert into t1 values (5);
|
||||
insert into t2 values (5);
|
||||
insert into t3 values (5,5);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 5 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 5 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 5 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 5 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
delete from t1 where a=3;
|
||||
delete from t2 where b=3;
|
||||
delete from t3 where a=3;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 4 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 4 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 4 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
truncate table t1;
|
||||
truncate table t2;
|
||||
truncate table t3;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 0 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
insert into t1 values (5);
|
||||
insert into t2 values (5);
|
||||
insert into t3 values (5,5);
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 1 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 1 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 1 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 1 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
delete from t1 where a=5;
|
||||
delete from t2 where b=5;
|
||||
delete from t3 where a=5;
|
||||
show table status;
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 MEMORY 10 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # # NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
t1 MEMORY 10 Fixed 0 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t2 MEMORY 10 Fixed 0 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
t3 MEMORY 10 Fixed 0 # # # # # NULL # NULL NULL latin1_swedish_ci NULL
|
||||
drop table t1, t2, t3;
|
||||
create database mysqltest;
|
||||
show create database mysqltest;
|
||||
@ -662,7 +662,7 @@ DROP TABLE t1;
|
||||
flush tables;
|
||||
SHOW TABLE STATUS like 't1';
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
t1 NULL NULL NULL NULL # # # # NULL NULL NULL NULL NULL NULL NULL NULL Incorrect information in file: './test/t1.frm'
|
||||
t1 NULL NULL NULL NULL # # # # NULL NULL # NULL NULL NULL NULL NULL Incorrect information in file: './test/t1.frm'
|
||||
Warnings:
|
||||
Warning 1033 Incorrect information in file: './test/t1.frm'
|
||||
show create table t1;
|
||||
@ -1334,7 +1334,7 @@ CREATE DATABASE `
|
||||
CREATE TABLE `<60>`.`<60>` (a int) ENGINE=Memory;
|
||||
SHOW TABLE STATUS FROM `<60>` LIKE '<27>';
|
||||
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
|
||||
<EFBFBD> MEMORY 10 Fixed 0 # # # # 0 NULL NULL NULL NULL latin1_swedish_ci NULL
|
||||
<EFBFBD> MEMORY 10 Fixed 0 # # # # 0 NULL # NULL NULL latin1_swedish_ci NULL
|
||||
DROP DATABASE `<60>`;
|
||||
show columns from `#mysql50#????????`;
|
||||
Got one of the listed errors
|
||||
|
@ -558,6 +558,52 @@ f1 bug13575(f1)
|
||||
3 ccc
|
||||
drop function bug13575|
|
||||
drop table t3|
|
||||
SELECT @@GLOBAL.storage_engine INTO @old_engine|
|
||||
SET @@GLOBAL.storage_engine=InnoDB|
|
||||
SET @@SESSION.storage_engine=InnoDB|
|
||||
SHOW GLOBAL VARIABLES LIKE 'storage_engine'|
|
||||
Variable_name Value
|
||||
storage_engine InnoDB
|
||||
SHOW SESSION VARIABLES LIKE 'storage_engine'|
|
||||
Variable_name Value
|
||||
storage_engine InnoDB
|
||||
CREATE PROCEDURE bug11758414()
|
||||
BEGIN
|
||||
SET @@GLOBAL.storage_engine="MyISAM";
|
||||
SET @@SESSION.storage_engine="MyISAM";
|
||||
# show defaults at execution time / that setting them worked
|
||||
SHOW GLOBAL VARIABLES LIKE 'storage_engine';
|
||||
SHOW SESSION VARIABLES LIKE 'storage_engine';
|
||||
CREATE TABLE t1 (id int);
|
||||
CREATE TABLE t2 (id int) ENGINE=InnoDB;
|
||||
# show we're heeding the default (at run-time, not parse-time!)
|
||||
SHOW CREATE TABLE t1;
|
||||
# show that we didn't break explicit override with ENGINE=...
|
||||
SHOW CREATE TABLE t2;
|
||||
END;
|
||||
|
|
||||
CALL bug11758414|
|
||||
Variable_name Value
|
||||
storage_engine MyISAM
|
||||
Variable_name Value
|
||||
storage_engine MyISAM
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`id` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`id` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
SHOW GLOBAL VARIABLES LIKE 'storage_engine'|
|
||||
Variable_name Value
|
||||
storage_engine MyISAM
|
||||
SHOW SESSION VARIABLES LIKE 'storage_engine'|
|
||||
Variable_name Value
|
||||
storage_engine MyISAM
|
||||
DROP PROCEDURE bug11758414|
|
||||
DROP TABLE t1, t2|
|
||||
SET @@GLOBAL.storage_engine=@old_engine|
|
||||
#
|
||||
# End of 5.1 tests
|
||||
#
|
||||
|
@ -1934,3 +1934,14 @@ f1
|
||||
0.000000000000000000000000
|
||||
DROP TABLE IF EXISTS t1;
|
||||
End of 5.1 tests
|
||||
#
|
||||
# BUG#12911710 - VALGRIND FAILURE IN
|
||||
# ROW-DEBUG:PERFSCHEMA.SOCKET_SUMMARY_BY_INSTANCE_FUNC
|
||||
#
|
||||
CREATE TABLE t1(d1 DECIMAL(60,0) NOT NULL,
|
||||
d2 DECIMAL(60,0) NOT NULL);
|
||||
INSERT INTO t1 (d1, d2) VALUES(0.0, 0.0);
|
||||
SELECT d1 * d2 FROM t1;
|
||||
d1 * d2
|
||||
0
|
||||
DROP TABLE t1;
|
||||
|
BIN
mysql-test/std_data/bug11747416_32228_binlog.000001
Normal file
BIN
mysql-test/std_data/bug11747416_32228_binlog.000001
Normal file
Binary file not shown.
@ -1,95 +0,0 @@
|
||||
[mysqld]
|
||||
open-files-limit=1024
|
||||
character-set-server=latin1
|
||||
connect-timeout=4711
|
||||
log-bin-trust-function-creators=1
|
||||
key_buffer_size=1M
|
||||
sort_buffer=256K
|
||||
max_heap_table_size=1M
|
||||
loose-innodb_data_file_path=ibdata1:10M:autoextend
|
||||
loose-innodb_buffer_pool_size=8M
|
||||
loose-innodb_write_io_threads=2
|
||||
loose-innodb_read_io_threads=2
|
||||
loose-innodb_log_buffer_size=1M
|
||||
loose-innodb_log_file_size=5M
|
||||
loose-innodb_additional_mem_pool_size=1M
|
||||
loose-innodb_log_files_in_group=2
|
||||
slave-net-timeout=120
|
||||
log-bin=mysqld-bin
|
||||
loose-enable-performance-schema
|
||||
loose-performance-schema-max-mutex-instances=10000
|
||||
loose-performance-schema-max-rwlock-instances=10000
|
||||
loose-performance-schema-max-table-instances=500
|
||||
loose-performance-schema-max-table-handles=1000
|
||||
binlog-direct-non-transactional-updates
|
||||
|
||||
[mysql]
|
||||
default-character-set=latin1
|
||||
|
||||
[mysqlshow]
|
||||
default-character-set=latin1
|
||||
|
||||
[mysqlimport]
|
||||
default-character-set=latin1
|
||||
|
||||
[mysqlcheck]
|
||||
default-character-set=latin1
|
||||
|
||||
[mysql_upgrade]
|
||||
default-character-set=latin1
|
||||
tmpdir=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp
|
||||
|
||||
[mysqld.1]
|
||||
#!run-master-sh
|
||||
log-bin=master-bin
|
||||
loose-enable-performance-schema
|
||||
basedir=/home/bzr/bugs/b57108-5.5-bugteam
|
||||
tmpdir=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1
|
||||
character-sets-dir=/home/bzr/bugs/b57108-5.5-bugteam/sql/share/charsets
|
||||
lc-messages-dir=/home/bzr/bugs/b57108-5.5-bugteam/sql/share/
|
||||
datadir=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/mysqld.1/data
|
||||
pid-file=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/run/mysqld.1.pid
|
||||
#host=localhost
|
||||
port=13000
|
||||
socket=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock
|
||||
#log-error=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/log/mysqld.1.err
|
||||
general_log=1
|
||||
general_log_file=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/mysqld.1/mysqld.log
|
||||
slow_query_log=1
|
||||
slow_query_log_file=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/mysqld.1/mysqld-slow.log
|
||||
#user=root
|
||||
#password=
|
||||
server-id=1
|
||||
secure-file-priv=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var
|
||||
ssl-ca=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/cacert.pem
|
||||
ssl-cert=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/server-cert.pem
|
||||
ssl-key=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/server-key.pem
|
||||
|
||||
[mysqlbinlog]
|
||||
disable-force-if-open
|
||||
character-sets-dir=/home/bzr/bugs/b57108-5.5-bugteam/sql/share/charsets
|
||||
|
||||
[ENV]
|
||||
MASTER_MYPORT=13000
|
||||
MASTER_MYSOCK=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock
|
||||
|
||||
[client]
|
||||
password=
|
||||
user=root
|
||||
port=13000
|
||||
host=localhost
|
||||
socket=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock
|
||||
|
||||
[mysqltest]
|
||||
ssl-ca=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/cacert.pem
|
||||
ssl-cert=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/client-cert.pem
|
||||
ssl-key=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/std_data/client-key.pem
|
||||
skip-ssl=1
|
||||
|
||||
[client.1]
|
||||
password=
|
||||
user=root
|
||||
port=13000
|
||||
host=localhost
|
||||
socket=/home/bzr/bugs/b57108-5.5-bugteam/mysql-test/var/tmp/mysqld.1.sock
|
||||
|
@ -99,6 +99,8 @@ alter table t1 drop b;
|
||||
create table t3 like t1;
|
||||
insert into t1 select * from t3;
|
||||
replace into t1 select * from t3;
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
|
||||
select * from t1;
|
||||
a
|
||||
select * from t2;
|
||||
|
@ -2352,6 +2352,7 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc
|
||||
REPLACE INTO t1 SELECT * FROM t1 LIMIT 1;
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
|
||||
UPDATE t1 SET a=1 LIMIT 1;
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
|
||||
@ -2368,6 +2369,7 @@ END|
|
||||
CALL p1();
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause. This is unsafe because the set of rows included cannot be predicted.
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
|
||||
DROP PROCEDURE p1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
@ -2651,4 +2653,40 @@ a
|
||||
13:46:40
|
||||
1970-01-12 13:46:40
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE filler_table (a INT, b INT);
|
||||
INSERT INTO filler_table values (1,1),(1,2);
|
||||
CREATE TABLE insert_table (a INT, b INT, PRIMARY KEY(a));
|
||||
CREATE TABLE replace_table (a INT, b INT, PRIMARY KEY(a));
|
||||
INSERT INTO replace_table values (1,1),(2,2);
|
||||
CREATE TABLE update_table (a INT, b INT, PRIMARY KEY(a));
|
||||
INSERT INTO update_table values (1,1),(2,2);
|
||||
INSERT IGNORE INTO insert_table SELECT * FROM filler_table;
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT IGNORE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.
|
||||
TRUNCATE TABLE insert_table;
|
||||
INSERT INTO insert_table SELECT * FROM filler_table ON DUPLICATE KEY UPDATE a = 1;
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. INSERT... SELECT... ON DUPLICATE KEY UPDATE is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are updated. This order cannot be predicted and may differ on master and the slave.
|
||||
TRUNCATE TABLE insert_table;
|
||||
REPLACE INTO replace_table SELECT * FROM filler_table;
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
|
||||
UPDATE IGNORE update_table SET a=2;
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. UPDATE IGNORE is unsafe because the order in which rows are updated determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.
|
||||
CREATE TABLE create_ignore_test (a INT, b INT, PRIMARY KEY(b)) IGNORE SELECT * FROM filler_table;
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. CREATE... IGNORE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are ignored. This order cannot be predicted and may differ on master and the slave.
|
||||
CREATE TABLE create_replace_test (a INT, b INT, PRIMARY KEY(b)) REPLACE SELECT * FROM filler_table;
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
|
||||
CREATE TEMPORARY TABLE temp1 (a INT, b INT, PRIMARY KEY(b)) REPLACE SELECT * FROM filler_table;
|
||||
Warnings:
|
||||
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. CREATE... REPLACE SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave.
|
||||
DROP TABLE filler_table;
|
||||
DROP TABLE insert_table;
|
||||
DROP TABLE update_table;
|
||||
DROP TABLE replace_table;
|
||||
DROP TABLE create_ignore_test;
|
||||
DROP TABLE create_replace_test;
|
||||
"End of tests"
|
||||
|
@ -12,6 +12,11 @@
|
||||
# - insert into two autoinc columns;
|
||||
# - statements using UDF's.
|
||||
# - statements reading from log tables in the mysql database.
|
||||
# - INSERT ... SELECT ... ON DUPLICATE KEY UPDATE
|
||||
# - REPLACE ... SELECT
|
||||
# - CREATE TABLE [IGNORE/REPLACE] SELECT
|
||||
# - INSERT IGNORE...SELECT
|
||||
# - UPDATE IGNORE
|
||||
#
|
||||
# Note that statements that use stored functions, stored procedures,
|
||||
# triggers, views, or prepared statements that invoke unsafe
|
||||
@ -79,6 +84,7 @@
|
||||
# BUG#45785: LIMIT in SP does not cause RBL if binlog_format=MIXED
|
||||
# BUG#47995: Mark user functions as unsafe
|
||||
# BUG#49222: Mark RAND() unsafe
|
||||
# BUG#11758262: MARK INSERT...SEL...ON DUP KEY UPD,REPLACE...SEL,CREATE...[IGN|REPL] SEL
|
||||
#
|
||||
# ==== Related test cases ====
|
||||
#
|
||||
@ -699,5 +705,47 @@ INSERT INTO t1 VALUES
|
||||
SELECT * FROM t1;
|
||||
|
||||
DROP TABLE t1;
|
||||
#
|
||||
#BUG#11758262-50439: MARK INSERT...SEL...ON DUP KEY UPD,REPLACE..
|
||||
#The following statement may be unsafe when logged in statement format.
|
||||
#INSERT IGNORE...SELECT
|
||||
#INSERT ... SELECT ... ON DUPLICATE KEY UPDATE
|
||||
#REPLACE ... SELECT
|
||||
#UPDATE IGNORE
|
||||
#CREATE TABLE... IGNORE SELECT
|
||||
#CREATE TABLE... REPLACE SELECT
|
||||
|
||||
#setup tables
|
||||
CREATE TABLE filler_table (a INT, b INT);
|
||||
INSERT INTO filler_table values (1,1),(1,2);
|
||||
CREATE TABLE insert_table (a INT, b INT, PRIMARY KEY(a));
|
||||
CREATE TABLE replace_table (a INT, b INT, PRIMARY KEY(a));
|
||||
INSERT INTO replace_table values (1,1),(2,2);
|
||||
CREATE TABLE update_table (a INT, b INT, PRIMARY KEY(a));
|
||||
INSERT INTO update_table values (1,1),(2,2);
|
||||
|
||||
#INSERT IGNORE... SELECT
|
||||
INSERT IGNORE INTO insert_table SELECT * FROM filler_table;
|
||||
TRUNCATE TABLE insert_table;
|
||||
#INSERT ... SELECT ... ON DUPLICATE KEY UPDATE
|
||||
INSERT INTO insert_table SELECT * FROM filler_table ON DUPLICATE KEY UPDATE a = 1;
|
||||
TRUNCATE TABLE insert_table;
|
||||
#REPLACE...SELECT
|
||||
REPLACE INTO replace_table SELECT * FROM filler_table;
|
||||
#UPDATE IGNORE
|
||||
UPDATE IGNORE update_table SET a=2;
|
||||
#CREATE TABLE [IGNORE/REPLACE] SELECT
|
||||
CREATE TABLE create_ignore_test (a INT, b INT, PRIMARY KEY(b)) IGNORE SELECT * FROM filler_table;
|
||||
CREATE TABLE create_replace_test (a INT, b INT, PRIMARY KEY(b)) REPLACE SELECT * FROM filler_table;
|
||||
#temporary tables should not throw the warning.
|
||||
CREATE TEMPORARY TABLE temp1 (a INT, b INT, PRIMARY KEY(b)) REPLACE SELECT * FROM filler_table;
|
||||
|
||||
###clean up
|
||||
DROP TABLE filler_table;
|
||||
DROP TABLE insert_table;
|
||||
DROP TABLE update_table;
|
||||
DROP TABLE replace_table;
|
||||
DROP TABLE create_ignore_test;
|
||||
DROP TABLE create_replace_test;
|
||||
|
||||
--echo "End of tests"
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1,t2,t3;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -89,3 +90,4 @@ c1
|
||||
2007-02-16 12:10:34
|
||||
2007-02-17 13:10:34
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NULL, c3 DATE NULL, PRIMARY KEY(c1), UNIQUE(c2));
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'4 04:01:01'),NOW());
|
||||
@ -128,3 +129,4 @@ c1 c2 c3
|
||||
2003 2001 2000
|
||||
2004 2000 2000
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -82,3 +83,4 @@ c1
|
||||
2000
|
||||
2011
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -87,3 +88,4 @@ c1
|
||||
1999
|
||||
2000
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -87,3 +88,4 @@ c1
|
||||
1999
|
||||
2000
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NULL UNIQUE);
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -82,3 +83,4 @@ c1
|
||||
2000
|
||||
2011
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NULL UNIQUE);
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -87,3 +88,4 @@ c1
|
||||
1999
|
||||
2000
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NULL UNIQUE);
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -81,3 +82,4 @@ c1
|
||||
1999
|
||||
2000
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
|
||||
@ -144,3 +145,4 @@ c1 c2 c3
|
||||
2011 2011 2000
|
||||
2011 2011 2011
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
|
||||
@ -147,3 +148,4 @@ c1 c2 c3
|
||||
1999 2000 1999
|
||||
2000 1999 1999
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
|
||||
@ -147,3 +148,4 @@ c1 c2 c3
|
||||
1999 2000 1999
|
||||
2000 1999 1999
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3));
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
|
||||
@ -144,3 +145,4 @@ c1 c2 c3
|
||||
2011 2011 2000
|
||||
2011 2011 2011
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3));
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
|
||||
@ -147,3 +148,4 @@ c1 c2 c3
|
||||
1999 2000 1999
|
||||
2000 1999 1999
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3));
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
|
||||
@ -139,3 +140,4 @@ c1 c2 c3
|
||||
1999 2000 1999
|
||||
2000 1999 1999
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
|
||||
@ -144,3 +145,4 @@ c1 c2 c3
|
||||
2011 2011 2000
|
||||
2011 2011 2011
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,4 +1,5 @@
|
||||
DROP TABLE IF EXISTS t1,t2,t3;
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL);
|
||||
SET TIMESTAMP=1171346973;
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -104,3 +105,4 @@ c1
|
||||
2007-02-13 09:09:33
|
||||
2007-02-14 10:10:34
|
||||
DROP TABLE t1;
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1,t2,t3;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -45,4 +47,5 @@ SELECT * FROM t1 ORDER BY c1;
|
||||
DELETE FROM t1 WHERE c1 <= ADDTIME(NOW(),'2 02:01:01');
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NULL, c3 DATE NULL, PRIMARY KEY(c1), UNIQUE(c2));
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),ADDTIME(NOW(),'4 04:01:01'),NOW());
|
||||
@ -70,4 +72,6 @@ INSERT INTO t1 (c1,c2,c3) VALUES(2000,2000,2000) ON DUPLICATE KEY UPDATE c3=2011
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
# Restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -61,4 +63,5 @@ INSERT INTO t1 (c1) VALUES(1999) ON DUPLICATE KEY UPDATE c1=2011;
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -61,4 +63,5 @@ INSERT INTO t1 (c1) VALUES(2000);
|
||||
INSERT INTO t1 (c1) VALUES(1999);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL PRIMARY KEY);
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -61,4 +63,6 @@ INSERT INTO t1 (c1) VALUES(2000);
|
||||
INSERT INTO t1 (c1) VALUES(1999);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
# Restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NULL UNIQUE);
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -61,4 +63,5 @@ INSERT INTO t1 (c1) VALUES(1999) ON DUPLICATE KEY UPDATE c1=2011;
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NULL UNIQUE);
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -61,4 +63,5 @@ INSERT INTO t1 (c1) VALUES(2000);
|
||||
INSERT INTO t1 (c1) VALUES(1999);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NULL UNIQUE);
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -53,4 +55,5 @@ INSERT INTO t1 (c1) VALUES(2000);
|
||||
INSERT IGNORE INTO t1 (c1) VALUES(1999);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
|
||||
@ -85,4 +87,6 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000) ON DUPLICATE KEY UPDATE c1=2011
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
# Restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
|
||||
@ -93,4 +95,5 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,1999);
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
|
||||
@ -93,4 +95,5 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,1999);
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3));
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
|
||||
@ -85,4 +87,5 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000) ON DUPLICATE KEY UPDATE c1=2011
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3));
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
|
||||
@ -93,4 +95,5 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,1999);
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NULL, c2 DATE NULL, c3 DATE NULL, UNIQUE(c1,c2,c3));
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
|
||||
@ -85,4 +87,6 @@ INSERT IGNORE INTO t1 (c1,c2,c3) VALUES(1999,1999,2000);
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
# Restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL, c2 DATE NOT NULL, c3 DATE NOT NULL, PRIMARY KEY(c1,c2,c3));
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1,c2,c3) VALUES(NOW(),NOW(),NOW());
|
||||
@ -93,4 +95,6 @@ INSERT INTO t1 (c1,c2,c3) VALUES(1999,1999,2000) ON DUPLICATE KEY UPDATE c1=2011
|
||||
--sorted_result
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
# Restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1,t2,t3;
|
||||
--enable_warnings
|
||||
# Set Correct timezone to match result
|
||||
SET TIME_ZONE="+03:00";
|
||||
CREATE TABLE t1(c1 DATE NOT NULL);
|
||||
SET TIMESTAMP=1171346973; # 2007-02-13 15:09:33
|
||||
INSERT INTO t1 (c1) VALUES(NOW());
|
||||
@ -53,4 +55,5 @@ UPDATE t1 SET c1 = NOW() WHERE c1 >= ADDTIME(NOW(),'2 02:01:01');
|
||||
--sorted_result
|
||||
SELECT * FROM t1 ORDER BY c1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# Restore timezone to default
|
||||
SET TIME_ZONE= @@global.time_zone;
|
||||
|
@ -1 +1,2 @@
|
||||
--plugin_dir=$FEDERATED_PLUGIN_DIR
|
||||
--loose-federated=ON
|
||||
|
@ -0,0 +1,19 @@
|
||||
CREATE TABLE t2(a int);
|
||||
CREATE TABLE t1(a int) ENGINE=FEDERATED
|
||||
CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/t2';
|
||||
Warnings:
|
||||
Warning 1286 Unknown storage engine 'FEDERATED'
|
||||
Warning 1266 Using storage engine MyISAM for table 't1'
|
||||
DROP TABLE t1;
|
||||
INSTALL PLUGIN federated SONAME 'FEDERATED_PLUGIN';
|
||||
INSTALL PLUGIN FEDERATED SONAME 'FEDERATED_PLUGIN';
|
||||
ERROR HY000: Function 'FEDERATED' already exists
|
||||
UNINSTALL PLUGIN federated;
|
||||
INSTALL PLUGIN federated SONAME 'FEDERATED_PLUGIN';
|
||||
CREATE TABLE t1(a int) ENGINE=FEDERATED
|
||||
CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/t2';
|
||||
DROP TABLE t1;
|
||||
UNINSTALL PLUGIN federated;
|
||||
UNINSTALL PLUGIN federated;
|
||||
ERROR 42000: PLUGIN federated does not exist
|
||||
DROP TABLE t2;
|
||||
|
@ -1,24 +1,37 @@
|
||||
--source include/not_windows.inc
|
||||
--source include/have_federated_plugin.inc
|
||||
|
||||
--skip federated plugin is disabled
|
||||
# Uninstall will not uninstall if ps has been used
|
||||
--disable_ps_protocol
|
||||
|
||||
CREATE TABLE t1(a int) ENGINE=FEDERATED;
|
||||
connect (master,localhost,root,,test,$MASTER_MYPORT,);
|
||||
connect (slave,localhost,root,,test,$SLAVE_MYPORT,);
|
||||
|
||||
connection master;
|
||||
CREATE TABLE t2(a int);
|
||||
|
||||
connection slave;
|
||||
CREATE TABLE t1(a int) ENGINE=FEDERATED
|
||||
CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/t2';
|
||||
DROP TABLE t1;
|
||||
|
||||
INSTALL PLUGIN federated SONAME 'ha_federated.so';
|
||||
--error 1125
|
||||
INSTALL PLUGIN FEDERATED SONAME 'ha_federated.so';
|
||||
--replace_result $FEDERATED_PLUGIN FEDERATED_PLUGIN
|
||||
eval INSTALL PLUGIN federated SONAME '$FEDERATED_PLUGIN';
|
||||
--replace_result $FEDERATED_PLUGIN FEDERATED_PLUGIN
|
||||
--error ER_UDF_EXISTS
|
||||
eval INSTALL PLUGIN FEDERATED SONAME '$FEDERATED_PLUGIN';
|
||||
|
||||
UNINSTALL PLUGIN federated;
|
||||
|
||||
INSTALL PLUGIN federated SONAME 'ha_federated.so';
|
||||
|
||||
CREATE TABLE t1(a int) ENGINE=FEDERATED;
|
||||
--replace_result $FEDERATED_PLUGIN FEDERATED_PLUGIN
|
||||
eval INSTALL PLUGIN federated SONAME '$FEDERATED_PLUGIN';
|
||||
|
||||
CREATE TABLE t1(a int) ENGINE=FEDERATED
|
||||
CONNECTION='mysql://root@localhost:$MASTER_MYPORT/test/t2';
|
||||
DROP TABLE t1;
|
||||
|
||||
UNINSTALL PLUGIN federated;
|
||||
--error ER_SP_DOES_NOT_EXIST
|
||||
UNINSTALL PLUGIN federated;
|
||||
|
||||
connection master;
|
||||
DROP TABLE t2;
|
||||
|
@ -39,6 +39,81 @@ DELETE FROM t1_purge;
|
||||
DELETE FROM t2_purge;
|
||||
DELETE FROM t3_purge;
|
||||
DELETE FROM t4_purge;
|
||||
SET @r=REPEAT('a',500);
|
||||
CREATE TABLE t12637786(a INT,
|
||||
v1 VARCHAR(500), v2 VARCHAR(500), v3 VARCHAR(500),
|
||||
v4 VARCHAR(500), v5 VARCHAR(500), v6 VARCHAR(500),
|
||||
v7 VARCHAR(500), v8 VARCHAR(500), v9 VARCHAR(500),
|
||||
v10 VARCHAR(500), v11 VARCHAR(500), v12 VARCHAR(500),
|
||||
v13 VARCHAR(500), v14 VARCHAR(500), v15 VARCHAR(500),
|
||||
v16 VARCHAR(500), v17 VARCHAR(500), v18 VARCHAR(500)
|
||||
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
CREATE INDEX idx1 ON t12637786(a,v1);
|
||||
INSERT INTO t12637786 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
|
||||
UPDATE t12637786 SET a=1000;
|
||||
DELETE FROM t12637786;
|
||||
create table t12963823(a blob,b blob,c blob,d blob,e blob,f blob,g blob,h blob,
|
||||
i blob,j blob,k blob,l blob,m blob,n blob,o blob,p blob)
|
||||
engine=innodb row_format=dynamic;
|
||||
SET @r = repeat('a', 767);
|
||||
insert into t12963823 values (@r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r, @r,@r,@r,@r);
|
||||
create index ndx_a on t12963823 (a(500));
|
||||
create index ndx_b on t12963823 (b(500));
|
||||
create index ndx_c on t12963823 (c(500));
|
||||
create index ndx_d on t12963823 (d(500));
|
||||
create index ndx_e on t12963823 (e(500));
|
||||
create index ndx_f on t12963823 (f(500));
|
||||
create index ndx_k on t12963823 (k(500));
|
||||
create index ndx_l on t12963823 (l(500));
|
||||
SET @r = repeat('b', 500);
|
||||
update t12963823 set a=@r,b=@r,c=@r,d=@r;
|
||||
update t12963823 set e=@r,f=@r,g=@r,h=@r;
|
||||
update t12963823 set i=@r,j=@r,k=@r,l=@r;
|
||||
update t12963823 set m=@r,n=@r,o=@r,p=@r;
|
||||
alter table t12963823 drop index ndx_a;
|
||||
alter table t12963823 drop index ndx_b;
|
||||
create index ndx_g on t12963823 (g(500));
|
||||
create index ndx_h on t12963823 (h(500));
|
||||
create index ndx_i on t12963823 (i(500));
|
||||
create index ndx_j on t12963823 (j(500));
|
||||
create index ndx_m on t12963823 (m(500));
|
||||
create index ndx_n on t12963823 (n(500));
|
||||
create index ndx_o on t12963823 (o(500));
|
||||
create index ndx_p on t12963823 (p(500));
|
||||
show create table t12963823;
|
||||
Table Create Table
|
||||
t12963823 CREATE TABLE `t12963823` (
|
||||
`a` blob,
|
||||
`b` blob,
|
||||
`c` blob,
|
||||
`d` blob,
|
||||
`e` blob,
|
||||
`f` blob,
|
||||
`g` blob,
|
||||
`h` blob,
|
||||
`i` blob,
|
||||
`j` blob,
|
||||
`k` blob,
|
||||
`l` blob,
|
||||
`m` blob,
|
||||
`n` blob,
|
||||
`o` blob,
|
||||
`p` blob,
|
||||
KEY `ndx_c` (`c`(500)),
|
||||
KEY `ndx_d` (`d`(500)),
|
||||
KEY `ndx_e` (`e`(500)),
|
||||
KEY `ndx_f` (`f`(500)),
|
||||
KEY `ndx_k` (`k`(500)),
|
||||
KEY `ndx_l` (`l`(500)),
|
||||
KEY `ndx_g` (`g`(500)),
|
||||
KEY `ndx_h` (`h`(500)),
|
||||
KEY `ndx_i` (`i`(500)),
|
||||
KEY `ndx_j` (`j`(500)),
|
||||
KEY `ndx_m` (`m`(500)),
|
||||
KEY `ndx_n` (`n`(500)),
|
||||
KEY `ndx_o` (`o`(500)),
|
||||
KEY `ndx_p` (`p`(500))
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
|
||||
set global innodb_file_per_table=0;
|
||||
set global innodb_file_format=Antelope;
|
||||
create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb;
|
||||
@ -961,20 +1036,15 @@ ERROR HY000: Too big row
|
||||
alter table t1 row_format=compact;
|
||||
create index t1u on t1 (u(767));
|
||||
drop table t1;
|
||||
SET @r=REPEAT('a',500);
|
||||
CREATE TABLE t1(a INT,
|
||||
v1 VARCHAR(500), v2 VARCHAR(500), v3 VARCHAR(500),
|
||||
v4 VARCHAR(500), v5 VARCHAR(500), v6 VARCHAR(500),
|
||||
v7 VARCHAR(500), v8 VARCHAR(500), v9 VARCHAR(500),
|
||||
v10 VARCHAR(500), v11 VARCHAR(500), v12 VARCHAR(500),
|
||||
v13 VARCHAR(500), v14 VARCHAR(500), v15 VARCHAR(500),
|
||||
v16 VARCHAR(500), v17 VARCHAR(500), v18 VARCHAR(500)
|
||||
CREATE TABLE bug12547647(
|
||||
a INT NOT NULL, b BLOB NOT NULL, c TEXT,
|
||||
PRIMARY KEY (b(10), a), INDEX (c(767)), INDEX(b(767))
|
||||
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC;
|
||||
CREATE INDEX idx1 ON t1(a,v1);
|
||||
INSERT INTO t1 VALUES(9,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r,@r);
|
||||
UPDATE t1 SET a=1000;
|
||||
DELETE FROM t1;
|
||||
DROP TABLE t1;
|
||||
INSERT INTO bug12547647 VALUES (5,repeat('khdfo5AlOq',1900),repeat('g',7751));
|
||||
COMMIT;
|
||||
UPDATE bug12547647 SET c = REPEAT('b',16928);
|
||||
ERROR HY000: Undo log record is too big.
|
||||
DROP TABLE bug12547647;
|
||||
set global innodb_file_per_table=0;
|
||||
set global innodb_file_format=Antelope;
|
||||
set global innodb_file_format_max=Antelope;
|
||||
@ -1146,3 +1216,5 @@ SELECT SLEEP(10);
|
||||
SLEEP(10)
|
||||
0
|
||||
DROP TABLE t1_purge, t2_purge, t3_purge, t4_purge;
|
||||
DROP TABLE t12637786;
|
||||
DROP TABLE t12963823;
|
||||
|
@ -126,5 +126,4 @@ Warning 1265 Data truncated for column 'col79' at row 1
|
||||
Warning 1264 Out of range value for column 'col84' at row 1
|
||||
DROP TABLE bug52745;
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
SET GLOBAL innodb_file_format_max=Antelope;
|
||||
SET GLOBAL innodb_file_per_table=0;
|
||||
|
@ -12,5 +12,4 @@ Error 1118 Row size too large. The maximum row size for the used table type, not
|
||||
Error 1030 Got error 139 from storage engine
|
||||
DROP TABLE bug53591;
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
SET GLOBAL innodb_file_format_max=Antelope;
|
||||
SET GLOBAL innodb_file_per_table=0;
|
||||
|
18
mysql-test/suite/innodb/r/innodb_bug59733.result
Normal file
18
mysql-test/suite/innodb/r/innodb_bug59733.result
Normal file
@ -0,0 +1,18 @@
|
||||
CREATE TABLE bug59733(a INT AUTO_INCREMENT PRIMARY KEY,b CHAR(1))ENGINE=InnoDB;
|
||||
INSERT INTO bug59733 VALUES(0,'x');
|
||||
INSERT INTO bug59733 SELECT 0,b FROM bug59733;
|
||||
INSERT INTO bug59733 SELECT 0,b FROM bug59733;
|
||||
INSERT INTO bug59733 SELECT 0,b FROM bug59733;
|
||||
INSERT INTO bug59733 SELECT 0,b FROM bug59733;
|
||||
INSERT INTO bug59733 SELECT 0,b FROM bug59733;
|
||||
INSERT INTO bug59733 SELECT 0,b FROM bug59733;
|
||||
INSERT INTO bug59733 SELECT 0,b FROM bug59733;
|
||||
INSERT INTO bug59733 SELECT 0,b FROM bug59733;
|
||||
INSERT INTO bug59733 SELECT 0,b FROM bug59733;
|
||||
INSERT INTO bug59733 SELECT 0,b FROM bug59733;
|
||||
INSERT INTO bug59733 SELECT 0,b FROM bug59733;
|
||||
CREATE INDEX b ON bug59733 (b);
|
||||
DELETE FROM bug59733 WHERE (a%100)=0;
|
||||
DROP INDEX b ON bug59733;
|
||||
CREATE INDEX b ON bug59733 (b);
|
||||
DROP TABLE bug59733;
|
81
mysql-test/suite/innodb/r/innodb_corrupt_bit.result
Normal file
81
mysql-test/suite/innodb/r/innodb_corrupt_bit.result
Normal file
@ -0,0 +1,81 @@
|
||||
set names utf8;
|
||||
CREATE TABLE corrupt_bit_test_ā(
|
||||
a INT AUTO_INCREMENT PRIMARY KEY,
|
||||
b CHAR(100),
|
||||
c INT,
|
||||
z INT,
|
||||
INDEX(b))
|
||||
ENGINE=InnoDB;
|
||||
INSERT INTO corrupt_bit_test_ā VALUES(0,'x',1, 1);
|
||||
CREATE UNIQUE INDEX idxā ON corrupt_bit_test_ā(c, b);
|
||||
CREATE UNIQUE INDEX idxē ON corrupt_bit_test_ā(z, b);
|
||||
SELECT * FROM corrupt_bit_test_ā;
|
||||
a b c z
|
||||
1 x 1 1
|
||||
select @@unique_checks;
|
||||
@@unique_checks
|
||||
0
|
||||
select @@innodb_change_buffering_debug;
|
||||
@@innodb_change_buffering_debug
|
||||
1
|
||||
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+1,z+1 FROM corrupt_bit_test_ā;
|
||||
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+10,z+10 FROM corrupt_bit_test_ā;
|
||||
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+20,z+20 FROM corrupt_bit_test_ā;
|
||||
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+50,z+50 FROM corrupt_bit_test_ā;
|
||||
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+100,z+100 FROM corrupt_bit_test_ā;
|
||||
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+200,z+200 FROM corrupt_bit_test_ā;
|
||||
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+400,z+400 FROM corrupt_bit_test_ā;
|
||||
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+800,z+800 FROM corrupt_bit_test_ā;
|
||||
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+1600,z+1600 FROM corrupt_bit_test_ā;
|
||||
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+4000,z+4000 FROM corrupt_bit_test_ā;
|
||||
select count(*) from corrupt_bit_test_ā;
|
||||
count(*)
|
||||
1024
|
||||
CREATE INDEX idx3 ON corrupt_bit_test_ā(b, c);
|
||||
INSERT INTO corrupt_bit_test_ā VALUES(13000,'x',1,1);
|
||||
CREATE INDEX idx4 ON corrupt_bit_test_ā(b, z);
|
||||
check table corrupt_bit_test_ā;
|
||||
Table Op Msg_type Msg_text
|
||||
test.corrupt_bit_test_ā check Warning InnoDB: The B-tree of index "idxā" is corrupted.
|
||||
test.corrupt_bit_test_ā check Warning InnoDB: The B-tree of index "idxē" is corrupted.
|
||||
test.corrupt_bit_test_ā check error Corrupt
|
||||
select c from corrupt_bit_test_ā;
|
||||
ERROR HY000: Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it
|
||||
select z from corrupt_bit_test_ā;
|
||||
ERROR HY000: Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it
|
||||
show warnings;
|
||||
Level Code Message
|
||||
Warning 179 InnoDB: Index "idxē" for table "test"."corrupt_bit_test_ā" is marked as corrupted
|
||||
Error 1034 Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it
|
||||
insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001);
|
||||
select * from corrupt_bit_test_ā use index(primary) where a = 10001;
|
||||
a b c z
|
||||
10001 a 20001 20001
|
||||
begin;
|
||||
insert into corrupt_bit_test_ā values (10002, "a", 20002, 20002);
|
||||
delete from corrupt_bit_test_ā where a = 10001;
|
||||
insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001);
|
||||
rollback;
|
||||
drop index idxā on corrupt_bit_test_ā;
|
||||
check table corrupt_bit_test_ā;
|
||||
Table Op Msg_type Msg_text
|
||||
test.corrupt_bit_test_ā check Warning InnoDB: Index "idxē" is marked as corrupted
|
||||
test.corrupt_bit_test_ā check error Corrupt
|
||||
set names utf8;
|
||||
select z from corrupt_bit_test_ā;
|
||||
ERROR HY000: Incorrect key file for table 'corrupt_bit_test_ā'; try to repair it
|
||||
drop index idxē on corrupt_bit_test_ā;
|
||||
select z from corrupt_bit_test_ā limit 10;
|
||||
z
|
||||
20001
|
||||
1
|
||||
1
|
||||
2
|
||||
11
|
||||
12
|
||||
21
|
||||
22
|
||||
31
|
||||
32
|
||||
drop table corrupt_bit_test_ā;
|
||||
SET GLOBAL innodb_change_buffering_debug = 0;
|
@ -47,4 +47,3 @@ set global innodb_file_format_max=antelope;
|
||||
set global innodb_file_format_check=off;
|
||||
ERROR HY000: Variable 'innodb_file_format_check' is a read only variable
|
||||
SET GLOBAL innodb_file_format=Antelope;
|
||||
SET GLOBAL innodb_file_format_max=Antelope;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user