← Back to team overview

drizzle-discuss team mailing list archive

Re: Solaris test failures

 

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<brian@xxxxxxxxxxx>  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;






Follow ups

References