Added a bunch of new error codes to MySQLdb.constants.ER (complete for

MySQL-5.0).

Mapped some new error codes to DataError, which has always existed,
but never had anything mapped to it.

Cleaned set_character_set() a bit.

Added new connection option sql_mode and correspond set_sql_mode()
method.
This commit is contained in:
adustman
2006-03-06 05:28:05 +00:00
parent 21a3d3397b
commit 3c3ef08720
6 changed files with 314 additions and 16 deletions

View File

@ -11,7 +11,7 @@ class test_MySQLdb(test_capabilities.DatabaseTest):
db_module = MySQLdb
connect_args = ()
connect_kwargs = dict(db='test', read_default_file='~/.my.cnf',
charset='utf8')
charset='utf8', sql_mode="ANSI,STRICT_TRANS_TABLES,TRADITIONAL")
create_table_extra = "ENGINE=INNODB CHARACTER SET UTF8"
def quote_identifier(self, ident):