[MDEV-13463] Unescaped table name during detection of table structure Created: 2017-08-07  Updated: 2020-12-01

Status: Confirmed
Project: MariaDB Server
Component/s: Storage Engine - Connect
Affects Version/s: 10.0, 10.1, 10.1.25, 10.2
Fix Version/s: 10.2

Type: Bug Priority: Trivial
Reporter: Pavel Hadač Assignee: Olivier Bertrand
Resolution: Unresolved Votes: 0
Labels: None


 Description   

Engine CONNECT doesn't escape table name when autodetecting table structure for TABLE_TYPE=MYSQL using SHOW columns FROM source_table.

That means that following query fails:

CREATE TABLE new_table ENGINE=CONNECT TABLE_TYPE=MYSQL CONNECTION='mysql://user:pass@hostname/db_name/85e3adc9789111e7960b00163e6c8245'

Escaping table name within the CREATE doesn't help. The CREATE works, but the engine retrieves data using invalid double escaped query

SELECT * FROM ``85e3adc9789111e7960b00163e6c8245``.

The create works fine with explicit definition of columns.


Generated at Thu Feb 08 08:05:47 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.