List:Falcon Storage Engine« Previous MessageNext Message »
From:Olav Sandstaa Date:April 27 2009 11:45pm
Subject:Is MYSQLD.1 a valid schema name in Falcon?
View as plain text  
Hi,

I am working on Bug #42752 "Error when creating Falcon temporary table 
with a key". This bug seems to be highlighted by the introduction of the 
new mysql-test-run framework (MTR2). Running the following statement 
against Falcon:

   CREATE TEMPORARY TABLE t1 (s1 INTEGER, KEY(s1));

fails when using the new MTR2 while succeeds when running with the old MTR.

With MTR1 the following "mySqlName" is passed into StorageInterface::create:

   /home/olav/mysql/develop/olav-2994/mysql-test/var/tmp/#sql23ff_1_0

while with MTR2 the "mySqlName" is:

  
/home/olav/mysql/develop/olav-2995/mysql-test/var/tmp/mysqld.1/#sql2d05_2_0

Using these two, Falcon uses a schemaName = TMP in the first case and 
schemaName = MYSQLD.1 in the second case.

The failure occurs when Falcon tries to create an index on this table by 
constructing the following SQL statement:

  create index "#SQL2D05_2_0$S1" on MYSQLD.1."#SQL2D05_2_0" ("S1")

This fails when Falcon is parsing the statement and gives the following 
error:

   syntax error on line 1
   create index "#SQL2D05_2_0$S1" on MYSQLD.1."#SQL2D05_2_0" ("S1")
   ^ expected name list got .1

In above SQL string everything except the schema name is "quoted". The 
quoting occurs in the following code in StorageInterface::createIndex() 
in ha_falcon.cpp:

           gen.gen("create %sindex \"%s\" on %s.\"%s\" ", unique, 
indexDesc.name, schemaName, tableName);

Anyone who knows why we have not added quotes around the schema name?

If I add quotes around the schema name in the above line the test case 
for the bug no longer fails. So that seems like a simple solution - but 
before doing so I would like to know if schema names including "."s 
should be considered valid for Falcon.

Thanks,
Olav
Thread
Is MYSQLD.1 a valid schema name in Falcon?Olav Sandstaa28 Apr
  • Re: Is MYSQLD.1 a valid schema name in Falcon?Lars-Erik Bjørk28 Apr
    • Re: Is MYSQLD.1 a valid schema name in Falcon?Kevin Lewis28 Apr
    • Re: Is MYSQLD.1 a valid schema name in Falcon?Ann W. Harrison28 Apr
    • Re: Is MYSQLD.1 a valid schema name in Falcon?Olav Sandstaa28 Apr
      • Re: Is MYSQLD.1 a valid schema name in Falcon?Hakan Kuecuekyilmaz28 Apr