What does the SQL standard say? I don't really mind one way or another but I prefer consistency between different types of identifiers. Database, table, and column identifiers should be the same. It's really annoying to work on a mysql instance there table names are case sensitive but column names are not. For example:
mysql> create table t (t int); Query OK, 0 rows affected (0.01 sec) mysql> insert into t set t=10; Query OK, 1 row affected (0.01 sec) mysql> select * from t as foo inner join t as bar using (t); +------+ | t | +------+ | 10 | +------+ 1 row in set (0.00 sec) mysql> select * from t as foo inner join T as bar using (t); ERROR 1146 (42S02): Table 'test.T' doesn't exist mysql> select * from t as foo inner join t as bar using (T); +------+ | t | +------+ | 10 | +------+ On Sat, Apr 25, 2009 at 3:59 PM, Monty Taylor <[email protected]> wrote: > Jay Pipes wrote: >> Hi all, >> >> I refactored out List<String>* from the parser for the field names in >> the USING clause in favor of a std::list<std::string>. > > Irrelevant to the question you are asking- but perhaps a std::list<const > std::string> instead? > >> After the >> refactoring, I'm failing this test snippet: >> >> create table t1 (a int,b int); >> create table t2 (a int,b int); >> insert into t1 values (1,10),(2,20),(3,30); >> insert into t2 values (1,10); >> select * from t1 inner join t2 using (A); >> >> It works fine for MySQL, but not for Drizzle after this changed as, >> funnily enough "a" != "A". >> >> MySQL: >> >> mysql> create table t1 (a int,b int); >> Query OK, 0 rows affected (0.02 sec) >> >> mysql> create table t2 (a int,b int); >> Query OK, 0 rows affected (0.00 sec) >> >> mysql> insert into t1 values (1,10),(2,20),(3,30); >> Query OK, 3 rows affected (0.00 sec) >> Records: 3 Duplicates: 0 Warnings: 0 >> >> mysql> insert into t2 values (1,10); >> Query OK, 1 row affected (0.00 sec) >> >> mysql> select * from t1 inner join t2 using (A); >> +------+------+------+ >> | a | b | b | >> +------+------+------+ >> | 1 | 10 | 10 | >> +------+------+------+ >> 1 row in set (0.01 sec) >> >> Drizzle after change: >> >> drizzle> create table t1 (a int,b int); >> Query OK, 0 rows affected (0 sec) >> >> drizzle> create table t2 (a int,b int); >> Query OK, 0 rows affected (0.01 sec) >> >> drizzle> insert into t1 values (1,10),(2,20),(3,30); >> Query OK, 3 rows affected (0.01 sec) >> Records: 3 Duplicates: 0 Warnings: 0 >> >> drizzle> insert into t2 values (1,10); >> Query OK, 1 row affected (0 sec) >> >> drizzle> select * from t1 inner join t2 using (A); >> ERROR 1054 (42S22): Unknown column 'A' in 'from clause' >> >> Personally, I believe the new Drizzle behaviour should be the correct >> one, no? > > I am a fan of the Drizzle behavior - but I think there are people > somewhere who argue for case insensitivity in identifier names. They are > wrong, of course, since they disagree with me, but they do exist. :) > >> Am I forgetting some MySQL compatibility mode around lower case field >> names or something? >> >> Opinions? Thanks. > > Keep it and document it. > _______________________________________________ > 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 > -- Eric Bergen [email protected] http://www.ebergen.net _______________________________________________ Mailing list: https://launchpad.net/~drizzle-discuss Post to : [email protected] Unsubscribe : https://launchpad.net/~drizzle-discuss More help : https://help.launchpad.net/ListHelp

