merge mysql-5.1-rep+2 --> mysql-5.1-rep+2-delivery1

This commit is contained in:
Alfranio Correia 2009-12-17 00:47:39 +00:00
commit 7c2c655ccf
277 changed files with 8979 additions and 2173 deletions

View file

@ -392,6 +392,7 @@ client/rpl_record_old.h
client/rpl_tblmap.h
client/rpl_tblmap.cc
client/rpl_utility.h
client/rpl_utility.cc
client/select_test
client/sql_string.cpp
client/ssl_test
@ -1142,6 +1143,7 @@ libmysqld/rpl_filter.cc
libmysqld/rpl_injector.cc
libmysqld/rpl_record.cc
libmysqld/rpl_record_old.cc
libmysqld/rpl_utility.cc
libmysqld/scheduler.cc
libmysqld/set_var.cc
libmysqld/simple-test

View file

@ -196,10 +196,6 @@ test-bt-fast:
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=stress --suite=stress
test-bt-fast:
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --force --comment=ps --ps-protocol --report-features
test-bt-debug:
-cd mysql-test ; MTR_BUILD_THREAD=auto \
@PERL@ ./mysql-test-run.pl --comment=debug --force --timer \

View file

@ -104,9 +104,10 @@ DEFS = -DMYSQL_CLIENT_NO_THREADS \
-DMYSQL_DATADIR="\"$(localstatedir)\""
sql_src=log_event.h mysql_priv.h rpl_constants.h \
rpl_utility.h rpl_tblmap.h rpl_tblmap.cc \
rpl_tblmap.h rpl_tblmap.cc \
log_event.cc my_decimal.h my_decimal.cc \
log_event_old.h log_event_old.cc \
rpl_utility.h rpl_utility.cc \
rpl_record_old.h rpl_record_old.cc
strings_src=decimal.c

View file

