diff options
| author | Alexander Nozdrin <alexander.nozdrin@oracle.com> | 2011-09-23 20:49:23 +0400 |
|---|---|---|
| committer | Alexander Nozdrin <alexander.nozdrin@oracle.com> | 2011-09-23 20:49:23 +0400 |
| commit | bccea2cc5dc99f247687cf2bd64815f3e45268a0 (patch) | |
| tree | 877decd533ae5c971c0758aa485413202ba714f7 /sql/sql_parse.cc | |
| parent | b6bcb8146ca9fdc84a856fc747beb5ff5099ba25 (diff) | |
| parent | 41dc3049281c1718e49d80eaf0cf068def9519b5 (diff) | |
| download | mariadb-git-bccea2cc5dc99f247687cf2bd64815f3e45268a0.tar.gz | |
Manual merge from mysql-5.1-security.
Diffstat (limited to 'sql/sql_parse.cc')
| -rw-r--r-- | sql/sql_parse.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 885db292699..374f214c7ee 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -1218,6 +1218,14 @@ bool dispatch_command(enum enum_server_command command, THD *thd, case COM_REFRESH: { int not_used; + + /* + Initialize thd->lex since it's used in many base functions, such as + open_tables(). Otherwise, it remains unitialized and may cause crash + during execution of COM_REFRESH. + */ + lex_start(thd); + status_var_increment(thd->status_var.com_stat[SQLCOM_FLUSH]); ulong options= (ulong) (uchar) packet[0]; if (trans_commit_implicit(thd)) |
