Debian Codegraph @

mysql-test/suite/x/t/insert_table_missing_notnull_column.test

raw
1 ## generated
2 ## Rel: Missing not null column
3
4 --source include/xplugin_preamble.inc
5 --source include/xplugin_create_user.inc
6
7 create schema xtest default charset='utf8mb4';
8
9 ## Test starts here
10 --write_file $MYSQL_TMP_DIR/insert_table_missing_notnull_column.xpl
11 ## Test data
12 -->sql
13 use xtest;
14 create table mytable (i int NOT NULL, ui int unsigned, vc varchar(100), f float, d double, dt datetime, ts timestamp(5), j json);
15 -->endsql
16
17 Mysqlx.Crud.Insert {
18 collection {
19 name: "mytable"
20 schema: "xtest"
21 }
22 data_model: TABLE
23 projection {
24 name: "vc"
25 }
26 row {
27 field {
28 type: LITERAL
29 literal {
30 type: V_STRING
31 v_string {
32 value: "x"
33 }
34 }
35 }
36 }
37 }
38
39 ## expect Mysqlx.Error
40 -->recv
41 EOF
42
43 --exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/insert_table_missing_notnull_column.xpl 2>&1
44
45 ## Cleanup
46 --source ../include/xplugin_cleanup.inc