CONVERT() broken in 4.1.1?

CONVERT() broken in 4.1.1?

am 17.01.2004 01:31:25 von Kevin Day

--Apple-Mail-29--644478700
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
format=flowed


This worked in 4.0:

mysql> SELECT CONVERT(NOW(), DATE);
+----------------------+
| CONVERT(NOW(), DATE) |
+----------------------+
| 2004-01-16 18:12:18 |
+----------------------+
1 row in set (0.00 sec)

And even in 4.1.0, but in 4.1.1 it returns:

mysql> SELECT CONVERT(NOW(), DATE);
ERROR 1064: You have an error in your SQL syntax. Check the manual
that corresponds to your MySQL server version for the right syntax to
use near ')' at line 1


However, replacing it with CAST() works fine:

mysql> select CAST(NOW() AS DATE);
+---------------------+
| CAST(NOW() AS DATE) |
+---------------------+
| 2004-01-17 |
+---------------------+
1 row in set (0.00 sec)


However, there is a small difference between 4.0 and 4.1 here. 4.0
returns it as a date and time, 4.1 returns it as just the date (as
would be expected?)


Sorry if this has been reported before, but I couldn't find any mention
of this anywhere.


--Apple-Mail-29--644478700
Content-Transfer-Encoding: base64
Content-Type: application/pkcs7-signature;
name=smime.p7s
Content-Disposition: attachment;
filename=smime.p7s

MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEH AQAAoIIGHjCCAtcw
ggJAoAMCAQICAwtjgDANBgkqhkiG9w0BAQQFADBiMQswCQYDVQQGEwJaQTEl MCMGA1UEChMcVGhh
d3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMjVGhhd3RlIFBl cnNvbmFsIEZyZWVt
YWlsIElzc3VpbmcgQ0EwHhcNMDMxMjI5MTgxMjQ2WhcNMDQxMjI4MTgxMjQ2 WjBHMR8wHQYDVQQD
ExZUaGF3dGUgRnJlZW1haWwgTWVtYmVyMSQwIgYJKoZIhvcNAQkBFhV0b2Fz dHlAZHJhZ29uZGF0
YS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBA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McVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkgTHRkLjEsMCoGA1UEAxMj VGhhd3RlIFBlcnNv
bmFsIEZyZWVtYWlsIElzc3VpbmcgQ0ECAwtjgDB6BgsqhkiG9w0BCRACCzFr oGkwYjELMAkGA1UE
BhMCWkExJTAjBgNVBAoTHFRoYXd0ZSBDb25zdWx0aW5nIChQdHkpIEx0ZC4x LDAqBgNVBAMTI1Ro
YXd0ZSBQZXJzb25hbCBGcmVlbWFpbCBJc3N1aW5nIENBAgMLY4AwDQYJKoZI hvcNAQEBBQAEggEA
JTsdwcF+KXboARWskQrka88MMDoOs+TD5xtbTULdhfq9picNecXJ9LKsSXUW PPwDpVobvUaCWTH/
JAAZXzkJhkRHCuyvCWcN13KsKFUN03TYV9Z+VuGOVYHSCtHbKBke3wD8f/88 Ct4pSRkARNWlHlP5
oi+1VZLPq+/Gbvodnw/JUFsOYY22zc5GLA3x/7Tf8frjeYuzv5W0RmCiQdZW fYZSBAjr7w4MNIrQ
wQmWU66jMacH66luQWMd4IJMIQSDxWskiBbu/kMstDeETZKMZhXKjHyEX06O ZuldQqxOjiI/g6LV
AjikpPSOXMWrwT2elvZJ7PSCilPK1Zc7s4pN8wAAAAAAAA==

--Apple-Mail-29--644478700--

Re: CONVERT() broken in 4.1.1?

am 17.01.2004 20:26:46 von Sinisa Milivojevic

Kevin Day writes:
>
> This worked in 4.0:
>
> mysql> SELECT CONVERT(NOW(), DATE);
> +----------------------+
> | CONVERT(NOW(), DATE) |
> +----------------------+
> | 2004-01-16 18:12:18 |
> +----------------------+
> 1 row in set (0.00 sec)
>
> And even in 4.1.0, but in 4.1.1 it returns:
>
> mysql> SELECT CONVERT(NOW(), DATE);
> ERROR 1064: You have an error in your SQL syntax. Check the manual
> that corresponds to your MySQL server version for the right syntax to
> use near ')' at line 1
>

Thank you so much for your bug report.

It helped us fix a bug in 4.1.2.

This is actually a bug in bison (parser generator). We have found a
workaround and will apply it in 4.1.2, which should be out in few
weeks.

Thanks again.

--

Sincerely,

--
For technical support contracts, go to https://order.mysql.com/?ref=msmi
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB
/_/ /_/\_, /___/\___\_\___/ Fulltime Developer and Support Coordinator
<___/ www.mysql.com Larnaca, Cyprus

Want to swim with the dolphins? (April 14-16, 2004)
http://www.mysql.com/uc2004/


--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/bugs?unsub=gcdmb-bugs@m.gmane.org