Hi Nuno -
As far as the memory leak issue, it was reported here:
https://github.com/sqlalchemy/sqlalchemy/issues/4296 which is in June
2018, a year after the mysql-connector 2.1.6 release here:
https://pypi.org/project/mysql-connector/ so it's safe to assume the
leak still exists in the current version, as it looks like
mysql-connector has not been released for almost two years. On
that issue it seems that the test data is unfortunately not available
so someone would need to go through the script given and create some
fake data. It was a very difficult leak to track down and it does
not reproduce with any other MySQL driver. The leak may well have
to do with handling of warnings, as Python's warnings filter when it
suppresses warnings after the first display, stores them in a hash
that grows unbounded. If mysql-connector is producing warning
messages that are different based on the data given, you'll get a
memory leak
For the issue "additional random bytes-returned issues occur when
running under MySQL 8.0 only", below is a demonstration script. Note
that the second result set returns the data as bytearray() for no
apparent reason.
Most of these errors are easy for me to find since the SQLAlchemy test
suite hits them. I'll see if I can get you the "the values in
cursor.description are randomly sent as either bytes or text with no
discernible pattern," next.
from mysql import connector
conn = connector.connect(
user="scott", password="tiger", db="test", host="mysql80",
charset="utf8mb4")
cursor = conn.cursor()
cursor.execute("DROP TABLE IF EXISTS test_table")
cursor.execute("CREATE TABLE test_table (id INTEGER, data VARCHAR(20))")
cursor.execute("INSERT INTO test_table (id, data) VALUES (1, 'some data')")
cursor.execute("SELECT id, data FROM test_table")
row = cursor.fetchone()
print("Row is: %s" % (row, ))
cursor.execute("""
select table_schema, table_name, column_name
from information_schema.columns
where (table_schema, table_name, lower(column_name)) in
((%s, %s, %s))
""", ('test', 'test_table', 'id'))
row = cursor.fetchone()
print("Row is: %s " % (row, ))
> But we are unsure about the rest. Could you please file bugs with more details?
> We really want to fix these issues and we would appreciate your help.
>
> Please use
https://bugs.mysql.com/
>
> As always we are interested in feedback and suggestions.
>
> Thank you,
> Nuno Mariz
>
> --
> You received this message because you are subscribed to the Google Groups "sqlalchemy-devel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
sqlalchemy-dev...@googlegroups.com.
> To post to this group, send email to
sqlalche...@googlegroups.com.
> Visit this group at
https://groups.google.com/group/sqlalchemy-devel.
> For more options, visit
https://groups.google.com/d/optout.