mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Update of query cache code.
Changed some sql_alloc() -> thd->alloc() Removed a lot of compiler warnings on Linux Alpha (64 bit) Fixed some core dumps on 64 bit systems (wrong type for packet_len) Docs/manual.texi: Added base information about the query cache. include/hash.h: Export hash_replace include/myisam.h: Update of query cache code libmysql/net.c: Add casts to make things safe on 64 bit systems. myisam/mi_write.c: Update of query cache code myisammrg/myrg_extra.c: Update of query cache code mysys/hash.c: Added safety check to hash_replace sql/field.cc: Removed compiler warnings. sql/field.h: Removed compiler warnings sql/ha_myisam.cc: Fixed wrong type of packet_len sql/item.h: Remove warnings sql/log_event.cc: Cleanup sql/log_event.h: Cleanup to make code more readable sql/mf_iocache.cc: Fixed wrong type sql/mysql_priv.h: Update of query cache code sql/mysqld.cc: Update of query cache code sql/net_serv.cc: Remove compiler warnings sql/opt_range.h: Remove compiler warnings sql/sql_cache.cc: Update of query cache code sql/sql_cache.h: Update of query cache code sql/sql_class.h: Cleanup sql/sql_insert.cc: Use thd->alloc() instead of sql_alloc() sql/sql_parse.cc: Fixed compiler warnings. Changed some sql_alloc() -> thd->alloc() sql/sql_select.cc: Changed sql_alloc() -> thd_alloc() sql/sql_select.h: Faster alloc() sql/sql_show.cc: Update of query cache code sql/sql_table.cc: Faster alloc() sql/table.cc: Faster alloc()
This commit is contained in:
@ -739,9 +739,9 @@ TABLE *delayed_insert::get_local_table(THD* client_thd)
|
||||
}
|
||||
|
||||
client_thd->proc_info="allocating local table";
|
||||
copy= (TABLE*) sql_alloc(sizeof(*copy)+
|
||||
(table->fields+1)*sizeof(Field**)+
|
||||
table->reclength);
|
||||
copy= (TABLE*) client_thd->alloc(sizeof(*copy)+
|
||||
(table->fields+1)*sizeof(Field**)+
|
||||
table->reclength);
|
||||
if (!copy)
|
||||
goto error;
|
||||
*copy= *table;
|
||||
@ -759,7 +759,7 @@ TABLE *delayed_insert::get_local_table(THD* client_thd)
|
||||
found_next_number_field=table->found_next_number_field;
|
||||
for (org_field=table->field ; *org_field ; org_field++,field++)
|
||||
{
|
||||
if (!(*field= (*org_field)->new_field(copy)))
|
||||
if (!(*field= (*org_field)->new_field(&client_thd->mem_root,copy)))
|
||||
return 0;
|
||||
(*field)->move_field(adjust_ptrs); // Point at copy->record[0]
|
||||
if (*org_field == found_next_number_field)
|
||||
|
Reference in New Issue
Block a user