We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
on update
Please answer these questions before submitting your issue. Thanks!
CREATE TABLE `xyz` ( `id` varchar(36) NOT NULL, `create_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `update_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), PRIMARY KEY (`id`) );
then using mysql dump to extract structure.
circleci/mysql:5.7
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for xyz -- ---------------------------- DROP TABLE IF EXISTS `xyz`; CREATE TABLE `xyz` ( `id` varchar(36) COLLATE utf8_unicode_ci NOT NULL, `create_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `update_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; SET FOREIGN_KEY_CHECKS = 1;
SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for xyz -- ---------------------------- DROP TABLE IF EXISTS `xyz`; CREATE TABLE `xyz` ( `id` varchar(36) NOT NULL, `create_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), `update_at` datetime(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; SET FOREIGN_KEY_CHECKS = 1;
The ON UPDATE CURRENT_TIMESTAMP missing fraction
ON UPDATE CURRENT_TIMESTAMP
What version of TiDB are you using (tidb-server -V or run select tidb_version(); on TiDB)? 3.0.1
tidb-server -V
select tidb_version();
Addon
explicit-defaults-for-timestamp has set ON
explicit-defaults-for-timestamp
The text was updated successfully, but these errors were encountered:
@elvizlai Thanks for your report, @bb7133 will try to fix this issue.
Sorry, something went wrong.
This issue is related to #11070, however, the ON_UPDATE CURRENT_TIMESTAMP parted is not fixed.
bb7133
Successfully merging a pull request may close this issue.
Bug Report
Please answer these questions before submitting your issue. Thanks!
If possible, provide a recipe for reproducing the error.
create table xyz using:
then using mysql dump to extract structure.
circleci/mysql:5.7
)?The
ON UPDATE CURRENT_TIMESTAMP
missing fractionWhat version of TiDB are you using (
tidb-server -V
or runselect tidb_version();
on TiDB)?3.0.1
Addon
explicit-defaults-for-timestamp
has set ONThe text was updated successfully, but these errors were encountered: