Last-minute fix to 5.1.67,
taking a change done to main 5.1 by Dmitri Lenev. This is the original comment: > committer: Dmitry Lenev <Dmitry.Lenev@oracle.com> > branch nick: mysql-5.1-15954896 > timestamp: Wed 2012-12-05 19:26:56 +0400 > message: > Bug #15954896 "SP, MULTI-TABLE DELETE AND LONG ALIAS". Using too long table aliases in stored routines might have caused server crashes. Code in sp_head::merge_table_list() which is responsible for collecting information about tables used in stored routine was not aware of the fact that table alias might have arbitrary length. I.e. it assumed that table alias can't be longer than NAME_LEN bytes and allocated buffer for a key identifying table accordingly. This patch fixes the issue by ensuring that we use dynamically allocated buffer for table key when table alias is too long. By default stack based buffer is used in which NAME_LEN bytes are reserved for table alias.
Showing
Please register or sign in to comment