Merge branch '10.2' into 10.2-mdev9864

This commit is contained in:
Galina Shalygina 2016-05-25 00:34:13 +03:00
commit 6c6c3af6aa
112 changed files with 2344 additions and 2193 deletions

View file

@ -5112,17 +5112,31 @@ static const char *construct_prompt()
processed_prompt.append("unknown");
break;
case 'h':
case 'H':
{
const char *prompt;
prompt= connected ? mysql_get_host_info(&mysql) : "not_connected";
if (strstr(prompt, "Localhost"))
processed_prompt.append("localhost");
else
{
const char *end=strcend(prompt,' ');
processed_prompt.append(prompt, (uint) (end-prompt));
}
break;
const char *prompt;
prompt= connected ? mysql_get_host_info(&mysql) : "not_connected";
if (strstr(prompt, "Localhost"))
{
if (*c == 'h')
processed_prompt.append("localhost");
else
{
static char hostname[FN_REFLEN];
if (hostname[0])
processed_prompt.append(hostname);
else if (gethostname(hostname, sizeof(hostname)) == 0)
processed_prompt.append(hostname);
else
processed_prompt.append("gethostname(2) failed");
}
}
else
{
const char *end=strcend(prompt,' ');
processed_prompt.append(prompt, (uint) (end-prompt));
}
break;
}
case 'p':
{

View file

@ -6571,37 +6571,35 @@ int read_line(char *buf, int size)
if (!skip_char)
{
/* Could be a multibyte character */
/* This code is based on the code in "sql_load.cc" */
#ifdef USE_MB
int charlen = my_mbcharlen(charset_info, (unsigned char) c);
/* We give up if multibyte character is started but not */
/* completed before we pass buf_end */
if ((charlen > 1) && (p + charlen) <= buf_end)
*p++= c;
if (use_mb(charset_info))
{
int i;
char* mb_start = p;
*p++ = c;
for (i= 1; i < charlen; i++)
{
c= my_getc(cur_file->file);
if (feof(cur_file->file))
goto found_eof;
*p++ = c;
}
if (! my_ismbchar(charset_info, mb_start, p))
{
/* It was not a multiline char, push back the characters */
/* We leave first 'c', i.e. pretend it was a normal char */
while (p-1 > mb_start)
my_ungetc(*--p);
}
const char *mb_start= p - 1;
/* Could be a multibyte character */
/* See a similar code in "sql_load.cc" */
for ( ; p < buf_end; )
{
int charlen= my_charlen(charset_info, mb_start, p);
if (charlen > 0)
break; /* Full character */
if (MY_CS_IS_TOOSMALL(charlen))
{
/* We give up if multibyte character is started but not */
/* completed before we pass buf_end */
c= my_getc(cur_file->file);
if (feof(cur_file->file))
goto found_eof;
*p++ = c;
continue;
}
DBUG_ASSERT(charlen == MY_CS_ILSEQ);
/* It was not a multiline char, push back the characters */
/* We leave first 'c', i.e. pretend it was a normal char */
while (p - 1 > mb_start)
my_ungetc(*--p);
break;
}
}
else
#endif
*p++= c;
}
}
die("The input buffer is too small for this query.x\n" \

12
debian/control vendored
View file

@ -443,14 +443,18 @@ Description: CrackLib Password Validation Plugin for MariaDB
This password validation plugin uses cracklib to allow only
sufficiently secure (as defined by cracklib) user passwords in MariaDB.
Package: mariadb-gssapi-server-10.1
Package: mariadb-gssapi-server-10.2
Section: database
Architecture: any
Depends: libgssapi-krb5-2, mariadb-server-10.1
Depends: libgssapi-krb5-2, mariadb-server-10.2
Conflicts: mariadb-gssapi-server-10.1
Replaces: mariadb-gssapi-server-10.1
Description: GSSAPI authentication plugin for MariaDB server
Package: mariadb-gssapi-client-10.1
Package: mariadb-gssapi-client-10.2
Section: database
Architecture: any
Depends: libgssapi-krb5-2, mariadb-client-10.1
Depends: libgssapi-krb5-2, mariadb-client-10.2
Conflicts: mariadb-gssapi-client-10.1
Replaces: mariadb-gssapi-client-10.1
Description: GSSAPI authentication plugin for MariaDB client

View file

@ -186,6 +186,7 @@ extern MY_UNI_CTYPE my_uni_ctype[256];
#define MY_SEQ_INTTAIL 1
#define MY_SEQ_SPACES 2
#define MY_SEQ_NONSPACES 3 /* Skip non-space characters, including bad bytes */
/* My charsets_list flags */
#define MY_CS_COMPILED 1 /* compiled-in sets */
@ -403,7 +404,6 @@ struct my_charset_handler_st
{
my_bool (*init)(struct charset_info_st *, MY_CHARSET_LOADER *loader);
/* Multibyte routines */
uint (*mbcharlen)(CHARSET_INFO *, uint c);
size_t (*numchars)(CHARSET_INFO *, const char *b, const char *e);
size_t (*charpos)(CHARSET_INFO *, const char *b, const char *e,
size_t pos);
@ -779,7 +779,6 @@ size_t my_well_formed_char_length_8bit(CHARSET_INFO *cs,
size_t nchars,
MY_STRCOPY_STATUS *status);
int my_charlen_8bit(CHARSET_INFO *, const uchar *str, const uchar *end);
uint my_mbcharlen_8bit(CHARSET_INFO *, uint c);
/* Functions for multibyte charsets */
@ -1010,11 +1009,19 @@ int my_charlen(CHARSET_INFO *cs, const char *str, const char *end)
return (cs->cset->charlen)(cs, (const uchar *) str,
(const uchar *) end);
}
#ifdef USE_MB
#define my_mbcharlen(s, a) ((s)->cset->mbcharlen((s),(a)))
#else
#define my_mbcharlen(s, a) 1
#endif
/**
Convert broken and incomplete byte sequences to 1 byte.
*/
static inline
uint my_charlen_fix(CHARSET_INFO *cs, const char *str, const char *end)
{
int char_length= my_charlen(cs, str, end);
DBUG_ASSERT(str < end);
return char_length > 0 ? (uint) char_length : (uint) 1U;
}
#define my_caseup_str(s, a) ((s)->cset->caseup_str((s), (a)))
#define my_casedn_str(s, a) ((s)->cset->casedn_str((s), (a)))

View file

@ -1170,7 +1170,8 @@ bool Protocol_binary::write()
bool
net_send_ok(THD *thd,
uint server_status, uint statement_warn_count,
ulonglong affected_rows, ulonglong id, const char *message)
ulonglong affected_rows, ulonglong id, const char *message,
bool unused __attribute__((unused)))
{
DBUG_ENTER("emb_net_send_ok");
MYSQL_DATA *data;

View file

@ -1651,7 +1651,7 @@ FLUSH LOGS;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
@ -1731,7 +1731,7 @@ FLUSH LOGS;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
@ -1854,7 +1854,7 @@ FLUSH LOGS;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
@ -1912,7 +1912,7 @@ FLUSH LOGS;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9-]*[.][0-9]{1,3})[0-9e+-]*[^ ]*[ ]*(.*(FLOAT|DOUBLE).*[*].)/\1... \2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #

View file

@ -763,3 +763,20 @@ a
30
drop view v1;
drop table t1;
#
# Bug mdev-10058: Invalid derived table with WITH clause
#
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (a INT);
CREATE TABLE t3 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
INSERT INTO t2 VALUES (1),(2),(3);
INSERT INTO t3 VALUES (1),(2),(3);
SELECT * FROM (WITH a AS (SELECT * FROM t1) (t2 NATURAL JOIN t3));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't2 NATURAL JOIN t3))' at line 1
SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT * FROM t2 NATURAL JOIN t3) AS d1;
a
1
2
3
DROP TABLE t1,t2,t3;

View file

@ -159,7 +159,7 @@ Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_
Field_name Min_value Max_value Min_length Max_length Empties_or_zeros Nulls Avg_value_or_avg_length Std Optimal_fieldtype
1 1 1 1 1 0 0 1.0000 0.0000 ENUM('1') NOT NULL
SELECT * FROM t1 UNION SELECT * FROM t1 PROCEDURE analyse();
ERROR HY000: Incorrect usage of PROCEDURE and subquery
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PROCEDURE analyse()' at line 1
#
# MDEV-10030 sql_yacc.yy: Split table_expression and remove PROCEDURE from create_select, select_paren_derived, select_derived2, query_specification
#

View file

@ -1476,7 +1476,7 @@ DROP TABLE t1,t2,t3,t4,t5;
# MDEV-4752: Segfault during parsing of illegal query
#
SELECT * FROM t5 JOIN (t1 JOIN t2 UNION SELECT * FROM t3 JOIN t4);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT * FROM t3 JOIN t4)' at line 1
#
# MDEV-4959: join of const table with NULL fields
#

View file

@ -173,10 +173,8 @@ Warning 1931 Query execution was interrupted. The query examined at least 8 rows
select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 0
UNION
select * from t1, t2 where c1 < c2 LIMIT ROWS EXAMINED 6;
c1 c2
bb bb
Warnings:
Warning 1931 Query execution was interrupted. The query examined at least 8 rows, which exceeds LIMIT ROWS EXAMINED (6). The query result may be incomplete.
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION
select * from t1, t2 where c1 < c2 LIMIT ROWS EXAMINED 6' at line 2
(select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 0)
UNION
(select * from t1, t2 where c1 < c2 LIMIT ROWS EXAMINED 0)

View file

@ -14,20 +14,20 @@ FLUSH BINARY LOGS;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#<date> server id 1 end_log_pos 249 Start: xxx
#<date> server id 1 end_log_pos 249 CRC32 XXX Start: xxx
ROLLBACK/*!*/;
# at 249
#<date> server id 1 end_log_pos 274 Gtid list []
# at 274
#<date> server id 1 end_log_pos 314 Binlog checkpoint master-bin.000001
# at 314
#<date> server id 1 end_log_pos 352 GTID 0-1-1 ddl
#<date> server id 1 end_log_pos 278 CRC32 XXX Gtid list []
# at 278
#<date> server id 1 end_log_pos 322 CRC32 XXX Binlog checkpoint master-bin.000001
# at 322
#<date> server id 1 end_log_pos 364 CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
# at 352
#<date> server id 1 end_log_pos 532 Query thread_id=4 exec_time=x error_code=0
# at 364
#<date> server id 1 end_log_pos 548 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=4/*!*/;
@ -40,23 +40,23 @@ SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 TINYINT, f4 MEDIUMINT, f5 BIGINT, f6 INT, f7 INT, f8 char(1))
/*!*/;
# at 532
#<date> server id 1 end_log_pos 570 GTID 0-1-2 ddl
# at 548
#<date> server id 1 end_log_pos 590 CRC32 XXX GTID 0-1-2 ddl
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
# at 570
#<date> server id 1 end_log_pos 743 Query thread_id=4 exec_time=x error_code=0
# at 590
#<date> server id 1 end_log_pos 767 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
CREATE TABLE t2 (pk INT PRIMARY KEY, f1 INT, f2 INT, f3 INT, f4 INT, f5 MEDIUMINT, f6 INT, f7 INT, f8 char(1))
/*!*/;
# at 743
#<date> server id 1 end_log_pos 781 GTID 0-1-3
# at 767
#<date> server id 1 end_log_pos 809 CRC32 XXX GTID 0-1-3
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
BEGIN
/*!*/;
# at 781
#<date> server id 1 end_log_pos 833 Table_map: `test`.`t1` mapped to number 30
# at 833
#<date> server id 1 end_log_pos 898 Write_rows: table id 30 flags: STMT_END_F
# at 809
#<date> server id 1 end_log_pos 865 CRC32 XXX Table_map: `test`.`t1` mapped to number 30
# at 865
#<date> server id 1 end_log_pos 934 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -68,20 +68,20 @@ BEGIN
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# at 898
#<date> server id 1 end_log_pos 967 Query thread_id=4 exec_time=x error_code=0
# at 934
#<date> server id 1 end_log_pos 1007 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 967
#<date> server id 1 end_log_pos 1005 GTID 0-1-4
# at 1007
#<date> server id 1 end_log_pos 1049 CRC32 XXX GTID 0-1-4
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
BEGIN
/*!*/;
# at 1005
#<date> server id 1 end_log_pos 1057 Table_map: `test`.`t1` mapped to number 30
# at 1057
#<date> server id 1 end_log_pos 1121 Write_rows: table id 30 flags: STMT_END_F
# at 1049
#<date> server id 1 end_log_pos 1105 CRC32 XXX Table_map: `test`.`t1` mapped to number 30
# at 1105
#<date> server id 1 end_log_pos 1173 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=11 /* INT meta=0 nullable=0 is_null=0 */
@ -93,20 +93,20 @@ BEGIN
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9=NULL /* STRING(1) meta=65025 nullable=1 is_null=1 */
# at 1121
#<date> server id 1 end_log_pos 1190 Query thread_id=4 exec_time=x error_code=0
# at 1173
#<date> server id 1 end_log_pos 1246 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 1190
#<date> server id 1 end_log_pos 1228 GTID 0-1-5
# at 1246
#<date> server id 1 end_log_pos 1288 CRC32 XXX GTID 0-1-5
/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
BEGIN
/*!*/;
# at 1228
#<date> server id 1 end_log_pos 1280 Table_map: `test`.`t1` mapped to number 30
# at 1280
#<date> server id 1 end_log_pos 1343 Write_rows: table id 30 flags: STMT_END_F
# at 1288
#<date> server id 1 end_log_pos 1344 CRC32 XXX Table_map: `test`.`t1` mapped to number 30
# at 1344
#<date> server id 1 end_log_pos 1411 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=12 /* INT meta=0 nullable=0 is_null=0 */
@ -118,20 +118,20 @@ BEGIN
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# at 1343
#<date> server id 1 end_log_pos 1412 Query thread_id=4 exec_time=x error_code=0
# at 1411
#<date> server id 1 end_log_pos 1484 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 1412
#<date> server id 1 end_log_pos 1450 GTID 0-1-6
# at 1484
#<date> server id 1 end_log_pos 1526 CRC32 XXX GTID 0-1-6
/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
BEGIN
/*!*/;
# at 1450
#<date> server id 1 end_log_pos 1502 Table_map: `test`.`t1` mapped to number 30
# at 1502
#<date> server id 1 end_log_pos 1568 Write_rows: table id 30 flags: STMT_END_F
# at 1526
#<date> server id 1 end_log_pos 1582 CRC32 XXX Table_map: `test`.`t1` mapped to number 30
# at 1582
#<date> server id 1 end_log_pos 1652 CRC32 XXX Write_rows: table id 30 flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
@ -143,20 +143,20 @@ BEGIN
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# at 1568
#<date> server id 1 end_log_pos 1637 Query thread_id=4 exec_time=x error_code=0
# at 1652
#<date> server id 1 end_log_pos 1725 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 1637
#<date> server id 1 end_log_pos 1675 GTID 0-1-7
# at 1725
#<date> server id 1 end_log_pos 1767 CRC32 XXX GTID 0-1-7
/*!100001 SET @@session.gtid_seq_no=7*//*!*/;
BEGIN
/*!*/;
# at 1675
#<date> server id 1 end_log_pos 1727 Table_map: `test`.`t2` mapped to number 31
# at 1727
#<date> server id 1 end_log_pos 1890 Write_rows: table id 31 flags: STMT_END_F
# at 1767
#<date> server id 1 end_log_pos 1823 CRC32 XXX Table_map: `test`.`t2` mapped to number 31
# at 1823
#<date> server id 1 end_log_pos 1990 CRC32 XXX Write_rows: table id 31 flags: STMT_END_F
### INSERT INTO `test`.`t2`
### SET
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -201,20 +201,20 @@ BEGIN
### @7=6 /* INT meta=0 nullable=1 is_null=0 */
### @8=7 /* INT meta=0 nullable=1 is_null=0 */
### @9='A' /* STRING(1) meta=65025 nullable=1 is_null=0 */
# at 1890
#<date> server id 1 end_log_pos 1959 Query thread_id=4 exec_time=x error_code=0
# at 1990
#<date> server id 1 end_log_pos 2063 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 1959
#<date> server id 1 end_log_pos 1997 GTID 0-1-8
# at 2063
#<date> server id 1 end_log_pos 2105 CRC32 XXX GTID 0-1-8
/*!100001 SET @@session.gtid_seq_no=8*//*!*/;
BEGIN
/*!*/;
# at 1997
#<date> server id 1 end_log_pos 2049 Table_map: `test`.`t2` mapped to number 31
# at 2049
#<date> server id 1 end_log_pos 2119 Update_rows: table id 31 flags: STMT_END_F
# at 2105
#<date> server id 1 end_log_pos 2161 CRC32 XXX Table_map: `test`.`t2` mapped to number 31
# at 2161
#<date> server id 1 end_log_pos 2235 CRC32 XXX Update_rows: table id 31 flags: STMT_END_F
### UPDATE `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -233,20 +233,20 @@ BEGIN
### @5=NULL /* INT meta=0 nullable=1 is_null=1 */
### SET
### @5=5 /* INT meta=0 nullable=1 is_null=0 */
# at 2119
#<date> server id 1 end_log_pos 2188 Query thread_id=4 exec_time=x error_code=0
# at 2235
#<date> server id 1 end_log_pos 2308 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 2188
#<date> server id 1 end_log_pos 2226 GTID 0-1-9
# at 2308
#<date> server id 1 end_log_pos 2350 CRC32 XXX GTID 0-1-9
/*!100001 SET @@session.gtid_seq_no=9*//*!*/;
BEGIN
/*!*/;
# at 2226
#<date> server id 1 end_log_pos 2278 Table_map: `test`.`t1` mapped to number 30
# at 2278
#<date> server id 1 end_log_pos 2328 Delete_rows: table id 30 flags: STMT_END_F
# at 2350
#<date> server id 1 end_log_pos 2406 CRC32 XXX Table_map: `test`.`t1` mapped to number 30
# at 2406
#<date> server id 1 end_log_pos 2460 CRC32 XXX Delete_rows: table id 30 flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -259,20 +259,20 @@ BEGIN
### DELETE FROM `test`.`t1`
### WHERE
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
# at 2328
#<date> server id 1 end_log_pos 2397 Query thread_id=4 exec_time=x error_code=0
# at 2460
#<date> server id 1 end_log_pos 2533 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 2397
#<date> server id 1 end_log_pos 2435 GTID 0-1-10
# at 2533
#<date> server id 1 end_log_pos 2575 CRC32 XXX GTID 0-1-10
/*!100001 SET @@session.gtid_seq_no=10*//*!*/;
BEGIN
/*!*/;
# at 2435
#<date> server id 1 end_log_pos 2487 Table_map: `test`.`t2` mapped to number 31
# at 2487
#<date> server id 1 end_log_pos 2537 Delete_rows: table id 31 flags: STMT_END_F
# at 2575
#<date> server id 1 end_log_pos 2631 CRC32 XXX Table_map: `test`.`t2` mapped to number 31
# at 2631
#<date> server id 1 end_log_pos 2685 CRC32 XXX Delete_rows: table id 31 flags: STMT_END_F
### DELETE FROM `test`.`t2`
### WHERE
### @1=10 /* INT meta=0 nullable=0 is_null=0 */
@ -285,13 +285,13 @@ BEGIN
### DELETE FROM `test`.`t2`
### WHERE
### @1=13 /* INT meta=0 nullable=0 is_null=0 */
# at 2537
#<date> server id 1 end_log_pos 2606 Query thread_id=4 exec_time=x error_code=0
# at 2685
#<date> server id 1 end_log_pos 2758 CRC32 XXX Query thread_id=4 exec_time=x error_code=0
SET TIMESTAMP=X/*!*/;
COMMIT
/*!*/;
# at 2606
#<date> server id 1 end_log_pos 2650 Rotate to master-bin.000002 pos: 4
# at 2758
#<date> server id 1 end_log_pos 2806 CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;

