| 1 |
# Result differences depending on FS case sensitivity. |
| 2 |
if (!$require_case_insensitive_file_system) |
| 3 |
{ |
| 4 |
--source include/have_case_sensitive_file_system.inc |
| 5 |
} |
| 6 |
|
| 7 |
-- source ../include/ps_truncate_all_tables.inc |
| 8 |
# Tests for sys schema |
| 9 |
# Verify the sys.schema_redundant_indexes / x$schema_flattened_keys views |
| 10 |
|
| 11 |
# Ensure structure changes don't slip in |
| 12 |
DESC sys.schema_redundant_indexes; |
| 13 |
|
| 14 |
# Make sure view select does not error, but ignore results |
| 15 |
--disable_result_log |
| 16 |
SELECT * FROM sys.schema_redundant_indexes; |
| 17 |
--enable_result_log |
| 18 |
|
| 19 |
|
| 20 |
# Ensure structure changes don't slip in |
| 21 |
DESC sys.x$schema_flattened_keys; |
| 22 |
|
| 23 |
# Make sure view select does not error, but ignore results |
| 24 |
--disable_result_log |
| 25 |
SELECT * FROM sys.x$schema_flattened_keys; |
| 26 |
--enable_result_log |
| 27 |
|
| 28 |
# Test correctly identifies keys |
| 29 |
|
| 30 |
CREATE DATABASE rkey; |
| 31 |
|
| 32 |
CREATE TABLE rkey.rkey ( |
| 33 |
i INT, |
| 34 |
j INT, |
| 35 |
k INT, |
| 36 |
PRIMARY KEY (i), |
| 37 |
KEY (j), |
| 38 |
KEY (j, k), |
| 39 |
KEY (i, j, k) |
| 40 |
); |
| 41 |
|
| 42 |
SELECT * FROM sys.schema_redundant_indexes ORDER BY table_name, dominant_index_name; |
| 43 |
|
| 44 |
DROP DATABASE rkey; |