Commit 759af551 authored by vasil's avatar vasil

branches/zip:

Fix the size of the static buffer for lock_table and lock_index.
I was not realizing that NAME_LEN contains the mbmaxlen multiplier and thus
a quote, when converted to 2 quotes, will take 2 bytes while there are 3
bytes reserved.

Spotted by:	Marko
Pointyhat to:	Vasil
parent 5c8a9ce2
......@@ -533,13 +533,15 @@ fill_innodb_locks_from_cache(
i_s_locks_row_t* row;
/* in the worst case name contains only quotes and thus
the result is two times longer:
2 * NAME_LEN for database name
2 * NAME_LEN for table name
/* note that the decoded database or table name is
never expected to be longer than NAME_LEN;
NAME_LEN for database name
2 for surrounding quotes around database name
NAME_LEN for table name
2 for surrounding quotes around table name
1 for the separating dot (.)
9 for the #mysql50# prefix */
char buf[4 * NAME_LEN + 1 + 9];
char buf[2 * NAME_LEN + 14];
const char* bufend;
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