summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <sanja@montyprogram.com>2014-03-14 11:38:17 +0200
committerunknown <sanja@montyprogram.com>2014-03-14 11:38:17 +0200
commit5c8ed7dd5473c398f788aba3aff5c168a50df83a (patch)
tree70f1e721bce6e8035aad7cc5061f22cb1a80da19 /sql
parenta0ea960c3e7e42b4d3b5e57de7eaaa16dc6eae3a (diff)
downloadmariadb-git-5c8ed7dd5473c398f788aba3aff5c168a50df83a.tar.gz
MDEV-5446: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))' fails on EXPLAIN EXTENDED with VALUES function
field_index should be set correctly for null field created by Item_insert_value::fix_fields().
Diffstat (limited to 'sql')
-rw-r--r--sql/item.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item.cc b/sql/item.cc
index 6a8573068fc..88489a343fb 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -7897,6 +7897,8 @@ bool Item_insert_value::fix_fields(THD *thd, Item **items)
{
tmp_field->init(field_arg->field->table);
set_field(tmp_field);
+ // the index is important when read bits set
+ tmp_field->field_index= field_arg->field->field_index;
}
}
return FALSE;