Public bug reported:
Ubuntu 24.04.1 LTS
mariadb-server 10.11.8
Dear Maintainer,
When attempting to run the Debian start script (/etc/mysql/debian-start)
for MariaDB, a SQL syntax error occurs when using a MyISAM table with a
hyphen in the name. The table name "test-123" triggers the error "ERROR
1064 (42000)":
Oct 24 16:14:53 ubuntu /etc/mysql/debian-start[1621539]: WARNING: mariadb-check
has found corrupt tables
Oct 24 16:14:53 ubuntu /etc/mysql/debian-start[1621539]: ERROR 1064 (42000) at
line 1: 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 '-123' at line 1
There is a bug in the script /usr/share/mysql/debian-start.inc.sh:
SELECT CONCAT("select count(*) into @discard from '\''", TABLE_SCHEMA,
"'\''.'\''", TABLE_NAME, "'\''")
The SQL command fails because the table name is not enclosed in
backticks. Under Ubuntu 22.04 with MariaDB 10.6.18 the corresponding
line is correct and contains the necessary backticks:
select concat('\''select count(*) into @discard from `'\'',
TABLE_SCHEMA, '\''`.`'\'', TABLE_NAME, '\''`'\'')
Best regards
** Affects: mariadb (Ubuntu)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2085554
Title:
debian-start: SQL Syntax Error with Table Name Containing Hyphen
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mariadb/+bug/2085554/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs