-
Task
-
-
Minor
-
Resolution:
Duplicate
-
-
-
Found while attempting to merge main.type_timestamp_explicit:
revno: 3690.68.37
|
committer: Gopal Shankar <gopal.shankar@oracle.com>
|
branch nick: mysql-trunk-wl6292-push
|
timestamp: Thu 2012-06-21 08:27:40 +0530
|
message:
|
WL#6292 - Make TIMESTAMP columns nullable by default.
|
|
This worklog implements new behavior for TIMESTAMP columns,
|
defined by CREATE TABLE, ALTER TABLE and CREATE SELECT commands.
|
This is in effort to make TIMESTAMP columns behavior to be
|
more closer to SQL standard. The change in behavior is as
|
described below,
|
|
Current behavior:
|
=================
|
1) Unlike all the other types, TIMESTAMP columns which are not
|
explicitly specified as NULLable automatically get NOT NULL
|
as attribute.
|
2) If the first TIMESTAMP column in table is not specified as
|
NULLable and doesn't have explicit DEFAULT or ON UPDATE
|
value specified it automatically gets DEFAULT NOW()
|
ON UPDATE NOW() as attributes.
|
3) All other TIMESTAMP columns which are not NULLable and
|
don't have explicit default specified get '0' as default
|
value and treated as having explicit default value after
|
that (i.e. if you don't provide explicit value for such
|
a column when inserting into table no warning or error
|
is emitted).
|
|
New behavior:
|
=============
|
1) TIMESTAMP columns which are not explicitly specified as
|
NOT NULL become NULLable.
|
2) No TIMESTAMP columns get DEFAULT NOW() or ON UPDATE NOW()
|
attributes automatically, without them being explicitly
|
specified.
|
3) Non-NULLable TIMESTAMP columns without explicit default
|
value treated as having no default value. I.e. warning
|
or error is emitted (depends on sql_mode) if we insert
|
a row without providing and explicit value for such a
|
column. In case when warning is emitted and not an
|
error such a column will still get '0' if no explicit
|
value was specified for it.
|
|
A new command line option '--explicit_defaults_for_timestamp'
|
is introduced for MySQL server to enable new behavior. The old
|
behavior is kept as default, so that the existing applications
|
assuming old semantics work without any changes.
|
|
Replication slave applier thread is extended with new interface,
|
such that the slave applies the logs with old behavior, if the
|
logs are generated by master with older version than slave.
|
|
MySQL system table definitions at scripts/* were updated,
|
such that they work fine with old and new behavior with
|
any change. MTR tests which use TIMESTAMP columns are also
|
updated, such that the test works both in old and new
|
behavior. This should help easy transition to new behavior
|
going forward.
|
|
This worklog addresses Bug#11762529 and Bug#13344629.
|
{"report":{"fcp":757.2000000476837,"ttfb":153.40000009536743,"pageVisibility":"visible","entityId":34111,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":1,"journeyId":"7372a2da-45d4-4e91-8816-d591e56498d6","navigationType":0,"readyForUser":823.9000000953674,"redirectCount":0,"resourceLoadedEnd":817.2000000476837,"resourceLoadedStart":159,"resourceTiming":[{"duration":128.09999990463257,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":159,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":159,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":287.09999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":127.90000009536743,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/css/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.css?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&slack-enabled=true","startTime":159.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":159.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":287.2000000476837,"responseStart":0,"secureConnectionStart":0},{"duration":138,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":159.40000009536743,"connectEnd":159.40000009536743,"connectStart":159.40000009536743,"domainLookupEnd":159.40000009536743,"domainLookupStart":159.40000009536743,"fetchStart":159.40000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":159.40000009536743,"responseEnd":297.40000009536743,"responseStart":297.40000009536743,"secureConnectionStart":159.40000009536743},{"duration":209.29999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/s/099b33461394b8015fc36c0a4b96e19f-CDN/lu2bu7/820016/12ta74/8679b4946efa1a0bb029a3a22206fb5d/_/download/contextbatch/js/jira.browse.project,project.issue.navigator,jira.view.issue,jira.general,jira.global,atl.general,-_super/batch.js?agile_global_admin_condition=true&jag=true&jira.create.linked.issue=true&locale=en&slack-enabled=true","startTime":159.5,"connectEnd":159.5,"connectStart":159.5,"domainLookupEnd":159.5,"domainLookupStart":159.5,"fetchStart":159.5,"redirectEnd":0,"redirectStart":0,"requestStart":159.5,"responseEnd":368.7999999523163,"responseStart":368.7999999523163,"secureConnectionStart":159.5},{"duration":212.80000019073486,"initiatorType":"script","name":"https://jira.mariadb.org/s/94c15bff32baef80f4096a08aceae8bc-CDN/lu2bu7/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":159.59999990463257,"connectEnd":159.59999990463257,"connectStart":159.59999990463257,"domainLookupEnd":159.59999990463257,"domainLookupStart":159.59999990463257,"fetchStart":159.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":159.59999990463257,"responseEnd":372.40000009536743,"responseStart":372.40000009536743,"secureConnectionStart":159.59999990463257},{"duration":213.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":159.70000004768372,"connectEnd":159.70000004768372,"connectStart":159.70000004768372,"domainLookupEnd":159.70000004768372,"domainLookupStart":159.70000004768372,"fetchStart":159.70000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":159.70000004768372,"responseEnd":372.90000009536743,"responseStart":372.90000009536743,"secureConnectionStart":159.70000004768372},{"duration":213.60000014305115,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":159.79999995231628,"connectEnd":159.79999995231628,"connectStart":159.79999995231628,"domainLookupEnd":159.79999995231628,"domainLookupStart":159.79999995231628,"fetchStart":159.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":159.79999995231628,"responseEnd":373.40000009536743,"responseStart":373.40000009536743,"secureConnectionStart":159.79999995231628},{"duration":213.89999985694885,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2bu7/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":159.90000009536743,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":159.90000009536743,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":373.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":213.79999995231628,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":160,"connectEnd":160,"connectStart":160,"domainLookupEnd":160,"domainLookupStart":160,"fetchStart":160,"redirectEnd":0,"redirectStart":0,"requestStart":160,"responseEnd":373.7999999523163,"responseStart":373.7999999523163,"secureConnectionStart":160},{"duration":214.20000004768372,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/css/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.css?jira.create.linked.issue=true","startTime":160.09999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":160.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":374.2999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":214.20000004768372,"initiatorType":"script","name":"https://jira.mariadb.org/s/3339d87fa2538a859872f2df449bf8d0-CDN/lu2bu7/820016/12ta74/d176f0986478cc64f24226b3d20c140d/_/download/contextbatch/js/com.atlassian.jira.projects.sidebar.init,-_super,-project.issue.navigator,-jira.view.issue/batch.js?jira.create.linked.issue=true&locale=en","startTime":160.20000004768372,"connectEnd":160.20000004768372,"connectStart":160.20000004768372,"domainLookupEnd":160.20000004768372,"domainLookupStart":160.20000004768372,"fetchStart":160.20000004768372,"redirectEnd":0,"redirectStart":0,"requestStart":160.20000004768372,"responseEnd":374.40000009536743,"responseStart":374.40000009536743,"secureConnectionStart":160.20000004768372},{"duration":423,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":161,"connectEnd":161,"connectStart":161,"domainLookupEnd":161,"domainLookupStart":161,"fetchStart":161,"redirectEnd":0,"redirectStart":0,"requestStart":161,"responseEnd":584,"responseStart":584,"secureConnectionStart":161},{"duration":656.2000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2bu7/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":161,"connectEnd":161,"connectStart":161,"domainLookupEnd":161,"domainLookupStart":161,"fetchStart":161,"redirectEnd":0,"redirectStart":0,"requestStart":161,"responseEnd":817.2000000476837,"responseStart":817.2000000476837,"secureConnectionStart":161},{"duration":289.59999990463257,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":514.4000000953674,"connectEnd":514.4000000953674,"connectStart":514.4000000953674,"domainLookupEnd":514.4000000953674,"domainLookupStart":514.4000000953674,"fetchStart":514.4000000953674,"redirectEnd":0,"redirectStart":0,"requestStart":514.4000000953674,"responseEnd":804,"responseStart":804,"secureConnectionStart":514.4000000953674},{"duration":175.70000004768372,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":735.5999999046326,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":735.5999999046326,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":911.2999999523163,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":30,"responseStart":153,"responseEnd":156,"domLoading":156,"domInteractive":890,"domContentLoadedEventStart":890,"domContentLoadedEventEnd":934,"domComplete":1714,"loadEventStart":1714,"loadEventEnd":1716,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":870.2999999523163},{"name":"bigPipe.sidebar-id.end","time":871.0999999046326},{"name":"bigPipe.activity-panel-pipe-id.start","time":871.2000000476837},{"name":"bigPipe.activity-panel-pipe-id.end","time":873.5},{"name":"activityTabFullyLoaded","time":947.5999999046326}],"measures":[],"correlationId":"4af49c8ddf8cf9","effectiveType":"4g","downlink":9.8,"rtt":0,"serverDuration":65,"dbReadsTimeInMs":10,"dbConnsTimeInMs":17,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}