[MDEV-11842] Fail to insert on a table where a field has no default Created: 2017-01-19 Updated: 2019-06-26 Resolved: 2017-03-02 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Triggers |
| Affects Version/s: | 10.1.21 |
| Fix Version/s: | 10.1.22, 10.2.5 |
| Type: | Bug | Priority: | Blocker |
| Reporter: | Habib | Assignee: | Sergei Golubchik |
| Resolution: | Fixed | Votes: | 8 |
| Labels: | 10.2-ga, innodb, insert, regression | ||
| Environment: |
Centos 6.8, GCL |
||
| Issue Links: |
|
||||||||||||||||||||||||
| Sprint: | 10.1.22 | ||||||||||||||||||||||||
| Description |
|
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.
The above works for about 20 inserts then fails without error. setting a default for vendor_name allows the query to work again. |
| Comments |
| Comment by Stanislav Petr [ 2017-01-20 ] | ||||||||||||||||||||
|
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:
This is OK - 1 row inserted. And now try to create BEFORE INSERT trigger:
And repeat the same insert:
0 rows affected!!!! | ||||||||||||||||||||
| Comment by Habib [ 2017-01-20 ] | ||||||||||||||||||||
|
I forgot to mention taht a before insert trigger exists. | ||||||||||||||||||||
| Comment by Elena Stepanova [ 2017-01-23 ] | ||||||||||||||||||||
|
Thanks for the report and test case. The problem appeared with the following revision:
The debug version fails with the assertion failure:
| ||||||||||||||||||||
| Comment by azurit [ 2017-02-15 ] | ||||||||||||||||||||
|
Any news? Will this be fixed in 10.1.22? When it's going to be released? Thank you. | ||||||||||||||||||||
| Comment by Sergei Golubchik [ 2017-02-16 ] | ||||||||||||||||||||
|
Yes, it will be fixed in 10.1.22 (that's what the priority "Blocker" mean). The planned release date it at the main https://jira.mariadb.org page (at the moment it says 2017-03-10) |