summaryrefslogtreecommitdiff
path: root/test/dialect/test_mysql.py
Commit message (Collapse)AuthorAgeFilesLines
* refactor test suites for postgresql, mssql, mysql into packages.Mike Bayer2013-06-281-1602/+0
|
* YEAR(2) emits a warning and oursql / mysqlconnector throw an exceptionMike Bayer2013-06-231-4/+2
| | | | on the warning so just dump it
* most of these dialect=mysql.dialect() calls are redundantMike Bayer2013-06-081-23/+13
|
* Fix using of 'mysql_length' for composite indexesRoman Podolyaka2013-06-081-0/+29
| | | | | | | | | | | | | | | | | Currently, one can specify the prefix length for an index column using 'mysql_length' keyword argument when creating an Index instance. But in case of composite indexes the prefix length value is applied only to the last column. Extend the existing API in way so that 'mysql_length' argument value can be either: - an integer specifying the same prefix length value for each column of an index - a (column_name --> integer value) mapping specifying the prefix length value for each column of an index separately Fixes issue #2704.
* The ``deferrable`` keyword argument on :class:`.ForeignKey` andMike Bayer2013-06-031-0/+13
| | | | | | | | :class:`.ForeignKeyConstraint` will not render the ``DEFERRABLE`` keyword on the MySQL dialect. For a long time we left this in place because a non-deferrable foreign key would act very differently than a deferrable one, but some environments just disable FKs on MySQL, so we'll be less opinionated here. [ticket:2721]
* mysql testsMike Bayer2013-05-261-13/+14
|
* - the raw 2to3 runMike Bayer2013-04-271-17/+17
| | | | - went through examples/ and cleaned out excess list() calls
* test for cymysqlHajime Nakagami2013-02-171-0/+1
|
* - [feature] Added "collation" parameter to allMike Bayer2012-10-101-1/+5
| | | | | | | | | | | String types. When present, renders as COLLATE <collation>. This to support the COLLATE keyword now supported by several databases including MySQL, SQLite, and Postgresql. [ticket:2276] - [change] The Text() type renders the length given to it, if a length was specified.
* - [feature] Added TIME type to mysql dialect,Mike Bayer2012-10-101-317/+222
| | | | | | | | | | | | accepts "fst" argument which is the new "fractional seconds" specifier for recent MySQL versions. The datatype will interpret a microseconds portion received from the driver, however note that at this time most/all MySQL DBAPIs do not support returning this value. [ticket:2534] - attempted to modernize the types tests in test_mysql a little, though has a long way to go
* - tighten mysql date test to not fail over 1 second boundaries (and probably ↵Mike Bayer2012-09-301-24/+25
| | | | microsecond boundaries once they support that...)
* trying different approaches to test layout. in this one, the testing modulesMike Bayer2012-09-271-4/+5
| | | | | | | become an externally usable package but still remains within the main sqlalchemy parent package. in this system, we use kind of an ugly hack to get the noseplugin imported outside of the "sqlalchemy" package, while still making it available within sqlalchemy for usage by third party libraries.
* fixes to prevent the new MyISAM engine from breaking other testsMike Bayer2012-08-291-7/+3
|
* - expand out all the methods on insert/update/delete/select for nowMike Bayer2012-08-191-5/+0
| | | | - remove deprecation test
* -whitespace bonanza, contdMike Bayer2012-07-281-24/+24
|
* - mysql [bug] Fixed bug whereby if cast() is usedMike Bayer2012-04-161-0/+15
| | | | | | | | | on a SQL expression whose type is not supported by cast() and therefore CAST isn't rendered by the dialect, the order of evaluation could change if the casted expression required that it be grouped; grouping is now applied to those expressions. [ticket:2467]
* - test explicitly for 'VIEW', 'SYSTEM VIEW'Mike Bayer2012-04-121-7/+6
| | | | - move the test to the reflection tests
* Fixed test_system_views not checking for MySQL >= 5.0.0 as ↵elazar2012-04-121-2/+2
| | | | information_schema support is not available in previous versions
* Modified MySQLDialect.get_view_names() to also return system views such as ↵elazar2012-04-111-0/+8
| | | | those in information_schema
* - adjust mysql patch a bit so that we useMike Bayer2012-04-081-2/+2
| | | | | | | | | built in quoting for the "idx_" name as well - [bug] Fixed bug whereby column name inside of "KEY" clause for autoincrement composite column with InnoDB would double quote a name that's a reserved word. Courtesy Jeff Dairiki. [ticket:2460]
* Fix innodb autoinc constraint (double)quotingJeff Dairiki2012-04-061-1/+17
|
* - [feature] Added support for MySQL index andMike Bayer2012-03-141-9/+48
| | | | | | | primary key constraint types (i.e. USING) via new mysql_using parameter to Index and PrimaryKeyConstraint, courtesy Diana Clarke. [ticket:2386]
* - [feature] Dialect-specific compilers now raiseMike Bayer2012-01-281-2/+17
| | | | | | | | CompileException for all type/statement compilation issues, instead of InvalidRequestError or ArgumentError. The DDL for CREATE TABLE will re-raise CompileExceptions to include table/column information for the problematic column. [ticket:2361]
* - adjust some tests and such to work better with a mysql 5.5 installMike Bayer2011-10-111-8/+33
| | | | | - Added mysql_length parameter to Index construct, specifies "length" for indexes. [ticket:2293]
* undo that change with the _, it doesn't break round tripsMike Bayer2011-10-031-4/+2
|
* - a CREATE TABLE will put the COLLATE optionMike Bayer2011-10-031-1/+17
| | | | | | | | | | | | | after CHARSET, which appears to be part of MySQL's arbitrary rules regarding if it will actually work or not. [ticket:2225] - reflecting a MySQL table will ensure that the options added to the Table at the table.kwargs level have spaces converted to underscores. This is a slight behavioral change specifically to the "mysql_default_charset" option which previously would not be symmetrical.
* - remove test.sql._base, test.engine._base, test.orm._base, move those ↵Mike Bayer2011-03-271-9/+9
| | | | | | | classes to a new test.lib.fixtures module - move testing.TestBase to test.lib.fixtures - massive search and replace
* MergeMichael Trier2011-03-151-0/+12
|\
| * Informix and postgresql reserved words changes -- almost done.Jim Phares2011-03-151-0/+12
| |
* | corrected a bunch of spelling typosDiana Clarke2011-02-281-1/+1
|/
* - oursql dialect accepts the same "ssl" arguments inMike Bayer2011-02-101-0/+28
| | | | create_engine() as that of MySQLdb. [ticket:2047]
* - Query.distinct() now accepts column expressionsMike Bayer2011-02-101-7/+29
| | | | | | | | | | | | | | | | | | | as *args, interpreted by the Postgresql dialect as DISTINCT ON (<expr>). [ticket:1069] - select.distinct() now accepts column expressions as *args, interpreted by the Postgresql dialect as DISTINCT ON (<expr>). Note this was already available via passing a list to the `distinct` keyword argument to select(). [ticket:1069] - select.prefix_with() accepts multiple expressions (i.e. *expr), 'prefix' keyword argument to select() accepts a list or tuple. - Passing a string to the `distinct` keyword argument of `select()` for the purpose of emitting special MySQL keywords (DISTINCTROW etc.) is deprecated - use `prefix_with()` for this. - put kw arguments to select() in order - restore docs for _SelectBase, renamed from _SelectBaseMixin
* - Non-DBAPI errors which occur in the scope of an `execute()`Mike Bayer2011-02-091-2/+2
| | | | | | | | call are now wrapped in sqlalchemy.exc.StatementError, and the text of the SQL statement and repr() of params is included. This makes it easier to identify statement executions which fail before the DBAPI becomes involved. [ticket:2015]
* - New DBAPI support for pymysql, a pure Python portMike Bayer2011-01-261-0/+1
| | | | of MySQL-python. [ticket:1991]
* - whitespace removal bonanzaMike Bayer2011-01-021-26/+26
|
* - removes the "on_" prefix.Mike Bayer2010-12-301-2/+2
|
* - apply pep8 to compiler.pyMike Bayer2010-12-211-5/+4
| | | | | - deprecate Compiled.compile() - have __init__ do compilation if statement is present.
* - hardwire the huge LIMIT number on MySQL. this might fix the OurSQL py3kMike Bayer2010-12-061-2/+2
| | | | | bug we're having, though I'm not able to get a good run of OurSQL on OSX right now either Python 2 or 3.
* - sqlalchemy.test and nose plugin moves back to being entirelyMike Bayer2010-11-281-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | outside of "sqlalchemy" and under "test/". Rationale: - coverage plugin works without issue, without need for an awkward additional package install - command line for "nosetests" isn't polluted with SQLAlchemy options [ticket:1949]
| * - move sqlalchemy.test to test.libMike Bayer2010-11-151-4/+4
| |
* | - fixes for PG, mysql, twophaseMike Bayer2010-11-201-8/+12
| | | | | | | | | | - added "pool_events" arg to create_engine(), "events" to pool, allowing establishment of listeners which fire before those of the dialect
* | merge tipMike Bayer2010-11-141-0/+17
|\ \ | |/
| * - Fixed mysql bug involving reflection of CURRENT_TIMESTAMPMike Bayer2010-10-201-0/+17
| | | | | | | | | | default used with ON UPDATE clause, thanks to Taavi Burns [ticket:1940]
* | - move LIMIT/OFFSET rendering to be as bind parameters, for all backendsMike Bayer2010-08-291-3/+7
|/ | | | | | | | | | which support it. This includes SQLite, MySQL, Postgresql, Firebird, Oracle (already used binds with ROW NUMBER OVER), MSSQL (when ROW NUMBER is used, not TOP). Not included are Informix, Sybase, MaxDB, Access [ticket:805] - LIMIT/OFFSET parameters need to stay as literals within SQL constructs. This because they may not be renderable as binds on some backends.
* - The generated index name also is based onMike Bayer2010-08-021-1/+18
| | | | | | | | a "max index name length" attribute which is separate from the "max identifier length" - this to appease MySQL who has a max length of 64 for index names, separate from their overall max length of 255. [ticket:1412]
* test/dialectMike Bayer2010-07-111-130/+130
|
* - The argument to "ESCAPE" of a LIKE operator or similarMike Bayer2010-06-241-1/+54
| | | | | | | | | | | | | | | | is passed through render_literal_value(), which may implement escaping of backslashes. [ticket:1400] - Postgresql render_literal_value() is overridden which escapes backslashes, currently applies to the ESCAPE clause of LIKE and similar expressions. Ultimately this will have to detect the value of "standard_conforming_strings" for full behavior. [ticket:1400] - MySQL render_literal_value() is overridden which escapes backslashes, currently applies to the ESCAPE clause of LIKE and similar expressions. This behavior is derived from detecting the value of NO_BACKSLASH_ESCAPES. [ticket:1400]
* - MySQL dialect doesn't emit CAST() for MySQL versionMike Bayer2010-06-191-1/+14
| | | | | detected < 4.0.2. This allows the unicode check on connect to proceed. [ticket:1826]
* - func.sysdate() emits "SYSDATE()", i.e. with the endingMike Bayer2010-05-081-1/+7
| | | | parenthesis, on MySQL. [ticket:1794]
* - No longer guessing that TINYINT(1) should be BOOLEANMike Bayer2010-03-271-1/+10
| | | | | | when reflecting - TINYINT(1) is returned. Use Boolean/ BOOLEAN in table definition to get boolean conversion behavior. [ticket:1752]