ha_innobase.cc, trx0trx.h, lock0lock.c, trx0trx.c:

  Add some more safety margin to buffer sizes in prints
parent 933417c1
...@@ -262,7 +262,7 @@ void ...@@ -262,7 +262,7 @@ void
trx_print( trx_print(
/*======*/ /*======*/
char* buf, /* in/out: buffer where to print, must be at least char* buf, /* in/out: buffer where to print, must be at least
500 bytes */ 800 bytes */
trx_t* trx); /* in: transaction */ trx_t* trx); /* in: transaction */
......
...@@ -3625,7 +3625,7 @@ lock_print_info( ...@@ -3625,7 +3625,7 @@ lock_print_info(
trx = UT_LIST_GET_FIRST(trx_sys->mysql_trx_list); trx = UT_LIST_GET_FIRST(trx_sys->mysql_trx_list);
while (trx) { while (trx) {
if (buf_end - buf < 600) { if (buf_end - buf < 900) {
return; return;
} }
...@@ -3662,7 +3662,7 @@ loop: ...@@ -3662,7 +3662,7 @@ loop:
return; return;
} }
if (buf_end - buf < 600) { if (buf_end - buf < 900) {
return; return;
} }
......
...@@ -1465,7 +1465,7 @@ void ...@@ -1465,7 +1465,7 @@ void
trx_print( trx_print(
/*======*/ /*======*/
char* buf, /* in/out: buffer where to print, must be at least char* buf, /* in/out: buffer where to print, must be at least
500 bytes */ 800 bytes */
trx_t* trx) /* in: transaction */ trx_t* trx) /* in: transaction */
{ {
char* start_of_line; char* start_of_line;
......
...@@ -260,7 +260,7 @@ void ...@@ -260,7 +260,7 @@ void
innobase_mysql_print_thd( innobase_mysql_print_thd(
/*=====================*/ /*=====================*/
char* buf, /* in/out: buffer where to print, must be at least char* buf, /* in/out: buffer where to print, must be at least
300 bytes */ 400 bytes */
void* input_thd)/* in: pointer to a MySQL THD object */ void* input_thd)/* in: pointer to a MySQL THD object */
{ {
THD* thd; THD* thd;
...@@ -338,7 +338,7 @@ innobase_mysql_print_thd( ...@@ -338,7 +338,7 @@ innobase_mysql_print_thd(
buf=strnmov(buf, thd->query, 150); buf=strnmov(buf, thd->query, 150);
} }
*buf='\n'; *buf='\n';
/* Here we should add '\0' to the nd of output to mark its end */ /* Here we should add '\0' to the end of output to mark its end */
#endif #endif
} }
} }
......
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