mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 02:46:29 +01:00 
			
		
		
		
	 0a5e4a0191
			
		
	
	
	0a5e4a0191
	
	
	
		
			
			Updated tests: cases with bugs or which cannot be run with the cursor-protocol were excluded with "--disable_cursor_protocol"/"--enable_cursor_protocol" Fix for v.10.5
		
			
				
	
	
		
			52 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
	
		
			1.5 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| --source include/have_debug.inc
 | |
| --source include/have_binlog_format_row.inc
 | |
| 
 | |
| --let $MYSQLD_DATADIR= `select @@datadir`
 | |
| 
 | |
| CREATE TABLE t (a TEXT);
 | |
| # events of interest are guaranteed to stay in 000001 log
 | |
| RESET MASTER;
 | |
| --eval INSERT INTO t SET a=repeat('a', 1024)
 | |
| --disable_cursor_protocol
 | |
| SELECT a into @a from t;
 | |
| --enable_cursor_protocol
 | |
| FLUSH LOGS;
 | |
| DELETE FROM t;
 | |
| 
 | |
| --exec $MYSQL_BINLOG --verbose --debug-binlog-row-event-max-encoded-size=256 $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
 | |
| 
 | |
| --let SEARCH_PATTERN= BINLOG @binlog_fragment_0, @binlog_fragment_1
 | |
| --let SEARCH_FILE= $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
 | |
| --source include/search_pattern_in_file.inc
 | |
| 
 | |
| --exec $MYSQL test < $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
 | |
| 
 | |
| SELECT a LIKE @a as 'true' FROM t;
 | |
| 
 | |
| # improper syntax error
 | |
| --echo BINLOG number-of-fragments must be exactly two
 | |
| --error ER_PARSE_ERROR
 | |
| BINLOG @binlog_fragment;
 | |
| --error ER_PARSE_ERROR
 | |
| BINLOG @binlog_fragment, @binlog_fragment, @binlog_fragment;
 | |
| 
 | |
| # corrupted fragments error check (to the expected error code notice,
 | |
| # the same error code occurs in a similar unfragmented case)
 | |
| SET @binlog_fragment_0='012345';
 | |
| SET @binlog_fragment_1='012345';
 | |
| --error ER_SYNTAX_ERROR
 | |
| BINLOG @binlog_fragment_0, @binlog_fragment_1;
 | |
| 
 | |
| # Not existing fragment is not allowed
 | |
| SET @binlog_fragment_0='012345';
 | |
| --error ER_WRONG_TYPE_FOR_VAR
 | |
| BINLOG @binlog_fragment_0, @binlog_fragment_not_exist;
 | |
| 
 | |
| # MDEV-22520
 | |
| SET @a= '42';
 | |
| --error ER_SYNTAX_ERROR
 | |
| BINLOG @a, @a;
 | |
| 
 | |
| --echo # Cleanup
 | |
| --remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
 | |
| DROP TABLE t;
 |