mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
MDEV-8010 - Avoid sql_alloc() in Items (Patch #1)
Added mandatory thd parameter to Item (and all derivative classes) constructor. Added thd parameter to all routines that may create items. Also removed "current_thd" from Item::Item. This reduced number of pthread_getspecific() calls from 290 to 177 per OLTP RO transaction.
This commit is contained in:
@@ -1978,7 +1978,7 @@ loop_end:
|
||||
table to be updated was created by mysql 4.1. Deny this.
|
||||
*/
|
||||
field->can_alter_field_type= 0;
|
||||
Item_field *ifield= new Item_field((Field *) field);
|
||||
Item_field *ifield= new Item_field(join->thd, (Field *) field);
|
||||
if (!ifield)
|
||||
DBUG_RETURN(1);
|
||||
ifield->maybe_null= 0;
|
||||
|
||||
Reference in New Issue
Block a user