From: Lars-Erik Bjørk Date: April 28 2009 7:36am Subject: Re: Is MYSQLD.1 a valid schema name in Falcon? List-Archive: http://lists.mysql.com/falcon/699 Message-Id: <49F6B1EA.9010805@sun.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 Content-Transfer-Encoding: 7BIT Hi Olav! Just a side question ... Are schema names supposed to be case sensitive? Will adding quotes as you do change the behavior regarding this? /Lars-Erik Olav Sandstaa wrote: > 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 >