[MDEV-32833] InnoDB wrong error message Created: 2023-11-18 Updated: 2023-11-29 Resolved: 2023-11-29 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB, Tests |
| Affects Version/s: | 10.4, 10.5, 10.6, 10.7, 10.8, 10.9, 10.10, 10.11, 11.0, 11.1, 11.2, 11.3 |
| Fix Version/s: | 10.4.33, 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3, 11.3.2 |
| Type: | Bug | Priority: | Major |
| Reporter: | Kristian Nielsen | Assignee: | Marko Mäkelä |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
This is seen as a random test failure of innodb.innodb-page_compression_tables in Buildbot when run immediately after innodb.foreign-keys:
A simpler testcase shows the problem:
The incorrect warning in the SHOW WARNINGS after the CREATE TABLE comes from trx->detailed_error. This is set by the failing INSERT, and errorneously does not get cleared before the error is thrown from CREATE TABLE. Thus, the old message is wrongly shown as part of the SHOW WARNINGS. I'm not sure where the best place would be to clear the trx->detailed_error, so assigning to you Marko in case you know. The bug probably isn't very critical from a user point of view, but it would be really good to get the random test failure fixed. So if we cannot get the underlying bug fixed quickly, I suggest to leave this bug open but fix the test case to not fail randomly (which is simple, just run a successful SELECT or something to clear the trx->detailed_error). |
| Comments |
| Comment by Marko Mäkelä [ 2023-11-29 ] |
|
The trx_t::detailed_error was originally introduced in a fix of MySQL Bug #3443. The apparent intention was to make this string empty at the start of every statement. Because ha_innobase::start_stmt() will not be invoked for DDL statements, the previous error string would not be cleared. I think that the simplest fix of this is to clear the trx_t::detailed_error string in trx_t::commit_in_memory(). |