sqlite3-to-mysql icon indicating copy to clipboard operation
sqlite3-to-mysql copied to clipboard

respect charset and collation cli options

Open alexanikanov opened this issue 1 year ago • 4 comments

alexanikanov avatar Jul 26 '22 14:07 alexanikanov

Codecov Report

Merging #43 (6565c48) into master (7933855) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master      #43   +/-   ##
=======================================
  Coverage   87.17%   87.17%           
=======================================
  Files           8        8           
  Lines         546      546           
=======================================
  Hits          476      476           
  Misses         70       70           
Impacted Files Coverage Δ
sqlite3_to_mysql/transporter.py 93.92% <ø> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us.

codecov[bot] avatar Jul 26 '22 16:07 codecov[bot]

Looks like you'll need to fix this. Please run unit tests on your machine using tox to speed things up.

techouse avatar Jul 26 '22 19:07 techouse

I've passed tests locally for py27, py38 and py39: 125 passed, 2 xfailed, 32 xpassed, 7 warnings in 467.11s (0:07:47) on CI here I see that tests trying to connect to MySQL using charset utf8mb4 and collation utf8mb4_general_ci

  .tox/py39/lib/python3.9/site-packages/mysql/connector/connection.py:137: in __init__
      self.connect(**kwargs)
          __class__  = <class 'mysql.connector.connection.MySQLConnection'>
          kwargs     = {'charset': 'utf8mb4', 'collation': 'utf8mb4_general_ci', 'host': '0.0.0.0', 'password': 'testpass', ...}
          self       = <mysql.connector.connection.MySQLConnection object at 0x7f1ebd947bb0>

but test MySQL DB instance created with --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci I could try with --character-set-server=utf8mb4 --collation-server=utf8mb4_general_ci, but it is not clear for me from where utf8mb4_general_ci is coming from...

alexanikanov avatar Jul 27 '22 09:07 alexanikanov

The tests for Python <3.6 are probably succeeding because an older mysql-connector-python is imported for Python <3.6.

The charsets and encodings are from mysql/connector/charsets.

Check what version you have imported. It might require additional version-specific pinning.

techouse avatar Jul 28 '22 08:07 techouse