[MXS-267] wrong results when connecting from pymysql driver Created: 2015-07-13  Updated: 2015-08-27  Resolved: 2015-08-27

Status: Closed
Project: MariaDB MaxScale
Component/s: Core
Affects Version/s: 1.2.0
Fix Version/s: 1.3.0

Type: Bug Priority: Minor
Reporter: Yuval Hager Assignee: markus makela
Resolution: Cannot Reproduce Votes: 0
Labels: None
Environment:

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


Attachments: File maxscale.cnf     File ngrep.log    

 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



 Comments   
Comment by markus makela [ 2015-07-20 ]

I could not reproduce this with the current master branch code which is equal to the 1.2 release.

Output:

mysql says ghosts has 4 rows
maxscale says ghosts has 4 rows

I attached the config file used for testing and the ngrep output of between the client, maxscale and the backend server.

If possible, please retest with the MaxScale 1.2 from a package or built from the master branch.

Comment by Dipti Joshi (Inactive) [ 2015-07-28 ]

What OS version are you using ?

Comment by Dipti Joshi (Inactive) [ 2015-08-04 ]

yhager Please check if this is due to ArchLinux Or use one of the supported OS for MaxScale packages from https://mariadb.com/my_portal/download/maxscale

Comment by markus makela [ 2015-08-17 ]

yhager Could you check if this is still valid with 1.2 version of MaxScale?

Comment by Yuval Hager [ 2015-08-17 ]

Hi, thanks for looking into this. As it happens, I'm not using MaxScale anymore, so do not have an environment to check this at the moment. If I do and I find this still happens, I'll let you know, but for now, it might be best to close this issue.

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