View file

@ -1149,7 +1149,7 @@ big-tables FALSE
bind-address (No default value)
binlog-annotate-row-events FALSE
binlog-cache-size 32768
binlog-checksum NONE
binlog-checksum CRC32
binlog-commit-wait-count 0
binlog-commit-wait-usec 100000
binlog-direct-non-transactional-updates FALSE

View file

@ -705,11 +705,12 @@ SELECT 1 FROM t1
UNION
SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
PROCEDURE ANALYSE() FOR UPDATE;
ERROR HY000: Incorrect usage of PROCEDURE and subquery
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PROCEDURE ANALYSE() FOR UPDATE' at line 4
SELECT 1 FROM DUAL PROCEDURE ANALYSE()
UNION
SELECT 1 FROM t1;
ERROR HY000: Incorrect usage of UNION and SELECT ... PROCEDURE ANALYSE()
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION
SELECT 1 FROM t1' at line 2
(SELECT 1 FROM t1)
UNION
(SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
@ -720,7 +721,7 @@ FOR UPDATE);
UNION
(SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
PROCEDURE ANALYSE() FOR UPDATE);
ERROR HY000: Incorrect usage of PROCEDURE and subquery
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PROCEDURE ANALYSE() FOR UPDATE)' at line 4
# "FOR UPDATE" tests
SELECT 1 FROM t1 UNION SELECT 1 FROM t1 ORDER BY 1 LIMIT 1;
1
@ -739,10 +740,10 @@ Warnings:
Warning 1329 No data - zero rows fetched, selected, or processed
SELECT 1 INTO @var17727401 FROM DUAL;
SELECT 1 INTO @var17727401_1 FROM t1 INTO @var17727401_2;
ERROR HY000: Incorrect usage of INTO and INTO
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @var17727401_2' at line 1
SELECT 1 INTO @var17727401_1 FROM DUAL
INTO @var17727401_2;
ERROR HY000: Incorrect usage of INTO and INTO
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @var17727401_2' at line 2
SELECT 1 INTO @var17727401 FROM t1 WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1 LIMIT 1;
Warnings:
Warning 1329 No data - zero rows fetched, selected, or processed
@ -754,7 +755,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
SELECT 1 INTO @var17727401_1
FROM t1 WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1 LIMIT 1
INTO @var17727401_2;
ERROR HY000: Incorrect usage of INTO and INTO
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @var17727401_2' at line 3
SELECT (SELECT 1 FROM t1 INTO @var17727401);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @var17727401)' at line 1
SELECT 1 FROM (SELECT 1 FROM t1 INTO @var17727401) a;
@ -762,16 +763,16 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
SELECT EXISTS(SELECT 1 FROM t1 INTO @var17727401);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @var17727401)' at line 1
SELECT 1 FROM t1 INTO @var17727401 UNION SELECT 1 FROM t1 INTO t1;
ERROR HY000: Incorrect usage of UNION and INTO
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1 INTO t1' at line 1
(SELECT 1 FROM t1 INTO @var17727401) UNION (SELECT 1 FROM t1 INTO t1);
ERROR HY000: Incorrect usage of UNION and INTO
SELECT 1 FROM t1 UNION SELECT 1 FROM t1 INTO @var17727401;
Warnings:
Warning 1329 No data - zero rows fetched, selected, or processed
SELECT 1 INTO @var17727401 FROM t1 PROCEDURE ANALYSE();
ERROR HY000: Incorrect usage of PROCEDURE and INTO
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PROCEDURE ANALYSE()' at line 1
SELECT 1 FROM t1 PROCEDURE ANALYSE() INTO @var17727401;
ERROR HY000: Incorrect usage of PROCEDURE and INTO
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @var17727401' at line 1
# ORDER and LIMIT clause combinations
(SELECT 1 FROM t1 ORDER BY 1) ORDER BY 1;
1
@ -817,53 +818,53 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
SELECT 1 FROM (SELECT 1 FROM t1 UNION SELECT 1 FROM t1 LIMIT 1 ORDER BY 1) a;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY 1) a' at line 1
SELECT 1 FROM t1 ORDER BY 1 UNION SELECT 1 FROM t1;
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1' at line 1
SELECT (SELECT 1 FROM t1 ORDER BY 1 UNION SELECT 1 FROM t1);
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1)' at line 1
SELECT 1 FROM (SELECT 1 FROM t1 ORDER BY 1 UNION SELECT 1 FROM t1) a;
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1) a' at line 1
SELECT 1 FROM t1 LIMIT 1 UNION SELECT 1 FROM t1;
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1' at line 1
SELECT (SELECT 1 FROM t1 LIMIT 1 UNION SELECT 1 FROM t1);
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1)' at line 1
SELECT 1 FROM (SELECT 1 FROM t1 LIMIT 1 UNION SELECT 1 FROM t1) a;
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1) a' at line 1
SELECT 1 FROM t1 ORDER BY 1 LIMIT 1 UNION SELECT 1 FROM t1;
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1' at line 1
SELECT (SELECT 1 FROM t1 ORDER BY 1 LIMIT 1 UNION SELECT 1 FROM t1);
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1)' at line 1
SELECT 1 FROM (SELECT 1 FROM t1 ORDER BY 1 LIMIT 1 UNION SELECT 1 FROM t1) a;
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1) a' at line 1
SELECT 1 FROM t1 LIMIT 1 ORDER BY 1 UNION SELECT 1 FROM t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY 1 UNION SELECT 1 FROM t1' at line 1
SELECT (SELECT 1 FROM t1 LIMIT 1 ORDER BY 1 UNION SELECT 1 FROM t1);
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY 1 UNION SELECT 1 FROM t1)' at line 1
SELECT 1 FROM (SELECT 1 FROM t1 LIMIT 1 ORDER BY 1 UNION SELECT 1 FROM t1) a;
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'ORDER BY 1 UNION SELECT 1 FROM t1) a' at line 1
SELECT 1 FROM t1 ORDER BY 1 UNION SELECT 1 FROM t1 ORDER BY 1;
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1 ORDER BY 1' at line 1
SELECT (SELECT 1 FROM t1 ORDER BY 1 UNION SELECT 1 FROM t1 ORDER BY 1);
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1 ORDER BY 1)' at line 1
SELECT 1 FROM (SELECT 1 FROM t1 ORDER BY 1 UNION SELECT 1 FROM t1 ORDER BY 1) a;
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1 ORDER BY 1) a' at line 1
SELECT 1 FROM t1 LIMIT 1 UNION SELECT 1 FROM t1 LIMIT 1;
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1 LIMIT 1' at line 1
SELECT (SELECT 1 FROM t1 LIMIT 1 UNION SELECT 1 FROM t1 LIMIT 1);
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1 LIMIT 1)' at line 1
SELECT 1 FROM (SELECT 1 FROM t1 LIMIT 1 UNION SELECT 1 FROM t1 LIMIT 1) a;
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1 LIMIT 1) a' at line 1
SELECT 1 FROM t1 LIMIT 1 UNION SELECT 1 FROM t1 ORDER BY 1;
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1 ORDER BY 1' at line 1
SELECT (SELECT 1 FROM t1 LIMIT 1 UNION SELECT 1 FROM t1 ORDER BY 1);
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1 ORDER BY 1)' at line 1
SELECT 1 FROM (SELECT 1 FROM t1 LIMIT 1 UNION SELECT 1 FROM t1 ORDER BY 1) a;
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1 ORDER BY 1) a' at line 1
SELECT 1 FROM t1 ORDER BY 1 UNION SELECT 1 FROM t1 LIMIT 1;
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1 LIMIT 1' at line 1
SELECT (SELECT 1 FROM t1 ORDER BY 1 UNION SELECT 1 FROM t1 LIMIT 1);
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1 LIMIT 1)' at line 1
SELECT 1 FROM (SELECT 1 FROM t1 ORDER BY 1 UNION SELECT 1 FROM t1 LIMIT 1) a;
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1 FROM t1 LIMIT 1) a' at line 1
DROP TABLE t1;
#
# MDEV-8380: Subquery parse error
@ -877,3 +878,22 @@ a
2
1
DROP TABLE t1;
#
# MDEV-10080 Derived tables allow double LIMIT clause
#
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
SELECT * FROM (SELECT * FROM t1 LIMIT 1 LIMIT 2) t1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'LIMIT 2) t1' at line 1
DROP TABLE t1;
#
# MDEV-10109 Disallow syntactically INSERT .. SELECT .. {ORDER BY ..| LIMIT ..} .. UNION ..
#
INSERT INTO t1 SELECT 1 ORDER BY 1 UNION SELECT 2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 2' at line 1
INSERT INTO t1 SELECT 1 LIMIT 1 UNION SELECT 2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 2' at line 1
CREATE TABLE t1 AS SELECT 1 ORDER BY 1 UNION SELECT 2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 2' at line 1
CREATE TABLE t1 AS SELECT 1 LIMIT 1 UNION SELECT 2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 2' at line 1

View file

@ -3404,7 +3404,7 @@ f1 f2 f2
NULL a NULL
drop table t1,t2;
select * from (select * left join t on f1=f2) tt;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'on f1=f2) tt' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'left join t on f1=f2) tt' at line 1
CREATE TABLE t1 (sku int PRIMARY KEY, pr int);
CREATE TABLE t2 (sku int PRIMARY KEY, sppr int, name varchar(255));
INSERT INTO t1 VALUES

View file

@ -3415,7 +3415,7 @@ f1 f2 f2
NULL a NULL
drop table t1,t2;
select * from (select * left join t on f1=f2) tt;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'on f1=f2) tt' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'left join t on f1=f2) tt' at line 1
CREATE TABLE t1 (sku int PRIMARY KEY, pr int);
CREATE TABLE t2 (sku int PRIMARY KEY, sppr int, name varchar(255));
INSERT INTO t1 VALUES

View file

@ -3404,7 +3404,7 @@ f1 f2 f2
NULL a NULL
drop table t1,t2;
select * from (select * left join t on f1=f2) tt;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'on f1=f2) tt' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'left join t on f1=f2) tt' at line 1
CREATE TABLE t1 (sku int PRIMARY KEY, pr int);
CREATE TABLE t2 (sku int PRIMARY KEY, sppr int, name varchar(255));
INSERT INTO t1 VALUES

View file

@ -1227,14 +1227,14 @@ DROP PROCEDURE IF EXISTS bug14702;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (i INT);
CREATE PROCEDURE bug20953() CREATE VIEW v AS SELECT 1 INTO @a;
ERROR HY000: View's SELECT contains a 'INTO' clause
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @a' at line 1
CREATE PROCEDURE bug20953() CREATE VIEW v AS SELECT 1 INTO DUMPFILE "file";
ERROR HY000: View's SELECT contains a 'INTO' clause
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO DUMPFILE "file"' at line 1
CREATE PROCEDURE bug20953() CREATE VIEW v AS SELECT 1 INTO OUTFILE "file";
ERROR HY000: View's SELECT contains a 'INTO' clause
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO OUTFILE "file"' at line 1
CREATE PROCEDURE bug20953()
CREATE VIEW v AS SELECT i FROM t1 PROCEDURE ANALYSE();
ERROR HY000: View's SELECT contains a 'PROCEDURE' clause
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'PROCEDURE ANALYSE()' at line 2
CREATE PROCEDURE bug20953() CREATE VIEW v AS SELECT 1 FROM (SELECT 1) AS d1;
ERROR HY000: View's SELECT contains a subquery in the FROM clause
CREATE PROCEDURE bug20953(i INT) CREATE VIEW v AS SELECT i;

View file

@ -1056,7 +1056,7 @@ create table t1 (a float);
select 10.5 IN (SELECT * from t1 LIMIT 1);
ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
select 10.5 IN (SELECT * from t1 LIMIT 1 UNION SELECT 1.5);
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1.5)' at line 1
select 10.5 IN (SELECT * from t1 UNION SELECT 1.5 LIMIT 1);
ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
drop table t1;
@ -5188,9 +5188,9 @@ a 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
ERROR 42000: Every derived table must have its own alias
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1) ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;

View file

@ -1060,7 +1060,7 @@ create table t1 (a float);
select 10.5 IN (SELECT * from t1 LIMIT 1);
ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
select 10.5 IN (SELECT * from t1 LIMIT 1 UNION SELECT 1.5);
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1.5)' at line 1
select 10.5 IN (SELECT * from t1 UNION SELECT 1.5 LIMIT 1);
ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
drop table t1;
@ -5190,9 +5190,9 @@ a 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
ERROR 42000: Every derived table must have its own alias
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1) ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;

View file

@ -1063,7 +1063,7 @@ create table t1 (a float);
select 10.5 IN (SELECT * from t1 LIMIT 1);
ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
select 10.5 IN (SELECT * from t1 LIMIT 1 UNION SELECT 1.5);
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1.5)' at line 1
select 10.5 IN (SELECT * from t1 UNION SELECT 1.5 LIMIT 1);
ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
drop table t1;
@ -5188,9 +5188,9 @@ a 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
ERROR 42000: Every derived table must have its own alias
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1) ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;

View file

@ -1059,7 +1059,7 @@ create table t1 (a float);
select 10.5 IN (SELECT * from t1 LIMIT 1);
ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
select 10.5 IN (SELECT * from t1 LIMIT 1 UNION SELECT 1.5);
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1.5)' at line 1
select 10.5 IN (SELECT * from t1 UNION SELECT 1.5 LIMIT 1);
ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
drop table t1;
@ -5184,9 +5184,9 @@ a 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
ERROR 42000: Every derived table must have its own alias
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1) ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;

View file

@ -1062,7 +1062,7 @@ create table t1 (a float);
select 10.5 IN (SELECT * from t1 LIMIT 1);
ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
select 10.5 IN (SELECT * from t1 LIMIT 1 UNION SELECT 1.5);
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1.5)' at line 1
select 10.5 IN (SELECT * from t1 UNION SELECT 1.5 LIMIT 1);
ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
drop table t1;
@ -5194,9 +5194,9 @@ a 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
ERROR 42000: Every derived table must have its own alias
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1) ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;

View file

@ -1059,7 +1059,7 @@ create table t1 (a float);
select 10.5 IN (SELECT * from t1 LIMIT 1);
ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
select 10.5 IN (SELECT * from t1 LIMIT 1 UNION SELECT 1.5);
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT 1.5)' at line 1
select 10.5 IN (SELECT * from t1 UNION SELECT 1.5 LIMIT 1);
ERROR 42000: This version of MariaDB doesn't yet support 'LIMIT & IN/ALL/ANY/SOME subquery'
drop table t1;
@ -5184,9 +5184,9 @@ a 1
SELECT * FROM t1 JOIN ((SELECT 1 UNION SELECT 1)) ON 1;
ERROR 42000: Every derived table must have its own alias
SELECT * FROM t1 JOIN (t1 t1a UNION SELECT 1) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ') ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1) ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a UNION SELECT 1)) ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')) ON 1' at line 1
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'SELECT 1)) ON 1' at line 1
SELECT * FROM t1 JOIN (t1 t1a) t1a ON 1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 't1a ON 1' at line 1
SELECT * FROM t1 JOIN ((t1 t1a)) t1a ON 1;

View file

