merge from 5.1 main
This commit is contained in:
commit
cf6aeea48c
@ -1,4 +1,4 @@
|
||||
[MYSQL]
|
||||
post_commit_to = "commits@lists.mysql.com"
|
||||
post_push_to = "commits@lists.mysql.com"
|
||||
tree_name = "mysql-5.1-mtr"
|
||||
tree_name = "mysql-5.1"
|
||||
|
@ -47,6 +47,10 @@ SET(WITH_MYISAMMRG_STORAGE_ENGINE TRUE)
|
||||
ADD_DEFINITIONS(-DWITH_MYISAMMRG_STORAGE_ENGINE)
|
||||
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_myisammrg_plugin")
|
||||
|
||||
IF(WITH_COMMUNITY_FEATURES)
|
||||
ADD_DEFINITIONS(-DENABLED_PROFILING -DCOMMUNITY_SERVER)
|
||||
ENDIF(WITH_COMMUNITY_FEATURES)
|
||||
|
||||
IF(WITH_ARCHIVE_STORAGE_ENGINE)
|
||||
ADD_DEFINITIONS(-DWITH_ARCHIVE_STORAGE_ENGINE)
|
||||
SET (mysql_plugin_defs "${mysql_plugin_defs},builtin_archive_plugin")
|
||||
|
@ -143,7 +143,8 @@ static my_bool ignore_errors=0,wait_flag=0,quick=0,
|
||||
tty_password= 0, opt_nobeep=0, opt_reconnect=1,
|
||||
default_charset_used= 0, opt_secure_auth= 0,
|
||||
default_pager_set= 0, opt_sigint_ignore= 0,
|
||||
show_warnings= 0, executing_query= 0, interrupted_query= 0;
|
||||
show_warnings= 0, executing_query= 0, interrupted_query= 0,
|
||||
ignore_spaces= 0;
|
||||
static my_bool debug_info_flag, debug_check_flag;
|
||||
static my_bool column_types_flag;
|
||||
static my_bool preserve_comments= 0;
|
||||
@ -1183,7 +1184,12 @@ int main(int argc,char *argv[])
|
||||
histfile= 0;
|
||||
}
|
||||
}
|
||||
if (histfile)
|
||||
|
||||
/* We used to suggest setting MYSQL_HISTFILE=/dev/null. */
|
||||
if (histfile && strncmp(histfile, "/dev/null", 10) == 0)
|
||||
histfile= NULL;
|
||||
|
||||
if (histfile && histfile[0])
|
||||
{
|
||||
if (verbose)
|
||||
tee_fprintf(stdout, "Reading history-file %s\n",histfile);
|
||||
@ -1218,7 +1224,8 @@ sig_handler mysql_end(int sig)
|
||||
{
|
||||
mysql_close(&mysql);
|
||||
#ifdef HAVE_READLINE
|
||||
if (!status.batch && !quick && !opt_html && !opt_xml && histfile)
|
||||
if (!status.batch && !quick && !opt_html && !opt_xml &&
|
||||
histfile && histfile[0])
|
||||
{
|
||||
/* write-history */
|
||||
if (verbose)
|
||||
@ -1345,7 +1352,7 @@ static struct my_option my_long_options[] =
|
||||
{"debug", '#', "Output debug log", (uchar**) &default_dbug_option,
|
||||
(uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .",
|
||||
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit.",
|
||||
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"debug-info", 'T', "Print some debug info at exit.", (uchar**) &debug_info_flag,
|
||||
@ -1372,8 +1379,9 @@ static struct my_option my_long_options[] =
|
||||
{"no-named-commands", 'g',
|
||||
"Named commands are disabled. Use \\* form only, or use named commands only in the beginning of a line ending with a semicolon (;) Since version 10.9 the client now starts with this option ENABLED by default! Disable with '-G'. Long format commands still work from the first line. WARNING: option deprecated; use --disable-named-commands instead.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"ignore-spaces", 'i', "Ignore space after function names.", 0, 0, 0,
|
||||
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"ignore-spaces", 'i', "Ignore space after function names.",
|
||||
(uchar**) &ignore_spaces, (uchar**) &ignore_spaces, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
{"local-infile", OPT_LOCAL_INFILE, "Enable/disable LOAD DATA LOCAL INFILE.",
|
||||
(uchar**) &opt_local_infile,
|
||||
(uchar**) &opt_local_infile, 0, GET_BOOL, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -1794,6 +1802,10 @@ static int get_options(int argc, char **argv)
|
||||
my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO;
|
||||
if (debug_check_flag)
|
||||
my_end_arg= MY_CHECK_ERROR;
|
||||
|
||||
if (ignore_spaces)
|
||||
connect_flag|= CLIENT_IGNORE_SPACE;
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@ -3381,9 +3393,12 @@ print_table_data_html(MYSQL_RES *result)
|
||||
{
|
||||
while((field = mysql_fetch_field(result)))
|
||||
{
|
||||
tee_fprintf(PAGER, "<TH>%s</TH>", (field->name ?
|
||||
(field->name[0] ? field->name :
|
||||
" ") : "NULL"));
|
||||
tee_fputs("<TH>", PAGER);
|
||||
if (field->name && field->name[0])
|
||||
xmlencode_print(field->name, field->name_length);
|
||||
else
|
||||
tee_fputs(field->name ? " " : "NULL", PAGER);
|
||||
tee_fputs("</TH>", PAGER);
|
||||
}
|
||||
(void) tee_fputs("</TR>", PAGER);
|
||||
}
|
||||
@ -3396,7 +3411,7 @@ print_table_data_html(MYSQL_RES *result)
|
||||
for (uint i=0; i < mysql_num_fields(result); i++)
|
||||
{
|
||||
(void) tee_fputs("<TD>", PAGER);
|
||||
safe_put_field(cur[i],lengths[i]);
|
||||
xmlencode_print(cur[i], lengths[i]);
|
||||
(void) tee_fputs("</TD>", PAGER);
|
||||
}
|
||||
(void) tee_fputs("</TR>", PAGER);
|
||||
|
@ -115,11 +115,11 @@ static struct my_option my_long_options[]=
|
||||
#endif
|
||||
{"socket", 'S', "Socket file to use for connection.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
{"tmpdir", 't', "Directory for temporary files",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"user", 'u', "User for login if not current user.", (uchar**) &opt_user,
|
||||
(uchar**) &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include <sslopt-longopts.h>
|
||||
{"verbose", 'v', "Display more output about the process",
|
||||
(uchar**) &opt_verbose, (uchar**) &opt_verbose, 0,
|
||||
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
@ -231,6 +231,8 @@ get_one_option(int optid, const struct my_option *opt,
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
if (argument == disabled_my_option)
|
||||
argument= (char*) ""; // Don't require password
|
||||
tty_password= 1;
|
||||
add_option= FALSE;
|
||||
if (argument)
|
||||
|
@ -232,6 +232,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
opt_count_iterations= 1;
|
||||
break;
|
||||
case 'p':
|
||||
if (argument == disabled_my_option)
|
||||
argument= (char*) ""; // Don't require password
|
||||
if (argument)
|
||||
{
|
||||
char *start=argument;
|
||||
@ -677,10 +679,16 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
||||
pos=argv[1];
|
||||
for (;;)
|
||||
{
|
||||
if (mysql_kill(mysql,(ulong) atol(pos)))
|
||||
/* We don't use mysql_kill(), since it only handles 32-bit IDs. */
|
||||
char buff[26], *out; /* "KILL " + max 20 digs + NUL */
|
||||
out= strxmov(buff, "KILL ", NullS);
|
||||
ullstr(strtoull(pos, NULL, 0), out);
|
||||
|
||||
if (mysql_query(mysql, buff))
|
||||
{
|
||||
my_printf_error(0, "kill failed on %ld; error: '%s'", error_flags,
|
||||
atol(pos), mysql_error(mysql));
|
||||
/* out still points to just the number */
|
||||
my_printf_error(0, "kill failed on %s; error: '%s'", error_flags,
|
||||
out, mysql_error(mysql));
|
||||
error=1;
|
||||
}
|
||||
if (!(pos=strchr(pos,',')))
|
||||
|
@ -1226,6 +1226,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
one_database = 1;
|
||||
break;
|
||||
case 'p':
|
||||
if (argument == disabled_my_option)
|
||||
argument= (char*) ""; // Don't require password
|
||||
if (argument)
|
||||
{
|
||||
my_free(pass,MYF(MY_ALLOW_ZERO_PTR));
|
||||
@ -1529,8 +1531,7 @@ static Exit_status dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
|
||||
If reading from a remote host, ensure the temp_buf for the
|
||||
Log_event class is pointing to the incoming stream.
|
||||
*/
|
||||
if (remote_opt)
|
||||
ev->register_temp_buf((char*) net->read_pos + 1);
|
||||
ev->register_temp_buf((char *) net->read_pos + 1);
|
||||
|
||||
Log_event_type type= ev->get_type_code();
|
||||
if (glob_description_event->binlog_version >= 3 ||
|
||||
|
@ -286,6 +286,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
what_to_do= DO_UPGRADE;
|
||||
break;
|
||||
case 'p':
|
||||
if (argument == disabled_my_option)
|
||||
argument= (char*) ""; // Don't require password
|
||||
if (argument)
|
||||
{
|
||||
char *start = argument;
|
||||
|
@ -221,7 +221,7 @@ static struct my_option my_long_options[] =
|
||||
(uchar**) &opt_compatible_mode_str, (uchar**) &opt_compatible_mode_str, 0,
|
||||
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"compact", OPT_COMPACT,
|
||||
"Give less verbose output (useful for debugging). Disables structure comments and header/footer constructs. Enables options --skip-add-drop-table --no-set-names --skip-disable-keys --skip-add-locks",
|
||||
"Give less verbose output (useful for debugging). Disables structure comments and header/footer constructs. Enables options --skip-add-drop-table --skip-add-locks --skip-comments --skip-disable-keys --skip-set-charset",
|
||||
(uchar**) &opt_compact, (uchar**) &opt_compact, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"complete-insert", 'c', "Use complete insert statements.",
|
||||
@ -702,6 +702,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
break;
|
||||
#endif
|
||||
case 'p':
|
||||
if (argument == disabled_my_option)
|
||||
argument= (char*) ""; // Don't require password
|
||||
if (argument)
|
||||
{
|
||||
char *start=argument;
|
||||
|
@ -221,6 +221,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
break;
|
||||
#endif
|
||||
case 'p':
|
||||
if (argument == disabled_my_option)
|
||||
argument= (char*) ""; // Don't require password
|
||||
if (argument)
|
||||
{
|
||||
char *start=argument;
|
||||
|
@ -281,6 +281,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
opt_verbose++;
|
||||
break;
|
||||
case 'p':
|
||||
if (argument == disabled_my_option)
|
||||
argument= (char*) ""; // Don't require password
|
||||
if (argument)
|
||||
{
|
||||
char *start=argument;
|
||||
|
@ -712,6 +712,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
verbose++;
|
||||
break;
|
||||
case 'p':
|
||||
if (argument == disabled_my_option)
|
||||
argument= (char*) ""; // Don't require password
|
||||
if (argument)
|
||||
{
|
||||
char *start= argument;
|
||||
|
@ -5716,11 +5716,11 @@ static struct my_option my_long_options[] =
|
||||
{"sp-protocol", OPT_SP_PROTOCOL, "Use stored procedures for select",
|
||||
(uchar**) &sp_protocol, (uchar**) &sp_protocol, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#include "sslopt-longopts.h"
|
||||
{"tail-lines", OPT_TAIL_LINES,
|
||||
"Number of lines of the resul to include in a failure report",
|
||||
(uchar**) &opt_tail_lines, (uchar**) &opt_tail_lines, 0,
|
||||
GET_INT, REQUIRED_ARG, 0, 0, 10000, 0, 0, 0},
|
||||
#include "sslopt-longopts.h"
|
||||
{"test-file", 'x', "Read test from/in this file (default stdin).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"timer-file", 'm', "File where the timing in micro seconds is stored.",
|
||||
@ -5854,6 +5854,8 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
break;
|
||||
}
|
||||
case 'p':
|
||||
if (argument == disabled_my_option)
|
||||
argument= (char*) ""; // Don't require password
|
||||
if (argument)
|
||||
{
|
||||
my_free(opt_pass, MYF(MY_ALLOW_ZERO_PTR));
|
||||
|
@ -224,7 +224,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
else if (verbose)
|
||||
{
|
||||
printf("file %s= %llu bytes (%lu pages)...\n", argv[1], size, pages);
|
||||
printf("file %s = %llu bytes (%lu pages)...\n", argv[optind], size, pages);
|
||||
printf("checking pages in range %lu to %lu\n", start_page, use_end_page ? end_page : (pages - 1));
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ static void usage(void)
|
||||
{
|
||||
print_version();
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
|
||||
printf("Print a description for a system error code or an error code from\na MyISAM/ISAM/BDB table handler.\n");
|
||||
printf("Print a description for a system error code or a MySQL error code.\n");
|
||||
printf("If you want to get the error for a negative error code, you should use\n-- before the first error code to tell perror that there was no more options.\n\n");
|
||||
printf("Usage: %s [OPTIONS] [ERRORCODE [ERRORCODE...]]\n",my_progname);
|
||||
my_print_help(my_long_options);
|
||||
|
@ -404,7 +404,8 @@ typedef struct st_mi_check_param
|
||||
my_off_t keydata,totaldata,key_blocks,start_check_pos;
|
||||
ha_rows total_records,total_deleted;
|
||||
ha_checksum record_checksum,glob_crc;
|
||||
ulong use_buffers,read_buffer_length,write_buffer_length,
|
||||
ulonglong use_buffers;
|
||||
ulong read_buffer_length,write_buffer_length,
|
||||
sort_buffer_length,sort_key_blocks;
|
||||
uint out_flag,warning_printed,error_printed,verbose;
|
||||
uint opt_sort_key,total_files,max_level;
|
||||
|
@ -659,11 +659,16 @@ drop table t1;
|
||||
connection thread1;
|
||||
select * from t1;
|
||||
|
||||
--echo ** Cleanup
|
||||
connection thread1;
|
||||
disconnect thread1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
--echo ** connection thread2
|
||||
connection thread2;
|
||||
disconnect thread2;
|
||||
--source include/wait_until_disconnected.inc
|
||||
--echo ** connection default
|
||||
connection default;
|
||||
drop table t1;
|
||||
drop user mysqltest@localhost;
|
||||
|
||||
disconnect thread1;
|
||||
disconnect thread2;
|
||||
|
||||
|
@ -171,15 +171,30 @@ show status like "Qcache_not_cached";
|
||||
|
||||
# Cleanup
|
||||
|
||||
--echo ----- switch to connection default and close connections -----
|
||||
connection default;
|
||||
--echo ----- close connections -----
|
||||
connection root;
|
||||
disconnect root;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection root2;
|
||||
disconnect root2;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection user1;
|
||||
disconnect user1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection user2;
|
||||
disconnect user2;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection user3;
|
||||
disconnect user3;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection user4;
|
||||
disconnect user4;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection unkuser;
|
||||
disconnect unkuser;
|
||||
--source include/wait_until_disconnected.inc
|
||||
--echo ----- switch to connection default -----
|
||||
connection default;
|
||||
|
||||
#
|
||||
# A temporary 4.1 workaround to make this test pass if
|
||||
|
@ -719,6 +719,7 @@ connection con1;
|
||||
--reap
|
||||
drop table t1;
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
|
||||
#
|
||||
|
@ -1162,6 +1162,15 @@ ROLLBACK;
|
||||
--error 1305
|
||||
ROLLBACK TO SAVEPOINT s4;
|
||||
|
||||
#
|
||||
# Bug#39793 Foreign keys not constructed when column has a '#' in a comment or default value
|
||||
#
|
||||
|
||||
#This statement should be written on a single line for proper testing
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY COMMENT 'My ID#', f2 INTEGER DEFAULT NULL, f3 CHAR(10) DEFAULT 'My ID#', CONSTRAINT f2_ref FOREIGN KEY (f2) REFERENCES t1 (f1)) ENGINE=INNODB;
|
||||
SHOW CREATE TABLE t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
# Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY
|
||||
@ -1535,4 +1544,31 @@ SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
eval
|
||||
CREATE TABLE t1 (c1 REAL, c2 REAL, c3 REAL, KEY (c3), KEY (c2, c3))
|
||||
ENGINE=$engine_type;
|
||||
INSERT INTO t1 VALUES (1,1,1), (1,1,1), (1,1,2), (1,1,1), (1,1,2);
|
||||
|
||||
SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
|
||||
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
|
||||
EXPLAIN
|
||||
SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
|
||||
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
eval
|
||||
CREATE TABLE t1 (c1 DECIMAL(12,2), c2 DECIMAL(12,2), c3 DECIMAL(12,2),
|
||||
KEY (c3), KEY (c2, c3))
|
||||
ENGINE=$engine_type;
|
||||
INSERT INTO t1 VALUES (1,1,1), (1,1,1), (1,1,2), (1,1,1), (1,1,2);
|
||||
|
||||
SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
|
||||
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
|
||||
EXPLAIN
|
||||
SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
|
||||
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
50
mysql-test/include/mysqldump.inc
Normal file
50
mysql-test/include/mysqldump.inc
Normal file
@ -0,0 +1,50 @@
|
||||
################################################################################
|
||||
# mysqldump.inc
|
||||
#
|
||||
# SUMMARY: include file to facilitate testing the quality of mysqldump output
|
||||
#
|
||||
# INPUTS: Two variables:
|
||||
# $table_name - the name of the table that was dumped
|
||||
# $mysqldumpfile - the name of the file that captured mysqldump output
|
||||
#
|
||||
# OUTPUTS: minor echo data:
|
||||
# We 'echo' some stage information to the .result file:
|
||||
# 'altering original table', 'restoring from dumpfile', 'comparing'
|
||||
#
|
||||
# OTHER FILES: We use include/diff_tables.inc to compare the original, renamed
|
||||
# table with the 'restored' one.
|
||||
#
|
||||
# DESCRIPTION: This file works by being fed the name of the original table
|
||||
# and a mysqldump output file. The original table is then renamed
|
||||
# to <table_name>_orig, the mysqldump file is used to recreate the
|
||||
# table, then diff_tables.inc is called to compare them.
|
||||
#
|
||||
# LIMITATIONS: Does *NOT* work with xml output!
|
||||
#
|
||||
# AUTHOR: pcrews 2009-05-21
|
||||
# Bug#40465 mysqldump.test does no checking of dump or restore
|
||||
#
|
||||
# LAST CHANGE: 2009-05-21
|
||||
#
|
||||
################################################################################
|
||||
|
||||
--echo # Begin testing mysqldump output + restore
|
||||
--echo # Create 'original table name - <table>_orig
|
||||
# NOTE: We use SET then let as query_get_value has issues with the extra commas
|
||||
# used in the CONCAT statement.
|
||||
eval SET @orig_table_name = CONCAT('$table_name', '_orig');
|
||||
let $orig_table_name = query_get_value(SELECT @orig_table_name,@orig_table_name,1);
|
||||
--echo # Rename original table
|
||||
eval ALTER TABLE $table_name RENAME to $orig_table_name;
|
||||
--echo # Recreate table from mysqldump output
|
||||
--exec $MYSQL test < $mysqldumpfile
|
||||
--echo # Compare original and recreated tables
|
||||
--echo # Recreated table: $table_name
|
||||
--echo # Original table: $orig_table_name
|
||||
let $diff_table_1 = $table_name;
|
||||
let $diff_table_2 = $orig_table_name;
|
||||
--source include/diff_tables.inc
|
||||
--echo # Cleanup
|
||||
--remove_file $mysqldumpfile
|
||||
eval DROP TABLE $table_name, $orig_table_name;
|
||||
|
@ -177,6 +177,7 @@ show status like "Qcache_hits";
|
||||
|
||||
# Final cleanup
|
||||
eval set GLOBAL query_cache_size=$save_query_cache_size;
|
||||
disconnect connection1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
drop table t2;
|
||||
disconnect connection1;
|
||||
|
@ -898,7 +898,8 @@ sub collect_one_test_case {
|
||||
if ( $tinfo->{'innodb_test'} )
|
||||
{
|
||||
# This is a test that need innodb
|
||||
if ( $::mysqld_variables{'innodb'} ne "TRUE" )
|
||||
if ( $::mysqld_variables{'innodb'} eq "OFF" ||
|
||||
! exists $::mysqld_variables{'innodb'} )
|
||||
{
|
||||
# innodb is not supported, skip it
|
||||
$tinfo->{'skip'}= 1;
|
||||
|
@ -439,3 +439,16 @@ HOUR(NULL) MINUTE(NULL) SECOND(NULL)
|
||||
NULL NULL NULL
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
#
|
||||
# Bug #44766: valgrind error when using convert() in a subquery
|
||||
#
|
||||
CREATE TABLE t1(a tinyint);
|
||||
INSERT INTO t1 VALUES (127);
|
||||
SELECT 1 FROM
|
||||
(
|
||||
SELECT CONVERT(t2.a USING UTF8) FROM t1, t1 t2 LIMIT 1
|
||||
) AS s LIMIT 1;
|
||||
1
|
||||
1
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -785,6 +785,8 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 22 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** Cleanup
|
||||
** connection thread2
|
||||
** connection default
|
||||
drop table t1;
|
||||
drop user mysqltest@localhost;
|
||||
|
@ -781,6 +781,8 @@ eta tipo c
|
||||
70 1 iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
|
||||
80 1 jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj
|
||||
90 11 kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
|
||||
** Cleanup
|
||||
** connection thread2
|
||||
** connection default
|
||||
drop table t1;
|
||||
drop user mysqltest@localhost;
|
||||
|
@ -1,6 +1,9 @@
|
||||
DROP TABLE IF EXISTS t1;
|
||||
# Establish connection con1 (user=root)
|
||||
# Establish connection con2 (user=root)
|
||||
### Test 1:
|
||||
### - While a consistent snapshot transaction is executed,
|
||||
### no external inserts should be visible to the transaction.
|
||||
# Switch to connection con1
|
||||
CREATE TABLE t1 (a INT) ENGINE=innodb;
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
@ -10,6 +13,9 @@ INSERT INTO t1 VALUES(1);
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
COMMIT;
|
||||
### Test 2:
|
||||
### - For any non-consistent snapshot transaction, external
|
||||
### committed inserts should be visible to the transaction.
|
||||
DELETE FROM t1;
|
||||
START TRANSACTION;
|
||||
# Switch to connection con2
|
||||
@ -19,5 +25,18 @@ SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
COMMIT;
|
||||
### Test 3:
|
||||
### - Bug#44664: valgrind warning for COMMIT_AND_CHAIN and ROLLBACK_AND_CHAIN
|
||||
### Chaining a transaction does not retain consistency level.
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
DELETE FROM t1;
|
||||
COMMIT WORK AND CHAIN;
|
||||
# Switch to connection con2
|
||||
INSERT INTO t1 VALUES(1);
|
||||
# Switch to connection con1
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
COMMIT;
|
||||
# Switch to connection default + close connections con1 and con2
|
||||
DROP TABLE t1;
|
||||
|
@ -46,4 +46,12 @@ master-bin.000001 1137 Query 1 1216 use `test`; DROP TABLE t4
|
||||
End of 5.0 tests
|
||||
SHOW BINLOG EVENTS FROM 364;
|
||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Wrong offset or I/O error
|
||||
Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment.
|
||||
CREATE TABLE t1 (a varchar(16)) character set cp932;
|
||||
INSERT INTO t1 VALUES (0x8372835E),(0x8352835E);
|
||||
SELECT hex(a), hex(lower(a)), hex(upper(a)) FROM t1 ORDER BY binary(a);
|
||||
hex(a) hex(lower(a)) hex(upper(a))
|
||||
8352835E 8352835E 8352835E
|
||||
8372835E 8372835E 8372835E
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -209,3 +209,13 @@ SET NAMES sjis;
|
||||
SELECT HEX('佐淘 圭') FROM DUAL;
|
||||
HEX('佐淘 圭')
|
||||
8DB2939181408C5C
|
||||
# Start of 5.1 tests
|
||||
Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment.
|
||||
CREATE TABLE t1 (a varchar(16)) character set sjis;
|
||||
INSERT INTO t1 VALUES (0x8372835E),(0x8352835E);
|
||||
SELECT hex(a), hex(lower(a)), hex(upper(a)) FROM t1 ORDER BY binary(a);
|
||||
hex(a) hex(lower(a)) hex(upper(a))
|
||||
8352835E 8352835E 8352835E
|
||||
8372835E 8372835E 8372835E
|
||||
DROP TABLE t1;
|
||||
# End of 5.1 tests
|
||||
|
@ -2829,7 +2829,11 @@ t2 CREATE TABLE `t2` (
|
||||
`col1` varchar(10) COLLATE cp1251_general_cs DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_general_cs
|
||||
|
||||
---> connection: con2
|
||||
|
||||
---> connection: con3
|
||||
|
||||
---> connection: default
|
||||
use test|
|
||||
DROP DATABASE mysqltest1|
|
||||
DROP DATABASE mysqltest2|
|
||||
USE test;
|
||||
DROP DATABASE mysqltest1;
|
||||
DROP DATABASE mysqltest2;
|
||||
|
@ -2829,7 +2829,11 @@ t2 CREATE TABLE `t2` (
|
||||
`col1` varchar(10) COLLATE cp1251_general_cs DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=cp1251 COLLATE=cp1251_general_cs
|
||||
|
||||
---> connection: con2
|
||||
|
||||
---> connection: con3
|
||||
|
||||
---> connection: default
|
||||
use test|
|
||||
DROP DATABASE mysqltest1|
|
||||
DROP DATABASE mysqltest2|
|
||||
USE test;
|
||||
DROP DATABASE mysqltest1;
|
||||
DROP DATABASE mysqltest2;
|
||||
|
@ -629,21 +629,21 @@ SELECT DISTINCT @v5:= fruit_id, @v6:= fruit_name INTO @v7, @v8 FROM t1 WHERE
|
||||
fruit_name = 'APPLE';
|
||||
SELECT @v5, @v6, @v7, @v8;
|
||||
@v5 @v6 @v7 @v8
|
||||
3 PEAR 3 PEAR
|
||||
2 APPLE 2 APPLE
|
||||
SELECT DISTINCT @v5 + fruit_id, CONCAT(@v6, fruit_name) INTO @v9, @v10 FROM t1
|
||||
WHERE fruit_name = 'APPLE';
|
||||
SELECT @v5, @v6, @v7, @v8, @v9, @v10;
|
||||
@v5 @v6 @v7 @v8 @v9 @v10
|
||||
3 PEAR 3 PEAR 5 PEARAPPLE
|
||||
2 APPLE 2 APPLE 4 APPLEAPPLE
|
||||
SELECT DISTINCT @v11:= @v5 + fruit_id, @v12:= CONCAT(@v6, fruit_name) INTO
|
||||
@v13, @v14 FROM t1 WHERE fruit_name = 'APPLE';
|
||||
SELECT @v11, @v12, @v13, @v14;
|
||||
@v11 @v12 @v13 @v14
|
||||
6 PEARPEAR 6 PEARPEAR
|
||||
4 APPLEAPPLE 4 APPLEAPPLE
|
||||
SELECT DISTINCT @v13, @v14 INTO @v15, @v16 FROM t1 WHERE fruit_name = 'APPLE';
|
||||
SELECT @v15, @v16;
|
||||
@v15 @v16
|
||||
6 PEARPEAR
|
||||
4 APPLEAPPLE
|
||||
SELECT DISTINCT 2 + 2, 'Bob' INTO @v17, @v18 FROM t1 WHERE fruit_name =
|
||||
'APPLE';
|
||||
SELECT @v17, @v18;
|
||||
|
@ -63,3 +63,4 @@ DROP TABLE fill_it1;
|
||||
DROP TABLE fill_it2;
|
||||
DROP TABLE fill_it3;
|
||||
DROP DATABASE events_test;
|
||||
SET GLOBAL event_scheduler=off;
|
||||
|
@ -117,4 +117,13 @@ Warnings:
|
||||
Error 1259 ZLIB: Input data corrupted
|
||||
Error 1259 ZLIB: Input data corrupted
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (c1 INT);
|
||||
INSERT INTO t1 VALUES (1), (1111), (11111);
|
||||
SELECT UNCOMPRESS(c1), UNCOMPRESSED_LENGTH(c1) FROM t1;
|
||||
UNCOMPRESS(c1) UNCOMPRESSED_LENGTH(c1)
|
||||
NULL NULL
|
||||
NULL NULL
|
||||
NULL 825307441
|
||||
EXPLAIN EXTENDED SELECT * FROM (SELECT UNCOMPRESSED_LENGTH(c1) FROM t1) AS s;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
|
@ -89,3 +89,34 @@ c1 c2
|
||||
First
|
||||
DROP TABLE t1;
|
||||
# End of 5.0 tests
|
||||
#
|
||||
# Bug #44743: Join in combination with concat does not always work
|
||||
#
|
||||
CREATE TABLE t1 (
|
||||
a VARCHAR(100) NOT NULL DEFAULT '0',
|
||||
b VARCHAR(2) NOT NULL DEFAULT '',
|
||||
c VARCHAR(2) NOT NULL DEFAULT '',
|
||||
d TEXT NOT NULL,
|
||||
PRIMARY KEY (a, b, c),
|
||||
KEY (a)
|
||||
) DEFAULT CHARSET=utf8;
|
||||
INSERT INTO t1 VALUES ('gui_A', 'a', 'b', 'str1'),
|
||||
('gui_AB', 'a', 'b', 'str2'), ('gui_ABC', 'a', 'b', 'str3');
|
||||
CREATE TABLE t2 (
|
||||
a VARCHAR(100) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (a)
|
||||
) DEFAULT CHARSET=latin1;
|
||||
INSERT INTO t2 VALUES ('A'), ('AB'), ('ABC');
|
||||
SELECT CONCAT('gui_', t2.a), t1.d FROM t2
|
||||
LEFT JOIN t1 ON t1.a = CONCAT('gui_', t2.a) AND t1.b = 'a' AND t1.c = 'b';
|
||||
CONCAT('gui_', t2.a) d
|
||||
gui_A str1
|
||||
gui_AB str2
|
||||
gui_ABC str3
|
||||
EXPLAIN SELECT CONCAT('gui_', t2.a), t1.d FROM t2
|
||||
LEFT JOIN t1 ON t1.a = CONCAT('gui_', t2.a) AND t1.b = 'a' AND t1.c = 'b';
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 index NULL PRIMARY 102 NULL 3 Using index
|
||||
1 SIMPLE t1 eq_ref PRIMARY,a PRIMARY 318 func,const,const 1
|
||||
DROP TABLE t1, t2;
|
||||
# End of 5.1 tests
|
||||
|
@ -587,4 +587,25 @@ SELECT CASE c1 WHEN c1 + 1 THEN 1 END, ABS(AVG(c0)) FROM t1;
|
||||
CASE c1 WHEN c1 + 1 THEN 1 END ABS(AVG(c0))
|
||||
NULL 1.0000
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1(a TEXT, b INT, c INT UNSIGNED, d DECIMAL(12,2), e REAL);
|
||||
INSERT INTO t1 VALUES('iynfj', 1, 1, 1, 1);
|
||||
INSERT INTO t1 VALUES('innfj', 2, 2, 2, 2);
|
||||
SELECT SUM( DISTINCT a ) FROM t1 GROUP BY a HAVING a IN ( AVG( 1 ), 1 + a);
|
||||
SUM( DISTINCT a )
|
||||
SELECT SUM( DISTINCT b ) FROM t1 GROUP BY b HAVING b IN ( AVG( 1 ), 1 + b);
|
||||
SUM( DISTINCT b )
|
||||
1
|
||||
SELECT SUM( DISTINCT c ) FROM t1 GROUP BY c HAVING c IN ( AVG( 1 ), 1 + c);
|
||||
SUM( DISTINCT c )
|
||||
1
|
||||
SELECT SUM( DISTINCT d ) FROM t1 GROUP BY d HAVING d IN ( AVG( 1 ), 1 + d);
|
||||
SUM( DISTINCT d )
|
||||
1.00
|
||||
SELECT SUM( DISTINCT e ) FROM t1 GROUP BY e HAVING e IN ( AVG( 1 ), 1 + e);
|
||||
SUM( DISTINCT e )
|
||||
1
|
||||
SELECT SUM( DISTINCT e ) FROM t1 GROUP BY b,c,d HAVING (b,c,d) IN
|
||||
((AVG( 1 ), 1 + c, 1 + d), (AVG( 1 ), 2 + c, 2 + d));
|
||||
SUM( DISTINCT e )
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -456,4 +456,23 @@ NULL
|
||||
SELECT POW(10, 309);
|
||||
POW(10, 309)
|
||||
NULL
|
||||
#
|
||||
# Bug #44768: SIGFPE crash when selecting rand from a view
|
||||
# containing null
|
||||
#
|
||||
CREATE OR REPLACE VIEW v1 AS SELECT NULL AS a;
|
||||
SELECT RAND(a) FROM v1;
|
||||
RAND(a)
|
||||
0.155220427694936
|
||||
DROP VIEW v1;
|
||||
SELECT RAND(a) FROM (SELECT NULL AS a) b;
|
||||
RAND(a)
|
||||
0.155220427694936
|
||||
CREATE TABLE t1 (i INT);
|
||||
INSERT INTO t1 VALUES (NULL);
|
||||
SELECT RAND(i) FROM t1;
|
||||
RAND(i)
|
||||
0.155220427694936
|
||||
DROP TABLE t1;
|
||||
#
|
||||
End of 5.1 tests
|
||||
|
@ -2525,6 +2525,15 @@ SELECT DATE_FORMAT(c, GET_FORMAT(DATE, 'eur')) h, CONCAT(UPPER(aa),', ', aa) i F
|
||||
h i
|
||||
31.12.2008 AAAAAA, aaaaaa
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# BUG#44774: load_file function produces valgrind warnings
|
||||
#
|
||||
CREATE TABLE t1 (a TINYBLOB);
|
||||
INSERT INTO t1 VALUES ('aaaaaaaa');
|
||||
SELECT LOAD_FILE(a) FROM t1;
|
||||
LOAD_FILE(a)
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
drop table if exists t1;
|
||||
create table t1(f1 tinyint default null)engine=myisam;
|
||||
|
@ -206,7 +206,8 @@ Qcache_hits 8
|
||||
show status like "Qcache_not_cached";
|
||||
Variable_name Value
|
||||
Qcache_not_cached 8
|
||||
----- switch to connection default and close connections -----
|
||||
----- close connections -----
|
||||
----- switch to connection default -----
|
||||
set names binary;
|
||||
delete from mysql.user where user in ("mysqltest_1","mysqltest_2","mysqltest_3");
|
||||
delete from mysql.db where user in ("mysqltest_1","mysqltest_2","mysqltest_3");
|
||||
|
@ -206,7 +206,8 @@ Qcache_hits 8
|
||||
show status like "Qcache_not_cached";
|
||||
Variable_name Value
|
||||
Qcache_not_cached 5
|
||||
----- switch to connection default and close connections -----
|
||||
----- close connections -----
|
||||
----- switch to connection default -----
|
||||
set names binary;
|
||||
delete from mysql.user where user in ("mysqltest_1","mysqltest_2","mysqltest_3");
|
||||
delete from mysql.db where user in ("mysqltest_1","mysqltest_2","mysqltest_3");
|
||||
|
@ -336,4 +336,11 @@ a b
|
||||
NULL NULL
|
||||
NULL 1
|
||||
drop table t1;
|
||||
#
|
||||
# bug#39918 - memory (heap) engine crashing while executing self join with delete
|
||||
#
|
||||
CREATE TABLE t1(a INT, KEY USING BTREE (a)) ENGINE=MEMORY;
|
||||
INSERT INTO t1 VALUES(1),(1);
|
||||
DELETE a1 FROM t1 AS a1, t1 AS a2 WHERE a1.a=a2.a;
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
|
@ -61,7 +61,7 @@ begin
|
||||
select table_name from information_schema.key_column_usage
|
||||
order by table_name;
|
||||
end|
|
||||
create table t1
|
||||
create table t1
|
||||
(f1 int(10) unsigned not null,
|
||||
f2 varchar(100) not null,
|
||||
primary key (f1), unique key (f2));
|
||||
@ -203,15 +203,15 @@ View Create View character_set_client collation_connection
|
||||
v2 CREATE ALGORITHM=UNDEFINED DEFINER=`testdb_2`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select `v1`.`f1` AS `f1` from `testdb_1`.`v1` latin1 latin1_swedish_ci
|
||||
show create view testdb_1.v1;
|
||||
ERROR 42000: SHOW VIEW command denied to user 'testdb_2'@'localhost' for table 'v1'
|
||||
select table_name from information_schema.columns a
|
||||
select table_name from information_schema.columns a
|
||||
where a.table_name = 'v2';
|
||||
table_name
|
||||
v2
|
||||
select view_definition from information_schema.views a
|
||||
select view_definition from information_schema.views a
|
||||
where a.table_name = 'v2';
|
||||
view_definition
|
||||
select `v1`.`f1` AS `f1` from `testdb_1`.`v1`
|
||||
select view_definition from information_schema.views a
|
||||
select view_definition from information_schema.views a
|
||||
where a.table_name = 'testdb_1.v1';
|
||||
view_definition
|
||||
select * from v2;
|
||||
|
22
mysql-test/r/innodb_bug42101-nonzero.result
Normal file
22
mysql-test/r/innodb_bug42101-nonzero.result
Normal file
@ -0,0 +1,22 @@
|
||||
set global innodb_commit_concurrency=0;
|
||||
ERROR HY000: Incorrect arguments to SET
|
||||
select @@innodb_commit_concurrency;
|
||||
@@innodb_commit_concurrency
|
||||
1
|
||||
set global innodb_commit_concurrency=1;
|
||||
select @@innodb_commit_concurrency;
|
||||
@@innodb_commit_concurrency
|
||||
1
|
||||
set global innodb_commit_concurrency=42;
|
||||
select @@innodb_commit_concurrency;
|
||||
@@innodb_commit_concurrency
|
||||
42
|
||||
set global innodb_commit_concurrency=0;
|
||||
ERROR HY000: Incorrect arguments to SET
|
||||
select @@innodb_commit_concurrency;
|
||||
@@innodb_commit_concurrency
|
||||
42
|
||||
set global innodb_commit_concurrency=1;
|
||||
select @@innodb_commit_concurrency;
|
||||
@@innodb_commit_concurrency
|
||||
1
|
18
mysql-test/r/innodb_bug42101.result
Normal file
18
mysql-test/r/innodb_bug42101.result
Normal file
@ -0,0 +1,18 @@
|
||||
set global innodb_commit_concurrency=0;
|
||||
select @@innodb_commit_concurrency;
|
||||
@@innodb_commit_concurrency
|
||||
0
|
||||
set global innodb_commit_concurrency=1;
|
||||
ERROR HY000: Incorrect arguments to SET
|
||||
select @@innodb_commit_concurrency;
|
||||
@@innodb_commit_concurrency
|
||||
0
|
||||
set global innodb_commit_concurrency=42;
|
||||
ERROR HY000: Incorrect arguments to SET
|
||||
select @@innodb_commit_concurrency;
|
||||
@@innodb_commit_concurrency
|
||||
0
|
||||
set global innodb_commit_concurrency=0;
|
||||
select @@innodb_commit_concurrency;
|
||||
@@innodb_commit_concurrency
|
||||
0
|
@ -1408,6 +1408,18 @@ SAVEPOINT s4;
|
||||
ROLLBACK;
|
||||
ROLLBACK TO SAVEPOINT s4;
|
||||
ERROR 42000: SAVEPOINT s4 does not exist
|
||||
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY COMMENT 'My ID#', f2 INTEGER DEFAULT NULL, f3 CHAR(10) DEFAULT 'My ID#', CONSTRAINT f2_ref FOREIGN KEY (f2) REFERENCES t1 (f1)) ENGINE=INNODB;
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`f1` int(11) NOT NULL COMMENT 'My ID#',
|
||||
`f2` int(11) DEFAULT NULL,
|
||||
`f3` char(10) DEFAULT 'My ID#',
|
||||
PRIMARY KEY (`f1`),
|
||||
KEY `f2_ref` (`f2`),
|
||||
CONSTRAINT `f2_ref` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
CREATE TABLE `t2` (
|
||||
`k` int(11) NOT NULL auto_increment,
|
||||
@ -1706,6 +1718,35 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> system NULL NULL NULL NULL 1
|
||||
2 DERIVED t1 index c3,c2 c2 10 NULL 5
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 REAL, c2 REAL, c3 REAL, KEY (c3), KEY (c2, c3))
|
||||
ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1,1,1), (1,1,1), (1,1,2), (1,1,1), (1,1,2);
|
||||
SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
|
||||
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
|
||||
1
|
||||
1
|
||||
EXPLAIN
|
||||
SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
|
||||
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> system NULL NULL NULL NULL 1
|
||||
2 DERIVED t1 index c3,c2 c2 18 NULL 5
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (c1 DECIMAL(12,2), c2 DECIMAL(12,2), c3 DECIMAL(12,2),
|
||||
KEY (c3), KEY (c2, c3))
|
||||
ENGINE=InnoDB;
|
||||
INSERT INTO t1 VALUES (1,1,1), (1,1,1), (1,1,2), (1,1,1), (1,1,2);
|
||||
SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
|
||||
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
|
||||
1
|
||||
1
|
||||
EXPLAIN
|
||||
SELECT 1 FROM (SELECT COUNT(DISTINCT c1)
|
||||
FROM t1 WHERE c2 IN (1, 1) AND c3 = 2 GROUP BY c2) x;
|
||||
id select_type table type possible_keys key key_len ref rows Extra
|
||||
1 PRIMARY <derived2> system NULL NULL NULL NULL 1
|
||||
2 DERIVED t1 index c3,c2 c2 14 NULL 5
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
drop table if exists t1, t2, t3;
|
||||
create table t1(a int);
|
||||
@ -2040,4 +2081,31 @@ DROP TABLE t4;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE t2;
|
||||
DROP TABLE t3;
|
||||
CREATE TABLE t1 (a INT, b INT, KEY (a)) ENGINE = INNODB;
|
||||
CREATE TABLE t2 (a INT KEY, b INT, KEY (b)) ENGINE = INNODB;
|
||||
CREATE TABLE t3 (a INT, b INT KEY, KEY (a)) ENGINE = INNODB;
|
||||
CREATE TABLE t4 (a INT KEY, b INT, KEY (b)) ENGINE = INNODB;
|
||||
INSERT INTO t1 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5), (6, 6);
|
||||
INSERT INTO t2 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
|
||||
INSERT INTO t3 VALUES (1, 101), (2, 102), (3, 103), (4, 104), (5, 105), (6, 106);
|
||||
INSERT INTO t4 VALUES (1, 1), (2, 2), (3, 3), (4, 4), (5, 5);
|
||||
UPDATE t1, t2 SET t1.a = t1.a + 100, t2.b = t1.a + 10
|
||||
WHERE t1.a BETWEEN 2 AND 4 AND t2.a = t1.b;
|
||||
SELECT * FROM t2;
|
||||
a b
|
||||
1 1
|
||||
2 12
|
||||
3 13
|
||||
4 14
|
||||
5 5
|
||||
UPDATE t3, t4 SET t3.a = t3.a + 100, t4.b = t3.a + 10
|
||||
WHERE t3.a BETWEEN 2 AND 4 AND t4.a = t3.b - 100;
|
||||
SELECT * FROM t4;
|
||||
a b
|
||||
1 1
|
||||
2 12
|
||||
3 13
|
||||
4 14
|
||||
5 5
|
||||
DROP TABLE t1, t2, t3, t4;
|
||||
End of 5.1 tests
|
||||
|
@ -765,6 +765,11 @@ f1 f2
|
||||
2 2
|
||||
10 10
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1 ( a INT KEY, b INT );
|
||||
INSERT INTO t1 VALUES ( 0, 1 );
|
||||
INSERT INTO t1 ( b ) SELECT MAX( b ) FROM t1 WHERE b = 2;
|
||||
ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
|
||||
DROP TABLE t1;
|
||||
SET SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
|
||||
CREATE TABLE t1 (c VARCHAR(30), INDEX ix_c (c(10)));
|
||||
CREATE TABLE t2 (d VARCHAR(10));
|
||||
|
@ -192,6 +192,12 @@ delimiter
|
||||
1
|
||||
1
|
||||
1
|
||||
COUNT (*)
|
||||
1
|
||||
COUNT (*)
|
||||
1
|
||||
COUNT (*)
|
||||
1
|
||||
End of 5.0 tests
|
||||
WARNING: --server-arg option not supported in this configuration.
|
||||
Warning (Code 1286): Unknown table engine 'nonexistent'
|
||||
@ -200,4 +206,5 @@ Warning (Code 1286): Unknown table engine 'nonexistent2'
|
||||
Warning (Code 1266): Using storage engine MyISAM for table 't2'
|
||||
Error (Code 1050): Table 't2' already exists
|
||||
drop tables t1, t2;
|
||||
<TABLE BORDER=1><TR><TH><</TH></TR><TR><TD>< & ></TD></TR></TABLE>
|
||||
End of tests
|
||||
|
@ -471,4 +471,7 @@ IS NOT NULL
|
||||
1
|
||||
*** Unsigned server_id 4294967295 is found: 1 ***
|
||||
SET @@global.server_id= 1;
|
||||
RESET MASTER;
|
||||
FLUSH LOGS;
|
||||
End of 5.0 tests
|
||||
End of 5.1 tests
|
||||
|
110
mysql-test/r/mysqldump_restore.result
Normal file
110
mysql-test/r/mysqldump_restore.result
Normal file
@ -0,0 +1,110 @@
|
||||
# Set concurrent_insert = 0 to prevent random errors
|
||||
# will reset to original value at the end of the test
|
||||
SET @old_concurrent_insert = @@global.concurrent_insert;
|
||||
SET @@global.concurrent_insert = 0;
|
||||
# Pre-test cleanup
|
||||
DROP TABLE IF EXISTS t1;
|
||||
# Begin tests
|
||||
#
|
||||
# Bug#2005 Long decimal comparison bug.
|
||||
#
|
||||
CREATE TABLE t1 (a DECIMAL(64, 20));
|
||||
INSERT INTO t1 VALUES ("1234567890123456789012345678901234567890"),
|
||||
("0987654321098765432109876543210987654321");
|
||||
# Begin testing mysqldump output + restore
|
||||
# Create 'original table name - <table>_orig
|
||||
SET @orig_table_name = CONCAT('test.t1', '_orig');
|
||||
# Rename original table
|
||||
ALTER TABLE test.t1 RENAME to test.t1_orig;
|
||||
# Recreate table from mysqldump output
|
||||
# Compare original and recreated tables
|
||||
# Recreated table: test.t1
|
||||
# Original table: test.t1_orig
|
||||
Comparing tables test.t1 and test.t1_orig
|
||||
# Cleanup
|
||||
DROP TABLE test.t1, test.t1_orig;
|
||||
#
|
||||
# Bug#3361 mysqldump quotes DECIMAL values inconsistently
|
||||
#
|
||||
CREATE TABLE t1 (a DECIMAL(10,5), b FLOAT);
|
||||
INSERT INTO t1 VALUES (1.2345, 2.3456);
|
||||
INSERT INTO t1 VALUES ('1.2345', 2.3456);
|
||||
INSERT INTO t1 VALUES ("1.2345", 2.3456);
|
||||
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='ANSI_QUOTES';
|
||||
INSERT INTO t1 VALUES (1.2345, 2.3456);
|
||||
INSERT INTO t1 VALUES ('1.2345', 2.3456);
|
||||
INSERT INTO t1 VALUES ("1.2345", 2.3456);
|
||||
ERROR 42S22: Unknown column '1.2345' in 'field list'
|
||||
SET SQL_MODE=@OLD_SQL_MODE;
|
||||
# Begin testing mysqldump output + restore
|
||||
# Create 'original table name - <table>_orig
|
||||
SET @orig_table_name = CONCAT('test.t1', '_orig');
|
||||
# Rename original table
|
||||
ALTER TABLE test.t1 RENAME to test.t1_orig;
|
||||
# Recreate table from mysqldump output
|
||||
# Compare original and recreated tables
|
||||
# Recreated table: test.t1
|
||||
# Original table: test.t1_orig
|
||||
Comparing tables test.t1 and test.t1_orig
|
||||
# Cleanup
|
||||
DROP TABLE test.t1, test.t1_orig;
|
||||
#
|
||||
# Bug#1994 mysqldump does not correctly dump UCS2 data
|
||||
# Bug#4261 mysqldump 10.7 (mysql 4.1.2) --skip-extended-insert drops NULL from inserts
|
||||
#
|
||||
CREATE TABLE t1 (a VARCHAR(255)) DEFAULT CHARSET koi8r;
|
||||
INSERT INTO t1 VALUES (_koi8r x'C1C2C3C4C5'), (NULL);
|
||||
# Begin testing mysqldump output + restore
|
||||
# Create 'original table name - <table>_orig
|
||||
SET @orig_table_name = CONCAT('test.t1', '_orig');
|
||||
# Rename original table
|
||||
ALTER TABLE test.t1 RENAME to test.t1_orig;
|
||||
# Recreate table from mysqldump output
|
||||
# Compare original and recreated tables
|
||||
# Recreated table: test.t1
|
||||
# Original table: test.t1_orig
|
||||
Comparing tables test.t1 and test.t1_orig
|
||||
# Cleanup
|
||||
DROP TABLE test.t1, test.t1_orig;
|
||||
#
|
||||
# WL#2319 Exclude Tables from dump
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE TABLE t2 (a INT);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
INSERT INTO t2 VALUES (4),(5),(6);
|
||||
# Begin testing mysqldump output + restore
|
||||
# Create 'original table name - <table>_orig
|
||||
SET @orig_table_name = CONCAT('test.t2', '_orig');
|
||||
# Rename original table
|
||||
ALTER TABLE test.t2 RENAME to test.t2_orig;
|
||||
# Recreate table from mysqldump output
|
||||
# Compare original and recreated tables
|
||||
# Recreated table: test.t2
|
||||
# Original table: test.t2_orig
|
||||
Comparing tables test.t2 and test.t2_orig
|
||||
# Cleanup
|
||||
DROP TABLE test.t2, test.t2_orig;
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug#8830 mysqldump --skip-extended-insert causes --hex-blob to dump wrong values
|
||||
#
|
||||
CREATE TABLE t1 (`b` blob);
|
||||
INSERT INTO `t1` VALUES (0x602010000280100005E71A);
|
||||
# Begin testing mysqldump output + restore
|
||||
# Create 'original table name - <table>_orig
|
||||
SET @orig_table_name = CONCAT('test.t1', '_orig');
|
||||
# Rename original table
|
||||
ALTER TABLE test.t1 RENAME to test.t1_orig;
|
||||
# Recreate table from mysqldump output
|
||||
# Compare original and recreated tables
|
||||
# Recreated table: test.t1
|
||||
# Original table: test.t1_orig
|
||||
Comparing tables test.t1 and test.t1_orig
|
||||
# Cleanup
|
||||
DROP TABLE test.t1, test.t1_orig;
|
||||
# End tests
|
||||
# Cleanup
|
||||
# Reset concurrent_insert to its original value
|
||||
SET @@global.concurrent_insert = @old_concurrent_insert;
|
||||
# remove mysqldumpfile
|
@ -202,4 +202,10 @@ Ssl_cipher RC4-SHA
|
||||
select 'is still running; no cipher request crashed the server' as result from dual;
|
||||
result
|
||||
is still running; no cipher request crashed the server
|
||||
GRANT SELECT ON test.* TO bug42158@localhost REQUIRE X509;
|
||||
FLUSH PRIVILEGES;
|
||||
SHOW STATUS LIKE 'Ssl_cipher';
|
||||
Variable_name Value
|
||||
Ssl_cipher DHE-RSA-AES256-SHA
|
||||
DROP USER bug42158@localhost;
|
||||
End of 5.1 tests
|
||||
|
@ -849,6 +849,25 @@ ROW(1,2) = (SELECT 1, 1) ROW(1,2) IN (SELECT 1, 1)
|
||||
SELECT ROW(1,2) = (SELECT 1, 2), ROW(1,2) IN (SELECT 1, 2);
|
||||
ROW(1,2) = (SELECT 1, 2) ROW(1,2) IN (SELECT 1, 2)
|
||||
1 1
|
||||
CREATE TABLE t1 (a INT, b INT, c INT);
|
||||
INSERT INTO t1 VALUES (1,1,1), (1,1,1);
|
||||
EXPLAIN EXTENDED
|
||||
SELECT c FROM
|
||||
( SELECT
|
||||
(SELECT COUNT(a) FROM
|
||||
(SELECT COUNT(b) FROM t1) AS x GROUP BY c
|
||||
) FROM t1 GROUP BY b
|
||||
) AS y;
|
||||
ERROR 42S22: Unknown column 'c' in 'field list'
|
||||
SHOW WARNINGS;
|
||||
Level Code Message
|
||||
Note 1276 Field or reference 'test.t1.a' of SELECT #3 was resolved in SELECT #2
|
||||
Note 1276 Field or reference 'test.t1.c' of SELECT #3 was resolved in SELECT #2
|
||||
Error 1054 Unknown column 'c' in 'field list'
|
||||
Note 1003 select `c` AS `c` from (select (select count(`test`.`t1`.`a`) AS `COUNT(a)` from (select count(`test`.`t1`.`b`) AS `COUNT(b)` from `test`.`t1`) `x` group by `c`) AS `(SELECT COUNT(a) FROM
|
||||
(SELECT COUNT(b) FROM t1) AS x GROUP BY c
|
||||
)` from `test`.`t1` group by `test`.`t1`.`b`) `y`
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
create table t0 (a int);
|
||||
insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
|
||||
|
@ -128,3 +128,13 @@ SELECT sum(f3) FROM t1 where f2='2007-07-01 00:00:00' group by f2;
|
||||
sum(f3)
|
||||
3
|
||||
drop table t1;
|
||||
#
|
||||
# Bug #44792: valgrind warning when casting from time to time
|
||||
#
|
||||
CREATE TABLE t1 (c TIME);
|
||||
INSERT INTO t1 VALUES ('0:00:00');
|
||||
SELECT CAST(c AS TIME) FROM t1;
|
||||
CAST(c AS TIME)
|
||||
00:00:00
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
|
@ -1574,4 +1574,17 @@ SHOW FIELDS FROM t2;
|
||||
Field Type Null Key Default Extra
|
||||
d double(9,6) YES NULL
|
||||
DROP TABLE t1, t2;
|
||||
CREATE TABLE t1(a INT);
|
||||
EXPLAIN EXTENDED
|
||||
SELECT a FROM t1
|
||||
UNION
|
||||
SELECT a FROM t1
|
||||
ORDER BY a;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 PRIMARY t1 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
2 UNION t1 system NULL NULL NULL NULL 0 0.00 const row not found
|
||||
NULL UNION RESULT <union1,2> ALL NULL NULL NULL NULL NULL NULL Using filesort
|
||||
Warnings:
|
||||
Note 1003 select '0' AS `a` from `test`.`t1` union select '0' AS `a` from `test`.`t1` order by `a`
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
|
@ -399,6 +399,17 @@ select @lastid != id, @lastid, @lastid := id from t1;
|
||||
0 3 3
|
||||
1 3 4
|
||||
drop table t1;
|
||||
CREATE TABLE t1(a INT, b INT);
|
||||
INSERT INTO t1 VALUES (0, 0), (2, 1), (2, 3), (1, 1), (30, 20);
|
||||
SELECT a, b INTO @a, @b FROM t1 WHERE a=2 AND b=3 GROUP BY a, b;
|
||||
SELECT @a, @b;
|
||||
@a @b
|
||||
2 3
|
||||
SELECT a, b FROM t1 WHERE a=2 AND b=3 GROUP BY a, b;
|
||||
a b
|
||||
2 3
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
CREATE TABLE t1 (i INT);
|
||||
CREATE TRIGGER t_after_insert AFTER INSERT ON t1 FOR EACH ROW SET @bug42188 = 10;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
|
@ -1436,7 +1436,7 @@ Warnings:
|
||||
Warning 1292 Truncated incorrect auto_increment_offset value: '0'
|
||||
select @@storage_engine;
|
||||
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
|
||||
def @@storage_engine 253 6 6 N 1 31 8
|
||||
def @@storage_engine 253 6 6 Y 0 31 8
|
||||
@@storage_engine
|
||||
MyISAM
|
||||
SET @old_server_id = @@GLOBAL.server_id;
|
||||
@ -1467,4 +1467,14 @@ SELECT @@GLOBAL.server_id;
|
||||
@@GLOBAL.server_id
|
||||
0
|
||||
SET GLOBAL server_id = @old_server_id;
|
||||
SELECT @@GLOBAL.INIT_FILE, @@GLOBAL.INIT_FILE IS NULL;
|
||||
@@GLOBAL.INIT_FILE @@GLOBAL.INIT_FILE IS NULL
|
||||
NULL 1
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES ();
|
||||
SET @bug42778= @@sql_safe_updates;
|
||||
SET @@sql_safe_updates= 0;
|
||||
DELETE FROM t1 ORDER BY (@@GLOBAL.INIT_FILE) ASC LIMIT 10;
|
||||
SET @@sql_safe_updates= @bug42778;
|
||||
DROP TABLE t1;
|
||||
End of 5.1 tests
|
||||
|
@ -3699,6 +3699,25 @@ SELECT * FROM v1 IGNORE INDEX (c2) WHERE c2=2;
|
||||
ERROR 42000: Key 'c2' doesn't exist in table 'v1'
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
# -----------------------------------------------------------------
|
||||
# -- Bug#40825: Error 1356 while selecting from a view
|
||||
# -- with a "HAVING" clause though query works
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
CREATE TABLE t1 (c INT);
|
||||
|
||||
CREATE VIEW v1 (view_column) AS SELECT c AS alias FROM t1 HAVING alias;
|
||||
SHOW CREATE VIEW v1;
|
||||
View Create View character_set_client collation_connection
|
||||
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`c` AS `view_column` from `t1` having `view_column` latin1 latin1_swedish_ci
|
||||
SELECT * FROM v1;
|
||||
view_column
|
||||
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
||||
# -- End of test case for Bug#40825
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# -- End of 5.0 tests.
|
||||
# -----------------------------------------------------------------
|
||||
@ -3817,6 +3836,14 @@ call p();
|
||||
call p();
|
||||
drop view a;
|
||||
drop procedure p;
|
||||
#
|
||||
# Bug #44860: ALTER TABLE on view crashes server
|
||||
#
|
||||
CREATE TABLE t1 (a INT);
|
||||
CREATE VIEW v1 AS SELECT a FROM t1;
|
||||
ALTER TABLE v1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
# -----------------------------------------------------------------
|
||||
# -- End of 5.1 tests.
|
||||
# -----------------------------------------------------------------
|
||||
|
12
mysql-test/suite/binlog/r/binlog_incident.result
Normal file
12
mysql-test/suite/binlog/r/binlog_incident.result
Normal file
@ -0,0 +1,12 @@
|
||||
CREATE TABLE t1 (a INT);
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
SELECT * FROM t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
REPLACE INTO t1 VALUES (4);
|
||||
DROP TABLE t1;
|
||||
FLUSH LOGS;
|
||||
Contain RELOAD DATABASE
|
||||
1
|
@ -11,7 +11,7 @@ prepare s from "insert into t1 select 100 limit ?";
|
||||
set @a=100;
|
||||
execute s using @a;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
show binlog events from <binlog_start>;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query # # use `test`; create table t1 (a int)
|
||||
|
156
mysql-test/suite/binlog/r/binlog_tbl_metadata.result
Normal file
156
mysql-test/suite/binlog/r/binlog_tbl_metadata.result
Normal file
@ -0,0 +1,156 @@
|
||||
RESET MASTER;
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`c2` varchar(30) NOT NULL,
|
||||
`c3` varchar(30) DEFAULT NULL,
|
||||
`c4` varchar(30) DEFAULT NULL,
|
||||
`c5` varchar(30) DEFAULT NULL,
|
||||
`c6` varchar(30) DEFAULT NULL,
|
||||
`c7` varchar(30) DEFAULT NULL,
|
||||
`c8` varchar(30) DEFAULT NULL,
|
||||
`c9` varchar(30) DEFAULT NULL,
|
||||
`c10` varchar(30) DEFAULT NULL,
|
||||
`c11` varchar(30) DEFAULT NULL,
|
||||
`c12` varchar(30) DEFAULT NULL,
|
||||
`c13` varchar(30) DEFAULT NULL,
|
||||
`c14` varchar(30) DEFAULT NULL,
|
||||
`c15` varchar(30) DEFAULT NULL,
|
||||
`c16` varchar(30) DEFAULT NULL,
|
||||
`c17` varchar(30) DEFAULT NULL,
|
||||
`c18` varchar(30) DEFAULT NULL,
|
||||
`c19` varchar(30) DEFAULT NULL,
|
||||
`c20` varchar(30) DEFAULT NULL,
|
||||
`c21` varchar(30) DEFAULT NULL,
|
||||
`c22` varchar(30) DEFAULT NULL,
|
||||
`c23` varchar(30) DEFAULT NULL,
|
||||
`c24` varchar(30) DEFAULT NULL,
|
||||
`c25` varchar(30) DEFAULT NULL,
|
||||
`c26` varchar(30) DEFAULT NULL,
|
||||
`c27` varchar(30) DEFAULT NULL,
|
||||
`c28` varchar(30) DEFAULT NULL,
|
||||
`c29` varchar(30) DEFAULT NULL,
|
||||
`c30` varchar(30) DEFAULT NULL,
|
||||
`c31` varchar(30) DEFAULT NULL,
|
||||
`c32` varchar(30) DEFAULT NULL,
|
||||
`c33` varchar(30) DEFAULT NULL,
|
||||
`c34` varchar(30) DEFAULT NULL,
|
||||
`c35` varchar(30) DEFAULT NULL,
|
||||
`c36` varchar(30) DEFAULT NULL,
|
||||
`c37` varchar(30) DEFAULT NULL,
|
||||
`c38` varchar(30) DEFAULT NULL,
|
||||
`c39` varchar(30) DEFAULT NULL,
|
||||
`c40` varchar(30) DEFAULT NULL,
|
||||
`c41` varchar(30) DEFAULT NULL,
|
||||
`c42` varchar(30) DEFAULT NULL,
|
||||
`c43` varchar(30) DEFAULT NULL,
|
||||
`c44` varchar(30) DEFAULT NULL,
|
||||
`c45` varchar(30) DEFAULT NULL,
|
||||
`c46` varchar(30) DEFAULT NULL,
|
||||
`c47` varchar(30) DEFAULT NULL,
|
||||
`c48` varchar(30) DEFAULT NULL,
|
||||
`c49` varchar(30) DEFAULT NULL,
|
||||
`c50` varchar(30) DEFAULT NULL,
|
||||
`c51` varchar(30) DEFAULT NULL,
|
||||
`c52` varchar(30) DEFAULT NULL,
|
||||
`c53` varchar(30) DEFAULT NULL,
|
||||
`c54` varchar(30) DEFAULT NULL,
|
||||
`c55` varchar(30) DEFAULT NULL,
|
||||
`c56` varchar(30) DEFAULT NULL,
|
||||
`c57` varchar(30) DEFAULT NULL,
|
||||
`c58` varchar(30) DEFAULT NULL,
|
||||
`c59` varchar(30) DEFAULT NULL,
|
||||
`c60` varchar(30) DEFAULT NULL,
|
||||
`c61` varchar(30) DEFAULT NULL,
|
||||
`c62` varchar(30) DEFAULT NULL,
|
||||
`c63` varchar(30) DEFAULT NULL,
|
||||
`c64` varchar(30) DEFAULT NULL,
|
||||
`c65` varchar(30) DEFAULT NULL,
|
||||
`c66` varchar(30) DEFAULT NULL,
|
||||
`c67` varchar(30) DEFAULT NULL,
|
||||
`c68` varchar(30) DEFAULT NULL,
|
||||
`c69` varchar(30) DEFAULT NULL,
|
||||
`c70` varchar(30) DEFAULT NULL,
|
||||
`c71` varchar(30) DEFAULT NULL,
|
||||
`c72` varchar(30) DEFAULT NULL,
|
||||
`c73` varchar(30) DEFAULT NULL,
|
||||
`c74` varchar(30) DEFAULT NULL,
|
||||
`c75` varchar(30) DEFAULT NULL,
|
||||
`c76` varchar(30) DEFAULT NULL,
|
||||
`c77` varchar(30) DEFAULT NULL,
|
||||
`c78` varchar(30) DEFAULT NULL,
|
||||
`c79` varchar(30) DEFAULT NULL,
|
||||
`c80` varchar(30) DEFAULT NULL,
|
||||
`c81` varchar(30) DEFAULT NULL,
|
||||
`c82` varchar(30) DEFAULT NULL,
|
||||
`c83` varchar(30) DEFAULT NULL,
|
||||
`c84` varchar(30) DEFAULT NULL,
|
||||
`c85` varchar(30) DEFAULT NULL,
|
||||
`c86` varchar(30) DEFAULT NULL,
|
||||
`c87` varchar(30) DEFAULT NULL,
|
||||
`c88` varchar(30) DEFAULT NULL,
|
||||
`c89` varchar(30) DEFAULT NULL,
|
||||
`c90` varchar(30) DEFAULT NULL,
|
||||
`c91` varchar(30) DEFAULT NULL,
|
||||
`c92` varchar(30) DEFAULT NULL,
|
||||
`c93` varchar(30) DEFAULT NULL,
|
||||
`c94` varchar(30) DEFAULT NULL,
|
||||
`c95` varchar(30) DEFAULT NULL,
|
||||
`c96` varchar(30) DEFAULT NULL,
|
||||
`c97` varchar(30) DEFAULT NULL,
|
||||
`c98` varchar(30) DEFAULT NULL,
|
||||
`c99` varchar(30) DEFAULT NULL,
|
||||
`c100` varchar(30) DEFAULT NULL,
|
||||
`c101` varchar(30) DEFAULT NULL,
|
||||
`c102` varchar(30) DEFAULT NULL,
|
||||
`c103` varchar(30) DEFAULT NULL,
|
||||
`c104` varchar(30) DEFAULT NULL,
|
||||
`c105` varchar(30) DEFAULT NULL,
|
||||
`c106` varchar(30) DEFAULT NULL,
|
||||
`c107` varchar(30) DEFAULT NULL,
|
||||
`c108` varchar(30) DEFAULT NULL,
|
||||
`c109` varchar(30) DEFAULT NULL,
|
||||
`c110` varchar(30) DEFAULT NULL,
|
||||
`c111` varchar(30) DEFAULT NULL,
|
||||
`c112` varchar(30) DEFAULT NULL,
|
||||
`c113` varchar(30) DEFAULT NULL,
|
||||
`c114` varchar(30) DEFAULT NULL,
|
||||
`c115` varchar(30) DEFAULT NULL,
|
||||
`c116` varchar(30) DEFAULT NULL,
|
||||
`c117` varchar(30) DEFAULT NULL,
|
||||
`c118` varchar(30) DEFAULT NULL,
|
||||
`c119` varchar(30) DEFAULT NULL,
|
||||
`c120` varchar(30) DEFAULT NULL,
|
||||
`c121` varchar(30) DEFAULT NULL,
|
||||
`c122` varchar(30) DEFAULT NULL,
|
||||
`c123` varchar(30) DEFAULT NULL,
|
||||
`c124` varchar(30) DEFAULT NULL,
|
||||
`c125` varchar(30) DEFAULT NULL,
|
||||
`c126` varchar(30) DEFAULT NULL,
|
||||
`c127` varchar(30) DEFAULT NULL,
|
||||
`c128` varchar(30) DEFAULT NULL,
|
||||
`c129` varchar(30) DEFAULT NULL,
|
||||
`c130` varchar(30) DEFAULT NULL,
|
||||
`c131` varchar(30) DEFAULT NULL,
|
||||
`c132` varchar(30) DEFAULT NULL,
|
||||
`c133` varchar(30) DEFAULT NULL,
|
||||
`c134` varchar(30) DEFAULT NULL,
|
||||
`c135` varchar(30) DEFAULT NULL,
|
||||
`c136` varchar(30) DEFAULT NULL,
|
||||
`c137` varchar(30) DEFAULT NULL,
|
||||
`c138` varchar(30) DEFAULT NULL,
|
||||
`c139` varchar(30) DEFAULT NULL,
|
||||
`c140` varchar(30) DEFAULT NULL,
|
||||
`c141` varchar(30) DEFAULT NULL,
|
||||
`c142` varchar(30) DEFAULT NULL,
|
||||
`c143` varchar(30) DEFAULT NULL,
|
||||
`c144` varchar(30) DEFAULT NULL,
|
||||
`c145` varchar(30) DEFAULT NULL,
|
||||
`c146` varchar(30) DEFAULT NULL,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB;
|
||||
LOCK TABLES `t1` WRITE;
|
||||
INSERT INTO `t1` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1');
|
||||
DROP TABLE `t1`;
|
||||
FLUSH LOGS;
|
||||
=== Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail.
|
@ -10,25 +10,25 @@ INSERT DELAYED INTO t1 VALUES (5);
|
||||
---- Insert directly ----
|
||||
INSERT INTO t1 VALUES (@@global.sync_binlog);
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
INSERT INTO t1 VALUES (@@session.insert_id);
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
INSERT INTO t1 VALUES (@@global.auto_increment_increment);
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
INSERT INTO t2 SELECT UUID();
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
INSERT INTO t2 VALUES (@@session.sql_mode);
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
INSERT INTO t2 VALUES (@@global.init_slave);
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
INSERT INTO t2 VALUES (@@hostname);
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
---- Insert from stored procedure ----
|
||||
CREATE PROCEDURE proc()
|
||||
BEGIN
|
||||
@ -42,13 +42,13 @@ INSERT INTO t2 VALUES (@@hostname);
|
||||
END|
|
||||
CALL proc();
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
---- Insert from stored function ----
|
||||
CREATE FUNCTION func()
|
||||
RETURNS INT
|
||||
@ -66,13 +66,13 @@ SELECT func();
|
||||
func()
|
||||
0
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
---- Insert from trigger ----
|
||||
CREATE TRIGGER trig
|
||||
BEFORE INSERT ON trigger_table
|
||||
@ -88,14 +88,14 @@ INSERT INTO t2 VALUES (@@hostname);
|
||||
END|
|
||||
INSERT INTO trigger_table VALUES ('bye.');
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
---- Insert from prepared statement ----
|
||||
PREPARE p1 FROM 'INSERT INTO t1 VALUES (@@global.sync_binlog)';
|
||||
PREPARE p2 FROM 'INSERT INTO t1 VALUES (@@session.insert_id)';
|
||||
@ -106,25 +106,25 @@ PREPARE p6 FROM 'INSERT INTO t2 VALUES (@@global.init_slave)';
|
||||
PREPARE p7 FROM 'INSERT INTO t2 VALUES (@@hostname)';
|
||||
EXECUTE p1;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
EXECUTE p2;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
EXECUTE p3;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
EXECUTE p4;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
EXECUTE p5;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
EXECUTE p6;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
EXECUTE p7;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
---- Insert from nested call of triggers / functions / procedures ----
|
||||
CREATE PROCEDURE proc1()
|
||||
INSERT INTO trigger_table VALUES ('ha!')|
|
||||
@ -154,13 +154,13 @@ EXECUTE prep6;
|
||||
func5()
|
||||
0
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
==== Variables that should *not* be unsafe ====
|
||||
INSERT INTO t1 VALUES (@@session.pseudo_thread_id);
|
||||
INSERT INTO t1 VALUES (@@session.pseudo_thread_id);
|
||||
@ -195,16 +195,16 @@ DROP TABLE t1, t2, t3, trigger_table, trigger_table2;
|
||||
CREATE TABLE t1(a INT, b INT, KEY(a), PRIMARY KEY(b));
|
||||
INSERT INTO t1 SELECT * FROM t1 LIMIT 1;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
REPLACE INTO t1 SELECT * FROM t1 LIMIT 1;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
UPDATE t1 SET a=1 LIMIT 1;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
DELETE FROM t1 LIMIT 1;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
CREATE PROCEDURE p1()
|
||||
BEGIN
|
||||
INSERT INTO t1 SELECT * FROM t1 LIMIT 1;
|
||||
@ -214,10 +214,10 @@ DELETE FROM t1 LIMIT 1;
|
||||
END|
|
||||
CALL p1();
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
DROP PROCEDURE p1;
|
||||
DROP TABLE t1;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
@ -225,16 +225,16 @@ CREATE TABLE t1 (a VARCHAR(100), b VARCHAR(100));
|
||||
INSERT INTO t1 VALUES ('a','b');
|
||||
UPDATE t1 SET b = '%s%s%s%s%s%s%s%s%s%s%s%s%s%s' WHERE a = 'a' LIMIT 1;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
DROP TABLE t1;
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
CREATE TABLE t1(i INT PRIMARY KEY);
|
||||
CREATE TABLE t2(i INT PRIMARY KEY);
|
||||
CREATE TABLE t3(i INT, ch CHAR(50));
|
||||
"Should issue message Statement is not safe to log in statement format."
|
||||
"Should issue message Statement may not be safe to log in statement format."
|
||||
INSERT INTO t1 SELECT * FROM t2 LIMIT 1;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
CREATE FUNCTION func6()
|
||||
RETURNS INT
|
||||
BEGIN
|
||||
@ -243,10 +243,10 @@ INSERT INTO t1 VALUES (11);
|
||||
INSERT INTO t1 VALUES (12);
|
||||
RETURN 0;
|
||||
END|
|
||||
"Should issue message Statement is not safe to log in statement format only once"
|
||||
"Should issue message Statement may not be safe to log in statement format only once"
|
||||
INSERT INTO t3 VALUES(func6(), UUID());
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
"Check whether SET @@SQL_LOG_BIN = 0/1 doesn't work in substatements"
|
||||
CREATE FUNCTION fun_check_log_bin() RETURNS INT
|
||||
BEGIN
|
||||
@ -259,7 +259,7 @@ SELECT fun_check_log_bin();
|
||||
fun_check_log_bin()
|
||||
100
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
"SQL_LOG_BIN should be ON still"
|
||||
SHOW VARIABLES LIKE "SQL_LOG_BIN";
|
||||
Variable_name Value
|
||||
@ -315,16 +315,16 @@ CREATE TABLE t1(i INT PRIMARY KEY);
|
||||
CREATE TABLE t2(i INT PRIMARY KEY);
|
||||
INSERT INTO t1 SELECT * FROM t2 LIMIT 1;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
INSERT INTO t1 VALUES(@@global.sync_binlog);
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
UPDATE t1 SET i = 999 LIMIT 1;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
DELETE FROM t1 LIMIT 1;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
DROP TABLE t1, t2;
|
||||
SET @@SESSION.SQL_MODE = @save_sql_mode;
|
||||
"End of tests"
|
||||
|
1
mysql-test/suite/binlog/t/binlog_incident-master.opt
Normal file
1
mysql-test/suite/binlog/t/binlog_incident-master.opt
Normal file
@ -0,0 +1 @@
|
||||
--loose-debug=+d,incident_database_resync_on_replace
|
27
mysql-test/suite/binlog/t/binlog_incident.test
Normal file
27
mysql-test/suite/binlog/t/binlog_incident.test
Normal file
@ -0,0 +1,27 @@
|
||||
# The purpose of this test is to provide a reference for how the
|
||||
# incident log event is represented in the output from the mysqlbinlog
|
||||
# program.
|
||||
|
||||
source include/have_log_bin.inc;
|
||||
source include/have_debug.inc;
|
||||
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
|
||||
CREATE TABLE t1 (a INT);
|
||||
|
||||
INSERT INTO t1 VALUES (1),(2),(3);
|
||||
SELECT * FROM t1;
|
||||
|
||||
# This will generate an incident log event and store it in the binary
|
||||
# log before the replace statement.
|
||||
REPLACE INTO t1 VALUES (4);
|
||||
|
||||
DROP TABLE t1;
|
||||
FLUSH LOGS;
|
||||
|
||||
exec $MYSQL_BINLOG --start-position=106 $MYSQLD_DATADIR/master-bin.000001 >$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql;
|
||||
--disable_query_log
|
||||
eval SELECT cont LIKE '%RELOAD DATABASE; # Shall generate syntax error%' AS `Contain RELOAD DATABASE` FROM (SELECT load_file('$MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql') AS cont) AS tbl;
|
||||
--enable_query_log
|
||||
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/binlog_incident-bug44442.sql;
|
199
mysql-test/suite/binlog/t/binlog_tbl_metadata.test
Normal file
199
mysql-test/suite/binlog/t/binlog_tbl_metadata.test
Normal file
@ -0,0 +1,199 @@
|
||||
#
|
||||
# BUG#42749: infinite loop writing to row based binlog - processlist shows
|
||||
# "freeing items"
|
||||
#
|
||||
# WHY
|
||||
# ===
|
||||
#
|
||||
# This bug would make table map event to report data_written one byte less
|
||||
# than what would actually be written in its body. This would cause one byte shorter
|
||||
# event end_log_pos. The ultimate impact was that it would make fixing the
|
||||
# position in MYSQL_BIN_LOG::write_cache bogus or end up in an infinite loop.
|
||||
#
|
||||
# HOW
|
||||
# ===
|
||||
#
|
||||
# Checking that the patch fixes the problem is done as follows:
|
||||
# i) a table with several fields is created;
|
||||
# ii) an insert is performed;
|
||||
# iii) the logs are flushed;
|
||||
# iv) mysqlbinlog is used to check if it succeeds.
|
||||
#
|
||||
# In step iv), before the bug was fixed, the test case would fail with
|
||||
# mysqlbinlog reporting that it was unable to succeed in reading the event.
|
||||
#
|
||||
|
||||
-- source include/have_log_bin.inc
|
||||
-- source include/have_innodb.inc
|
||||
-- source include/have_binlog_format_row.inc
|
||||
-- connection default
|
||||
|
||||
RESET MASTER;
|
||||
|
||||
-- disable_warnings
|
||||
DROP TABLE IF EXISTS `t1`;
|
||||
-- enable_warnings
|
||||
|
||||
CREATE TABLE `t1` (
|
||||
`c1` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`c2` varchar(30) NOT NULL,
|
||||
`c3` varchar(30) DEFAULT NULL,
|
||||
`c4` varchar(30) DEFAULT NULL,
|
||||
`c5` varchar(30) DEFAULT NULL,
|
||||
`c6` varchar(30) DEFAULT NULL,
|
||||
`c7` varchar(30) DEFAULT NULL,
|
||||
`c8` varchar(30) DEFAULT NULL,
|
||||
`c9` varchar(30) DEFAULT NULL,
|
||||
`c10` varchar(30) DEFAULT NULL,
|
||||
`c11` varchar(30) DEFAULT NULL,
|
||||
`c12` varchar(30) DEFAULT NULL,
|
||||
`c13` varchar(30) DEFAULT NULL,
|
||||
`c14` varchar(30) DEFAULT NULL,
|
||||
`c15` varchar(30) DEFAULT NULL,
|
||||
`c16` varchar(30) DEFAULT NULL,
|
||||
`c17` varchar(30) DEFAULT NULL,
|
||||
`c18` varchar(30) DEFAULT NULL,
|
||||
`c19` varchar(30) DEFAULT NULL,
|
||||
`c20` varchar(30) DEFAULT NULL,
|
||||
`c21` varchar(30) DEFAULT NULL,
|
||||
`c22` varchar(30) DEFAULT NULL,
|
||||
`c23` varchar(30) DEFAULT NULL,
|
||||
`c24` varchar(30) DEFAULT NULL,
|
||||
`c25` varchar(30) DEFAULT NULL,
|
||||
`c26` varchar(30) DEFAULT NULL,
|
||||
`c27` varchar(30) DEFAULT NULL,
|
||||
`c28` varchar(30) DEFAULT NULL,
|
||||
`c29` varchar(30) DEFAULT NULL,
|
||||
`c30` varchar(30) DEFAULT NULL,
|
||||
`c31` varchar(30) DEFAULT NULL,
|
||||
`c32` varchar(30) DEFAULT NULL,
|
||||
`c33` varchar(30) DEFAULT NULL,
|
||||
`c34` varchar(30) DEFAULT NULL,
|
||||
`c35` varchar(30) DEFAULT NULL,
|
||||
`c36` varchar(30) DEFAULT NULL,
|
||||
`c37` varchar(30) DEFAULT NULL,
|
||||
`c38` varchar(30) DEFAULT NULL,
|
||||
`c39` varchar(30) DEFAULT NULL,
|
||||
`c40` varchar(30) DEFAULT NULL,
|
||||
`c41` varchar(30) DEFAULT NULL,
|
||||
`c42` varchar(30) DEFAULT NULL,
|
||||
`c43` varchar(30) DEFAULT NULL,
|
||||
`c44` varchar(30) DEFAULT NULL,
|
||||
`c45` varchar(30) DEFAULT NULL,
|
||||
`c46` varchar(30) DEFAULT NULL,
|
||||
`c47` varchar(30) DEFAULT NULL,
|
||||
`c48` varchar(30) DEFAULT NULL,
|
||||
`c49` varchar(30) DEFAULT NULL,
|
||||
`c50` varchar(30) DEFAULT NULL,
|
||||
`c51` varchar(30) DEFAULT NULL,
|
||||
`c52` varchar(30) DEFAULT NULL,
|
||||
`c53` varchar(30) DEFAULT NULL,
|
||||
`c54` varchar(30) DEFAULT NULL,
|
||||
`c55` varchar(30) DEFAULT NULL,
|
||||
`c56` varchar(30) DEFAULT NULL,
|
||||
`c57` varchar(30) DEFAULT NULL,
|
||||
`c58` varchar(30) DEFAULT NULL,
|
||||
`c59` varchar(30) DEFAULT NULL,
|
||||
`c60` varchar(30) DEFAULT NULL,
|
||||
`c61` varchar(30) DEFAULT NULL,
|
||||
`c62` varchar(30) DEFAULT NULL,
|
||||
`c63` varchar(30) DEFAULT NULL,
|
||||
`c64` varchar(30) DEFAULT NULL,
|
||||
`c65` varchar(30) DEFAULT NULL,
|
||||
`c66` varchar(30) DEFAULT NULL,
|
||||
`c67` varchar(30) DEFAULT NULL,
|
||||
`c68` varchar(30) DEFAULT NULL,
|
||||
`c69` varchar(30) DEFAULT NULL,
|
||||
`c70` varchar(30) DEFAULT NULL,
|
||||
`c71` varchar(30) DEFAULT NULL,
|
||||
`c72` varchar(30) DEFAULT NULL,
|
||||
`c73` varchar(30) DEFAULT NULL,
|
||||
`c74` varchar(30) DEFAULT NULL,
|
||||
`c75` varchar(30) DEFAULT NULL,
|
||||
`c76` varchar(30) DEFAULT NULL,
|
||||
`c77` varchar(30) DEFAULT NULL,
|
||||
`c78` varchar(30) DEFAULT NULL,
|
||||
`c79` varchar(30) DEFAULT NULL,
|
||||
`c80` varchar(30) DEFAULT NULL,
|
||||
`c81` varchar(30) DEFAULT NULL,
|
||||
`c82` varchar(30) DEFAULT NULL,
|
||||
`c83` varchar(30) DEFAULT NULL,
|
||||
`c84` varchar(30) DEFAULT NULL,
|
||||
`c85` varchar(30) DEFAULT NULL,
|
||||
`c86` varchar(30) DEFAULT NULL,
|
||||
`c87` varchar(30) DEFAULT NULL,
|
||||
`c88` varchar(30) DEFAULT NULL,
|
||||
`c89` varchar(30) DEFAULT NULL,
|
||||
`c90` varchar(30) DEFAULT NULL,
|
||||
`c91` varchar(30) DEFAULT NULL,
|
||||
`c92` varchar(30) DEFAULT NULL,
|
||||
`c93` varchar(30) DEFAULT NULL,
|
||||
`c94` varchar(30) DEFAULT NULL,
|
||||
`c95` varchar(30) DEFAULT NULL,
|
||||
`c96` varchar(30) DEFAULT NULL,
|
||||
`c97` varchar(30) DEFAULT NULL,
|
||||
`c98` varchar(30) DEFAULT NULL,
|
||||
`c99` varchar(30) DEFAULT NULL,
|
||||
`c100` varchar(30) DEFAULT NULL,
|
||||
`c101` varchar(30) DEFAULT NULL,
|
||||
`c102` varchar(30) DEFAULT NULL,
|
||||
`c103` varchar(30) DEFAULT NULL,
|
||||
`c104` varchar(30) DEFAULT NULL,
|
||||
`c105` varchar(30) DEFAULT NULL,
|
||||
`c106` varchar(30) DEFAULT NULL,
|
||||
`c107` varchar(30) DEFAULT NULL,
|
||||
`c108` varchar(30) DEFAULT NULL,
|
||||
`c109` varchar(30) DEFAULT NULL,
|
||||
`c110` varchar(30) DEFAULT NULL,
|
||||
`c111` varchar(30) DEFAULT NULL,
|
||||
`c112` varchar(30) DEFAULT NULL,
|
||||
`c113` varchar(30) DEFAULT NULL,
|
||||
`c114` varchar(30) DEFAULT NULL,
|
||||
`c115` varchar(30) DEFAULT NULL,
|
||||
`c116` varchar(30) DEFAULT NULL,
|
||||
`c117` varchar(30) DEFAULT NULL,
|
||||
`c118` varchar(30) DEFAULT NULL,
|
||||
`c119` varchar(30) DEFAULT NULL,
|
||||
`c120` varchar(30) DEFAULT NULL,
|
||||
`c121` varchar(30) DEFAULT NULL,
|
||||
`c122` varchar(30) DEFAULT NULL,
|
||||
`c123` varchar(30) DEFAULT NULL,
|
||||
`c124` varchar(30) DEFAULT NULL,
|
||||
`c125` varchar(30) DEFAULT NULL,
|
||||
`c126` varchar(30) DEFAULT NULL,
|
||||
`c127` varchar(30) DEFAULT NULL,
|
||||
`c128` varchar(30) DEFAULT NULL,
|
||||
`c129` varchar(30) DEFAULT NULL,
|
||||
`c130` varchar(30) DEFAULT NULL,
|
||||
`c131` varchar(30) DEFAULT NULL,
|
||||
`c132` varchar(30) DEFAULT NULL,
|
||||
`c133` varchar(30) DEFAULT NULL,
|
||||
`c134` varchar(30) DEFAULT NULL,
|
||||
`c135` varchar(30) DEFAULT NULL,
|
||||
`c136` varchar(30) DEFAULT NULL,
|
||||
`c137` varchar(30) DEFAULT NULL,
|
||||
`c138` varchar(30) DEFAULT NULL,
|
||||
`c139` varchar(30) DEFAULT NULL,
|
||||
`c140` varchar(30) DEFAULT NULL,
|
||||
`c141` varchar(30) DEFAULT NULL,
|
||||
`c142` varchar(30) DEFAULT NULL,
|
||||
`c143` varchar(30) DEFAULT NULL,
|
||||
`c144` varchar(30) DEFAULT NULL,
|
||||
`c145` varchar(30) DEFAULT NULL,
|
||||
`c146` varchar(30) DEFAULT NULL,
|
||||
PRIMARY KEY (`c1`)
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
LOCK TABLES `t1` WRITE;
|
||||
|
||||
INSERT INTO `t1` VALUES ('1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1','1');
|
||||
|
||||
DROP TABLE `t1`;
|
||||
|
||||
FLUSH LOGS;
|
||||
|
||||
-- echo === Using mysqlbinlog to detect failure. Before the patch mysqlbinlog would find a corrupted event, thence would fail.
|
||||
|
||||
-- let $MYSQLD_DATADIR= `SELECT @@datadir`;
|
||||
-- exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug42749.binlog
|
||||
-- remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog_bug42749.binlog
|
@ -289,7 +289,7 @@ CREATE TABLE t1(i INT PRIMARY KEY);
|
||||
CREATE TABLE t2(i INT PRIMARY KEY);
|
||||
CREATE TABLE t3(i INT, ch CHAR(50));
|
||||
|
||||
--echo "Should issue message Statement is not safe to log in statement format."
|
||||
--echo "Should issue message Statement may not be safe to log in statement format."
|
||||
INSERT INTO t1 SELECT * FROM t2 LIMIT 1;
|
||||
|
||||
DELIMITER |;
|
||||
@ -302,7 +302,7 @@ BEGIN
|
||||
RETURN 0;
|
||||
END|
|
||||
DELIMITER ;|
|
||||
--echo "Should issue message Statement is not safe to log in statement format only once"
|
||||
--echo "Should issue message Statement may not be safe to log in statement format only once"
|
||||
INSERT INTO t3 VALUES(func6(), UUID());
|
||||
|
||||
--echo "Check whether SET @@SQL_LOG_BIN = 0/1 doesn't work in substatements"
|
||||
|
20
mysql-test/suite/ibmdb2i/include/have_i54.inc
Executable file
20
mysql-test/suite/ibmdb2i/include/have_i54.inc
Executable file
@ -0,0 +1,20 @@
|
||||
# Check for IBM i 6.1 or later
|
||||
--disable_query_log
|
||||
system uname -rv > $MYSQLTEST_VARDIR/tmp/version;
|
||||
--disable_warnings
|
||||
drop table if exists uname_vr;
|
||||
--enable_warnings
|
||||
create temporary table uname_vr (r int, v int);
|
||||
--disable_warnings
|
||||
eval LOAD DATA INFILE "$MYSQLTEST_VARDIR/tmp/version" into table uname_vr fields terminated by ' ';
|
||||
--enable_warnings
|
||||
let $ok = `select count(*) from uname_vr where v = 5 and r = 4`;
|
||||
drop table uname_vr;
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/version;
|
||||
--enable_query_log
|
||||
if (!$ok)
|
||||
{
|
||||
skip "Need IBM i 5.4 or later";
|
||||
}
|
||||
|
||||
|
4
mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44232.result
Executable file
4
mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44232.result
Executable file
@ -0,0 +1,4 @@
|
||||
create table t1 (c char(1) character set armscii8) engine=ibmdb2i;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 2504)
|
||||
create table t1 (c char(1) character set eucjpms ) engine=ibmdb2i;
|
||||
ERROR HY000: Can't create table 'test.t1' (errno: 2504)
|
18
mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44610.result
Executable file
18
mysql-test/suite/ibmdb2i/r/ibmdb2i_bug_44610.result
Executable file
@ -0,0 +1,18 @@
|
||||
create table ABC (i int) engine=ibmdb2i;
|
||||
drop table ABC;
|
||||
create table `1234567890ABC` (i int) engine=ibmdb2i;
|
||||
drop table `1234567890ABC`;
|
||||
create table `!@#$%` (i int) engine=ibmdb2i;
|
||||
drop table `!@#$%`;
|
||||
create table `ABCD#########` (i int) engine=ibmdb2i;
|
||||
drop table `ABCD#########`;
|
||||
create table `_` (i int) engine=ibmdb2i;
|
||||
drop table `_`;
|
||||
create table `abc##def` (i int) engine=ibmdb2i;
|
||||
drop table `abc##def`;
|
||||
set names utf8;
|
||||
create table İ (s1 int) engine=ibmdb2i;
|
||||
drop table İ;
|
||||
create table İİ (s1 int) engine=ibmdb2i;
|
||||
drop table İİ;
|
||||
set names latin1;
|
8
mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44232.test
Executable file
8
mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44232.test
Executable file
@ -0,0 +1,8 @@
|
||||
--source suite/ibmdb2i/include/have_ibmdb2i.inc
|
||||
--source suite/ibmdb2i/include/have_i54.inc
|
||||
|
||||
--error 1005
|
||||
create table t1 (c char(1) character set armscii8) engine=ibmdb2i;
|
||||
|
||||
--error 1005
|
||||
create table t1 (c char(1) character set eucjpms ) engine=ibmdb2i;
|
28
mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44610.test
Executable file
28
mysql-test/suite/ibmdb2i/t/ibmdb2i_bug_44610.test
Executable file
@ -0,0 +1,28 @@
|
||||
source suite/ibmdb2i/include/have_ibmdb2i.inc;
|
||||
|
||||
# Test RCDFMT generation for a variety of kinds of table names
|
||||
create table ABC (i int) engine=ibmdb2i;
|
||||
drop table ABC;
|
||||
|
||||
create table `1234567890ABC` (i int) engine=ibmdb2i;
|
||||
drop table `1234567890ABC`;
|
||||
|
||||
create table `!@#$%` (i int) engine=ibmdb2i;
|
||||
drop table `!@#$%`;
|
||||
|
||||
create table `ABCD#########` (i int) engine=ibmdb2i;
|
||||
drop table `ABCD#########`;
|
||||
|
||||
create table `_` (i int) engine=ibmdb2i;
|
||||
drop table `_`;
|
||||
|
||||
create table `abc##def` (i int) engine=ibmdb2i;
|
||||
drop table `abc##def`;
|
||||
|
||||
set names utf8;
|
||||
create table İ (s1 int) engine=ibmdb2i;
|
||||
drop table İ;
|
||||
|
||||
create table İİ (s1 int) engine=ibmdb2i;
|
||||
drop table İİ;
|
||||
set names latin1;
|
@ -3,4 +3,4 @@ MASTER_CONNECT_RETRY=1,
|
||||
MASTER_HOST='127.0.0.1',
|
||||
MASTER_PORT=MASTER_MYPORT;
|
||||
START SLAVE;
|
||||
Unable to use slave's temporary directory ../../../error - Can't read dir of '../../../error' (Errcode: 2)
|
||||
12
|
||||
|
@ -39,8 +39,8 @@ a b
|
||||
SELECT * FROM t2;
|
||||
c d
|
||||
1 2
|
||||
2 16
|
||||
3 54
|
||||
2 8
|
||||
3 18
|
||||
**** On Slave ****
|
||||
START SLAVE UNTIL MASTER_LOG_FILE='master-bin.000001', MASTER_LOG_POS=762;
|
||||
SHOW SLAVE STATUS;
|
||||
@ -50,7 +50,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 1133
|
||||
Read_Master_Log_Pos 1115
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
|
@ -10,7 +10,7 @@ CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a));
|
||||
INSERT INTO test.t1 VALUES(1,'test');
|
||||
UPDATE test.t1 SET blob_column=LOAD_FILE('../../std_data/words2.dat') WHERE a=1;
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
create procedure test.p1()
|
||||
begin
|
||||
INSERT INTO test.t1 VALUES(2,'test');
|
||||
@ -18,7 +18,7 @@ UPDATE test.t1 SET blob_column=LOAD_FILE('../../std_data/words2.dat') WHERE a=2;
|
||||
end|
|
||||
CALL test.p1();
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
SELECT * FROM test.t1 ORDER BY blob_column;
|
||||
a blob_column
|
||||
1 abase
|
||||
|
@ -6,6 +6,25 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
call mtr.add_suppression("Slave: Can\'t find record in \'user\' Error_code: 1032");
|
||||
reset master;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TEMPORARY TABLE t1 (a char(1));
|
||||
INSERT INTO t1 VALUES ('a');
|
||||
include/stop_slave.inc
|
||||
include/start_slave.inc
|
||||
INSERT INTO t1 VALUES ('b');
|
||||
DROP TABLE IF EXISTS t1;
|
||||
CREATE TEMPORARY TABLE `t1`(`a` tinyint,`b` char(1))engine=myisam;
|
||||
INSERT INTO `t1` set `a`=128,`b`='128';
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'a' at row 1
|
||||
Warning 1265 Data truncated for column 'b' at row 1
|
||||
include/stop_slave.inc
|
||||
include/start_slave.inc
|
||||
INSERT INTO `t1` set `a`=128,`b`='128';
|
||||
Warnings:
|
||||
Warning 1264 Out of range value for column 'a' at row 1
|
||||
Warning 1265 Data truncated for column 'b' at row 1
|
||||
DROP TABLE t1;
|
||||
SET @save_select_limit=@@session.sql_select_limit;
|
||||
SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100;
|
||||
ERROR 42000: Access denied; you need the SUPER privilege for this operation
|
||||
|
@ -182,19 +182,19 @@ CREATE TABLE t1(sum INT, price FLOAT(24)) ENGINE=MyISAM;
|
||||
affected rows: 0
|
||||
INSERT INTO t1 VALUES(myfunc_int(100), myfunc_double(50.00));
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
affected rows: 1
|
||||
INSERT INTO t1 VALUES(myfunc_int(10), myfunc_double(5.00));
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
affected rows: 1
|
||||
INSERT INTO t1 VALUES(myfunc_int(200), myfunc_double(25.00));
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
affected rows: 1
|
||||
INSERT INTO t1 VALUES(myfunc_int(1), myfunc_double(500.00));
|
||||
Warnings:
|
||||
Note 1592 Statement is not safe to log in statement format.
|
||||
Note 1592 Statement may not be safe to log in statement format.
|
||||
affected rows: 1
|
||||
SELECT * FROM t1 ORDER BY sum;
|
||||
sum price
|
||||
|
@ -10,4 +10,5 @@
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
rpl_cross_version : BUG#42311 2009-03-27 joro rpl_cross_version fails on macosx
|
||||
rpl_cross_version : Bug#42311 2009-03-27 joro rpl_cross_version fails on macosx
|
||||
rpl_init_slave : Bug#44920 2009-05-18 pcrews MTR2 is not processing master.opt input properly on Windows
|
||||
|
@ -14,42 +14,13 @@ REPLACE INTO t1 VALUES (4);
|
||||
SELECT * FROM t1;
|
||||
|
||||
connection slave;
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
# Wait until SQL thread stops with error LOST_EVENT on master
|
||||
let $slave_sql_errno= 1590;
|
||||
source include/wait_for_slave_sql_error.inc;
|
||||
|
||||
# The 4 should not be inserted into the table, since the incident log
|
||||
# event should have stop the slave.
|
||||
--echo **** On Slave ****
|
||||
#### BEGIN DEBUG INFO ADDED BY SVEN 2008-07-18 -- SEE BUG#38077 ####
|
||||
let $tables= query_get_value(SHOW TABLES, Tables_in_test, 1);
|
||||
if (`SELECT '$tables' != 't1'`)
|
||||
{
|
||||
--echo **** TEST CASE BUG! PRINTING DEBUG INFO! ****
|
||||
--echo **** Dear developer, if you see this in the output of a test
|
||||
--echo **** case run, please add all the information below as a
|
||||
--echo **** comment to BUG#38077. If it's a pushbuild failure, please
|
||||
--echo **** include a link to the push page.
|
||||
--echo **** Thank you! /Sven
|
||||
SHOW BINLOG EVENTS;
|
||||
--echo **** master binlog ****
|
||||
--error 0,1
|
||||
--exec $MYSQL_BINLOG --hexdump $MYSQLTEST_VARDIR/log/master-bin.000001
|
||||
--echo **** slave binlog ****
|
||||
--error 0,1
|
||||
--exec $MYSQL_BINLOG --hexdump $MYSQLTEST_VARDIR/log/slave-bin.000001
|
||||
--echo **** slave status ****
|
||||
query_vertical SHOW SLAVE STATUS;
|
||||
--echo **** slave's master status ****
|
||||
SHOW MASTER STATUS;
|
||||
--echo **** slave binlog events ****
|
||||
--echo [on master]
|
||||
connection master;
|
||||
--echo **** master status ****
|
||||
SHOW MASTER STATUS;
|
||||
--echo **** master binlog events ****
|
||||
SHOW BINLOG EVENTS;
|
||||
exit;
|
||||
}
|
||||
#### END DEBUG INFO ####
|
||||
SELECT * FROM t1;
|
||||
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
|
@ -20,5 +20,5 @@ eval CHANGE MASTER TO MASTER_USER='root',
|
||||
START SLAVE;
|
||||
|
||||
source include/wait_for_slave_sql_to_stop.inc;
|
||||
let $error=query_get_value("show slave status", Last_SQL_Error, 1);
|
||||
echo $error;
|
||||
let $errno=query_get_value("show slave status", Last_SQL_Errno, 1);
|
||||
echo $errno;
|
||||
|
@ -22,6 +22,77 @@ call mtr.add_suppression("Slave: Can\'t find record in \'user\' Error_code: 1032
|
||||
|
||||
sync_with_master;
|
||||
reset master;
|
||||
|
||||
# ##################################################################
|
||||
# BUG#41725: slave crashes when inserting into temporary table after
|
||||
# stop/start slave
|
||||
#
|
||||
# This test checks that both reported issues (assertion failure and
|
||||
# crash) go away. It is implemented as follows:
|
||||
#
|
||||
# case 1: assertion failure
|
||||
# i) create and insert into temporary table on master
|
||||
# ii) sync slave with master
|
||||
# iii) stop and restart slave
|
||||
# iv) insert into master another value
|
||||
# v) sync slave with master
|
||||
#
|
||||
#
|
||||
# case 2: crash (SIGSEV)
|
||||
# i) create and insert into temporary table on master (insert
|
||||
# produces warnings)
|
||||
# ii) sync slave with master
|
||||
# iii) stop and restart slave
|
||||
# iv) insert into master more values
|
||||
# v) sync slave with master
|
||||
|
||||
# case 1: Assertion in Field_string::store() failed because current
|
||||
# thread reference differed from table->in_use after slave
|
||||
# restart
|
||||
|
||||
connection master;
|
||||
|
||||
disable_warnings;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
enable_warnings;
|
||||
|
||||
CREATE TEMPORARY TABLE t1 (a char(1));
|
||||
INSERT INTO t1 VALUES ('a');
|
||||
sync_slave_with_master;
|
||||
|
||||
source include/stop_slave.inc;
|
||||
source include/start_slave.inc;
|
||||
|
||||
connection master;
|
||||
INSERT INTO t1 VALUES ('b');
|
||||
sync_slave_with_master;
|
||||
|
||||
# case 2: crash on sp_rcontext::find_handler because it used
|
||||
# reference to invalid THD object after slave restart
|
||||
|
||||
connection master;
|
||||
|
||||
disable_warnings;
|
||||
DROP TABLE IF EXISTS t1;
|
||||
enable_warnings;
|
||||
CREATE TEMPORARY TABLE `t1`(`a` tinyint,`b` char(1))engine=myisam;
|
||||
INSERT INTO `t1` set `a`=128,`b`='128';
|
||||
|
||||
sync_slave_with_master;
|
||||
|
||||
source include/stop_slave.inc;
|
||||
source include/start_slave.inc;
|
||||
|
||||
connection master;
|
||||
INSERT INTO `t1` set `a`=128,`b`='128';
|
||||
sync_slave_with_master;
|
||||
|
||||
# cleanup
|
||||
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
sync_slave_with_master;
|
||||
|
||||
connection master;
|
||||
|
||||
connect (con1,localhost,root,,);
|
||||
|
@ -1 +1 @@
|
||||
--innodb --ndbcluster=0 --log-slave-updates=0
|
||||
--innodb --loose-ndbcluster=OFF --log-slave-updates=0
|
||||
|
@ -1,16 +1,16 @@
|
||||
'#---------------------BS_STVARS_025_01----------------------#'
|
||||
SELECT COUNT(@@GLOBAL.innodb_data_home_dir);
|
||||
COUNT(@@GLOBAL.innodb_data_home_dir)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
'#---------------------BS_STVARS_025_02----------------------#'
|
||||
SET @@GLOBAL.innodb_data_home_dir=1;
|
||||
ERROR HY000: Variable 'innodb_data_home_dir' is a read only variable
|
||||
Expected error 'Read only variable'
|
||||
SELECT COUNT(@@GLOBAL.innodb_data_home_dir);
|
||||
COUNT(@@GLOBAL.innodb_data_home_dir)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
'#---------------------BS_STVARS_025_03----------------------#'
|
||||
SELECT @@GLOBAL.innodb_data_home_dir = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
@ -20,8 +20,8 @@ NULL
|
||||
1 Expected
|
||||
SELECT COUNT(@@GLOBAL.innodb_data_home_dir);
|
||||
COUNT(@@GLOBAL.innodb_data_home_dir)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_data_home_dir';
|
||||
@ -36,8 +36,8 @@ NULL
|
||||
'#---------------------BS_STVARS_025_05----------------------#'
|
||||
SELECT COUNT(@@innodb_data_home_dir);
|
||||
COUNT(@@innodb_data_home_dir)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
SELECT COUNT(@@local.innodb_data_home_dir);
|
||||
ERROR HY000: Variable 'innodb_data_home_dir' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
@ -46,8 +46,8 @@ ERROR HY000: Variable 'innodb_data_home_dir' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@GLOBAL.innodb_data_home_dir);
|
||||
COUNT(@@GLOBAL.innodb_data_home_dir)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
SELECT innodb_data_home_dir = @@SESSION.innodb_data_home_dir;
|
||||
ERROR 42S22: Unknown column 'innodb_data_home_dir' in 'field list'
|
||||
Expected error 'Readonly variable'
|
||||
|
@ -1,16 +1,16 @@
|
||||
'#---------------------BS_STVARS_029_01----------------------#'
|
||||
SELECT COUNT(@@GLOBAL.innodb_flush_method);
|
||||
COUNT(@@GLOBAL.innodb_flush_method)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
'#---------------------BS_STVARS_029_02----------------------#'
|
||||
SET @@GLOBAL.innodb_flush_method=1;
|
||||
ERROR HY000: Variable 'innodb_flush_method' is a read only variable
|
||||
Expected error 'Read only variable'
|
||||
SELECT COUNT(@@GLOBAL.innodb_flush_method);
|
||||
COUNT(@@GLOBAL.innodb_flush_method)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
'#---------------------BS_STVARS_029_03----------------------#'
|
||||
SELECT @@GLOBAL.innodb_flush_method = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
@ -20,8 +20,8 @@ NULL
|
||||
1 Expected
|
||||
SELECT COUNT(@@GLOBAL.innodb_flush_method);
|
||||
COUNT(@@GLOBAL.innodb_flush_method)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='innodb_flush_method';
|
||||
@ -36,8 +36,8 @@ NULL
|
||||
'#---------------------BS_STVARS_029_05----------------------#'
|
||||
SELECT COUNT(@@innodb_flush_method);
|
||||
COUNT(@@innodb_flush_method)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
SELECT COUNT(@@local.innodb_flush_method);
|
||||
ERROR HY000: Variable 'innodb_flush_method' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
@ -46,8 +46,8 @@ ERROR HY000: Variable 'innodb_flush_method' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@GLOBAL.innodb_flush_method);
|
||||
COUNT(@@GLOBAL.innodb_flush_method)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
SELECT innodb_flush_method = @@SESSION.innodb_flush_method;
|
||||
ERROR 42S22: Unknown column 'innodb_flush_method' in 'field list'
|
||||
Expected error 'Readonly variable'
|
||||
|
@ -12,7 +12,7 @@ DROP TABLE IF EXISTS t1;
|
||||
CREATE TEMPORARY TABLE t1 AS SELECT @@global.init_slave AS my_column;
|
||||
DESCRIBE t1;
|
||||
Field Type Null Key Default Extra
|
||||
my_column varchar(59) NO
|
||||
my_column varchar(59) YES NULL
|
||||
DROP TABLE t1;
|
||||
SELECT @@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1';
|
||||
@@global.init_slave = 'SET @@global.max_connections = @@global.max_connections + 1'
|
||||
|
@ -1,16 +1,16 @@
|
||||
'#---------------------BS_STVARS_046_01----------------------#'
|
||||
SELECT COUNT(@@GLOBAL.ssl_capath);
|
||||
COUNT(@@GLOBAL.ssl_capath)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
'#---------------------BS_STVARS_046_02----------------------#'
|
||||
SET @@GLOBAL.ssl_capath=1;
|
||||
ERROR HY000: Variable 'ssl_capath' is a read only variable
|
||||
Expected error 'Read only variable'
|
||||
SELECT COUNT(@@GLOBAL.ssl_capath);
|
||||
COUNT(@@GLOBAL.ssl_capath)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
'#---------------------BS_STVARS_046_03----------------------#'
|
||||
SELECT @@GLOBAL.ssl_capath = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
@ -20,8 +20,8 @@ NULL
|
||||
1 Expected
|
||||
SELECT COUNT(@@GLOBAL.ssl_capath);
|
||||
COUNT(@@GLOBAL.ssl_capath)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='ssl_capath';
|
||||
@ -36,8 +36,8 @@ NULL
|
||||
'#---------------------BS_STVARS_046_05----------------------#'
|
||||
SELECT COUNT(@@ssl_capath);
|
||||
COUNT(@@ssl_capath)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
SELECT COUNT(@@local.ssl_capath);
|
||||
ERROR HY000: Variable 'ssl_capath' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
@ -46,8 +46,8 @@ ERROR HY000: Variable 'ssl_capath' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@GLOBAL.ssl_capath);
|
||||
COUNT(@@GLOBAL.ssl_capath)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
SELECT ssl_capath = @@SESSION.ssl_capath;
|
||||
ERROR 42S22: Unknown column 'ssl_capath' in 'field list'
|
||||
Expected error 'Readonly variable'
|
||||
|
@ -1,16 +1,16 @@
|
||||
'#---------------------BS_STVARS_048_01----------------------#'
|
||||
SELECT COUNT(@@GLOBAL.ssl_cipher);
|
||||
COUNT(@@GLOBAL.ssl_cipher)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
'#---------------------BS_STVARS_048_02----------------------#'
|
||||
SET @@GLOBAL.ssl_cipher=1;
|
||||
ERROR HY000: Variable 'ssl_cipher' is a read only variable
|
||||
Expected error 'Read only variable'
|
||||
SELECT COUNT(@@GLOBAL.ssl_cipher);
|
||||
COUNT(@@GLOBAL.ssl_cipher)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
'#---------------------BS_STVARS_048_03----------------------#'
|
||||
SELECT @@GLOBAL.ssl_cipher = VARIABLE_VALUE
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
@ -20,8 +20,8 @@ NULL
|
||||
1 Expected
|
||||
SELECT COUNT(@@GLOBAL.ssl_cipher);
|
||||
COUNT(@@GLOBAL.ssl_cipher)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
WHERE VARIABLE_NAME='ssl_cipher';
|
||||
@ -36,8 +36,8 @@ NULL
|
||||
'#---------------------BS_STVARS_048_05----------------------#'
|
||||
SELECT COUNT(@@ssl_cipher);
|
||||
COUNT(@@ssl_cipher)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
SELECT COUNT(@@local.ssl_cipher);
|
||||
ERROR HY000: Variable 'ssl_cipher' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
@ -46,8 +46,8 @@ ERROR HY000: Variable 'ssl_cipher' is a GLOBAL variable
|
||||
Expected error 'Variable is a GLOBAL variable'
|
||||
SELECT COUNT(@@GLOBAL.ssl_cipher);
|
||||
COUNT(@@GLOBAL.ssl_cipher)
|
||||
1
|
||||
1 Expected
|
||||
0
|
||||
0 Expected
|
||||
SELECT ssl_cipher = @@SESSION.ssl_cipher;
|
||||
ERROR 42S22: Unknown column 'ssl_cipher' in 'field list'
|
||||
Expected error 'Readonly variable'
|
||||
|
@ -29,7 +29,7 @@
|
||||
# Displaying default value #
|
||||
####################################################################
|
||||
SELECT COUNT(@@GLOBAL.innodb_data_home_dir);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_025_02----------------------#'
|
||||
@ -42,7 +42,7 @@ SET @@GLOBAL.innodb_data_home_dir=1;
|
||||
--echo Expected error 'Read only variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_data_home_dir);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ WHERE VARIABLE_NAME='innodb_data_home_dir';
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_data_home_dir);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
@ -82,7 +82,7 @@ SELECT @@innodb_data_home_dir = @@GLOBAL.innodb_data_home_dir;
|
||||
################################################################################
|
||||
|
||||
SELECT COUNT(@@innodb_data_home_dir);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT COUNT(@@local.innodb_data_home_dir);
|
||||
@ -93,7 +93,7 @@ SELECT COUNT(@@SESSION.innodb_data_home_dir);
|
||||
--echo Expected error 'Variable is a GLOBAL variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_data_home_dir);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT innodb_data_home_dir = @@SESSION.innodb_data_home_dir;
|
||||
|
@ -29,7 +29,7 @@
|
||||
# Displaying default value #
|
||||
####################################################################
|
||||
SELECT COUNT(@@GLOBAL.innodb_flush_method);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_029_02----------------------#'
|
||||
@ -42,7 +42,7 @@ SET @@GLOBAL.innodb_flush_method=1;
|
||||
--echo Expected error 'Read only variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_flush_method);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ WHERE VARIABLE_NAME='innodb_flush_method';
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_flush_method);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
@ -82,7 +82,7 @@ SELECT @@innodb_flush_method = @@GLOBAL.innodb_flush_method;
|
||||
################################################################################
|
||||
|
||||
SELECT COUNT(@@innodb_flush_method);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT COUNT(@@local.innodb_flush_method);
|
||||
@ -93,7 +93,7 @@ SELECT COUNT(@@SESSION.innodb_flush_method);
|
||||
--echo Expected error 'Variable is a GLOBAL variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.innodb_flush_method);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT innodb_flush_method = @@SESSION.innodb_flush_method;
|
||||
|
@ -27,7 +27,7 @@
|
||||
# Displaying default value #
|
||||
####################################################################
|
||||
SELECT COUNT(@@GLOBAL.ssl_capath);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_046_02----------------------#'
|
||||
@ -40,7 +40,7 @@ SET @@GLOBAL.ssl_capath=1;
|
||||
--echo Expected error 'Read only variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.ssl_capath);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ WHERE VARIABLE_NAME='ssl_capath';
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(@@GLOBAL.ssl_capath);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
@ -80,7 +80,7 @@ SELECT @@ssl_capath = @@GLOBAL.ssl_capath;
|
||||
################################################################################
|
||||
|
||||
SELECT COUNT(@@ssl_capath);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT COUNT(@@local.ssl_capath);
|
||||
@ -91,7 +91,7 @@ SELECT COUNT(@@SESSION.ssl_capath);
|
||||
--echo Expected error 'Variable is a GLOBAL variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.ssl_capath);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT ssl_capath = @@SESSION.ssl_capath;
|
||||
|
@ -27,7 +27,7 @@
|
||||
# Displaying default value #
|
||||
####################################################################
|
||||
SELECT COUNT(@@GLOBAL.ssl_cipher);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
|
||||
--echo '#---------------------BS_STVARS_048_02----------------------#'
|
||||
@ -40,7 +40,7 @@ SET @@GLOBAL.ssl_cipher=1;
|
||||
--echo Expected error 'Read only variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.ssl_cipher);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
|
||||
|
||||
@ -56,7 +56,7 @@ WHERE VARIABLE_NAME='ssl_cipher';
|
||||
--echo 1 Expected
|
||||
|
||||
SELECT COUNT(@@GLOBAL.ssl_cipher);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
SELECT COUNT(VARIABLE_VALUE)
|
||||
FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES
|
||||
@ -80,7 +80,7 @@ SELECT @@ssl_cipher = @@GLOBAL.ssl_cipher;
|
||||
################################################################################
|
||||
|
||||
SELECT COUNT(@@ssl_cipher);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
--Error ER_INCORRECT_GLOBAL_LOCAL_VAR
|
||||
SELECT COUNT(@@local.ssl_cipher);
|
||||
@ -91,7 +91,7 @@ SELECT COUNT(@@SESSION.ssl_cipher);
|
||||
--echo Expected error 'Variable is a GLOBAL variable'
|
||||
|
||||
SELECT COUNT(@@GLOBAL.ssl_cipher);
|
||||
--echo 1 Expected
|
||||
--echo 0 Expected
|
||||
|
||||
--Error ER_BAD_FIELD_ERROR
|
||||
SELECT ssl_cipher = @@SESSION.ssl_cipher;
|
||||
|
@ -94,5 +94,11 @@ INSERT INTO `t1` VALUES
|
||||
(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'100000',b'010010',b'011111',4,5,5,5,5,5,5,5,5,5,3,2,1),
|
||||
(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'000000',b'001100',b'111111',4,5,5,5,5,5,5,5,5,5,3,2,1),
|
||||
(NULL,1,1,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,b'111111',b'000000',b'000000',4,5,5,5,5,5,5,5,5,5,3,2,1);
|
||||
# Determine the number of open sessions
|
||||
--source include/count_sessions.inc
|
||||
--exec $MYSQL_DUMP --hex-blob --compact --order-by-primary --skip-extended-insert --no-create-info test t1
|
||||
drop table t1;
|
||||
# Wait till the number of open sessions is <= the number before the run with $MYSQL_DUMP
|
||||
# = The session caused by mysqldump has finished its disconnect
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
||||
|
@ -269,3 +269,18 @@ SELECT HOUR(NULL),
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
||||
--echo #
|
||||
--echo # Bug #44766: valgrind error when using convert() in a subquery
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1(a tinyint);
|
||||
INSERT INTO t1 VALUES (127);
|
||||
SELECT 1 FROM
|
||||
(
|
||||
SELECT CONVERT(t2.a USING UTF8) FROM t1, t1 t2 LIMIT 1
|
||||
) AS s LIMIT 1;
|
||||
DROP TABLE t1;
|
||||
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@ -18,6 +18,10 @@ create table t1 (
|
||||
`a>b` text
|
||||
);
|
||||
insert into t1 values (1, 2, 'a&b a<b a>b');
|
||||
|
||||
# Determine the number of open sessions
|
||||
--source include/count_sessions.inc
|
||||
|
||||
--exec $MYSQL --xml test -e "select * from t1"
|
||||
--exec $MYSQL_DUMP --xml --skip-create test
|
||||
|
||||
@ -33,3 +37,8 @@ drop table t1;
|
||||
|
||||
# Restore global concurrent_insert value
|
||||
set @@global.concurrent_insert= @old_concurrent_insert;
|
||||
|
||||
# Wait till the number of open sessions is <= the number before the runs with
|
||||
# $MYSQL and $MYSQL_DUMP
|
||||
# = The session caused by mysql and mysqldump have finished their disconnect
|
||||
--source include/wait_until_count_sessions.inc
|
||||
|
@ -12,9 +12,9 @@ connect (con1,localhost,root,,);
|
||||
--echo # Establish connection con2 (user=root)
|
||||
connect (con2,localhost,root,,);
|
||||
|
||||
### Test 1:
|
||||
### - While a consistent snapshot transaction is executed,
|
||||
### no external inserts should be visible to the transaction.
|
||||
--echo ### Test 1:
|
||||
--echo ### - While a consistent snapshot transaction is executed,
|
||||
--echo ### no external inserts should be visible to the transaction.
|
||||
|
||||
--echo # Switch to connection con1
|
||||
connection con1;
|
||||
@ -31,9 +31,9 @@ SELECT * FROM t1; # if consistent snapshot was set as expected, we
|
||||
# should see nothing.
|
||||
COMMIT;
|
||||
|
||||
### Test 2:
|
||||
### - For any non-consistent snapshot transaction, external
|
||||
### committed inserts should be visible to the transaction.
|
||||
--echo ### Test 2:
|
||||
--echo ### - For any non-consistent snapshot transaction, external
|
||||
--echo ### committed inserts should be visible to the transaction.
|
||||
|
||||
DELETE FROM t1;
|
||||
START TRANSACTION; # Now we omit WITH CONSISTENT SNAPSHOT
|
||||
@ -48,6 +48,24 @@ SELECT * FROM t1; # if consistent snapshot was not set, as expected, we
|
||||
# should see 1.
|
||||
COMMIT;
|
||||
|
||||
--echo ### Test 3:
|
||||
--echo ### - Bug#44664: valgrind warning for COMMIT_AND_CHAIN and ROLLBACK_AND_CHAIN
|
||||
--echo ### Chaining a transaction does not retain consistency level.
|
||||
|
||||
START TRANSACTION WITH CONSISTENT SNAPSHOT;
|
||||
DELETE FROM t1;
|
||||
COMMIT WORK AND CHAIN;
|
||||
|
||||
--echo # Switch to connection con2
|
||||
connection con2;
|
||||
INSERT INTO t1 VALUES(1);
|
||||
|
||||
--echo # Switch to connection con1
|
||||
connection con1;
|
||||
SELECT * FROM t1; # if consistent snapshot was not set, as expected, we
|
||||
# should see 1.
|
||||
COMMIT;
|
||||
|
||||
--echo # Switch to connection default + close connections con1 and con2
|
||||
connection default;
|
||||
disconnect con1;
|
||||
|
@ -1800,10 +1800,11 @@ connect (con1,localhost,root,,);
|
||||
# EE_FILENOTFOUND 29
|
||||
--error 29
|
||||
select * from t1;
|
||||
--disconnect con1
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
unlock tables;
|
||||
drop table t1;
|
||||
--disconnect con1
|
||||
|
||||
#
|
||||
# Bug#41441 repair csv table crashes debug server
|
||||
|
@ -34,4 +34,10 @@ delimiter ;|
|
||||
--error 1220
|
||||
SHOW BINLOG EVENTS FROM 364;
|
||||
|
||||
--echo Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment.
|
||||
CREATE TABLE t1 (a varchar(16)) character set cp932;
|
||||
INSERT INTO t1 VALUES (0x8372835E),(0x8352835E);
|
||||
SELECT hex(a), hex(lower(a)), hex(upper(a)) FROM t1 ORDER BY binary(a);
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.1 tests
|
||||
|
@ -83,3 +83,13 @@ SET NAMES sjis;
|
||||
SELECT HEX('佐淘 圭') FROM DUAL;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
||||
--echo # Start of 5.1 tests
|
||||
|
||||
--echo Bug#44352 UPPER/LOWER function doesn't work correctly on cp932 and sjis environment.
|
||||
CREATE TABLE t1 (a varchar(16)) character set sjis;
|
||||
INSERT INTO t1 VALUES (0x8372835E),(0x8352835E);
|
||||
SELECT hex(a), hex(lower(a)), hex(upper(a)) FROM t1 ORDER BY binary(a);
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo # End of 5.1 tests
|
||||
|
@ -1128,15 +1128,22 @@ SHOW CREATE TABLE mysqltest2.t2|
|
||||
#
|
||||
# Cleanup.
|
||||
#
|
||||
delimiter ;|
|
||||
|
||||
--connection con2
|
||||
--echo
|
||||
--echo ---> connection: con2
|
||||
--disconnect con2
|
||||
--source include/wait_until_disconnected.inc
|
||||
--connection con3
|
||||
--echo
|
||||
--echo ---> connection: con3
|
||||
--disconnect con3
|
||||
--source include/wait_until_disconnected.inc
|
||||
--connection default
|
||||
--echo
|
||||
--echo ---> connection: default
|
||||
USE test;
|
||||
DROP DATABASE mysqltest1;
|
||||
DROP DATABASE mysqltest2;
|
||||
|
||||
--disconnect con2
|
||||
--disconnect con3
|
||||
|
||||
use test|
|
||||
|
||||
DROP DATABASE mysqltest1|
|
||||
DROP DATABASE mysqltest2|
|
||||
|
@ -1128,15 +1128,22 @@ SHOW CREATE TABLE mysqltest2.t2|
|
||||
#
|
||||
# Cleanup.
|
||||
#
|
||||
delimiter ;|
|
||||
|
||||
--connection con2
|
||||
--echo
|
||||
--echo ---> connection: con2
|
||||
--disconnect con2
|
||||
--source include/wait_until_disconnected.inc
|
||||
--connection con3
|
||||
--echo
|
||||
--echo ---> connection: con3
|
||||
--disconnect con3
|
||||
--source include/wait_until_disconnected.inc
|
||||
--connection default
|
||||
--echo
|
||||
--echo ---> connection: default
|
||||
USE test;
|
||||
DROP DATABASE mysqltest1;
|
||||
DROP DATABASE mysqltest2;
|
||||
|
||||
--disconnect con2
|
||||
--disconnect con3
|
||||
|
||||
use test|
|
||||
|
||||
DROP DATABASE mysqltest1|
|
||||
DROP DATABASE mysqltest2|
|
||||
|
@ -273,7 +273,9 @@ select t2.* from ((select * from t1) as A inner join t2 on A.ID = t2.FID);
|
||||
select t2.* from (select * from t1) as A inner join t2 on A.ID = t2.FID;
|
||||
drop table t1, t2;
|
||||
|
||||
connection con1;
|
||||
disconnect con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
drop user mysqltest_1;
|
||||
|
||||
|
@ -10,8 +10,6 @@
|
||||
#
|
||||
##############################################################################
|
||||
kill : Bug#37780 2008-12-03 HHunger need some changes to be robust enough for pushbuild.
|
||||
innodb_bug39438 : BUG#42383 2009-01-28 lsoares "This fails in embedded and on windows. Note that this test is not run on windows and on embedded in PB for main trees currently"
|
||||
innodb_bug39438 : Bug#42383 2009-01-28 lsoares "This fails in embedded and on windows. Note that this test is not run on windows and on embedded in PB for main trees currently"
|
||||
query_cache_28249 : Bug#43861 2009-03-25 main.query_cache_28249 fails sporadically
|
||||
|
||||
#concurrent_innodb_safelog: disabled for embedded server due to bug#43733 Select on processlist let the embedded server crash (concurrent_innodb_safelog).
|
||||
#concurrent_innodb_unsafelog: disabled for embedded server due to bug#43733.
|
||||
init_connect : Bug#44920 2009-05-18 pcrews MTR2 is not processing master.opt input properly on Windows
|
||||
|
@ -117,8 +117,11 @@ connection addconroot1;
|
||||
--reap
|
||||
connection addconroot2;
|
||||
--reap
|
||||
disconnect addconroot1;
|
||||
disconnect addconroot2;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection addconroot1;
|
||||
disconnect addconroot1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
@ -97,7 +97,9 @@ DROP EVENT one_event;
|
||||
connection default;
|
||||
--echo "One event should not be there"
|
||||
SELECT EVENT_CATALOG, EVENT_SCHEMA, EVENT_NAME, DEFINER, EVENT_BODY, EVENT_DEFINITION, EVENT_TYPE, EXECUTE_AT, INTERVAL_VALUE, INTERVAL_FIELD, STATUS,ON_COMPLETION, EVENT_COMMENT FROM INFORMATION_SCHEMA.EVENTS ORDER BY EVENT_SCHEMA, EVENT_NAME;
|
||||
connection ev_con1;
|
||||
disconnect ev_con1;
|
||||
--source include/wait_until_disconnected.inc
|
||||
connection default;
|
||||
DROP USER ev_test@localhost;
|
||||
DROP DATABASE events_test2;
|
||||
@ -106,9 +108,6 @@ DROP DATABASE events_test2;
|
||||
# End of tests
|
||||
#
|
||||
|
||||
let $wait_condition=
|
||||
select count(*) = 0 from information_schema.processlist
|
||||
where db='events_test' and command = 'Connect' and user=current_user();
|
||||
--source include/wait_condition.inc
|
||||
--source include/check_events_off.inc
|
||||
|
||||
DROP DATABASE events_test;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user