@ -4335,7 +4335,7 @@ com_status(String *buffer __attribute__((unused)),
Don't remove "limit 1",
it is protection againts SQL_SELECT_LIMIT=0
*/
if (mysql_store_result_for_lazy(&result))
if (!mysql_store_result_for_lazy(&result))
{
MYSQL_ROW cur=mysql_fetch_row(result);
if (cur)
@ -4379,7 +4379,7 @@ com_status(String *buffer __attribute__((unused)),
if (mysql_errno(&mysql) == CR_SERVER_GONE_ERROR)
return 0;
}
if (mysql_store_result_for_lazy(&result))
if (!mysql_store_result_for_lazy(&result))
{
MYSQL_ROW cur=mysql_fetch_row(result);
if (cur)
@ -4474,9 +4474,7 @@ server_version_string(MYSQL *con)
*/
if (server_version == NULL)
{
server_version= strdup(mysql_get_server_info(con));
}
server_version= my_strdup(mysql_get_server_info(con), MYF(MY_WME));
}
return server_version ? server_version : "";

View file

@ -2139,4 +2139,4 @@ int main(int argc, char** argv)
#include "my_decimal.cc"
#include "log_event.cc"
#include "log_event_old.cc"
#include "rpl_utility.cc"

View file

@ -6827,10 +6827,8 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
MYSQL_STMT *stmt;
DYNAMIC_STRING ds_prepare_warnings;
DYNAMIC_STRING ds_execute_warnings;
ulonglong affected_rows;
DBUG_ENTER("run_query_stmt");
DBUG_PRINT("query", ("'%-.60s'", query));
LINT_INIT(affected_rows);
/*
Init a new stmt if it's not already one created for this connection
@ -6966,8 +6964,7 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
warnings here
*/
{
ulonglong affected_rows;
LINT_INIT(affected_rows);
ulonglong UNINIT_VAR(affected_rows);
if (!disable_info)
affected_rows= mysql_affected_rows(mysql);

View file

@ -601,15 +601,15 @@ dnl ---------------------------------------------------------------------------
dnl MYSQL_NEEDS_MYSYS_NEW
AC_DEFUN([MYSQL_NEEDS_MYSYS_NEW],
[AC_CACHE_CHECK([needs mysys_new helpers], mysql_use_mysys_new,
[AC_CACHE_CHECK([needs mysys_new helpers], mysql_cv_use_mysys_new,
[
AC_LANG_PUSH(C++)
AC_TRY_LINK([], [
class A { public: int b; }; A *a=new A; a->b=10; delete a;
], mysql_use_mysys_new=no, mysql_use_mysys_new=yes)
], mysql_cv_use_mysys_new=no, mysql_cv_use_mysys_new=yes)
AC_LANG_POP(C++)
])
if test "$mysql_use_mysys_new" = "yes"
if test "$mysql_cv_use_mysys_new" = "yes"
then
AC_DEFINE([USE_MYSYS_NEW], [1], [Needs to use mysys_new helpers])
fi

View file

@ -10,9 +10,15 @@ AC_CANONICAL_SYSTEM
#
# When changing major version number please also check switch statement
# in mysqlbinlog::check_master_version().
AM_INIT_AUTOMAKE(mysql, 5.1.42)
AM_INIT_AUTOMAKE(mysql, 5.1.43)
AM_CONFIG_HEADER([include/config.h:config.h.in])
# Request support for automake silent-rules if available.
# Default to verbose output. One can use the configure-time
# option --enable-silent-rules or make V=0 to activate
# silent rules.
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([no])])
PROTOCOL_VERSION=10
DOT_FRM_VERSION=6
# See the libtool docs for information on how to do shared lib versions.

View file

@ -660,7 +660,7 @@ static ha_checksum checksum_format_specifier(const char* msg)
case 'u':
case 'x':
case 's':
chksum= my_checksum(chksum, start, (uint) (p - start));
chksum= my_checksum(chksum, start, (uint) (p + 1 - start));
start= 0; /* Not in format specifier anymore */
break;
@ -1030,8 +1030,10 @@ static char *parse_text_line(char *pos)
{
int i, nr;
char *row= pos;
size_t len;
DBUG_ENTER("parse_text_line");
len= strlen (pos);
while (*pos)
{
if (*pos == '\\')
@ -1039,11 +1041,11 @@ static char *parse_text_line(char *pos)
switch (*++pos) {
case '\\':
case '"':
VOID(strmov(pos - 1, pos));
VOID(memmove (pos - 1, pos, len - (row - pos)));
break;
case 'n':
pos[-1]= '\n';
VOID(strmov(pos, pos + 1));
VOID(memmove (pos, pos + 1, len - (row - pos)));
break;
default:
if (*pos >= '0' && *pos < '8')
@ -1053,10 +1055,10 @@ static char *parse_text_line(char *pos)
nr= nr * 8 + (*(pos++) - '0');
pos -= i;
pos[-1]= nr;
VOID(strmov(pos, pos + i));
VOID(memmove (pos, pos + i, len - (row - pos)));
}
else if (*pos)
VOID(strmov(pos - 1, pos)); /* Remove '\' */
VOID(memmove (pos - 1, pos, len - (row - pos))); /* Remove '\' */
}
}
else

View file

@ -557,16 +557,6 @@ unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql,
char *to,const char *from,
unsigned long length);
void STDCALL mysql_debug(const char *debug);
char * STDCALL mysql_odbc_escape_string(MYSQL *mysql,
char *to,
unsigned long to_length,
const char *from,
unsigned long from_length,
void *param,
char *
(*extend_buffer)
(void *, char *to,
unsigned long *length));
void STDCALL myodbc_remove_escape(MYSQL *mysql,char *name);
unsigned int STDCALL mysql_thread_safe(void);
my_bool STDCALL mysql_embedded(void);

View file

@ -518,16 +518,6 @@ unsigned long mysql_real_escape_string(MYSQL *mysql,
char *to,const char *from,
unsigned long length);
void mysql_debug(const char *debug);
char * mysql_odbc_escape_string(MYSQL *mysql,
char *to,
unsigned long to_length,
const char *from,
unsigned long from_length,
void *param,
char *
(*extend_buffer)
(void *, char *to,
unsigned long *length));
void myodbc_remove_escape(MYSQL *mysql,char *name);
unsigned int mysql_thread_safe(void);
my_bool mysql_embedded(void);

View file

@ -224,8 +224,8 @@ struct st_vio
#endif /* HAVE_SMEM */
#ifdef _WIN32
OVERLAPPED pipe_overlapped;
DWORD read_timeout_millis;
DWORD write_timeout_millis;
DWORD read_timeout_ms;
DWORD write_timeout_ms;
#endif
};
#endif /* vio_violite_h_ */

View file

@ -1629,20 +1629,6 @@ mysql_real_escape_string(MYSQL *mysql, char *to,const char *from,
return (uint) escape_string_for_mysql(mysql->charset, to, 0, from, length);
}
char * STDCALL
mysql_odbc_escape_string(MYSQL *mysql __attribute__((unused)),
char *to __attribute__((unused)),
ulong to_length __attribute__((unused)),
const char *from __attribute__((unused)),
ulong from_length __attribute__((unused)),
void *param __attribute__((unused)),
char * (*extend_buffer)(void *, char *, ulong *)
__attribute__((unused)))
{
return NULL;
}
void STDCALL
myodbc_remove_escape(MYSQL *mysql,char *name)
{

View file

@ -78,7 +78,6 @@ EXPORTS
mysql_next_result
mysql_num_fields
mysql_num_rows
mysql_odbc_escape_string
mysql_options
mysql_stmt_param_count
mysql_stmt_param_metadata

View file

@ -55,7 +55,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
item_geofunc.cc item_subselect.cc item_row.cc\
item_xmlfunc.cc \
key.cc lock.cc log.cc sql_state.c \
log_event.cc rpl_record.cc \
log_event.cc rpl_record.cc rpl_utility.cc \
log_event_old.cc rpl_record_old.cc \
protocol.cc net_serv.cc opt_range.cc \
opt_sum.cc procedure.cc records.cc sql_acl.cc \

View file

@ -50,7 +50,6 @@ EXPORTS
mysql_next_result
mysql_num_fields
mysql_num_rows
mysql_odbc_escape_string
mysql_options
mysql_ping
mysql_query

View file

@ -13,15 +13,13 @@ funcs_1.ndb* # joro : NDB tests marked as experiment
funcs_2.ndb_charset # joro : NDB tests marked as experimental as agreed with bochklin
main.ctype_gbk_binlog @solaris # Bug#46010: main.ctype_gbk_binlog fails sporadically : Table 't2' already exists
main.innodb-autoinc* # Bug#47809 2009-10-04 joro innodb-autoinc.test fails with valgrind errors with the innodb plugin
main.plugin_load @solaris # Bug#42144
ndb.* # joro : NDB tests marked as experimental as agreed with bochklin
rpl.rpl_cross_version* # Bug #43913 2009-10-26 joro rpl_cross_version can't pass on conflicts complainig clash with --slave-load-tm
rpl.rpl_get_master_version_and_clock* # Bug#46931 2009-08-26 alik rpl.rpl_get_master_version_and_clock fails on hpux11.31
rpl.rpl_cross_version* # Bug#48340 2009-12-01 Daogang rpl_cross_version: Found warnings/errors in server log file!
rpl.rpl_get_master_version_and_clock* # Bug #49191 2009-12-01 Daogang rpl_get_master_version_and_clock failed on PB2: COM_REGISTER_SLAVE failed
rpl.rpl_innodb_bug28430* @solaris # Bug#46029
rpl.rpl_row_create_table* # Bug#45576: rpl_row_create_table fails on PB2
rpl.rpl_trigger* # Bug#47810 2009-10-04 joro rpl.rpl_trigger.test fails with valgrind errors with the innodb plugin
rpl_ndb.* # joro : NDB tests marked as experimental as agreed with bochklin

View file

@ -0,0 +1,52 @@
# Helper file to perform one insert of a value into a table with
# different types on master and slave. The file will insert the
# result into the type_conversions table *on the slave* to get a
# summary of failing and succeeding tests.
# Input:
# $source_type Type on the master
# $target_type Type on the slave
# $source_value Value on the master (inserted into the table)
# $target_value Value on the slave (expected value in the table
# on the slave)
# $can_convert True if conversion shall work, false if it
# shall generate an error
connection master;
disable_warnings;
DROP TABLE IF EXISTS t1;
enable_warnings;
eval CREATE TABLE t1 (a $source_type);
sync_slave_with_master;
eval ALTER TABLE t1 MODIFY a $target_type;
connection master;
eval INSERT INTO t1 VALUES($source_value);
if ($can_convert) {
sync_slave_with_master;
eval SELECT a = $target_value into @compare FROM t1;
eval INSERT INTO type_conversions SET
Source = "$source_type",
Target = "$target_type",
Flags = @@slave_type_conversions,
On_Master = $source_value,
Expected = $target_value,
Compare = @compare;
UPDATE type_conversions
SET On_Slave = (SELECT a FROM t1)
WHERE TestNo = LAST_INSERT_ID();
}
if (!$can_convert) {
connection slave;
wait_for_slave_to_stop;
let $error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
eval INSERT INTO type_conversions SET
Source = "$source_type",
Target = "$target_type",
Flags = @@slave_type_conversions,
On_Master = $source_value,
Error = "$error";
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
START SLAVE;
}

View file

@ -36,6 +36,9 @@ sync_slave_with_master;
STOP SLAVE;
RESET SLAVE;
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
eval CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(4) DEFAULT 'TEST')
@ -62,6 +65,8 @@ SELECT * FROM t1 ORDER BY a;
sync_slave_with_master;
SELECT * FROM t1 ORDER BY a;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
--echo *** Drop t1 ***
connection master;
DROP TABLE t1;
@ -515,7 +520,7 @@ sync_slave_with_master;
--echo *** Create t11 on slave ***
STOP SLAVE;
RESET SLAVE;
eval CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT,
eval CREATE TABLE t11 (a INT KEY, b BLOB, f INT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE=$engine_type;
--echo *** Create t11 on Master ***

View file

@ -6,6 +6,7 @@
# First we test tables with only an index.
#
connection master;
eval CREATE TABLE t1 (C1 CHAR(1), C2 CHAR(1), INDEX (C1)$extra_index_t1) ENGINE = $type ;
SELECT * FROM t1;
sync_slave_with_master;
@ -156,6 +157,12 @@ SELECT * FROM t5,t2,t3 WHERE t5.C2='Q' AND t2.c12='R' AND t3.C3 ='S' ORDER BY t5
# Testing special column types
#
if (`select char_length('$bit_field_special') > 0`) {
SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS;
connection slave;
eval SET GLOBAL SLAVE_TYPE_CONVERSIONS = '$bit_field_special';
}
connection master;
eval CREATE TABLE t4 (C1 CHAR(1) PRIMARY KEY, B1 BIT(1), B2 BIT(1) NOT NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = $type ;
@ -164,6 +171,10 @@ SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1;
sync_slave_with_master;
SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1;
if (`select char_length('$bit_field_special') > 0`) {
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
}
#
# Testing conflicting operations
#
@ -350,6 +361,10 @@ eval CREATE TABLE t7 (i INT NOT NULL,
c CHAR(255) CHARACTER SET utf8 NOT NULL,
j INT NOT NULL) ENGINE = $type ;
connection slave;
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
--echo [expecting slave to replicate correctly]
connection master;
INSERT INTO t1 VALUES (1, "", 1);
@ -370,17 +385,9 @@ let $diff_table_1=master:test.t2;
let $diff_table_2=slave:test.t2;
source include/diff_tables.inc;
--echo [expecting slave to stop]
connection master;
INSERT INTO t3 VALUES (1, "", 1);
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
connection slave;
source include/wait_for_slave_sql_to_stop.inc;
let $last_error = query_get_value("SHOW SLAVE STATUS", Last_SQL_Error, 1);
disable_query_log;
eval SELECT "$last_error" AS Last_SQL_Error;
enable_query_log;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
connection master;
RESET MASTER;
connection slave;
@ -600,7 +607,15 @@ sync_slave_with_master;
connection master;
# Since t1 contain a bit field, we have to do this trick to handle InnoDB
if (`select char_length('$bit_field_special') > 0`) {
SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS;
connection slave;
eval SET GLOBAL SLAVE_TYPE_CONVERSIONS = '$bit_field_special';
}
--disable_warnings
connection master;
eval CREATE TABLE t1 (a bit) ENGINE=$type;
INSERT IGNORE INTO t1 VALUES (NULL);
INSERT INTO t1 ( a ) VALUES ( 0 );
@ -645,6 +660,10 @@ UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3;
sync_slave_with_master;
if (`select char_length('$bit_field_special') > 0`) {
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
}
let $diff_table_1=master:test.t1;
let $diff_table_2=slave:test.t1;
source include/diff_tables.inc;

View file

@ -1,6 +1,11 @@
-- source include/have_binlog_format_mixed_or_statement.inc
# Requires binlog_format=statement format since query involving
# get_lock() is logged in row format if binlog_format=mixed or row.
-- source include/have_binlog_format_statement.inc
-- source include/master-slave.inc
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
# Load some data into t1
create table t1 (word char(20) not null);
load data infile '../../std_data/words.dat' into table t1;
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
@ -10,9 +15,7 @@ select * from t1 limit 10;
#
# Test slave with wrong password
#
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
stop slave;
connection master;
set password for root@"localhost" = password('foo');
@ -29,16 +32,12 @@ sleep 2;
create table t3(n int);
insert into t3 values(1),(2);
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
select * from t3;
select sum(length(word)) from t1;
connection master;
drop table t1,t3;
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
# Test if the slave SQL thread can be more than 16K behind the slave
# I/O thread (> IO_SIZE)
@ -77,12 +76,13 @@ unlock tables;
connection master;
create table t2(id int);
insert into t2 values(connection_id());
save_master_pos;
connection master1;
# Avoid generating result
create temporary table t3(n int);
--disable_warnings
insert into t3 select get_lock('crash_lock%20C', 1) from t2;
--enable_warnings
connection master;
send update t1 set n = n + get_lock('crash_lock%20C', 2);
@ -93,8 +93,11 @@ kill @id;
# We don't drop t3 as this is a temporary table
drop table t2;
connection master;
# The get_lock function causes warning for unsafe statement.
--disable_warnings
--error 1317,2013
reap;
--enable_warnings
connection slave;
# The SQL slave thread should now have stopped because the query was killed on
# the master (so it has a non-zero error code in the binlog).
@ -117,16 +120,12 @@ insert into mysql.user (Host, User, Password)
select select_priv,user from mysql.user where user = _binary'blafasel2';
update mysql.user set Select_priv = "Y" where User= _binary"blafasel2";
select select_priv,user from mysql.user where user = _binary'blafasel2';
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
select n from t1;
select select_priv,user from mysql.user where user = _binary'blafasel2';
connection master1;
drop table t1;
delete from mysql.user where user="blafasel2";
save_master_pos;
connection slave;
sync_with_master;
sync_slave_with_master;
# End of 4.1 tests

View file

@ -0,0 +1,710 @@
# File containing different lossy and non-lossy type conversions.
# Integral conversion testing, we do not reduce the test using
# transitivity of conversions since the implementation is not using a
# transitivity strategy. Instead we do an exhaustive testing.
disable_query_log;
connection slave;
--let $conv = `select @@slave_type_conversions`
--echo **** Running tests with @@SLAVE_TYPE_CONVERSIONS = '$conv' ****
let $if_is_lossy = `SELECT FIND_IN_SET('ALL_LOSSY', @@SLAVE_TYPE_CONVERSIONS)`;
let $if_is_non_lossy = `SELECT FIND_IN_SET('ALL_NON_LOSSY', @@SLAVE_TYPE_CONVERSIONS)`;
let $source_type = BIT(1);
let $target_type = BIT(1);
let $source_value = b'1';
let $target_value = b'1';
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type = DATE;
let $target_type = DATE;
let $source_value = '2009-11-21';
let $target_value = '2009-11-21';
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type = ENUM('master','slave');
let $target_type = ENUM('master','slave');
let $source_value = 'master';
let $target_value = 'master';
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type = CHAR(10);
let $target_type = ENUM('master','slave');
let $source_value = 'master';
let $target_value = 'master';
let $can_convert = 0;
source extra/rpl_tests/check_type.inc;
let $source_type = CHAR(10);
let $target_type = SET('master','slave');
let $source_value = 'master';
let $target_value = 'master';
let $can_convert = 0;
source extra/rpl_tests/check_type.inc;
let $source_type = ENUM('master','slave');
let $target_type = CHAR(10);
let $source_value = 'master';
let $target_value = 'master';
let $can_convert = 0;
source extra/rpl_tests/check_type.inc;
let $source_type = SET('master','slave');
let $target_type = CHAR(10);
let $source_value = 'master';
let $target_value = 'master';
let $can_convert = 0;
source extra/rpl_tests/check_type.inc;
let $source_type = SET('master','slave');
let $target_type = SET('master','slave');
let $source_value = '';
let $target_value = '';
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type = SET('master','slave');
let $target_type = SET('master','slave');
let $source_value = 'master,slave';
let $target_value = 'master,slave';
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type = TINYINT;
let $target_type = TINYINT;
let $source_value = 1;
let $target_value = 1;
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type = TINYINT;
let $target_type = SMALLINT;
let $source_value = 1;
let $target_value = 1;
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= TINYINT;
let $target_type= MEDIUMINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= TINYINT;
let $target_type= INT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= TINYINT;
let $target_type= BIGINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= SMALLINT;
let $target_type= TINYINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= SMALLINT;
let $target_type= TINYINT;
let $source_value= 1 << 9;
let $target_value= (1 << 7) - 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= SMALLINT;
let $target_type= TINYINT UNSIGNED;
let $source_value= 1 << 9;
let $target_value= (1 << 8) - 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= SMALLINT;
let $target_type= SMALLINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type= SMALLINT;
let $target_type= MEDIUMINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= SMALLINT;
let $target_type= INT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= SMALLINT;
let $target_type= BIGINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= MEDIUMINT;
let $target_type= TINYINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= MEDIUMINT;
let $target_type= TINYINT;
let $source_value= 1 << 20;
let $target_value= (1 << 7) - 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= MEDIUMINT;
let $target_type= TINYINT UNSIGNED;
let $source_value= 1 << 20;
let $target_value= (1 << 8) - 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= MEDIUMINT;
let $target_type= SMALLINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= MEDIUMINT;
let $target_type= MEDIUMINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type= MEDIUMINT;
let $target_type= INT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= MEDIUMINT;
let $target_type= BIGINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= INT;
let $target_type= TINYINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= INT;
let $target_type= TINYINT;
let $source_value= (1 << 30);
let $target_value= (1 << 7) - 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= INT;
let $target_type= TINYINT UNSIGNED;
let $source_value= (1 << 30);
let $target_value= (1 << 8) - 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= INT;
let $target_type= SMALLINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= INT;
let $target_type= MEDIUMINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= INT;
let $target_type= INT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type= INT;
let $target_type= BIGINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= BIGINT;
let $target_type= TINYINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= BIGINT;
let $target_type= SMALLINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= BIGINT;
let $target_type= MEDIUMINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= BIGINT;
let $target_type= INT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= BIGINT;
let $target_type= BIGINT;
let $source_value= 1;
let $target_value= 1;
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type= CHAR(20);
let $target_type= CHAR(20);
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnoodlemaps';
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type= CHAR(20);
let $target_type= CHAR(30);
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnoodlemaps';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= CHAR(20);
let $target_type= CHAR(10);
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnood';
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= CHAR(20);
let $target_type= VARCHAR(20);
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnoodlemaps';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= CHAR(20);
let $target_type= VARCHAR(30);
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnoodlemaps';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= CHAR(20);
let $target_type= VARCHAR(10);
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnood';
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= CHAR(20);
let $target_type= TINYTEXT;
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnoodlemaps';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= CHAR(20);
let $target_type= TEXT;
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnoodlemaps';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= CHAR(20);
let $target_type= MEDIUMTEXT;
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnoodlemaps';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= CHAR(20);
let $target_type= LONGTEXT;
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnoodlemaps';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= VARCHAR(20);
let $target_type= VARCHAR(20);
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnoodlemaps';
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type= VARCHAR(20);
let $target_type= VARCHAR(30);
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnoodlemaps';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= VARCHAR(20);
let $target_type= VARCHAR(10);
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnood';
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= VARCHAR(20);
let $target_type= CHAR(30);
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnoodlemaps';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= VARCHAR(20);
let $target_type= CHAR(10);
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnood';
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= VARCHAR(20);
let $target_type= TINYTEXT;
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnoodlemaps';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= VARCHAR(20);
let $target_type= TEXT;
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnoodlemaps';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= VARCHAR(20);
let $target_type= MEDIUMTEXT;
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnoodlemaps';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= VARCHAR(20);
let $target_type= LONGTEXT;
let $source_value= 'Smoothnoodlemaps';
let $target_value= 'Smoothnoodlemaps';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $blob = `select repeat('abcd', 125)`;
let $truncated_blob = `select left('$blob', 255)`;
let $source_type= VARCHAR(500);
let $target_type= VARCHAR(500);
let $source_value= '$blob';
let $target_value= '$blob';
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type= VARCHAR(500);
let $target_type= VARCHAR(510);
let $source_value= '$blob';
let $target_value= '$blob';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= VARCHAR(500);
let $target_type= VARCHAR(255);
let $source_value= '$blob';
let $target_value= '$truncated_blob';
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= VARCHAR(500);
let $target_type= TINYTEXT;
let $source_value= '$blob';
let $target_value= '$truncated_blob';
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= VARCHAR(500);
let $target_type= TEXT;
let $source_value= '$blob';
let $target_value= '$blob';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= VARCHAR(500);
let $target_type= MEDIUMTEXT;
let $source_value= '$blob';
let $target_value= '$blob';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= VARCHAR(500);
let $target_type= LONGTEXT;
let $source_value= '$blob';
let $target_value= '$blob';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $tiny_blob = `select repeat('tiny blob ', 25)`;
let $truncated_tiny_blob = `select left('$tiny_blob', 254)`;
let $source_type= TINYTEXT;
let $target_type= VARCHAR(500);
let $source_value= '$tiny_blob';
let $target_value= '$tiny_blob';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= TEXT;
let $target_type= VARCHAR(500);
let $source_value= '$blob';
let $target_value= '$blob';
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= MEDIUMTEXT;
let $target_type= VARCHAR(500);
let $source_value= '$blob';
let $target_value= '$blob';
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= LONGTEXT;
let $target_type= VARCHAR(500);
let $source_value= '$blob';
let $target_value= '$blob';
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= TINYTEXT;
let $target_type= CHAR(255);
let $source_value= '$tiny_blob';
let $target_value= '$tiny_blob';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= TINYTEXT;
let $target_type= CHAR(250);
let $source_value= '$tiny_blob';
let $target_value= left('$tiny_blob', 250);
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= TEXT;
let $target_type= CHAR(255);
let $source_value= '$blob';
let $target_value= left('$blob', 255);
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= MEDIUMTEXT;
let $target_type= CHAR(255);
let $source_value= '$blob';
let $target_value= left('$blob', 255);
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= LONGTEXT;
let $target_type= CHAR(255);
let $source_value= '$blob';
let $target_value= left('$blob', 255);
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= TINYTEXT;
let $target_type= TINYTEXT;
let $source_value= '$tiny_blob';
let $target_value= '$tiny_blob';
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type= TINYTEXT;
let $target_type= TEXT;
let $source_value= '$tiny_blob';
let $target_value= '$tiny_blob';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= TEXT;
let $target_type= TINYTEXT;
let $source_value= '$blob';
let $target_value= left('$blob',255);
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= DECIMAL(10,5);
let $target_type= DECIMAL(10,5);
let $source_value= 3.14159;
let $target_value= 3.14159;
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type= DECIMAL(10,5);
let $target_type= DECIMAL(10,6);
let $source_value= 3.14159;
let $target_value= 3.141590;
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= DECIMAL(10,5);
let $target_type= DECIMAL(11,5);
let $source_value= 3.14159;
let $target_value= 3.14159;
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= DECIMAL(10,5);
let $target_type= DECIMAL(11,6);
let $source_value= 3.14159;
let $target_value= 3.141590;
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= DECIMAL(10,5);
let $target_type= DECIMAL(10,4);
let $source_value= 3.14159;
let $target_value= 3.1416;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= DECIMAL(10,5);
let $target_type= DECIMAL(9,5);
let $source_value= 3.14159;
let $target_value= 3.14159;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= DECIMAL(10,5);
let $target_type= DECIMAL(9,4);
let $source_value= 3.14159;
let $target_value= 3.1416;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= FLOAT;
let $target_type= DECIMAL(10,5);
let $source_value= 3.15625;
let $target_value= 3.15625;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= DOUBLE;
let $target_type= DECIMAL(10,5);
let $source_value= 3.15625;
let $target_value= 3.15625;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= DECIMAL(10,5);
let $target_type= FLOAT;
let $source_value= 3.15625;
let $target_value= 3.15625;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= DECIMAL(10,5);
let $target_type= DOUBLE;
let $source_value= 3.15625;
let $target_value= 3.15625;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= FLOAT;
let $target_type= FLOAT;
let $source_value= 3.15625;
let $target_value= 3.15625;
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type= DOUBLE;
let $target_type= DOUBLE;
let $source_value= 3.15625;
let $target_value= 3.15625;
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type= FLOAT;
let $target_type= DOUBLE;
let $source_value= 3.15625;
let $target_value= 3.15625;
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= DOUBLE;
let $target_type= FLOAT;
let $source_value= 3.15625;
let $target_value= 3.15625;
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= BIT(5);
let $target_type= BIT(5);
let $source_value= b'11001';
let $target_value= b'11001';
let $can_convert = 1;
source extra/rpl_tests/check_type.inc;
let $source_type= BIT(5);
let $target_type= BIT(6);
let $source_value= b'11001';
let $target_value= b'11001';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= BIT(6);
let $target_type= BIT(5);
let $source_value= b'111001';
let $target_value= b'11111';
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= BIT(5);
let $target_type= BIT(12);
let $source_value= b'11001';
let $target_value= b'11001';
let $can_convert = $if_is_non_lossy;
source extra/rpl_tests/check_type.inc;
let $source_type= BIT(12);
let $target_type= BIT(5);
let $source_value= b'101100111000';
let $target_value= b'11111';
let $can_convert = $if_is_lossy;
source extra/rpl_tests/check_type.inc;
disable_warnings;
source include/reset_master_and_slave.inc;
enable_warnings;
enable_query_log;

View file

@ -175,6 +175,15 @@ INSERT INTO global_suppressions VALUES
("Can't find file: '.\\\\test\\\\\\?{8}.frm'"),
("Slave: Unknown table 't1' Error_code: 1051"),
/*
Transient network failures that cause warnings on reconnect.
BUG#47743 and BUG#47983.
*/
("Slave I/O: Get master SERVER_ID failed with error:.*"),
("Slave I/O: Get master clock failed with error:.*"),
("Slave I/O: Get master COLLATION_SERVER failed with error:.*"),
("Slave I/O: Get master TIME_ZONE failed with error:.*"),
("THE_LAST_SUPPRESSION")||

View file

@ -520,6 +520,10 @@ sub collect_one_suite($)
next if ($test->{'name'} eq 'sys_vars.innodb_thread_concurrency_basic');
# Can't work with InnoPlug. Test framework needs to be re-designed.
next if ($test->{'name'} eq 'main.innodb_bug46000');
# Fails with innodb plugin
next if ($test->{'name'} eq 'main.innodb-autoinc');
# Fails with innodb plugin: r6185 Testcases changes not included
next if ($test->{'name'} eq 'main.innodb_bug44369');
# Copy test options
my $new_test= My::Test->new();
while (my ($key, $value) = each(%$test))

View file

@ -12717,3 +12717,14 @@ COUNT(t1.a)
729
DROP TABLE t1;
SET @@join_buffer_size= @save_join_buffer_size;
SHOW CREATE TABLE t1;
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
SELECT * FROM t1;
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
INSERT INTO t1 (col1, col2) VALUES (1, "value");
ERROR HY000: Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair Error Table upgrade required. Please do "REPAIR TABLE `t1`" or dump/reload to fix it!
test.t1 repair error Corrupt
DROP TABLE t1;

View file

@ -0,0 +1,13 @@
#
# Bug#47671 - wrong character-set after upgrade from 5.1.34 to 5.1.39
#
# Extract only charset information from 'status' command output using regex
--------------
Server characterset: utf8
Db characterset: utf8
Client characterset: utf8
Conn. characterset: utf8
--------------

View file

@ -310,4 +310,16 @@ a b
2 2
drop table t1;
set global low_priority_updates = @old_delayed_updates;
#
# Bug #47682 strange behaviour of INSERT DELAYED
#
DROP TABLE IF EXISTS t1, t2;
CREATE TABLE t1 (f1 integer);
CREATE TABLE t2 (f1 integer);
FLUSH TABLES WITH READ LOCK;
LOCK TABLES t1 READ;
INSERT DELAYED INTO t2 VALUES (1);
Got one of the listed errors
UNLOCK TABLES;
DROP TABLE t1, t2;
End of 5.1 tests

View file

@ -324,3 +324,16 @@ a
1
2
DROP TABLE t1, t2, t3;
#
# Bug #46425 crash in Diagnostics_area::set_ok_status,
# empty statement, DELETE IGNORE
#
CREATE table t1 (i INTEGER);
INSERT INTO t1 VALUES (1);
CREATE TRIGGER tr1 AFTER DELETE ON t1 FOR EACH ROW
BEGIN
INSERT INTO t1 SELECT * FROM t1 AS A;
END |
DELETE IGNORE FROM t1;
ERROR HY000: Can't update table 't1' in stored function/trigger because it is already used by statement which invoked this stored function/trigger.
DROP TABLE t1;

View file

@ -551,3 +551,42 @@ EXECUTE s;
MATCH (col) AGAINST('findme')
DEALLOCATE PREPARE s;
DROP TABLE t1;
#
# Bug #47930: MATCH IN BOOLEAN MODE returns too many results
# inside subquery
#
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES (1), (2);
CREATE TABLE t2 (a int, b2 char(10), FULLTEXT KEY b2 (b2));
INSERT INTO t2 VALUES (1,'Scargill');
CREATE TABLE t3 (a int, b int);
INSERT INTO t3 VALUES (1,1), (2,1);
# t2 should use full text index
EXPLAIN
SELECT count(*) FROM t1 WHERE
not exists(
SELECT 1 FROM t2, t3
WHERE t3.a=t1.a AND MATCH(b2) AGAINST('scargill' IN BOOLEAN MODE)
);
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 Using where
2 DEPENDENT SUBQUERY t2 fulltext b2 b2 0 1 Using where
2 DEPENDENT SUBQUERY t3 ALL NULL NULL NULL NULL 2 Using where
# should return 0
SELECT count(*) FROM t1 WHERE
not exists(
SELECT 1 FROM t2, t3
WHERE t3.a=t1.a AND MATCH(b2) AGAINST('scargill' IN BOOLEAN MODE)
);
count(*)
0
# should return 0
SELECT count(*) FROM t1 WHERE
not exists(
SELECT 1 FROM t2 IGNORE INDEX (b2), t3
WHERE t3.a=t1.a AND MATCH(b2) AGAINST('scargill' IN BOOLEAN MODE)
);
count(*)
0
DROP TABLE t1,t2,t3;
End of 5.1 tests

View file

@ -885,7 +885,7 @@ cast(sum(distinct df) as signed)
3
select cast(min(df) as signed) from t1;
cast(min(df) as signed)
0
1
select 1e8 * sum(distinct df) from t1;
1e8 * sum(distinct df)
330000000
@ -1520,4 +1520,197 @@ max i
# Cleanup
#
DROP TABLE t1;
#
# Bug#43668: Wrong comparison and MIN/MAX for YEAR(2)
#
create table t1 (f1 year(2), f2 year(4), f3 date, f4 datetime);
insert into t1 values
(98,1998,19980101,"1998-01-01 00:00:00"),
(00,2000,20000101,"2000-01-01 00:00:01"),
(02,2002,20020101,"2002-01-01 23:59:59"),
(60,2060,20600101,"2060-01-01 11:11:11"),
(70,1970,19700101,"1970-11-11 22:22:22"),
(NULL,NULL,NULL,NULL);
select min(f1),max(f1) from t1;
min(f1) max(f1)
70 60
select min(f2),max(f2) from t1;
min(f2) max(f2)
1970 2060
select min(f3),max(f3) from t1;
min(f3) max(f3)
1970-01-01 2060-01-01
select min(f4),max(f4) from t1;
min(f4) max(f4)
1970-11-11 22:22:22 2060-01-01 11:11:11
select a.f1 as a, b.f1 as b, a.f1 > b.f1 as gt,
a.f1 < b.f1 as lt, a.f1<=>b.f1 as eq
from t1 a, t1 b;
a b gt lt eq
98 98 0 0 1
00 98 1 0 0
02 98 1 0 0
60 98 1 0 0
70 98 0 1 0
NULL 98 NULL NULL 0
98 00 0 1 0
00 00 0 0 1
02 00 1 0 0
60 00 1 0 0
70 00 0 1 0
NULL 00 NULL NULL 0
98 02 0 1 0
00 02 0 1 0
02 02 0 0 1
60 02 1 0 0
70 02 0 1 0
NULL 02 NULL NULL 0
98 60 0 1 0
00 60 0 1 0
02 60 0 1 0
60 60 0 0 1
70 60 0 1 0
NULL 60 NULL NULL 0
98 70 1 0 0
00 70 1 0 0
02 70 1 0 0
60 70 1 0 0
70 70 0 0 1
NULL 70 NULL NULL 0
98 NULL NULL NULL 0
00 NULL NULL NULL 0
02 NULL NULL NULL 0
60 NULL NULL NULL 0
70 NULL NULL NULL 0
NULL NULL NULL NULL 1
select a.f1 as a, b.f2 as b, a.f1 > b.f2 as gt,
a.f1 < b.f2 as lt, a.f1<=>b.f2 as eq
from t1 a, t1 b;
a b gt lt eq
98 1998 0 0 1
00 1998 1 0 0
02 1998 1 0 0
60 1998 1 0 0
70 1998 0 1 0
NULL 1998 NULL NULL 0
98 2000 0 1 0
00 2000 0 0 1
02 2000 1 0 0
60 2000 1 0 0
70 2000 0 1 0
NULL 2000 NULL NULL 0
98 2002 0 1 0
00 2002 0 1 0
02 2002 0 0 1
60 2002 1 0 0
70 2002 0 1 0
NULL 2002 NULL NULL 0
98 2060 0 1 0
00 2060 0 1 0
02 2060 0 1 0
60 2060 0 0 1
70 2060 0 1 0
NULL 2060 NULL NULL 0
98 1970 1 0 0
00 1970 1 0 0
02 1970 1 0 0
60 1970 1 0 0
70 1970 0 0 1
NULL 1970 NULL NULL 0
98 NULL NULL NULL 0
00 NULL NULL NULL 0
02 NULL NULL NULL 0
60 NULL NULL NULL 0
70 NULL NULL NULL 0
NULL NULL NULL NULL 1
select a.f1 as a, b.f3 as b, a.f1 > b.f3 as gt,
a.f1 < b.f3 as lt, a.f1<=>b.f3 as eq
from t1 a, t1 b;
a b gt lt eq
98 1998-01-01 0 1 0
00 1998-01-01 1 0 0
02 1998-01-01 1 0 0
60 1998-01-01 1 0 0
70 1998-01-01 0 1 0
NULL 1998-01-01 NULL NULL 0
98 2000-01-01 0 1 0
00 2000-01-01 0 1 0
02 2000-01-01 1 0 0
60 2000-01-01 1 0 0
70 2000-01-01 0 1 0
NULL 2000-01-01 NULL NULL 0
98 2002-01-01 0 1 0
00 2002-01-01 0 1 0
02 2002-01-01 0 1 0
60 2002-01-01 1 0 0
70 2002-01-01 0 1 0
NULL 2002-01-01 NULL NULL 0
98 2060-01-01 0 1 0
00 2060-01-01 0 1 0
02 2060-01-01 0 1 0
60 2060-01-01 0 1 0
70 2060-01-01 0 1 0
NULL 2060-01-01 NULL NULL 0
98 1970-01-01 1 0 0
00 1970-01-01 1 0 0
02 1970-01-01 1 0 0
60 1970-01-01 1 0 0
70 1970-01-01 0 1 0
NULL 1970-01-01 NULL NULL 0
98 NULL NULL NULL 0
00 NULL NULL NULL 0
02 NULL NULL NULL 0
60 NULL NULL NULL 0
70 NULL NULL NULL 0
NULL NULL NULL NULL 1
select a.f1 as a, b.f4 as b, a.f1 > b.f4 as gt,
a.f1 < b.f4 as lt, a.f1<=>b.f4 as eq
from t1 a, t1 b;
a b gt lt eq
98 1998-01-01 00:00:00 0 1 0
00 1998-01-01 00:00:00 1 0 0
02 1998-01-01 00:00:00 1 0 0
60 1998-01-01 00:00:00 1 0 0
70 1998-01-01 00:00:00 0 1 0
NULL 1998-01-01 00:00:00 NULL NULL 0
98 2000-01-01 00:00:01 0 1 0
00 2000-01-01 00:00:01 0 1 0
02 2000-01-01 00:00:01 1 0 0
60 2000-01-01 00:00:01 1 0 0
70 2000-01-01 00:00:01 0 1 0
NULL 2000-01-01 00:00:01 NULL NULL 0
98 2002-01-01 23:59:59 0 1 0
00 2002-01-01 23:59:59 0 1 0
02 2002-01-01 23:59:59 0 1 0
60 2002-01-01 23:59:59 1 0 0
70 2002-01-01 23:59:59 0 1 0
NULL 2002-01-01 23:59:59 NULL NULL 0
98 2060-01-01 11:11:11 0 1 0
00 2060-01-01 11:11:11 0 1 0
02 2060-01-01 11:11:11 0 1 0
60 2060-01-01 11:11:11 0 1 0
70 2060-01-01 11:11:11 0 1 0
NULL 2060-01-01 11:11:11 NULL NULL 0
98 1970-11-11 22:22:22 1 0 0
00 1970-11-11 22:22:22 1 0 0
02 1970-11-11 22:22:22 1 0 0
60 1970-11-11 22:22:22 1 0 0
70 1970-11-11 22:22:22 0 1 0
NULL 1970-11-11 22:22:22 NULL NULL 0
98 NULL NULL NULL 0
00 NULL NULL NULL 0
02 NULL NULL NULL 0
60 NULL NULL NULL 0
70 NULL NULL NULL 0
NULL NULL NULL NULL 1
select *, f1 = f2 from t1;
f1 f2 f3 f4 f1 = f2
98 1998 1998-01-01 1998-01-01 00:00:00 1
00 2000 2000-01-01 2000-01-01 00:00:01 1
02 2002 2002-01-01 2002-01-01 23:59:59 1
60 2060 2060-01-01 2060-01-01 11:11:11 1
70 1970 1970-01-01 1970-11-11 22:22:22 1
NULL NULL NULL NULL NULL
drop table t1;
#
End of 5.1 tests

View file

@ -443,3 +443,30 @@ DROP TABLE db1.t1, db1.t2;
DROP USER mysqltest1@localhost;
DROP DATABASE db1;
End of 5.0 tests
USE mysql;
SELECT LEFT(CURRENT_USER(),INSTR(CURRENT_USER(),'@')-1) INTO @u;
SELECT MID(CURRENT_USER(),INSTR(CURRENT_USER(),'@')+1) INTO @h;
SELECT password FROM user WHERE user=@u AND host=@h INTO @pwd;
SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
user host password insert_priv
root localhost Y
UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
user host password insert_priv
root localhost N
GRANT INSERT ON *.* TO CURRENT_USER();
SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
user host password insert_priv
root localhost Y
UPDATE user SET insert_priv='N' WHERE user=@u AND host=@h;
GRANT INSERT ON *.* TO CURRENT_USER() IDENTIFIED BY 'keksdose';
SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
user host password insert_priv
root localhost *0BB7188CF0DE9B403BA66E9DD810D82652D002EB Y
UPDATE user SET password=@pwd WHERE user=@u AND host=@h;
SELECT user,host,password,insert_priv FROM user WHERE user=@u AND host=@h;
user host password insert_priv
root localhost Y
FLUSH PRIVILEGES;
USE test;
End of 5.1 tests

View file

@ -2501,6 +2501,17 @@ SELECT a, MAX(b) FROM t WHERE b > 0 AND b < 2 GROUP BY a;
a MAX(b)
2 1
DROP TABLE t;
#
# Bug #48472: Loose index scan inappropriately chosen for some WHERE
# conditions
#
CREATE TABLE t (a INT, b INT, INDEX (a,b));
INSERT INTO t VALUES (2,0), (2,0), (2,1), (2,1);
INSERT INTO t SELECT * FROM t;
SELECT a, MAX(b) FROM t WHERE 0=b+0 GROUP BY a;
a MAX(b)
2 0
DROP TABLE t;
End of 5.0 tests
#
# Bug #46607: Assertion failed: (cond_type == Item::FUNC_ITEM) results in

View file

@ -875,11 +875,11 @@ ALTER TABLE t1 CHANGE c1 d1 INT NOT NULL AUTO_INCREMENT;
SELECT * FROM t1;
d1
1
3
2
SELECT * FROM t1;
d1
1
3
2
INSERT INTO t1 VALUES(null);
Got one of the listed errors
ALTER TABLE t1 AUTO_INCREMENT = 3;
@ -888,13 +888,13 @@ Table Create Table
t1 CREATE TABLE `t1` (
`d1` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`d1`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES(null);
SELECT * FROM t1;
d1
1
2
3
4
DROP TABLE t1;
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
SHOW VARIABLES LIKE "%auto_inc%";
@ -1126,3 +1126,67 @@ SELECT * FROM T1;
c1 c2
10 0
DROP TABLE T1;
DROP TABLE IF EXISTS T1;
Warnings:
Note 1051 Unknown table 'T1'
CREATE TABLE T1(C1 DOUBLE AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB;
INSERT INTO T1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb');
INSERT INTO T1(C2) VALUES ('innodb');
SHOW CREATE TABLE T1;
Table Create Table
T1 CREATE TABLE `T1` (
`C1` double NOT NULL AUTO_INCREMENT,
`C2` char(10) DEFAULT NULL,
PRIMARY KEY (`C1`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1
DROP TABLE T1;
CREATE TABLE T1(C1 FLOAT AUTO_INCREMENT KEY, C2 CHAR(10)) ENGINE=InnoDB;
INSERT INTO T1(C1, C2) VALUES (1, 'innodb'), (3, 'innodb');
INSERT INTO T1(C2) VALUES ('innodb');
SHOW CREATE TABLE T1;
Table Create Table
T1 CREATE TABLE `T1` (
`C1` float NOT NULL AUTO_INCREMENT,
`C2` char(10) DEFAULT NULL,
PRIMARY KEY (`C1`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1
DROP TABLE T1;
DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 't1'
CREATE TABLE t1 (c1 INT AUTO_INCREMENT PRIMARY KEY) ENGINE=InnoDB;
INSERT INTO t1 SET c1 = 1;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1
INSERT INTO t1 SET c1 = 2;
INSERT INTO t1 SET c1 = -1;
SELECT * FROM t1;
c1
-1
1
2
INSERT INTO t1 SET c1 = -1;
Got one of the listed errors
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
REPLACE INTO t1 VALUES (-1);
SELECT * FROM t1;
c1
-1
1
2
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`c1` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`c1`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
DROP TABLE t1;

View file

@ -48,6 +48,24 @@ commit;
set autocommit=default;
drop table t1;
#
# Bug #37183 insert ignore into .. select ... hangs
# after deadlock was encountered
#
create table t1(id int primary key,v int)engine=innodb;
insert into t1 values (1,1),(2,2),(3,3),(4,4),(5,5),(6,6),(7,7);
create table t2 like t1;
begin;
update t1 set v=id*2 where id=1;
begin;
update t1 set v=id*2 where id=2;
update t1 set v=id*2 where id=2;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
insert ignore into t2 select * from t1 where id=1;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
rollback;
rollback;
drop table t1, t2;
#
# Bug#41756 Strange error messages about locks from InnoDB
#
drop table if exists t1;

View file

@ -2251,4 +2251,26 @@ c >= '2009-10-09 00:00:00.001' AND c <= '2009-10-09 00:00:00.00';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
DROP TABLE t1;
#
# Bug #46175: NULL read_view and consistent read assertion
#
CREATE TABLE t1(a CHAR(13),KEY(a)) ENGINE=innodb;
CREATE TABLE t2(b DATETIME,KEY(b)) ENGINE=innodb;
INSERT INTO t1 VALUES (),();
INSERT INTO t2 VALUES (),();
CREATE OR REPLACE VIEW v1 AS SELECT 1 FROM t2
WHERE b =(SELECT a FROM t1 LIMIT 1);
CREATE PROCEDURE p1(num INT)
BEGIN
DECLARE i INT DEFAULT 0;
REPEAT
SHOW CREATE VIEW v1;
SET i:=i+1;
UNTIL i>num END REPEAT;
END|
# Should not crash
# Should not crash
DROP PROCEDURE p1;
DROP VIEW v1;
DROP TABLE t1,t2;
End of 5.1 tests

View file

@ -229,5 +229,4 @@ a: b
</row>
</resultset>
drop table t1;
End of tests
End of 5.0 tests

View file

@ -2365,7 +2365,7 @@ BEGIN
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO test.t1
### SET
### @1=b'00000000' /* BIT(8) meta=256 nullable=1 is_null=0 */
### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */
### @2=b'0000000000000000000000000000000000000000000000000000000000000000' /* BIT(64) meta=2048 nullable=1 is_null=0 */
### @3=-128 (128) /* TINYINT meta=0 nullable=1 is_null=0 */
### @4=0 /* TINYINT meta=0 nullable=1 is_null=0 */
@ -2458,7 +2458,7 @@ BEGIN
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO test.t1
### SET
### @1=b'00000001' /* BIT(8) meta=256 nullable=1 is_null=0 */
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */
### @3=127 /* TINYINT meta=0 nullable=1 is_null=0 */
### @4=-1 (255) /* TINYINT meta=0 nullable=1 is_null=0 */
@ -2553,7 +2553,7 @@ BEGIN
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
### INSERT INTO test.t1
### SET
### @1=NULL /* type=16 meta=256 nullable=1 is_null=1 */
### @1=NULL /* type=16 meta=1 nullable=1 is_null=1 */
### @2=NULL /* type=16 meta=2048 nullable=1 is_null=1 */
### @3=NULL /* type=1 meta=0 nullable=1 is_null=1 */
### @4=NULL /* type=1 meta=0 nullable=1 is_null=1 */
@ -2580,7 +2580,7 @@ BEGIN
### @25=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @28=NULL /* type=10 meta=0 nullable=1 is_null=1 */
### @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
### @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
### @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
### @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
@ -2634,7 +2634,7 @@ BEGIN
### @79=3 /* INT meta=0 nullable=1 is_null=0 */
### INSERT INTO test.t1
### SET
### @1=b'00000001' /* BIT(8) meta=256 nullable=1 is_null=0 */
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */
### @3=127 /* TINYINT meta=0 nullable=1 is_null=0 */
### @4=0 /* TINYINT meta=0 nullable=1 is_null=0 */
@ -2727,7 +2727,7 @@ BEGIN
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
### UPDATE test.t1
### WHERE
### @1=b'00000000' /* BIT(8) meta=256 nullable=1 is_null=0 */
### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */
### @2=b'0000000000000000000000000000000000000000000000000000000000000000' /* BIT(64) meta=2048 nullable=1 is_null=0 */
### @3=-128 (128) /* TINYINT meta=0 nullable=1 is_null=0 */
### @4=0 /* TINYINT meta=0 nullable=1 is_null=0 */
@ -2807,7 +2807,7 @@ BEGIN
### @78=b'00000000' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=1 /* INT meta=0 nullable=1 is_null=0 */
### SET
### @1=b'00000001' /* BIT(8) meta=256 nullable=1 is_null=0 */
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */
### @3=127 /* TINYINT meta=0 nullable=1 is_null=0 */
### @4=-1 (255) /* TINYINT meta=0 nullable=1 is_null=0 */
@ -2900,7 +2900,7 @@ BEGIN
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
### UPDATE test.t1
### WHERE
### @1=b'00000001' /* BIT(8) meta=256 nullable=1 is_null=0 */
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */
### @3=127 /* TINYINT meta=0 nullable=1 is_null=0 */
### @4=-1 (255) /* TINYINT meta=0 nullable=1 is_null=0 */
@ -2980,7 +2980,7 @@ BEGIN
### @78=b'00000111' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=2 /* INT meta=0 nullable=1 is_null=0 */
### SET
### @1=b'00000000' /* BIT(8) meta=256 nullable=1 is_null=0 */
### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */
### @2=b'0000000000000000000000000000000000000000000000000000000000000000' /* BIT(64) meta=2048 nullable=1 is_null=0 */
### @3=-128 (128) /* TINYINT meta=0 nullable=1 is_null=0 */
### @4=0 /* TINYINT meta=0 nullable=1 is_null=0 */
@ -3073,7 +3073,7 @@ BEGIN
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
### UPDATE test.t1
### WHERE
### @1=NULL /* type=16 meta=256 nullable=1 is_null=1 */
### @1=NULL /* type=16 meta=1 nullable=1 is_null=1 */
### @2=NULL /* type=16 meta=2048 nullable=1 is_null=1 */
### @3=NULL /* type=1 meta=0 nullable=1 is_null=1 */
### @4=NULL /* type=1 meta=0 nullable=1 is_null=1 */
@ -3100,7 +3100,7 @@ BEGIN
### @25=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @28=NULL /* type=10 meta=0 nullable=1 is_null=1 */
### @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
### @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
### @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
### @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
@ -3153,7 +3153,7 @@ BEGIN
### @78=NULL /* TIMESTAMP meta=63489 nullable=1 is_null=1 */
### @79=3 /* INT meta=0 nullable=1 is_null=0 */
### SET
### @1=b'00000001' /* BIT(8) meta=256 nullable=1 is_null=0 */
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */
### @3=127 /* TINYINT meta=0 nullable=1 is_null=0 */
### @4=0 /* TINYINT meta=0 nullable=1 is_null=0 */
@ -3246,7 +3246,7 @@ BEGIN
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
### UPDATE test.t1
### WHERE
### @1=b'00000001' /* BIT(8) meta=256 nullable=1 is_null=0 */
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */
### @3=127 /* TINYINT meta=0 nullable=1 is_null=0 */
### @4=0 /* TINYINT meta=0 nullable=1 is_null=0 */
@ -3326,7 +3326,7 @@ BEGIN
### @78=b'00000110' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=4 /* INT meta=0 nullable=1 is_null=0 */
### SET
### @1=NULL /* type=16 meta=256 nullable=1 is_null=1 */
### @1=NULL /* type=16 meta=1 nullable=1 is_null=1 */
### @2=NULL /* type=16 meta=2048 nullable=1 is_null=1 */
### @3=NULL /* type=1 meta=0 nullable=1 is_null=1 */
### @4=NULL /* type=1 meta=0 nullable=1 is_null=1 */
@ -3353,7 +3353,7 @@ BEGIN
### @25=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @28=NULL /* type=10 meta=0 nullable=1 is_null=1 */
### @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
### @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
### @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
### @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
@ -3419,7 +3419,7 @@ BEGIN
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
### DELETE FROM test.t1
### WHERE
### @1=b'00000001' /* BIT(8) meta=256 nullable=1 is_null=0 */
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */
### @3=127 /* TINYINT meta=0 nullable=1 is_null=0 */
### @4=-1 (255) /* TINYINT meta=0 nullable=1 is_null=0 */
@ -3512,7 +3512,7 @@ BEGIN
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
### DELETE FROM test.t1
### WHERE
### @1=b'00000000' /* BIT(8) meta=256 nullable=1 is_null=0 */
### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */
### @2=b'0000000000000000000000000000000000000000000000000000000000000000' /* BIT(64) meta=2048 nullable=1 is_null=0 */
### @3=-128 (128) /* TINYINT meta=0 nullable=1 is_null=0 */
### @4=0 /* TINYINT meta=0 nullable=1 is_null=0 */
@ -3605,7 +3605,7 @@ BEGIN
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
### DELETE FROM test.t1
### WHERE
### @1=b'00000001' /* BIT(8) meta=256 nullable=1 is_null=0 */
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
### @2=b'1111111111111111111111111111111111111111111111111111111111111111' /* BIT(64) meta=2048 nullable=1 is_null=0 */
### @3=127 /* TINYINT meta=0 nullable=1 is_null=0 */
### @4=0 /* TINYINT meta=0 nullable=1 is_null=0 */
@ -3698,7 +3698,7 @@ BEGIN
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
### DELETE FROM test.t1
### WHERE
### @1=NULL /* type=16 meta=256 nullable=1 is_null=1 */
### @1=NULL /* type=16 meta=1 nullable=1 is_null=1 */
### @2=NULL /* type=16 meta=2048 nullable=1 is_null=1 */
### @3=NULL /* type=1 meta=0 nullable=1 is_null=1 */
### @4=NULL /* type=1 meta=0 nullable=1 is_null=1 */
@ -3725,7 +3725,7 @@ BEGIN
### @25=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @28=NULL /* type=10 meta=0 nullable=1 is_null=1 */
### @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
### @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
### @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
### @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */

View file

@ -2584,7 +2584,7 @@ BEGIN
### @25=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @28=NULL /* type=10 meta=0 nullable=1 is_null=1 */
### @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
### @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
### @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
### @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
@ -3110,7 +3110,7 @@ BEGIN
### @25=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @28=NULL /* type=10 meta=0 nullable=1 is_null=1 */
### @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
### @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
### @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
### @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
@ -3365,7 +3365,7 @@ BEGIN
### @25=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @28=NULL /* type=10 meta=0 nullable=1 is_null=1 */
### @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
### @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
### @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
### @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */
@ -3745,7 +3745,7 @@ BEGIN
### @25=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @26=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @27=NULL /* type=246 meta=2560 nullable=1 is_null=1 */
### @28=NULL /* type=10 meta=0 nullable=1 is_null=1 */
### @28=NULL /* type=14 meta=0 nullable=1 is_null=1 */
### @29=NULL /* type=12 meta=0 nullable=1 is_null=1 */
### @30=1000000000 /* TIMESTAMP meta=0 nullable=0 is_null=0 */
### @31=NULL /* TIMESTAMP meta=0 nullable=1 is_null=1 */

View file

@ -753,4 +753,16 @@ b
100
NULL
DROP TABLE t1, t2;
#
# Bug #48475: DISTINCT is ignored with GROUP BY WITH ROLLUP
# and only const tables
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (b INT);
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1);
SELECT DISTINCT b FROM t1, t2 GROUP BY a, b WITH ROLLUP;
b
1
NULL
DROP TABLE t1, t2;
End of 5.0 tests

View file

@ -1444,6 +1444,27 @@ FROM t3;
2
NULL
DROP TABLE t1, t2, t3;
#
# Bug #42760: Select doesn't return desired results when we have null
# values
#
CREATE TABLE t1 (
a INT,
c INT,
UNIQUE KEY a_c (a,c),
KEY (a));
INSERT INTO t1 VALUES (1, 10), (2, NULL);
# Must use ref-or-null on the a_c index
EXPLAIN
SELECT 1 AS col FROM t1 WHERE a=2 AND (c=10 OR c IS NULL) ORDER BY c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref_or_null a_c,a a_c 10 const,const 1 Using where
# Must return 1 row
SELECT 1 AS col FROM t1 WHERE a=2 AND (c=10 OR c IS NULL) ORDER BY c;
col
1
DROP TABLE t1;
End of 5.0 tests
CREATE TABLE t2 (a varchar(32), b int(11), c float, d double,
UNIQUE KEY a (a,b,c), KEY b (b), KEY c (c));
CREATE TABLE t1 (a varchar(32), b char(3), UNIQUE KEY a (a,b), KEY b (b));

View file

@ -1,4 +1,10 @@
drop table if exists t1, t2;
CREATE TABLE t1 (a INT, b INT)
PARTITION BY LIST (a)
SUBPARTITION BY HASH (b)
(PARTITION p1 VALUES IN (1));
ALTER TABLE t1 ADD COLUMN c INT;
DROP TABLE t1;
CREATE TABLE t1 (
a int NOT NULL,
b int NOT NULL);
@ -50,6 +56,13 @@ t1 CREATE TABLE `t1` (
PARTITION p3 VALUES LESS THAN (733969) ENGINE = MyISAM,
PARTITION pmax VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */
DROP TABLE t1;
create table t1 (a int NOT NULL, b varchar(5) NOT NULL)
default charset=utf8
partition by list (a)
subpartition by key (b)
(partition p0 values in (1),
partition p1 values in (2));
drop table t1;
create table t1 (a int, b int, key(a))
partition by list (a)
( partition p0 values in (1),
@ -2045,10 +2058,15 @@ DROP TABLE t1;
#
# Bug #45807: crash accessing partitioned table and sql_mode
# contains ONLY_FULL_GROUP_BY
# Bug#46923: select count(*) from partitioned table fails with
# ONLY_FULL_GROUP_BY
#
SET SESSION SQL_MODE='ONLY_FULL_GROUP_BY';
CREATE TABLE t1(id INT,KEY(id)) ENGINE=MYISAM
PARTITION BY HASH(id) PARTITIONS 2;
SELECT COUNT(*) FROM t1;
COUNT(*)
0
DROP TABLE t1;
SET SESSION SQL_MODE=DEFAULT;
#

View file

@ -1603,4 +1603,54 @@ SELECT str_to_date('', '%Y-%m-%d');
str_to_date('', '%Y-%m-%d')
0000-00-00
DROP TABLE t1, t2;
#
# Bug#48459: valgrind errors with query using 'Range checked for each
# record'
#
CREATE TABLE t1 (
a INT,
b CHAR(2),
c INT,
d INT,
KEY ( c ),
KEY ( d, a, b ( 2 ) ),
KEY ( b ( 1 ) )
);
INSERT INTO t1 VALUES ( NULL, 'a', 1, 2 ), ( NULL, 'a', 1, 2 ),
( 1, 'a', 1, 2 ), ( 1, 'a', 1, 2 );
CREATE TABLE t2 (
a INT,
c INT,
e INT,
KEY ( e )
);
INSERT INTO t2 VALUES ( 1, 1, NULL ), ( 1, 1, NULL );
# Should not give Valgrind warnings
SELECT 1
FROM t1, t2
WHERE t1.d <> '1' AND t1.b > '1'
AND t1.a = t2.a AND t1.c = t2.c;
1
1
1
1
1
DROP TABLE t1, t2;
#
# Bug #48665: sql-bench's insert test fails due to wrong result
#
CREATE TABLE t1 (a INT, b INT, PRIMARY KEY (a));
INSERT INTO t1 VALUES (0,0), (1,1);
EXPLAIN
SELECT * FROM t1 FORCE INDEX (PRIMARY)
WHERE (a>=1 AND a<=2) OR (a>=4 AND a<=5) OR (a>=0 AND a <=10);
id select_type table type possible_keys key key_len ref rows Extra
@ @ @ range @ @ @ @ @ @
# Should return 2 rows
SELECT * FROM t1 FORCE INDEX (PRIMARY)
WHERE (a>=1 AND a<=2) OR (a>=4 AND a<=5) OR (a>=0 AND a <=10);
a b
0 0
1 1
DROP TABLE t1;
End of 5.1 tests

View file

@ -4427,6 +4427,20 @@ ROW(a,a) <=> ROW((SELECT 1 FROM t1 WHERE 1=2),(SELECT 1 FROM t1))
INTO @var0;
ERROR 21000: Subquery returns more than 1 row
DROP TABLE t1;
#
# Bug #48458: simple query tries to allocate enormous amount of
# memory
#
CREATE TABLE t1(a INT NOT NULL, b YEAR);
INSERT INTO t1 VALUES ();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
CREATE TABLE t2(c INT);
# Should not err out because of out-of-memory
SELECT 1 FROM t2 JOIN t1 ON 1=1
WHERE a != '1' AND NOT a >= b OR NOT ROW(b,a )<> ROW(a,a);
1
DROP TABLE t1,t2;
End of 5.0 tests
create table t1(a INT, KEY (a));
INSERT INTO t1 VALUES (1),(2),(3),(4),(5);
@ -4577,4 +4591,22 @@ field2
15:13:38
drop table A,AA,B,BB;
#end of test for bug#45266
#
# BUG#48052: Valgrind warning - uninitialized value in init_read_record()
#
CREATE TABLE t1 (
pk int(11) NOT NULL,
i int(11) DEFAULT NULL,
v varchar(1) DEFAULT NULL,
PRIMARY KEY (pk)
);
INSERT INTO t1 VALUES (2,7,'m');
INSERT INTO t1 VALUES (3,9,'m');
SELECT v
FROM t1
WHERE NOT pk > 0
HAVING v <= 't'
ORDER BY pk;
v
DROP TABLE t1;
End of 5.1 tests

View file

@ -1,3 +1,4 @@
call mtr.add_suppression("Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted");
use test;
drop procedure if exists bug14233;
drop function if exists bug14233;
@ -11,11 +12,13 @@ create table t1 (id int);
create trigger t1_ai after insert on t1 for each row call bug14233();
alter table mysql.proc drop type;
call bug14233();
ERROR HY000: Failed to load routine test.bug14233. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
ERROR HY000: Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
create view v1 as select bug14233_f();
ERROR HY000: Failed to load routine test.bug14233_f. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
ERROR HY000: Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
insert into t1 values (0);
ERROR HY000: Failed to load routine test.bug14233. The table mysql.proc is missing, corrupt, or contains bad data (internal code -5)
ERROR HY000: Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
show procedure status;
ERROR HY000: Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
flush table mysql.proc;
call bug14233();
ERROR HY000: Incorrect information in file: './mysql/proc.frm'
@ -88,3 +91,28 @@ show procedure status where db=DATABASE();
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
show function status where db=DATABASE();
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
DROP TABLE IF EXISTS proc_backup;
DROP PROCEDURE IF EXISTS p1;
# Backup the proc table
RENAME TABLE mysql.proc TO proc_backup;
CREATE TABLE mysql.proc LIKE proc_backup;
FLUSH TABLE mysql.proc;
# Test with a valid table.
CREATE PROCEDURE p1()
SET @foo = 10;
CALL p1();
SHOW PROCEDURE STATUS;
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
test p1 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
# Modify a field of the table.
ALTER TABLE mysql.proc MODIFY comment CHAR (32);
CREATE PROCEDURE p2()
SET @foo = 10;
ERROR HY000: Cannot load from mysql.proc. The table is probably corrupted
# Procedure loaded from the cache
CALL p1();
SHOW PROCEDURE STATUS;
ERROR HY000: Cannot load from mysql.proc. The table is probably corrupted
DROP TABLE mysql.proc;
RENAME TABLE proc_backup TO mysql.proc;
FLUSH TABLE mysql.proc;

View file

@ -510,4 +510,60 @@ DROP USER mysqltest_u1@localhost;
DROP PROCEDURE p_suid;
DROP FUNCTION f_suid;
DROP TABLE t1;
#
# Bug #48872 : Privileges for stored functions ignored if function name
# is mixed case
#
CREATE DATABASE B48872;
USE B48872;
CREATE TABLE `TestTab` (id INT);
INSERT INTO `TestTab` VALUES (1),(2);
CREATE FUNCTION `f_Test`() RETURNS INT RETURN 123;
CREATE FUNCTION `f_Test_denied`() RETURNS INT RETURN 123;
CREATE USER 'tester';
CREATE USER 'Tester';
GRANT SELECT ON TABLE `TestTab` TO 'tester';
GRANT EXECUTE ON FUNCTION `f_Test` TO 'tester';
GRANT EXECUTE ON FUNCTION `f_Test_denied` TO 'Tester';
SELECT f_Test();
f_Test()
123
SELECT * FROM TestTab;
id
1
2
SELECT * FROM TestTab;
id
1
2
SELECT `f_Test`();
`f_Test`()
123
SELECT `F_TEST`();
`F_TEST`()
123
SELECT f_Test();
f_Test()
123
SELECT F_TEST();
F_TEST()
123
SELECT * FROM TestTab;
SELECT `f_Test`();
SELECT `F_TEST`();
SELECT f_Test();
SELECT F_TEST();
SELECT `f_Test_denied`();
`f_Test_denied`()
123
SELECT `F_TEST_DENIED`();
`F_TEST_DENIED`()
123
DROP TABLE `TestTab`;
DROP FUNCTION `f_Test`;
DROP FUNCTION `f_Test_denied`;
USE test;
DROP USER 'tester';
DROP USER 'Tester';
DROP DATABASE B48872;
End of 5.0 tests.

View file

@ -6970,6 +6970,64 @@ CALL p1;
ERROR 42S22: Unknown column 'A.b' in 'IN/ALL/ANY subquery'
DROP PROCEDURE p1;
DROP TABLE t1, t2;
#
# Bug#47627: SET @@{global.session}.local_variable in stored routine causes crash
# Bug#48626: Crash or lost connection using SET for declared variables with @@
#
DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
DROP PROCEDURE IF EXISTS p3;
CREATE PROCEDURE p1()
BEGIN
DECLARE v INT DEFAULT 0;
SET @@SESSION.v= 10;
END//
ERROR HY000: Unknown system variable 'v'
CREATE PROCEDURE p2()
BEGIN
DECLARE v INT DEFAULT 0;
SET v= 10;
END//
call p2()//
CREATE PROCEDURE p3()
BEGIN
DECLARE v INT DEFAULT 0;
SELECT @@SESSION.v;
END//
ERROR HY000: Unknown system variable 'v'
CREATE PROCEDURE p4()
BEGIN
DECLARE v INT DEFAULT 0;
SET @@GLOBAL.v= 10;
END//
ERROR HY000: Unknown system variable 'v'
CREATE PROCEDURE p5()
BEGIN
DECLARE init_connect INT DEFAULT 0;
SET init_connect= 10;
SET @@GLOBAL.init_connect= 'SELECT 1';
SET @@SESSION.IDENTITY= 1;
SELECT @@SESSION.IDENTITY;
SELECT @@GLOBAL.init_connect;
SELECT init_connect;
END//
CREATE PROCEDURE p6()
BEGIN
DECLARE v INT DEFAULT 0;
SET @@v= 0;
END//
ERROR HY000: Unknown system variable 'v'
SET @old_init_connect= @@GLOBAL.init_connect;
CALL p5();
@@SESSION.IDENTITY
1
@@GLOBAL.init_connect
SELECT 1
init_connect
10
SET @@GLOBAL.init_connect= @old_init_connect;
DROP PROCEDURE p2;
DROP PROCEDURE p5;
# ------------------------------------------------------------------
# -- End of 5.1 tests
# ------------------------------------------------------------------

View file

@ -1630,3 +1630,287 @@ SELECT my_col FROM t1;
my_col
0.012345687012345687012345687012
DROP TABLE t1;
#
# Bug#45261: Crash, stored procedure + decimal
#
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 SELECT
/* 81 */ 100000000000000000000000000000000000000000000000000000000000000000000000000000001
AS c1;
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,0) NO 0
SELECT * FROM t1;
c1
99999999999999999999999999999999999999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 81 */ 100000000000000000000000000000000000000000000000000000000000000000000000000000001.
AS c1;
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,0) NO 0
SELECT * FROM t1;
c1
99999999999999999999999999999999999999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 81 */ 100000000000000000000000000000000000000000000000000000000000000000000000000000001.1 /* 1 */
AS c1;
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,0) NO 0
SELECT * FROM t1;
c1
99999999999999999999999999999999999999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 82 */ 1000000000000000000000000000000000000000000000000000000000000000000000000000000001
AS c1;
Warnings:
Error 1292 Truncated incorrect DECIMAL value: ''
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,0) NO 0
SELECT * FROM t1;
c1
99999999999999999999999999999999999999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 40 */ 1000000000000000000000000000000000000001.1000000000000000000000000000000000000001 /* 40 */
AS c1;
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
99999999999999999999999999999999999.999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 1 */ 1.10000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 80 */
AS c1;
DESC t1;
Field Type Null Key Default Extra
c1 decimal(31,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
1.100000000000000000000000000000
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 1 */ 1.100000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 81 */
AS c1;
DESC t1;
Field Type Null Key Default Extra
c1 decimal(31,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
1.100000000000000000000000000000
DROP TABLE t1;
CREATE TABLE t1 SELECT
.100000000000000000000000000000000000000000000000000000000000000000000000000000001 /* 81 */
AS c1;
Warnings:
Note 1265 Data truncated for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(30,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
0.100000000000000000000000000000
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 45 */ 123456789012345678901234567890123456789012345.123456789012345678901234567890123456789012345 /* 45 */
AS c1;
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
99999999999999999999999999999999999.999999999999999999999999999999
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 65 */ 12345678901234567890123456789012345678901234567890123456789012345.1 /* 1 */
AS c1;
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,1) NO 0.0
SELECT * FROM t1;
c1
9999999999999999999999999999999999999999999999999999999999999999.9
DROP TABLE t1;
CREATE TABLE t1 SELECT
/* 66 */ 123456789012345678901234567890123456789012345678901234567890123456.1 /* 1 */
AS c1;
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,1) NO 0.0
SELECT * FROM t1;
c1
9999999999999999999999999999999999999999999999999999999999999999.9
DROP TABLE t1;
CREATE TABLE t1 SELECT
.123456789012345678901234567890123456789012345678901234567890123456 /* 66 */
AS c1;
Warnings:
Note 1265 Data truncated for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(30,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
0.123456789012345678901234567890
DROP TABLE t1;
CREATE TABLE t1 AS SELECT 123.1234567890123456789012345678901 /* 31 */ AS c1;
Warnings:
Note 1265 Data truncated for column 'c1' at row 1
DESC t1;
Field Type Null Key Default Extra
c1 decimal(33,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
123.123456789012345678901234567890
DROP TABLE t1;
CREATE TABLE t1 SELECT 1.1 + CAST(1 AS DECIMAL(65,30)) AS c1;
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,30) NO 0.000000000000000000000000000000
SELECT * FROM t1;
c1
2.100000000000000000000000000000
DROP TABLE t1;
#
# Test that the integer and decimal parts are properly calculated.
#
CREATE TABLE t1 (a DECIMAL(30,30));
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
CREATE TABLE t2 SELECT MIN(a + 0.0000000000000000000000000000001) AS c1 FROM t1;
Warnings:
Note 1265 Data truncated for column 'c1' at row 3
DESC t2;
Field Type Null Key Default Extra
c1 decimal(32,30) YES NULL
DROP TABLE t1,t2;
CREATE TABLE t1 (a DECIMAL(30,30));
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
CREATE TABLE t2 SELECT IFNULL(a + 0.0000000000000000000000000000001, NULL) AS c1 FROM t1;
Warnings:
Note 1265 Data truncated for column 'c1' at row 1
Note 1265 Data truncated for column 'c1' at row 2
Note 1265 Data truncated for column 'c1' at row 3
DESC t2;
Field Type Null Key Default Extra
c1 decimal(34,0) YES NULL
DROP TABLE t1,t2;
CREATE TABLE t1 (a DECIMAL(30,30));
INSERT INTO t1 VALUES (0.1),(0.2),(0.3);
CREATE TABLE t2 SELECT CASE a WHEN 0.1 THEN 0.0000000000000000000000000000000000000000000000000000000000000000001 END AS c1 FROM t1;
Warnings:
Note 1265 Data truncated for column 'c1' at row 1
DESC t2;
Field Type Null Key Default Extra
c1 decimal(65,30) YES NULL
DROP TABLE t1,t2;
#
# Test that variables get maximum precision.
#
SET @decimal= 1.1;
CREATE TABLE t1 SELECT @decimal AS c1;
DESC t1;
Field Type Null Key Default Extra
c1 decimal(65,30) YES NULL
SELECT * FROM t1;
c1
1.100000000000000000000000000000
DROP TABLE t1;
#
# Bug #45261 : Crash, stored procedure + decimal
# Original test by the reporter.
#
# should not crash
CREATE TABLE t1
SELECT .123456789012345678901234567890123456789012345678901234567890123456 AS a;
Warnings:
Note 1265 Data truncated for column 'a' at row 1
DROP TABLE t1;
CREATE PROCEDURE test_proc()
BEGIN
# The las non critical CUSER definition is:
# DECLARE mycursor CURSOR FOR SELECT 1 %
# .12345678912345678912345678912345678912345678912345678912345678912 AS my_col;
DECLARE mycursor CURSOR FOR
SELECT 1 %
.123456789123456789123456789123456789123456789123456789123456789123456789123456789
AS my_col;
OPEN mycursor;
CLOSE mycursor;
END|
# should not crash
CALL test_proc();
DROP PROCEDURE test_proc;
#
# Bug #48370 Absolutely wrong calculations with GROUP BY and
# decimal fields when using IF
#
CREATE TABLE currencies (id int, rate decimal(16,4),
PRIMARY KEY (id), KEY (rate));
INSERT INTO currencies VALUES (11,0.7028);
INSERT INTO currencies VALUES (1,1);
CREATE TABLE payments (
id int,
supplier_id int,
status int,
currency_id int,
vat decimal(7,4),
PRIMARY KEY (id),
KEY currency_id (currency_id),
KEY supplier_id (supplier_id)
);
INSERT INTO payments (id,status,vat,supplier_id,currency_id) VALUES
(3001,2,0.0000,344,11), (1,2,0.0000,1,1);
CREATE TABLE sub_tasks (
id int,
currency_id int,
price decimal(16,4),
discount decimal(10,4),
payment_id int,
PRIMARY KEY (id),
KEY currency_id (currency_id),
KEY payment_id (payment_id)
) ;
INSERT INTO sub_tasks (id, price, discount, payment_id, currency_id) VALUES
(52, 12.60, 0, 3001, 11), (56, 14.58, 0, 3001, 11);
# should return 1 and the same values in col 2 and 3
select STRAIGHT_JOIN
(1 + PAY.vat) AS mult,
SUM(ROUND((SUB.price - ROUND(ROUND(SUB.price, 2) * SUB.discount, 2)) *
CUR.rate / CUR.rate, 2)
) v_net_with_discount,
SUM(ROUND((SUB.price - ROUND(ROUND(SUB.price, 2) * SUB.discount, 1)) *
CUR.rate / CUR.rate , 2)
* (1 + PAY.vat)
) v_total
from
currencies CUR, payments PAY, sub_tasks SUB
where
SUB.payment_id = PAY.id and
PAY.currency_id = CUR.id and
PAY.id > 2
group by PAY.id + 1;
mult v_net_with_discount v_total
1.0000 27.18 27.180000
DROP TABLE currencies, payments, sub_tasks;
End of 5.1 tests

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,3 +1,4 @@
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
drop table if exists t1, t2;
create table t1 (a int) engine=innodb;
create table t2 (a int) engine=myisam;
@ -224,6 +225,8 @@ create table t0 (n int);
insert t0 select * from t1;
set autocommit=1;
insert into t0 select GET_LOCK("lock1",null);
Warnings:
Note 1592 Statement may not be safe to log in statement format.
set autocommit=0;
create table t2 (n int) engine=innodb;
insert into t2 values (3);

View file

@ -1,3 +1,4 @@
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
set @saved_global_binlog_format = @@global.binlog_format;
@ -29,6 +30,8 @@ SELECT RELEASE_LOCK('Bug#34306');
RELEASE_LOCK('Bug#34306')
1
# con2
Warnings:
Note 1592 Statement may not be safe to log in statement format.
SELECT RELEASE_LOCK('Bug#34306');
RELEASE_LOCK('Bug#34306')
1

View file

@ -382,4 +382,87 @@ master-bin.000001 13657 Write_rows 1 13695 table_id: 48
master-bin.000001 13695 Write_rows 1 13729 table_id: 47 flags: STMT_END_F
master-bin.000001 13729 Query 1 13798 COMMIT
DROP TABLE t1,t2,t3;
SET SESSION binlog_format = STATEMENT;
CREATE TABLE t1 (a VARCHAR(1000));
INSERT INTO t1 VALUES (CURRENT_USER());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (FOUND_ROWS());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (GET_LOCK('tmp', 1));
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (IS_FREE_LOCK('tmp'));
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (IS_USED_LOCK('tmp'));
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (LOAD_FILE('../../std_data/words2.dat'));
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (MASTER_POS_WAIT('dummy arg', 4711, 1));
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (RELEASE_LOCK('tmp'));
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (ROW_COUNT());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (SESSION_USER());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (SLEEP(1));
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (SYSDATE());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (SYSTEM_USER());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (USER());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (UUID());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (UUID_SHORT());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
INSERT INTO t1 VALUES (VERSION());
Warnings:
Note 1592 Statement may not be safe to log in statement format.
DELETE FROM t1;
SET TIMESTAMP=1000000;
INSERT INTO t1 VALUES
(CURDATE()),
(CURRENT_DATE()),
(CURRENT_TIME()),
(CURRENT_TIMESTAMP()),
(CURTIME()),
(LOCALTIME()),
(LOCALTIMESTAMP()),
(NOW()),
(UNIX_TIMESTAMP()),
(UTC_DATE()),
(UTC_TIME()),
(UTC_TIMESTAMP());
SELECT * FROM t1;
a
1970-01-12
1970-01-12
16:46:40
1970-01-12 16:46:40
16:46:40
1970-01-12 16:46:40
1970-01-12 16:46:40
1970-01-12 16:46:40
1000000
1970-01-12
13:46:40
1970-01-12 13:46:40
DROP TABLE t1;
"End of tests"

View file

@ -1,5 +1,5 @@
-- source include/have_innodb.inc
-- source include/have_binlog_format_mixed_or_statement.inc
-- source include/have_binlog_format_statement.inc
# You cannot use `KILL' with the Embedded MySQL Server library,
# because the embedded server merely runs inside the threads of the host

View file

@ -2,6 +2,9 @@
# For both statement and row based bin logs 9/19/2005 [jbm]
-- source include/have_binlog_format_statement.inc
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
-- source extra/binlog_tests/mix_innodb_myisam_binlog.test
set @@session.binlog_format=statement;

View file

@ -1,5 +1,8 @@
--source include/have_log_bin.inc
--source include/have_binlog_format_row_or_statement.inc
# Test sets its own binlog_format, so we restrict it to run only once
--source include/have_binlog_format_row.inc
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
# Get rid of previous tests binlog
--disable_query_log

View file

@ -426,7 +426,7 @@ eval SHOW BINLOG EVENTS FROM $pos0_master;
# clean up
DROP TABLE t1,t2;
DROP FUNCTION func_modify_t1;
#
# Test case2: stmt that have more than one different tables
# to update with autoinc columns should produce
# unsafe warning when invoking a trigger
@ -456,4 +456,56 @@ eval SHOW BINLOG EVENTS FROM $pos1_master;
# clean up
DROP TABLE t1,t2,t3;
#
# BUG#47995: Mark user functions as unsafe
#
# Test that the system functions that are supposed to be marked unsafe
# generate a warning. Each INSERT statement below should generate a
# warning.
#
SET SESSION binlog_format = STATEMENT;
CREATE TABLE t1 (a VARCHAR(1000));
INSERT INTO t1 VALUES (CURRENT_USER()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (FOUND_ROWS()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (GET_LOCK('tmp', 1));
INSERT INTO t1 VALUES (IS_FREE_LOCK('tmp'));
INSERT INTO t1 VALUES (IS_USED_LOCK('tmp'));
INSERT INTO t1 VALUES (LOAD_FILE('../../std_data/words2.dat')); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (MASTER_POS_WAIT('dummy arg', 4711, 1));
INSERT INTO t1 VALUES (RELEASE_LOCK('tmp'));
INSERT INTO t1 VALUES (ROW_COUNT()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (SESSION_USER()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (SLEEP(1));
INSERT INTO t1 VALUES (SYSDATE());
INSERT INTO t1 VALUES (SYSTEM_USER()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (USER()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (UUID()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (UUID_SHORT()); #marked unsafe before BUG#47995
INSERT INTO t1 VALUES (VERSION());
DELETE FROM t1;
# Since we replicate the TIMESTAMP variable, functions affected by the
# TIMESTAMP variable are safe to replicate. So we check that the
# following following functions depend on the TIMESTAMP variable and
# don't generate a warning.
SET TIMESTAMP=1000000;
INSERT INTO t1 VALUES
(CURDATE()),
(CURRENT_DATE()),
(CURRENT_TIME()),
(CURRENT_TIMESTAMP()),
(CURTIME()),
(LOCALTIME()),
(LOCALTIMESTAMP()),
(NOW()),
(UNIX_TIMESTAMP()),
(UTC_DATE()),
(UTC_TIME()),
(UTC_TIMESTAMP());
SELECT * FROM t1;
DROP TABLE t1;
--echo "End of tests"

View file

@ -968,6 +968,7 @@ create index t1u on t1 (u(1));
drop table t1;
set global innodb_file_per_table=0;
set global innodb_file_format=Antelope;
set global innodb_file_format_check=Antelope;
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
CREATE TABLE t1(

View file

@ -0,0 +1,9 @@
SET foreign_key_checks=0;
CREATE TABLE t1 (id int, foreign key (id) references t2(id)) ENGINE=INNODB;
CREATE TABLE t2 (id int, foreign key (id) references t1(id)) ENGINE=INNODB;
SET foreign_key_checks=1;
SELECT COUNT(*) FROM information_schema.key_column_usage WHERE REFERENCED_TABLE_NAME in ('t1', 't2');
COUNT(*)
2
SET foreign_key_checks=0;
DROP TABLE t1, t2;

View file

@ -0,0 +1,24 @@
set @old_innodb_file_format_check=@@innodb_file_format_check;
select @old_innodb_file_format_check;
@old_innodb_file_format_check
Antelope
set global innodb_file_format_check = Barracuda;
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format_check = DEFAULT;
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format_check = @old_innodb_file_format_check;
select @@innodb_file_format_check;
@@innodb_file_format_check
Antelope
set global innodb_file_format_check = cheetah;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format_check = Bear;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format_check = on;
ERROR HY000: Incorrect arguments to SET
set global innodb_file_format_check = off;
ERROR HY000: Incorrect arguments to SET

View file

@ -31,8 +31,6 @@ select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda
set global innodb_file_format_check=default;
Warnings:
Warning 1210 Ignoring SET innodb_file_format=on
select @@innodb_file_format_check;
@@innodb_file_format_check
Barracuda

View file

@ -1 +1 @@
--innodb_lock_wait_timeout=2
--loose-innodb_lock_wait_timeout=2

View file

@ -1,5 +1,7 @@
-- source include/have_innodb.inc
let $innodb_file_format_check_orig=`select @@innodb_file_format_check`;
create table t1(a int not null, b int, c char(10) not null, d varchar(20)) engine = innodb;
insert into t1 values (5,5,'oo','oo'),(4,4,'tr','tr'),(3,4,'ad','ad'),(2,3,'ak','ak');
commit;
@ -398,6 +400,7 @@ create index t1u on t1 (u(1));
drop table t1;
eval set global innodb_file_per_table=$per_table;
eval set global innodb_file_format=$format;
eval set global innodb_file_format_check=$format;
#
# Test to check whether CREATE INDEX handles implicit foreign key
@ -532,3 +535,10 @@ disconnect a;
disconnect b;
DROP TABLE t1;
#
# restore environment to the state it was before this test execution
#
-- disable_query_log
eval SET GLOBAL innodb_file_format_check=$innodb_file_format_check_orig;

View file

@ -0,0 +1,16 @@
# This is the test for bug 46676: mysqld got exception 0xc0000005
# It is reproducible with InnoDB plugin 1.0.4 + MySQL 5.1.37.
# But no longer reproducible after MySQL 5.1.38 (with plugin 1.0.5).
--source include/have_innodb.inc
SET foreign_key_checks=0;
CREATE TABLE t1 (id int, foreign key (id) references t2(id)) ENGINE=INNODB;
CREATE TABLE t2 (id int, foreign key (id) references t1(id)) ENGINE=INNODB;
SET foreign_key_checks=1;
# Server crashes
SELECT COUNT(*) FROM information_schema.key_column_usage WHERE REFERENCED_TABLE_NAME in ('t1', 't2');
SET foreign_key_checks=0;
DROP TABLE t1, t2;

View file

@ -0,0 +1,46 @@
# This is the unit test for bug *47167.
# It tests setting the global variable
# "innodb_file_format_check" with a
# user-Defined Variable.
--source include/have_innodb.inc
-- source suite/innodb/include/have_innodb_plugin.inc
# Save the value (Antelope) in 'innodb_file_format_check' to
# 'old_innodb_file_format_check'
set @old_innodb_file_format_check=@@innodb_file_format_check;
# @old_innodb_file_format_check shall have the value of 'Antelope'
select @old_innodb_file_format_check;
# Reset the value in 'innodb_file_format_check' to 'Barracuda'
set global innodb_file_format_check = Barracuda;
select @@innodb_file_format_check;
# Set 'innodb_file_format_check' to its default value, which
# is the latest file format supported in the current release.
set global innodb_file_format_check = DEFAULT;
select @@innodb_file_format_check;
# Put the saved value back to 'innodb_file_format_check'
set global innodb_file_format_check = @old_innodb_file_format_check;
# Check whether 'innodb_file_format_check' get its original value.
select @@innodb_file_format_check;
# Following are negative tests, all should fail.
--disable_warnings
--error ER_WRONG_ARGUMENTS
set global innodb_file_format_check = cheetah;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format_check = Bear;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format_check = on;
--error ER_WRONG_ARGUMENTS
set global innodb_file_format_check = off;
--enable_warnings

View file

@ -4,6 +4,8 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
CREATE DATABASE track;
USE track;
CREATE TABLE `visits` (
@ -65,5 +67,6 @@ visits_id myid src ip cc org ref time host entry visit_exit user_id visit_start
SELECT * FROM visits_events;
event_id visit_id timestamp src data visits_events_id
20000 21231038 2007-09-18 03:59:02 Downloads/MySQL-4.1/mysql-4.1.12a-win32.zip 33712207
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
DROP DATABASE track;
End of 5.1 tests

View file

@ -9,6 +9,8 @@ DROP TABLE IF EXISTS t1;
*** Create "wider" table on slave ***
STOP SLAVE;
RESET SLAVE;
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
CREATE TABLE t1 (
a float (47),
b double (143,9),
@ -177,3 +179,4 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
*** Cleanup ***
DROP TABLE t1;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;

View file

@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
create table t1 (a int primary key);
create table t4 (a int primary key);
insert into t1 values (1),(1);

View file

@ -9,6 +9,8 @@ call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
*** On Slave ***
STOP SLAVE;
RESET SLAVE;
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(4) DEFAULT 'TEST')
@ -32,6 +34,7 @@ a b c d e
1 2 TEXAS 2 TEST
2 1 AUSTIN 2 TEST
3 4 QA 2 TEST
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
*** Drop t1 ***
DROP TABLE t1;
*** Create t2 on slave ***
@ -73,8 +76,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
Last_Errno 1642
Last_Error Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -91,8 +94,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
STOP SLAVE;
@ -142,8 +145,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
Last_Errno 1642
Last_Error Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -160,8 +163,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -206,8 +209,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
Last_Errno 1642
Last_Error Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -224,8 +227,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -270,8 +273,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
Last_Errno 1642
Last_Error Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -288,8 +291,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
Last_SQL_Errno 1642
Last_SQL_Error Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -333,8 +336,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
Last_Errno 1642
Last_Error Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -351,8 +354,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
Last_SQL_Errno 1642
Last_SQL_Error Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
@ -471,8 +474,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
Last_Errno 1642
Last_Error Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -489,8 +492,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -500,7 +503,7 @@ DROP TABLE t10;
*** Create t11 on slave ***
STOP SLAVE;
RESET SLAVE;
CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT,
CREATE TABLE t11 (a INT KEY, b BLOB, f INT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='InnoDB';
*** Create t11 on Master ***
CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
@ -534,8 +537,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
Last_Errno 1642
Last_Error Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -552,8 +555,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -928,8 +931,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
Last_Errno 1642
Last_Error Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -946,8 +949,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;

View file

@ -9,6 +9,8 @@ call mtr.add_suppression("Slave: Unknown table 't6' Error_code: 1051");
*** On Slave ***
STOP SLAVE;
RESET SLAVE;
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
CREATE TABLE t1 (a INT, b INT PRIMARY KEY, c CHAR(20),
d FLOAT DEFAULT '2.00',
e CHAR(4) DEFAULT 'TEST')
@ -32,6 +34,7 @@ a b c d e
1 2 TEXAS 2 TEST
2 1 AUSTIN 2 TEST
3 4 QA 2 TEST
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
*** Drop t1 ***
DROP TABLE t1;
*** Create t2 on slave ***
@ -73,8 +76,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
Last_Errno 1642
Last_Error Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -91,8 +94,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 size mismatch - master has size 10, test.t2 on slave has size 6. Master's column size should be <= the slave's column size.
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t2' cannot be converted from type 'char(10)' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
STOP SLAVE;
@ -142,8 +145,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
Last_Errno 1642
Last_Error Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -160,8 +163,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 252, test.t3 has type 3
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t3' cannot be converted from type 'tinyblob' to type 'int(11)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -206,8 +209,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
Last_Errno 1642
Last_Error Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -224,8 +227,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 246, test.t4 has type 3
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t4' cannot be converted from type 'decimal(8,2)' to type 'int(11)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -270,8 +273,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
Last_Errno 1642
Last_Error Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -288,8 +291,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 5 type mismatch - received type 4, test.t5 has type 246
Last_SQL_Errno 1642
Last_SQL_Error Column 1 of table 'test.t5' cannot be converted from type 'varchar(6)' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -333,8 +336,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
Last_Errno 1642
Last_Error Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -351,8 +354,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 3 type mismatch - received type 16, test.t6 has type 3
Last_SQL_Errno 1642
Last_SQL_Error Column 1 of table 'test.t6' cannot be converted from type 'varchar(6)' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=3;
@ -471,8 +474,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
Last_Errno 1642
Last_Error Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -489,8 +492,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 254, test.t10 has type 5
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t10' cannot be converted from type 'char(5)' to type 'double'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -500,7 +503,7 @@ DROP TABLE t10;
*** Create t11 on slave ***
STOP SLAVE;
RESET SLAVE;
CREATE TABLE t11 (a INT KEY, b BLOB, f TEXT,
CREATE TABLE t11 (a INT KEY, b BLOB, f INT,
c CHAR(5) DEFAULT 'test', e INT DEFAULT '1')ENGINE='MyISAM';
*** Create t11 on Master ***
CREATE TABLE t11 (a INT PRIMARY KEY, b BLOB, c VARCHAR(254)
@ -534,8 +537,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
Last_Errno 1642
Last_Error Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -552,8 +555,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 15, test.t11 has type 252
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t11' cannot be converted from type 'varchar(254)' to type 'int(11)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -928,8 +931,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
Last_Errno 1642
Last_Error Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -946,8 +949,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 8, test.t17 has type 2
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t17' cannot be converted from type 'bigint' to type 'smallint(6)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;

View file

@ -567,8 +567,8 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
Last_Errno 1642
Last_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -585,8 +585,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -644,8 +644,8 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
Last_Errno 1642
Last_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -662,8 +662,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -1722,8 +1722,8 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
Last_Errno 1642
Last_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -1740,8 +1740,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -1799,8 +1799,8 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
Last_Errno 1642
Last_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -1817,8 +1817,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -2877,8 +2877,8 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
Last_Errno 1642
Last_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -2895,8 +2895,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -2954,8 +2954,8 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
Last_Errno 1642
Last_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -2972,8 +2972,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;

View file

@ -567,8 +567,8 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
Last_Errno 1642
Last_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -585,8 +585,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -644,8 +644,8 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
Last_Errno 1642
Last_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -662,8 +662,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -1722,8 +1722,8 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
Last_Errno 1642
Last_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -1740,8 +1740,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -1799,8 +1799,8 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
Last_Errno 1642
Last_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -1817,8 +1817,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -2877,8 +2877,8 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
Last_Errno 1642
Last_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -2895,8 +2895,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 5, test.t10 has type 254
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t10' cannot be converted from type 'double' to type 'char(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
@ -2954,8 +2954,8 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
Last_Errno 1642
Last_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -2972,8 +2972,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 252, test.t11 has type 15
Last_SQL_Errno 1642
Last_SQL_Error Column 2 of table 'test.t11' cannot be converted from type 'tinyblob' to type 'varchar(254)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;

View file

@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
create table t1(n int);
insert into t1 values(get_lock("lock",2));
select get_lock("lock",2);

View file

@ -0,0 +1,17 @@
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
create table t1(a int not null auto_increment, b int, primary key(a) );
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
select * from t1;
a b
1 10
2 15
select * from t1;
a b
1 10
2 15
drop table t1;

View file

@ -0,0 +1,26 @@
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TABLE t1 (a VARCHAR(1000));
INSERT INTO t1 VALUES (CONNECTION_ID());
INSERT INTO t1 VALUES (CONNECTION_ID());
INSERT INTO t1 VALUES
(CURDATE()),
(CURRENT_DATE()),
(CURRENT_TIME()),
(CURRENT_TIMESTAMP()),
(CURTIME()),
(LOCALTIME()),
(LOCALTIMESTAMP()),
(NOW()),
(UNIX_TIMESTAMP()),
(UTC_DATE()),
(UTC_TIME()),
(UTC_TIMESTAMP());
INSERT INTO t1 VALUES (RAND());
INSERT INTO t1 VALUES (LAST_INSERT_ID());
Comparing tables master:test.t1 and slave:test.t1
DROP TABLE t1;

View file

@ -476,6 +476,8 @@ ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
CREATE TABLE t7 (i INT NOT NULL,
c CHAR(255) CHARACTER SET utf8 NOT NULL,
j INT NOT NULL) ENGINE = 'MYISAM' ;
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
[expecting slave to replicate correctly]
INSERT INTO t1 VALUES (1, "", 1);
INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
@ -484,11 +486,7 @@ Comparing tables master:test.t1 and slave:test.t1
INSERT INTO t2 VALUES (1, "", 1);
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
Comparing tables master:test.t2 and slave:test.t2
[expecting slave to stop]
INSERT INTO t3 VALUES (1, "", 1);
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
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.
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
@ -501,7 +499,7 @@ Comparing tables master:test.t4 and slave:test.t4
INSERT INTO t5 VALUES (1, "", 1);
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
Last_SQL_Error
Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)'
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
@ -510,7 +508,7 @@ START SLAVE;
INSERT INTO t6 VALUES (1, "", 1);
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
Last_SQL_Error
Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)'
RESET MASTER;
STOP SLAVE;
RESET SLAVE;

View file

@ -354,6 +354,8 @@ X Q 5 7 R 49 X Y 2 S 1
X Q 5 7 R 49 X Z 2 S 2
X Q 5 9 R 81 X Y 2 S 1
X Q 5 9 R 81 X Z 2 S 2
SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY';
CREATE TABLE t4 (C1 CHAR(1) PRIMARY KEY, B1 BIT(1), B2 BIT(1) NOT NULL DEFAULT 0, C2 CHAR(1) NOT NULL DEFAULT 'A') ENGINE = 'INNODB' ;
INSERT INTO t4 SET C1 = 1;
SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1;
@ -362,6 +364,7 @@ C1 HEX(B1) HEX(B2)
SELECT C1,HEX(B1),HEX(B2) FROM t4 ORDER BY C1;
C1 HEX(B1) HEX(B2)
1 NULL 0
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
CREATE TABLE t7 (C1 INT PRIMARY KEY, C2 INT) ENGINE = 'INNODB' ;
--- on slave: original values ---
INSERT INTO t7 VALUES (1,3), (2,6), (3,9);
@ -476,6 +479,8 @@ ALTER TABLE t6 MODIFY c CHAR(128) CHARACTER SET utf8 NOT NULL;
CREATE TABLE t7 (i INT NOT NULL,
c CHAR(255) CHARACTER SET utf8 NOT NULL,
j INT NOT NULL) ENGINE = 'INNODB' ;
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
[expecting slave to replicate correctly]
INSERT INTO t1 VALUES (1, "", 1);
INSERT INTO t1 VALUES (2, repeat(_utf8'a', 16), 2);
@ -484,11 +489,7 @@ Comparing tables master:test.t1 and slave:test.t1
INSERT INTO t2 VALUES (1, "", 1);
INSERT INTO t2 VALUES (2, repeat(_utf8'a', 16), 2);
Comparing tables master:test.t2 and slave:test.t2
[expecting slave to stop]
INSERT INTO t3 VALUES (1, "", 1);
INSERT INTO t3 VALUES (2, repeat(_utf8'a', 128), 2);
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.
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
@ -501,7 +502,7 @@ Comparing tables master:test.t4 and slave:test.t4
INSERT INTO t5 VALUES (1, "", 1);
INSERT INTO t5 VALUES (2, repeat(_utf8'a', 255), 2);
Last_SQL_Error
Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t5 on slave has size 49. Master's column size should be <= the slave's column size.
Column 1 of table 'test.t5' cannot be converted from type 'char(255)' to type 'char(16)'
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
@ -510,7 +511,7 @@ START SLAVE;
INSERT INTO t6 VALUES (1, "", 1);
INSERT INTO t6 VALUES (2, repeat(_utf8'a', 255), 2);
Last_SQL_Error
Table definition on master and slave does not match: Column 1 size mismatch - master has size 765, test.t6 on slave has size 385. Master's column size should be <= the slave's column size.
Column 1 of table 'test.t6' cannot be converted from type 'char(255)' to type 'char(128)'
RESET MASTER;
STOP SLAVE;
RESET SLAVE;
@ -597,6 +598,8 @@ UPDATE t1 SET a = 0 WHERE a < 4;
UPDATE t1 SET a = 8 WHERE a < 5;
Comparing tables master:test.t1 and slave:test.t1
drop table t1;
SET @saved_slave_type_conversions = @@SLAVE_TYPE_CONVERSIONS;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY';
CREATE TABLE t1 (a bit) ENGINE='INNODB' ;
INSERT IGNORE INTO t1 VALUES (NULL);
INSERT INTO t1 ( a ) VALUES ( 0 );
@ -637,5 +640,6 @@ DELETE FROM t1 WHERE a < 3 LIMIT 0;
UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2;
INSERT INTO t1 ( a ) VALUES ( 1 );
UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
Comparing tables master:test.t1 and slave:test.t1
drop table t1;

View file

@ -37,8 +37,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.
Last_Errno 1642
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'decimal(20,10)' to type 'decimal(5,2)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -55,8 +55,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'decimal(20,10)' to type 'decimal(5,2)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SELECT COUNT(*) FROM t1;
@ -93,8 +93,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 12, test.t1 on slave has size 12. Master's column size should be <= the slave's column size.
Last_Errno 1642
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'decimal(27,18)' to type 'decimal(27,9)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -111,8 +111,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 12, test.t1 on slave has size 12. Master's column size should be <= the slave's column size.
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'decimal(27,18)' to type 'decimal(27,9)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SELECT COUNT(*) FROM t1;
@ -149,8 +149,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.
Last_Errno 1642
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'decimal(20,10)' to type 'decimal(5,2)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -167,8 +167,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 10, test.t1 on slave has size 3. Master's column size should be <= the slave's column size.
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'decimal(20,10)' to type 'decimal(5,2)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SELECT COUNT(*) FROM t1;
@ -206,8 +206,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 5, test.t1 has type 4
Last_Errno 1642
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'double' to type 'float'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -224,8 +224,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 5, test.t1 has type 4
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'double' to type 'float'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SELECT COUNT(*) FROM t1;
@ -263,8 +263,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 8, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
Last_Errno 1642
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(64)' to type 'bit(5)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -281,8 +281,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 8, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(64)' to type 'bit(5)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SELECT COUNT(*) FROM t1;
@ -319,8 +319,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 2. Master's column size should be <= the slave's column size.
Last_Errno 1642
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(12)' to type 'bit(11)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -337,8 +337,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 2. Master's column size should be <= the slave's column size.
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'bit(12)' to type 'bit(11)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SELECT COUNT(*) FROM t1;
@ -376,8 +376,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
Last_Errno 1642
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'set' to type 'set('4')'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -394,8 +394,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'set' to type 'set('4')'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SELECT COUNT(*) FROM t1;
@ -433,8 +433,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 20, test.t1 on slave has size 11. Master's column size should be <= the slave's column size.
Last_Errno 1642
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'char(20)' to type 'char(10)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -451,8 +451,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 20, test.t1 on slave has size 11. Master's column size should be <= the slave's column size.
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'char(20)' to type 'char(10)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SELECT COUNT(*) FROM t1;
@ -521,8 +521,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
Last_Errno 1642
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'enum' to type 'enum('44','54')'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -539,8 +539,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'enum' to type 'enum('44','54')'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SELECT COUNT(*) FROM t1;
@ -578,8 +578,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 100. Master's column size should be <= the slave's column size.
Last_Errno 1642
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'varchar(2000)' to type 'varchar(100)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -596,8 +596,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 100. Master's column size should be <= the slave's column size.
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'varchar(2000)' to type 'varchar(100)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SELECT COUNT(*) FROM t1;
@ -634,8 +634,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 200, test.t1 on slave has size 10. Master's column size should be <= the slave's column size.
Last_Errno 1642
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'varchar(200)' to type 'varchar(10)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -652,8 +652,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 200, test.t1 on slave has size 10. Master's column size should be <= the slave's column size.
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'varchar(200)' to type 'varchar(10)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SELECT COUNT(*) FROM t1;
@ -690,8 +690,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 1000. Master's column size should be <= the slave's column size.
Last_Errno 1642
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'varchar(2000)' to type 'varchar(1000)'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -708,8 +708,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 2000, test.t1 on slave has size 1000. Master's column size should be <= the slave's column size.
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'varchar(2000)' to type 'varchar(1000)'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SELECT COUNT(*) FROM t1;
@ -747,8 +747,8 @@ Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 4, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
Last_Errno 1642
Last_Error Column 0 of table 'test.t1' cannot be converted from type 'tinyblob' to type 'tinyblob'
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
@ -765,8 +765,8 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 1535
Last_SQL_Error Table definition on master and slave does not match: Column 0 size mismatch - master has size 4, test.t1 on slave has size 1. Master's column size should be <= the slave's column size.
Last_SQL_Errno 1642
Last_SQL_Error Column 0 of table 'test.t1' cannot be converted from type 'tinyblob' to type 'tinyblob'
Replicate_Ignore_Server_Ids
Master_Server_Id 1
SELECT COUNT(*) FROM t1;

View file

@ -476,4 +476,30 @@ master-bin.000001 # Table_map # # table_id: # (mysqltest1.with_select)
master-bin.000001 # Write_rows # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
DROP DATABASE mysqltest1;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TEMPORARY TABLE t7(c1 INT);
CREATE TABLE t5(c1 INT);
CREATE TABLE t4(c1 INT);
CREATE VIEW bug48506_t1 AS SELECT 1;
CREATE VIEW bug48506_t2 AS SELECT * FROM t4;
CREATE VIEW bug48506_t3 AS SELECT t5.c1 AS A, t4.c1 AS B FROM t5, t4;
CREATE TABLE bug48506_t4(c1 INT);
DROP VIEW bug48506_t1, bug48506_t2, bug48506_t3;
DROP TABLE bug48506_t4;
CREATE TABLE IF NOT EXISTS bug48506_t1 LIKE t7;
CREATE TABLE IF NOT EXISTS bug48506_t2 LIKE t7;
CREATE TABLE IF NOT EXISTS bug48506_t3 LIKE t7;
CREATE TABLE IF NOT EXISTS bug48506_t4 LIKE t7;
SHOW TABLES LIKE 'bug48506%';
Tables_in_test (bug48506%)
bug48506_t4
DROP VIEW IF EXISTS bug48506_t1, bug48506_t2, bug48506_t3;
DROP TEMPORARY TABLES t7;
DROP TABLES t4, t5;
DROP TABLES IF EXISTS bug48506_t4;
end of the tests

View file

@ -180,7 +180,7 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Errno 1642
Last_Error <Last_Error>
Skip_Counter 0
Exec_Master_Log_Pos #
@ -198,7 +198,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 1535
Last_SQL_Errno 1642
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
@ -225,7 +225,7 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Errno 1642
Last_Error <Last_Error>
Skip_Counter 0
Exec_Master_Log_Pos #
@ -243,7 +243,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 1535
Last_SQL_Errno 1642
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
@ -270,7 +270,7 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Errno 1642
Last_Error <Last_Error>
Skip_Counter 0
Exec_Master_Log_Pos #
@ -288,7 +288,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 1535
Last_SQL_Errno 1642
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1

View file

@ -180,7 +180,7 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Errno 1642
Last_Error <Last_Error>
Skip_Counter 0
Exec_Master_Log_Pos #
@ -198,7 +198,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 1535
Last_SQL_Errno 1642
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
@ -225,7 +225,7 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Errno 1642
Last_Error <Last_Error>
Skip_Counter 0
Exec_Master_Log_Pos #
@ -243,7 +243,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 1535
Last_SQL_Errno 1642
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1
@ -270,7 +270,7 @@ Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 1535
Last_Errno 1642
Last_Error <Last_Error>
Skip_Counter 0
Exec_Master_Log_Pos #
@ -288,7 +288,7 @@ Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno <Last_IO_Errno>
Last_IO_Error <Last_IO_Error>
Last_SQL_Errno 1535
Last_SQL_Errno 1642
Last_SQL_Error <Last_SQL_Error>
Replicate_Ignore_Server_Ids
Master_Server_Id 1

View file

@ -0,0 +1,29 @@
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CREATE TEMPORARY TABLE t1(c1 INTEGER);
CREATE TABLE t2(c1 INTEGER);
CREATE TABLE t1(c1 INTEGER);
INSERT INTO t1 VALUES(1), (2);
INSERT INTO t2 VALUES(1), (2);
SELECT * FROM t1;
c1
1
2
SELECT * FROM t2;
c1
1
2
TRUNCATE t1;
TRUNCATE t2;
SELECT * FROM t1;
c1
1
2
SELECT * FROM t2;
c1
DROP TABLE t1;
DROP TABLE t2;

View file

@ -14,6 +14,8 @@ include/start_slave.inc
CREATE TABLE t1 (a int, b int);
INSERT INTO t1 values(1, 1);
INSERT INTO t1 values(1, sleep(3));
Warnings:
Note 1592 Statement may not be safe to log in statement format.
TRUNCATE mysql.slow_log;
SELECT 1, sleep(3);
1 sleep(3)

View file

@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
create table t1 (word char(20) not null);
load data infile '../../std_data/words.dat' into table t1;
load data local infile 'MYSQL_TEST_DIR/std_data/words.dat' into table t1;

View file

@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;

View file

@ -0,0 +1,466 @@
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
set @saved_slave_type_conversions = @@global.slave_type_conversions;
CREATE TABLE type_conversions (
TestNo INT AUTO_INCREMENT PRIMARY KEY,
Source TEXT,
Target TEXT,
Flags TEXT,
On_Master TEXT,
On_Slave TEXT,
Expected TEXT,
Compare INT,
Error TEXT);
SELECT @@global.slave_type_conversions;
@@global.slave_type_conversions
SET GLOBAL SLAVE_TYPE_CONVERSIONS='';
SELECT @@global.slave_type_conversions;
@@global.slave_type_conversions
SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY';
SELECT @@global.slave_type_conversions;
@@global.slave_type_conversions
ALL_NON_LOSSY
SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY';
SELECT @@global.slave_type_conversions;
@@global.slave_type_conversions
ALL_LOSSY
SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY,ALL_NON_LOSSY';
SELECT @@global.slave_type_conversions;
@@global.slave_type_conversions
ALL_LOSSY,ALL_NON_LOSSY
SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY,ALL_NON_LOSSY,NONEXISTING_BIT';
ERROR 42000: Variable 'slave_type_conversions' can't be set to the value of 'NONEXISTING_BIT'
SELECT @@global.slave_type_conversions;
@@global.slave_type_conversions
ALL_LOSSY,ALL_NON_LOSSY
SET GLOBAL SLAVE_TYPE_CONVERSIONS='';
**** Running tests with @@SLAVE_TYPE_CONVERSIONS = '' ****
**** Resetting master and slave ****
include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
include/start_slave.inc
SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_NON_LOSSY';
**** Running tests with @@SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY' ****
**** Resetting master and slave ****
include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
include/start_slave.inc
SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY';
**** Running tests with @@SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY' ****
**** Resetting master and slave ****
include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
include/start_slave.inc
SET GLOBAL SLAVE_TYPE_CONVERSIONS='ALL_LOSSY,ALL_NON_LOSSY';
**** Running tests with @@SLAVE_TYPE_CONVERSIONS = 'ALL_LOSSY,ALL_NON_LOSSY' ****
**** Resetting master and slave ****
include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
include/start_slave.inc
**** Result of conversions ****
Source_Type Target_Type All_Type_Conversion_Flags Value_On_Slave
BIT(1) BIT(1) <Correct value>
DATE DATE <Correct value>
ENUM('master',' ENUM('master',' <Correct value>
CHAR(10) ENUM('master',' <Correct error>
CHAR(10) SET('master','s <Correct error>
ENUM('master',' CHAR(10) <Correct error>
SET('master','s CHAR(10) <Correct error>
SET('master','s SET('master','s <Correct value>
SET('master','s SET('master','s <Correct value>
TINYINT TINYINT <Correct value>
TINYINT SMALLINT <Correct error>
TINYINT MEDIUMINT <Correct error>
TINYINT INT <Correct error>
TINYINT BIGINT <Correct error>
SMALLINT TINYINT <Correct error>
SMALLINT TINYINT <Correct error>
SMALLINT TINYINT UNSIGNE <Correct error>
SMALLINT SMALLINT <Correct value>
SMALLINT MEDIUMINT <Correct error>
SMALLINT INT <Correct error>
SMALLINT BIGINT <Correct error>
MEDIUMINT TINYINT <Correct error>
MEDIUMINT TINYINT <Correct error>
MEDIUMINT TINYINT UNSIGNE <Correct error>
MEDIUMINT SMALLINT <Correct error>
MEDIUMINT MEDIUMINT <Correct value>
MEDIUMINT INT <Correct error>
MEDIUMINT BIGINT <Correct error>
INT TINYINT <Correct error>
INT TINYINT <Correct error>
INT TINYINT UNSIGNE <Correct error>
INT SMALLINT <Correct error>
INT MEDIUMINT <Correct error>
INT INT <Correct value>
INT BIGINT <Correct error>
BIGINT TINYINT <Correct error>
BIGINT SMALLINT <Correct error>
BIGINT MEDIUMINT <Correct error>
BIGINT INT <Correct error>
BIGINT BIGINT <Correct value>
CHAR(20) CHAR(20) <Correct value>
CHAR(20) CHAR(30) <Correct error>
CHAR(20) CHAR(10) <Correct error>
CHAR(20) VARCHAR(20) <Correct error>
CHAR(20) VARCHAR(30) <Correct error>
CHAR(20) VARCHAR(10) <Correct error>
CHAR(20) TINYTEXT <Correct error>
CHAR(20) TEXT <Correct error>
CHAR(20) MEDIUMTEXT <Correct error>
CHAR(20) LONGTEXT <Correct error>
VARCHAR(20) VARCHAR(20) <Correct value>
VARCHAR(20) VARCHAR(30) <Correct error>
VARCHAR(20) VARCHAR(10) <Correct error>
VARCHAR(20) CHAR(30) <Correct error>
VARCHAR(20) CHAR(10) <Correct error>
VARCHAR(20) TINYTEXT <Correct error>
VARCHAR(20) TEXT <Correct error>
VARCHAR(20) MEDIUMTEXT <Correct error>
VARCHAR(20) LONGTEXT <Correct error>
VARCHAR(500) VARCHAR(500) <Correct value>
VARCHAR(500) VARCHAR(510) <Correct error>
VARCHAR(500) VARCHAR(255) <Correct error>
VARCHAR(500) TINYTEXT <Correct error>
VARCHAR(500) TEXT <Correct error>
VARCHAR(500) MEDIUMTEXT <Correct error>
VARCHAR(500) LONGTEXT <Correct error>
TINYTEXT VARCHAR(500) <Correct error>
TEXT VARCHAR(500) <Correct error>
MEDIUMTEXT VARCHAR(500) <Correct error>
LONGTEXT VARCHAR(500) <Correct error>
TINYTEXT CHAR(255) <Correct error>
TINYTEXT CHAR(250) <Correct error>
TEXT CHAR(255) <Correct error>
MEDIUMTEXT CHAR(255) <Correct error>
LONGTEXT CHAR(255) <Correct error>
TINYTEXT TINYTEXT <Correct value>
TINYTEXT TEXT <Correct error>
TEXT TINYTEXT <Correct error>
DECIMAL(10,5) DECIMAL(10,5) <Correct value>
DECIMAL(10,5) DECIMAL(10,6) <Correct error>
DECIMAL(10,5) DECIMAL(11,5) <Correct error>
DECIMAL(10,5) DECIMAL(11,6) <Correct error>
DECIMAL(10,5) DECIMAL(10,4) <Correct error>
DECIMAL(10,5) DECIMAL(9,5) <Correct error>
DECIMAL(10,5) DECIMAL(9,4) <Correct error>
FLOAT DECIMAL(10,5) <Correct error>
DOUBLE DECIMAL(10,5) <Correct error>
DECIMAL(10,5) FLOAT <Correct error>
DECIMAL(10,5) DOUBLE <Correct error>
FLOAT FLOAT <Correct value>
DOUBLE DOUBLE <Correct value>
FLOAT DOUBLE <Correct error>
DOUBLE FLOAT <Correct error>
BIT(5) BIT(5) <Correct value>
BIT(5) BIT(6) <Correct error>
BIT(6) BIT(5) <Correct error>
BIT(5) BIT(12) <Correct error>
BIT(12) BIT(5) <Correct error>
BIT(1) BIT(1) ALL_NON_LOSSY <Correct value>
DATE DATE ALL_NON_LOSSY <Correct value>
ENUM('master',' ENUM('master',' ALL_NON_LOSSY <Correct value>
CHAR(10) ENUM('master',' ALL_NON_LOSSY <Correct error>
CHAR(10) SET('master','s ALL_NON_LOSSY <Correct error>
ENUM('master',' CHAR(10) ALL_NON_LOSSY <Correct error>
SET('master','s CHAR(10) ALL_NON_LOSSY <Correct error>
SET('master','s SET('master','s ALL_NON_LOSSY <Correct value>
SET('master','s SET('master','s ALL_NON_LOSSY <Correct value>
TINYINT TINYINT ALL_NON_LOSSY <Correct value>
TINYINT SMALLINT ALL_NON_LOSSY <Correct value>
TINYINT MEDIUMINT ALL_NON_LOSSY <Correct value>
TINYINT INT ALL_NON_LOSSY <Correct value>
TINYINT BIGINT ALL_NON_LOSSY <Correct value>
SMALLINT TINYINT ALL_NON_LOSSY <Correct error>
SMALLINT TINYINT ALL_NON_LOSSY <Correct error>
SMALLINT TINYINT UNSIGNE ALL_NON_LOSSY <Correct error>
SMALLINT SMALLINT ALL_NON_LOSSY <Correct value>
SMALLINT MEDIUMINT ALL_NON_LOSSY <Correct value>
SMALLINT INT ALL_NON_LOSSY <Correct value>
SMALLINT BIGINT ALL_NON_LOSSY <Correct value>
MEDIUMINT TINYINT ALL_NON_LOSSY <Correct error>
MEDIUMINT TINYINT ALL_NON_LOSSY <Correct error>
MEDIUMINT TINYINT UNSIGNE ALL_NON_LOSSY <Correct error>
MEDIUMINT SMALLINT ALL_NON_LOSSY <Correct error>
MEDIUMINT MEDIUMINT ALL_NON_LOSSY <Correct value>
MEDIUMINT INT ALL_NON_LOSSY <Correct value>
MEDIUMINT BIGINT ALL_NON_LOSSY <Correct value>
INT TINYINT ALL_NON_LOSSY <Correct error>
INT TINYINT ALL_NON_LOSSY <Correct error>
INT TINYINT UNSIGNE ALL_NON_LOSSY <Correct error>
INT SMALLINT ALL_NON_LOSSY <Correct error>
INT MEDIUMINT ALL_NON_LOSSY <Correct error>
INT INT ALL_NON_LOSSY <Correct value>
INT BIGINT ALL_NON_LOSSY <Correct value>
BIGINT TINYINT ALL_NON_LOSSY <Correct error>
BIGINT SMALLINT ALL_NON_LOSSY <Correct error>
BIGINT MEDIUMINT ALL_NON_LOSSY <Correct error>
BIGINT INT ALL_NON_LOSSY <Correct error>
BIGINT BIGINT ALL_NON_LOSSY <Correct value>
CHAR(20) CHAR(20) ALL_NON_LOSSY <Correct value>
CHAR(20) CHAR(30) ALL_NON_LOSSY <Correct value>
CHAR(20) CHAR(10) ALL_NON_LOSSY <Correct error>
CHAR(20) VARCHAR(20) ALL_NON_LOSSY <Correct value>
CHAR(20) VARCHAR(30) ALL_NON_LOSSY <Correct value>
CHAR(20) VARCHAR(10) ALL_NON_LOSSY <Correct error>
CHAR(20) TINYTEXT ALL_NON_LOSSY <Correct value>
CHAR(20) TEXT ALL_NON_LOSSY <Correct value>
CHAR(20) MEDIUMTEXT ALL_NON_LOSSY <Correct value>
CHAR(20) LONGTEXT ALL_NON_LOSSY <Correct value>
VARCHAR(20) VARCHAR(20) ALL_NON_LOSSY <Correct value>
VARCHAR(20) VARCHAR(30) ALL_NON_LOSSY <Correct value>
VARCHAR(20) VARCHAR(10) ALL_NON_LOSSY <Correct error>
VARCHAR(20) CHAR(30) ALL_NON_LOSSY <Correct value>
VARCHAR(20) CHAR(10) ALL_NON_LOSSY <Correct error>
VARCHAR(20) TINYTEXT ALL_NON_LOSSY <Correct value>
VARCHAR(20) TEXT ALL_NON_LOSSY <Correct value>
VARCHAR(20) MEDIUMTEXT ALL_NON_LOSSY <Correct value>
VARCHAR(20) LONGTEXT ALL_NON_LOSSY <Correct value>
VARCHAR(500) VARCHAR(500) ALL_NON_LOSSY <Correct value>
VARCHAR(500) VARCHAR(510) ALL_NON_LOSSY <Correct value>
VARCHAR(500) VARCHAR(255) ALL_NON_LOSSY <Correct error>
VARCHAR(500) TINYTEXT ALL_NON_LOSSY <Correct error>
VARCHAR(500) TEXT ALL_NON_LOSSY <Correct value>
VARCHAR(500) MEDIUMTEXT ALL_NON_LOSSY <Correct value>
VARCHAR(500) LONGTEXT ALL_NON_LOSSY <Correct value>
TINYTEXT VARCHAR(500) ALL_NON_LOSSY <Correct value>
TEXT VARCHAR(500) ALL_NON_LOSSY <Correct error>
MEDIUMTEXT VARCHAR(500) ALL_NON_LOSSY <Correct error>
LONGTEXT VARCHAR(500) ALL_NON_LOSSY <Correct error>
TINYTEXT CHAR(255) ALL_NON_LOSSY <Correct value>
TINYTEXT CHAR(250) ALL_NON_LOSSY <Correct error>
TEXT CHAR(255) ALL_NON_LOSSY <Correct error>
MEDIUMTEXT CHAR(255) ALL_NON_LOSSY <Correct error>
LONGTEXT CHAR(255) ALL_NON_LOSSY <Correct error>
TINYTEXT TINYTEXT ALL_NON_LOSSY <Correct value>
TINYTEXT TEXT ALL_NON_LOSSY <Correct value>
TEXT TINYTEXT ALL_NON_LOSSY <Correct error>
DECIMAL(10,5) DECIMAL(10,5) ALL_NON_LOSSY <Correct value>
DECIMAL(10,5) DECIMAL(10,6) ALL_NON_LOSSY <Correct value>
DECIMAL(10,5) DECIMAL(11,5) ALL_NON_LOSSY <Correct value>
DECIMAL(10,5) DECIMAL(11,6) ALL_NON_LOSSY <Correct value>
DECIMAL(10,5) DECIMAL(10,4) ALL_NON_LOSSY <Correct error>
DECIMAL(10,5) DECIMAL(9,5) ALL_NON_LOSSY <Correct error>
DECIMAL(10,5) DECIMAL(9,4) ALL_NON_LOSSY <Correct error>
FLOAT DECIMAL(10,5) ALL_NON_LOSSY <Correct error>
DOUBLE DECIMAL(10,5) ALL_NON_LOSSY <Correct error>
DECIMAL(10,5) FLOAT ALL_NON_LOSSY <Correct error>
DECIMAL(10,5) DOUBLE ALL_NON_LOSSY <Correct error>
FLOAT FLOAT ALL_NON_LOSSY <Correct value>
DOUBLE DOUBLE ALL_NON_LOSSY <Correct value>
FLOAT DOUBLE ALL_NON_LOSSY <Correct value>
DOUBLE FLOAT ALL_NON_LOSSY <Correct error>
BIT(5) BIT(5) ALL_NON_LOSSY <Correct value>
BIT(5) BIT(6) ALL_NON_LOSSY <Correct value>
BIT(6) BIT(5) ALL_NON_LOSSY <Correct error>
BIT(5) BIT(12) ALL_NON_LOSSY <Correct value>
BIT(12) BIT(5) ALL_NON_LOSSY <Correct error>
BIT(1) BIT(1) ALL_LOSSY <Correct value>
DATE DATE ALL_LOSSY <Correct value>
ENUM('master',' ENUM('master',' ALL_LOSSY <Correct value>
CHAR(10) ENUM('master',' ALL_LOSSY <Correct error>
CHAR(10) SET('master','s ALL_LOSSY <Correct error>
ENUM('master',' CHAR(10) ALL_LOSSY <Correct error>
SET('master','s CHAR(10) ALL_LOSSY <Correct error>
SET('master','s SET('master','s ALL_LOSSY <Correct value>
SET('master','s SET('master','s ALL_LOSSY <Correct value>
TINYINT TINYINT ALL_LOSSY <Correct value>
TINYINT SMALLINT ALL_LOSSY <Correct error>
TINYINT MEDIUMINT ALL_LOSSY <Correct error>
TINYINT INT ALL_LOSSY <Correct error>
TINYINT BIGINT ALL_LOSSY <Correct error>
SMALLINT TINYINT ALL_LOSSY <Correct value>
SMALLINT TINYINT ALL_LOSSY <Correct value>
SMALLINT TINYINT UNSIGNE ALL_LOSSY <Correct value>
SMALLINT SMALLINT ALL_LOSSY <Correct value>
SMALLINT MEDIUMINT ALL_LOSSY <Correct error>
SMALLINT INT ALL_LOSSY <Correct error>
SMALLINT BIGINT ALL_LOSSY <Correct error>
MEDIUMINT TINYINT ALL_LOSSY <Correct value>
MEDIUMINT TINYINT ALL_LOSSY <Correct value>
MEDIUMINT TINYINT UNSIGNE ALL_LOSSY <Correct value>
MEDIUMINT SMALLINT ALL_LOSSY <Correct value>
MEDIUMINT MEDIUMINT ALL_LOSSY <Correct value>
MEDIUMINT INT ALL_LOSSY <Correct error>
MEDIUMINT BIGINT ALL_LOSSY <Correct error>
INT TINYINT ALL_LOSSY <Correct value>
INT TINYINT ALL_LOSSY <Correct value>
INT TINYINT UNSIGNE ALL_LOSSY <Correct value>
INT SMALLINT ALL_LOSSY <Correct value>
INT MEDIUMINT ALL_LOSSY <Correct value>
INT INT ALL_LOSSY <Correct value>
INT BIGINT ALL_LOSSY <Correct error>
BIGINT TINYINT ALL_LOSSY <Correct value>
BIGINT SMALLINT ALL_LOSSY <Correct value>
BIGINT MEDIUMINT ALL_LOSSY <Correct value>
BIGINT INT ALL_LOSSY <Correct value>
BIGINT BIGINT ALL_LOSSY <Correct value>
CHAR(20) CHAR(20) ALL_LOSSY <Correct value>
CHAR(20) CHAR(30) ALL_LOSSY <Correct error>
CHAR(20) CHAR(10) ALL_LOSSY <Correct value>
CHAR(20) VARCHAR(20) ALL_LOSSY <Correct error>
CHAR(20) VARCHAR(30) ALL_LOSSY <Correct error>
CHAR(20) VARCHAR(10) ALL_LOSSY <Correct value>
CHAR(20) TINYTEXT ALL_LOSSY <Correct error>
CHAR(20) TEXT ALL_LOSSY <Correct error>
CHAR(20) MEDIUMTEXT ALL_LOSSY <Correct error>
CHAR(20) LONGTEXT ALL_LOSSY <Correct error>
VARCHAR(20) VARCHAR(20) ALL_LOSSY <Correct value>
VARCHAR(20) VARCHAR(30) ALL_LOSSY <Correct error>
VARCHAR(20) VARCHAR(10) ALL_LOSSY <Correct value>
VARCHAR(20) CHAR(30) ALL_LOSSY <Correct error>
VARCHAR(20) CHAR(10) ALL_LOSSY <Correct value>
VARCHAR(20) TINYTEXT ALL_LOSSY <Correct error>
VARCHAR(20) TEXT ALL_LOSSY <Correct error>
VARCHAR(20) MEDIUMTEXT ALL_LOSSY <Correct error>
VARCHAR(20) LONGTEXT ALL_LOSSY <Correct error>
VARCHAR(500) VARCHAR(500) ALL_LOSSY <Correct value>
VARCHAR(500) VARCHAR(510) ALL_LOSSY <Correct error>
VARCHAR(500) VARCHAR(255) ALL_LOSSY <Correct value>
VARCHAR(500) TINYTEXT ALL_LOSSY <Correct value>
VARCHAR(500) TEXT ALL_LOSSY <Correct error>
VARCHAR(500) MEDIUMTEXT ALL_LOSSY <Correct error>
VARCHAR(500) LONGTEXT ALL_LOSSY <Correct error>
TINYTEXT VARCHAR(500) ALL_LOSSY <Correct error>
TEXT VARCHAR(500) ALL_LOSSY <Correct value>
MEDIUMTEXT VARCHAR(500) ALL_LOSSY <Correct value>
LONGTEXT VARCHAR(500) ALL_LOSSY <Correct value>
TINYTEXT CHAR(255) ALL_LOSSY <Correct error>
TINYTEXT CHAR(250) ALL_LOSSY <Correct value>
TEXT CHAR(255) ALL_LOSSY <Correct value>
MEDIUMTEXT CHAR(255) ALL_LOSSY <Correct value>
LONGTEXT CHAR(255) ALL_LOSSY <Correct value>
TINYTEXT TINYTEXT ALL_LOSSY <Correct value>
TINYTEXT TEXT ALL_LOSSY <Correct error>
TEXT TINYTEXT ALL_LOSSY <Correct value>
DECIMAL(10,5) DECIMAL(10,5) ALL_LOSSY <Correct value>
DECIMAL(10,5) DECIMAL(10,6) ALL_LOSSY <Correct error>
DECIMAL(10,5) DECIMAL(11,5) ALL_LOSSY <Correct error>
DECIMAL(10,5) DECIMAL(11,6) ALL_LOSSY <Correct error>
DECIMAL(10,5) DECIMAL(10,4) ALL_LOSSY <Correct value>
DECIMAL(10,5) DECIMAL(9,5) ALL_LOSSY <Correct value>
DECIMAL(10,5) DECIMAL(9,4) ALL_LOSSY <Correct value>
FLOAT DECIMAL(10,5) ALL_LOSSY <Correct value>
DOUBLE DECIMAL(10,5) ALL_LOSSY <Correct value>
DECIMAL(10,5) FLOAT ALL_LOSSY <Correct value>
DECIMAL(10,5) DOUBLE ALL_LOSSY <Correct value>
FLOAT FLOAT ALL_LOSSY <Correct value>
DOUBLE DOUBLE ALL_LOSSY <Correct value>
FLOAT DOUBLE ALL_LOSSY <Correct error>
DOUBLE FLOAT ALL_LOSSY <Correct value>
BIT(5) BIT(5) ALL_LOSSY <Correct value>
BIT(5) BIT(6) ALL_LOSSY <Correct error>
BIT(6) BIT(5) ALL_LOSSY <Correct value>
BIT(5) BIT(12) ALL_LOSSY <Correct error>
BIT(12) BIT(5) ALL_LOSSY <Correct value>
BIT(1) BIT(1) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DATE DATE ALL_LOSSY,ALL_NON_LOSSY <Correct value>
ENUM('master',' ENUM('master',' ALL_LOSSY,ALL_NON_LOSSY <Correct value>
CHAR(10) ENUM('master',' ALL_LOSSY,ALL_NON_LOSSY <Correct error>
CHAR(10) SET('master','s ALL_LOSSY,ALL_NON_LOSSY <Correct error>
ENUM('master',' CHAR(10) ALL_LOSSY,ALL_NON_LOSSY <Correct error>
SET('master','s CHAR(10) ALL_LOSSY,ALL_NON_LOSSY <Correct error>
SET('master','s SET('master','s ALL_LOSSY,ALL_NON_LOSSY <Correct value>
SET('master','s SET('master','s ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYINT TINYINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYINT SMALLINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYINT MEDIUMINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYINT INT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYINT BIGINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
SMALLINT TINYINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
SMALLINT TINYINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
SMALLINT TINYINT UNSIGNE ALL_LOSSY,ALL_NON_LOSSY <Correct value>
SMALLINT SMALLINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
SMALLINT MEDIUMINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
SMALLINT INT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
SMALLINT BIGINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMINT TINYINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMINT TINYINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMINT TINYINT UNSIGNE ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMINT SMALLINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMINT MEDIUMINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMINT INT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMINT BIGINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
INT TINYINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
INT TINYINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
INT TINYINT UNSIGNE ALL_LOSSY,ALL_NON_LOSSY <Correct value>
INT SMALLINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
INT MEDIUMINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
INT INT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
INT BIGINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIGINT TINYINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIGINT SMALLINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIGINT MEDIUMINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIGINT INT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIGINT BIGINT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
CHAR(20) CHAR(20) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
CHAR(20) CHAR(30) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
CHAR(20) CHAR(10) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
CHAR(20) VARCHAR(20) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
CHAR(20) VARCHAR(30) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
CHAR(20) VARCHAR(10) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
CHAR(20) TINYTEXT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
CHAR(20) TEXT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
CHAR(20) MEDIUMTEXT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
CHAR(20) LONGTEXT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(20) VARCHAR(20) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(20) VARCHAR(30) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(20) VARCHAR(10) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(20) CHAR(30) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(20) CHAR(10) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(20) TINYTEXT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(20) TEXT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(20) MEDIUMTEXT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(20) LONGTEXT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(500) VARCHAR(500) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(500) VARCHAR(510) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(500) VARCHAR(255) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(500) TINYTEXT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(500) TEXT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(500) MEDIUMTEXT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
VARCHAR(500) LONGTEXT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYTEXT VARCHAR(500) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TEXT VARCHAR(500) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMTEXT VARCHAR(500) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
LONGTEXT VARCHAR(500) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYTEXT CHAR(255) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYTEXT CHAR(250) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TEXT CHAR(255) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
MEDIUMTEXT CHAR(255) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
LONGTEXT CHAR(255) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYTEXT TINYTEXT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TINYTEXT TEXT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
TEXT TINYTEXT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DECIMAL(10,5) DECIMAL(10,5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DECIMAL(10,5) DECIMAL(10,6) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DECIMAL(10,5) DECIMAL(11,5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DECIMAL(10,5) DECIMAL(11,6) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DECIMAL(10,5) DECIMAL(10,4) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DECIMAL(10,5) DECIMAL(9,5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DECIMAL(10,5) DECIMAL(9,4) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
FLOAT DECIMAL(10,5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DOUBLE DECIMAL(10,5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DECIMAL(10,5) FLOAT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DECIMAL(10,5) DOUBLE ALL_LOSSY,ALL_NON_LOSSY <Correct value>
FLOAT FLOAT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DOUBLE DOUBLE ALL_LOSSY,ALL_NON_LOSSY <Correct value>
FLOAT DOUBLE ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DOUBLE FLOAT ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIT(5) BIT(5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIT(5) BIT(6) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIT(6) BIT(5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIT(5) BIT(12) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
BIT(12) BIT(5) ALL_LOSSY,ALL_NON_LOSSY <Correct value>
DROP TABLE type_conversions;
DROP TABLE t1;
set global slave_type_conversions = @saved_slave_type_conversions;

View file

@ -0,0 +1,18 @@
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
**** Resetting master and slave ****
include/stop_slave.inc
RESET SLAVE;
RESET MASTER;
include/start_slave.inc
SET @saved_slave_type_conversions = @@GLOBAL.SLAVE_TYPE_CONVERSIONS;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = '';
CREATE TABLE t1(b1 BIT(1), b2 BIT(2), b3 BIT(3)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (b'0', b'01', b'101');
Comparing tables master:test.t1 and slave:test.t1
DROP TABLE t1;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;

View file

@ -11,3 +11,4 @@
##############################################################################
rpl_cross_version : Bug#42311 2009-03-27 joro rpl_cross_version fails on macosx
rpl_row_create_table : Bug#45576 2009-12-01 joro rpl_row_create_table fails on PB2

View file

@ -1,5 +1,8 @@
source include/master-slave.inc;
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
CREATE DATABASE track;
USE track;
@ -130,7 +133,10 @@ VALUES ('3m3l4rhs6do0sf5p1i9lr94g928a272v', '', '', INET_ATON('71.118.124.98'),
SELECT * FROM visits;
SELECT * FROM visits_events;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
# Cleanup
DROP DATABASE track;
sync_slave_with_master;
--echo End of 5.1 tests

View file

@ -19,6 +19,9 @@ STOP SLAVE;
--source include/wait_for_slave_to_stop.inc
RESET SLAVE;
SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
eval CREATE TABLE t1 (
a float (47),
b double (143,9),
@ -219,4 +222,6 @@ connection master;
DROP TABLE t1;
sync_slave_with_master;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
# END 5.1 Test Case

View file

@ -7,6 +7,8 @@
-- source include/master-slave.inc
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
connection master;
create table t1 (a int primary key);
create table t4 (a int primary key);
@ -46,8 +48,11 @@ kill @id;
drop table t2,t3;
insert into t4 values (3),(4);
connection master;
# The get_lock function causes warning for unsafe statement.
--disable_warnings
--error 0,1317,2013
reap;
--enable_warnings
connection master1;
sync_slave_with_master;
SELECT * FROM test.t4 ORDER BY a;

View file

@ -1,7 +1,12 @@
source include/master-slave.inc;
CALL mtr.add_suppression("Statement may not be safe to log in statement format.");
create table t1(n int);
# Use of get_lock gives a warning for unsafeness if binlog_format=statement
--disable_warnings
insert into t1 values(get_lock("lock",2));
--enable_warnings
dirty_close master;
connection master1;
select get_lock("lock",2);

View file

@ -0,0 +1 @@
--secure-file-priv=$MYSQLTEST_VARDIR/std_data_master_link

View file

@ -0,0 +1 @@
ln -s $MYSQLTEST_VARDIR/std_data $MYSQLTEST_VARDIR/std_data_master_link

View file

@ -0,0 +1 @@
--slave-load-tmpdir=$MYSQLTEST_VARDIR/std_data_slave_link

View file

@ -0,0 +1 @@
ln -s $MYSQLTEST_VARDIR/std_data $MYSQLTEST_VARDIR/std_data_slave_link

View file

@ -0,0 +1,20 @@
#
# BUG#43913
# This test verifies if loading data infile will work fine
# if the path of the load data file is a symbolic link.
#
--source include/master-slave.inc
--source include/have_binlog_format_statement.inc
create table t1(a int not null auto_increment, b int, primary key(a) );
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
select * from t1;
sync_slave_with_master;
connection slave;
select * from t1;
connection master;
drop table t1;
sync_slave_with_master;

View file

@ -0,0 +1,53 @@
# ==== Purpose ====
#
# Test that nondeterministic system functions are correctly replicated.
#
# (Some functions are only correctly replicated if binlog_format=MIXED
# or ROW. See binlog_unsafe.test for a test that those variables are
# indeed unsafe.)
#
# ==== Implementation ====
#
# We insert the values of each unsafe function into a table. Then we
# replicate and check that the table is identical on slave.
#
# ==== Related bugs ====
#
# BUG#47995
--source include/master-slave.inc
CREATE TABLE t1 (a VARCHAR(1000));
# We replicate the connection_id in the query_log_event
INSERT INTO t1 VALUES (CONNECTION_ID());
--connection master1
INSERT INTO t1 VALUES (CONNECTION_ID());
# We replicate the TIMESTAMP variable, so the following functions that
# are affected by the TIMESTAMP variable should be safe to replicate.
INSERT INTO t1 VALUES
(CURDATE()),
(CURRENT_DATE()),
(CURRENT_TIME()),
(CURRENT_TIMESTAMP()),
(CURTIME()),
(LOCALTIME()),
(LOCALTIMESTAMP()),
(NOW()),
(UNIX_TIMESTAMP()),
(UTC_DATE()),
(UTC_TIME()),
(UTC_TIMESTAMP());
# We replicate the random seed in a rand_log_event
INSERT INTO t1 VALUES (RAND());
# We replicate the last_insert_id in an intvar_log_event
INSERT INTO t1 VALUES (LAST_INSERT_ID());
--sync_slave_with_master
--let $diff_table_1= master:test.t1
--let $diff_table_2= slave:test.t1
--source include/diff_tables.inc
DROP TABLE t1;

View file

@ -2,6 +2,8 @@
-- source include/have_binlog_format_row.inc
-- source include/master-slave.inc
connection slave;
let $bit_field_special = ALL_LOSSY;
let $type= 'INNODB' ;
let $extra_index= ;
-- source extra/rpl_tests/rpl_row_basic.test

View file

@ -300,4 +300,40 @@ connection master;
DROP DATABASE mysqltest1;
sync_slave_with_master;
#
# BUG#48506: crash in CREATE TABLE <existing_view> IF NOT EXISTS LIKE
# <tmp_tbl> with RBL
#
source include/master-slave-reset.inc;
connection master;
CREATE TEMPORARY TABLE t7(c1 INT);
CREATE TABLE t5(c1 INT);
CREATE TABLE t4(c1 INT);
CREATE VIEW bug48506_t1 AS SELECT 1;
CREATE VIEW bug48506_t2 AS SELECT * FROM t4;
CREATE VIEW bug48506_t3 AS SELECT t5.c1 AS A, t4.c1 AS B FROM t5, t4;
CREATE TABLE bug48506_t4(c1 INT);
--disable_warnings
sync_slave_with_master;
DROP VIEW bug48506_t1, bug48506_t2, bug48506_t3;
DROP TABLE bug48506_t4;
connection master;
CREATE TABLE IF NOT EXISTS bug48506_t1 LIKE t7;
CREATE TABLE IF NOT EXISTS bug48506_t2 LIKE t7;
CREATE TABLE IF NOT EXISTS bug48506_t3 LIKE t7;
CREATE TABLE IF NOT EXISTS bug48506_t4 LIKE t7;
--enable_warnings
sync_slave_with_master;
SHOW TABLES LIKE 'bug48506%';
connection master;
DROP VIEW IF EXISTS bug48506_t1, bug48506_t2, bug48506_t3;
DROP TEMPORARY TABLES t7;
DROP TABLES t4, t5;
DROP TABLES IF EXISTS bug48506_t4;
source include/master-slave-end.inc;
--echo end of the tests

Some files were not shown because too many files have changed in this diff Show more