@ -124,11 +124,11 @@ ERROR 21000: The used SELECT statements have a different number of columns
explain select a,b from t1 union select 1 limit 0;
ERROR 21000: The used SELECT statements have a different number of columns
select a,b from t1 into outfile 'skr' union select a,b from t2;
ERROR HY000: Incorrect usage of UNION and INTO
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'union select a,b from t2' at line 1
select a,b from t1 order by a union select a,b from t2;
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'union select a,b from t2' at line 1
insert into t3 select a from t1 order by a union select a from t2;
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'union select a from t2' at line 1
create table t3 select a,b from t1 union select a from t2;
ERROR 21000: The used SELECT statements have a different number of columns
select a,b from t1 union select a from t2;
@ -380,7 +380,7 @@ select found_rows();
found_rows()
4
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION all SELECT * FROM t2 LIMIT 2;
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION all SELECT * FROM t2 LIMIT 2' at line 1
SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION all SELECT * FROM t2 LIMIT 2;
a
1
@ -422,7 +422,7 @@ select found_rows();
found_rows()
5
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 100 UNION SELECT * FROM t2;
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT * FROM t2' at line 1
SELECT COUNT(*) FROM (
(SELECT * FROM t1 LIMIT 100) UNION SELECT * FROM t2) q;
COUNT(*)
@ -435,7 +435,7 @@ a
4
5
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION SELECT * FROM t2;
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT * FROM t2' at line 1
SELECT COUNT(*) FROM (
(SELECT * FROM t1 LIMIT 1) UNION SELECT * FROM t2) q;
COUNT(*)
@ -447,7 +447,7 @@ a
4
5
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION SELECT * FROM t2 LIMIT 2;
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT * FROM t2 LIMIT 2' at line 1
SELECT COUNT(*) FROM (
(SELECT * FROM t1 LIMIT 1) UNION SELECT * FROM t2) q;
COUNT(*)
@ -468,7 +468,7 @@ SELECT * FROM t1 UNION SELECT * FROM t2) q;
COUNT(*)
5
SELECT SQL_CALC_FOUND_ROWS * FROM t1 limit 2,2 UNION SELECT * FROM t2;
ERROR HY000: Incorrect usage of UNION and LIMIT
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT * FROM t2' at line 1
SELECT COUNT(*) FROM (
(SELECT * FROM t1 limit 2,2) UNION SELECT * FROM t2) q;
COUNT(*)
@ -1569,7 +1569,8 @@ UNION ALL
SELECT b, COUNT(*) FROM t2 GROUP BY b WITH ROLLUP ORDER BY a
UNION
SELECT 1,1;
ERROR HY000: Incorrect usage of UNION and ORDER BY
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION
SELECT 1,1' at line 4
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1), (2), (3);
@ -1647,11 +1648,11 @@ SELECT a FROM t1 UNION SELECT a INTO @v FROM t1;
SELECT a FROM t1 UNION SELECT a INTO OUTFILE 'union.out.file5' FROM t1;
SELECT a FROM t1 UNION SELECT a INTO OUTFILE 'union.out.file6' FROM t1;
SELECT a INTO @v FROM t1 UNION SELECT a FROM t1;
ERROR HY000: Incorrect usage of UNION and INTO
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT a FROM t1' at line 1
SELECT a INTO OUTFILE 'union.out.file7' FROM t1 UNION SELECT a FROM t1;
ERROR HY000: Incorrect usage of UNION and INTO
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT a FROM t1' at line 1
SELECT a INTO DUMPFILE 'union.out.file8' FROM t1 UNION SELECT a FROM t1;
ERROR HY000: Incorrect usage of UNION and INTO
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UNION SELECT a FROM t1' at line 1
# Tests fix in parser rule query_expression_body.
SELECT ( SELECT a UNION SELECT a ) INTO @v FROM t1;
SELECT ( SELECT a UNION SELECT a ) INTO OUTFILE 'union.out.file3' FROM t1;

View file

@ -923,12 +923,12 @@ select * from v4;
ERROR 21000: Subquery returns more than 1 row
drop view v4, v3, v2, v1;
create view v1 as select 5 into @w;
ERROR HY000: View's SELECT contains a 'INTO' clause
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'into @w' at line 1
create view v1 as select 5 into outfile 'ttt';
ERROR HY000: View's SELECT contains a 'INTO' clause
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'into outfile 'ttt'' at line 1
create table t1 (a int);
create view v1 as select a from t1 procedure analyse();
ERROR HY000: View's SELECT contains a 'PROCEDURE' clause
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'procedure analyse()' at line 1
create view v1 as select 1 from (select 1) as d1;
ERROR HY000: View's SELECT contains a subquery in the FROM clause
drop table t1;

View file

@ -1,4 +1,5 @@
set sql_mode="";
set global binlog_checksum=NONE;
drop table if exists t1;
reset master;
set @a=UNIX_TIMESTAMP("2020-01-21 15:32:22");
@ -1627,3 +1628,4 @@ ROLLBACK /* added by mysqlbinlog */;
--- end of test --
drop table t1;
set global binlog_checksum=default;

File diff suppressed because it is too large Load diff

View file

@ -2251,20 +2251,20 @@ FLUSH LOGS;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
ROLLBACK/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Gtid list []
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list []
# at #
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
@ -2366,14 +2366,14 @@ crn INT -- row number
) ENGINE=InnoDB DEFAULT CHARSET latin1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-2 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 trans
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -2456,17 +2456,17 @@ BEGIN
### @78=b'00000000' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=1 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-3 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 trans
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -2549,19 +2549,19 @@ BEGIN
### @78=b'00000111' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=2 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-4 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 trans
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=NULL /* BIT(1) meta=1 nullable=1 is_null=1 */
@ -2725,17 +2725,17 @@ BEGIN
### @78=b'00000110' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=4 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-5 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 trans
/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -2898,17 +2898,17 @@ BEGIN
### @78=b'00000111' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=1 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-6 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 trans
/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -3071,17 +3071,17 @@ BEGIN
### @78=b'00000000' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=2 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-7 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7 trans
/*!100001 SET @@session.gtid_seq_no=7*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
### @1=NULL /* BIT(1) meta=1 nullable=1 is_null=1 */
@ -3244,17 +3244,17 @@ BEGIN
### @78=b'00000110' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=3 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-8 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8 trans
/*!100001 SET @@session.gtid_seq_no=8*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -3417,17 +3417,17 @@ BEGIN
### @78=NULL /* SET(1 bytes) meta=63489 nullable=1 is_null=1 */
### @79=4 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-9 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-9 trans
/*!100001 SET @@session.gtid_seq_no=9*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -3510,17 +3510,17 @@ BEGIN
### @78=b'00000111' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=1 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-10 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-10 trans
/*!100001 SET @@session.gtid_seq_no=10*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -3603,17 +3603,17 @@ BEGIN
### @78=b'00000000' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=2 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-11 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-11 trans
/*!100001 SET @@session.gtid_seq_no=11*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -3696,17 +3696,17 @@ BEGIN
### @78=b'00000110' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=3 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-12 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-12 trans
/*!100001 SET @@session.gtid_seq_no=12*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=NULL /* BIT(1) meta=1 nullable=1 is_null=1 */
@ -3789,10 +3789,10 @@ BEGIN
### @78=NULL /* SET(1 bytes) meta=63489 nullable=1 is_null=1 */
### @79=4 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Rotate to master-bin.000002 pos: 4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
@ -3885,20 +3885,20 @@ FLUSH LOGS;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
ROLLBACK/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Gtid list []
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list []
# at #
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
@ -3916,14 +3916,14 @@ crn INT -- row number
) ENGINE=InnoDB DEFAULT CHARSET latin1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-2 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 trans
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1='2008:08:01' /* DATE meta=0 nullable=1 is_null=0 */
@ -3970,17 +3970,17 @@ BEGIN
### @2='VARCHAR-09' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */
### @3=9 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-3 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 trans
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
### @1='2008:08:01' /* DATE meta=0 nullable=1 is_null=0 */
@ -4045,17 +4045,17 @@ BEGIN
### @2='VARCHAR-07' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */
### @3=7 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-4 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 trans
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1='2008:08:11' /* DATE meta=0 nullable=1 is_null=0 */
@ -4092,10 +4092,10 @@ BEGIN
### @2='VARCHAR-07' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */
### @3=7 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Rotate to master-bin.000002 pos: 4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
@ -4264,20 +4264,20 @@ FLUSH LOGS;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
ROLLBACK/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Gtid list []
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list []
# at #
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
@ -4295,10 +4295,10 @@ c_1_n INT -- row number
) ENGINE=InnoDB DEFAULT CHARSET latin1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-2 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 ddl
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
CREATE TABLE t2 (
c_2_1 DATE,
@ -4307,10 +4307,10 @@ c_2_n INT -- row number
) ENGINE=InnoDB DEFAULT CHARSET latin1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-3 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 ddl
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
CREATE TABLE t3 (
c_3_1 DATE,
@ -4319,14 +4319,14 @@ c_3_n INT -- row number
) ENGINE=InnoDB DEFAULT CHARSET latin1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-4 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 trans
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1='2008:01:01' /* DATE meta=0 nullable=1 is_null=0 */
@ -4373,17 +4373,17 @@ BEGIN
### @2='VARCHAR-01-09' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
### @3=19 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-5 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 trans
/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t2`
### SET
### @1='2008:02:01' /* DATE meta=0 nullable=1 is_null=0 */
@ -4430,17 +4430,17 @@ BEGIN
### @2='VARCHAR-02-09' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
### @3=29 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-6 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6 trans
/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t3` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t3` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t3`
### SET
### @1='2008:03:01' /* DATE meta=0 nullable=1 is_null=0 */
@ -4487,25 +4487,25 @@ BEGIN
### @2='VARCHAR-03-09' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
### @3=39 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-7 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7 trans
/*!100001 SET @@session.gtid_seq_no=7*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t3` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t3` mapped to number #
# at #
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
### @1='2008:01:02' /* DATE meta=0 nullable=1 is_null=0 */
@ -4669,25 +4669,25 @@ BEGIN
### @2='VARCHAR-03-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
### @3=7 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-8 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8 trans
/*!100001 SET @@session.gtid_seq_no=8*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t3` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t3` mapped to number #
# at #
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1='2018:01:02' /* DATE meta=0 nullable=1 is_null=0 */
@ -4779,10 +4779,10 @@ BEGIN
### @2='VARCHAR-03-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
### @3=7 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Rotate to master-bin.000002 pos: 4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
@ -4850,20 +4850,20 @@ FLUSH LOGS;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
ROLLBACK/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Gtid list []
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list []
# at #
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
@ -4881,14 +4881,14 @@ c3 VARCHAR(60)
) ENGINE=InnoDB DEFAULT CHARSET latin1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-2 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 trans
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -4905,10 +4905,10 @@ BEGIN
### @2=6 /* INT meta=0 nullable=1 is_null=0 */
### @3='Wow' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Rotate to master-bin.000002 pos: 4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;

View file

@ -2251,20 +2251,20 @@ FLUSH LOGS;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
ROLLBACK/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Gtid list []
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list []
# at #
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
@ -2366,14 +2366,14 @@ crn INT -- row number
) ENGINE=MyISAM DEFAULT CHARSET latin1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-2
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -2456,20 +2456,20 @@ BEGIN
### @78=b'00000000' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=1 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.time_zone='SYSTEM'/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-3
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -2552,21 +2552,21 @@ BEGIN
### @78=b'00000111' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=2 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=NULL /* BIT(1) meta=1 nullable=1 is_null=1 */
@ -2730,19 +2730,19 @@ BEGIN
### @78=b'00000110' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=4 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-5
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5
/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -2905,19 +2905,19 @@ BEGIN
### @78=b'00000111' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=1 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-6
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6
/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -3080,19 +3080,19 @@ BEGIN
### @78=b'00000000' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=2 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-7
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7
/*!100001 SET @@session.gtid_seq_no=7*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
### @1=NULL /* BIT(1) meta=1 nullable=1 is_null=1 */
@ -3255,19 +3255,19 @@ BEGIN
### @78=b'00000110' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=3 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-8
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8
/*!100001 SET @@session.gtid_seq_no=8*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -3430,19 +3430,19 @@ BEGIN
### @78=NULL /* SET(1 bytes) meta=63489 nullable=1 is_null=1 */
### @79=4 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-9
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-9
/*!100001 SET @@session.gtid_seq_no=9*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -3525,19 +3525,19 @@ BEGIN
### @78=b'00000111' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=1 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-10
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-10
/*!100001 SET @@session.gtid_seq_no=10*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=b'0' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -3620,19 +3620,19 @@ BEGIN
### @78=b'00000000' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=2 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-11
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-11
/*!100001 SET @@session.gtid_seq_no=11*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=b'1' /* BIT(1) meta=1 nullable=1 is_null=0 */
@ -3715,19 +3715,19 @@ BEGIN
### @78=b'00000110' /* SET(1 bytes) meta=63489 nullable=1 is_null=0 */
### @79=3 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-12
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-12
/*!100001 SET @@session.gtid_seq_no=12*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=NULL /* BIT(1) meta=1 nullable=1 is_null=1 */
@ -3810,12 +3810,12 @@ BEGIN
### @78=NULL /* SET(1 bytes) meta=63489 nullable=1 is_null=1 */
### @79=4 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Rotate to master-bin.000002 pos: 4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
@ -3908,20 +3908,20 @@ FLUSH LOGS;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
ROLLBACK/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Gtid list []
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list []
# at #
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
@ -3939,14 +3939,14 @@ crn INT -- row number
) ENGINE=MyISAM DEFAULT CHARSET latin1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-2
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1='2008:08:01' /* DATE meta=0 nullable=1 is_null=0 */
@ -3993,19 +3993,19 @@ BEGIN
### @2='VARCHAR-09' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */
### @3=9 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-3
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
### @1='2008:08:01' /* DATE meta=0 nullable=1 is_null=0 */
@ -4070,19 +4070,19 @@ BEGIN
### @2='VARCHAR-07' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */
### @3=7 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1='2008:08:11' /* DATE meta=0 nullable=1 is_null=0 */
@ -4119,12 +4119,12 @@ BEGIN
### @2='VARCHAR-07' /* VARSTRING(24) meta=24 nullable=1 is_null=0 */
### @3=7 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Rotate to master-bin.000002 pos: 4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
@ -4293,20 +4293,20 @@ FLUSH LOGS;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
ROLLBACK/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Gtid list []
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list []
# at #
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
@ -4324,10 +4324,10 @@ c_1_n INT -- row number
) ENGINE=MyISAM DEFAULT CHARSET latin1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-2 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 ddl
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
CREATE TABLE t2 (
c_2_1 DATE,
@ -4336,10 +4336,10 @@ c_2_n INT -- row number
) ENGINE=MyISAM DEFAULT CHARSET latin1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-3 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 ddl
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
CREATE TABLE t3 (
c_3_1 DATE,
@ -4348,14 +4348,14 @@ c_3_n INT -- row number
) ENGINE=MyISAM DEFAULT CHARSET latin1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1='2008:01:01' /* DATE meta=0 nullable=1 is_null=0 */
@ -4402,19 +4402,19 @@ BEGIN
### @2='VARCHAR-01-09' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
### @3=19 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-5
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5
/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t2`
### SET
### @1='2008:02:01' /* DATE meta=0 nullable=1 is_null=0 */
@ -4461,19 +4461,19 @@ BEGIN
### @2='VARCHAR-02-09' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
### @3=29 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-6
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6
/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t3` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t3` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t3`
### SET
### @1='2008:03:01' /* DATE meta=0 nullable=1 is_null=0 */
@ -4520,27 +4520,27 @@ BEGIN
### @2='VARCHAR-03-09' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
### @3=39 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-7
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7
/*!100001 SET @@session.gtid_seq_no=7*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t3` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t3` mapped to number #
# at #
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
### @1='2008:01:02' /* DATE meta=0 nullable=1 is_null=0 */
@ -4704,27 +4704,27 @@ BEGIN
### @2='VARCHAR-03-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
### @3=7 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-8
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8
/*!100001 SET @@session.gtid_seq_no=8*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t3` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t3` mapped to number #
# at #
# at #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1='2018:01:02' /* DATE meta=0 nullable=1 is_null=0 */
@ -4816,12 +4816,12 @@ BEGIN
### @2='VARCHAR-03-07' /* VARSTRING(255) meta=255 nullable=1 is_null=0 */
### @3=7 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Rotate to master-bin.000002 pos: 4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
@ -4889,20 +4889,20 @@ FLUSH LOGS;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
ROLLBACK/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Gtid list []
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list []
# at #
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
@ -4920,14 +4920,14 @@ c3 VARCHAR(60)
) ENGINE=MyISAM DEFAULT CHARSET latin1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-2
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -4944,12 +4944,12 @@ BEGIN
### @2=6 /* INT meta=0 nullable=1 is_null=0 */
### @3='Wow' /* VARSTRING(60) meta=60 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Rotate to master-bin.000002 pos: 4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;

View file

@ -129,20 +129,20 @@ FLUSH LOGS;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
ROLLBACK/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Gtid list []
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Gtid list []
# at #
#010909 4:46:40 server id 1 end_log_pos # Binlog checkpoint master-bin.000001
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-1 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
@ -159,10 +159,10 @@ c2 VARCHAR(20)
) ENGINE=InnoDB DEFAULT CHARSET latin1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-2 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-2 ddl
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
CREATE TABLE t2 (
c1 INT,
@ -170,14 +170,14 @@ c2 VARCHAR(20)
) ENGINE=MyISAM DEFAULT CHARSET latin1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-3 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-3 trans
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -191,9 +191,9 @@ BEGIN
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -216,41 +216,41 @@ BEGIN
### @1=13 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=12 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-4 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-4 ddl
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
TRUNCATE TABLE t1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-5 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-5 ddl
/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
TRUNCATE TABLE t1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-6
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-6
/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t2`
### SET
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -264,19 +264,19 @@ BEGIN
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-7
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-7
/*!100001 SET @@session.gtid_seq_no=7*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t2`
### WHERE
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -299,37 +299,37 @@ BEGIN
### @1=13 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-8
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-8
/*!100001 SET @@session.gtid_seq_no=8*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t2`
### WHERE
### @1=12 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-9 trans
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-9 trans
/*!100001 SET @@session.gtid_seq_no=9*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t1`
### SET
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -343,9 +343,9 @@ BEGIN
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t1`
### WHERE
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -368,41 +368,41 @@ BEGIN
### @1=13 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t1` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t1` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t1`
### WHERE
### @1=12 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Xid = #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Xid = #
COMMIT/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-10 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-10 ddl
/*!100001 SET @@session.gtid_seq_no=10*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
TRUNCATE TABLE t1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-11 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-11 ddl
/*!100001 SET @@session.gtid_seq_no=11*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
TRUNCATE TABLE t2
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-12
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-12
/*!100001 SET @@session.gtid_seq_no=12*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test`.`t2`
### SET
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -416,19 +416,19 @@ BEGIN
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-13
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-13
/*!100001 SET @@session.gtid_seq_no=13*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Update_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Update_rows: table id # flags: STMT_END_F
### UPDATE `test`.`t2`
### WHERE
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -451,46 +451,46 @@ BEGIN
### @1=13 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-3' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-14
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-14
/*!100001 SET @@session.gtid_seq_no=14*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Table_map: `test`.`t2` mapped to number #
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Table_map: `test`.`t2` mapped to number #
# at #
#010909 4:46:40 server id 1 end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `test`.`t2`
### WHERE
### @1=12 /* INT meta=0 nullable=1 is_null=0 */
### @2='varchar-2' /* VARSTRING(20) meta=20 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-15 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-15 ddl
/*!100001 SET @@session.gtid_seq_no=15*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
TRUNCATE TABLE t1
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # GTID 0-1-16 ddl
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX GTID 0-1-16 ddl
/*!100001 SET @@session.gtid_seq_no=16*//*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
TRUNCATE TABLE t2
/*!*/;
# at #
#010909 4:46:40 server id 1 end_log_pos # Rotate to master-bin.000002 pos: 4
#010909 4:46:40 server id 1 end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;

