Commit 49b10f5e authored by Vasil Dimov's avatar Vasil Dimov

Merge mysql-5.1 -> mysql-5.1-innodb

parents 9a961662 7e6caa63
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
*.core *.core
*.d *.d
*.da *.da
*.dir
*.dll *.dll
*.exe *.exe
*.exp *.exp
...@@ -30,6 +31,7 @@ ...@@ -30,6 +31,7 @@
*.pdb *.pdb
*.reject *.reject
*.res *.res
*.rule
*.sbr *.sbr
*.so *.so
*.so.* *.so.*
...@@ -37,6 +39,8 @@ ...@@ -37,6 +39,8 @@
*.user *.user
*.vcproj *.vcproj
*.vcproj.cmake *.vcproj.cmake
*.vcxproj
*.vcxproj.filters
*/*.dir/* */*.dir/*
*/*_pure_*warnings */*_pure_*warnings
*/.deps */.deps
...@@ -45,7 +49,7 @@ ...@@ -45,7 +49,7 @@
*/debug/* */debug/*
*/minsizerel/* */minsizerel/*
*/release/* */release/*
*/relwithdebinfo/* RelWithDebInfo
*~ *~
.*.swp .*.swp
./CMakeCache.txt ./CMakeCache.txt
......
...@@ -59,6 +59,7 @@ ADD_DEFINITIONS(-D__NT__) ...@@ -59,6 +59,7 @@ ADD_DEFINITIONS(-D__NT__)
IF(CYBOZU) IF(CYBOZU)
ADD_DEFINITIONS(-DCYBOZU) ADD_DEFINITIONS(-DCYBOZU)
ADD_DEFINITIONS(-DHAVE_UTF8_GENERAL_CS)
ENDIF(CYBOZU) ENDIF(CYBOZU)
IF(EXTRA_DEBUG) IF(EXTRA_DEBUG)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -705,10 +705,18 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev, ...@@ -705,10 +705,18 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
*/ */
start_datetime= 0; start_datetime= 0;
offset= 0; // print everything and protect against cycling rec_count offset= 0; // print everything and protect against cycling rec_count
/*
Skip events according to the --server-id flag. However, don't
skip format_description or rotate events, because they they
are really "global" events that are relevant for the entire
binlog, even if they have a server_id. Also, we have to read
the format_description event so that we can parse subsequent
events.
*/
if (ev_type != ROTATE_EVENT &&
server_id && (server_id != ev->server_id))
goto end;
} }
if (server_id && (server_id != ev->server_id))
/* skip just this event, continue processing the log. */
goto end;
if (((my_time_t)(ev->when) >= stop_datetime) if (((my_time_t)(ev->when) >= stop_datetime)
|| (pos >= stop_position_mot)) || (pos >= stop_position_mot))
{ {
......
...@@ -8032,13 +8032,15 @@ int main(int argc, char **argv) ...@@ -8032,13 +8032,15 @@ int main(int argc, char **argv)
cur_file->lineno= 1; cur_file->lineno= 1;
} }
init_re(); init_re();
/* Cursor protcol implies ps protocol */
if (cursor_protocol)
ps_protocol= 1;
ps_protocol_enabled= ps_protocol; ps_protocol_enabled= ps_protocol;
sp_protocol_enabled= sp_protocol; sp_protocol_enabled= sp_protocol;
view_protocol_enabled= view_protocol; view_protocol_enabled= view_protocol;
cursor_protocol_enabled= cursor_protocol; cursor_protocol_enabled= cursor_protocol;
/* Cursor protcol implies ps protocol */
if (cursor_protocol_enabled)
ps_protocol_enabled= 1;
st_connection *con= connections; st_connection *con= connections;
if (!( mysql_init(&con->mysql))) if (!( mysql_init(&con->mysql)))
......
...@@ -32,7 +32,6 @@ static my_bool verbose, print_all_codes; ...@@ -32,7 +32,6 @@ static my_bool verbose, print_all_codes;
#include "../include/my_base.h" #include "../include/my_base.h"
#include "../mysys/my_handler_errors.h" #include "../mysys/my_handler_errors.h"
#include "../include/my_handler.h"
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE #ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
static my_bool ndb_code; static my_bool ndb_code;
...@@ -185,6 +184,36 @@ static const char *get_ha_error_msg(int code) ...@@ -185,6 +184,36 @@ static const char *get_ha_error_msg(int code)
} }
/*
Register handler error messages for usage with my_error()
NOTES
This is safe to call multiple times as my_error_register()
will ignore calls to register already registered error numbers.
*/
void my_handler_error_register(void)
{
/*
If you got compilation error here about compile_time_assert array, check
that every HA_ERR_xxx constant has a corresponding error message in
handler_error_messages[] list (check mysys/ma_handler_errors.h and
include/my_base.h).
*/
compile_time_assert(HA_ERR_FIRST + array_elements(handler_error_messages) ==
HA_ERR_LAST + 1);
my_error_register(handler_error_messages, HA_ERR_FIRST,
HA_ERR_FIRST+ array_elements(handler_error_messages)-1);
}
void my_handler_error_unregister(void)
{
my_error_unregister(HA_ERR_FIRST,
HA_ERR_FIRST+ array_elements(handler_error_messages)-1);
}
#if defined(__WIN__) #if defined(__WIN__)
static my_bool print_win_error_msg(DWORD error, my_bool verbose) static my_bool print_win_error_msg(DWORD error, my_bool verbose)
{ {
......
...@@ -308,7 +308,7 @@ SSL::SSL(SSL_CTX* ctx) ...@@ -308,7 +308,7 @@ SSL::SSL(SSL_CTX* ctx)
SetError(YasslError(err)); SetError(YasslError(err));
return; return;
} }
else if (serverSide) { else if (serverSide && !(ctx->GetCiphers().setSuites_)) {
// remove RSA or DSA suites depending on cert key type // remove RSA or DSA suites depending on cert key type
ProtocolVersion pv = secure_.get_connection().version_; ProtocolVersion pv = secure_.get_connection().version_;
......
...@@ -37,7 +37,7 @@ noinst_HEADERS = config-win.h config-netware.h my_bit.h \ ...@@ -37,7 +37,7 @@ noinst_HEADERS = config-win.h config-netware.h my_bit.h \
my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \ my_nosys.h my_alarm.h queues.h rijndael.h sha1.h \
my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \ my_aes.h my_tree.h my_trie.h hash.h thr_alarm.h \
thr_lock.h t_ctype.h violite.h my_md5.h base64.h \ thr_lock.h t_ctype.h violite.h my_md5.h base64.h \
my_handler.h my_time.h my_vle.h my_user.h \ my_compare.h my_time.h my_vle.h my_user.h \
my_libwrap.h my_stacktrace.h my_libwrap.h my_stacktrace.h
EXTRA_DIST = mysql.h.pp mysql/plugin.h.pp EXTRA_DIST = mysql.h.pp mysql/plugin.h.pp
......
...@@ -30,7 +30,7 @@ extern "C" { ...@@ -30,7 +30,7 @@ extern "C" {
#include <thr_lock.h> #include <thr_lock.h>
#endif #endif
#include "my_handler.h" #include "my_compare.h"
#include "my_tree.h" #include "my_tree.h"
/* defines used by heap-funktions */ /* defines used by heap-funktions */
......
/* Copyright (C) 2002-2006 MySQL AB /* Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
This program is free software; you can redistribute it and/or This program is free software; you can redistribute it and/or modify
modify it under the terms of the GNU Library General Public it under the terms of the GNU General Public License as published by
License as published by the Free Software Foundation; version 2 the Free Software Foundation; version 2 of the License.
of the License.
This program is distributed in the hope that it will be useful, This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Library General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU Library General Public You should have received a copy of the GNU General Public License
License along with this library; if not, write to the Free along with this program; if not, write to the Free Software
Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
MA 02111-1307, USA */
#ifndef _my_handler_h #ifndef _my_compare_h
#define _my_handler_h #define _my_compare_h
#include "my_base.h"
#include "m_ctype.h"
#include "myisampack.h" #include "myisampack.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
There is a hard limit for the maximum number of keys as there are only
8 bits in the index file header for the number of keys in a table.
This means that 0..255 keys can exist for a table. The idea of
HA_MAX_POSSIBLE_KEY is to ensure that one can use myisamchk & tools on
a MyISAM table for which one has more keys than MyISAM is normally
compiled for. If you don't have this, you will get a core dump when
running myisamchk compiled for 128 keys on a table with 255 keys.
*/
#define HA_MAX_POSSIBLE_KEY 255 /* For myisamchk */
/*
The following defines can be increased if necessary.
But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH.
*/
#define HA_MAX_KEY_LENGTH 1000 /* Max length in bytes */
#define HA_MAX_KEY_SEG 16 /* Max segments for key */
#define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6)
#define HA_MAX_KEY_BUFF (HA_MAX_KEY_LENGTH+HA_MAX_KEY_SEG*6+8+8)
typedef struct st_HA_KEYSEG /* Key-portion */ typedef struct st_HA_KEYSEG /* Key-portion */
{ {
...@@ -61,35 +36,33 @@ typedef struct st_HA_KEYSEG /* Key-portion */ ...@@ -61,35 +36,33 @@ typedef struct st_HA_KEYSEG /* Key-portion */
} HA_KEYSEG; } HA_KEYSEG;
#define get_key_length(length,key) \ #define get_key_length(length,key) \
{ if (*(uchar*) (key) != 255) \ { if ((uchar) *(key) != 255) \
length= (uint) *(uchar*) ((key)++); \ length= (uint) (uchar) *((key)++); \
else \ else \
{ length= mi_uint2korr((key)+1); (key)+=3; } \ { length=mi_uint2korr((key)+1); (key)+=3; } \
} }
#define get_key_length_rdonly(length,key) \ #define get_key_length_rdonly(length,key) \
{ if (*(uchar*) (key) != 255) \ { if ((uchar) *(key) != 255) \
length= ((uint) *(uchar*) ((key))); \ length= ((uint) (uchar) *((key))); \
else \ else \
{ length= mi_uint2korr((key)+1); } \ { length=mi_uint2korr((key)+1); } \
} }
#define get_key_pack_length(length,length_pack,key) \ #define get_key_pack_length(length,length_pack,key) \
{ if (*(uchar*) (key) != 255) \ { if ((uchar) *(key) != 255) \
{ length= (uint) *(uchar*) ((key)++); length_pack= 1; }\ { length= (uint) (uchar) *((key)++); length_pack=1; }\
else \ else \
{ length=mi_uint2korr((key)+1); (key)+= 3; length_pack= 3; } \ { length=mi_uint2korr((key)+1); (key)+=3; length_pack=3; } \
} }
#define store_key_length_inc(key,length) \ #define store_key_length_inc(key,length) \
{ if ((length) < 255) \ { if ((length) < 255) \
{ *(key)++= (length); } \ { *(key)++=(length); } \
else \ else \
{ *(key)=255; mi_int2store((key)+1,(length)); (key)+=3; } \ { *(key)=255; mi_int2store((key)+1,(length)); (key)+=3; } \
} }
#define size_to_store_key_length(length) ((length) < 255 ? 1 : 3)
#define get_rec_bits(bit_ptr, bit_ofs, bit_len) \ #define get_rec_bits(bit_ptr, bit_ofs, bit_len) \
(((((uint16) (bit_ptr)[1] << 8) | (uint16) (bit_ptr)[0]) >> (bit_ofs)) & \ (((((uint16) (bit_ptr)[1] << 8) | (uint16) (bit_ptr)[0]) >> (bit_ofs)) & \
((1 << (bit_len)) - 1)) ((1 << (bit_len)) - 1))
...@@ -112,17 +85,5 @@ extern int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a, ...@@ -112,17 +85,5 @@ extern int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
register uchar *b, uint key_length, uint nextflag, register uchar *b, uint key_length, uint nextflag,
uint *diff_pos); uint *diff_pos);
extern HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a);
extern void my_handler_error_register(void);
extern void my_handler_error_unregister(void);
/*
Inside an in-memory data record, memory pointers to pieces of the
record (like BLOBs) are stored in their native byte order and in
this amount of bytes.
*/
#define portable_sizeof_char_ptr 8
#ifdef __cplusplus
}
#endif
#endif /* _my_handler_h */ #endif /* _my_compare_h */
...@@ -359,7 +359,7 @@ C_MODE_END ...@@ -359,7 +359,7 @@ C_MODE_END
#define ulonglong2double(A) my_ulonglong2double(A) #define ulonglong2double(A) my_ulonglong2double(A)
#define my_off_t2double(A) my_ulonglong2double(A) #define my_off_t2double(A) my_ulonglong2double(A)
C_MODE_START C_MODE_START
double my_ulonglong2double(unsigned long long A); inline double my_ulonglong2double(unsigned long long A) { return (double) A; }
C_MODE_END C_MODE_END
#endif /* _AIX */ #endif /* _AIX */
......
...@@ -30,8 +30,30 @@ extern "C" { ...@@ -30,8 +30,30 @@ extern "C" {
#ifndef _keycache_h #ifndef _keycache_h
#include "keycache.h" #include "keycache.h"
#endif #endif
#include "my_handler.h"
#include <mysql/plugin.h> #include <mysql/plugin.h>
#include "my_compare.h"
/*
There is a hard limit for the maximum number of keys as there are only
8 bits in the index file header for the number of keys in a table.
This means that 0..255 keys can exist for a table. The idea of
HA_MAX_POSSIBLE_KEY is to ensure that one can use myisamchk & tools on
a MyISAM table for which one has more keys than MyISAM is normally
compiled for. If you don't have this, you will get a core dump when
running myisamchk compiled for 128 keys on a table with 255 keys.
*/
#define HA_MAX_POSSIBLE_KEY 255 /* For myisamchk */
/*
The following defines can be increased if necessary.
But beware the dependency of MI_MAX_POSSIBLE_KEY_BUFF and HA_MAX_KEY_LENGTH.
*/
#define HA_MAX_KEY_LENGTH 1000 /* Max length in bytes */
#define HA_MAX_KEY_SEG 16 /* Max segments for key */
#define HA_MAX_POSSIBLE_KEY_BUFF (HA_MAX_KEY_LENGTH + 24+ 6+6)
#define HA_MAX_KEY_BUFF (HA_MAX_KEY_LENGTH+HA_MAX_KEY_SEG*6+8+8)
/* /*
Limit max keys according to HA_MAX_POSSIBLE_KEY Limit max keys according to HA_MAX_POSSIBLE_KEY
......
...@@ -82,7 +82,7 @@ SET(CLIENT_SOURCES ../mysys/array.c ../strings/bchange.c ../strings/bmove.c ...@@ -82,7 +82,7 @@ SET(CLIENT_SOURCES ../mysys/array.c ../strings/bchange.c ../strings/bmove.c
../mysys/mf_wcomp.c ../mysys/mulalloc.c ../mysys/my_access.c ../mysys/my_alloc.c ../mysys/mf_wcomp.c ../mysys/mulalloc.c ../mysys/my_access.c ../mysys/my_alloc.c
../mysys/my_chsize.c ../mysys/my_compress.c ../mysys/my_create.c ../mysys/my_chsize.c ../mysys/my_compress.c ../mysys/my_create.c
../mysys/my_delete.c ../mysys/my_div.c ../mysys/my_error.c ../mysys/my_file.c ../mysys/my_delete.c ../mysys/my_div.c ../mysys/my_error.c ../mysys/my_file.c
../mysys/my_fopen.c ../mysys/my_fstream.c ../mysys/my_gethostbyname.c ../mysys/my_fopen.c ../mysys/my_fstream.c
../mysys/my_getopt.c ../mysys/my_getwd.c ../mysys/my_init.c ../mysys/my_lib.c ../mysys/my_getopt.c ../mysys/my_getwd.c ../mysys/my_init.c ../mysys/my_lib.c
../mysys/my_malloc.c ../mysys/my_messnc.c ../mysys/my_net.c ../mysys/my_once.c ../mysys/my_malloc.c ../mysys/my_messnc.c ../mysys/my_net.c ../mysys/my_once.c
../mysys/my_open.c ../mysys/my_pread.c ../mysys/my_pthread.c ../mysys/my_read.c ../mysys/my_open.c ../mysys/my_pread.c ../mysys/my_pthread.c ../mysys/my_read.c
......
...@@ -66,7 +66,7 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \ ...@@ -66,7 +66,7 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \
charset.lo charset-def.lo hash.lo mf_iocache.lo \ charset.lo charset-def.lo hash.lo mf_iocache.lo \
mf_iocache2.lo my_seek.lo my_sleep.lo \ mf_iocache2.lo my_seek.lo my_sleep.lo \
my_pread.lo mf_cache.lo md5.lo sha1.lo \ my_pread.lo mf_cache.lo md5.lo sha1.lo \
my_getopt.lo my_gethostbyname.lo my_port.lo \ my_getopt.lo \
my_rename.lo my_chsize.lo my_sync.lo my_getsystime.lo my_rename.lo my_chsize.lo my_sync.lo my_getsystime.lo
sqlobjects = net.lo sqlobjects = net.lo
sql_cmn_objects = pack.lo client.lo my_time.lo sql_cmn_objects = pack.lo client.lo my_time.lo
......
...@@ -343,6 +343,7 @@ SHOW SESSION VARIABLES LIKE "%_checks"; ...@@ -343,6 +343,7 @@ SHOW SESSION VARIABLES LIKE "%_checks";
--echo # INSERT INTO t1 VALUES(2) --echo # INSERT INTO t1 VALUES(2)
--echo # foreign_key_checks=1 and unique_checks=1 --echo # foreign_key_checks=1 and unique_checks=1
--echo # It should not change current session's variables, even error happens --echo # It should not change current session's variables, even error happens
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
--error 1062 --error 1062
BINLOG ' BINLOG '
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
......
...@@ -93,6 +93,7 @@ if (`SELECT @@global.binlog_format != 'ROW' OR @@global.slave_exec_mode = 'STRIC ...@@ -93,6 +93,7 @@ if (`SELECT @@global.binlog_format != 'ROW' OR @@global.slave_exec_mode = 'STRIC
source include/wait_for_slave_sql_error.inc; source include/wait_for_slave_sql_error.inc;
let $err= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1); let $err= query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
--echo Last_SQL_Error = $err (expected "duplicate key" error) --echo Last_SQL_Error = $err (expected "duplicate key" error)
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
SELECT * FROM t1; SELECT * FROM t1;
--echo ---- Resolve the conflict on the slave and restart SQL thread ---- --echo ---- Resolve the conflict on the slave and restart SQL thread ----
...@@ -137,6 +138,7 @@ connection slave; ...@@ -137,6 +138,7 @@ connection slave;
# replication continues. # replication continues.
if (`SELECT @@global.binlog_format = 'ROW' AND @@global.slave_exec_mode = 'STRICT'`) { if (`SELECT @@global.binlog_format = 'ROW' AND @@global.slave_exec_mode = 'STRICT'`) {
--echo ---- Wait until slave stops with an error ---- --echo ---- Wait until slave stops with an error ----
call mtr.add_suppression("Can.t find record in .t1., Error_code: 1032");
let $slave_sql_errno= 1032; # ER_KEY_NOT_FOUND let $slave_sql_errno= 1032; # ER_KEY_NOT_FOUND
source include/wait_for_slave_sql_error.inc; source include/wait_for_slave_sql_error.inc;
......
...@@ -121,6 +121,12 @@ SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9, ...@@ -121,6 +121,12 @@ SELECT f1,f2,f3,f4,f5,f6,f7,f8,f9,
hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20; hex(f10),hex(f11) FROM t1 ORDER BY f3 LIMIT 20;
#connection slave; #connection slave;
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
sync_slave_with_master; sync_slave_with_master;
--echo --echo
--echo * Select count and 20 rows from Slave * --echo * Select count and 20 rows from Slave *
......
...@@ -766,6 +766,10 @@ RESET MASTER; ...@@ -766,6 +766,10 @@ RESET MASTER;
connection slave; connection slave;
START SLAVE; START SLAVE;
call mtr.add_suppression("Slave SQL.*Error .Unknown table .t6.. on query.* Error_code: 1051");
call mtr.add_suppression("Slave SQL.*Error .Duplicate column name .c6.. on query.* Error_code: 1060");
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column . ...e mismatch.* Error_code: 1535");
--echo *** Master Data Insert *** --echo *** Master Data Insert ***
connection master; connection master;
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
......
...@@ -63,6 +63,8 @@ eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1; ...@@ -63,6 +63,8 @@ eval $lower_stmt_head infile '../../std_data/rpl_loaddata.dat' into table t1;
save_master_pos; save_master_pos;
connection slave; connection slave;
# 1062 = ER_DUP_ENTRY # 1062 = ER_DUP_ENTRY
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
--let $slave_sql_errno= 1062 --let $slave_sql_errno= 1062
--source include/wait_for_slave_sql_error_and_skip.inc --source include/wait_for_slave_sql_error_and_skip.inc
......
...@@ -62,4 +62,24 @@ UPDATE t1 SET c1= 0; ...@@ -62,4 +62,24 @@ UPDATE t1 SET c1= 0;
DROP TABLE t1; DROP TABLE t1;
-- sync_slave_with_master -- sync_slave_with_master
#
# BUG#11766865: 60091: RBR + NO PK + UPDATE NULL VALUE --> SLAVE BREAK WITH ERROR HA_ERR_END_OF_
#
--connection master
--source include/rpl_reset.inc
--connection master
--eval CREATE TABLE t1 (c1 int(11) NOT NULL, c2 int(11) NOT NULL, c3 int(11) DEFAULT '-1') ENGINE=$engine DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (1,2,NULL);
UPDATE t1 SET c1=1, c2=2, c3=-1 WHERE c1=1 AND c2=2 AND ISNULL(c3);
--sync_slave_with_master
--let $diff_tables=master:test.t1, slave:test.t1
--source include/diff_tables.inc
--connection master
DROP TABLE t1;
--sync_slave_with_master
...@@ -371,7 +371,9 @@ INSERT INTO t3 VALUES (1, "", 1); ...@@ -371,7 +371,9 @@ INSERT INTO t3 VALUES (1, "", 1);
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2); INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
connection slave; connection slave;
# 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF # 1535 = ER_BINLOG_ROW_WRONG_TABLE_DEF
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032");
--let $slave_sql_errno= 1535 --let $slave_sql_errno= 1535
--let $show_slave_sql_error= 1 --let $show_slave_sql_error= 1
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc
......
...@@ -147,6 +147,7 @@ sync_slave_with_master; ...@@ -147,6 +147,7 @@ sync_slave_with_master;
connection master; connection master;
INSERT INTO t4 VALUES (4); INSERT INTO t4 VALUES (4);
connection slave; connection slave;
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* Error_code: 1535");
--let $slave_skip_counter= 2 --let $slave_skip_counter= 2
--let $slave_sql_errno= 1535 --let $slave_sql_errno= 1535
--let $show_slave_sql_error= 1 --let $show_slave_sql_error= 1
......
...@@ -25,6 +25,7 @@ drop table t1; ...@@ -25,6 +25,7 @@ drop table t1;
connection slave; connection slave;
--source include/wait_for_slave_sql_to_stop.inc --source include/wait_for_slave_sql_to_stop.inc
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.* error code=1062.*Error on slave:.* Error_code: 0");
let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1); let $error= query_get_value(SHOW SLAVE STATUS, Last_SQL_Error, 1);
let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1); let $errno= query_get_value(SHOW SLAVE STATUS, Last_SQL_Errno, 1);
--echo Error: "$error" (expected different error codes on master and slave) --echo Error: "$error" (expected different error codes on master and slave)
......
...@@ -107,7 +107,6 @@ INSERT INTO global_suppressions VALUES ...@@ -107,7 +107,6 @@ INSERT INTO global_suppressions VALUES
("Slave: The incident LOST_EVENTS occured on the master"), ("Slave: The incident LOST_EVENTS occured on the master"),
("Slave: Unknown error.* 1105"), ("Slave: Unknown error.* 1105"),
("Slave: Can't drop database.* database doesn't exist"), ("Slave: Can't drop database.* database doesn't exist"),
("Slave SQL:.*(Error_code: \[\[:digit:\]\]+|Query:.*)"),
("Sort aborted"), ("Sort aborted"),
("Time-out in NDB"), ("Time-out in NDB"),
("Warning:\s+One can only use the --user.*root"), ("Warning:\s+One can only use the --user.*root"),
......
# Check if CrashReporter is enabled and would open a window
perl;
sub skip_test {
# Only relevant on Mac OS X
return 0 unless $^O eq 'darwin';
my $crep= `defaults read com.apple.CrashReporter DialogType`;
return 0 if $?;
chomp ($crep);
$crep= lc $crep;
return ($crep eq 'basic' || $crep eq 'developer');
}
my $skip= skip_test();
open (F, ">" . $ENV{'MYSQL_TMP_DIR'} . "/crashrep.inc");
print F "let \$crashrep= $skip;\n";
close F;
EOF
--source $MYSQL_TMP_DIR/crashrep.inc
--remove_file $MYSQL_TMP_DIR/crashrep.inc
if ($crashrep) {
--skip CrashReporter would popup a window
}
...@@ -32,6 +32,7 @@ our @EXPORT= qw(report_option mtr_print_line mtr_print_thick_line ...@@ -32,6 +32,7 @@ our @EXPORT= qw(report_option mtr_print_line mtr_print_thick_line
use mtr_match; use mtr_match;
use My::Platform; use My::Platform;
use POSIX qw[ _exit ]; use POSIX qw[ _exit ];
use IO::Handle qw[ flush ];
require "mtr_io.pl"; require "mtr_io.pl";
my $tot_real_time= 0; my $tot_real_time= 0;
...@@ -477,6 +478,7 @@ sub mtr_warning (@) { ...@@ -477,6 +478,7 @@ sub mtr_warning (@) {
# Print error to screen and then exit # Print error to screen and then exit
sub mtr_error (@) { sub mtr_error (@) {
IO::Handle::flush(\*STDOUT) if IS_WINDOWS;
print STDERR _name(). _timestamp(). print STDERR _name(). _timestamp().
"mysql-test-run: *** ERROR: ". join(" ", @_). "\n"; "mysql-test-run: *** ERROR: ". join(" ", @_). "\n";
if (IS_WINDOWS) if (IS_WINDOWS)
......
...@@ -123,3 +123,16 @@ CREATE TABLE t2 SELECT 1 FROM t1, t1 t3 GROUP BY t3.a PROCEDURE ANALYSE(); ...@@ -123,3 +123,16 @@ CREATE TABLE t2 SELECT 1 FROM t1, t1 t3 GROUP BY t3.a PROCEDURE ANALYSE();
ERROR HY000: Incorrect usage of PROCEDURE and non-SELECT ERROR HY000: Incorrect usage of PROCEDURE and non-SELECT
DROP TABLE t1; DROP TABLE t1;
End of 5.0 tests End of 5.0 tests
#
# Bug#11765202: Dbug_violation_helper::~Dbug_violation_helper(): Assertion `!_entered' failed.
#
DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 't1'
CREATE TABLE t1 (a VARCHAR(2) CHARSET UTF8 NOT NULL);
INSERT INTO t1 VALUES ('e'),('e'),('e-');
SELECT * FROM t1 PROCEDURE ANALYSE();
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
test.t1.a e e- 1 2 0 0 1.3333 NULL ENUM('e','e-') NOT NULL
DROP TABLE t1;
End of 5.1 tests
...@@ -218,4 +218,10 @@ hex(a) hex(lower(a)) hex(upper(a)) ...@@ -218,4 +218,10 @@ hex(a) hex(lower(a)) hex(upper(a))
8352835E 8352835E 8352835E 8352835E 8352835E 8352835E
8372835E 8372835E 8372835E 8372835E 8372835E 8372835E
DROP TABLE t1; DROP TABLE t1;
#
# Bug#11766519 - Bug#59648: MY_STRTOLL10_MB2: ASSERTION `(*ENDPTR - S) % 2 == 0' FAILED.
#
SELECT QUOTE('ソ');
QUOTE('ソ')
'ソ'
# End of 5.1 tests # End of 5.1 tests
...@@ -990,8 +990,8 @@ old_password(name) ...@@ -990,8 +990,8 @@ old_password(name)
???????? ????????
select quote(name) from bug20536; select quote(name) from bug20536;
quote(name) quote(name)
???????? 'test1'
???????????????? '\'test\\_2\''
drop table bug20536; drop table bug20536;
set names ucs2; set names ucs2;
ERROR 42000: Variable 'character_set_client' can't be set to the value of 'ucs2' ERROR 42000: Variable 'character_set_client' can't be set to the value of 'ucs2'
...@@ -1238,4 +1238,15 @@ CREATE VIEW v1 AS SELECT 1 from t1 ...@@ -1238,4 +1238,15 @@ CREATE VIEW v1 AS SELECT 1 from t1
WHERE t1.b <=> (SELECT a FROM t1 WHERE a < SOME(SELECT '1')); WHERE t1.b <=> (SELECT a FROM t1 WHERE a < SOME(SELECT '1'));
DROP VIEW v1; DROP VIEW v1;
DROP TABLE t1; DROP TABLE t1;
#
# Bug#59648 my_strtoll10_mb2: Assertion `(*endptr - s) % 2 == 0' failed.
#
SELECT HEX(CHAR(COALESCE(NULL, CHAR(COUNT('%s') USING ucs2), 1, @@global.license, NULL) USING cp850));
HEX(CHAR(COALESCE(NULL, CHAR(COUNT('%s') USING ucs2), 1, @@global.license, NULL) USING cp850))
00
SELECT CONVERT(QUOTE(CHAR(0xf5 using ucs2)), SIGNED);
CONVERT(QUOTE(CHAR(0xf5 using ucs2)), SIGNED)
0
Warnings:
Warning 1292 Truncated incorrect INTEGER value: ''
End of 5.0 tests End of 5.0 tests
...@@ -747,6 +747,15 @@ event_name originator ...@@ -747,6 +747,15 @@ event_name originator
ev1 4294967295 ev1 4294967295
DROP EVENT ev1; DROP EVENT ev1;
SET GLOBAL server_id = @old_server_id; SET GLOBAL server_id = @old_server_id;
CREATE DATABASE event_test12;
USE event_test12;
CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DO SELECT 1;
CREATE DATABASE event_test1;
USE event_test1;
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
DROP DATABASE event_test1;
DROP DATABASE event_test12;
DROP DATABASE events_test; DROP DATABASE events_test;
SET GLOBAL event_scheduler= 'ON'; SET GLOBAL event_scheduler= 'ON';
SET @@global.concurrent_insert= @concurrent_insert; SET @@global.concurrent_insert= @concurrent_insert;
#
# Bug#59648 my_strtoll10_mb2: Assertion `(*endptr - s) % 2 == 0' failed.
#
SELECT CHAR_LENGTH(DES_ENCRYPT(0, CHAR('1' USING ucs2)));
CHAR_LENGTH(DES_ENCRYPT(0, CHAR('1' USING ucs2)))
9
SELECT CONVERT(DES_ENCRYPT(0, CHAR('1' USING ucs2)),UNSIGNED);
CONVERT(DES_ENCRYPT(0, CHAR('1' USING ucs2)),UNSIGNED)
0
Warnings:
Warning 1292 Truncated incorrect INTEGER value: '?T?iK?j??'
SELECT CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2)));
CHAR_LENGTH(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' USING ucs2)))
4
SELECT CONVERT(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' using ucs2)), UNSIGNED);
CONVERT(DES_DECRYPT(0xFF0DC9FC9537CA75F4, CHAR('1' using ucs2)), UNSIGNED)
0
Warnings:
Warning 1292 Truncated incorrect INTEGER value: 'test'
...@@ -1737,4 +1737,13 @@ SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b11111111111111111111111111111111 ...@@ -1737,4 +1737,13 @@ SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b11111111111111111111111111111111
SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND())); SELECT MIN(GET_LOCK('aaaaaaaaaaaaaaaaa',0) / '0b1111111111111111111111111111111111111111111111111111111111111111111111111' ^ (RAND()));
SELECT RELEASE_LOCK('aaaaaaaaaaaaaaaaa'); SELECT RELEASE_LOCK('aaaaaaaaaaaaaaaaa');
# #
# Bug #11766094 - 59132: MIN() AND MAX() REMOVE UNSIGNEDNESS
#
CREATE TABLE t1 (a BIGINT UNSIGNED);
INSERT INTO t1 VALUES (18446668621106209655);
SELECT MAX(LENGTH(a)), LENGTH(MAX(a)), MIN(a), MAX(a), CONCAT(MIN(a)), CONCAT(MAX(a)) FROM t1;
MAX(LENGTH(a)) LENGTH(MAX(a)) MIN(a) MAX(a) CONCAT(MIN(a)) CONCAT(MAX(a))
20 20 18446668621106209655 18446668621106209655 18446668621106209655 18446668621106209655
DROP TABLE t1;
#
End of 5.1 tests End of 5.1 tests
...@@ -511,4 +511,11 @@ t1 CREATE TABLE `t1` ( ...@@ -511,4 +511,11 @@ t1 CREATE TABLE `t1` (
`C` varchar(23) DEFAULT NULL `C` varchar(23) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1; DROP TABLE t1;
#
# Bug#11764994 57900: CREATE TABLE .. SELECT ASSERTS SCALE >= 0 && PRECISION > 0 && SCALE <= PR
#
CREATE TABLE t1 SELECT CEIL(LINESTRINGFROMWKB(1) DIV NULL);
DROP TABLE t1;
CREATE TABLE t1 SELECT FLOOR(LINESTRINGFROMWKB(1) DIV NULL);
DROP TABLE t1;
End of 5.1 tests End of 5.1 tests
...@@ -1375,4 +1375,34 @@ Warning 1292 Truncated incorrect time value: '' ...@@ -1375,4 +1375,34 @@ Warning 1292 Truncated incorrect time value: ''
Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: ''
Warning 1292 Truncated incorrect time value: '' Warning 1292 Truncated incorrect time value: ''
DROP TABLE t1; DROP TABLE t1;
#
# Bug#11766112 59151:UNINITIALIZED VALUES IN EXTRACT_DATE_TIME WITH STR_TO_DATE(SPACE(..) ...
#
SELECT STR_TO_DATE(SPACE(2),'1');
STR_TO_DATE(SPACE(2),'1')
0000-00-00
#
# Bug#11765216 58154: UNINITIALIZED VARIABLE FORMAT IN STR_TO_DATE FUNCTION
#
SET GLOBAL SQL_MODE='';
DO STR_TO_DATE((''), FROM_DAYS(@@GLOBAL.SQL_MODE));
SET GLOBAL SQL_MODE=DEFAULT;
#
# Bug#11766087 59125: VALGRIND UNINITIALISED VALUE WARNING IN ULL2DEC, LONGLONG2DECIMAL
#
SELECT FORMAT(YEAR(STR_TO_DATE('',GET_FORMAT(TIME,''))),1);
FORMAT(YEAR(STR_TO_DATE('',GET_FORMAT(TIME,''))),1)
NULL
#
# Bug#11766126 59166: ANOTHER DATETIME VALGRIND UNINITIALIZED WARNING
#
SELECT CAST((MONTH(FROM_UNIXTIME(@@GLOBAL.SQL_MODE))) AS BINARY(1025));
CAST((MONTH(FROM_UNIXTIME(@@GLOBAL.SQL_MODE))) AS BINARY(1025))
NULL
#
# Bug#11766124 59164: VALGRIND: UNINITIALIZED VALUE IN NUMBER_TO_DATETIME
#
SELECT ADDDATE(MONTH(FROM_UNIXTIME(NULL)),INTERVAL 1 HOUR);
ADDDATE(MONTH(FROM_UNIXTIME(NULL)),INTERVAL 1 HOUR)
NULL
End of 5.1 tests End of 5.1 tests
...@@ -1326,6 +1326,199 @@ DROP DATABASE mysqltest2; ...@@ -1326,6 +1326,199 @@ DROP DATABASE mysqltest2;
DROP USER testuser@localhost; DROP USER testuser@localhost;
use test; use test;
#
# Test for bug #36544 "DROP USER does not remove stored function
# privileges".
#
create database mysqltest1;
create function mysqltest1.f1() returns int return 0;
create procedure mysqltest1.p1() begin end;
#
# 1) Check that DROP USER properly removes privileges on both
# stored procedures and functions.
#
create user mysqluser1@localhost;
grant execute on function mysqltest1.f1 to mysqluser1@localhost;
grant execute on procedure mysqltest1.p1 to mysqluser1@localhost;
# Quick test that granted privileges are properly reflected
# in privilege tables and in in-memory structures.
show grants for mysqluser1@localhost;
Grants for mysqluser1@localhost
GRANT USAGE ON *.* TO 'mysqluser1'@'localhost'
GRANT EXECUTE ON PROCEDURE `mysqltest1`.`p1` TO 'mysqluser1'@'localhost'
GRANT EXECUTE ON FUNCTION `mysqltest1`.`f1` TO 'mysqluser1'@'localhost'
select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser1' and host='localhost';
db routine_name routine_type proc_priv
mysqltest1 f1 FUNCTION Execute
mysqltest1 p1 PROCEDURE Execute
#
# Create connection 'bug_36544_con1' as 'mysqluser1@localhost'.
call mysqltest1.p1();
select mysqltest1.f1();
mysqltest1.f1()
0
#
# Switch to connection 'default'.
drop user mysqluser1@localhost;
#
# Test that dropping of user is properly reflected in
# both privilege tables and in in-memory structures.
#
# Switch to connection 'bug36544_con1'.
# The connection cold be alive but should not be able to
# access to any of the stored routines.
call mysqltest1.p1();
ERROR 42000: execute command denied to user 'mysqluser1'@'localhost' for routine 'mysqltest1.p1'
select mysqltest1.f1();
ERROR 42000: execute command denied to user 'mysqluser1'@'localhost' for routine 'mysqltest1.f1'
#
# Switch to connection 'default'.
#
# Now create user with the same name and check that he
# has not inherited privileges.
create user mysqluser1@localhost;
show grants for mysqluser1@localhost;
Grants for mysqluser1@localhost
GRANT USAGE ON *.* TO 'mysqluser1'@'localhost'
select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser1' and host='localhost';
db routine_name routine_type proc_priv
#
# Create connection 'bug_36544_con2' as 'mysqluser1@localhost'.
# Newly created user should not be able to access any of the routines.
call mysqltest1.p1();
ERROR 42000: execute command denied to user 'mysqluser1'@'localhost' for routine 'mysqltest1.p1'
select mysqltest1.f1();
ERROR 42000: execute command denied to user 'mysqluser1'@'localhost' for routine 'mysqltest1.f1'
#
# Switch to connection 'default'.
#
# 2) Check that RENAME USER properly updates privileges on both
# stored procedures and functions.
#
grant execute on function mysqltest1.f1 to mysqluser1@localhost;
grant execute on procedure mysqltest1.p1 to mysqluser1@localhost;
#
# Create one more user to make in-memory hashes non-trivial.
# User names 'mysqluser11' and 'mysqluser10' were selected
# to trigger bug discovered during code inspection.
create user mysqluser11@localhost;
grant execute on function mysqltest1.f1 to mysqluser11@localhost;
grant execute on procedure mysqltest1.p1 to mysqluser11@localhost;
# Also create a couple of tables to test for another bug
# discovered during code inspection (again table names were
# chosen especially to trigger the bug).
create table mysqltest1.t11 (i int);
create table mysqltest1.t22 (i int);
grant select on mysqltest1.t22 to mysqluser1@localhost;
grant select on mysqltest1.t11 to mysqluser1@localhost;
# Quick test that granted privileges are properly reflected
# in privilege tables and in in-memory structures.
show grants for mysqluser1@localhost;
Grants for mysqluser1@localhost
GRANT USAGE ON *.* TO 'mysqluser1'@'localhost'
GRANT SELECT ON `mysqltest1`.`t11` TO 'mysqluser1'@'localhost'
GRANT SELECT ON `mysqltest1`.`t22` TO 'mysqluser1'@'localhost'
GRANT EXECUTE ON PROCEDURE `mysqltest1`.`p1` TO 'mysqluser1'@'localhost'
GRANT EXECUTE ON FUNCTION `mysqltest1`.`f1` TO 'mysqluser1'@'localhost'
select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser1' and host='localhost';
db routine_name routine_type proc_priv
mysqltest1 f1 FUNCTION Execute
mysqltest1 p1 PROCEDURE Execute
select db, table_name, table_priv from mysql.tables_priv where user='mysqluser1' and host='localhost';
db table_name table_priv
mysqltest1 t11 Select
mysqltest1 t22 Select
#
# Switch to connection 'bug36544_con2'.
call mysqltest1.p1();
select mysqltest1.f1();
mysqltest1.f1()
0
select * from mysqltest1.t11;
i
select * from mysqltest1.t22;
i
#
# Switch to connection 'default'.
rename user mysqluser1@localhost to mysqluser10@localhost;
#
# Test that there are no privileges left for mysqluser1.
#
# Switch to connection 'bug36544_con2'.
# The connection cold be alive but should not be able to
# access to any of the stored routines or tables.
call mysqltest1.p1();
ERROR 42000: execute command denied to user 'mysqluser1'@'localhost' for routine 'mysqltest1.p1'
select mysqltest1.f1();
ERROR 42000: execute command denied to user 'mysqluser1'@'localhost' for routine 'mysqltest1.f1'
select * from mysqltest1.t11;
ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 't11'
select * from mysqltest1.t22;
ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 't22'
#
# Switch to connection 'default'.
#
# Now create user with the old name and check that he
# has not inherited privileges.
create user mysqluser1@localhost;
show grants for mysqluser1@localhost;
Grants for mysqluser1@localhost
GRANT USAGE ON *.* TO 'mysqluser1'@'localhost'
select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser1' and host='localhost';
db routine_name routine_type proc_priv
select db, table_name, table_priv from mysql.tables_priv where user='mysqluser1' and host='localhost';
db table_name table_priv
#
# Create connection 'bug_36544_con3' as 'mysqluser1@localhost'.
# Newly created user should not be able to access to any of the
# stored routines or tables.
call mysqltest1.p1();
ERROR 42000: execute command denied to user 'mysqluser1'@'localhost' for routine 'mysqltest1.p1'
select mysqltest1.f1();
ERROR 42000: execute command denied to user 'mysqluser1'@'localhost' for routine 'mysqltest1.f1'
select * from mysqltest1.t11;
ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 't11'
select * from mysqltest1.t22;
ERROR 42000: SELECT command denied to user 'mysqluser1'@'localhost' for table 't22'
#
# Switch to connection 'default'.
#
# Now check that privileges became associated with a new user
# name - mysqluser10.
#
show grants for mysqluser10@localhost;
Grants for mysqluser10@localhost
GRANT USAGE ON *.* TO 'mysqluser10'@'localhost'
GRANT SELECT ON `mysqltest1`.`t22` TO 'mysqluser10'@'localhost'
GRANT SELECT ON `mysqltest1`.`t11` TO 'mysqluser10'@'localhost'
GRANT EXECUTE ON PROCEDURE `mysqltest1`.`p1` TO 'mysqluser10'@'localhost'
GRANT EXECUTE ON FUNCTION `mysqltest1`.`f1` TO 'mysqluser10'@'localhost'
select db, routine_name, routine_type, proc_priv from mysql.procs_priv where user='mysqluser10' and host='localhost';
db routine_name routine_type proc_priv
mysqltest1 f1 FUNCTION Execute
mysqltest1 p1 PROCEDURE Execute
select db, table_name, table_priv from mysql.tables_priv where user='mysqluser10' and host='localhost';
db table_name table_priv
mysqltest1 t11 Select
mysqltest1 t22 Select
#
# Create connection 'bug_36544_con4' as 'mysqluser10@localhost'.
call mysqltest1.p1();
select mysqltest1.f1();
mysqltest1.f1()
0
select * from mysqltest1.t11;
i
select * from mysqltest1.t22;
i
#
# Switch to connection 'default'.
#
# Clean-up.
drop user mysqluser1@localhost;
drop user mysqluser10@localhost;
drop user mysqluser11@localhost;
drop database mysqltest1;
End of 5.0 tests End of 5.0 tests
set names utf8; set names utf8;
grant select on test.* to юзер_юзер@localhost; grant select on test.* to юзер_юзер@localhost;
...@@ -1422,11 +1615,7 @@ fn2() ...@@ -1422,11 +1615,7 @@ fn2()
2 2
DROP USER 'userbug33464'@'localhost'; DROP USER 'userbug33464'@'localhost';
DROP FUNCTION fn1; DROP FUNCTION fn1;
Warnings:
Warning 1403 There is no such grant defined for user 'userbug33464' on host 'localhost' on routine 'fn1'
DROP FUNCTION fn2; DROP FUNCTION fn2;
Warnings:
Warning 1403 There is no such grant defined for user 'userbug33464' on host 'localhost' on routine 'fn2'
DROP PROCEDURE sp3; DROP PROCEDURE sp3;
DROP USER 'userbug33464'@'localhost'; DROP USER 'userbug33464'@'localhost';
USE test; USE test;
......
...@@ -629,3 +629,30 @@ drop procedure p1; ...@@ -629,3 +629,30 @@ drop procedure p1;
drop procedure p2; drop procedure p2;
drop table t1, t2, t3, t4, t5, te; drop table t1, t2, t3, t4, t5, te;
set @@global.concurrent_insert= @old_concurrent_insert; set @@global.concurrent_insert= @old_concurrent_insert;
#
# Bug#11763784 56541: ASSERTION TABLE->DB_STAT FAILED IN
# SQL_BASE.CC::OPEN_TABLE() DURING I_S Q
#
DROP TABLE IF EXISTS t1;
CREATE TABLE t1(a int);
INSERT INTO t1 VALUES (1), (2);
CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW BEGIN END;
# Connection con2
SET DEBUG_SYNC= 'before_open_in_get_all_tables SIGNAL is_waits WAIT_FOR is_cont';
# Sending:
SELECT * FROM information_schema.table_constraints JOIN t1 ON table_name = a;
# Connection con1
SET DEBUG_SYNC= 'now WAIT_FOR is_waits';
# Sending:
DROP TRIGGER t1_bi;
# Connection default
# Wait until DROP TRIGGER is blocked, waiting for t1
SET DEBUG_SYNC= 'now SIGNAL is_cont';
# Connection con2
# Reaping SELECT * FROM information_schema.table_constraints JOIN t1...
CONSTRAINT_CATALOG CONSTRAINT_SCHEMA CONSTRAINT_NAME TABLE_SCHEMA TABLE_NAME CONSTRAINT_TYPE a
# Connection con1
# Reaping DROP TRIGGER t1_bi
# Connection default
DROP TABLE t1;
SET DEBUG_SYNC= 'RESET';
...@@ -658,3 +658,15 @@ master-bin.000002 # Query # # CREATE DATABASE test1 ...@@ -658,3 +658,15 @@ master-bin.000002 # Query # # CREATE DATABASE test1
master-bin.000002 # Query # # use `test1`; CREATE TABLE t1(id int) master-bin.000002 # Query # # use `test1`; CREATE TABLE t1(id int)
master-bin.000002 # Query # # use `test1`; DROP TABLE t1 master-bin.000002 # Query # # use `test1`; DROP TABLE t1
master-bin.000002 # Query # # DROP DATABASE test1 master-bin.000002 # Query # # DROP DATABASE test1
RESET MASTER;
USE test;
CREATE TABLE t1 (a INT);
SET GLOBAL SERVER_ID = 2;
DROP TABLE t1;
FLUSH LOGS;
SHOW TABLES IN test;
Tables_in_test
t1
SHOW TABLES IN test;
Tables_in_test
SET GLOBAL SERVER_ID = 1;
...@@ -4626,6 +4626,7 @@ DELIMITER ; ...@@ -4626,6 +4626,7 @@ DELIMITER ;
/*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 SET collation_connection = @saved_col_connection */ ;
ALTER DATABASE `test-database` CHARACTER SET utf8 COLLATE utf8_unicode_ci ; ALTER DATABASE `test-database` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
DROP DATABASE `test-database`; DROP DATABASE `test-database`;
USE `test`;
# #
# End of 5.1 tests # End of 5.1 tests
# #
...@@ -3,6 +3,7 @@ set @net_buffer_length=@@global.net_buffer_length; ...@@ -3,6 +3,7 @@ set @net_buffer_length=@@global.net_buffer_length;
set global max_allowed_packet=100; set global max_allowed_packet=100;
Warnings: Warnings:
Warning 1292 Truncated incorrect max_allowed_packet value: '100' Warning 1292 Truncated incorrect max_allowed_packet value: '100'
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
set global net_buffer_length=100; set global net_buffer_length=100;
Warnings: Warnings:
Warning 1292 Truncated incorrect net_buffer_length value: '100' Warning 1292 Truncated incorrect net_buffer_length value: '100'
......
drop table if exists t1, t2; drop table if exists t1, t2;
# #
# Bug#59297: Can't find record in 'tablename' on update inner join
#
CREATE TABLE t1 (
a char(2) NOT NULL,
b char(2) NOT NULL,
c int(10) unsigned NOT NULL,
d varchar(255) DEFAULT NULL,
e varchar(1000) DEFAULT NULL,
PRIMARY KEY (a, b, c),
KEY (a),
KEY (a, b)
)
/*!50100 PARTITION BY KEY (a)
PARTITIONS 20 */;
INSERT INTO t1 (a, b, c, d, e) VALUES
('07', '03', 343, '1', '07_03_343'),
('01', '04', 343, '2', '01_04_343'),
('01', '06', 343, '3', '01_06_343'),
('01', '07', 343, '4', '01_07_343'),
('01', '08', 343, '5', '01_08_343'),
('01', '09', 343, '6', '01_09_343'),
('03', '03', 343, '7', '03_03_343'),
('03', '06', 343, '8', '03_06_343'),
('03', '07', 343, '9', '03_07_343'),
('04', '03', 343, '10', '04_03_343'),
('04', '06', 343, '11', '04_06_343'),
('05', '03', 343, '12', '05_03_343'),
('11', '03', 343, '13', '11_03_343'),
('11', '04', 343, '14', '11_04_343')
;
UPDATE t1 AS A,
(SELECT '03' AS a, '06' AS b, 343 AS c, 'last' AS d) AS B
SET A.e = B.d
WHERE A.a = '03'
AND A.b = '06'
AND A.c = 343;
DROP TABLE t1;
#
# Bug#57113: ha_partition::extra(ha_extra_function): # Bug#57113: ha_partition::extra(ha_extra_function):
# Assertion `m_extra_cache' failed # Assertion `m_extra_cache' failed
CREATE TABLE t1 CREATE TABLE t1
......
...@@ -2155,6 +2155,8 @@ mysqld is alive ...@@ -2155,6 +2155,8 @@ mysqld is alive
SET @max_allowed_packet= @@global.max_allowed_packet; SET @max_allowed_packet= @@global.max_allowed_packet;
SET @net_buffer_length= @@global.net_buffer_length; SET @net_buffer_length= @@global.net_buffer_length;
SET GLOBAL max_allowed_packet= 1024; SET GLOBAL max_allowed_packet= 1024;
Warnings:
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
SET GLOBAL net_buffer_length= 1024; SET GLOBAL net_buffer_length= 1024;
ERROR 1153 (08S01) at line 1: Got a packet bigger than 'max_allowed_packet' bytes ERROR 1153 (08S01) at line 1: Got a packet bigger than 'max_allowed_packet' bytes
SET GLOBAL max_allowed_packet= @max_allowed_packet; SET GLOBAL max_allowed_packet= @max_allowed_packet;
......
#
# BUG#11760210 - SSL_CIPHER_LIST NOT SET OR RETURNED FOR "SHOW STATUS LIKE 'SSL_CIPHER_LIST'"
#
SHOW STATUS LIKE 'Ssl_cipher';
Variable_name Value
Ssl_cipher AES128-SHA
SHOW STATUS LIKE 'Ssl_cipher_list';
Variable_name Value
Ssl_cipher_list AES128-SHA
...@@ -108,3 +108,27 @@ SET @@session.slave_skip_errors= 7; ...@@ -108,3 +108,27 @@ SET @@session.slave_skip_errors= 7;
ERROR HY000: Variable 'slave_skip_errors' is a read only variable ERROR HY000: Variable 'slave_skip_errors' is a read only variable
SET @@global.slave_skip_errors= 7; SET @@global.slave_skip_errors= 7;
ERROR HY000: Variable 'slave_skip_errors' is a read only variable ERROR HY000: Variable 'slave_skip_errors' is a read only variable
#
# Bug #11766769 : 59959: SMALL VALUES OF --MAX-ALLOWED-PACKET
# ARE NOT BEING HONORED
#
CREATE TABLE t1 (a MEDIUMTEXT);
SET GLOBAL max_allowed_packet=2048;
Warnings:
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
SET GLOBAL net_buffer_length=4096;
Warnings:
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
SHOW SESSION VARIABLES LIKE 'max_allowed_packet';
Variable_name Value
max_allowed_packet 2048
SHOW SESSION VARIABLES LIKE 'net_buffer_length';
Variable_name Value
net_buffer_length 4096
ERROR 08S01: Got a packet bigger than 'max_allowed_packet' bytes
SELECT LENGTH(a) FROM t1;
LENGTH(a)
SET GLOBAL max_allowed_packet=default;
SET GLOBAL net_buffer_length=default;
DROP TABLE t1;
End of 5.1 tests
...@@ -280,6 +280,7 @@ NET_BUFFER_LENGTH 1024 ...@@ -280,6 +280,7 @@ NET_BUFFER_LENGTH 1024
set global net_buffer_length=2000000000; set global net_buffer_length=2000000000;
Warnings: Warnings:
Warning 1292 Truncated incorrect net_buffer_length value: '2000000000' Warning 1292 Truncated incorrect net_buffer_length value: '2000000000'
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
show global variables like 'net_buffer_length'; show global variables like 'net_buffer_length';
Variable_name Value Variable_name Value
net_buffer_length 1048576 net_buffer_length 1048576
...@@ -502,6 +503,7 @@ set low_priority_updates=1; ...@@ -502,6 +503,7 @@ set low_priority_updates=1;
set global max_allowed_packet=100; set global max_allowed_packet=100;
Warnings: Warnings:
Warning 1292 Truncated incorrect max_allowed_packet value: '100' Warning 1292 Truncated incorrect max_allowed_packet value: '100'
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
set global max_binlog_cache_size=100; set global max_binlog_cache_size=100;
Warnings: Warnings:
Warning 1292 Truncated incorrect max_binlog_cache_size value: '100' Warning 1292 Truncated incorrect max_binlog_cache_size value: '100'
...@@ -1059,6 +1061,8 @@ set global max_write_lock_count =default; ...@@ -1059,6 +1061,8 @@ set global max_write_lock_count =default;
set global myisam_data_pointer_size =@my_myisam_data_pointer_size; set global myisam_data_pointer_size =@my_myisam_data_pointer_size;
set global myisam_max_sort_file_size =@my_myisam_max_sort_file_size; set global myisam_max_sort_file_size =@my_myisam_max_sort_file_size;
set global net_buffer_length =@my_net_buffer_length; set global net_buffer_length =@my_net_buffer_length;
Warnings:
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
set global net_write_timeout =@my_net_write_timeout; set global net_write_timeout =@my_net_write_timeout;
set global net_read_timeout =@my_net_read_timeout; set global net_read_timeout =@my_net_read_timeout;
set global query_cache_limit =@my_query_cache_limit; set global query_cache_limit =@my_query_cache_limit;
...@@ -1540,6 +1544,25 @@ ERROR HY000: Cannot drop default keycache ...@@ -1540,6 +1544,25 @@ ERROR HY000: Cannot drop default keycache
SET @@global.key_cache_block_size=0; SET @@global.key_cache_block_size=0;
Warnings: Warnings:
Warning 1292 Truncated incorrect key_cache_block_size value: '0' Warning 1292 Truncated incorrect key_cache_block_size value: '0'
select @@max_long_data_size;
@@max_long_data_size
1048576
#
# Bug#11766424 59527: DECIMAL_BIN_SIZE: ASSERTION `SCALE >= 0 && PRECISION > 0 && SCALE <= PRE
#
CREATE TABLE t1(f1 DECIMAL(1,1) UNSIGNED);
INSERT INTO t1 VALUES (0.2),(0.1);
SELECT 1 FROM t1 GROUP BY @a:= (SELECT ROUND(f1) FROM t1 WHERE @a=f1);
1
1
DROP TABLE t1;
CREATE TABLE t1 AS SELECT @a:= CAST(1 AS UNSIGNED) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(1) unsigned NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SET @@global.max_binlog_cache_size=DEFAULT; SET @@global.max_binlog_cache_size=DEFAULT;
SET @@global.max_join_size=DEFAULT; SET @@global.max_join_size=DEFAULT;
SET @@global.key_buffer_size=@kbs; SET @@global.key_buffer_size=@kbs;
......
...@@ -91,6 +91,8 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4AQAAAAMAMTIzAQAAAA== ...@@ -91,6 +91,8 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4AQAAAAMAMTIzAQAAAA==
'; ';
ERROR HY000: master may suffer from http://bugs.mysql.com/bug.php?id=37426 so slave stops; check error log on slave for more info ERROR HY000: master may suffer from http://bugs.mysql.com/bug.php?id=37426 so slave stops; check error log on slave for more info
drop table t1, char63_utf8, char128_utf8; drop table t1, char63_utf8, char128_utf8;
call mtr.add_suppression("Slave SQL.*master suffers from this bug: http:..bugs.mysql.com.bug.php.id=37426.* Error_code: 1105");
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
# #
# Bug #54393: crash and/or valgrind errors in # Bug #54393: crash and/or valgrind errors in
# mysql_client_binlog_statement # mysql_client_binlog_statement
......
...@@ -1374,6 +1374,7 @@ unique_checks OFF ...@@ -1374,6 +1374,7 @@ unique_checks OFF
# INSERT INTO t1 VALUES(2) # INSERT INTO t1 VALUES(2)
# foreign_key_checks=1 and unique_checks=1 # foreign_key_checks=1 and unique_checks=1
# It should not change current session's variables, even error happens # It should not change current session's variables, even error happens
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
BINLOG ' BINLOG '
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA== dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
......
...@@ -845,6 +845,7 @@ unique_checks OFF ...@@ -845,6 +845,7 @@ unique_checks OFF
# INSERT INTO t1 VALUES(2) # INSERT INTO t1 VALUES(2)
# foreign_key_checks=1 and unique_checks=1 # foreign_key_checks=1 and unique_checks=1
# It should not change current session's variables, even error happens # It should not change current session's variables, even error happens
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.t1; Duplicate entry .2. for key .PRIMARY., Error_code: 1062");
BINLOG ' BINLOG '
dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE= dfLtTBMBAAAAKQAAAKsBAAAAABcAAAAAAAEABHRlc3QAAnQxAAEDAAE=
dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA== dfLtTBcBAAAAIgAAAM0BAAAAABcAAAAAAAEAAf/+AgAAAA==
......
...@@ -151,6 +151,8 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4AQAAAAMAMTIzAQAAAA== ...@@ -151,6 +151,8 @@ iONkSBcBAAAAKwAAAMQBAAAQABAAAAAAAAEAA//4AQAAAAMAMTIzAQAAAA==
drop table t1, char63_utf8, char128_utf8; drop table t1, char63_utf8, char128_utf8;
call mtr.add_suppression("Slave SQL.*master suffers from this bug: http:..bugs.mysql.com.bug.php.id=37426.* Error_code: 1105");
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
--echo # --echo #
--echo # Bug #54393: crash and/or valgrind errors in --echo # Bug #54393: crash and/or valgrind errors in
......
...@@ -6,6 +6,8 @@ source include/not_embedded.inc; ...@@ -6,6 +6,8 @@ source include/not_embedded.inc;
# Don't test this under valgrind, memory leaks will occur # Don't test this under valgrind, memory leaks will occur
--source include/not_valgrind.inc --source include/not_valgrind.inc
source include/have_debug.inc; source include/have_debug.inc;
# Avoid CrashReporter popup on Mac
--source include/not_crashrep.inc
call mtr.add_suppression('Attempting backtrace'); call mtr.add_suppression('Attempting backtrace');
call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to process registered files that would be purged.'); call mtr.add_suppression('MSYQL_BIN_LOG::purge_logs failed to process registered files that would be purged.');
call mtr.add_suppression('MSYQL_BIN_LOG::open failed to sync the index file'); call mtr.add_suppression('MSYQL_BIN_LOG::open failed to sync the index file');
......
...@@ -128,8 +128,6 @@ root@localhost db_storedproc_1 ...@@ -128,8 +128,6 @@ root@localhost db_storedproc_1
drop user 'user_1'@'localhost'; drop user 'user_1'@'localhost';
DROP PROCEDURE sp3; DROP PROCEDURE sp3;
DROP FUNCTION fn1; DROP FUNCTION fn1;
Warnings:
Warning 1403 There is no such grant defined for user 'user_1' on host 'localhost' on routine 'fn1'
Testcase 3.1.6.4: Testcase 3.1.6.4:
----------------- -----------------
......
...@@ -479,9 +479,9 @@ NULL test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zero ...@@ -479,9 +479,9 @@ NULL test tb1 f27 27 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zero
NULL test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill NULL test tb1 f28 28 NULL YES int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill
NULL test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) NULL test tb1 f29 29 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20)
NULL test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1) NULL test tb1 f3 3 NULL YES char 1 1 NULL NULL latin1 latin1_swedish_ci char(1)
NULL test tb1 f30 30 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned NULL test tb1 f30 30 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
NULL test tb1 f31 31 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill NULL test tb1 f31 31 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned zerofill
NULL test tb1 f32 32 NULL YES bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill NULL test tb1 f32 32 NULL YES bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned zerofill
NULL test tb1 f33 33 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) NULL test tb1 f33 33 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0)
NULL test tb1 f34 34 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned NULL test tb1 f34 34 10 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned
NULL test tb1 f35 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill NULL test tb1 f35 35 0000000010 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill
...@@ -602,9 +602,9 @@ NULL test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned ...@@ -602,9 +602,9 @@ NULL test tb3 f143 26 99999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned
NULL test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill NULL test tb3 f144 27 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill
NULL test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill NULL test tb3 f145 28 0000099999 NO int NULL NULL 10 0 NULL NULL int(10) unsigned zerofill
NULL test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) NULL test tb3 f146 29 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20)
NULL test tb3 f147 30 999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned NULL test tb3 f147 30 999999 NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
NULL test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill NULL test tb3 f148 31 00000000000000999999 NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned zerofill
NULL test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned zerofill NULL test tb3 f149 32 00000000000000999999 NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned zerofill
NULL test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) NULL test tb3 f150 33 1000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0)
NULL test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned NULL test tb3 f151 34 999 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned
NULL test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill NULL test tb3 f152 35 0000001000 NO decimal NULL NULL 10 0 NULL NULL decimal(10,0) unsigned zerofill
......
...@@ -97,13 +97,13 @@ NULL mysql host Select_priv 3 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum( ...@@ -97,13 +97,13 @@ NULL mysql host Select_priv 3 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum(
NULL mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') NULL mysql host Show_view_priv 16 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
NULL mysql host Trigger_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') NULL mysql host Trigger_priv 20 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
NULL mysql host Update_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y') NULL mysql host Update_priv 5 N NO enum 1 3 NULL NULL utf8 utf8_general_ci enum('N','Y')
NULL mysql ndb_binlog_index deletes 6 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned NULL mysql ndb_binlog_index deletes 6 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
NULL mysql ndb_binlog_index epoch 3 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned PRI NULL mysql ndb_binlog_index epoch 3 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned PRI
NULL mysql ndb_binlog_index File 2 NULL NO varchar 255 255 NULL NULL latin1 latin1_swedish_ci varchar(255) NULL mysql ndb_binlog_index File 2 NULL NO varchar 255 255 NULL NULL latin1 latin1_swedish_ci varchar(255)
NULL mysql ndb_binlog_index inserts 4 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned NULL mysql ndb_binlog_index inserts 4 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
NULL mysql ndb_binlog_index Position 1 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned NULL mysql ndb_binlog_index Position 1 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
NULL mysql ndb_binlog_index schemaops 7 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned NULL mysql ndb_binlog_index schemaops 7 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
NULL mysql ndb_binlog_index updates 5 NULL NO bigint NULL NULL 19 0 NULL NULL bigint(20) unsigned NULL mysql ndb_binlog_index updates 5 NULL NO bigint NULL NULL 20 0 NULL NULL bigint(20) unsigned
NULL mysql plugin dl 2 NO char 128 384 NULL NULL utf8 utf8_bin char(128) NULL mysql plugin dl 2 NO char 128 384 NULL NULL utf8 utf8_bin char(128)
NULL mysql plugin name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI NULL mysql plugin name 1 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI
NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob NULL mysql proc body 11 NULL NO longblob 4294967295 4294967295 NULL NULL NULL NULL longblob
...@@ -130,7 +130,7 @@ NULL mysql procs_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI ...@@ -130,7 +130,7 @@ NULL mysql procs_priv Db 2 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI
NULL mysql procs_priv Grantor 6 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL NULL mysql procs_priv Grantor 6 NO char 77 231 NULL NULL utf8 utf8_bin char(77) MUL
NULL mysql procs_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI NULL mysql procs_priv Host 1 NO char 60 180 NULL NULL utf8 utf8_bin char(60) PRI
NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant') NULL mysql procs_priv Proc_priv 7 NO set 27 81 NULL NULL utf8 utf8_general_ci set('Execute','Alter Routine','Grant')
NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_bin char(64) PRI NULL mysql procs_priv Routine_name 4 NO char 64 192 NULL NULL utf8 utf8_general_ci char(64) PRI
NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI NULL mysql procs_priv Routine_type 5 NULL NO enum 9 27 NULL NULL utf8 utf8_bin enum('FUNCTION','PROCEDURE') PRI
NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP NULL mysql procs_priv Timestamp 8 CURRENT_TIMESTAMP NO timestamp NULL NULL NULL NULL NULL NULL timestamp on update CURRENT_TIMESTAMP
NULL mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI NULL mysql procs_priv User 3 NO char 16 48 NULL NULL utf8 utf8_bin char(16) PRI
...@@ -411,7 +411,7 @@ NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp ...@@ -411,7 +411,7 @@ NULL mysql proc modified timestamp NULL NULL NULL NULL timestamp
3.0000 mysql procs_priv Host char 60 180 utf8 utf8_bin char(60) 3.0000 mysql procs_priv Host char 60 180 utf8 utf8_bin char(60)
3.0000 mysql procs_priv Db char 64 192 utf8 utf8_bin char(64) 3.0000 mysql procs_priv Db char 64 192 utf8 utf8_bin char(64)
3.0000 mysql procs_priv User char 16 48 utf8 utf8_bin char(16) 3.0000 mysql procs_priv User char 16 48 utf8 utf8_bin char(16)
3.0000 mysql procs_priv Routine_name char 64 192 utf8 utf8_bin char(64) 3.0000 mysql procs_priv Routine_name char 64 192 utf8 utf8_general_ci char(64)
3.0000 mysql procs_priv Routine_type enum 9 27 utf8 utf8_bin enum('FUNCTION','PROCEDURE') 3.0000 mysql procs_priv Routine_type enum 9 27 utf8 utf8_bin enum('FUNCTION','PROCEDURE')
3.0000 mysql procs_priv Grantor char 77 231 utf8 utf8_bin char(77) 3.0000 mysql procs_priv Grantor char 77 231 utf8 utf8_bin char(77)
3.0000 mysql procs_priv Proc_priv set 27 81 utf8 utf8_general_ci set('Execute','Alter Routine','Grant') 3.0000 mysql procs_priv Proc_priv set 27 81 utf8 utf8_general_ci set('Execute','Alter Routine','Grant')
......
...@@ -129,8 +129,6 @@ root@localhost db_storedproc_1 ...@@ -129,8 +129,6 @@ root@localhost db_storedproc_1
drop user 'user_1'@'localhost'; drop user 'user_1'@'localhost';
DROP PROCEDURE sp3; DROP PROCEDURE sp3;
DROP FUNCTION fn1; DROP FUNCTION fn1;
Warnings:
Warning 1403 There is no such grant defined for user 'user_1' on host 'localhost' on routine 'fn1'
Testcase 3.1.6.4: Testcase 3.1.6.4:
----------------- -----------------
......
...@@ -129,8 +129,6 @@ root@localhost db_storedproc_1 ...@@ -129,8 +129,6 @@ root@localhost db_storedproc_1
drop user 'user_1'@'localhost'; drop user 'user_1'@'localhost';
DROP PROCEDURE sp3; DROP PROCEDURE sp3;
DROP FUNCTION fn1; DROP FUNCTION fn1;
Warnings:
Warning 1403 There is no such grant defined for user 'user_1' on host 'localhost' on routine 'fn1'
Testcase 3.1.6.4: Testcase 3.1.6.4:
----------------- -----------------
......
...@@ -149,10 +149,6 @@ USE db_storedproc_1; ...@@ -149,10 +149,6 @@ USE db_storedproc_1;
drop user 'user_1'@'localhost'; drop user 'user_1'@'localhost';
DROP PROCEDURE sp3; DROP PROCEDURE sp3;
# This drop function shouldn't generated a warning as the
# privileges should have been removed when the user was
# dropped. Reported as Bug#36544 DROP USER does not remove
# stored function privileges
DROP FUNCTION fn1; DROP FUNCTION fn1;
......
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
# This test case needs InnoDB. # This test case needs InnoDB.
--source include/have_innodb.inc --source include/have_innodb.inc
# Avoid CrashReporter popup on Mac
--source include/not_crashrep.inc
# #
# Precautionary clean up. # Precautionary clean up.
# #
......
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
# This test case needs InnoDB. # This test case needs InnoDB.
-- source include/have_innodb_plugin.inc -- source include/have_innodb_plugin.inc
# Avoid CrashReporter popup on Mac
--source include/not_crashrep.inc
# #
# Precautionary clean up. # Precautionary clean up.
# #
......
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
call mtr.add_suppression('Found invalid event in binary log'); call mtr.add_suppression('Found invalid event in binary log');
call mtr.add_suppression('Slave SQL.*Relay log read failure: Could not parse relay log event entry.* 1594');
==== Initialize ==== ==== Initialize ====
include/stop_slave.inc include/stop_slave.inc
RESET SLAVE; RESET SLAVE;
......
...@@ -125,6 +125,7 @@ include/stop_slave.inc ...@@ -125,6 +125,7 @@ include/stop_slave.inc
include/start_slave.inc include/start_slave.inc
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*"); CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*"); CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master. Message: error writing to the binary log");
TRUNCATE t1; TRUNCATE t1;
SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE; SET GLOBAL max_binlog_cache_size= ORIGINAL_VALUE;
SET GLOBAL binlog_cache_size= ORIGINAL_VALUE; SET GLOBAL binlog_cache_size= ORIGINAL_VALUE;
......
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
call mtr.add_suppression("Failed during slave I/O thread initialization"); call mtr.add_suppression("Failed during slave I/O thread initialization");
call mtr.add_suppression("Slave SQL.*Failed during slave thread initialization.* 1593");
include/stop_slave.inc include/stop_slave.inc
reset slave; reset slave;
SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init"; SET GLOBAL debug="d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on_init";
......
...@@ -46,6 +46,7 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1; ...@@ -46,6 +46,7 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
include/start_slave.inc include/start_slave.inc
INSERT INTO t1 VALUES(6,'C',2); INSERT INTO t1 VALUES(6,'C',2);
INSERT INTO t1(b,c) VALUES('B',2); INSERT INTO t1(b,c) VALUES('B',2);
call mtr.add_suppression("Slave SQL.*Duplicate entry .6. for key .PRIMARY.* Error_code: 1062");
include/wait_for_slave_sql_error.inc [errno=1062] include/wait_for_slave_sql_error.inc [errno=1062]
INSERT INTO t1(b,c) VALUES('A',2); INSERT INTO t1(b,c) VALUES('A',2);
INSERT INTO t1(b,c) VALUES('D',2); INSERT INTO t1(b,c) VALUES('D',2);
......
...@@ -58,6 +58,10 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) ...@@ -58,6 +58,10 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
* Select count and 20 rows from Slave * * Select count and 20 rows from Slave *
...@@ -929,6 +933,10 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) ...@@ -929,6 +933,10 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
* Select count and 20 rows from Slave * * Select count and 20 rows from Slave *
...@@ -1800,6 +1808,10 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) ...@@ -1800,6 +1808,10 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
* Select count and 20 rows from Slave * * Select count and 20 rows from Slave *
......
...@@ -58,6 +58,10 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) ...@@ -58,6 +58,10 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
* Select count and 20 rows from Slave * * Select count and 20 rows from Slave *
...@@ -929,6 +933,10 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) ...@@ -929,6 +933,10 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
* Select count and 20 rows from Slave * * Select count and 20 rows from Slave *
...@@ -1800,6 +1808,10 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11) ...@@ -1800,6 +1808,10 @@ f1 f2 f3 f4 f5 f6 f7 f8 f9 hex(f10) hex(f11)
27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 27 27 27 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 29 29 29 second 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456 30 30 30 next 2 kaks 2 got stolen from the paradise very fat blob 1555 123456
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 2 type mismatch.* 1535");
call mtr.add_suppression("Slave SQL.*Error .Can.t DROP .c7.; check that column.key exists. on query.* 1091");
call mtr.add_suppression("Slave SQL.*Error .Unknown column .c7. in .t15.. on query.* 1054");
call mtr.add_suppression("Slave SQL.*Error .Key column .c6. doesn.t exist in table. on query.* 1072");
* Select count and 20 rows from Slave * * Select count and 20 rows from Slave *
......
...@@ -460,6 +460,9 @@ c4 BLOB, c5 CHAR(5)) ENGINE='InnoDB'; ...@@ -460,6 +460,9 @@ c4 BLOB, c5 CHAR(5)) ENGINE='InnoDB';
RESET MASTER; RESET MASTER;
*** Start Slave *** *** Start Slave ***
START SLAVE; START SLAVE;
call mtr.add_suppression("Slave SQL.*Error .Unknown table .t6.. on query.* Error_code: 1051");
call mtr.add_suppression("Slave SQL.*Error .Duplicate column name .c6.. on query.* Error_code: 1060");
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column . ...e mismatch.* Error_code: 1535");
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);
......
...@@ -460,6 +460,9 @@ c4 BLOB, c5 CHAR(5)) ENGINE='MyISAM'; ...@@ -460,6 +460,9 @@ c4 BLOB, c5 CHAR(5)) ENGINE='MyISAM';
RESET MASTER; RESET MASTER;
*** Start Slave *** *** Start Slave ***
START SLAVE; START SLAVE;
call mtr.add_suppression("Slave SQL.*Error .Unknown table .t6.. on query.* Error_code: 1051");
call mtr.add_suppression("Slave SQL.*Error .Duplicate column name .c6.. on query.* Error_code: 1060");
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column . ...e mismatch.* Error_code: 1535");
*** Master Data Insert *** *** Master Data Insert ***
set @b1 = 'b1b1b1b1'; set @b1 = 'b1b1b1b1';
set @b1 = concat(@b1,@b1); set @b1 = concat(@b1,@b1);
......
...@@ -42,6 +42,7 @@ UPDATE t4 LEFT JOIN (t1, t2, t5) ON (t1.id=t4.id and t2.id=t4.id and t5.id=t4.id ...@@ -42,6 +42,7 @@ UPDATE t4 LEFT JOIN (t1, t2, t5) ON (t1.id=t4.id and t2.id=t4.id and t5.id=t4.id
UPDATE t4 LEFT JOIN (t1, t6, t7) ON (t4.id=t1.id and t4.id=t6.id and t4.id=t7.id) SET a=0, d=0, f=0, g=0 where t4.id=1; UPDATE t4 LEFT JOIN (t1, t6, t7) ON (t4.id=t1.id and t4.id=t6.id and t4.id=t7.id) SET a=0, d=0, f=0, g=0 where t4.id=1;
UPDATE t7 LEFT JOIN (t4, t1, t2) ON (t7.id=t4.id and t7.id=t1.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1; UPDATE t7 LEFT JOIN (t4, t1, t2) ON (t7.id=t4.id and t7.id=t1.id and t7.id=t2.id) SET a=0, b=0, d=0, g=0 where t7.id=1;
UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id) SET a=0, d=0, g=0, h=0 where t7.id=1; UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id) SET a=0, d=0, g=0, h=0 where t7.id=1;
call mtr.add_suppression("Slave SQL.*Error .Table .test.t[47]. doesn.t exist. on query.* Error_code: 1146");
UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1; UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1;
include/wait_for_slave_sql_error_and_skip.inc [errno=1146] include/wait_for_slave_sql_error_and_skip.inc [errno=1146]
Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1'' Last_SQL_Error = 'Error 'Table 'test.t4' doesn't exist' on query. Default database: 'test'. Query: 'UPDATE t1 LEFT JOIN t4 ON (t1.id=t4.id) SET a=0 where t1.id=1''
......
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
call mtr.add_suppression("Slave: Can't find record in 't.' Error_code: 1032"); call mtr.add_suppression("Can.t find record in .t[12].* Error_code: 1032");
call mtr.add_suppression("Slave: Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451"); call mtr.add_suppression("Cannot delete or update a parent row: a foreign key constraint fails .* Error_code: 1451");
call mtr.add_suppression("Slave: Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452"); call mtr.add_suppression("Cannot add or update a child row: a foreign key constraint fails .* Error_code: 1452");
call mtr.add_suppression("Slave SQL.*Could not execute Write_rows event on table test.* Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
SET @old_slave_exec_mode= @@global.slave_exec_mode; SET @old_slave_exec_mode= @@global.slave_exec_mode;
CREATE TABLE t1 (a INT PRIMARY KEY); CREATE TABLE t1 (a INT PRIMARY KEY);
CREATE TABLE t2 (a INT); CREATE TABLE t2 (a INT);
......
...@@ -112,6 +112,7 @@ show grants for mysqltest4@localhost; ...@@ -112,6 +112,7 @@ show grants for mysqltest4@localhost;
Grants for mysqltest4@localhost Grants for mysqltest4@localhost
GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' GRANT USAGE ON *.* TO 'mysqltest4'@'localhost' IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7'
set global slave_exec_mode='IDEMPOTENT'; set global slave_exec_mode='IDEMPOTENT';
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table mysql.* Error_code: 1032");
drop table t1, mysqltest2.t2; drop table t1, mysqltest2.t2;
drop table t4; drop table t4;
drop database mysqltest2; drop database mysqltest2;
......
...@@ -15,6 +15,7 @@ a ...@@ -15,6 +15,7 @@ a
2 2
3 3
4 4
call mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master.* 1590");
include/wait_for_slave_sql_error.inc [errno=1590] include/wait_for_slave_sql_error.inc [errno=1590]
Last_SQL_Error = 'The incident LOST_EVENTS occured on the master. Message: <none>' Last_SQL_Error = 'The incident LOST_EVENTS occured on the master. Message: <none>'
**** On Slave **** **** On Slave ****
......
...@@ -6,7 +6,7 @@ SET GLOBAL debug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on ...@@ -6,7 +6,7 @@ SET GLOBAL debug= "d,simulate_io_slave_error_on_init,simulate_sql_slave_error_on
start slave; start slave;
include/wait_for_slave_sql_error.inc [errno=1593] include/wait_for_slave_sql_error.inc [errno=1593]
Last_SQL_Error = 'Failed during slave thread initialization' Last_SQL_Error = 'Failed during slave thread initialization'
call mtr.add_suppression("Failed during slave I/O thread initialization"); call mtr.add_suppression("Failed during slave.* thread initialization");
SET GLOBAL debug= ""; SET GLOBAL debug= "";
reset slave; reset slave;
SET GLOBAL init_slave= "garbage"; SET GLOBAL init_slave= "garbage";
......
...@@ -7,6 +7,7 @@ SELECT * FROM t1; ...@@ -7,6 +7,7 @@ SELECT * FROM t1;
a b a b
1 10 1 10
2 2 2 2
call mtr.add_suppression("Slave SQL.*suffer.*http:..bugs.mysql.com.bug.php.id=24432");
include/wait_for_slave_sql_error.inc [errno=1105] include/wait_for_slave_sql_error.inc [errno=1105]
Last_SQL_Error = 'Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10'' Last_SQL_Error = 'Error 'master may suffer from http://bugs.mysql.com/bug.php?id=24432 so slave stops; check error log on slave for more info' on query. Default database: 'test'. Query: 'INSERT INTO t1(b) VALUES(1),(1),(2) ON DUPLICATE KEY UPDATE t1.b=10''
SELECT * FROM t1; SELECT * FROM t1;
......
...@@ -27,6 +27,8 @@ drop table t3; ...@@ -27,6 +27,8 @@ drop table t3;
create table t1(a int, b int, unique(b)); create table t1(a int, b int, unique(b));
insert into t1 values(1,10); insert into t1 values(1,10);
load data infile '../../std_data/rpl_loaddata.dat' into table t1; load data infile '../../std_data/rpl_loaddata.dat' into table t1;
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
include/wait_for_slave_sql_error_and_skip.inc [errno=1062] include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
include/check_slave_no_error.inc include/check_slave_no_error.inc
set sql_log_bin=0; set sql_log_bin=0;
......
...@@ -38,6 +38,8 @@ drop table t3; ...@@ -38,6 +38,8 @@ drop table t3;
create table t1(a int, b int, unique(b)); create table t1(a int, b int, unique(b));
insert into t1 values(1,10); insert into t1 values(1,10);
load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1; load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* Error_code: 1062");
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*Error_code: 0");
include/wait_for_slave_sql_error_and_skip.inc [errno=1062] include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
include/check_slave_no_error.inc include/check_slave_no_error.inc
set sql_log_bin=0; set sql_log_bin=0;
......
...@@ -3,6 +3,7 @@ include/master-slave.inc ...@@ -3,6 +3,7 @@ include/master-slave.inc
CREATE TABLE t1 (a INT, b INT); CREATE TABLE t1 (a INT, b INT);
INSERT INTO t1 VALUES (1,10); INSERT INTO t1 VALUES (1,10);
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1; LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1;
call mtr.add_suppression("Slave SQL.*Fatal error: Not enough memory, Error_code: 1593");
include/wait_for_slave_sql_error_and_skip.inc [errno=1593] include/wait_for_slave_sql_error_and_skip.inc [errno=1593]
Last_SQL_Error = 'Fatal error: Not enough memory' Last_SQL_Error = 'Fatal error: Not enough memory'
DROP TABLE t1; DROP TABLE t1;
......
...@@ -49,6 +49,8 @@ SET @max_allowed_packet_2= @@session.max_allowed_packet; ...@@ -49,6 +49,8 @@ SET @max_allowed_packet_2= @@session.max_allowed_packet;
==== clean up ==== ==== clean up ====
DROP TABLE t1; DROP TABLE t1;
SET @@global.max_allowed_packet= 1024; SET @@global.max_allowed_packet= 1024;
Warnings:
Warning 1105 The value of 'max_allowed_packet' should be no less than the value of 'net_buffer_length'
SET @@global.net_buffer_length= 1024; SET @@global.net_buffer_length= 1024;
DROP TABLE t1; DROP TABLE t1;
RESET SLAVE; RESET SLAVE;
......
...@@ -36,6 +36,7 @@ drop table temp_table, t3; ...@@ -36,6 +36,7 @@ drop table temp_table, t3;
insert into t2 values(1234); insert into t2 values(1234);
set insert_id=1234; set insert_id=1234;
insert into t2 values(NULL); insert into t2 values(NULL);
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .1234. for key .PRIMARY.. on query.* Error_code: 1062");
include/wait_for_slave_sql_error_and_skip.inc [errno=1062] include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
purge master logs to 'master-bin.000002'; purge master logs to 'master-bin.000002';
show master logs; show master logs;
......
...@@ -63,6 +63,7 @@ DROP TABLE t1; ...@@ -63,6 +63,7 @@ DROP TABLE t1;
include/rpl_reset.inc include/rpl_reset.inc
**** On Slave **** **** On Slave ****
SET GLOBAL QUERY_CACHE_SIZE=0; SET GLOBAL QUERY_CACHE_SIZE=0;
call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1.* Error_code: 1032");
**** On Master **** **** On Master ****
CREATE TABLE t1 (a INT); CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3); INSERT INTO t1 VALUES (1),(2),(3);
......
...@@ -478,6 +478,8 @@ include/diff_tables.inc [master:t2, slave:t2] ...@@ -478,6 +478,8 @@ include/diff_tables.inc [master:t2, slave:t2]
[expecting slave to stop] [expecting slave to stop]
INSERT INTO t3 VALUES (1, "", 1); INSERT INTO t3 VALUES (1, "", 1);
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2); INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032");
include/wait_for_slave_sql_error.inc [errno=1535] include/wait_for_slave_sql_error.inc [errno=1535]
Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.' Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.'
include/rpl_reset.inc include/rpl_reset.inc
......
...@@ -478,6 +478,8 @@ include/diff_tables.inc [master:t2, slave:t2] ...@@ -478,6 +478,8 @@ include/diff_tables.inc [master:t2, slave:t2]
[expecting slave to stop] [expecting slave to stop]
INSERT INTO t3 VALUES (1, "", 1); INSERT INTO t3 VALUES (1, "", 1);
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2); INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 1 size mismatch.* Error_code: 1535");
call mtr.add_suppression("Slave SQL.*Could not execute Delete_rows event on table test.t1.* Error_code: 1032");
include/wait_for_slave_sql_error.inc [errno=1535] include/wait_for_slave_sql_error.inc [errno=1535]
Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.' Last_SQL_Error = 'Table definition on master and slave does not match: Column 1 size mismatch - master has size 384, test.t3 on slave has size 49. Master's column size should be <= the slave's column size.'
include/rpl_reset.inc include/rpl_reset.inc
......
...@@ -265,6 +265,7 @@ STOP SLAVE; ...@@ -265,6 +265,7 @@ STOP SLAVE;
RESET SLAVE; RESET SLAVE;
RESET MASTER; RESET MASTER;
START SLAVE; START SLAVE;
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column 0 ...e mismatch.* Error_code: 1535");
*** Cleanup *** *** Cleanup ***
DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1;
include/rpl_end.inc include/rpl_end.inc
...@@ -22,6 +22,7 @@ a ...@@ -22,6 +22,7 @@ a
---- Wait until slave stops with an error ---- ---- Wait until slave stops with an error ----
include/wait_for_slave_sql_error.inc [errno=1062] include/wait_for_slave_sql_error.inc [errno=1062]
Last_SQL_Error = Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos 346 (expected "duplicate key" error) Last_SQL_Error = Could not execute Write_rows event on table test.t1; Duplicate entry '1' for key 'PRIMARY', Error_code: 1062; handler error HA_ERR_FOUND_DUPP_KEY; the event's master log master-bin.000001, end_log_pos 346 (expected "duplicate key" error)
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
SELECT * FROM t1; SELECT * FROM t1;
a a
1 1
...@@ -48,6 +49,7 @@ SELECT * FROM t1; ...@@ -48,6 +49,7 @@ SELECT * FROM t1;
a a
[on slave] [on slave]
---- Wait until slave stops with an error ---- ---- Wait until slave stops with an error ----
call mtr.add_suppression("Can.t find record in .t1., Error_code: 1032");
include/wait_for_slave_sql_error.inc [errno=1032] include/wait_for_slave_sql_error.inc [errno=1032]
Last_SQL_Error (expected "duplicate key" error) Last_SQL_Error (expected "duplicate key" error)
Could not execute Delete_rows event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos END_LOG_POS Could not execute Delete_rows event on table test.t1; Can't find record in 't1', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log master-bin.000001, end_log_pos END_LOG_POS
......
...@@ -10,6 +10,7 @@ DROP TABLE t1; ...@@ -10,6 +10,7 @@ DROP TABLE t1;
INSERT INTO t1 VALUES (1); INSERT INTO t1 VALUES (1);
==== Verify error on slave ==== ==== Verify error on slave ====
[on slave] [on slave]
call mtr.add_suppression("Slave SQL.*Error .Table .test.t1. doesn.t exist. on opening tables, Error_code: 1146");
include/wait_for_slave_sql_error.inc [errno=1146] include/wait_for_slave_sql_error.inc [errno=1146]
==== Clean up ==== ==== Clean up ====
include/stop_slave_io.inc include/stop_slave_io.inc
......
...@@ -25,4 +25,10 @@ INSERT INTO t1(c1) VALUES (NULL); ...@@ -25,4 +25,10 @@ INSERT INTO t1(c1) VALUES (NULL);
UPDATE t1 SET c1= 0; UPDATE t1 SET c1= 0;
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
DROP TABLE t1; DROP TABLE t1;
include/rpl_reset.inc
CREATE TABLE t1 (c1 int(11) NOT NULL, c2 int(11) NOT NULL, c3 int(11) DEFAULT '-1') ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO t1 VALUES (1,2,NULL);
UPDATE t1 SET c1=1, c2=2, c3=-1 WHERE c1=1 AND c2=2 AND ISNULL(c3);
include/diff_tables.inc [master:test.t1, slave:test.t1]
DROP TABLE t1;
include/rpl_end.inc include/rpl_end.inc
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
## coverage purposes - Field_bits
## 1 X bit + 2 Null bits + 5 bits => last_null_bit_pos==0
include/rpl_reset.inc
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bit(5)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO t1(c1,c2) VALUES (10, b'1');
INSERT INTO t1(c1,c2) VALUES (NULL, b'1');
UPDATE t1 SET c1= 0;
include/diff_tables.inc [master:t1, slave:t1]
DROP TABLE t1;
## case #1 - last_null_bit_pos==0 in record_compare without X bit ## case #1 - last_null_bit_pos==0 in record_compare without X bit
include/rpl_reset.inc include/rpl_reset.inc
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1; CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1;
...@@ -25,13 +34,10 @@ INSERT INTO t1(c1) VALUES (NULL); ...@@ -25,13 +34,10 @@ INSERT INTO t1(c1) VALUES (NULL);
UPDATE t1 SET c1= 0; UPDATE t1 SET c1= 0;
include/diff_tables.inc [master:t1, slave:t1] include/diff_tables.inc [master:t1, slave:t1]
DROP TABLE t1; DROP TABLE t1;
## coverage purposes - Field_bits
## 1 X bit + 2 Null bits + 5 bits => last_null_bit_pos==0
include/rpl_reset.inc include/rpl_reset.inc
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bit(5)) ENGINE=MyISAM DEFAULT CHARSET=latin1; CREATE TABLE t1 (c1 int(11) NOT NULL, c2 int(11) NOT NULL, c3 int(11) DEFAULT '-1') ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO t1(c1,c2) VALUES (10, b'1'); INSERT INTO t1 VALUES (1,2,NULL);
INSERT INTO t1(c1,c2) VALUES (NULL, b'1'); UPDATE t1 SET c1=1, c2=2, c3=-1 WHERE c1=1 AND c2=2 AND ISNULL(c3);
UPDATE t1 SET c1= 0; include/diff_tables.inc [master:test.t1, slave:test.t1]
include/diff_tables.inc [master:t1, slave:t1]
DROP TABLE t1; DROP TABLE t1;
include/rpl_end.inc include/rpl_end.inc
...@@ -117,6 +117,7 @@ a ...@@ -117,6 +117,7 @@ a
include/check_slave_is_running.inc include/check_slave_is_running.inc
INSERT INTO t9 VALUES (4); INSERT INTO t9 VALUES (4);
INSERT INTO t4 VALUES (4); INSERT INTO t4 VALUES (4);
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* Error_code: 1535");
include/wait_for_slave_sql_error_and_skip.inc [errno=1535] include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4' Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4'
INSERT INTO t9 VALUES (5); INSERT INTO t9 VALUES (5);
......
...@@ -117,6 +117,7 @@ a ...@@ -117,6 +117,7 @@ a
include/check_slave_is_running.inc include/check_slave_is_running.inc
INSERT INTO t9 VALUES (4); INSERT INTO t9 VALUES (4);
INSERT INTO t4 VALUES (4); INSERT INTO t4 VALUES (4);
call mtr.add_suppression("Slave SQL.*Table definition on master and slave does not match: Column [012] type mismatch.* Error_code: 1535");
include/wait_for_slave_sql_error_and_skip.inc [errno=1535] include/wait_for_slave_sql_error_and_skip.inc [errno=1535]
Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4' Last_SQL_Error = 'Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4'
INSERT INTO t9 VALUES (5); INSERT INTO t9 VALUES (5);
......
...@@ -56,6 +56,7 @@ t1 CREATE TABLE `t1` ( ...@@ -56,6 +56,7 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
SET SQL_LOG_BIN=1; SET SQL_LOG_BIN=1;
call mtr.add_suppression("Slave SQL.*Could not execute .*te_rows event on table test.t.; Duplicate entry.* Error_code: 1062");
CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data INT) Engine=InnoDB; CREATE TABLE t1(id INT NOT NULL PRIMARY KEY, data INT) Engine=InnoDB;
SHOW CREATE TABLE t1; SHOW CREATE TABLE t1;
Table Create Table Table Create Table
......
...@@ -29,6 +29,7 @@ a b ...@@ -29,6 +29,7 @@ a b
SELECT * FROM t3 ORDER BY a; SELECT * FROM t3 ORDER BY a;
a b a b
1 ZZ 1 ZZ
call mtr.add_suppression("Slave SQL.*Error .Table .test.t3. doesn.t exist. on.* Error_code: 1146");
include/wait_for_slave_sql_error.inc [errno=1146] include/wait_for_slave_sql_error.inc [errno=1146]
SHOW TABLES LIKE 't%'; SHOW TABLES LIKE 't%';
Tables_in_test (t%) Tables_in_test (t%)
......
...@@ -13,4 +13,5 @@ include/stop_slave_io.inc ...@@ -13,4 +13,5 @@ include/stop_slave_io.inc
RESET SLAVE; RESET SLAVE;
drop table t1; drop table t1;
call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3"); call mtr.add_suppression("Slave: Error writing file 'UNKNOWN' .Errcode: 9. Error_code: 3");
call mtr.add_suppression("Slave SQL.*Error in Begin_load_query event: write to.* failed, Error_code: 9");
include/rpl_end.inc include/rpl_end.inc
include/master-slave.inc include/master-slave.inc
[connection master] [connection master]
START SLAVE; START SLAVE;
call mtr.add_suppression("Slave SQL.*Unable to use slave.s temporary directory.* Error_code: 12");
include/wait_for_slave_sql_error.inc [errno=12] include/wait_for_slave_sql_error.inc [errno=12]
include/stop_slave_io.inc include/stop_slave_io.inc
RESET SLAVE; RESET SLAVE;
......
...@@ -8,6 +8,7 @@ insert into t1 values(1),(2); ...@@ -8,6 +8,7 @@ insert into t1 values(1),(2);
ERROR 23000: Duplicate entry '2' for key 'a' ERROR 23000: Duplicate entry '2' for key 'a'
drop table t1; drop table t1;
include/wait_for_slave_sql_to_stop.inc include/wait_for_slave_sql_to_stop.inc
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.* error code=1062.*Error on slave:.* Error_code: 0");
Error: "Query caused different errors on master and slave. Error on master: message (format)='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave) Error: "Query caused different errors on master and slave. Error on master: message (format)='Duplicate entry '%-.192s' for key %d' error code=1062 ; Error on slave: actual message='no error', error code=0. Default database: 'test'. Query: 'insert into t1 values(1),(2)'" (expected different error codes on master and slave)
Errno: "0" (expected 0) Errno: "0" (expected 0)
drop table t1; drop table t1;
......
...@@ -17,6 +17,7 @@ a ...@@ -17,6 +17,7 @@ a
---- Wait until slave stops with an error ---- ---- Wait until slave stops with an error ----
include/wait_for_slave_sql_error.inc [errno=1062] include/wait_for_slave_sql_error.inc [errno=1062]
Last_SQL_Error = Error 'Duplicate entry '1' for key 'PRIMARY'' on query. Default database: 'test'. Query: 'INSERT INTO t1 VALUES (1)' (expected "duplicate key" error) Last_SQL_Error = Error 'Duplicate entry '1' for key 'PRIMARY'' on query. Default database: 'test'. Query: 'INSERT INTO t1 VALUES (1)' (expected "duplicate key" error)
call mtr.add_suppression("Slave SQL.*Duplicate entry .1. for key .PRIMARY.* Error_code: 1062");
SELECT * FROM t1; SELECT * FROM t1;
a a
1 1
......
...@@ -146,6 +146,7 @@ DROP TABLE t1, t2; ...@@ -146,6 +146,7 @@ DROP TABLE t1, t2;
CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB; CREATE TABLE t1 (c1 INT KEY, c2 INT) ENGINE=InnoDB;
CREATE TABLE t2 (c1 INT) ENGINE=MyISAM; CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
INSERT INTO t1 VALUES(1, 1); INSERT INTO t1 VALUES(1, 1);
[connection master]
SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid'; SET GLOBAL debug= 'd,dump_thread_wait_before_send_xid';
[connection slave] [connection slave]
include/restart_slave.inc include/restart_slave.inc
......
...@@ -37,6 +37,7 @@ a b ...@@ -37,6 +37,7 @@ a b
3 3 3 3
4 4 4 4
include/check_slave_is_running.inc include/check_slave_is_running.inc
call mtr.add_suppression("Slave SQL.*Could not execute Update_rows event on table test.t1");
**** On Master **** **** On Master ****
DROP TABLE t1; DROP TABLE t1;
SET SESSION BINLOG_FORMAT=MIXED; SET SESSION BINLOG_FORMAT=MIXED;
......
...@@ -22,7 +22,7 @@ source include/have_debug.inc; ...@@ -22,7 +22,7 @@ source include/have_debug.inc;
--connection slave --connection slave
call mtr.add_suppression('Found invalid event in binary log'); call mtr.add_suppression('Found invalid event in binary log');
call mtr.add_suppression('Slave SQL.*Relay log read failure: Could not parse relay log event entry.* 1594');
# #
# BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event # BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event
......
...@@ -398,6 +398,7 @@ source include/stop_slave.inc; ...@@ -398,6 +398,7 @@ source include/stop_slave.inc;
source include/start_slave.inc; source include/start_slave.inc;
CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*"); CALL mtr.add_suppression("Multi-statement transaction required more than 'max_binlog_cache_size' bytes of storage.*");
CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*"); CALL mtr.add_suppression("Writing one row to the row-based binary log failed.*");
CALL mtr.add_suppression("Slave SQL.*The incident LOST_EVENTS occured on the master. Message: error writing to the binary log");
connection master; connection master;
TRUNCATE t1; TRUNCATE t1;
......
...@@ -9,6 +9,7 @@ connection slave; ...@@ -9,6 +9,7 @@ connection slave;
# Add suppression for expected warnings in slaves error log # Add suppression for expected warnings in slaves error log
call mtr.add_suppression("Failed during slave I/O thread initialization"); call mtr.add_suppression("Failed during slave I/O thread initialization");
call mtr.add_suppression("Slave SQL.*Failed during slave thread initialization.* 1593");
--source include/stop_slave.inc --source include/stop_slave.inc
reset slave; reset slave;
......
...@@ -82,6 +82,7 @@ INSERT INTO t1(b,c) VALUES('B',2); ...@@ -82,6 +82,7 @@ INSERT INTO t1(b,c) VALUES('B',2);
# Wait while C will stop. # Wait while C will stop.
--connection server_3 --connection server_3
# 1062 = ER_DUP_ENTRY # 1062 = ER_DUP_ENTRY
call mtr.add_suppression("Slave SQL.*Duplicate entry .6. for key .PRIMARY.* Error_code: 1062");
--let $slave_sql_errno= 1062 --let $slave_sql_errno= 1062
--source include/wait_for_slave_sql_error.inc --source include/wait_for_slave_sql_error.inc
--connection server_1 --connection server_1
......
...@@ -122,6 +122,8 @@ UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id ...@@ -122,6 +122,8 @@ UPDATE t7 LEFT JOIN (t8, t4, t1) ON (t7.id=t8.id and t7.id=t4.id and t7.id=t1.id
# if any of the above statement are not ignored, it would cause error # if any of the above statement are not ignored, it would cause error
# and stop slave sql thread. # and stop slave sql thread.
sync_slave_with_master; sync_slave_with_master;
connection slave;
call mtr.add_suppression("Slave SQL.*Error .Table .test.t[47]. doesn.t exist. on query.* Error_code: 1146");
connection master; connection master;
# Parameters for include/wait_for_slave_sql_error_and_skip.inc: # Parameters for include/wait_for_slave_sql_error_and_skip.inc:
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment