Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
10.0.6
Description
Notice the difference between the two expressions:
mysql> select '10:10:10'+interval 1 minute, time('10:10:10')+interval 1 minute;
|
+------------------------------+------------------------------------+
|
| '10:10:10'+interval 1 minute | time('10:10:10')+interval 1 minute |
|
+------------------------------+------------------------------------+
|
| 2010-10-10 00:01:00 | 10:11:10 |
|
+------------------------------+------------------------------------+
|
1 row in set (0.00 sec)
|
The first expression should return '10:11:10',
similar to the second one.
Let's do it only in 10.x.
Note, another temporal hybrid function ADDTIME() seems to work correctly:
mysql> select addtime('10:10:10',1), addtime('2001-01-01 10:10:10',1);
|
+-----------------------+----------------------------------+
|
| addtime('10:10:10',1) | addtime('2001-01-01 10:10:10',1) |
|
+-----------------------+----------------------------------+
|
| 10:10:11 | 2001-01-01 10:10:11 |
|
+-----------------------+----------------------------------+
|
1 row in set (0.00 sec)
|
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Summary | Make "constant_string_expr+interval" functions look inside the constant to detect a correct data type | Make "constant_string_expr+interval" look inside the constant to detect a correct data type |
Description |
Notice the difference between the two expressions: {code} mysql> select '10:10:10'+interval 1 minute, time('10:10:10')+interval 1 minute;+------------------------------+------------------------------------+ | '10:10:10'+interval 1 minute | time('10:10:10')+interval 1 minute | +------------------------------+------------------------------------+ | 2010-10-10 00:01:00 | 10:11:10 | +------------------------------+------------------------------------+ 1 row in set (0.00 sec) {code} The first expression should return '10:11:10', similar to the second one. Let's do it only in 10.x. |
Notice the difference between the two expressions: {code} mysql> select '10:10:10'+interval 1 minute, time('10:10:10')+interval 1 minute; +------------------------------+------------------------------------+ | '10:10:10'+interval 1 minute | time('10:10:10')+interval 1 minute | +------------------------------+------------------------------------+ | 2010-10-10 00:01:00 | 10:11:10 | +------------------------------+------------------------------------+ 1 row in set (0.00 sec) {code} The first expression should return '10:11:10', similar to the second one. Let's do it only in 10.x. |
Description |
Notice the difference between the two expressions: {code} mysql> select '10:10:10'+interval 1 minute, time('10:10:10')+interval 1 minute; +------------------------------+------------------------------------+ | '10:10:10'+interval 1 minute | time('10:10:10')+interval 1 minute | +------------------------------+------------------------------------+ | 2010-10-10 00:01:00 | 10:11:10 | +------------------------------+------------------------------------+ 1 row in set (0.00 sec) {code} The first expression should return '10:11:10', similar to the second one. Let's do it only in 10.x. |
Notice the difference between the two expressions: {code} mysql> select '10:10:10'+interval 1 minute, time('10:10:10')+interval 1 minute; +------------------------------+------------------------------------+ | '10:10:10'+interval 1 minute | time('10:10:10')+interval 1 minute | +------------------------------+------------------------------------+ | 2010-10-10 00:01:00 | 10:11:10 | +------------------------------+------------------------------------+ 1 row in set (0.00 sec) {code} The first expression should return '10:11:10', similar to the second one. Let's do it only in 10.x. Note, another temporal hybrid function ADDTIME() seems to work correctly: {code} mysql> select addtime('10:10:10',1), addtime('2001-01-01 10:10:10',1); +-----------------------+----------------------------------+ | addtime('10:10:10',1) | addtime('2001-01-01 10:10:10',1) | +-----------------------+----------------------------------+ | 10:10:11 | 2001-01-01 10:10:11 | +-----------------------+----------------------------------+ 1 row in set (0.00 sec) {code} |
Fix Version/s | 10.0.8 [ 14200 ] |
Fix Version/s | 10.0.9 [ 14400 ] | |
Fix Version/s | 10.0.8 [ 14200 ] |
Fix Version/s | 10.0.10 [ 14500 ] | |
Fix Version/s | 10.0.9 [ 14400 ] |
Fix Version/s | 10.0.11 [ 15200 ] | |
Fix Version/s | 10.0.10 [ 14500 ] |
Fix Version/s | 10.0.12 [ 15201 ] | |
Fix Version/s | 10.0.11 [ 15200 ] |
Workflow | defaullt [ 30635 ] | MariaDB v2 [ 44674 ] |
Fix Version/s | 10.0.13 [ 16000 ] | |
Fix Version/s | 10.0.12 [ 15201 ] |
Workflow | MariaDB v2 [ 44674 ] | MariaDB v3 [ 63696 ] |
Labels | datatype |
Component/s | Data types [ 13906 ] |
Component/s | Temporal Types [ 11000 ] |
Epic Link | MDEV-21071 [ 80504 ] |
Workflow | MariaDB v3 [ 63696 ] | MariaDB v4 [ 139565 ] |
Fix Version/s | 10.0 [ 16000 ] |
Fix Version/s | 10.7 [ 24805 ] | |
Fix Version/s | 10.8 [ 26121 ] | |
Fix Version/s | 10.9 [ 26905 ] | |
Fix Version/s | 10.10 [ 27530 ] |
Fix Version/s | 10.7 [ 24805 ] |
Fix Version/s | 10.8 [ 26121 ] |
Fix Version/s | 10.11 [ 27614 ] |
Fix Version/s | 10.9 [ 26905 ] | |
Fix Version/s | 10.10 [ 27530 ] |