Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.3.4
-
None
Description
In AS OF TIMESTAMP xxx, the TIMESTAMP is always parsed as a part of AS OF, even if it's actually a part of the expression (the complete expression being TIMESTAMP xxx).
Examples:
DATETIME literal |
SELECT TIMESTAMP'2016-02-30 08:07:06'; |
→ ERROR 1525 (HY000): Incorrect DATETIME value: '2016-02-30 08:07:06' |
SELECT * FROM t1 FOR SYSTEM_TIME AS OF TIMESTAMP'2016-02-30 08:07:06'; |
→ ok
|
SELECT * FROM t1 FOR SYSTEM_TIME AS OF (TIMESTAMP'2016-02-30 08:07:06'); |
→ ERROR 1525 (HY000): Incorrect DATETIME value: '2016-02-30 08:07:06' |
two-argument TIMESTAMP() function |
SELECT TIMESTAMP('2003-12-31 12:00:00','12:00:00'); |
→ ok
|
SELECT * FROM t1 FOR SYSTEM_TIME AS OF TIMESTAMP('2003-12-31 12:00:00','12:00:00') |
→ ERROR 1241 (21000): Operand should contain 1 column(s) |
SELECT * FROM t1 FOR SYSTEM_TIME AS OF (TIMESTAMP('2003-12-31 12:00:00','12:00:00')); |
→ ok
|
Attachments
Issue Links
- relates to
-
MDEV-15818 Fix shift-reduce conflicts in the new 10.3 syntax
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Description |
In {{AS OF TIMESTAMP xxx}}, the {{TIMESTAMP}} is always parsed as a part of {{AS OF}}, even if it's actually, a part of the expression (the complete expression being {{TIMESTAMP xxx}}).
Examples: {code:sql|title=DATETIME literal} SELECT TIMESTAMP'2016-02-30 08:07:06'; → ERROR 1525 (HY000): Incorrect DATETIME value: '2016-02-30 08:07:06' SELECT * FROM t1 FOR SYSTEM_TIME AS OF TIMESTAMP'2016-02-30 08:07:06'; → ok SELECT * FROM t1 FOR SYSTEM_TIME AS OF (TIMESTAMP'2016-02-30 08:07:06'); → ERROR 1525 (HY000): Incorrect DATETIME value: '2016-02-30 08:07:06' {code} {code:sql|title=two-argument TIMESTAMP() function} SELECT TIMESTAMP('2003-12-31 12:00:00','12:00:00'); → ok SELECT * FROM t1 FOR SYSTEM_TIME AS OF TIMESTAMP('2003-12-31 12:00:00','12:00:00') → ERROR 1241 (21000): Operand should contain 1 column(s) SELECT * FROM t1 FOR SYSTEM_TIME AS OF (TIMESTAMP('2003-12-31 12:00:00','12:00:00')); → ok {code} |
In {{AS OF TIMESTAMP xxx}}, the {{TIMESTAMP}} is always parsed as a part of {{AS OF}}, even if it's actually a part of the expression (the complete expression being {{TIMESTAMP xxx}}).
Examples: {code:sql|title=DATETIME literal} SELECT TIMESTAMP'2016-02-30 08:07:06'; → ERROR 1525 (HY000): Incorrect DATETIME value: '2016-02-30 08:07:06' SELECT * FROM t1 FOR SYSTEM_TIME AS OF TIMESTAMP'2016-02-30 08:07:06'; → ok SELECT * FROM t1 FOR SYSTEM_TIME AS OF (TIMESTAMP'2016-02-30 08:07:06'); → ERROR 1525 (HY000): Incorrect DATETIME value: '2016-02-30 08:07:06' {code} {code:sql|title=two-argument TIMESTAMP() function} SELECT TIMESTAMP('2003-12-31 12:00:00','12:00:00'); → ok SELECT * FROM t1 FOR SYSTEM_TIME AS OF TIMESTAMP('2003-12-31 12:00:00','12:00:00') → ERROR 1241 (21000): Operand should contain 1 column(s) SELECT * FROM t1 FOR SYSTEM_TIME AS OF (TIMESTAMP('2003-12-31 12:00:00','12:00:00')); → ok {code} |
Assignee | Alexander Krizhanovsky [ krizhanovsky ] | Aleksey Midenkov [ midenok ] |
Fix Version/s | 10.3.5 [ 22905 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] | |
Status | Closed [ 6 ] | Stalled [ 10000 ] |
Assignee | Aleksey Midenkov [ midenok ] | Sergei Golubchik [ serg ] |
Status | Stalled [ 10000 ] | In Review [ 10002 ] |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.3.5 [ 22905 ] |
Sprint | 10.3.5-1 [ 229 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Assignee | Sergei Golubchik [ serg ] | Aleksey Midenkov [ midenok ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 10.3.5 [ 22905 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Resolution | Fixed [ 1 ] | |
Status | Stalled [ 10000 ] | Closed [ 6 ] |
Sprint | 10.3.5-1 [ 229 ] |
Link |
This issue relates to |
Workflow | MariaDB v3 [ 84964 ] | MariaDB v4 [ 153604 ] |