View file

@ -33,21 +33,21 @@ flush logs;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
ROLLBACK/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Gtid list []
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Gtid list []
# at #
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
# at #
use `new_test1`/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
@ -60,14 +60,14 @@ SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (a INT, b INT)
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-2
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-2
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test1`.`t1`
### SET
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -77,28 +77,28 @@ BEGIN
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
### @2=2 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-3 ddl
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
use `test2`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
CREATE TABLE t2 (a INT)
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-4
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-4
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test2`.`t2` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test2`.`t2`
### SET
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -106,46 +106,46 @@ BEGIN
### SET
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-5
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-5
/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `new_test1`.`t1`
### WHERE
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-6 ddl
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-6 ddl
/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
# at #
use `new_test3`/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
CREATE TABLE t3 (a INT)
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-7
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-7
/*!100001 SET @@session.gtid_seq_no=7*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test3`.`t3` mapped to number #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test3`.`t3` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test3`.`t3`
### SET
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -153,37 +153,37 @@ BEGIN
### SET
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-8
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-8
/*!100001 SET @@session.gtid_seq_no=8*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test1`.`t1`
### SET
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
### @2=3 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-9
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-9
/*!100001 SET @@session.gtid_seq_no=9*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test1`.`t1`
### SET
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
@ -205,29 +205,29 @@ BEGIN
### @1=6 /* INT meta=0 nullable=1 is_null=0 */
### @2=6 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-10
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-10
/*!100001 SET @@session.gtid_seq_no=10*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test3`.`t3` mapped to number #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test3`.`t3` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `new_test3`.`t3`
### WHERE
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Rotate to master-bin.000002 pos: 4
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
@ -245,21 +245,21 @@ ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Start: binlog v 4, server v #.##.## created 010909 4:46:40 at startup
ROLLBACK/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Gtid list []
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Gtid list []
# at #
#010909 4:46:40 server id # end_log_pos # Binlog checkpoint master-bin.000001
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Binlog checkpoint master-bin.000001
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-1 ddl
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-1 ddl
/*!100101 SET @@session.skip_parallel_replication=0*//*!*/;
/*!100001 SET @@session.gtid_domain_id=0*//*!*/;
/*!100001 SET @@session.server_id=1*//*!*/;
/*!100001 SET @@session.gtid_seq_no=1*//*!*/;
# at #
use `new_test1`/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
@ -272,14 +272,14 @@ SET @@session.collation_database=DEFAULT/*!*/;
CREATE TABLE t1 (a INT, b INT)
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-2
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-2
/*!100001 SET @@session.gtid_seq_no=2*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test1`.`t1`
### SET
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -289,28 +289,28 @@ BEGIN
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
### @2=2 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-3 ddl
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-3 ddl
/*!100001 SET @@session.gtid_seq_no=3*//*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
use `test2`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
CREATE TABLE t2 (a INT)
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-4
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-4
/*!100001 SET @@session.gtid_seq_no=4*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `test2`.`t2` mapped to number #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `test2`.`t2` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `test2`.`t2`
### SET
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -318,46 +318,46 @@ BEGIN
### SET
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-5
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-5
/*!100001 SET @@session.gtid_seq_no=5*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `new_test1`.`t1`
### WHERE
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
### @2=1 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-6 ddl
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-6 ddl
/*!100001 SET @@session.gtid_seq_no=6*//*!*/;
# at #
use `new_test3`/*!*/;
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
CREATE TABLE t3 (a INT)
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-7
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-7
/*!100001 SET @@session.gtid_seq_no=7*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test3`.`t3` mapped to number #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test3`.`t3` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test3`.`t3`
### SET
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
@ -365,37 +365,37 @@ BEGIN
### SET
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-8
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-8
/*!100001 SET @@session.gtid_seq_no=8*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test1`.`t1`
### SET
### @1=3 /* INT meta=0 nullable=1 is_null=0 */
### @2=3 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-9
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-9
/*!100001 SET @@session.gtid_seq_no=9*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test1`.`t1` mapped to number #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Write_rows: table id # flags: STMT_END_F
### INSERT INTO `new_test1`.`t1`
### SET
### @1=2 /* INT meta=0 nullable=1 is_null=0 */
@ -417,29 +417,29 @@ BEGIN
### @1=6 /* INT meta=0 nullable=1 is_null=0 */
### @2=6 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # GTID 0-1-10
#010909 4:46:40 server id # end_log_pos # CRC32 XXX GTID 0-1-10
/*!100001 SET @@session.gtid_seq_no=10*//*!*/;
BEGIN
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Table_map: `new_test3`.`t3` mapped to number #
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Table_map: `new_test3`.`t3` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Delete_rows: table id # flags: STMT_END_F
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Delete_rows: table id # flags: STMT_END_F
### DELETE FROM `new_test3`.`t3`
### WHERE
### @1=1 /* INT meta=0 nullable=1 is_null=0 */
# at #
#010909 4:46:40 server id # end_log_pos # Query thread_id=# exec_time=# error_code=0
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Query thread_id=# exec_time=# error_code=0
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
# at #
#010909 4:46:40 server id # end_log_pos # Rotate to master-bin.000002 pos: 4
#010909 4:46:40 server id # end_log_pos # CRC32 XXX Rotate to master-bin.000002 pos: 4
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;

View file

@ -509,6 +509,7 @@ master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `mysql`; DELETE FROM user WHERE host='localhost' AND user='@#@'
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Rotate # # master-bin.000002;pos=POS
drop table t1,t2,t3,tt1;
reset master;
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;

View file

@ -6,6 +6,7 @@
-- source include/binlog_start_pos.inc
set sql_mode="";
set global binlog_checksum=NONE;
--disable_warnings
drop table if exists t1;
--enable_warnings
@ -185,4 +186,5 @@ select "--- end of test --" as "";
--enable_query_log
drop table t1;
set global binlog_checksum=default;
# End of 4.1 tests

View file

@ -453,5 +453,5 @@ DROP TABLE t1dec102;
flush logs;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9]*[.][0-9]{1,3})[0-9e+-]*[^ ]*(.*(FLOAT|DOUBLE).*[*].)/\1...\2/
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /(@[0-9]*=[0-9]*[.][0-9]{1,3})[0-9e+-]*[^ ]*(.*(FLOAT|DOUBLE).*[*].)/\1...\2/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001

View file

@ -150,7 +150,7 @@ FLUSH LOGS;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/
--replace_regex /SQL_LOAD_MB-[0-9]-[0-9]/SQL_LOAD_MB-#-#/ /exec_time=[0-9]*/exec_time=#/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /Xid = [0-9]*/Xid = #/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /server v [^ ]*/server v #.##.##/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #

View file

@ -25,6 +25,7 @@
--disable_query_log
set sql_mode="";
set global binlog_checksum=NONE;
# Fix timestamp to avoid varying results
SET timestamp=1000000000;
@ -182,6 +183,7 @@ let $MYSQLD_DATADIR= `select @@datadir`;
# Clean-up
--disable_query_log
set global binlog_checksum=default;
DROP DATABASE test1;
DROP DATABASE test2;
DROP DATABASE test3;

View file

@ -59,7 +59,7 @@ flush logs;
--echo #
let $MYSQLD_DATADIR= `select @@datadir`;
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows --rewrite-db="test1->new_test1" --rewrite-db="test3->new_test3" -v -v $MYSQLD_DATADIR/master-bin.000001
--echo #
@ -70,7 +70,7 @@ let $MYSQLD_DATADIR= `select @@datadir`;
--echo # --read-from-remote-server
--echo #
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/
--replace_regex /server id [0-9]*/server id #/ /server v [^ ]*/server v #.##.##/ /exec_time=[0-9]*/exec_time=#/ /thread_id=[0-9]*/thread_id=#/ /table id [0-9]*/table id #/ /mapped to number [0-9]*/mapped to number #/ /end_log_pos [0-9]*/end_log_pos #/ /# at [0-9]*/# at #/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --base64-output=decode-rows --rewrite-db="test1->new_test1" --rewrite-db="test3->new_test3" -v -v --read-from-remote-server --user=root --host=localhost --port=$MASTER_MYPORT master-bin.000001
DROP DATABASE test1;

View file

@ -3497,7 +3497,7 @@ DROP VIEW IF EXISTS v2 ;
CREATE TABLE t1 (f1 BIGINT) ;
SET @x=0;
CREATE or REPLACE VIEW v1 AS Select 1 INTO @x;
ERROR HY000: View's SELECT contains a 'INTO' clause
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @x' at line 1
Select @x;
@x
0

View file

@ -3498,7 +3498,7 @@ DROP VIEW IF EXISTS v2 ;
CREATE TABLE t1 (f1 BIGINT) ;
SET @x=0;
CREATE or REPLACE VIEW v1 AS Select 1 INTO @x;
ERROR HY000: View's SELECT contains a 'INTO' clause
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INTO @x' at line 1
Select @x;
@x
0

View file

@ -266,7 +266,7 @@ CREATE TABLE t1 (f1 BIGINT) ;
# SELECT INTO is illegal
SET @x=0;
--error ER_VIEW_SELECT_CLAUSE
--error ER_PARSE_ERROR
CREATE or REPLACE VIEW v1 AS Select 1 INTO @x;
Select @x;

View file

@ -16,7 +16,7 @@ connect(con4,localhost,root,,);
connection default;
CREATE TABLE t1 (a INT, b VARCHAR(100), PRIMARY KEY (a,b)) ENGINE=innodb;
let pos=`select $binlog_start_pos + 238`;
let pos=`select $binlog_start_pos + 254`;
--replace_result $pos <pos>
SHOW MASTER STATUS;
--replace_result $pos <pos>
@ -53,10 +53,10 @@ COMMIT;
connection default;
SELECT * FROM t1 ORDER BY a,b;
let pos=`select $binlog_start_pos + 740`;
let pos=`select $binlog_start_pos + 788`;
--replace_result $pos <pos>
SHOW STATUS LIKE 'binlog_snapshot_%';
let pos=`select $binlog_start_pos + 1092`;
let pos=`select $binlog_start_pos + 1164`;
--replace_result $pos <pos>
SHOW MASTER STATUS;
SELECT * FROM t2 ORDER BY a;
@ -74,10 +74,10 @@ FLUSH LOGS;
connection default;
SELECT * FROM t1 ORDER BY a,b;
let pos=`select $binlog_start_pos + 740`;
let pos=`select $binlog_start_pos + 788`;
--replace_result $pos <pos>
SHOW STATUS LIKE 'binlog_snapshot_%';
let pos=`select $binlog_start_pos + 119`;
let pos=`select $binlog_start_pos + 131`;
--replace_result $pos <pos>
SHOW MASTER STATUS;
COMMIT;

View file

@ -97,7 +97,7 @@ SELECT * FROM t1 ORDER BY a;
# for the end of the second transaction (as can be checked with
# mysqlbinlog).
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let pos=`select $binlog_start_pos + 678`;
let pos=`select $binlog_start_pos + 730`;
--replace_result $pos <pos>
--exec grep 'InnoDB: Last MySQL binlog file position' $MYSQLD_DATADIR/../../log/mysqld.1.err | tail -1

View file

@ -98,7 +98,7 @@ SELECT * FROM t1 ORDER BY a;
# for the end of the second transaction (as can be checked with
# mysqlbinlog).
let $MYSQLD_DATADIR= `SELECT @@datadir`;
let pos=`select $binlog_start_pos + 678`;
let pos=`select $binlog_start_pos + 730`;
--replace_result $pos <pos>
--exec grep 'InnoDB: Last MySQL binlog file position' $MYSQLD_DATADIR/../../log/mysqld.1.err | tail -1
SET DEBUG_SYNC= 'RESET';

View file

@ -137,10 +137,10 @@ let $field= Slave_IO_State;
let $condition= = 'Waiting for master to send event';
--source include/wait_show_condition.inc
let read_master_log_pos=`select $binlog_start_pos + 65`;
let relay_log_pos=`select 2*$binlog_start_pos + 105`;
let relay_log_space1=`select 3*$binlog_start_pos + 144`;
let relay_log_space2=`select 3*$binlog_start_pos + 163`;
let read_master_log_pos=`select $binlog_start_pos + 73`;
let relay_log_pos=`select 2*$binlog_start_pos + 117`;
let relay_log_space1=`select 3*$binlog_start_pos + 160`;
let relay_log_space2=`select 3*$binlog_start_pos + 179`;
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2 $read_master_log_pos <read_master_log_pos> $relay_log_pos <relay_log_pos> $relay_log_space1 <relay_log_space1> $relay_log_space2 <relay_log_space2>
show all slaves status;
@ -164,9 +164,9 @@ let $condition= = 'Waiting for master to send event';
--source include/wait_show_condition.inc
let relay_log_pos=`select 2*$binlog_start_pos + 40`;
let relay_log_space1=`select 3*$binlog_start_pos + 79`;
let relay_log_space2=`select 3*$binlog_start_pos + 98`;
let relay_log_pos=`select 2*$binlog_start_pos + 44`;
let relay_log_space1=`select 3*$binlog_start_pos + 87`;
let relay_log_space2=`select 3*$binlog_start_pos + 106`;
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2 $read_master_log_pos <read_master_log_pos> $relay_log_pos <relay_log_pos> $relay_log_space1 <relay_log_space1> $relay_log_space2 <relay_log_space2>
show all slaves status;

View file

@ -222,7 +222,7 @@ flush logs;
--connection master1
purge binary logs to 'master-bin.000002';
let filesize=`select $binlog_start_pos+119`;
let filesize=`select $binlog_start_pos+131`;
--replace_result $filesize filesize
show binary logs;
insert into t1 (f1) values ('four');

View file

@ -39,9 +39,9 @@ stop slave 'master1';
--let $datadir = `SELECT @@datadir`
let read_master_log_pos=`select $binlog_start_pos + 554`;
let relay_log_pos=`select 2*$binlog_start_pos + 594`;
let relay_log_space=`select 3*$binlog_start_pos + 652`;
let read_master_log_pos=`select $binlog_start_pos + 590`;
let relay_log_pos=`select 2*$binlog_start_pos + 634`;
let relay_log_space=`select 3*$binlog_start_pos + 696`;
--replace_result $SERVER_MYPORT_1 MYPORT_1 $read_master_log_pos <read_master_log_pos> $relay_log_pos <relay_log_pos> $relay_log_space <relay_log_space>
show slave 'master1' status;
--list_files $datadir mysqld*

View file

@ -41,10 +41,10 @@ let $condition = = 7;
let $wait_for_all = 1;
--source include/wait_show_condition.inc
let read_master_log_pos=`select $binlog_start_pos + 65`;
let relay_log_pos=`select 2*$binlog_start_pos + 105`;
let relay_log_space1=`select 3*$binlog_start_pos + 162`;
let relay_log_space2=`select 3*$binlog_start_pos + 162`;
let read_master_log_pos=`select $binlog_start_pos + 73`;
let relay_log_pos=`select 2*$binlog_start_pos + 117`;
let relay_log_space1=`select 3*$binlog_start_pos + 178`;
let relay_log_space2=`select 3*$binlog_start_pos + 178`;
--replace_result $SERVER_MYPORT_1 MYPORT_1 $SERVER_MYPORT_2 MYPORT_2 $read_master_log_pos <read_master_log_pos> $relay_log_pos <relay_log_pos> $relay_log_space1 <relay_log_space1> $relay_log_space2 <relay_log_space2>
show all slaves status;

View file

@ -41,7 +41,7 @@ master-bin.000002 #
set @@global.binlog_checksum = default;
select @@global.binlog_checksum;
@@global.binlog_checksum
NONE
CRC32
set @@global.binlog_checksum = CRC32;
select @@global.binlog_checksum;
@@global.binlog_checksum

View file

@ -1,5 +1,9 @@
include/master-slave.inc
[connection master]
connection master;
SET GLOBAL BINLOG_CHECKSUM=NONE;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=NONE;
*** Test MDEV-6120, output of current GTID when a replication error is logged to the errorlog ***
connection master;
CREATE TABLE t1(a INT PRIMARY KEY);
@ -49,4 +53,9 @@ FOUND /Slave SQL: Error 'Duplicate entry .* on query\. .*Query: '.*', Gtid 0-1-1
FOUND /Slave SQL: The incident LOST_EVENTS occurred on the master\. Message: <none>, Internal MariaDB error code: 1590/ in mysqld.2.err
connection master;
DROP TABLE t1;
connection master;
SET GLOBAL BINLOG_CHECKSUM=default;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=default;
connection master;
include/rpl_end.inc

View file

@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
connection master;
SET GLOBAL BINLOG_CHECKSUM=none;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=none;
connection master;
**** On Master ****
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
@ -38,4 +43,9 @@ include/check_slave_is_running.inc
connection master;
DROP TABLE t1;
connection slave;
connection master;
SET GLOBAL BINLOG_CHECKSUM=default;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=default;
connection master;
include/rpl_end.inc

View file

@ -1,5 +1,10 @@
include/master-slave.inc
[connection master]
connection master;
SET GLOBAL BINLOG_CHECKSUM=NONE;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=NONE;
connection master;
**** On Master ****
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
@ -23,6 +28,12 @@ show binary logs;
Log_name File_size
master-bin.000001 #
master-bin.000002 #
master-bin.000003 #
DROP TABLE t1;
connection slave;
connection master;
SET GLOBAL BINLOG_CHECKSUM=default;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=default;
connection master;
include/rpl_end.inc

View file

