Commit 28383dde authored by vasil's avatar vasil

branches/zip:

Fix a bug where the static buffer for innodb_locks.lock_table may not
have enough space.

Pointyhat to:	Marko
parent 84979e43
...@@ -532,9 +532,14 @@ fill_innodb_locks_from_cache( ...@@ -532,9 +532,14 @@ fill_innodb_locks_from_cache(
for (i = 0; i < rows_num; i++) { for (i = 0; i < rows_num; i++) {
i_s_locks_row_t* row; i_s_locks_row_t* row;
/* 2 * NAME_LEN for database and table name,
and some slack for the #mysql50# prefix and quotes */ /* in the worst case name contains only quotes and thus
char buf[3 * NAME_LEN]; the result is two times longer:
2 * NAME_LEN for database name
2 * NAME_LEN for table name
1 for the separating dot (.)
9 for the #mysql50# prefix */
char buf[4 * NAME_LEN + 1 + 9];
const char* bufend; const char* bufend;
row = (i_s_locks_row_t*) row = (i_s_locks_row_t*)
......
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