Fantastic Monty,  glad to nail this one down!!

On Mar 31, 2010, at 2:52 AM, Monty Taylor wrote:

> FOUND IT
>
> Tiny bug (as usually) in TableIdentifier: getTableName was returning
> TableName by value rather than by reference. Then we were doing this:
>
>   table_list.db=         (char*) identifier.getDBName().c_str();
>   table_list.table_name= (char*) identifier.getTableName().c_str();
>
> Which worked fine for the dbname but not so much for the table name. Yay
> temporary objects!
>
> All but one Solaris tests are passing for me now -
> main.broken_table_proto_file - and Stewart says  "that test is kinda ass
> anyway." :)
>
> That's my good deed for the night. Time for sleeping.
>
> On 03/30/2010 11:21 PM, Stewart Smith wrote:
>> On Tue, 30 Mar 2010 23:01:14 -0700, Brian Aker<[email protected]>  wrote:
>>> Anything concurrent happening during this?
>>
>> Monty had ideas that amounted to this (which doesn't fix it):
>> === modified file 'drizzled/table_identifier.h'
>> --- drizzled/table_identifier.h 2010-03-26 19:56:34 +0000
>> +++ drizzled/table_identifier.h 2010-03-31 05:03:42 +0000
>> @@ -66,13 +66,13 @@
>>    void primeLower();
>>
>>  public:
>> -  TableIdentifier( const std::string&db_arg,
>> -                   const std::string&table_name_arg,
>> -                   Type tmp_arg= message::Table::STANDARD) :
>> -    type(tmp_arg),
>> -    db(db_arg),
>> -    table_name(table_name_arg)
>> +  TableIdentifier( const std::string db_arg,
>> +                   const std::string table_name_arg,
>> +                   Type tmp_arg= message::Table::STANDARD) : 
>> db(""),table_name(""),lower_db(""),lower_table_name(""),sql_path("")
>>    {
>> +       type= tmp_arg;
>> +       db.assign(db_arg.c_str());
>> +table_name.assign(table_name_arg.c_str());
>>    }
>>
>>    TableIdentifier( const std::string&schema_name_arg,
>>
>> === modified file 'drizzled/table_share.cc'
>> --- drizzled/table_share.cc     2010-03-22 15:30:40 +0000
>> +++ drizzled/table_share.cc     2010-03-31 05:08:15 +0000
>> @@ -224,8 +224,9 @@
>>      share->free_table_share();
>>      return NULL;
>>    }
>> -
>> -  TableIdentifier identifier(share->getSchemaName(), share->getTableName());
>> + string schema; schema.assign(share->getSchemaName());
>> + string table; table.assign(share->getTableName());
>> +  TableIdentifier identifier(schema,table);
>>    if (open_table_def(*session, identifier, share))
>>    {
>>      *error= share->error;
>>
>>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~drizzle-discuss
> Post to     : [email protected]
> Unsubscribe : https://launchpad.net/~drizzle-discuss
> More help   : https://help.launchpad.net/ListHelp



Confidentiality Notice: This e-mail message (including any attached or
embedded documents) is intended for the exclusive and confidential use of the
individual or entity to which this message is addressed, and unless otherwise
expressly indicated, is confidential and privileged information of Rackspace. 
Any dissemination, distribution or copying of the enclosed material is 
prohibited.
If you receive this transmission in error, please notify us immediately by 
e-mail
at [email protected], and delete the original message. 
Your cooperation is appreciated.


_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to