Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-267

wrong results when connecting from pymysql driver

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Cannot Reproduce
    • 1.2.0
    • 1.3.0
    • Core
    • None

    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

      Attachments

        1. ngrep.log
          6 kB
          markus makela
        2. maxscale.cnf
          0.6 kB
          markus makela

        Activity

          People

            markus makela markus makela
            yhager Yuval Hager
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.