Commit 5cd14d70 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 6edf3ef1
......@@ -532,9 +532,14 @@ fill_innodb_locks_from_cache(
for (i = 0; i < rows_num; i++) {
i_s_locks_row_t* row;
/* 2 * NAME_LEN for database and table name,
and some slack for the #mysql50# prefix and quotes */
char buf[3 * NAME_LEN];
/* 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
1 for the separating dot (.)
9 for the #mysql50# prefix */
char buf[4 * NAME_LEN + 1 + 9];
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