Skip to content

Commit

Permalink
MDEV-25373 DROP TABLE doesn't raise error while dropping non-existing…
Browse files Browse the repository at this point in the history
… table in MariaDB 10.5.9 when OQGraph SE is loaded to the server

don't auto-succeed every DROP TABLE
  • Loading branch information
vuvova committed Jan 17, 2022
1 parent f18e256 commit 5af6a13
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion storage/example/ha_example.cc
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ static int example_init_func(void *p)
example_hton->table_options= example_table_option_list;
example_hton->field_options= example_field_option_list;
example_hton->tablefile_extensions= ha_example_exts;
example_hton->drop_table= [](handlerton *, const char*) { return 0; };
example_hton->drop_table= [](handlerton *, const char*) { return -1; };

DBUG_RETURN(0);
}
Expand Down
2 changes: 1 addition & 1 deletion storage/oqgraph/ha_oqgraph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static int oqgraph_init(void *p)
hton->discover_table_structure= oqgraph_discover_table_structure;

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

oqgraph_init_done= TRUE;
return 0;
Expand Down
11 changes: 11 additions & 0 deletions storage/oqgraph/mysql-test/oqgraph/invalid_operations.result
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,14 @@ update graph set origid=123;
ERROR HY000: Table 'graph' is read only
DROP TABLE graph_base;
DROP TABLE graph;
#
# End of 10.0 tests
#
#
# 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
#
drop table foobar;
ERROR 42S02: Unknown table 'test.foobar'
#
# End of 10.5 tests
#
13 changes: 13 additions & 0 deletions storage/oqgraph/mysql-test/oqgraph/invalid_operations.test
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,16 @@ update graph set origid=123;
DROP TABLE graph_base;
DROP TABLE graph;

--echo #
--echo # End of 10.0 tests
--echo #

--echo #
--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
--echo #
--error 1051
drop table foobar;

--echo #
--echo # End of 10.5 tests
--echo #

0 comments on commit 5af6a13

Please sign in to comment.