Mariadb updated this morning from 10.1.20 to 10.1.21
After the update if inserting a few fields into the table where there are other fields that have not been set and do not have defaults, The insert fails without any error. Setting default values on all fields resolves the error.
CREATE TABLE `vendors` (
|
`id` INT(11) NOT NULL AUTO_INCREMENT,
|
`vendor_name` VARCHAR(100) NOT NULL,
|
`address1` VARCHAR(128) NOT NULL DEFAULT '',
|
`address2` VARCHAR(40) NOT NULL DEFAULT '',
|
`regionId` INT(11) NULL DEFAULT NULL,
|
`areaId` INT(11) NULL DEFAULT NULL,
|
`cityId` INT(11) NULL DEFAULT NULL,
|
`townId` INT(11) NULL DEFAULT NULL,
|
`city_code` VARCHAR(5) NOT NULL DEFAULT '',
|
`post_code` VARCHAR(15) NOT NULL DEFAULT '',
|
PRIMARY KEY (`id`)
|
) COLLATE='utf8_general_ci' ENGINE=InnoDB;
|
|
insert into vendors (`post_code`) VALUES ('CR0 1NN');
|
The above works for about 20 inserts then fails without error.
setting a default for vendor_name allows the query to work again.
{"report":{"fcp":964.5,"ttfb":195.09999990463257,"pageVisibility":"visible","entityId":59877,"key":"jira.project.issue.view-issue","isInitial":true,"threshold":1000,"elementTimings":{},"userDeviceMemory":8,"userDeviceProcessors":64,"apdex":0.5,"journeyId":"c3ef7be4-82c9-4643-b251-292d519c62f4","navigationType":0,"readyForUser":1083.0999999046326,"redirectCount":0,"resourceLoadedEnd":797,"resourceLoadedStart":200.29999995231628,"resourceTiming":[{"duration":260.2999999523163,"initiatorType":"link","name":"https://jira.mariadb.org/s/2c21342762a6a02add1c328bed317ffd-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/css/_super/batch.css","startTime":200.29999995231628,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":200.29999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":460.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":260.2000000476837,"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":200.59999990463257,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":200.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":460.7999999523163,"responseStart":0,"secureConnectionStart":0},{"duration":359.40000009536743,"initiatorType":"script","name":"https://jira.mariadb.org/s/fbf975c0cce4b1abf04784eeae9ba1f4-CDN/lu2bu7/820016/12ta74/0a8bac35585be7fc6c9cc5a0464cd4cf/_/download/contextbatch/js/_super/batch.js?locale=en","startTime":200.69999980926514,"connectEnd":200.69999980926514,"connectStart":200.69999980926514,"domainLookupEnd":200.69999980926514,"domainLookupStart":200.69999980926514,"fetchStart":200.69999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":465.19999980926514,"responseEnd":560.0999999046326,"responseStart":479.39999985694885,"secureConnectionStart":200.69999980926514},{"duration":484.7999999523163,"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":200.79999995231628,"connectEnd":200.79999995231628,"connectStart":200.79999995231628,"domainLookupEnd":200.79999995231628,"domainLookupStart":200.79999995231628,"fetchStart":200.79999995231628,"redirectEnd":0,"redirectStart":0,"requestStart":465.5,"responseEnd":685.5999999046326,"responseStart":480.69999980926514,"secureConnectionStart":200.79999995231628},{"duration":282.2000000476837,"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":200.89999985694885,"connectEnd":200.89999985694885,"connectStart":200.89999985694885,"domainLookupEnd":200.89999985694885,"domainLookupStart":200.89999985694885,"fetchStart":200.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":465.89999985694885,"responseEnd":483.09999990463257,"responseStart":481.2999999523163,"secureConnectionStart":200.89999985694885},{"duration":282.90000009536743,"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":201.09999990463257,"connectEnd":201.09999990463257,"connectStart":201.09999990463257,"domainLookupEnd":201.09999990463257,"domainLookupStart":201.09999990463257,"fetchStart":201.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":466.59999990463257,"responseEnd":484,"responseStart":481.89999985694885,"secureConnectionStart":201.09999990463257},{"duration":264.40000009536743,"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":201.19999980926514,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":201.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":465.59999990463257,"responseStart":0,"secureConnectionStart":0},{"duration":284.2000000476837,"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":201.19999980926514,"connectEnd":201.19999980926514,"connectStart":201.19999980926514,"domainLookupEnd":201.19999980926514,"domainLookupStart":201.19999980926514,"fetchStart":201.19999980926514,"redirectEnd":0,"redirectStart":0,"requestStart":467,"responseEnd":485.39999985694885,"responseStart":484.19999980926514,"secureConnectionStart":201.19999980926514},{"duration":287.7000000476837,"initiatorType":"script","name":"https://jira.mariadb.org/rest/api/1.0/shortcuts/820016/47140b6e0a9bc2e4913da06536125810/shortcuts.js?context=issuenavigation&context=issueaction","startTime":201.39999985694885,"connectEnd":201.39999985694885,"connectStart":201.39999985694885,"domainLookupEnd":201.39999985694885,"domainLookupStart":201.39999985694885,"fetchStart":201.39999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":470.2999999523163,"responseEnd":489.09999990463257,"responseStart":487.69999980926514,"secureConnectionStart":201.39999985694885},{"duration":265,"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":201.5,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":201.5,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":466.5,"responseStart":0,"secureConnectionStart":0},{"duration":287.2000000476837,"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":201.59999990463257,"connectEnd":201.59999990463257,"connectStart":201.59999990463257,"domainLookupEnd":201.59999990463257,"domainLookupStart":201.59999990463257,"fetchStart":201.59999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":470.39999985694885,"responseEnd":488.7999999523163,"responseStart":486.59999990463257,"secureConnectionStart":201.59999990463257},{"duration":473.60000014305115,"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":208.89999985694885,"connectEnd":208.89999985694885,"connectStart":208.89999985694885,"domainLookupEnd":208.89999985694885,"domainLookupStart":208.89999985694885,"fetchStart":208.89999985694885,"redirectEnd":0,"redirectStart":0,"requestStart":602,"responseEnd":682.5,"responseStart":680,"secureConnectionStart":208.89999985694885},{"duration":582.9000000953674,"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":214.09999990463257,"connectEnd":214.09999990463257,"connectStart":214.09999990463257,"domainLookupEnd":214.09999990463257,"domainLookupStart":214.09999990463257,"fetchStart":214.09999990463257,"redirectEnd":0,"redirectStart":0,"requestStart":781.5,"responseEnd":797,"responseStart":796.2999999523163,"secureConnectionStart":214.09999990463257},{"duration":134.10000014305115,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":696.3999998569489,"connectEnd":696.3999998569489,"connectStart":696.3999998569489,"domainLookupEnd":696.3999998569489,"domainLookupStart":696.3999998569489,"fetchStart":696.3999998569489,"redirectEnd":0,"redirectStart":0,"requestStart":801.6999998092651,"responseEnd":830.5,"responseStart":829.6999998092651,"secureConnectionStart":696.3999998569489},{"duration":246.20000004768372,"initiatorType":"xmlhttprequest","name":"https://jira.mariadb.org/rest/webResources/1.0/resources","startTime":920.2999999523163,"connectEnd":920.2999999523163,"connectStart":920.2999999523163,"domainLookupEnd":920.2999999523163,"domainLookupStart":920.2999999523163,"fetchStart":920.2999999523163,"redirectEnd":0,"redirectStart":0,"requestStart":1138.2999999523163,"responseEnd":1166.5,"responseStart":1165.5999999046326,"secureConnectionStart":920.2999999523163},{"duration":181,"initiatorType":"script","name":"https://www.google-analytics.com/analytics.js","startTime":958,"connectEnd":0,"connectStart":0,"domainLookupEnd":0,"domainLookupStart":0,"fetchStart":958,"redirectEnd":0,"redirectStart":0,"requestStart":0,"responseEnd":1139,"responseStart":0,"secureConnectionStart":0}],"fetchStart":0,"domainLookupStart":0,"domainLookupEnd":0,"connectStart":0,"connectEnd":0,"requestStart":57,"responseStart":195,"responseEnd":214,"domLoading":199,"domInteractive":1155,"domContentLoadedEventStart":1155,"domContentLoadedEventEnd":1217,"domComplete":1704,"loadEventStart":1704,"loadEventEnd":1704,"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","marks":[{"name":"bigPipe.sidebar-id.start","time":1124.7999999523163},{"name":"bigPipe.sidebar-id.end","time":1125.5},{"name":"bigPipe.activity-panel-pipe-id.start","time":1125.5999999046326},{"name":"bigPipe.activity-panel-pipe-id.end","time":1128.7999999523163},{"name":"activityTabFullyLoaded","time":1236.5}],"measures":[],"correlationId":"5aadc00dee50d4","effectiveType":"4g","downlink":10,"rtt":0,"serverDuration":84,"dbReadsTimeInMs":15,"dbConnsTimeInMs":22,"applicationHash":"9d11dbea5f4be3d4cc21f03a88dd11d8c8687422","experiments":[]}}
I see the same issue, but only when BEFORE INSERT trigger exists. For example:
Now lets create test table
Insert without default value generates a warning message:
MariaDB [test]> insert into `test` (`data2`) values ('x');
Query OK, 1 row affected, 1 warning (0.17 sec)
MariaDB [test]> show warnings;
+---------+------+--------------------------------------------+
| Level | Code | Message |
+---------+------+--------------------------------------------+
| Warning | 1364 | Field 'data1' doesn't have a default value |
+---------+------+--------------------------------------------+
1 row in set (0.00 sec)
This is OK - 1 row inserted. And now try to create BEFORE INSERT trigger:
And repeat the same insert:
MariaDB [test]> insert into `test` (`data2`) values ('x');
Query OK, 0 rows affected (0.00 sec)
0 rows affected!!!!