Type:
Technical task
Priority:
Major
Resolution:
Fixed
Affects Version/s:
None
Component/s:
None
If CREATE OR REPLACE fails on CREATE stage, the table is still dropped, but nothing is written to the binlog. Obviously, it will cause further inconsistencies between master and slave, or upon restoring from binlog.
MariaDB [test]> create table t1 (i int );
Query OK, 0 rows affected (1.17 sec)
MariaDB [test]> create or replace table t1;
ERROR 1113 (42000): A table must have at least 1 column
MariaDB [test]> show binlog events;
+ ----------------------+-----+-------------------+-----------+-------------+-----------------------------------------------------+
| Log_name | Pos | Event_type | Server_id | End_log_pos | Info |
+ ----------------------+-----+-------------------+-----------+-------------+-----------------------------------------------------+
| wheezy-64-bin.000001 | 4 | Format_desc | 1 | 248 | Server ver: 10.0.7-MariaDB-debug-log, Binlog ver: 4 |
| wheezy-64-bin.000001 | 248 | Gtid_list | 1 | 273 | [] |
| wheezy-64-bin.000001 | 273 | Binlog_checkpoint | 1 | 316 | wheezy-64-bin.000001 |
| wheezy-64-bin.000001 | 316 | Gtid | 1 | 354 | GTID 0-1-1 |
| wheezy-64-bin.000001 | 354 | Query | 1 | 440 | use `test`; create table t1 (i int ) |
+ ----------------------+-----+-------------------+-----------+-------------+-----------------------------------------------------+
5 rows in set (0.00 sec)
MariaDB [test]> show tables;
Empty set (0.00 sec)
Test case that shows the consequent replication failure:
--source include/master-slave.inc
create table t1 (i int );
--error ER_TABLE_MUST_HAVE_COLUMNS
create or replace table t1;
show binlog events;
show tables;
create table t1 (j int );
--sync_slave_with_master
Last_SQL_Errno 1050
Last_SQL_Error Error 'Table 't1' already exists' on query. Default database: 'test'. Query: 'create table t1 (j int)'
revision-id: monty@askmonty.org-20140129123724-hl8iop8cpxbk67r5
revno: 3970
branch-nick: mariadb-monty
Elena Stepanova
made changes -
2014-01-29 18:54
Field
Original Value
New Value
Link
This issue relates to TODO-575
[ TODO-575
]
Michael Widenius
made changes -
2014-02-06 13:06
Status
Open
[ 1
]
In Progress
[ 3
]
Sergei Golubchik
made changes -
2014-02-10 16:13
Fix Version/s
10.0.9
[ 14400
]
Fix Version/s
10.0.8
[ 14200
]
Sergei Golubchik
made changes -
2014-03-09 22:02
Fix Version/s
10.0.10
[ 14500
]
Fix Version/s
10.0.9
[ 14400
]
Michael Widenius
made changes -
2014-03-20 01:10
Resolution
Fixed
[ 1
]
Status
In Progress
[ 3
]
Closed
[ 6
]
Sergei Golubchik
made changes -
2014-06-13 15:06
Workflow
defaullt
[ 33759
]
MariaDB v2
[ 43181
]
Sergei Golubchik
made changes -
2021-12-06 21:39
Workflow
MariaDB v3
[ 62249
]
MariaDB v4
[ 147446
]
{"report":{"fcp":1987.5,"ttfb":863,"pageVisibility":"visible","entityId":29959,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"ffa36e6d-d5f2-4c66-a43b-319545afaddb","navigationType":0,"readyForUser":2088.699999809265,"redirectCount":0,"resourceLoadedEnd":2506.800000190735,"resourceLoadedStart":877.5,"resourceTiming":[{"duration":586,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":877.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":877.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1463.5,"responseStart":0,"secureConnectionStart":0},{"duration":586,"initiatorType":"link","name":"https://jira.mariadb.org/s/7ebd35e77e471bc30ff0eba799ebc151-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":877.8000001907349,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":877.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1463.8000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":595,"initiatorType":"script","name":"https://jira.mariadb.org/s/0917945aaa57108d00c5076fea35e069-CDN/lu2cib/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":878,"connectEnd":878,"connectStart":878,"domainLookupEnd":878,"domainLookupStart":878,"fetchStart":878,"redirectEnd":0,"redirectStart":0,"requestStart":878,"responseEnd":1473,"responseStart":1473,"secureConnectionStart":878},{"duration":712.5,"initiatorType":"script","name":"https://jira.mariadb.org/s/2d8175ec2fa4c816e8023260bd8c1786-CDN/lu2cib/820016/12ta74/494e4c556ecbb29f90a3d3b4f09cb99c/_/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&whisper-enabled=true","startTime":878.1999998092651,"connectEnd":878.1999998092651,"connectStart":878.1999998092651,"domainLookupEnd":878.1999998092651,"domainLookupStart":878.1999998092651,"fetchStart":878.1999998092651,"redirectEnd":0,"redirectStart":0,"requestStart":878.1999998092651,"responseEnd":1590.6999998092651,"responseStart":1590.6999998092651,"secureConnectionStart":878.1999998092651},{"duration":716.6000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/a9324d6758d385eb45c462685ad88f1d-CDN/lu2cib/820016/12ta74/c92c0caa9a024ae85b0ebdbed7fb4bd7/_/download/contextbatch/js/atl.global,-_super/batch.js?locale=en","startTime":878.3999996185303,"connectEnd":878.3999996185303,"connectStart":878.3999996185303,"domainLookupEnd":878.3999996185303,"domainLookupStart":878.3999996185303,"fetchStart":878.3999996185303,"redirectEnd":0,"redirectStart":0,"requestStart":878.3999996185303,"responseEnd":1595,"responseStart":1595,"secureConnectionStart":878.3999996185303},{"duration":717.4000005722046,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-en/jira.webresources:calendar-en.js","startTime":878.5999994277954,"connectEnd":878.5999994277954,"connectStart":878.5999994277954,"domainLookupEnd":878.5999994277954,"domainLookupStart":878.5999994277954,"fetchStart":878.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":878.5999994277954,"responseEnd":1596,"responseStart":1596,"secureConnectionStart":878.5999994277954},{"duration":718.5999994277954,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:calendar-localisation-moment/jira.webresources:calendar-localisation-moment.js","startTime":878.8000001907349,"connectEnd":878.8000001907349,"connectStart":878.8000001907349,"domainLookupEnd":878.8000001907349,"domainLookupStart":878.8000001907349,"fetchStart":878.8000001907349,"redirectEnd":0,"redirectStart":0,"requestStart":878.8000001907349,"responseEnd":1597.3999996185303,"responseStart":1597.3999996185303,"secureConnectionStart":878.8000001907349},{"duration":763.3000001907349,"initiatorType":"link","name":"https://jira.mariadb.org/s/b04b06a02d1959df322d9cded3aeecc1-CDN/lu2cib/820016/12ta74/a2ff6aa845ffc9a1d22fe23d9ee791fc/_/download/contextbatch/css/jira.global.look-and-feel,-_super/batch.css","startTime":879,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":879,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1642.3000001907349,"responseStart":0,"secureConnectionStart":0},{"duration":719,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":879.0999994277954,"connectEnd":879.0999994277954,"connectStart":879.0999994277954,"domainLookupEnd":879.0999994277954,"domainLookupStart":879.0999994277954,"fetchStart":879.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":879.0999994277954,"responseEnd":1598.0999994277954,"responseStart":1598.0999994277954,"secureConnectionStart":879.0999994277954},{"duration":763.0999994277954,"initiatorType":"link","name":"https://jira.mariadb.org/s/3ac36323ba5e4eb0af2aa7ac7211b4bb-CDN/lu2cib/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":879.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":879.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1642.5999994277954,"responseStart":0,"secureConnectionStart":0},{"duration":719.3000001907349,"initiatorType":"script","name":"https://jira.mariadb.org/s/5d5e8fe91fbc506585e83ea3b62ccc4b-CDN/lu2cib/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":879.5999994277954,"connectEnd":879.5999994277954,"connectStart":879.5999994277954,"domainLookupEnd":879.5999994277954,"domainLookupStart":879.5999994277954,"fetchStart":879.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":879.5999994277954,"responseEnd":1598.8999996185303,"responseStart":1598.8999996185303,"secureConnectionStart":879.5999994277954},{"duration":1294.1000003814697,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-js/jira.webresources:bigpipe-js.js","startTime":892.0999994277954,"connectEnd":892.0999994277954,"connectStart":892.0999994277954,"domainLookupEnd":892.0999994277954,"domainLookupStart":892.0999994277954,"fetchStart":892.0999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":892.0999994277954,"responseEnd":2186.199999809265,"responseStart":2186.199999809265,"secureConnectionStart":892.0999994277954},{"duration":1612.2000007629395,"initiatorType":"script","name":"https://jira.mariadb.org/s/d41d8cd98f00b204e9800998ecf8427e-CDN/lu2cib/820016/12ta74/1.0/_/download/batch/jira.webresources:bigpipe-init/jira.webresources:bigpipe-init.js","startTime":894.5999994277954,"connectEnd":894.5999994277954,"connectStart":894.5999994277954,"domainLookupEnd":894.5999994277954,"domainLookupStart":894.5999994277954,"fetchStart":894.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":894.5999994277954,"responseEnd":2506.800000190735,"responseStart":2506.800000190735,"secureConnectionStart":894.5999994277954},{"duration":530.3000001907349,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":1657,"connectEnd":1657,"connectStart":1657,"domainLookupEnd":1657,"domainLookupStart":1657,"fetchStart":1657,"redirectEnd":0,"redirectStart":0,"requestStart":1657,"responseEnd":2187.300000190735,"responseStart":2187.199999809265,"secureConnectionStart":1657},{"duration":626.6000003814697,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":1975.5999994277954,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":1975.5999994277954,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":2602.199999809265,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":668,"responseStart":863,"responseEnd":894,"domLoading":867,"domInteractive":2604,"domContentLoadedEventStart":2604,"domContentLoadedEventEnd":2678,"domComplete":3331,"loadEventStart":3331,"loadEventEnd":3332,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":2559.699999809265},{"name":"bigPipe.sidebar-id.end","time":2560.699999809265},{"name":"bigPipe.activity-panel-pipe-id.start","time":2561},{"name":"bigPipe.activity-panel-pipe-id.end","time":2565.300000190735},{"name":"activityTabFullyLoaded","time":2694.0999994277954}],"measures":[],"correlationId":"55a9cd8eca1635","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":116,"dbReadsTimeInMs":16,"dbConnsTimeInMs":25,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}