Skip to content

Commit 5af6a13

Browse files
committed
MDEV-25373 DROP TABLE doesn't raise error while dropping non-existing table in MariaDB 10.5.9 when OQGraph SE is loaded to the server
don't auto-succeed every DROP TABLE
1 parent f18e256 commit 5af6a13

File tree

4 files changed

+26
-2
lines changed

4 files changed

+26
-2
lines changed

storage/example/ha_example.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static int example_init_func(void *p)
262262
example_hton->table_options= example_table_option_list;
263263
example_hton->field_options= example_field_option_list;
264264
example_hton->tablefile_extensions= ha_example_exts;
265-
example_hton->drop_table= [](handlerton *, const char*) { return 0; };
265+
example_hton->drop_table= [](handlerton *, const char*) { return -1; };
266266

267267
DBUG_RETURN(0);
268268
}

storage/oqgraph/ha_oqgraph.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ static int oqgraph_init(void *p)
192192
hton->discover_table_structure= oqgraph_discover_table_structure;
193193

194194
hton->close_connection = oqgraph_close_connection;
195-
hton->drop_table= [](handlerton *, const char*) { return 0; };
195+
hton->drop_table= [](handlerton *, const char*) { return -1; };
196196

197197
oqgraph_init_done= TRUE;
198198
return 0;

storage/oqgraph/mysql-test/oqgraph/invalid_operations.result

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,14 @@ update graph set origid=123;
3030
ERROR HY000: Table 'graph' is read only
3131
DROP TABLE graph_base;
3232
DROP TABLE graph;
33+
#
34+
# End of 10.0 tests
35+
#
36+
#
37+
# MDEV-25373 DROP TABLE doesn't raise error while dropping non-existing table in MariaDB 10.5.9 when OQGraph SE is loaded to the server
38+
#
39+
drop table foobar;
40+
ERROR 42S02: Unknown table 'test.foobar'
41+
#
42+
# End of 10.5 tests
43+
#

storage/oqgraph/mysql-test/oqgraph/invalid_operations.test

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,16 @@ update graph set origid=123;
4848
DROP TABLE graph_base;
4949
DROP TABLE graph;
5050

51+
--echo #
52+
--echo # End of 10.0 tests
53+
--echo #
54+
55+
--echo #
56+
--echo # MDEV-25373 DROP TABLE doesn't raise error while dropping non-existing table in MariaDB 10.5.9 when OQGraph SE is loaded to the server
57+
--echo #
58+
--error 1051
59+
drop table foobar;
60+
61+
--echo #
62+
--echo # End of 10.5 tests
63+
--echo #

0 commit comments

Comments
 (0)