[MXS-222] Routing hint does not seam work Created: 2015-06-25  Updated: 2015-08-20  Resolved: 2015-07-02

Status: Closed
Project: MariaDB MaxScale
Component/s: hintfilter
Affects Version/s: 1.1.1
Fix Version/s: 1.3.0

Type: Bug Priority: Major
Reporter: Michaël de groot Assignee: Unassigned
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

WINDOWS client, CentOS7 server, RHEL7 cluster


Issue Links:
Relates
relates to MXS-218 Query hints need better documentation Closed

 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)



 Comments   
Comment by Michaël de groot [ 2015-06-25 ]

https://github.com/mariadb-corporation/MaxScale/blob/master/Documentation/Reference/Hint-Syntax.md

Comment by markus makela [ 2015-06-29 ]

Here is revised documentation: https://github.com/mariadb-corporation/MaxScale/blob/develop/Documentation/Reference/Hint-Syntax.md

Do you have the hint filter added to the service you are connecting to?

Comment by Michaël de groot [ 2015-07-02 ]

Thanks for the documentation! No I did not set this up, this issue may be closed

Generated at Thu Feb 08 03:57:42 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.