mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-29890 Update with inner join false row count result
when creating a temp table field from an actual table field, these two fields are supposed to be mostly identical (except for BIT field storage), in particular, temp field should have the same default as the orig field, even if the sql_mode has been changed meanwhile (e.g. to include NO_ZERO_DATE)
This commit is contained in:
@ -19035,8 +19035,10 @@ create_tmp_table(THD *thd, TMP_TABLE_PARAM *param, List<Item> &fields,
|
||||
{
|
||||
/*
|
||||
Copy default value. We have to use field_conv() for copy, instead of
|
||||
memcpy(), because bit_fields may be stored differently
|
||||
memcpy(), because bit_fields may be stored differently.
|
||||
But otherwise we copy as is, in particular, ignore NO_ZERO_DATE, etc
|
||||
*/
|
||||
Use_relaxed_field_copy urfc(thd);
|
||||
my_ptrdiff_t ptr_diff= (orig_field->table->s->default_values -
|
||||
orig_field->table->record[0]);
|
||||
field->set_notnull();
|
||||
|
Reference in New Issue
Block a user