mysql+pyodbc encoding detection fails

Issue #1512 resolved
Former user created an issue

i got: /usr/lib64/python2.6/site-packages/sqlalchemy/dialects/mysql/base.py:1771: SAWarning: Could not detect the connection character set. Assuming latin1. self._connection_charset = self._detect_charset(connection)

result of: SHOW VARIABLES LIKE 'character_set%%'; :

character_set_client utf8

character_set_connection utf8

character_set_database utf8

character_set_filesystem binary

character_set_results utf8

character_set_server utf8

character_set_system utf8

character_sets_dir /usr/share/mysql/charsets/

shouldn't this: "character_set_results utf8" be recognized?

Note: i'have to supply encoding and charset to get a working connection

Comments (13)

  1. Mike Bayer repo owner
    • assigned issue to
    • changed component to mysql
    • changed milestone to 0.6.xx

    waht version of MySQL ? this is critical. also can you please try MySQLdb and ensure that it works with your setup. Pyodbc + mysql is very buggy and its unlikely we're going to support it fully.

  2. Former user Account Deleted

    I'm using mysql-5.0.83. mysqldb works, encoding detection, too. i just switched to mysql+pyodbc still seems to have a memory leak.

  3. Former user Account Deleted

    Sorry, that's not what i meant .. i was distracted :) i switched from mysqldb to mysql+pyodbc because mysqldb still seems to have a memory leak. it would be nice to have a full working mysql+pyodbc. I'll take a look at the mysql+pyodbc bugs .. maybe i can help fixing

  4. Former user Account Deleted

    Sorry zzzeek .. but mysql-python leaks memory even with this parameters and i've tested the new 1.2.3 version, too. But pyodbc works for me like a charm (beside some minor bugs like this and the url parsing)

  5. Mike Bayer repo owner

    theres a severe mysql+pyodbc encoding-related bug that the author of pyodbc flat out said he's unable to fix, and then was closed as "wontfix" (issue 25). so I really don't have the time to support mysql + pyodbc when the project maintainer doesn't have the resources to fix major issues. Please supply a test case illustrating the MySQLdb bug since I've used it for years with no issue.

  6. Mike Bayer repo owner

    let me add, in fairness, pyodbc's position is that its an ODBC issue, not a pyodbc one.

  7. Mike Bayer repo owner

    let me also add, that of course if you can provide an acceptable patch for this particular pyodbc bug, it will be accepted.

  8. Former user Account Deleted

    mysql_db test. a quickly hacked script to show the mysqldb problem. It creates a db with test data and runs some selects. on my machine the interpreter stays at ~ 500MB . When i use pyodbc+mysql memory is freed imidiatly

  9. Mike Bayer repo owner

    two points:

    1. The program doesn't run great with MySQLdb but does not leak memory for me.
    2. we now support oursql and mysql-connector python. Running the program with OurSQL its lightning fast.
  10. Log in to comment