1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

A small simplification: perform two actions at once, register a

change, and perform it (the new Item changes registry).
This commit is contained in:
konstantin@mysql.com
2004-10-10 03:10:00 +04:00
parent e08febea0c
commit 703e396b6e
7 changed files with 31 additions and 41 deletions

View File

@ -1054,14 +1054,15 @@ public:
inline CHARSET_INFO *charset() { return variables.character_set_client; }
void update_charset();
void register_item_tree_change(Item **place, Item *old_value,
MEM_ROOT *runtime_memroot)
void change_item_tree(Item **place, Item *new_value)
{
/* TODO: check for OOM condition here */
if (!current_arena->is_conventional_execution())
nocheck_register_item_tree_change(place, old_value, runtime_memroot);
nocheck_register_item_tree_change(place, *place, &mem_root);
*place= new_value;
}
void nocheck_register_item_tree_change(Item **place, Item *old_value,
MEM_ROOT *runtime_memroot);
MEM_ROOT *runtime_memroot);
void rollback_item_tree_changes();
};