[MDEV-23408] Wrong result upon query from I_S and further Assertion `!alias_arg || strlen(alias_arg->str) == alias_arg->length' failed with certain connection charset Created: 2020-08-05 Updated: 2021-10-15 Resolved: 2021-10-14 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Character Sets, Information Schema, Views |
| Affects Version/s: | 10.1, 10.2, 10.3, 10.4, 10.5 |
| Fix Version/s: | 10.2.41, 10.3.32, 10.4.22, 10.5.13, 10.6.5, 10.7.1 |
| Type: | Bug | Priority: | Major |
| Reporter: | Elena Stepanova | Assignee: | Alexander Barkov |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Description |
|
The result of SELECT * FROM v is already wrong, it returns the data for table t:
The wrong result is reproducible on 10.1-10.5, debug and non-debug alike. On 10.3+ debug builds, further LOCK causes the assertion failure:
|
| Comments |
| Comment by Alexander Barkov [ 2021-10-11 ] | |||||||||||||||||||||||||||
|
Related problem:
The expected result would be:
| |||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2021-10-11 ] | |||||||||||||||||||||||||||
|
The same crash happens with this script (without VIEWs):
Before the crash, the SELECT returns a wrong record:
| |||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2021-10-11 ] | |||||||||||||||||||||||||||
|
Similar to the above, but without LOCK:
The result looks wrong
| |||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2021-10-12 ] | |||||||||||||||||||||||||||
|
The same problem is repeatable with a condition on TABLE_SCHEMA:
| |||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2021-10-13 ] | |||||||||||||||||||||||||||
|
Related problem:
Notice, the set value is not readable. If I further run:
the set value is still unreadable. | |||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2021-10-13 ] | |||||||||||||||||||||||||||
|
sanja, can you please review a fix: https://github.com/MariaDB/server/commit/901722d7d1fc021197f5f735fbde1c263b6f9028 Note, the patch is for 10.3 to make sure it does not crash after the fix. 10.2 did not crash. It only returned wrong result sets. But the patch should be pushed starting from 10.2. | |||||||||||||||||||||||||||
| Comment by Alexander Barkov [ 2021-10-14 ] | |||||||||||||||||||||||||||
|
sanja, please review a new patch version, now using check_table_name(): https://github.com/MariaDB/server/commit/9789cbef195439a5c1a2351854becae3fd89324f Thanks. | |||||||||||||||||||||||||||
| Comment by Oleksandr Byelkin [ 2021-10-14 ] | |||||||||||||||||||||||||||
|
OK to push |