1269
Construct a copy of this object to be used for mysql_alter_table
1270
and mysql_create_table.
1272
Historically, these two functions modify their Alter_info
1273
arguments. This behaviour breaks re-execution of prepared
1274
statements and stored procedures and is compensated by always
1275
supplying a copy of Alter_info to these functions.
1277
@return You need to use check the error in Session for out
1278
of memory condition after calling this function.
1280
Alter_info::Alter_info(const Alter_info &rhs, MEM_ROOT *mem_root)
1281
:drop_list(rhs.drop_list, mem_root),
1282
alter_list(rhs.alter_list, mem_root),
1283
key_list(rhs.key_list, mem_root),
1284
create_list(rhs.create_list, mem_root),
1286
keys_onoff(rhs.keys_onoff),
1287
tablespace_op(rhs.tablespace_op),
1288
no_parts(rhs.no_parts),
1289
build_method(rhs.build_method),
1290
datetime_field(rhs.datetime_field),
1291
error_if_not_empty(rhs.error_if_not_empty)
1294
Make deep copies of used objects.
1295
This is not a fully deep copy - clone() implementations
1296
of Alter_drop, Alter_column, Key, foreign_key, Key_part_spec
1297
do not copy string constants. At the same length the only
1298
reason we make a copy currently is that ALTER/CREATE TABLE
1299
code changes input Alter_info definitions, but string
1300
constants never change.
1302
list_copy_and_replace_each_value(drop_list, mem_root);
1303
list_copy_and_replace_each_value(alter_list, mem_root);
1304
list_copy_and_replace_each_value(key_list, mem_root);
1305
list_copy_and_replace_each_value(create_list, mem_root);
1308
1268
void trim_whitespace(const CHARSET_INFO * const cs, LEX_STRING *str)