Commit e0139d23 authored by cmiller@zippy.cornsilk.net's avatar cmiller@zippy.cornsilk.net

Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint

into  zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
parents 2073c488 869da2dd
...@@ -18,7 +18,11 @@ insert into t1 values(null, "f"); ...@@ -18,7 +18,11 @@ insert into t1 values(null, "f");
/*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/; DELIMITER /*!*/;
# at {pos}
#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Start: binlog v 4, server v 5.1.18-beta-debug-log created {yymmdd} {HH:MM:SS} at startup
ROLLBACK/*!*/; ROLLBACK/*!*/;
# at {pos}
#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Query thread_id={integer} exec_time={integer} error_code=0
use test/*!*/; use test/*!*/;
SET TIMESTAMP=1579609942/*!*/; SET TIMESTAMP=1579609942/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
...@@ -26,21 +30,43 @@ SET @@session.sql_mode=0/*!*/; ...@@ -26,21 +30,43 @@ SET @@session.sql_mode=0/*!*/;
/*!\C latin1 *//*!*/; /*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/; SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
create table t1 (a int auto_increment not null primary key, b char(3))/*!*/; create table t1 (a int auto_increment not null primary key, b char(3))/*!*/;
# at {pos}
#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Intvar
SET INSERT_ID=1/*!*/; SET INSERT_ID=1/*!*/;
# at {pos}
#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Query thread_id={integer} exec_time={integer} error_code=0
SET TIMESTAMP=1579609942/*!*/; SET TIMESTAMP=1579609942/*!*/;
insert into t1 values(null, "a")/*!*/; insert into t1 values(null, "a")/*!*/;
# at {pos}
#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Intvar
SET INSERT_ID=2/*!*/; SET INSERT_ID=2/*!*/;
# at {pos}
#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Query thread_id={integer} exec_time={integer} error_code=0
SET TIMESTAMP=1579609942/*!*/; SET TIMESTAMP=1579609942/*!*/;
insert into t1 values(null, "b")/*!*/; insert into t1 values(null, "b")/*!*/;
# at {pos}
#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Intvar
SET INSERT_ID=3/*!*/; SET INSERT_ID=3/*!*/;
# at {pos}
#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Query thread_id={integer} exec_time={integer} error_code=0
SET TIMESTAMP=1579609944/*!*/; SET TIMESTAMP=1579609944/*!*/;
insert into t1 values(null, "c")/*!*/; insert into t1 values(null, "c")/*!*/;
# at {pos}
#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Intvar
SET INSERT_ID=4/*!*/; SET INSERT_ID=4/*!*/;
# at {pos}
#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Query thread_id={integer} exec_time={integer} error_code=0
SET TIMESTAMP=1579609946/*!*/; SET TIMESTAMP=1579609946/*!*/;
insert into t1 values(null, "d")/*!*/; insert into t1 values(null, "d")/*!*/;
# at {pos}
#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Intvar
SET INSERT_ID=5/*!*/; SET INSERT_ID=5/*!*/;
# at {pos}
#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Query thread_id={integer} exec_time={integer} error_code=0
SET TIMESTAMP=1579609946/*!*/; SET TIMESTAMP=1579609946/*!*/;
insert into t1 values(null, "e")/*!*/; insert into t1 values(null, "e")/*!*/;
# at {pos}
#{yymmdd} {HH:MM:SS} server id 1 end_log_pos {pos} Rotate to master-bin.000002 pos: {pos}
DELIMITER ; DELIMITER ;
# End of log file # End of log file
ROLLBACK /* added by mysqlbinlog */; ROLLBACK /* added by mysqlbinlog */;
......
...@@ -41,7 +41,8 @@ select "--- Local --" as ""; ...@@ -41,7 +41,8 @@ select "--- Local --" as "";
# be time dependent (the Start events). Better than nothing. # be time dependent (the Start events). Better than nothing.
# #
--exec $MYSQL_BINLOG --short-form $MYSQLTEST_VARDIR/log/master-bin.000001 --replace_regex /[[:<:]][0-9]{6} [0-9 ][0-9]:[0-9]{2}:[0-9]{2}[[:>:]]/{yymmdd} {HH:MM:SS}/ /=[0-9]+ /={integer} / /# at [0-9]+/# at {pos}/ /(pos:?) [0-9]+/\1 {pos}/
--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001
--disable_query_log --disable_query_log
select "--- offset --" as ""; select "--- offset --" as "";
......
...@@ -304,6 +304,7 @@ size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args) ...@@ -304,6 +304,7 @@ size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args)
uint minimum_width; /* as yet unimplemented */ uint minimum_width; /* as yet unimplemented */
uint minimum_width_sign; uint minimum_width_sign;
uint precision; /* as yet unimplemented for anything but %b */ uint precision; /* as yet unimplemented for anything but %b */
my_bool is_zero_padded;
/* /*
Store the location of the beginning of a format directive, for the Store the location of the beginning of a format directive, for the
...@@ -337,11 +338,27 @@ size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args) ...@@ -337,11 +338,27 @@ size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args)
backtrack= fmt; backtrack= fmt;
fmt++; fmt++;
is_zero_padded= FALSE;
minimum_width_sign= 1;
minimum_width= 0; minimum_width= 0;
precision= 0; precision= 0;
minimum_width_sign= 1;
/* Skip if max size is used (to be compatible with printf) */ /* Skip if max size is used (to be compatible with printf) */
while (*fmt == '-') { fmt++; minimum_width_sign= -1; }
process_flags:
switch (*fmt)
{
case '-':
minimum_width_sign= -1; fmt++; goto process_flags;
case '0':
is_zero_padded= TRUE; fmt++; goto process_flags;
case '#':
/** @todo Implement "#" conversion flag. */ fmt++; goto process_flags;
case ' ':
/** @todo Implement " " conversion flag. */ fmt++; goto process_flags;
case '+':
/** @todo Implement "+" conversion flag. */ fmt++; goto process_flags;
}
if (*fmt == '*') if (*fmt == '*')
{ {
precision= (int) va_arg(args, int); precision= (int) va_arg(args, int);
...@@ -376,7 +393,7 @@ size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args) ...@@ -376,7 +393,7 @@ size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args)
{ {
reg2 char *par = va_arg(args, char *); reg2 char *par = va_arg(args, char *);
size_t length2 = strlen(par); size_t length2 = strlen(par);
/* TODO: implement minimum width and precision */ /* TODO: implement precision */
out_length+= length2; out_length+= length2;
if (my_b_write(info, (uchar*) par, length2)) if (my_b_write(info, (uchar*) par, length2))
goto err; goto err;
...@@ -398,7 +415,21 @@ size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args) ...@@ -398,7 +415,21 @@ size_t my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args)
if (*fmt == 'd') if (*fmt == 'd')
length2= (size_t) (int10_to_str((long) iarg,buff, -10) - buff); length2= (size_t) (int10_to_str((long) iarg,buff, -10) - buff);
else else
length2= (size_t) (int10_to_str((long) (uint) iarg,buff,10)- buff);
/* minimum width padding */
if (minimum_width > length2)
{
char *buffz;
buffz= my_alloca(minimum_width - length2);
if (is_zero_padded)
memset(buffz, '0', minimum_width - length2);
else
memset(buffz, ' ', minimum_width - length2);
my_b_write(info, buffz, minimum_width - length2);
my_afree(buffz);
}
out_length+= length2; out_length+= length2;
if (my_b_write(info, (uchar*) buff, length2)) if (my_b_write(info, (uchar*) buff, length2))
goto err; goto err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment