mysql+pyodbc encoding detection fails
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)
-
repo owner -
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.
-
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
-
repo owner If you are on a unix environment, use MySQLdb. The leak is a very well known issue - please use the instructions at http://www.sqlalchemy.org/trac/wiki/DatabaseNotes#MySQL to connect to MySQL.
-
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)
-
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.
-
repo owner let me add, in fairness, pyodbc's position is that its an ODBC issue, not a pyodbc one.
-
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.
-
repo owner - assigned issue to
-
Account Deleted - attached mysql_db_test.py
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
-
repo owner - marked as minor
two points:
- The program doesn't run great with MySQLdb but does not leak memory for me.
- we now support oursql and mysql-connector python. Running the program with OurSQL its lightning fast.
-
repo owner - changed status to wontfix
nothing here we can fix
-
repo owner - changed milestone to 1.x.xx
- Log in to comment
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.