Debian Codegraph @

mysql-test/suite/ndb/t/ndbinfo_upgrade.test

raw
1 --source include/have_ndb.inc
2
3 USE ndbinfo;
4
5 #
6 # Bug#20031425 NDBINFO NAMESPACE FREE CHECK FAILURE
7 # - The SQL commands in scripts/mysql_system_tables.sql
8 # mistakenly detects that someone uses the ndbinfo namespace
9 # and skip to upgrade the schema of ndbinfo
10 #
11
12 SELECT COUNT(*) FROM nodes;
13
14 # Drop table ndbinfo.ndb$nodes to be able to detect if
15 # upgrade has been run or not
16 DROP TABLE ndbinfo.ndb$nodes;
17
18 # Now it should not be possible to read from the nodes view
19 --error ER_VIEW_INVALID
20 SELECT COUNT(*) FROM nodes;
21
22 --let $restart_parameters= restart:--upgrade=FORCE
23 --let $mysqld_name=mysqld.1.1
24 --let $wait_counter= 10000
25 --source include/restart_mysqld.inc
26
27 # The underlying table should have been created and nodes view be readable
28 SELECT COUNT(*) FROM nodes;
29
30 # Check for the ER_NDBINFO_UPGRADING_SCHEMA message in the server log.
31 #
32 --let $assert_file=$MYSQLTEST_VARDIR/log/mysqld.1.1.err
33 --let $assert_only_after=^CURRENT_TEST: ndb.ndbinfo_upgrade\$|Shutdown complete
34 --let $assert_text=Require ER_NDBINFO_UPGRADING_SCHEMA message in server log
35 --let $assert_select=Installing ndbinfo schema version
36 --let $assert_count=1
37 --source include/assert_grep.inc