forked from Percona-QA/percona-qa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
generated_columns.bats
28 lines (21 loc) · 1.29 KB
/
generated_columns.bats
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/env bats
# Created by Shahriyar Rzayev from Percona
# Bats tests for generated columns with MyRocks.
# Will be passed from myrocks-testsuite.sh
CONN=$(cat cl_noprompt)
@test "Adding virtual generated json type column" {
#ALTER="alter table generated_columns_test.sbtest1 add column json_test_v json generated always as (json_array(k,c,pad)) virtual"
run ${CONN} -e "alter table generated_columns_test.sbtest1 add column json_test_v json generated always as (json_array(k,c,pad)) virtual"
echo $output
[ "${lines[0]}" = "ERROR 3106 (HY000) at line 1: 'Specified storage engine' is not supported for generated columns." ]
}
@test "Adding stored generated json type column" {
run ${CONN} -e "alter table generated_columns_test.sbtest1 add column json_test_v json generated always as (json_array(k,c,pad)) stored"
echo $output
[ "${lines[0]}" = "ERROR 3106 (HY000) at line 1: 'Specified storage engine' is not supported for generated columns." ]
}
@test "Adding stored generated varchar type column" {
run ${CONN} -e "alter table generated_columns_test.sbtest1 add column json_test_index varchar(255) generated always as (json_array(k,c,pad)) stored"
echo $output
[ "${lines[0]}" = "ERROR 3106 (HY000) at line 1: 'Specified storage engine' is not supported for generated columns." ]
}