.. changelog::
:version: 1.0.0
+ .. change::
+ :tags: mysql, bug
+ :tickets: 2515
+
+ Changed the default value of "raise_on_warnings" to False for
+ MySQLconnector. This was set at True for some reason. The "buffered"
+ flag unfortunately must stay at True as MySQLconnector does not allow
+ a cursor to be closed unless all results are fully fetched.
+
.. change::
:tags: bug, orm
:tickets: 3117
util.coerce_kw_type(opts, 'buffered', bool)
util.coerce_kw_type(opts, 'raise_on_warnings', bool)
+
+ # unfortunately, MySQL/connector python refuses to release a
+ # cursor without reading fully, so non-buffered isn't an option
opts.setdefault('buffered', True)
- opts.setdefault('raise_on_warnings', True)
# FOUND_ROWS must be set in ClientFlag to enable
# supports_sane_rowcount.
)[1]
eq_(kw['raise_on_warnings'], False)
+
kw = dialect.create_connect_args(
make_url("mysql+mysqlconnector://u:p@host/db")
)[1]
- eq_(kw['raise_on_warnings'], True)
+ assert "raise_on_warnings" not in kw
@testing.only_on('mysql')
def test_random_arg(self):
class SQLModeDetectionTest(fixtures.TestBase):
__only_on__ = 'mysql'
+ __backend__ = True
def _options(self, modes):
def connect(con, record):
cursor = con.cursor()
- print("DOING THiS:", "set sql_mode='%s'" % (",".join(modes)))
cursor.execute("set sql_mode='%s'" % (",".join(modes)))
e = engines.testing_engine(options={
'pool_events':[
"""Various MySQL execution special cases."""
__only_on__ = 'mysql'
+ __backend__ = True
def test_charset_caching(self):
engine = engines.testing_engine()
class MatchTest(fixtures.TestBase, AssertsCompiledSQL):
__only_on__ = 'mysql'
+ __backend__ = True
@classmethod
def setup_class(cls):
class ReflectionTest(fixtures.TestBase, AssertsExecutionResults):
__only_on__ = 'mysql'
+ __backend__ = True
def test_default_reflection(self):
"""Test reflection of column defaults."""
"Test MySQL column types"
__dialect__ = mysql.dialect()
+ __backend__ = True
def test_numeric(self):
"Exercise type specification and options for numeric types."
res
)
- @testing.only_if('mysql')
+ @testing.only_if('mysql+mysqldb')
@testing.exclude('mysql', '<', (5, 0, 5), 'a 5.0+ feature')
@testing.provide_metadata
def test_charset_collate_table(self):
__only_on__ = 'mysql'
__dialect__ = mysql.dialect()
+ __backend__ = True
@testing.provide_metadata