Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
2.0.2
-
None
-
CentOS 7 64bit
Description
When i try to read last insert id from @@identity maxscale always returns 0. (when i try to combine @@identity with last_insert_id in the same query, then @@identity works as expected).
For example:
MySQL [ANI3]> insert into test set data='xxx'; select last_insert_id(), @@identity; select @@identity; select last_insert_id();
|
Query OK, 1 row affected (0.01 sec)
|
|
+------------------+------------+
|
| last_insert_id() | @@identity |
|
+------------------+------------+
|
| 79 | 79 |
|
+------------------+------------+
|
1 row in set (0.00 sec)
|
|
+------------+
|
| @@identity |
|
+------------+
|
| 0 |
|
+------------+
|
1 row in set (0.00 sec)
|
|
+------------------+
|
| last_insert_id() |
|
+------------------+
|
| 79 |
|
+------------------+
|
1 row in set (0.00 sec)
|