Andrey Zhakov wrote: > Monty, > > While merging, you seem to have removed some essential code in > procedure unpack_vcol_info_from_frm in table.cc (I understand some > changes were needed because thd->stmt_arena was no longer available). > That code was intended for parse_sql processing a vcol expression to > 1) make Item objects be created in the memory allocated for the > Table object (not TABLE_SHARE) 2) ensure that created Item's are not > put on to thd->free_list (which is associated with the parsed > statement and hence cleared after the parsing?)
Ooops. Crap - you're right, of course. > The following changes in unpack_vcol_info_from_frm get the vcol > feature to work: 1) right before calling parse_sql: MEM_ROOT > **root_ptr, *old_root; Item *backup_free_list= thd->free_list; > root_ptr= (MEM_ROOT **)pthread_getspecific(THR_MALLOC); old_root= > *root_ptr; *root_ptr= &table->mem_root; thd->free_list= NULL; 2) > right before "return(false)": field->vcol_info->item_free_list= > thd->free_list; thd->free_list= backup_free_list; *root_ptr= > old_root; 3) right before "return(true)": *root_ptr= old_root; > thd->free_list= backup_free_list; > > -- In addition I notice that field types "bool", "tinyint" and > "unsigned" are no longer valid SQL types in drizzle. So test file > vcol_suported_sql_funcs_main.inc needs updating and correspondinng > tests for myisam and innodb need re-recording. > > Do you want me to incorporate all these changes in > lp:~andrey-zhakov/drizzle/drizzle-virtual-columns? If you don't mind, that would be great! Otherwise I can try to get to that perhaps sometime Friday or next week. Thanks! Monty > Regards, Andrey > > --- Tue, 7.10.08, Monty Taylor <[EMAIL PROTECTED]> wrote: From: > Monty Taylor <[EMAIL PROTECTED]> Subject: Re: [Drizzle-discuss] > Virtual columns in Drizzle TO: "Jay Pipes" <[EMAIL PROTECTED]> CC: > [EMAIL PROTECTED], [email protected] Date: > Tuesday, 7 October 2008, 8:53 > > Hi, > > I tried merging this in tonight. It's was reasonably clean, and I was > able to get it to build. The test suite didn't quite run though. > > I didn't do the world's best merge though, it was intended to be a > first pass. However, if you want to take a look at > lp:~mordred/drizzle/vcol and tell me what I'm doing wrong... > > Monty > > Jay Pipes wrote: >> First of all, welcome to the Drizzle community, Andrey! Thanks >> very much for your contribution! I'll take a closer look at the >> code in > the >> next few days. My first request would be to discuss whether the >> contribution can be made into a plugin instead of a patchset to the >> core server. I think that the functionality is great, and this >> might be a great first "real" pluggable functionality to test our >> plugin infrastructure. >> >> Just some initial thoughts. I'll have some more after reading the > code. >> Cheers! >> >> jay >> >> Andrey Zhakov wrote: >>> Hi, >>> >>> I've ported to Drizzle my contribution for MySQL to support > virtual columns.. >>> Drizzle source code: > https://code.launchpad.net/~andrey-zhakov/drizzle/drizzle-virtual-columns. > >>> As of now, documentation is only available for MySQL. - Preview: >>> http://forge.mysql.com/wiki/MySQL_virtual_columns_preview. - >>> Reference manual: > http://forge.mysql.com/wiki/MySQL_virtual_columns_ref_manual. >>> If you are interested in this feature I would be glad to answer >>> to > your questions. >>> Regards, Andrey >>> >>> >>> >>> ________________________________________________________ Вы уже с >>> Yahoo!? Испытайте обновленную и улучшенную. > Yahoo! Почту! http://ru.mail.yahoo.com >>> >>> >>> > ------------------------------------------------------------------------ > >>> _______________________________________________ Mailing list: >>> https://launchpad.net/~drizzle-discuss Post to : >>> [email protected] Unsubscribe : >>> https://launchpad.net/~drizzle-discuss More help : >>> https://help.launchpad.net/ListHelp >> _______________________________________________ Mailing list: >> https://launchpad.net/~drizzle-discuss Post to : >> [email protected] Unsubscribe : >> https://launchpad.net/~drizzle-discuss More help : >> https://help.launchpad.net/ListHelp >> > > > > > ________________________________________________________ Вы уже с > Yahoo!? Испытайте обновленную и улучшенную. Yahoo! Почту! > http://ru.mail.yahoo.com > > _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

