mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
Post-review fixes for bug #19089
This commit is contained in:
parent
4a27cbfd02
commit
a6aaca7d6a
4 changed files with 10 additions and 3 deletions
|
@ -2716,7 +2716,7 @@ SELECT * FROM t2;
|
|||
a m
|
||||
xxx 1
|
||||
yyy 5
|
||||
NULL 0
|
||||
xxx 0
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1,t2;
|
||||
CREATE TABLE t1 (id int PRIMARY KEY, e ENUM('a','b') NOT NULL DEFAULT 'b');
|
||||
|
|
|
@ -1228,12 +1228,11 @@ Field::Field(char *ptr_arg,uint32 length_arg,uchar *null_ptr_arg,
|
|||
field_name(field_name_arg),
|
||||
query_id(0), key_start(0), part_of_key(0), part_of_sortkey(0),
|
||||
unireg_check(unireg_check_arg),
|
||||
field_length(length_arg),null_bit(null_bit_arg)
|
||||
field_length(length_arg), null_bit(null_bit_arg), dflt_field(0)
|
||||
{
|
||||
flags=null_ptr ? 0: NOT_NULL_FLAG;
|
||||
comment.str= (char*) "";
|
||||
comment.length=0;
|
||||
dflt_field= 0;
|
||||
}
|
||||
|
||||
uint Field::offset()
|
||||
|
|
|
@ -53,6 +53,11 @@ public:
|
|||
|
||||
char *ptr; // Position to field in record
|
||||
uchar *null_ptr; // Byte where null_bit is
|
||||
/*
|
||||
dflt_field is used only for the fields of temporary tables.
|
||||
It points to the default value of the field in another table
|
||||
from which this field has been created.
|
||||
*/
|
||||
Field *dflt_field; // Field to copy default value from
|
||||
/*
|
||||
Note that you can use table->in_use as replacement for current_thd member
|
||||
|
|
|
@ -8697,7 +8697,10 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
|||
if (is_null)
|
||||
field->set_null();
|
||||
else
|
||||
{
|
||||
field->set_notnull();
|
||||
memcpy(field->ptr, from, field->pack_length());
|
||||
}
|
||||
}
|
||||
|
||||
if (from_field[i])
|
||||
|
|
Loading…
Reference in a new issue