[MCOL-76] TIMESTAMPADD() and TIMESTAMPDIFF() returned syntax error when FRAC_SECOND is used Created: 2016-05-23  Updated: 2016-05-31  Resolved: 2016-05-31

Status: Closed
Project: MariaDB ColumnStore
Component/s: ExeMgr
Affects Version/s: None
Fix Version/s: 1.0.0

Type: Bug Priority: Minor
Reporter: Daniel Lee (Inactive) Assignee: Daniel Lee (Inactive)
Resolution: Fixed Votes: 0
Labels: None


 Description   

Build tested:

getcalpontsoftwareinfo Mon May 23 15:52:13 2016

Name : infinidb-platform Relocations: (not relocatable)
Version : 5.0 Vendor: MariaDB, Inc.
Release : 0 Build Date: Sun 15 May 2016 07:24:29 PM CDT
Install Date: Mon 16 May 2016 05:21:51 PM CDT Build Host: srvbuilder

The issue was identified by Autopilot's functions test:

MariaDB [mytest]> select cidx, CDATE, TIMESTAMPADD(FRAC_SECOND,5,CDATE) from datatypetestm order by cidx;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FRAC_SECOND,5,CDATE) from datatypetestm order by cidx' at line 1
MariaDB [mytest]> select cidx, CDATETIME, TIMESTAMPADD(FRAC_SECOND,5,CDATETIME) from datatypetestm order by cidx;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FRAC_SECOND,5,CDATETIME) from datatypetestm order by cidx' at line 1
MariaDB [mytest]> select cidx, CDATE, TIMESTAMPDIFF(FRAC_SECOND,CDATE, '2011-05-06 11:09:36') from datatypetestm order by cidx;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FRAC_SECOND,CDATE, '2011-05-06 11:09:36') from datatypetestm order by cidx' at line 1
MariaDB [mytest]> select cidx, CDATETIME, TIMESTAMPDIFF(FRAC_SECOND,CDATETIME, '2011-05-06 11:09:36') from datatypetestm order by cidx;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FRAC_SECOND,CDATETIME, '2011-05-06 11:09:36') from datatypetestm order by cidx' at line 1



 Comments   
Comment by David Hall (Inactive) [ 2016-05-24 ]

FRAC_SECOND is no longer supported by any flavor of mysql. We will not be supporting it from now on. All references to FRAC_SECOND should be changed to MICROSECOND.

Comment by Dipti Joshi (Inactive) [ 2016-05-31 ]

dleeyh Can you update your test cases in Auto Pilot and retest this ?

Comment by Daniel Lee (Inactive) [ 2016-05-31 ]

Build verified:

getsoftwareinfo Tue May 31 10:30:28 2016

Name : mariadb-columnstore-platform Relocations: (not relocatable)
Version : 1.0 Vendor: MariaDB Corporation Ab
Release : 0 Build Date: Fri 27 May 2016 04:07:53 PM EDT
Install Date: Mon 30 May 2016 11:32:15 AM EDT Build Host: srvbuilder

Replace FRAC_SECOND with MICROSECOND in Autopilot test cases. Also tested MICROSECOND in Columnstore.

Generated at Thu Feb 08 02:18:20 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.