summaryrefslogtreecommitdiff
path: root/test/dialect/mysql
Commit message (Collapse)AuthorAgeFilesLines
* Disable Enum string validation by defaultMike Bayer2016-06-201-1/+3
| | | | | | | | | | | | | | Rolled back the validation rules a bit in :class:`.Enum` to allow unknown string values to pass through, unless the flag ``validate_string=True`` is passed to the Enum; any other kind of object is still of course rejected. While the immediate use is to allow comparisons to enums with LIKE, the fact that this use exists indicates there may be more unknown-string-comparsion use cases than we expected, which hints that perhaps there are some unknown string-INSERT cases too. Change-Id: I7d1d79b374a7d47966d410998f77cd19294ab7b0 Fixes: #3725
* - Added support for rendering "FULL OUTER JOIN" to both Core and ORM.Mike Bayer2016-03-281-0/+27
| | | | Pull request courtesy Stefan Urbanek. fixes #1957
* - changelog and docs for #3332, fixes #3332Mike Bayer2016-03-151-23/+24
| | | | | | - make docs for isolation level more consistent between postgresql and mysql - move mysql autocommit tests
* Merge branch 'master' into pr157Mike Bayer2016-03-155-138/+393
|\
| * - add changelog and migration notes for new Enum features,Mike Bayer2016-02-021-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | fixes #3095, #3292 - reorganize enum constructor to again work with the MySQL ENUM type - add a new create_constraint flag to Enum to complement that of Boolean - reinstate the CHECK constraint tests for enum, these already fail /skip against the MySQL backend - simplify lookup rules in Enum, have them apply to all varieties of Enum equally
| * - move out match compiler test to test_compilerMike Bayer2016-01-232-23/+11
| | | | | | | | - test_query isn't assertscompiledsql
| * - add a few JSON tests specific to MySQL, including basic reflectionMike Bayer2016-01-061-1/+45
| |
| * - break out mysql/base into modules as it's getting huge with more to comeMike Bayer2016-01-041-1/+2
| |
| * - An adjustment to the regular expression used to parse MySQL views,Mike Bayer2015-12-221-0/+31
| | | | | | | | | | | | | | such that we no longer assume the "ALGORITHM" keyword is present in the reflected view source, as some users have reported this not being present in some Amazon RDS environments. fixes #3613
| * - fix changelog for #3602Mike Bayer2015-12-081-1/+6
| | | | | | | | | | | | - add version switch for backend fsp test (cherry picked from commit 67b22cee3ab2c17b61100f1ccd69081082c0f074)
| * - make this DROP conditional, attempting to isolate why jenkins hasMike Bayer2015-12-081-1/+1
| | | | | | | | an issue with just one test
| * - Fixed bug in MySQL reflection where the "fractional sections portion"Mike Bayer2015-12-071-2/+8
| | | | | | | | | | | | | | | | of the :class:`.mysql.DATETIME`, :class:`.mysql.TIMESTAMP` and :class:`.mysql.TIME` types would be incorrectly placed into the ``timestamp`` attribute, which is unused by MySQL, instead of the ``fsp`` attribute. fixes #3602
| * - flake8 test_reflection and rework the type-based tests intoMike Bayer2015-12-071-87/+196
| | | | | | | | | | individual categories w/ modernized fixtures, assert attributes within type objects.
| * - 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
* | Add 'native' autocommit support for mysql driverspr/157Roman Podoliaka2015-02-241-0/+24
|/ | | | | | Sometimes it might be useful to have 'native' autocommit support provided by a DB API driver rather than rely on SQLAlchemy autocommit emulation.
* - 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