@ -1,6 +1,11 @@
--source include/have_debug.inc
--source include/master-slave.inc
connection master;
SET GLOBAL BINLOG_CHECKSUM=NONE;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=NONE;
--echo *** Test MDEV-6120, output of current GTID when a replication error is logged to the errorlog ***
--connection master
CREATE TABLE t1(a INT PRIMARY KEY);
@ -73,4 +78,9 @@ if(!$log_error_)
--connection master
DROP TABLE t1;
connection master;
SET GLOBAL BINLOG_CHECKSUM=default;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=default;
connection master;
--source include/rpl_end.inc

View file

@ -1,6 +1,12 @@
--source include/master-slave.inc
--source include/have_debug.inc
connection master;
SET GLOBAL BINLOG_CHECKSUM=none;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=none;
connection master;
--echo **** On Master ****
CREATE TABLE t1 (a INT);
@ -45,4 +51,9 @@ source include/check_slave_is_running.inc;
connection master;
DROP TABLE t1;
--sync_slave_with_master
connection master;
SET GLOBAL BINLOG_CHECKSUM=default;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=default;
connection master;
--source include/rpl_end.inc

View file

@ -1,6 +1,12 @@
--source include/master-slave.inc
--source include/have_debug.inc
connection master;
SET GLOBAL BINLOG_CHECKSUM=NONE;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=NONE;
connection master;
--echo **** On Master ****
CREATE TABLE t1 (a INT);
@ -25,4 +31,12 @@ connection master;
--source include/show_binary_logs.inc
DROP TABLE t1;
--sync_slave_with_master
connection master;
SET GLOBAL BINLOG_CHECKSUM=default;
connection slave;
SET GLOBAL BINLOG_CHECKSUM=default;
connection master;
--source include/rpl_end.inc

View file

@ -1,8 +1,8 @@
set @save_binlog_checksum= @@global.binlog_checksum;
set @@global.binlog_checksum = default;
select @@global.binlog_checksum as 'must be NONE by default';
must be NONE by default
NONE
select @@global.binlog_checksum as 'must be CRC32 by default';
must be CRC32 by default
CRC32
select @@session.binlog_checksum as 'no session var';
ERROR HY000: Variable 'binlog_checksum' is a GLOBAL variable
set @@global.binlog_checksum = CRC32;

View file

@ -151,9 +151,9 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_CHECKSUM
SESSION_VALUE NULL
GLOBAL_VALUE NONE
GLOBAL_VALUE CRC32
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NONE
DEFAULT_VALUE CRC32
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Type of BINLOG_CHECKSUM_ALG. Include checksum for log events in the binary log

View file

@ -151,9 +151,9 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT REQUIRED
VARIABLE_NAME BINLOG_CHECKSUM
SESSION_VALUE NULL
GLOBAL_VALUE NONE
GLOBAL_VALUE CRC32
GLOBAL_VALUE_ORIGIN COMPILE-TIME
DEFAULT_VALUE NONE
DEFAULT_VALUE CRC32
VARIABLE_SCOPE GLOBAL
VARIABLE_TYPE ENUM
VARIABLE_COMMENT Type of BINLOG_CHECKSUM_ALG. Include checksum for log events in the binary log

View file

@ -6,7 +6,7 @@
set @save_binlog_checksum= @@global.binlog_checksum;
set @@global.binlog_checksum = default;
select @@global.binlog_checksum as 'must be NONE by default';
select @@global.binlog_checksum as 'must be CRC32 by default';
--error ER_INCORRECT_GLOBAL_LOCAL_VAR
select @@session.binlog_checksum as 'no session var';

View file

@ -2,7 +2,7 @@
--source include/have_log_bin.inc
--source include/binlog_start_pos.inc
--let $pos=`select $binlog_start_pos + 65`
--let $pos=`select $binlog_start_pos + 73`
--let $binlog_file=query_get_value(SHOW MASTER STATUS, File, 1)
--let $binlog_start=query_get_value(SHOW MASTER STATUS, Position, 1)

View file

@ -452,3 +452,22 @@ with t1 as (select * from v1) select * from t1;
drop view v1;
drop table t1;
--echo #
--echo # Bug mdev-10058: Invalid derived table with WITH clause
--echo #
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (a INT);
CREATE TABLE t3 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
INSERT INTO t2 VALUES (1),(2),(3);
INSERT INTO t3 VALUES (1),(2),(3);
--ERROR ER_PARSE_ERROR
SELECT * FROM (WITH a AS (SELECT * FROM t1) (t2 NATURAL JOIN t3));
SELECT * FROM (WITH a AS (SELECT * FROM t1) SELECT * FROM t2 NATURAL JOIN t3) AS d1;
DROP TABLE t1,t2,t3;

View file

@ -165,7 +165,7 @@ DROP TABLE t1, t2;
((SELECT 1 FROM DUAL PROCEDURE ANALYSE()));
# TODO:
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT * FROM t1 UNION SELECT * FROM t1 PROCEDURE analyse();
--echo #

View file

@ -125,6 +125,7 @@ UNION
UNION
(select * from t1, t2 where c1 < c2 LIMIT ROWS EXAMINED 6);
--error ER_PARSE_ERROR
select * from t1, t2 where c1 = c2 LIMIT ROWS EXAMINED 0
UNION
select * from t1, t2 where c1 < c2 LIMIT ROWS EXAMINED 6;

View file

@ -27,7 +27,7 @@ DELETE FROM t2;
FLUSH BINARY LOGS;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/
--replace_regex /\d{6} *\d*:\d\d:\d\d/<date>/ /Start:.*at startup/Start: xxx/ /SET TIMESTAMP=\d*/SET TIMESTAMP=X/ /exec_time=\d*/exec_time=x/ /CRC32 0x[0-9a-f]*/CRC32 XXX/
--exec $MYSQL_BINLOG --verbose --verbose --base64-output=DECODE-ROWS $datadir/$binlog
DROP TABLE t1,t2;

View file

