mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed some byte order bugs with prepared statements on machines with high-byte-first. (Bug #4173)
Fixed problem with NULL and derived tables (Bug #4097) Cleanup of new pushed code BitKeeper/etc/ignore: added mysql-test/ndb/ndbcluster client/mysqltest.c: simple cleanup innobase/os/os0file.c: fix for netware libmysql/libmysql.c: Fixed some byte order bugs with prepared statements on machines with high-byte-first. (Bug #4173) myisam/ft_boolean_search.c: Comment cleanup myisam/mi_check.c: Removed not needed check (check is done in check_index()) myisam/mi_unique.c: crc must be of type ha_checksum. myisam/myisamchk.c: Portability fix. mysql-test/mysql-test-run.sh: Simple cleanup mysql-test/r/subselect.result: Test problem with NULL and derived tables (Bug #4097) mysql-test/t/subselect.test: Test problem with NULL and derived tables (Bug #4097) sql/mysqld.cc: Remove not used defines sql/sql_select.cc: Fixed problem with NULL and derived tables (Bug #4097) Indentation fixes sql/sql_string.cc: Code cleanup sql/sql_yacc.yy: Allow one to use DROP PREPARE ...
This commit is contained in:
@ -5137,6 +5137,10 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
||||
recinfo->length=null_pack_length;
|
||||
recinfo++;
|
||||
bfill(null_flags,null_pack_length,255); // Set null fields
|
||||
|
||||
table->null_flags= (uchar*) table->record[0];
|
||||
table->null_fields= null_count+ hidden_null_count;
|
||||
table->null_bytes= null_pack_length;
|
||||
}
|
||||
null_count= (blob_count == 0) ? 1 : 0;
|
||||
hidden_field_count=param->hidden_field_count;
|
||||
@ -5200,7 +5204,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields,
|
||||
|
||||
param->copy_field_end=copy;
|
||||
param->recinfo=recinfo;
|
||||
store_record(table,default_values); // Make empty default record
|
||||
store_record(table,default_values); // Make empty default record
|
||||
|
||||
if (thd->variables.tmp_table_size == ~(ulong) 0) // No limit
|
||||
table->max_rows= ~(ha_rows) 0;
|
||||
@ -8326,10 +8330,11 @@ calc_group_buffer(JOIN *join,ORDER *group)
|
||||
join->tmp_table_param.group_null_parts=null_parts;
|
||||
}
|
||||
|
||||
/*
|
||||
alloc group fields or take prepared (chached)
|
||||
|
||||
SYNOPSYS
|
||||
/*
|
||||
allocate group fields or take prepared (cached)
|
||||
|
||||
SYNOPSIS
|
||||
make_group_fields()
|
||||
main_join - join of current select
|
||||
curr_join - current join (join of current select or temporary copy of it)
|
||||
@ -8342,22 +8347,21 @@ calc_group_buffer(JOIN *join,ORDER *group)
|
||||
static bool
|
||||
make_group_fields(JOIN *main_join, JOIN *curr_join)
|
||||
{
|
||||
if (main_join->group_fields_cache.elements)
|
||||
{
|
||||
curr_join->group_fields= main_join->group_fields_cache;
|
||||
curr_join->sort_and_group= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (alloc_group_fields(curr_join, curr_join->group_list))
|
||||
{
|
||||
return (1);
|
||||
}
|
||||
main_join->group_fields_cache= curr_join->group_fields;
|
||||
}
|
||||
return (0);
|
||||
if (main_join->group_fields_cache.elements)
|
||||
{
|
||||
curr_join->group_fields= main_join->group_fields_cache;
|
||||
curr_join->sort_and_group= 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (alloc_group_fields(curr_join, curr_join->group_list))
|
||||
return (1);
|
||||
main_join->group_fields_cache= curr_join->group_fields;
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Get a list of buffers for saveing last group
|
||||
Groups are saved in reverse order for easyer check loop
|
||||
@ -8398,7 +8402,6 @@ test_if_group_changed(List<Item_buff> &list)
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Setup copy_fields to save fields at start of new group
|
||||
|
||||
|
Reference in New Issue
Block a user