Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
1.1.1
-
None
-
WINDOWS client, CentOS7 server, RHEL7 cluster
Description
Hi everybody,
Routing hints do not seam to work (or I do not understand the documentation).
Please see my test case:
mysql> use mariadb_test
|
Database changed
|
mysql> create table a (id serial, str varchar(255) not null, primary key(id));
|
Query OK, 0 rows affected (0.06 sec)
|
|
mysql> insert into a(id) values(null);
|
Query OK, 1 row affected, 1 warning (0.00 sec)
|
|
mysql> select last_insert_id();
|
+------------------+
|
| last_insert_id() |
|
+------------------+
|
| 1 |
|
+------------------+
|
1 row in set (0.00 sec)
|
|
mysql>
|
mysql> set @a = concat(last_insert_id(), @@hostname);
|
Query OK, 0 rows affected (0.00 sec)
|
|
mysql>
|
mysql> insert into a values(null, @a);
|
Query OK, 1 row affected (0.00 sec)
|
|
mysql> select @a /* maxscale route to master */;
|
+-------------------------+
|
| @a |
|
+-------------------------+
|
| 0galera3.learning.local |
|
+-------------------------+
|
1 row in set (0.00 sec)
|
|
mysql> select @a; -- maxscale route to master;
|
+-------------------------+
|
| @a |
|
+-------------------------+
|
| 0galera3.learning.local |
|
+-------------------------+
|
1 row in set (0.00 sec)
|
|
mysql> select @a; -- maxscale route to master ;
|
+-------------------------+
|
| @a |
|
+-------------------------+
|
| 0galera3.test.local |
|
+-------------------------+
|
1 row in set (0.00 sec)
|
|
mysql> select @a; # maxscale route to master ;
|
+-------------------------+
|
| @a |
|
+-------------------------+
|
| 0galera3.test.local |
|
+-------------------------+
|
1 row in set (0.00 sec)
|
|
mysql> select * FROM a;
|
+----+-------------------------+
|
| id | str |
|
+----+-------------------------+
|
| 1 | |
|
| 4 | 1galera1.test.local |
|
+----+-------------------------+
|
2 rows in set (0.00 sec)
|
|
mysql> select *, @a from a; --maxscale route to master;
|
+----+-------------------------+-------------------------+
|
| id | str | @a |
|
+----+-------------------------+-------------------------+
|
| 1 | | 0galera3.test.local |
|
| 4 | 1galera1.test.local | 0galera3.test.local |
|
+----+-------------------------+-------------------------+
|
2 rows in set (0.00 sec)
|
Attachments
Issue Links
- relates to
-
MXS-218 Query hints need better documentation
- Closed