Details
-
Bug
-
Status: Confirmed (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.11.9
-
Ubuntu 22.04 LTS
Description
Every time I restart my MariaDB server, it comes up with multiple instances of the same two errors in an email to me titled "WARNING: mariadb-check has found corrupt tables".
However, these tables are NOT corrupt. There are two errors occurring here which are BOTH due to the table names not being escaped properly:
- The use of a '-' symbol in the database table name which the script calling mariadb-check isn't escaping
- The use of a space character in the database table name which the script calling mariadb-check isn't escaping
The two examples (also showing that they both work when the database and table names are escaped with a back-tick) are:
MariaDB [(none)]> select count(*) into @discard from mydatabase.mytable-dev;
|
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '-dev' at line 1
|
MariaDB [(none)]> select count(*) into @discard from `mydatabase`.`mytable-dev`;
|
Query OK, 1 row affected (0.000 sec)
|
|
MariaDB [(none)]>
|
and
MariaDB [(none)]> select count(*) into @discard from mydatabase.mytable name;
|
ERROR 1146 (42S02): Table 'mydatabase.mytable' doesn't exist
|
MariaDB [(none)]> select count(*) into @discard from `mydatabase`.`mytable name`;
|
Query OK, 1 row affected (0.001 sec)
|
|
MariaDB [(none)]>
|
I have traced this down to a the following change to debian/additions/debian-start.inc.sh:
https://github.com/MariaDB/server/commit/2adaf5c261df948dc89a2c2520000f8f886184b4
I have fixed my local copy by replacing the 4 instances of the now-superflous '\'' with a single back-tick. The upstream change author seems to have missed that the reason for the apostrophe combination was that the text was previously enclosed with single-quotes. I don't quite understand why the back-ticks were removed.
Happy to submit a push / merge request of my change into the repository, if I can get access to do so.
Attachments
Issue Links
- relates to
-
MDEV-34558 debian-start reports errors when table names contain non ascii characters
- Open