@ -1190,7 +1190,7 @@ source include/binlog_start_pos.inc;
let _BINLOG_START_POS= $binlog_start_pos;
--perl
my $f= "$ENV{MYSQLTEST_VARDIR}/tmp/mwl136.sql";
my $pos=$ENV{_BINLOG_START_POS} + 691;
my $pos=$ENV{_BINLOG_START_POS} + 739;
open F, '<', $f or die "Failed to open $f: $!\n";
while (<F>) {
s/$pos/<pos>/;

View file

@ -825,13 +825,13 @@ UNION
SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
FOR UPDATE;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT 1 FROM t1
UNION
SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
PROCEDURE ANALYSE() FOR UPDATE;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT 1 FROM DUAL PROCEDURE ANALYSE()
UNION
SELECT 1 FROM t1;
@ -841,7 +841,7 @@ UNION
(SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
FOR UPDATE);
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
(SELECT 1 FROM t1)
UNION
(SELECT 1 FROM DUAL WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1
@ -863,10 +863,10 @@ SELECT 1 INTO @var17727401;
SELECT 1 INTO @var17727401 FROM t1;
SELECT 1 INTO @var17727401 FROM DUAL;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT 1 INTO @var17727401_1 FROM t1 INTO @var17727401_2;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT 1 INTO @var17727401_1 FROM DUAL
INTO @var17727401_2;
@ -876,7 +876,7 @@ SELECT 1 FROM t1 WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1 LIMIT 1 INTO @var1772740
--error ER_PARSE_ERROR
SELECT 1 FROM t1 WHERE 1 INTO @var17727401 GROUP BY 1 HAVING 1 ORDER BY 1 LIMIT 1;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT 1 INTO @var17727401_1
FROM t1 WHERE 1 GROUP BY 1 HAVING 1 ORDER BY 1 LIMIT 1
INTO @var17727401_2;
@ -888,17 +888,17 @@ SELECT 1 FROM (SELECT 1 FROM t1 INTO @var17727401) a;
--error ER_PARSE_ERROR
SELECT EXISTS(SELECT 1 FROM t1 INTO @var17727401);
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT 1 FROM t1 INTO @var17727401 UNION SELECT 1 FROM t1 INTO t1;
--error ER_WRONG_USAGE
(SELECT 1 FROM t1 INTO @var17727401) UNION (SELECT 1 FROM t1 INTO t1);
SELECT 1 FROM t1 UNION SELECT 1 FROM t1 INTO @var17727401;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT 1 INTO @var17727401 FROM t1 PROCEDURE ANALYSE();
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT 1 FROM t1 PROCEDURE ANALYSE() INTO @var17727401;
--echo # ORDER and LIMIT clause combinations
@ -947,27 +947,27 @@ eval SELECT ($q);
eval SELECT 1 FROM ($q) a;
let $q=SELECT 1 FROM t1 ORDER BY 1 UNION SELECT 1 FROM t1;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval $q;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval SELECT ($q);
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval SELECT 1 FROM ($q) a;
let $q=SELECT 1 FROM t1 LIMIT 1 UNION SELECT 1 FROM t1;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval $q;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval SELECT ($q);
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval SELECT 1 FROM ($q) a;
let $q=SELECT 1 FROM t1 ORDER BY 1 LIMIT 1 UNION SELECT 1 FROM t1;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval $q;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval SELECT ($q);
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval SELECT 1 FROM ($q) a;
let $q=SELECT 1 FROM t1 LIMIT 1 ORDER BY 1 UNION SELECT 1 FROM t1;
@ -975,39 +975,39 @@ let $q=SELECT 1 FROM t1 LIMIT 1 ORDER BY 1 UNION SELECT 1 FROM t1;
eval $q;
--error ER_PARSE_ERROR
eval SELECT ($q);
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval SELECT 1 FROM ($q) a;
let $q=SELECT 1 FROM t1 ORDER BY 1 UNION SELECT 1 FROM t1 ORDER BY 1;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval $q;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval SELECT ($q);
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval SELECT 1 FROM ($q) a;
let $q=SELECT 1 FROM t1 LIMIT 1 UNION SELECT 1 FROM t1 LIMIT 1;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval $q;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval SELECT ($q);
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval SELECT 1 FROM ($q) a;
let $q=SELECT 1 FROM t1 LIMIT 1 UNION SELECT 1 FROM t1 ORDER BY 1;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval $q;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval SELECT ($q);
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval SELECT 1 FROM ($q) a;
let $q=SELECT 1 FROM t1 ORDER BY 1 UNION SELECT 1 FROM t1 LIMIT 1;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval $q;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval SELECT ($q);
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
eval SELECT 1 FROM ($q) a;
DROP TABLE t1;
@ -1021,3 +1021,25 @@ SELECT *
FROM ( (SELECT a FROM t1 ORDER BY a) UNION (SELECT 1 as b ORDER BY b ) ) AS a1
WHERE a1.a = 1 OR a1.a = 2;
DROP TABLE t1;
--echo #
--echo # MDEV-10080 Derived tables allow double LIMIT clause
--echo #
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1),(2),(3);
--error ER_PARSE_ERROR
SELECT * FROM (SELECT * FROM t1 LIMIT 1 LIMIT 2) t1;
DROP TABLE t1;
--echo #
--echo # MDEV-10109 Disallow syntactically INSERT .. SELECT .. {ORDER BY ..| LIMIT ..} .. UNION ..
--echo #
--error ER_PARSE_ERROR
INSERT INTO t1 SELECT 1 ORDER BY 1 UNION SELECT 2;
--error ER_PARSE_ERROR
INSERT INTO t1 SELECT 1 LIMIT 1 UNION SELECT 2;
--error ER_PARSE_ERROR
CREATE TABLE t1 AS SELECT 1 ORDER BY 1 UNION SELECT 2;
--error ER_PARSE_ERROR
CREATE TABLE t1 AS SELECT 1 LIMIT 1 UNION SELECT 2;

View file

@ -1785,13 +1785,13 @@ CREATE TABLE t1 (i INT);
# We do not have to drop this procedure and view because they won't be
# created.
--error ER_VIEW_SELECT_CLAUSE
--error ER_PARSE_ERROR
CREATE PROCEDURE bug20953() CREATE VIEW v AS SELECT 1 INTO @a;
--error ER_VIEW_SELECT_CLAUSE
--error ER_PARSE_ERROR
CREATE PROCEDURE bug20953() CREATE VIEW v AS SELECT 1 INTO DUMPFILE "file";
--error ER_VIEW_SELECT_CLAUSE
--error ER_PARSE_ERROR
CREATE PROCEDURE bug20953() CREATE VIEW v AS SELECT 1 INTO OUTFILE "file";
--error ER_VIEW_SELECT_CLAUSE
--error ER_PARSE_ERROR
CREATE PROCEDURE bug20953()
CREATE VIEW v AS SELECT i FROM t1 PROCEDURE ANALYSE();
--error ER_VIEW_SELECT_DERIVED

View file

@ -569,7 +569,7 @@ drop table t1, t2;
create table t1 (a float);
-- error ER_NOT_SUPPORTED_YET
select 10.5 IN (SELECT * from t1 LIMIT 1);
-- error ER_WRONG_USAGE
-- error ER_PARSE_ERROR
select 10.5 IN (SELECT * from t1 LIMIT 1 UNION SELECT 1.5);
-- error ER_NOT_SUPPORTED_YET
select 10.5 IN (SELECT * from t1 UNION SELECT 1.5 LIMIT 1);

View file

@ -50,13 +50,13 @@ explain select 1 union select a,b from t1 union select 1;
--error 1222
explain select a,b from t1 union select 1 limit 0;
--error 1221
--error ER_PARSE_ERROR
select a,b from t1 into outfile 'skr' union select a,b from t2;
--error 1221
--error ER_PARSE_ERROR
select a,b from t1 order by a union select a,b from t2;
--error 1221
--error ER_PARSE_ERROR
insert into t3 select a from t1 order by a union select a from t2;
--error 1222
@ -236,7 +236,7 @@ SELECT COUNT(*) FROM (
select found_rows();
# In these case found_rows() should work
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION all SELECT * FROM t2 LIMIT 2;
SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION all SELECT * FROM t2 LIMIT 2;
select found_rows();
@ -253,17 +253,17 @@ SELECT COUNT(*) FROM (
SELECT * FROM t1 UNION all SELECT * FROM t2) q;
SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 100;
select found_rows();
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 100 UNION SELECT * FROM t2;
SELECT COUNT(*) FROM (
(SELECT * FROM t1 LIMIT 100) UNION SELECT * FROM t2) q;
(SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 100) UNION SELECT * FROM t2;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION SELECT * FROM t2;
SELECT COUNT(*) FROM (
(SELECT * FROM t1 LIMIT 1) UNION SELECT * FROM t2) q;
(SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1) UNION SELECT * FROM t2;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 1 UNION SELECT * FROM t2 LIMIT 2;
SELECT COUNT(*) FROM (
(SELECT * FROM t1 LIMIT 1) UNION SELECT * FROM t2) q;
@ -272,7 +272,7 @@ SELECT SQL_CALC_FOUND_ROWS * FROM t1 UNION SELECT * FROM t2 LIMIT 2,2;
select found_rows();
SELECT COUNT(*) FROM (
SELECT * FROM t1 UNION SELECT * FROM t2) q;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT SQL_CALC_FOUND_ROWS * FROM t1 limit 2,2 UNION SELECT * FROM t2;
SELECT COUNT(*) FROM (
(SELECT * FROM t1 limit 2,2) UNION SELECT * FROM t2) q;
@ -999,7 +999,7 @@ SELECT a,1 FROM t1
UNION
(SELECT b, COUNT(*) FROM t2 GROUP BY b WITH ROLLUP ORDER BY a);
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT a,1 FROM t1
UNION ALL
SELECT b, COUNT(*) FROM t2 GROUP BY b WITH ROLLUP ORDER BY a
@ -1087,11 +1087,11 @@ SELECT a INTO DUMPFILE 'union.out.file2' FROM (
SELECT a FROM t1 UNION SELECT a INTO @v FROM t1;
SELECT a FROM t1 UNION SELECT a INTO OUTFILE 'union.out.file5' FROM t1;
SELECT a FROM t1 UNION SELECT a INTO OUTFILE 'union.out.file6' FROM t1;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT a INTO @v FROM t1 UNION SELECT a FROM t1;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT a INTO OUTFILE 'union.out.file7' FROM t1 UNION SELECT a FROM t1;
--error ER_WRONG_USAGE
--error ER_PARSE_ERROR
SELECT a INTO DUMPFILE 'union.out.file8' FROM t1 UNION SELECT a FROM t1;
-- echo # Tests fix in parser rule query_expression_body.

View file

@ -840,12 +840,12 @@ drop view v4, v3, v2, v1;
#
# VIEW over SELECT with prohibited clauses
#
-- error ER_VIEW_SELECT_CLAUSE
-- error ER_PARSE_ERROR
create view v1 as select 5 into @w;
-- error ER_VIEW_SELECT_CLAUSE
-- error ER_PARSE_ERROR
create view v1 as select 5 into outfile 'ttt';
create table t1 (a int);
-- error ER_VIEW_SELECT_CLAUSE
-- error ER_PARSE_ERROR
create view v1 as select a from t1 procedure analyse();
-- error ER_VIEW_SELECT_DERIVED
create view v1 as select 1 from (select 1) as d1;

View file

@ -54,6 +54,12 @@ get_collation_number_internal(const char *name)
}
static my_bool is_multi_byte_ident(CHARSET_INFO *cs, uchar ch)
{
int chlen= my_charlen(cs, (const char *) &ch, (const char *) &ch + 1);
return MY_CS_IS_TOOSMALL(chlen) ? TRUE : FALSE;
}
static my_bool init_state_maps(struct charset_info_st *cs)
{
uint i;
@ -73,10 +79,8 @@ static my_bool init_state_maps(struct charset_info_st *cs)
state_map[i]=(uchar) MY_LEX_IDENT;
else if (my_isdigit(cs,i))
state_map[i]=(uchar) MY_LEX_NUMBER_IDENT;
#if defined(USE_MB) && defined(USE_MB_IDENT)
else if (my_mbcharlen(cs, i)>1)
else if (is_multi_byte_ident(cs, i))
state_map[i]=(uchar) MY_LEX_IDENT;
#endif
else if (my_isspace(cs,i))
state_map[i]=(uchar) MY_LEX_SKIP;
else
@ -902,15 +906,13 @@ size_t escape_string_for_mysql(CHARSET_INFO *charset_info,
const char *to_start= to;
const char *end, *to_end=to_start + (to_length ? to_length-1 : 2*length);
my_bool overflow= FALSE;
#ifdef USE_MB
my_bool use_mb_flag= use_mb(charset_info);
#endif
for (end= from + length; from < end; from++)
{
char escape= 0;
#ifdef USE_MB
int tmp_length;
if (use_mb_flag && (tmp_length= my_ismbchar(charset_info, from, end)))
int tmp_length= use_mb(charset_info) ? my_charlen(charset_info, from, end) :
1;
if (tmp_length > 1)
{
if (to + tmp_length > to_end)
{
@ -933,7 +935,7 @@ size_t escape_string_for_mysql(CHARSET_INFO *charset_info,
multi-byte character into a valid one. For example, 0xbf27 is not
a valid GBK character, but 0xbf5c is. (0x27 = ', 0x5c = \)
*/
if (use_mb_flag && (tmp_length= my_mbcharlen(charset_info, *from)) > 1)
if (tmp_length < 1) /* Bad byte sequence */
escape= *from;
else
#endif

View file

@ -184,7 +184,7 @@ static bool set_one_value(ha_create_table_option *opt,
{
for (end=start;
*end && *end != ',';
end+= my_mbcharlen(system_charset_info, *end)) /* no-op */;
end++) /* no-op */;
if (!my_strnncoll(system_charset_info,
(uchar*)start, end-start,
(uchar*)value->str, value->length))

View file

@ -847,16 +847,16 @@ static bool debug_sync_set_action(THD *thd, st_debug_sync_action *action)
to the string terminator ASCII NUL ('\0').
*/
static char *debug_sync_token(char **token_p, uint *token_length_p, char *ptr)
static char *debug_sync_token(char **token_p, uint *token_length_p,
char *ptr, char *ptrend)
{
DBUG_ASSERT(token_p);
DBUG_ASSERT(token_length_p);
DBUG_ASSERT(ptr);
/* Skip leading space */
while (my_isspace(system_charset_info, *ptr))
ptr+= my_mbcharlen(system_charset_info, (uchar) *ptr);
ptr+= system_charset_info->cset->scan(system_charset_info,
ptr, ptrend, MY_SEQ_SPACES);
if (!*ptr)
{
ptr= NULL;
@ -867,8 +867,8 @@ static char *debug_sync_token(char **token_p, uint *token_length_p, char *ptr)
*token_p= ptr;
/* Find token end. */
while (*ptr && !my_isspace(system_charset_info, *ptr))
ptr+= my_mbcharlen(system_charset_info, (uchar) *ptr);
ptr+= system_charset_info->cset->scan(system_charset_info,
ptr, ptrend, MY_SEQ_NONSPACES);
/* Get token length. */
*token_length_p= ptr - *token_p;
@ -876,8 +876,9 @@ static char *debug_sync_token(char **token_p, uint *token_length_p, char *ptr)
/* If necessary, terminate token. */
if (*ptr)
{
DBUG_ASSERT(ptr < ptrend);
/* Get terminator character length. */
uint mbspacelen= my_mbcharlen(system_charset_info, (uchar) *ptr);
uint mbspacelen= my_charlen_fix(system_charset_info, ptr, ptrend);
/* Terminate token. */
*ptr= '\0';
@ -886,8 +887,8 @@ static char *debug_sync_token(char **token_p, uint *token_length_p, char *ptr)
ptr+= mbspacelen;
/* Skip trailing space */
while (my_isspace(system_charset_info, *ptr))
ptr+= my_mbcharlen(system_charset_info, (uchar) *ptr);
ptr+= system_charset_info->cset->scan(system_charset_info,
ptr, ptrend, MY_SEQ_SPACES);
}
end:
@ -917,7 +918,8 @@ static char *debug_sync_token(char **token_p, uint *token_length_p, char *ptr)
undefined in this case.
*/
static char *debug_sync_number(ulong *number_p, char *actstrptr)
static char *debug_sync_number(ulong *number_p, char *actstrptr,
char *actstrend)
{
char *ptr;
char *ept;
@ -927,7 +929,7 @@ static char *debug_sync_number(ulong *number_p, char *actstrptr)
DBUG_ASSERT(actstrptr);
/* Get token from string. */
if (!(ptr= debug_sync_token(&token, &token_length, actstrptr)))
if (!(ptr= debug_sync_token(&token, &token_length, actstrptr, actstrend)))
goto end;
*number_p= strtoul(token, &ept, 10);
@ -971,7 +973,7 @@ static char *debug_sync_number(ulong *number_p, char *actstrptr)
for the string.
*/
static bool debug_sync_eval_action(THD *thd, char *action_str)
static bool debug_sync_eval_action(THD *thd, char *action_str, char *action_end)
{
st_debug_sync_action *action= NULL;
const char *errmsg;
@ -986,7 +988,7 @@ static bool debug_sync_eval_action(THD *thd, char *action_str)
/*
Get debug sync point name. Or a special command.
*/
if (!(ptr= debug_sync_token(&token, &token_length, action_str)))
if (!(ptr= debug_sync_token(&token, &token_length, action_str, action_end)))
{
errmsg= "Missing synchronization point name";
goto err;
@ -1009,7 +1011,7 @@ static bool debug_sync_eval_action(THD *thd, char *action_str)
/*
Get kind of action to be taken at sync point.
*/
if (!(ptr= debug_sync_token(&token, &token_length, ptr)))
if (!(ptr= debug_sync_token(&token, &token_length, ptr, action_end)))
{
/* No action present. Try special commands. Token unchanged. */
@ -1090,7 +1092,7 @@ static bool debug_sync_eval_action(THD *thd, char *action_str)
if (!my_strcasecmp(system_charset_info, token, "SIGNAL"))
{
/* It is SIGNAL. Signal name must follow. */
if (!(ptr= debug_sync_token(&token, &token_length, ptr)))
if (!(ptr= debug_sync_token(&token, &token_length, ptr, action_end)))
{
errmsg= "Missing signal name after action SIGNAL";
goto err;
@ -1108,7 +1110,7 @@ static bool debug_sync_eval_action(THD *thd, char *action_str)
action->execute= 1;
/* Get next token. If none follows, set action. */
if (!(ptr= debug_sync_token(&token, &token_length, ptr)))
if (!(ptr= debug_sync_token(&token, &token_length, ptr, action_end)))
goto set_action;
}
@ -1118,7 +1120,7 @@ static bool debug_sync_eval_action(THD *thd, char *action_str)
if (!my_strcasecmp(system_charset_info, token, "WAIT_FOR"))
{
/* It is WAIT_FOR. Wait_for signal name must follow. */
if (!(ptr= debug_sync_token(&token, &token_length, ptr)))
if (!(ptr= debug_sync_token(&token, &token_length, ptr, action_end)))
{
errmsg= "Missing signal name after action WAIT_FOR";
goto err;
@ -1137,7 +1139,7 @@ static bool debug_sync_eval_action(THD *thd, char *action_str)
action->timeout= opt_debug_sync_timeout;
/* Get next token. If none follows, set action. */
if (!(ptr= debug_sync_token(&token, &token_length, ptr)))
if (!(ptr= debug_sync_token(&token, &token_length, ptr, action_end)))
goto set_action;
/*
@ -1146,14 +1148,14 @@ static bool debug_sync_eval_action(THD *thd, char *action_str)
if (!my_strcasecmp(system_charset_info, token, "TIMEOUT"))
{
/* It is TIMEOUT. Number must follow. */
if (!(ptr= debug_sync_number(&action->timeout, ptr)))
if (!(ptr= debug_sync_number(&action->timeout, ptr, action_end)))
{
errmsg= "Missing valid number after TIMEOUT";
goto err;
}
/* Get next token. If none follows, set action. */
if (!(ptr= debug_sync_token(&token, &token_length, ptr)))
if (!(ptr= debug_sync_token(&token, &token_length, ptr, action_end)))
goto set_action;
}
}
@ -1174,14 +1176,14 @@ static bool debug_sync_eval_action(THD *thd, char *action_str)
}
/* Number must follow. */
if (!(ptr= debug_sync_number(&action->execute, ptr)))
if (!(ptr= debug_sync_number(&action->execute, ptr, action_end)))
{
errmsg= "Missing valid number after EXECUTE";
goto err;
}
/* Get next token. If none follows, set action. */
if (!(ptr= debug_sync_token(&token, &token_length, ptr)))
if (!(ptr= debug_sync_token(&token, &token_length, ptr, action_end)))
goto set_action;
}
@ -1191,14 +1193,14 @@ static bool debug_sync_eval_action(THD *thd, char *action_str)
if (!my_strcasecmp(system_charset_info, token, "HIT_LIMIT"))
{
/* Number must follow. */
if (!(ptr= debug_sync_number(&action->hit_limit, ptr)))
if (!(ptr= debug_sync_number(&action->hit_limit, ptr, action_end)))
{
errmsg= "Missing valid number after HIT_LIMIT";
goto err;
}
/* Get next token. If none follows, set action. */
if (!(ptr= debug_sync_token(&token, &token_length, ptr)))
if (!(ptr= debug_sync_token(&token, &token_length, ptr, action_end)))
goto set_action;
}
@ -1246,7 +1248,7 @@ static bool debug_sync_eval_action(THD *thd, char *action_str)
terminators in the string. So we need to take a copy here.
*/
bool debug_sync_update(THD *thd, char *val_str)
bool debug_sync_update(THD *thd, char *val_str, size_t len)
{
DBUG_ENTER("debug_sync_update");
DBUG_PRINT("debug_sync", ("set action: '%s'", val_str));
@ -1255,8 +1257,9 @@ bool debug_sync_update(THD *thd, char *val_str)
debug_sync_eval_action() places '\0' in the string, which itself
must be '\0' terminated.
*/
DBUG_ASSERT(val_str[len] == '\0');
DBUG_RETURN(opt_debug_sync_timeout ?
debug_sync_eval_action(thd, val_str) :
debug_sync_eval_action(thd, val_str, val_str + len) :
FALSE);
}
@ -1592,7 +1595,7 @@ bool debug_sync_set_action(THD *thd, const char *action_str, size_t len)
DBUG_ASSERT(action_str);
value= strmake_root(thd->mem_root, action_str, len);
rc= debug_sync_eval_action(thd, value);
rc= debug_sync_eval_action(thd, value, value + len);
DBUG_RETURN(rc);
}

View file

@ -45,6 +45,9 @@ extern void debug_sync_init_thread(THD *thd);
extern void debug_sync_end_thread(THD *thd);
extern bool debug_sync_set_action(THD *thd, const char *action_str, size_t len);
extern bool debug_sync_update(THD *thd, char *val_str, size_t len);
extern uchar *debug_sync_value_ptr(THD *thd);
#endif /* defined(ENABLED_DEBUG_SYNC) */
#endif /* DEBUG_SYNC_INCLUDED */

View file

@ -10093,7 +10093,7 @@ static MYSQL_SYSVAR_ENUM(
"log events in the binary log",
NULL,
binlog_checksum_update,
BINLOG_CHECKSUM_ALG_OFF,
BINLOG_CHECKSUM_ALG_CRC32,
&binlog_checksum_typelib);
static struct st_mysql_sys_var *binlog_sys_vars[]=

View file

@ -4439,7 +4439,7 @@ int Query_log_event::do_apply_event(rpl_group_info *rgi,
thd->enable_slow_log= thd->variables.sql_log_slow;
mysql_parse(thd, thd->query(), thd->query_length(), &parser_state,
FALSE);
FALSE, FALSE);
/* Finalize server status flags after executing a statement. */
thd->update_server_status();
log_slow_statement(thd);

View file

@ -35,7 +35,7 @@ static const unsigned int PACKET_BUFFER_EXTRA_ALLOC= 1024;
/* Declared non-static only because of the embedded library. */
bool net_send_error_packet(THD *, uint, const char *, const char *);
/* Declared non-static only because of the embedded library. */
bool net_send_ok(THD *, uint, uint, ulonglong, ulonglong, const char *);
bool net_send_ok(THD *, uint, uint, ulonglong, ulonglong, const char *, bool);
/* Declared non-static only because of the embedded library. */
bool net_send_eof(THD *thd, uint server_status, uint statement_warn_count);
#ifndef EMBEDDED_LIBRARY
@ -208,7 +208,8 @@ bool net_send_error(THD *thd, uint sql_errno, const char *err,
bool
net_send_ok(THD *thd,
uint server_status, uint statement_warn_count,
ulonglong affected_rows, ulonglong id, const char *message)
ulonglong affected_rows, ulonglong id, const char *message,
bool skip_flush)
{
NET *net= &thd->net;
uchar buff[MYSQL_ERRMSG_SIZE+10],*pos;
@ -250,7 +251,7 @@ net_send_ok(THD *thd,
if (message && message[0])
pos= net_store_data(pos, (uchar*) message, strlen(message));
error= my_net_write(net, buff, (size_t) (pos-buff));
if (!error)
if (!error && !skip_flush)
error= net_flush(net);
@ -514,14 +515,16 @@ void Protocol::end_statement()
thd->get_stmt_da()->statement_warn_count(),
thd->get_stmt_da()->affected_rows(),
thd->get_stmt_da()->last_insert_id(),
thd->get_stmt_da()->message());
thd->get_stmt_da()->message(),
thd->get_stmt_da()->skip_flush());
break;
case Diagnostics_area::DA_DISABLED:
break;
case Diagnostics_area::DA_EMPTY:
default:
DBUG_ASSERT(0);
error= send_ok(thd->server_status, 0, 0, 0, NULL);
error= send_ok(thd->server_status, 0, 0, 0, NULL,
thd->get_stmt_da()->skip_flush());
break;
}
if (!error)
@ -540,12 +543,12 @@ void Protocol::end_statement()
bool Protocol::send_ok(uint server_status, uint statement_warn_count,
ulonglong affected_rows, ulonglong last_insert_id,
const char *message)
const char *message, bool skip_flush)
{
DBUG_ENTER("Protocol::send_ok");
const bool retval=
net_send_ok(thd, server_status, statement_warn_count,
affected_rows, last_insert_id, message);
affected_rows, last_insert_id, message, skip_flush);
DBUG_RETURN(retval);
}

View file

@ -62,7 +62,7 @@ protected:
virtual bool send_ok(uint server_status, uint statement_warn_count,
ulonglong affected_rows, ulonglong last_insert_id,
const char *message);
const char *message, bool skip_flush);
virtual bool send_eof(uint server_status, uint statement_warn_count);

View file

@ -5218,6 +5218,8 @@ ER_VIEW_SELECT_DERIVED
ger "SELECT der View enthält eine Subquery in der FROM-Klausel"
rus "View SELECT содержит подзапрос в конструкции FROM"
ukr "View SELECT має підзапит у конструкції FROM"
# Not used any more, syntax error is returned instead
ER_VIEW_SELECT_CLAUSE
eng "View's SELECT contains a '%s' clause"
ger "SELECT der View enthält eine '%s'-Klausel"

View file

@ -792,23 +792,6 @@ static void mark_used_tables_as_free_for_reuse(THD *thd, TABLE *table)
}
/**
Auxiliary function to close all tables in the open_tables list.
@param thd Thread context.
@remark It should not ordinarily be called directly.
*/
static void close_open_tables(THD *thd)
{
DBUG_PRINT("info", ("thd->open_tables: 0x%lx", (long) thd->open_tables));
while (thd->open_tables)
(void) close_thread_table(thd, &thd->open_tables);
}
/**
Close all open instances of the table but keep the MDL lock.
@ -1028,8 +1011,8 @@ void close_thread_tables(THD *thd)
Closing a MERGE child before the parent would be fatal if the
other thread tries to abort the MERGE lock in between.
*/
if (thd->open_tables)
close_open_tables(thd);
while (thd->open_tables)
(void) close_thread_table(thd, &thd->open_tables);
DBUG_VOID_RETURN;
}

View file

@ -3235,7 +3235,7 @@ int select_export::send_data(List<Item> &items)
if ((NEED_ESCAPING(*pos) ||
(check_second_byte &&
my_mbcharlen(character_set_client, (uchar) *pos) == 2 &&
((uchar) *pos) > 0x7F /* a potential MB2HEAD */ &&
pos + 1 < end &&
NEED_ESCAPING(pos[1]))) &&
/*

View file

@ -347,6 +347,7 @@ void
Diagnostics_area::reset_diagnostics_area()
{
DBUG_ENTER("reset_diagnostics_area");
m_skip_flush= FALSE;
#ifdef DBUG_OFF
m_can_overwrite_status= FALSE;
/** Don't take chances in production */

View file

@ -704,6 +704,12 @@ public:
const char *message() const
{ DBUG_ASSERT(m_status == DA_ERROR || m_status == DA_OK); return m_message; }
bool skip_flush() const
{ DBUG_ASSERT(m_status == DA_OK); return m_skip_flush; }
void set_skip_flush()
{ m_skip_flush= TRUE; }
uint sql_errno() const
{ DBUG_ASSERT(m_status == DA_ERROR); return m_sql_errno; }
@ -857,6 +863,9 @@ private:
/** Set to make set_error_status after set_{ok,eof}_status possible. */
bool m_can_overwrite_status;
/** Skip flushing network buffer after writing OK (for COM_MULTI) */
bool m_skip_flush;
/** Message buffer. Can be used by OK or ERROR status. */
char m_message[MYSQL_ERRMSG_SIZE];

View file

@ -232,8 +232,6 @@ void
st_parsing_options::reset()
{
allows_variable= TRUE;
allows_select_into= TRUE;
allows_select_procedure= TRUE;
allows_derived= TRUE;
}

View file

@ -1828,8 +1828,6 @@ private:
struct st_parsing_options
{
bool allows_variable;
bool allows_select_into;
bool allows_select_procedure;
bool allows_derived;
st_parsing_options() { reset(); }

View file

@ -111,7 +111,9 @@
#include "wsrep_thd.h"
static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
Parser_state *parser_state, bool is_next_command);
Parser_state *parser_state,
bool is_com_multi,
bool is_next_command);
/**
@defgroup Runtime_Environment Runtime Environment
@ -1020,7 +1022,7 @@ static void handle_bootstrap_impl(THD *thd)
break;
}
mysql_parse(thd, thd->query(), length, &parser_state, FALSE);
mysql_parse(thd, thd->query(), length, &parser_state, FALSE, FALSE);
bootstrap_error= thd->is_error();
thd->protocol->end_statement();
@ -1633,6 +1635,8 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
drop_more_results= !MY_TEST(thd->server_status &
SERVER_MORE_RESULTS_EXISTS);
thd->server_status|= SERVER_MORE_RESULTS_EXISTS;
if (is_com_multi)
thd->get_stmt_da()->set_skip_flush();
}
switch (command) {
@ -1784,10 +1788,10 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
if (WSREP_ON)
wsrep_mysql_parse(thd, thd->query(), thd->query_length(), &parser_state,
is_next_command);
is_com_multi, is_next_command);
else
mysql_parse(thd, thd->query(), thd->query_length(), &parser_state,
is_next_command);
is_com_multi, is_next_command);
while (!thd->killed && (parser_state.m_lip.found_semicolon != NULL) &&
! thd->is_error())
@ -1873,10 +1877,10 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
if (WSREP_ON)
wsrep_mysql_parse(thd, beginning_of_next_stmt, length, &parser_state,
is_next_command);
is_com_multi, is_next_command);
else
mysql_parse(thd, beginning_of_next_stmt, length, &parser_state,
is_next_command);
is_com_multi, is_next_command);
}
@ -1930,7 +1934,12 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
thd->reset_for_next_command();
// thd->reset_for_next_command reset state => restore it
if (is_next_command)
{
thd->server_status|= SERVER_MORE_RESULTS_EXISTS;
if (is_com_multi)
thd->get_stmt_da()->set_skip_flush();
}
lex_start(thd);
/* Must be before we init the table list. */
if (lower_case_table_names)
@ -2232,6 +2241,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
if (net_allocate_new_packet(net, thd, MYF(0)))
break;
PSI_statement_locker *save_locker= thd->m_statement_psi;
sql_digest_state *save_digest= thd->m_digest;
thd->m_statement_psi= NULL;
thd->m_digest= NULL;
while (packet_length)
{
current_com++;
@ -2263,7 +2277,11 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
}
com_multi_end:
thd->m_statement_psi= save_locker;
thd->m_digest= save_digest;
/* release old buffer */
net_flush(net);
DBUG_ASSERT(net->buff == net->write_pos); // nothing to send
my_free(readbuff);
}
@ -7500,7 +7518,9 @@ void mysql_init_multi_delete(LEX *lex)
}
static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
Parser_state *parser_state, bool is_next_command)
Parser_state *parser_state,
bool is_com_multi,
bool is_next_command)
{
#ifdef WITH_WSREP
bool is_autocommit=
@ -7519,7 +7539,8 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
MYSQL_SET_STATEMENT_TEXT(thd->m_statement_psi, thd->query(),
thd->query_length());
}
mysql_parse(thd, rawbuf, length, parser_state, is_next_command);
mysql_parse(thd, rawbuf, length, parser_state, is_com_multi,
is_next_command);
if (WSREP(thd)) {
/* wsrep BF abort in query exec phase */
@ -7621,7 +7642,9 @@ static void wsrep_mysql_parse(THD *thd, char *rawbuf, uint length,
*/
void mysql_parse(THD *thd, char *rawbuf, uint length,
Parser_state *parser_state, bool is_next_command)
Parser_state *parser_state,
bool is_com_multi,
bool is_next_command)
{
int error __attribute__((unused));
DBUG_ENTER("mysql_parse");
@ -7646,7 +7669,11 @@ void mysql_parse(THD *thd, char *rawbuf, uint length,
lex_start(thd);
thd->reset_for_next_command();
if (is_next_command)
{
thd->server_status|= SERVER_MORE_RESULTS_EXISTS;
if (is_com_multi)
thd->get_stmt_da()->set_skip_flush();
}
if (query_cache_send_result_to_client(thd, rawbuf, length) <= 0)
{

View file

@ -88,7 +88,8 @@ bool is_log_table_write_query(enum enum_sql_command command);
bool alloc_query(THD *thd, const char *packet, uint packet_length);
void mysql_init_select(LEX *lex);
void mysql_parse(THD *thd, char *rawbuf, uint length,
Parser_state *parser_state, bool is_com_multi);
Parser_state *parser_state, bool is_com_multi,
bool is_next_command);
bool mysql_new_select(LEX *lex, bool move_down);
void create_select_for_variable(const char *var_name);
void create_table_set_open_action_and_adjust_tables(LEX *lex);

View file

@ -277,7 +277,7 @@ protected:
virtual bool send_ok(uint server_status, uint statement_warn_count,
ulonglong affected_rows, ulonglong last_insert_id,
const char *message);
const char *message, bool skip_flush);
virtual bool send_eof(uint server_status, uint statement_warn_count);
virtual bool send_error(uint sql_errno, const char *err_msg, const char* sqlstate);
@ -4877,7 +4877,7 @@ bool Protocol_local::send_out_parameters(List<Item_param> *sp_params)
bool
Protocol_local::send_ok(uint server_status, uint statement_warn_count,
ulonglong affected_rows, ulonglong last_insert_id,
const char *message)
const char *message, bool skip_flush)
{
/*
Just make sure nothing is sent to the client, we have grabbed

View file

@ -1038,10 +1038,10 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%parse-param { THD *thd }
%lex-param { THD *thd }
/*
Currently there are 123 shift/reduce conflicts.
Currently there are 102 shift/reduce conflicts.
We should not introduce new conflicts any more.
*/
%expect 123
%expect 102
/*
Comments for TOKENS.
@ -1784,8 +1784,8 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
udf_type opt_local opt_no_write_to_binlog
opt_temporary all_or_any opt_distinct
opt_ignore_leaves fulltext_options union_option
opt_not opt_union_order_or_limit
union_opt select_derived_init transaction_access_mode_types
opt_not
select_derived_init transaction_access_mode_types
opt_natural_language_mode opt_query_expansion
opt_ev_status opt_ev_on_completion ev_on_completion opt_ev_comment
ev_alter_on_schedule_completion opt_ev_rename_to opt_ev_sql_stmt
@ -1794,7 +1794,6 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
opt_default_time_precision
case_stmt_body opt_bin_mod
opt_if_exists_table_element opt_if_not_exists_table_element
opt_into opt_procedure_clause
opt_recursive
%type <object_ddl_options>
@ -1881,9 +1880,10 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%type <table_list>
join_table_list join_table
table_factor table_ref esc_table_ref
table_primary_ident table_primary_derived
select_derived derived_table_list
select_derived_union
derived_query_specification
%type <date_time_type> date_time_type;
%type <interval> interval
@ -1921,8 +1921,12 @@ bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize);
%type <variable> internal_variable_name
%type <select_lex> subselect
get_select_lex query_specification
get_select_lex get_select_lex_derived
query_specification
query_term_union_not_ready
query_term_union_ready
query_expression_body
select_paren_derived
%type <boolfunc2creator> comp_op
@ -4943,7 +4947,8 @@ create_body:
conflict that prevents the rule above from parsing a syntax like
CREATE TABLE t1 (SELECT 1);
*/
| '(' create_select ')' { Select->set_braces(1);} union_opt {}
| '(' create_select_query_specification ')'
{ Select->set_braces(1);} union_opt {}
| create_like
{
@ -4964,12 +4969,18 @@ create_like:
opt_create_select:
/* empty */ {}
| opt_duplicate opt_as create_select
| opt_duplicate opt_as create_select_query_expression_body
;
create_select_query_expression_body:
SELECT_SYM create_select_part2 opt_table_expression
create_select_part4
{ Select->set_braces(0);}
union_clause {}
| opt_duplicate opt_as '(' create_select ')'
{ Select->set_braces(1);}
union_opt {}
union_clause
| SELECT_SYM create_select_part2 create_select_part3_union_not_ready
create_select_part4
| '(' create_select_query_specification ')'
{ Select->set_braces(1);} union_opt {}
;
opt_create_partitioning:
@ -5678,8 +5689,11 @@ opt_part_option:
End of partition parser part
*/
create_select:
SELECT_SYM
create_select_query_specification:
SELECT_SYM create_select_part2 create_select_part3 create_select_part4
;
create_select_part2:
{
LEX *lex=Lex;
if (lex->sql_command == SQLCOM_INSERT)
@ -5698,18 +5712,19 @@ create_select:
{
Select->parsing_place= NO_MATTER;
}
/*
TODO:
The following sequence repeats a few times:
opt_table_expression
opt_order_clause
opt_limit_clause
opt_select_lock_type
Perhaps they can be grouped into a dedicated rule.
*/
;
create_select_part3:
opt_table_expression
opt_order_clause
opt_limit_clause
| create_select_part3_union_not_ready
;
create_select_part3_union_not_ready:
table_expression order_or_limit
| order_or_limit
;
create_select_part4:
opt_select_lock_type
{
/*
@ -8522,12 +8537,16 @@ select:
}
;
/* Need select_init2 for subselects. */
select_init:
SELECT_SYM select_init2
SELECT_SYM select_options_and_item_list select_init3
| '(' select_paren ')' union_opt
;
union_list_part2:
SELECT_SYM select_options_and_item_list select_init3_union_query_term
| '(' select_paren_union_query_term ')' union_opt
;
select_paren:
{
/*
@ -8536,7 +8555,8 @@ select_paren:
*/
Lex->current_select->set_braces(true);
}
SELECT_SYM select_part2
SELECT_SYM select_options_and_item_list select_part3
opt_select_lock_type
{
if (setup_select_in_parentheses(Lex))
MYSQL_YYABORT;
@ -8544,6 +8564,40 @@ select_paren:
| '(' select_paren ')'
;
select_paren_union_query_term:
{
/*
In order to correctly parse UNION's global ORDER BY we need to
set braces before parsing the clause.
*/
Lex->current_select->set_braces(true);
}
SELECT_SYM select_options_and_item_list select_part3_union_query_term
opt_select_lock_type
{
if (setup_select_in_parentheses(Lex))
MYSQL_YYABORT;
}
| '(' select_paren_union_query_term ')'
;
select_paren_view:
{
/*
In order to correctly parse UNION's global ORDER BY we need to
set braces before parsing the clause.
*/
Lex->current_select->set_braces(true);
}
SELECT_SYM select_options_and_item_list select_part3_view
opt_select_lock_type
{
if (setup_select_in_parentheses(Lex))
MYSQL_YYABORT;
}
| '(' select_paren_view ')'
;
/* The equivalent of select_paren for nested queries. */
select_paren_derived:
{
@ -8557,53 +8611,97 @@ select_paren_derived:
{
if (setup_select_in_parentheses(Lex))
MYSQL_YYABORT;
$$= Lex->current_select->master_unit()->first_select();
}
| '(' select_paren_derived ')'
| '(' select_paren_derived ')' { $$= $2; }
;
select_init2:
select_part2
select_init3:
opt_table_expression
opt_select_lock_type
{
LEX *lex= Lex;
/* Parentheses carry no meaning here */
lex->current_select->set_braces(false);
Lex->current_select->set_braces(false);
}
union_clause
| select_part3_union_not_ready
opt_select_lock_type
{
/* Parentheses carry no meaning here */
Lex->current_select->set_braces(false);
}
;
select_init3_union_query_term:
opt_table_expression
opt_select_lock_type
{
/* Parentheses carry no meaning here */
Lex->current_select->set_braces(false);
}
union_clause
| select_part3_union_not_ready_noproc
opt_select_lock_type
{
/* Parentheses carry no meaning here */
Lex->current_select->set_braces(false);
}
;
select_init3_view:
opt_table_expression opt_select_lock_type
{
Lex->current_select->set_braces(false);
}
| opt_table_expression opt_select_lock_type
{
Lex->current_select->set_braces(false);
}
union_list_view
| order_or_limit opt_select_lock_type
{
Lex->current_select->set_braces(false);
}
| table_expression order_or_limit opt_select_lock_type
{
Lex->current_select->set_braces(false);
}
;
/*
Theoretically we can merge all 3 right hand sides of the select_part2
rule into one, however such a transformation adds one shift/reduce
conflict more.
The SELECT parts after select_item_list that cannot be followed by UNION.
*/
select_part2:
select_options_and_item_list
opt_order_clause
opt_limit_clause
opt_select_lock_type
| select_options_and_item_list into opt_select_lock_type
| select_options_and_item_list
opt_into
table_expression
opt_order_clause
opt_limit_clause
opt_procedure_clause
opt_into
opt_select_lock_type
{
if ($2 && $7)
{
/* double "INTO" clause */
my_error(ER_WRONG_USAGE, MYF(0), "INTO", "INTO");
MYSQL_YYABORT;
}
if ($6 && ($2 || $7))
{
/* "INTO" with "PROCEDURE ANALYSE" */
my_error(ER_WRONG_USAGE, MYF(0), "PROCEDURE", "INTO");
MYSQL_YYABORT;
}
}
select_part3:
opt_table_expression
| select_part3_union_not_ready
;
select_part3_union_query_term:
opt_table_expression
| select_part3_union_not_ready_noproc
;
select_part3_view:
opt_table_expression
| order_or_limit
| table_expression order_or_limit
;
select_part3_union_not_ready:
select_part3_union_not_ready_noproc
| table_expression procedure_clause
| table_expression order_or_limit procedure_clause
;
select_part3_union_not_ready_noproc:
order_or_limit
| into opt_table_expression opt_order_clause opt_limit_clause
| table_expression into
| table_expression order_or_limit
| table_expression order_or_limit into
;
select_options_and_item_list:
@ -10780,7 +10878,7 @@ when_list:
/* Equivalent to <table reference> in the SQL:2003 standard. */
/* Warning - may return NULL in case of incomplete SELECT */
table_ref:
table_factor { $$=$1; }
table_factor { $$= $1; }
| join_table
{
LEX *lex= Lex;
@ -10981,6 +11079,11 @@ use_partition:
*/
/* Warning - may return NULL in case of incomplete SELECT */
table_factor:
table_primary_ident
| table_primary_derived
;
table_primary_ident:
{
SELECT_LEX *sel= Select;
sel->table_join_options= 0;
@ -10996,56 +11099,41 @@ table_factor:
MYSQL_YYABORT;
Select->add_joined_table($$);
}
| select_derived_init get_select_lex select_derived2
;
/*
Represents a flattening of the following rules from the SQL:2003
standard. This sub-rule corresponds to the sub-rule
<table primary> ::= ... | <derived table> [ AS ] <correlation name>
<derived table> ::= <table subquery>
<table subquery> ::= <subquery>
<subquery> ::= <left paren> <query expression> <right paren>
<query expression> ::= [ <with clause> ] <query expression body>
For the time being we use the non-standard rule
select_derived_union which is a compromise between the standard
and our parser. Possibly this rule could be replaced by our
query_expression_body.
*/
table_primary_derived:
'(' get_select_lex select_derived_union ')' opt_table_alias
{
LEX *lex= Lex;
SELECT_LEX *sel= lex->current_select;
if ($1)
{
if (sel->set_braces(1))
{
my_parse_error(thd, ER_SYNTAX_ERROR);
MYSQL_YYABORT;
}
}
if ($2->init_nested_join(lex->thd))
MYSQL_YYABORT;
$$= 0;
/* incomplete derived tables return NULL, we must be
nested in select_derived rule to be here. */
}
/*
Represents a flattening of the following rules from the SQL:2003
standard. This sub-rule corresponds to the sub-rule
<table primary> ::= ... | <derived table> [ AS ] <correlation name>
The following rules have been flattened into query_expression_body
(since we have no <with clause>).
<derived table> ::= <table subquery>
<table subquery> ::= <subquery>
<subquery> ::= <left paren> <query expression> <right paren>
<query expression> ::= [ <with clause> ] <query expression body>
For the time being we use the non-standard rule
select_derived_union which is a compromise between the standard
and our parser. Possibly this rule could be replaced by our
query_expression_body.
*/
| '('opt_with_clause get_select_lex select_derived_union ')' opt_table_alias
{
/* Use $3 instead of Lex->current_select as derived table will
/* Use $2 instead of Lex->current_select as derived table will
alter value of Lex->current_select. */
if (!($4 || $6) && $3->embedding &&
!$3->embedding->nested_join->join_list.elements)
if (!($3 || $5) && $2->embedding &&
!$2->embedding->nested_join->join_list.elements)
{
/* we have a derived table ($4 == NULL) but no alias,
/* we have a derived table ($3 == NULL) but no alias,
Since we are nested in further parentheses so we
can pass NULL to the outer level parentheses
Permits parsing of "((((select ...))) as xyz)" */
$$= 0;
}
else if (!$4)
else if (!$3)
{
/* Handle case of derived table, alias may be NULL if there
are no outer parentheses, add_table_to_list() will throw
@ -11053,13 +11141,12 @@ table_factor:
LEX *lex=Lex;
SELECT_LEX *sel= lex->current_select;
SELECT_LEX_UNIT *unit= sel->master_unit();
unit->set_with_clause($2);
lex->current_select= sel= unit->outer_select();
Table_ident *ti= new (thd->mem_root) Table_ident(unit);
if (ti == NULL)
MYSQL_YYABORT;
if (!($$= sel->add_table_to_list(lex->thd,
ti, $6, 0,
ti, $5, 0,
TL_READ, MDL_SHARED_READ)))
MYSQL_YYABORT;
@ -11067,11 +11154,11 @@ table_factor:
lex->pop_context();
lex->nest_level--;
}
/*else if (($4->select_lex &&
$4->select_lex->master_unit()->is_union() &&
($4->select_lex->master_unit()->first_select() ==
$4->select_lex || !$4->lifted)) || $6)*/
else if ($6 != NULL)
/*else if (($3->select_lex &&
$3->select_lex->master_unit()->is_union() &&
($3->select_lex->master_unit()->first_select() ==
$3->select_lex || !$3->lifted)) || $5)*/
else if ($5 != NULL)
{
/*
Tables with or without joins within parentheses cannot
@ -11084,7 +11171,7 @@ table_factor:
{
/* nested join: FROM (t1 JOIN t2 ...),
nest_level is the same as in the outer query */
$$= $4;
$$= $3;
}
/*
Fields in derived table can be used in upper select in
@ -11096,6 +11183,25 @@ table_factor:
!$$->derived->first_select()->next_select())
$$->select_lex->add_where_field($$->derived->first_select());
}
/* Represents derived table with WITH clause */
| '(' get_select_lex subselect_start
with_clause query_expression_body
subselect_end ')' opt_table_alias
{
LEX *lex=Lex;
SELECT_LEX *sel= $2;
SELECT_LEX_UNIT *unit= $5->master_unit();
Table_ident *ti= new (thd->mem_root) Table_ident(unit);
if (ti == NULL)
MYSQL_YYABORT;
$5->set_with_clause($4);
lex->current_select= sel;
if (!($$= sel->add_table_to_list(lex->thd,
ti, $8, 0,
TL_READ, MDL_SHARED_READ)))
MYSQL_YYABORT;
sel->add_joined_table($$);
}
;
/*
@ -11118,36 +11224,39 @@ table_factor:
subqueries have their own union rules.
*/
select_derived_union:
select_derived opt_union_order_or_limit
select_derived
| select_derived union_order_or_limit
{
if ($1 && $2)
if ($1)
{
my_parse_error(thd, ER_SYNTAX_ERROR);
MYSQL_YYABORT;
}
}
| select_derived_union
UNION_SYM
union_option
| select_derived union_head_non_top
{
if (add_select_to_union_list(Lex, (bool)$3, FALSE))
if ($1)
{
my_parse_error(thd, ER_SYNTAX_ERROR);
MYSQL_YYABORT;
}
}
query_specification
{
/*
Remove from the name resolution context stack the context of the
last select in the union.
*/
Lex->pop_context();
union_list_derived_part2
| derived_query_specification opt_select_lock_type
| derived_query_specification order_or_limit opt_select_lock_type
| derived_query_specification opt_select_lock_type union_list_derived
;
union_list_derived_part2:
query_term_union_not_ready { Lex->pop_context(); }
| query_term_union_ready { Lex->pop_context(); }
| query_term_union_ready { Lex->pop_context(); } union_list_derived
;
union_list_derived:
union_head_non_top union_list_derived_part2
;
if ($1 != NULL)
{
my_parse_error(thd, ER_SYNTAX_ERROR);
MYSQL_YYABORT;
}
}
;
/* The equivalent of select_init2 for nested queries. */
select_init2_derived:
@ -11179,21 +11288,15 @@ select_part2_derived:
/* handle contents of parentheses in join expression */
select_derived:
get_select_lex
get_select_lex_derived derived_table_list
{
LEX *lex= Lex;
if ($1->init_nested_join(lex->thd))
MYSQL_YYABORT;
}
derived_table_list
{
LEX *lex= Lex;
/* for normal joins, $3 != NULL and end_nested_join() != NULL,
/* for normal joins, $2 != NULL and end_nested_join() != NULL,
for derived tables, both must equal NULL */
if (!($$= $1->end_nested_join(lex->thd)) && $3)
if (!($$= $1->end_nested_join(lex->thd)) && $2)
MYSQL_YYABORT;
if (!$3 && $$)
if (!$2 && $$)
{
my_parse_error(thd, ER_SYNTAX_ERROR);
MYSQL_YYABORT;
@ -11201,6 +11304,28 @@ select_derived:
}
;
/*
Similar to query_specification, but for derived tables.
Example: the inner parenthesized SELECT in this query:
SELECT * FROM (SELECT * FROM t1);
*/
derived_query_specification:
SELECT_SYM select_derived_init select_derived2
{
LEX *lex= Lex;
SELECT_LEX *sel= lex->current_select;
if ($2)
{
if (sel->set_braces(1))
{
my_parse_error(thd, ER_SYNTAX_ERROR);
MYSQL_YYABORT;
}
}
$$= NULL;
}
;
select_derived2:
{
LEX *lex= Lex;
@ -11223,35 +11348,31 @@ select_derived2:
Select->parsing_place= NO_MATTER;
}
opt_table_expression
opt_order_clause
opt_limit_clause
opt_select_lock_type
;
get_select_lex:
/* Empty */ { $$= Select; }
;
select_derived_init:
SELECT_SYM
get_select_lex_derived:
get_select_lex
{
LEX *lex= Lex;
if ($1->init_nested_join(lex->thd))
MYSQL_YYABORT;
}
;
select_derived_init:
{
LEX *lex= Lex;
if (! lex->parsing_options.allows_derived)
{
my_error(ER_VIEW_SELECT_DERIVED, MYF(0));
MYSQL_YYABORT;
}
SELECT_LEX *sel= lex->current_select;
TABLE_LIST *embedding;
if (!sel->embedding || sel->end_nested_join(lex->thd))
{
/* we are not in parentheses */
my_parse_error(thd, ER_SYNTAX_ERROR);
MYSQL_YYABORT;
}
embedding= Select->embedding;
TABLE_LIST *embedding= lex->current_select->embedding;
$$= embedding &&
!embedding->nested_join->join_list.elements;
/* return true if we are deeply nested */
@ -11949,24 +12070,12 @@ choice:
| DEFAULT { $$= HA_CHOICE_UNDEF; }
;
opt_procedure_clause:
/* empty */ { $$= false; }
| PROCEDURE_SYM ident /* Procedure name */
procedure_clause:
PROCEDURE_SYM ident /* Procedure name */
{
LEX *lex=Lex;
if (! lex->parsing_options.allows_select_procedure)
{
my_error(ER_VIEW_SELECT_CLAUSE, MYF(0), "PROCEDURE");
MYSQL_YYABORT;
}
if (&lex->select_lex != lex->current_select)
{
// SELECT * FROM t1 UNION SELECT * FROM t2 PROCEDURE ANALYSE();
my_error(ER_WRONG_USAGE, MYF(0), "PROCEDURE", "subquery");
MYSQL_YYABORT;
}
DBUG_ASSERT(&lex->select_lex == lex->current_select);
lex->proc_list.elements=0;
lex->proc_list.first=0;
@ -11992,7 +12101,6 @@ opt_procedure_clause:
{
/* Subqueries are allowed from now.*/
Lex->expr_allows_subselect= true;
$$= true;
}
;
@ -12072,21 +12180,8 @@ select_outvar:
}
;
opt_into:
/* empty */ { $$= false; }
| into { $$= true; }
;
into:
INTO
{
if (! Lex->parsing_options.allows_select_into)
{
my_error(ER_VIEW_SELECT_CLAUSE, MYF(0), "INTO");
MYSQL_YYABORT;
}
}
into_destination
INTO into_destination
;
into_destination:
@ -12455,12 +12550,7 @@ fields:
insert_values:
VALUES values_list {}
| VALUE_SYM values_list {}
| create_select
{ Select->set_braces(0);}
union_clause {}
| '(' create_select ')'
{ Select->set_braces(1);}
union_opt {}
| create_select_query_expression_body {}
;
values_list:
@ -14042,7 +14132,6 @@ opt_with_clause:
| with_clause
{
$$= $1;
Lex->derived_tables|= DERIVED_WITH;
}
;
@ -14054,6 +14143,7 @@ with_clause:
new With_clause($2, Lex->curr_with_clause);
if (with_clause == NULL)
MYSQL_YYABORT;
Lex->derived_tables|= DERIVED_WITH;
Lex->curr_with_clause= with_clause;
with_clause->add_to_list(Lex->with_clauses_list_last_next);
}
@ -16330,7 +16420,7 @@ union_list:
if (add_select_to_union_list(Lex, (bool)$2, TRUE))
MYSQL_YYABORT;
}
select_init
union_list_part2
{
/*
Remove from the name resolution context stack the context of the
@ -16340,15 +16430,23 @@ union_list:
}
;
union_opt:
opt_union_order_or_limit
| union_list { $$= 1; }
union_list_view:
UNION_SYM union_option
{
if (add_select_to_union_list(Lex, (bool)$2, TRUE))
MYSQL_YYABORT;
}
query_expression_body_view
{
Lex->pop_context();
}
;
opt_union_order_or_limit:
/* Empty */ { $$= 0; }
| union_order_or_limit { $$= 1; }
;
union_opt:
/* Empty */
| union_order_or_limit
| union_list
;
union_order_or_limit:
{
@ -16376,48 +16474,60 @@ order_or_limit:
| limit_clause
;
/*
Start a UNION, for non-top level query expressions.
*/
union_head_non_top:
UNION_SYM union_option
{
if (add_select_to_union_list(Lex, (bool)$2, FALSE))
MYSQL_YYABORT;
}
;
union_option:
/* empty */ { $$=1; }
| DISTINCT { $$=1; }
| ALL { $$=0; }
;
/*
Corresponds to the SQL Standard
<query specification> ::=
SELECT [ <set quantifier> ] <select list> <table expression>
Notes:
- We allow more options in addition to <set quantifier>
- <table expression> is optional in MariaDB
*/
query_specification:
SELECT_SYM select_init2_derived
opt_table_expression
opt_order_clause
opt_limit_clause
opt_select_lock_type
{
$$= Lex->current_select->master_unit()->first_select();
}
| '(' select_paren_derived ')'
opt_union_order_or_limit
SELECT_SYM select_init2_derived opt_table_expression
{
$$= Lex->current_select->master_unit()->first_select();
}
;
query_term_union_not_ready:
query_specification order_or_limit opt_select_lock_type { $$= $1; }
| '(' select_paren_derived ')' union_order_or_limit { $$= $2; }
;
query_term_union_ready:
query_specification opt_select_lock_type { $$= $1; }
| '(' select_paren_derived ')' { $$= $2; }
;
query_expression_body:
query_specification
| query_expression_body
UNION_SYM union_option
{
if (add_select_to_union_list(Lex, (bool)$3, FALSE))
MYSQL_YYABORT;
}
query_specification
{
Lex->pop_context();
$$= $1;
}
query_term_union_not_ready { $$= $1; }
| query_term_union_ready { $$= $1; }
| query_term_union_ready union_list_derived { $$= $1; }
;
/* Corresponds to <query expression> in the SQL:2003 standard. */
subselect:
subselect_start opt_with_clause query_expression_body subselect_end
{
$3->set_with_clause($2);
$3->set_with_clause($2);
$$= $3;
}
;
@ -16640,12 +16750,10 @@ view_select:
{
LEX *lex= Lex;
lex->parsing_options.allows_variable= FALSE;
lex->parsing_options.allows_select_into= FALSE;
lex->parsing_options.allows_select_procedure= FALSE;
lex->parsing_options.allows_derived= FALSE;
lex->create_view_select.str= (char *) YYLIP->get_cpp_ptr();
}
opt_with_clause view_select_aux view_check_option
opt_with_clause query_expression_body_view view_check_option
{
LEX *lex= Lex;
uint len= YYLIP->get_cpp_ptr() - lex->create_view_select.str;
@ -16654,16 +16762,20 @@ view_select:
lex->create_view_select.str= (char *) create_view_select;
trim_whitespace(thd->charset(), &lex->create_view_select);
lex->parsing_options.allows_variable= TRUE;
lex->parsing_options.allows_select_into= TRUE;
lex->parsing_options.allows_select_procedure= TRUE;
lex->parsing_options.allows_derived= TRUE;
lex->current_select->set_with_clause($2);
}
;
view_select_aux:
SELECT_SYM select_init2
| '(' select_paren ')' union_opt
/*
SQL Standard <query expression body> for VIEWs.
Does not include INTO and PROCEDURE clauses.
*/
query_expression_body_view:
SELECT_SYM select_options_and_item_list select_init3_view
| '(' select_paren_view ')'
| '(' select_paren_view ')' union_order_or_limit
| '(' select_paren_view ')' union_list_view
;
view_check_option:

View file

@ -1434,6 +1434,9 @@ public:
};
#if defined(ENABLED_DEBUG_SYNC)
#include "debug_sync.h"
/**
The class for @@debug_sync session-only variable
*/
@ -1462,15 +1465,19 @@ public:
String str(buff, sizeof(buff), system_charset_info), *res;
if (!(res=var->value->val_str(&str)))
var->save_result.string_value.str= const_cast<char*>("");
var->save_result.string_value= empty_lex_str;
else
var->save_result.string_value.str= thd->strmake(res->ptr(), res->length());
{
if (!thd->make_lex_string(&var->save_result.string_value,
res->ptr(), res->length()))
return true;
}
return false;
}
bool session_update(THD *thd, set_var *var)
{
extern bool debug_sync_update(THD *thd, char *val_str);
return debug_sync_update(thd, var->save_result.string_value.str);
return debug_sync_update(thd, var->save_result.string_value.str,
var->save_result.string_value.length);
}
bool global_update(THD *thd, set_var *var)
{
@ -1488,7 +1495,6 @@ public:
}
uchar *session_value_ptr(THD *thd, const LEX_STRING *base)
{
extern uchar *debug_sync_value_ptr(THD *thd);
return debug_sync_value_ptr(thd);
}
uchar *global_value_ptr(THD *thd, const LEX_STRING *base)

View file

@ -957,7 +957,7 @@ static int run_sql_command(THD *thd, const char *query)
return -1;
}
mysql_parse(thd, thd->query(), thd->query_length(), &ps, FALSE);
mysql_parse(thd, thd->query(), thd->query_length(), &ps, FALSE, FALSE);
if (thd->is_error())
{
int const err= thd->get_stmt_da()->sql_errno();

View file

@ -561,8 +561,7 @@ static bool append_ident(String *string, const char *name, size_t length,
for (name_end= name+length; name < name_end; name+= clen)
{
uchar c= *(uchar *) name;
if (!(clen= my_mbcharlen(system_charset_info, c)))
clen= 1;
clen= my_charlen_fix(system_charset_info, name, name_end);
if (clen == 1 && c == (uchar) quote_char &&
(result= string->append(&quote_char, 1, system_charset_info)))
goto err;

View file

@ -500,8 +500,7 @@ bool append_ident(String *string, const char *name, uint length,
for (name_end= name+length; name < name_end; name+= clen)
{
uchar c= *(uchar *) name;
if (!(clen= my_mbcharlen(system_charset_info, c)))
clen= 1;
clen= my_charlen_fix(system_charset_info, name, name_end);
if (clen == 1 && c == (uchar) quote_char &&
(result= string->append(&quote_char, 1, system_charset_info)))
goto err;

View file

@ -1370,7 +1370,7 @@ int spider_db_append_name_with_quote_str(
for (name_end = name + length; name < name_end; name += length)
{
head_code = *name;
if (!(length = my_mbcharlen(system_charset_info, (uchar) head_code)))
if ((length= my_charlen(system_charset_info, name, name_end)) < 1)
{
my_message(ER_SPIDER_WRONG_CHARACTER_IN_NAME_NUM,
ER_SPIDER_WRONG_CHARACTER_IN_NAME_STR, MYF(0));

View file

@ -848,12 +848,6 @@ static uint16 big5strokexfrm(uint16 i)
}
static uint mbcharlen_big5(CHARSET_INFO *cs __attribute__((unused)), uint c)
{
return (isbig5head(c)? 2 : 1);
}
/* page 0 0xA140-0xC7FC */
static const uint16 tab_big5_uni0[]={
0x3000,0xFF0C,0x3001,0x3002,0xFF0E,0x2022,0xFF1B,0xFF1A,
@ -6731,7 +6725,6 @@ static MY_COLLATION_HANDLER my_collation_handler_big5_bin=
static MY_CHARSET_HANDLER my_charset_big5_handler=
{
NULL, /* init */
mbcharlen_big5,
my_numchars_mb,
my_charpos_mb,
my_well_formed_len_big5,

View file

@ -225,13 +225,6 @@ static int my_strcasecmp_bin(CHARSET_INFO * cs __attribute__((unused)),
}
uint my_mbcharlen_8bit(CHARSET_INFO *cs __attribute__((unused)),
uint c __attribute__((unused)))
{
return 1;
}
static int my_mb_wc_bin(CHARSET_INFO *cs __attribute__((unused)),
my_wc_t *wc,
const uchar *str,
@ -510,7 +503,6 @@ static MY_COLLATION_HANDLER my_collation_binary_handler =
static MY_CHARSET_HANDLER my_charset_handler=
{
NULL, /* init */
my_mbcharlen_8bit, /* mbcharlen */
my_numchars_8bit,
my_charpos_8bit,
my_well_formed_len_8bit,

View file

@ -191,12 +191,6 @@ static const uchar sort_order_cp932[]=
#include "ctype-mb.ic"
static uint mbcharlen_cp932(CHARSET_INFO *cs __attribute__((unused)),uint c)
{
return (iscp932head((uchar) c) ? 2 : 1);
}
#define cp932code(c,d) ((((uint) (uchar)(c)) << 8) | (uint) (uchar) (d))
@ -34687,7 +34681,6 @@ static MY_COLLATION_HANDLER my_collation_handler_cp932_bin=
static MY_CHARSET_HANDLER my_charset_handler=
{
NULL, /* init */
mbcharlen_cp932,
my_numchars_mb,
my_charpos_mb,
my_well_formed_len_cp932,

View file

@ -210,12 +210,6 @@ static const uchar sort_order_euc_kr[]=
#include "ctype-mb.ic"
static uint mbcharlen_euc_kr(CHARSET_INFO *cs __attribute__((unused)),uint c)
{
return (iseuc_kr_head(c) ? 2 : 1);
}
static MY_UNICASE_CHARACTER cA3[256]=
{
{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0},{0,0,0}, /* xx00 */
@ -9979,7 +9973,6 @@ static MY_COLLATION_HANDLER my_collation_handler_euckr_bin=
static MY_CHARSET_HANDLER my_charset_handler=
{
NULL, /* init */
mbcharlen_euc_kr,
my_numchars_mb,
my_charpos_mb,
my_well_formed_len_euckr,

View file

@ -221,12 +221,6 @@ static const uchar sort_order_eucjpms[]=
#include "strcoll.ic"
static uint mbcharlen_eucjpms(CHARSET_INFO *cs __attribute__((unused)),uint c)
{
return (iseucjpms(c)? 2: iseucjpms_ss2(c)? 2: iseucjpms_ss3(c)? 3: 1);
}
/* Case info pages for JIS-X-0208 range */
static MY_UNICASE_CHARACTER cA2[256]=
@ -67511,7 +67505,6 @@ static MY_COLLATION_HANDLER my_collation_eucjpms_bin_handler =
static MY_CHARSET_HANDLER my_charset_handler=
{
NULL, /* init */
mbcharlen_eucjpms,
my_numchars_mb,
my_charpos_mb,
my_well_formed_len_eucjpms,

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