summaryrefslogtreecommitdiff
path: root/mysql-test/include/function_defaults.inc
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-7635: Update tests to adapt to the new default sql_modeNirbhay Choubey2017-02-101-7/+7
|
* restore ER_VIEW_CHECK_FAILED to be different from ER_CONSTRAINT_FAILEDSergei Golubchik2016-06-301-2/+2
| | | | | | collaterals: * use %`s, not '%s' * use correct SQLSTATE codes for these two errors
* MDEV-7563 Support CHECK constraint as in (or close to) SQL StandardMichael Widenius2016-06-301-35/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-10134 Add full support for DEFAULT - Added support for using tables with MySQL 5.7 virtual fields, including MySQL 5.7 syntax - Better error messages also for old cases - CREATE ... SELECT now also updates timestamp columns - Blob can now have default values - Added new system variable "check_constraint_checks", to turn of CHECK constraint checking if needed. - Removed some engine independent tests in suite vcol to only test myisam - Moved some tests from 'include' to 't'. Should some day be done for all tests. - FRM version increased to 11 if one uses virtual fields or constraints - Changed to use a bitmap to check if a field has got a value, instead of setting HAS_EXPLICIT_VALUE bit in field flags - Expressions can now be up to 65K in total - Ensure we are not refering to uninitialized fields when handling virtual fields or defaults - Changed check_vcol_func_processor() to return a bitmap of used types - Had to change some functions that calculated cached value in fix_fields to do this in val() or getdate() instead. - store_now_in_TIME() now takes a THD argument - fill_record() now updates default values - Add a lookahead for NOT NULL, to be able to handle DEFAULT 1+1 NOT NULL - Automatically generate a name for constraints that doesn't have a name - Added support for ALTER TABLE DROP CONSTRAINT - Ensure that partition functions register virtual fields used. This fixes some bugs when using virtual fields in a partitioning function
* MDEV-6880 Can't define CURRENT_TIMESTAMP as default value for added columnSergei Golubchik2014-11-181-5/+4
| | | | | | | ALTER TABLE: don't fill default values per row, do it once. And do it in two places - for copy_data_between_tables() and for online ALTER. Also, run function_defaults test both for MyISAM and for InnoDB.
* MDEV-6849 ON UPDATE CURRENT_TIMESTAMP doesn't always workSergei Golubchik2014-11-131-2/+15
| | | | | | | | | reset default fields not for every modified row, but only once, at the beginning, as the set of modified fields doesn't change. exception: INSERT ... ON DUPLICATE KEY UPDATE - the set of fields does change per row and in that case we reset default fields per row.
* MDEV-452 Add full support for auto-initialized/updated timestamp and datetimeunknown2012-10-171-0/+1166
Generalized support for auto-updated and/or auto-initialized timestamp and datetime columns. This patch is a reimplementation of MySQL's "WL#5874: CURRENT_TIMESTAMP as DEFAULT for DATETIME columns". In order to ease future merges, this implementation reused few function and variable names from MySQL's patch, however the implementation is quite different. TODO: The only unresolved problem in this patch is the semantics of LOAD DATA for TIMESTAMP and DATETIME columns in the cases when there are missing or NULL columns. I couldn't fully comprehend the logic behind MySQL's behavior and its relationship with their own documentation, so I left the results to be more consistent with all other LOAD cases. The problematic test cases can be seen by running the test file function_defaults, and observing the test case differences. Those were left on purpose for discussion.