Hello Wlad, On 07/03/2013 01:30 PM, Vladislav Vaintroub wrote:
-----Original Message----- From: Maria-developers [mailto:maria-developers- bounces+wlad=montyprogram.com@lists.launchpad.net] On Behalf Of Alexander Barkov Sent: Mittwoch, 3. Juli 2013 10:18 To: Sergei Golubchik Cc: maria-developers@lists.launchpad.net Subject: Re: [Maria-developers] merge for MySQL56 temporal literals
+{d'2001-01-01'}, +{d'2001-01-01 10:10:10'};
This (the second value, I mean) is what, backward compatibility?
These are ODBC escape sequences.
http://msdn.microsoft.com/en-us/library/ms190234%28v=sql.90%29.aspx
IIRC, applications like MSQuery and MSAccess use this format.
Bar, in the documentation above, for ODBC escape sequences (those are used in JDBC as well), there is a space between curly brace and literal type, and space after the literal type and before ' .
Like, { d '2001-01-01 10:10:10' } has space after '{' and after 'd'.
Maybe the documented form with spaces works with your patch , as well . however there are no tests that prove it ,i.e all tests have no spaces in the literals
Yes, optional spaces between all parts of the ODBC-style syntax work fine. sql_yacc.yy sees them as four separate lexical tokens: '{' ident expr '}' so there are no problems with spaces. Thanks for noticing this. I have added tests with spaces. Greetings.
Wlad