Details
-
Bug
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Cannot Reproduce
-
1.2.0
-
None
-
Linux daikon 4.0.7-2-ARCH #1 SMP PREEMPT Tue Jun 30 07:50:21 UTC 2015 x86_64 GNU/Linux
Server version: 10.0.17-MariaDB Source distribution
Maxscale relerse-1.2 (a6b35af9f)
https://github.com/PyMySQL/PyMySQL
Description
Running maxscale from release-1.2, I have a config file with a single split router, single backend (mariadb) and no filters. My split router listens on port 4016, and mariadb on the default, 3306.
I have the following python3 program:
import pymysql
|
|
|
db='test'
|
tbl = 'ghosts'
|
user='test'
|
def test(name, port):
|
con = pymysql.connect(port=port, user=user, db=db)
|
cursor = con.cursor()
|
result = cursor.execute('select * from %s' % tbl);
|
print ("%s says %s has %d rows" % (name,tbl,result))
|
|
|
for name,port in [('mysql', 3306), ('maxscale', 4016)]:
|
test(name,port)
|
Running it, I get:
$ python maxscale.py
|
mysql says ghosts has 4 rows
|
maxscale says ghosts has 0 rows
|
This works properly if I use a mysql client:
$ echo 'select count(*) from ghosts' | mysql --protocol tcp --port 3306 test|tail -1
|
4
|
$ echo 'select count(*) from ghosts' | mysql --protocol tcp --port 4016 test|tail -1
|
4
|