[MDEV-30170] no error for DROP TABLE and no warning for DROP TABLE IF EXISTS with absent table when Spider plugin is included Created: 2022-11-29  Updated: 2024-01-11  Resolved: 2024-01-11

Status: Closed
Project: MariaDB Server
Component/s: Server, Storage Engine - Spider
Affects Version/s: 10.5, 10.6, 10.10, 10.11, 11.0, 11.1, 11.2, 11.3
Fix Version/s: 10.5.24, 10.6.17, 10.11.7, 11.0.5, 11.1.4, 11.2.3

Type: Bug Priority: Major
Reporter: Roman Assignee: Yuchen Pei
Resolution: Fixed Votes: 0
Labels: not-10.4

Issue Links:
Duplicate
is duplicated by MDEV-32505 Spider: DROP TABLE succeeds where it ... Closed
Problem/Incident
is caused by MDEV-11412 Ensure that table is truly dropped wh... Closed
Sprint: 2022-22

 Description   

Tested with 10.6.11-6-MariaDB server,
rocky linux 8 (also seen at several more RPM-linuxes),
only if spider plugin is enabled during MariaDB server build (cmake -DPLUGIN_SPIDER=YES).

Use any database and any non-existing table name.

DROP TABLE non_existing_table;

  • should be:
    ERROR 42S02: Unknown table 'auto_test_local.non_existing_table'
  • actual:
    Query OK, 0 rows affected (0.005 sec)

DROP TABLE IF EXISTS non_existing_table;

  • should be:
    Warnings: Note 1051 Unknown table 'non_existing_table'
  • actual:
    Query OK, 0 rows affected (0.005 sec)


 Comments   
Comment by Elena Stepanova [ 2022-12-06 ]

Likely related to MDEV-22826 fix.

Comment by Yuchen Pei [ 2023-10-18 ]

We got a fresher ticket reporting the same problem: MDEV-32505

Comment by Yuchen Pei [ 2023-12-19 ]

Hi holyfoot, ptal thanks

upstream/bb-10.5-mdev-30170 df43219e708ad554330a2ac06d7789eb7303a91b
MDEV-30170 ha_spider::delete_table() should report table not exist
 
All Spider tables are recorded in the system table
mysql.spider_tables. Deleting a spider table removes the corresponding
rows from the system table, among other things. This patch makes it so
that if spider could not find any record in the system table to delete
for a given table, it should correctly report that no such Spider
table exists.

For 11.0 see

b3d6de943bf upstream/bb-11.0-mdev-30170 MDEV-30170 ha_spider::delete_table() should report table not exist

Comment by Alexey Botchkov [ 2024-01-05 ]

ok to push.

Comment by Yuchen Pei [ 2024-01-11 ]

pushed 9e9e0b99ade0e6ccd34abc3bc3abaf7bbd5ecf4e to 10.5

Generated at Thu Feb 08 10:14:11 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.