summaryrefslogtreecommitdiff
path: root/test/dialect/mysql
Commit message (Collapse)AuthorAgeFilesLines
* - The system by which a :class:`.Column` considers itself to be anMike Bayer2015-10-072-19/+23
| | | | | | | | | | | | | | | | | "auto increment" column has been changed, such that autoincrement is no longer implicitly enabled for a :class:`.Table` that has a composite primary key. In order to accommodate being able to enable autoincrement for a composite PK member column while at the same time maintaining SQLAlchemy's long standing behavior of enabling implicit autoincrement for a single integer primary key, a third state has been added to the :paramref:`.Column.autoincrement` parameter ``"auto"``, which is now the default. fixes #3216 - The MySQL dialect no longer generates an extra "KEY" directive when generating CREATE TABLE DDL for a table using InnoDB with a composite primary key with AUTO_INCREMENT on a column that isn't the first column; to overcome InnoDB's limitation here, the PRIMARY KEY constraint is now generated with the AUTO_INCREMENT column placed first in the list of columns.
* - build out a new base type for Array, as well as new any/all operatorsMike Bayer2015-08-251-1/+54
| | | | | | - any/all work for Array as well as subqueries, accepted by MySQL - Postgresql ARRAY now subclasses Array - fixes #3516
* - totally skip on mysqlconnector for nowMike Bayer2015-03-211-0/+1
|
* - oursql is unsupported on thisMike Bayer2015-03-211-0/+1
|
* - Repaired the commit for issue #2771 which was inadvertently commentedMike Bayer2015-03-201-0/+3
| | | | | | out. - add __backend__ to the dialect suite so that it runs on CI. - will be 1.0.0b3
* - test fixMike Bayer2015-03-201-0/+1
|
* - add a test for #2771, fixes #2771Mike Bayer2015-03-201-0/+8
| | | | - changelog for #2771
* - additional mysql cast-related test fixesMike Bayer2015-02-091-0/+1
|
* - The MySQL dialect now supports CAST on types that are constructedMike Bayer2015-02-091-1/+11
| | | | as :class:`.TypeDecorator` objects.
* - A warning is emitted when :func:`.cast` is used with the MySQLMike Bayer2015-02-091-29/+46
| | | | | | | | | | | dialect on a type where MySQL does not support CAST; MySQL only supports CAST on a subset of datatypes. SQLAlchemy has for a long time just omitted the CAST for unsupported types in the case of MySQL. While we don't want to change this now, we emit a warning to show that it's taken place. A warning is also emitted when a CAST is used with an older MySQL version (< 4) that doesn't support CAST at all, it's skipped in this case as well. fixes #3237
* - flake8Mike Bayer2015-02-091-74/+99
|
* - make even more tablesMike Bayer2015-02-071-27/+30
|
* - break up the tables here to avoid the error we're gettingMike Bayer2015-02-061-15/+24
| | | | on jenkins
* - The MySQL dialect now renders TIMESTAMP with NULL / NOT NULL inMike Bayer2015-02-052-29/+133
| | | | | | | | | all cases, so that MySQL 5.6.6 with the ``explicit_defaults_for_timestamp`` flag enabled will will allow TIMESTAMP to continue to work as expected when ``nullable=False``. Existing applications are unaffected as SQLAlchemy has always emitted NULL for a TIMESTAMP column that is ``nullable=True``. fixes #3155
* - this is passing, no idea whyMike Bayer2015-01-041-3/+0
|
* - The :class:`.mysql.SET` type has been overhauled to no longerMike Bayer2015-01-031-8/+112
| | | | | | | | | | | | | | assume that the empty string, or a set with a single empty string value, is in fact a set with a single empty string; instead, this is by default treated as the empty set. In order to handle persistence of a :class:`.mysql.SET` that actually wants to include the blank value ``''`` as a legitimate value, a new bitwise operational mode is added which is enabled by the :paramref:`.mysql.SET.retrieve_as_bitwise` flag, which will persist and retrieve values unambiguously using their bitflag positioning. Storage and retrieval of unicode values for driver configurations that aren't converting unicode natively is also repaired. fixes #3283
* - clean up SET testsMike Bayer2015-01-031-95/+135
|
* - The :meth:`.Operators.match` operator is now handled such that theMike Bayer2014-12-041-6/+33
| | | | | | | | | | | | | | | | return type is not strictly assumed to be boolean; it now returns a :class:`.Boolean` subclass called :class:`.MatchType`. The type will still produce boolean behavior when used in Python expressions, however the dialect can override its behavior at result time. In the case of MySQL, while the MATCH operator is typically used in a boolean context within an expression, if one actually queries for the value of a match expression, a floating point value is returned; this value is not compatible with SQLAlchemy's C-based boolean processor, so MySQL's result-set behavior now follows that of the :class:`.Float` type. A new operator object ``notmatch_op`` is also added to better allow dialects to define the negation of a match operation. fixes #3263
* - this test passes now in more recent mysqlconnectorMike Bayer2014-10-131-4/+2
|
* - use provide_metadata for new unique constraint / index testsMike Bayer2014-10-041-19/+20
| | | | | | | | | | | | | | - add a test for PG reflection of unique index without any unique constraint - for PG, don't include 'duplicates_constraint' in the entry if the index does not actually mirror a constraint - use a distinct method for unique constraint reflection within table - catch unique constraint not implemented condition; this may be within some dialects and also is expected to be supported by Alembic tests - migration + changelogs for #3184 - add individual doc notes as well to MySQL, Postgreql fixes #3184
* Reflect unique constraints when reflecting a Table objectJohannes Erdfelt2014-09-171-0/+31
| | | | | | | | | | | | | | | Calls to reflect a table did not create any UniqueConstraint objects. The reflection core made no calls to get_unique_constraints and as a result, the sqlite dialect would never reflect any unique constraints. MySQL transparently converts unique constraints into unique indexes, but SQLAlchemy would reflect those as an Index object and as a UniqueConstraint. The reflection core will now deduplicate the unique constraints. PostgreSQL would reflect unique constraints as an Index object and as a UniqueConstraint object. The reflection core will now deduplicate the unique indexes.
* - MySQL boolean symbols "true", "false" work again. 0.9's changeMike Bayer2014-09-051-1/+22
| | | | | | | | | | | in :ticket:`2682` disallowed the MySQL dialect from making use of the "true" and "false" symbols in the context of "IS" / "IS NOT", but MySQL supports this syntax even though it has no boolean type. MySQL remains "non native boolean", but the :func:`.true` and :func:`.false` symbols again produce the keywords "true" and "false", so that an expression like ``column.is_(true())`` again works on MySQL. fixes #3186
* - The :func:`~.expression.column` and :func:`~.expression.table`Mike Bayer2014-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | constructs are now importable from the "from sqlalchemy" namespace, just like every other Core construct. - The implicit conversion of strings to :func:`.text` constructs when passed to most builder methods of :func:`.select` as well as :class:`.Query` now emits a warning with just the plain string sent. The textual conversion still proceeds normally, however. The only method that accepts a string without a warning are the "label reference" methods like order_by(), group_by(); these functions will now at compile time attempt to resolve a single string argument to a column or label expression present in the selectable; if none is located, the expression still renders, but you get the warning again. The rationale here is that the implicit conversion from string to text is more unexpected than not these days, and it is better that the user send more direction to the Core / ORM when passing a raw string as to what direction should be taken. Core/ORM tutorials have been updated to go more in depth as to how text is handled. fixes #2992
* - these tests were squashing deprecation warnings all along...Mike Bayer2014-08-311-5/+8
|
* - oursql doesn't pass this consistently, not sure what the issue isMike Bayer2014-08-081-6/+12
|
* oursql seems to handle this? unclear, might be dependent on mysql versionMike Bayer2014-08-081-7/+1
|
* - determine the root cause of the mysqlconnector issue, reportMike Bayer2014-07-101-5/+4
| | | | it and move on
* - mark tests failing for mysqlconnector, oursqlMike Bayer2014-07-101-3/+10
|
* - support __only_on__ and __backend__ at the same timeMike Bayer2014-07-091-6/+1
|
* - Changed the default value of "raise_on_warnings" to False forMike Bayer2014-07-094-3/+9
| | | | | | | | 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. fixes #2515 - lots of MySQL tests seemed to not be hitting all backends, so we should be getting some mysqlconnector failures now
* - add a test to confirm #3096, we definitely get a timedeltaMike Bayer2014-06-251-0/+10
|
* - fix test failuresMike Bayer2014-06-211-2/+2
|
* - Fixed bug where column names added to ``mysql_length`` parameterMike Bayer2014-06-181-0/+33
| | | | | | | | on an index needed to have the same quoting for quoted names in order to be recognized. The fix makes the quotes optional but also provides the old behavior for backwards compatibility with those using the workaround. fixes #3085
* Added optional '=' to MySQL KEY_BLOCK_SIZE regexW. Sean McGivern2014-04-191-0/+4
|
* - Support has been added for pytest to run tests. This runnerMike Bayer2014-03-032-41/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | is currently being supported in addition to nose, and will likely be preferred to nose going forward. The nose plugin system used by SQLAlchemy has been split out so that it works under pytest as well. There are no plans to drop support for nose at the moment and we hope that the test suite itself can continue to remain as agnostic of testing platform as possible. See the file README.unittests.rst for updated information on running tests with pytest. The test plugin system has also been enhanced to support running tests against mutiple database URLs at once, by specifying the ``--db`` and/or ``--dburi`` flags multiple times. This does not run the entire test suite for each database, but instead allows test cases that are specific to certain backends make use of that backend as the test is run. When using pytest as the test runner, the system will also run specific test suites multiple times, once for each database, particularly those tests within the "dialect suite". The plan is that the enhanced system will also be used by Alembic, and allow Alembic to run migration operation tests against multiple backends in one run, including third-party backends not included within Alembic itself. Third party dialects and extensions are also encouraged to standardize on SQLAlchemy's test suite as a basis; see the file README.dialects.rst for background on building out from SQLAlchemy's test platform.
* - Added new MySQL-specific :class:`.mysql.DATETIME` which includesMike Bayer2014-02-191-3/+24
| | | | | | | fractional seconds support; also added fractional seconds support to :class:`.mysql.TIMESTAMP`. DBAPI support is limited, though fractional seconds are known to be supported by MySQL Connector/Python. Patch courtesy Geert JM Vanderkelen. #2941
* Fixes MySQL dialect partitioningMarcus McCurdy2014-02-141-0/+30
|
* - The MySQL CAST compilation now takes into account aspects of a stringMike Bayer2014-01-132-2/+12
| | | | | | | | | | | | | | | | | | | | | type such as "charset" and "collation". While MySQL wants all character- based CAST calls to use the CHAR type, we now create a real CHAR object at CAST time and copy over all the parameters it has, so that an expression like ``cast(x, mysql.TEXT(charset='utf8'))`` will render ``CAST(t.col AS CHAR CHARACTER SET utf8)``. - Added new "unicode returns" detection to the MySQL dialect and to the default dialect system overall, such that any dialect can add extra "tests" to the on-first-connect "does this DBAPI return unicode directly?" detection. In this case, we are adding a check specifically against the "utf8" encoding with an explicit "utf8_bin" collation type (after checking that this collation is available) to test for some buggy unicode behavior observed with MySQLdb version 1.2.3. While MySQLdb has resolved this issue as of 1.2.4, the check here should guard against regressions. The change also allows the "unicode" checks to log in the engine logs, which was not previously the case. [ticket:2906]
* remove printMike Bayer2013-12-191-1/+0
|
* - Improvements to the system by which SQL types generate withinMike Bayer2013-12-181-3/+18
| | | | | | | | ``__repr__()``, particularly with regards to the MySQL integer/numeric/ character types which feature a wide variety of keyword arguments. The ``__repr__()`` is important for use with Alembic autogenerate for when Python code is rendered in a migration script. [ticket:2893]
* - fix up rendering of "of"Mike Bayer2013-11-281-0/+15
| | | | | | - move out tests, dialect specific out of compiler, compiler tests use new API, legacy API tests in test_selecatble - add support for adaptation of ForUpdateArg, alias support in compilers
* - this test only for mysqlMike Bayer2013-11-231-2/+5
|
* - The precision used when coercing a returned floating point value toMike Bayer2013-11-221-1/+18
| | | | | | | | | | Python ``Decimal`` via string is now configurable. The flag ``decimal_return_scale`` is now supported by all :class:`.Numeric` and :class:`.Float` types, which will ensure this many digits are taken from the native floating point value when it is converted to string. If not present, the type will make use of the value of ``.scale``, if the type supports this setting and it is non-None. Otherwise the original default length of 10 is used. [ticket:2867]
* - Fix and test parsing of MySQL foreign key options within reflection;Mike Bayer2013-10-251-0/+19
| | | | | | this complements the work in :ticket:`2183` where we begin to support reflection of foreign key options such as ON UPDATE/ON DELETE cascade. [ticket:2839]
* - The change in :ticket:`2721`, which is that the ``deferrable`` keywordMike Bayer2013-10-181-3/+17
| | | | | | | | | | | | | | | | | of :class:`.ForeignKeyConstraint` is silently ignored on the MySQL backend, will be reverted as of 0.9; this keyword will now render again, raising errors on MySQL as it is not understood - the same behavior will also apply to the ``initially`` keyword. In 0.8, the keywords will remain ignored but a warning is emitted. Additionally, the ``match`` keyword now raises a :class:`.CompileError` on 0.9 and emits a warning on 0.8; this keyword is not only silently ignored by MySQL but also breaks the ON UPDATE/ON DELETE options. To use a :class:`.ForeignKeyConstraint` that does not render or renders differently on MySQL, use a custom compilation option. An example of this usage has been added to the documentation, see :ref:`mysql_foreign_keys`. [ticket:2721] [ticket:2839]
* The MySQL :class:`.mysql.SET` type now features the same auto-quotingMike Bayer2013-10-142-109/+190
| | | | | | | behavior as that of :class:`.mysql.ENUM`. Quotes are not required when setting up the value, but quotes that are present will be auto-detected along with a warning. This also helps with Alembic where the SET type doesn't render with quotes. [ticket:2817]
* MySQL-connector dialect now allows options in the create_engineMike Bayer2013-10-131-5/+54
| | | | | | query string to override those defaults set up in the connect, including "buffered" and "raise_on_warnings". [ticket:2515]
* - Fixed bug in default compiler plus those of postgresql, mysql, andMike Bayer2013-10-121-0/+10
| | | | | | | | mssql to ensure that any literal SQL expression values are rendered directly as literals, instead of as bound parameters, within a CREATE INDEX statement. [ticket:2742] - don't need expression_as_ddl(); literal_binds and include_table take care of this functionality.
* for this test, apparently we don't handle sets as unordered since neither doesMike Bayer2013-07-021-3/+9
| | | | | MySQL. for some reason set ordering was constant when testing mysqldb, but not so with oursql.
* refactor test suites for postgresql, mssql, mysql into packages.Mike Bayer2013-06-286-0/+1632