| 1 |
--source include/have_ndb.inc |
| 2 |
--source include/have_debug.inc |
| 3 |
|
| 4 |
CREATE TABLE t1 ( |
| 5 |
a int PRIMARY KEY, |
| 6 |
b varchar(255) |
| 7 |
) ENGINE = NDB; |
| 8 |
|
| 9 |
# Bypass the DD table access checks, a normal user is otherwise |
| 10 |
# not allowed to query mysql.tables table, that is the reason this |
| 11 |
# test only works in debug compile |
| 12 |
--disable_query_log ONCE |
| 13 |
SET SESSION debug= '+d,skip_dd_table_access_check'; |
| 14 |
|
| 15 |
let $t1_private_id = |
| 16 |
`SELECT se_private_id FROM mysql.tables |
| 17 |
WHERE NAME = 't1'`; |
| 18 |
#echo t1_private_id: $t1_private_id; |
| 19 |
|
| 20 |
if (!$t1_private_id) |
| 21 |
{ |
| 22 |
die No se_private_id set on table t1; |
| 23 |
} |
| 24 |
|
| 25 |
let $t1_private_data = |
| 26 |
`SELECT se_private_data FROM mysql.tables |
| 27 |
WHERE NAME = 't1'`; |
| 28 |
#echo t1_private_data: $t1_private_data; |
| 29 |
|
| 30 |
if (!$t1_private_data) |
| 31 |
{ |
| 32 |
die No se_private_data set on table t1; |
| 33 |
} |
| 34 |
|
| 35 |
# Check that t1.se_private_data contains object_version= |
| 36 |
if (!`select '$t1_private_data' regexp '.*object_version=[0-9]+.*'`) |
| 37 |
{ |
| 38 |
die No object_version property found in t1.se_private_data; |
| 39 |
} |
| 40 |
|
| 41 |
--disable_query_log ONCE |
| 42 |
SET SESSION debug= '-d,skip_dd_table_access_check'; |
| 43 |
|
| 44 |
DROP TABLE t1; |