diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-06-10 21:19:11 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-06-11 09:57:54 +0200 |
commit | ca733d03c82b02cd842ff2a226fee7b12eb86f8d (patch) | |
tree | ac878106b55360704058ca5d5772bd2bce7594b5 /sql/sql_handler.cc | |
parent | 6da8192174f033c2958ddafb2a15c14360bb1ecc (diff) | |
download | mariadb-git-ca733d03c82b02cd842ff2a226fee7b12eb86f8d.tar.gz |
MDEV-15729 Server crashes in Field::make_field upon HANDLER READ executed with PS protocol
update table->pos_in_table_list during prepare,
just like it's done in normal execution.
otherwise it'll be a dangling pointer
Diffstat (limited to 'sql/sql_handler.cc')
-rw-r--r-- | sql/sql_handler.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_handler.cc b/sql/sql_handler.cc index f5c79e59bf2..778507ebc38 100644 --- a/sql/sql_handler.cc +++ b/sql/sql_handler.cc @@ -980,6 +980,7 @@ SQL_HANDLER *mysql_ha_read_prepare(THD *thd, TABLE_LIST *tables, if (!(handler= mysql_ha_find_handler(thd, tables->alias))) DBUG_RETURN(0); tables->table= handler->table; // This is used by fix_fields + handler->table->pos_in_table_list= tables; if (mysql_ha_fix_cond_and_key(handler, mode, keyname, key_expr, cond, 1)) DBUG_RETURN(0); DBUG_RETURN(handler); |