diff options
author | Michael Widenius <monty@mariadb.org> | 2018-04-05 13:50:12 +0300 |
---|---|---|
committer | Michael Widenius <monty@mariadb.org> | 2018-04-05 13:55:28 +0300 |
commit | 1d7b4c268941ec1facef1b82adbff329c08c464d (patch) | |
tree | 3a266523f29a932bba389d3130405f4672c08201 /sql | |
parent | 30f692f0165ada010a70f96f49f491f5215c1ca5 (diff) | |
download | mariadb-git-1d7b4c268941ec1facef1b82adbff329c08c464d.tar.gz |
MDEV-15738 Server crashes in my_strcasecmp_utf8 on query from I_S with UNION executed as PS
Problem was the Item_field::Item_field(THD*, Field*) had old code
that put a null pointer in orig_field_names. Now, when we have
proper re-prepare if table definition changes, this is not needed
anymore.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sql/item.cc b/sql/item.cc index b32967e8944..41944d24e8c 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -3077,12 +3077,9 @@ Item_field::Item_field(THD *thd, Field *f) have_privileges(0), any_privileges(0) { set_field(f); - /* - field_name and table_name should not point to garbage - if this item is to be reused - */ - orig_table_name= ""; - orig_field_name= null_clex_str; + + orig_table_name= table_name; + orig_field_name= field_name; with_field= 1; } |