This is in accordance with the SQL standard. I think the reasoning is that you should be able to split long text strings onto multiple lines, so any sequence of quoted strings is concatenated into a single string literal. Notice that there must be a <separator> (ie a space or a newline) between the strings.

The latter query (SELECT without a FROM) is a MySQL extension.

Roy

Another reason for not

Brian Moon wrote:
This example says it all. The folks in #mysql-dev (ok, one guy) seemed to think this was expected. This apparently stems from another interesting query at the end of the example. I can't find this to be a standard of any kind and frankly find it to be wrong. Due to an error in my application while building the query (no , was inserted) I was getting bad data. I tried sqlite and pgsql. They either gave a different, non-error message (sqlite) or gave an error (pgsql). Wanna fix this in Drizzle?

mysql> use information_schema;
Database changed

mysql> select table_name from tables where
       table_schema in ('mysql' 'test');
Empty set (0.10 sec)

mysql> select table_name from tables where
       table_schema in ('mysql', 'test');
+---------------------------+
| table_name                |
+---------------------------+
| columns_priv              |
| db                        |
| func                      |
| help_category             |
| help_keyword              |
| help_relation             |
| help_topic                |
| host                      |
| proc                      |
| procs_priv                |
| tables_priv               |
| time_zone                 |
| time_zone_leap_second     |
| time_zone_name            |
| time_zone_transition      |
| time_zone_transition_type |
| user                      |
| user_info                 |
| comments                  |
| deal_queue                |
| users                     |
+---------------------------+
21 rows in set (0.17 sec)

mysql> select 'foo' 'bar';
+--------+
| foo    |
+--------+
| foobar |
+--------+
1 row in set (0.00 sec)



_______________________________________________
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