mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 15:50:51 +03:00 
			
		
		
		
	 ba2452f092
			
		
	
	ba2452f092
	
	
	
		
			
			mysqlbinlog prints all row-based events of a single statement as a single "BINLOG" statement containing the concatenation of those events. Big (i.e. >64k) concatenations of row-based events (e.g. Write_rows_log_event) caused mysqlbinlog's IO_CACHE to overflow to a temporary file but the IO_CACHE had not been inited with open_cached_file(), so it tried to create a temporary file in an uninitialized directory (thus failing to create, then to write; some OS errors were printed, and it finally segfaulted). After fixing this, it appeared that mysqlbinlog was printing only a piece of big concatenations of row-based events (it printed at most the size of the IO_CACHE's buffer i.e. 64k); that caused data loss at restore. We fix and test that. Last, mysqlbinlog's printouts looked a bit strange with the informative header (#-prefixed) of groupped Rows_log_event all on one line, so we insert \n. After that, a small bug in the --hexdump code appeared (only if the string to hex-print had its length a multiple of 16), we fix it.
		
			
				
	
	
		
			111 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			111 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| create table t1 (a int);
 | |
| insert into t1 values (1);
 | |
| insert into t1 values (2);
 | |
| insert into t1 values (3);
 | |
| update t1 set a=a+2 where a=2;
 | |
| update t1 set a=a+2 where a=3;
 | |
| create table t2 (word varchar(20));
 | |
| load data infile '../std_data_ln/words.dat' into table t2;
 | |
| flush logs;
 | |
| drop table t1;
 | |
| drop table t2;
 | |
| select * from t1;
 | |
| a
 | |
| 1
 | |
| 4
 | |
| 5
 | |
| select * from t2;
 | |
| word
 | |
| Aarhus
 | |
| Aaron
 | |
| Ababa
 | |
| aback
 | |
| abaft
 | |
| abandon
 | |
| abandoned
 | |
| abandoning
 | |
| abandonment
 | |
| abandons
 | |
| Aarhus
 | |
| Aaron
 | |
| Ababa
 | |
| aback
 | |
| abaft
 | |
| abandon
 | |
| abandoned
 | |
| abandoning
 | |
| abandonment
 | |
| abandons
 | |
| abase
 | |
| abased
 | |
| abasement
 | |
| abasements
 | |
| abases
 | |
| abash
 | |
| abashed
 | |
| abashes
 | |
| abashing
 | |
| abasing
 | |
| abate
 | |
| abated
 | |
| abatement
 | |
| abatements
 | |
| abater
 | |
| abates
 | |
| abating
 | |
| Abba
 | |
| abbe
 | |
| abbey
 | |
| abbeys
 | |
| abbot
 | |
| abbots
 | |
| Abbott
 | |
| abbreviate
 | |
| abbreviated
 | |
| abbreviates
 | |
| abbreviating
 | |
| abbreviation
 | |
| abbreviations
 | |
| Abby
 | |
| abdomen
 | |
| abdomens
 | |
| abdominal
 | |
| abduct
 | |
| abducted
 | |
| abduction
 | |
| abductions
 | |
| abductor
 | |
| abductors
 | |
| abducts
 | |
| Abe
 | |
| abed
 | |
| Abel
 | |
| Abelian
 | |
| Abelson
 | |
| Aberdeen
 | |
| Abernathy
 | |
| aberrant
 | |
| aberration
 | |
| flush logs;
 | |
| drop table t2;
 | |
| create table t2 (word varchar(20));
 | |
| load data infile '../std_data_ln/words.dat' into table t2;
 | |
| insert into t2 select * from t2;
 | |
| insert into t2 select * from t2;
 | |
| insert into t2 select * from t2;
 | |
| insert into t2 select * from t2;
 | |
| insert into t2 select * from t2;
 | |
| insert into t2 select * from t2;
 | |
| insert into t2 select * from t2;
 | |
| insert into t2 select * from t2;
 | |
| insert into t2 select * from t2;
 | |
| select count(*) from t2;
 | |
| count(*)
 | |
| 35840
 | |
| flush logs;
 | |
| select count(*) from t2;
 | |
| count(*)
 | |
| 35840
 | |
| drop table t1;
 | |
| drop table t2;
 |