maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #01986
Re: Added create options for table fields and keys (MWL#43).
Michael Widenius wrote:
[skip]
>> + DBUG_ENTER("create_table_list_merge");
>> +
>> + for(; changes; changes= changes->next)
>> + {
>> + if (create_option_add(&source, root, &changes->key, &changes->val,
>> + (chng ? NULL : &chng)))
>>
>
> Instead of test, send &chng to function and do:
> (*changed)|= chng;
>
It will make create_option_add more complicated, because it need info
was that change in this list.
[skip]
>> */
>> if (tablespace &&
>> (table->file->get_tablespace_name(thd, tablespace, FN_LEN)))
>> @@ -6089,6 +6102,30 @@
>> }
>> restore_record(table, s->default_values); // Empty record for DEFAULT
>>
>> + if (create_info->create_table_options_orig.table_opt)
>> + {
>> + my_bool changed= FALSE;
>> + create_info->create_table_options_orig.table_opt=
>>
>
> Can't we ensure that table->s->create_table_options always exists?
> It would remove a lot of if's in your code.
>
It is difficult because temporary tables involved.
[skip]
>> === modified file 'sql/table.h'
>> --- sql/table.h 2009-11-12 04:31:28 +0000
>> +++ sql/table.h 2009-12-01 20:45:54 +0000
>> @@ -310,6 +310,7 @@
>> #ifdef NOT_YET
>> struct st_table *open_tables; /* link to open tables */
>> #endif
>> + TABLE_OPTIONS *create_table_options; /* text options for table */
>>
>>
>
> See comment that we should consider making this a full object, not a pointer
>
We have plugins on C and I think it will be inconvenient to convert
object to something C can read.
[skip]
Follow ups
References