Debian Codegraph @

mysql-test/suite/gcol/r/gcol_update.result

raw
1 set global innodb_purge_stop_now = 1;
2 create table t1(f1 int not null, f2 blob not null, f3 blob not null,
3 vchar char(2) as (substr(f3,2,2)) virtual,
4 primary key(f1, f3(5)), index(vchar))engine=innodb;
5 insert into t1(f1,f2,f3) values(1, repeat('a',8000), repeat('b', 9000));
6 update t1 set f1=5 where f1=1;
7 delete from t1 where f1=5;
8 set global innodb_purge_run_now=1;
9 set global innodb_fast_shutdown=0;
10 # restart
11 set global innodb_purge_stop_now = 1;
12 drop table t1;
13 create table t1(f1 int not null, f2 blob not null, f3 blob not null,
14 vchar char(2) as (substr(f3,2,2)) virtual,
15 primary key(f1, f3(5)), index(vchar, f3(2)))engine=innodb;
16 insert into t1(f1,f2,f3) values(1, repeat('a',8000), repeat('b', 9000));
17 update t1 set f1=5 where f1=1;
18 delete from t1 where f1=5;
19 set global innodb_purge_run_now=1;
20 set global innodb_fast_shutdown=0;
21 # restart
22 set global innodb_purge_stop_now = 1;
23 drop table t1;
24 create table t1(f1 int not null, f2 blob not null, f3 blob not null,
25 vchar blob as (f3) virtual,
26 primary key(f1, f3(5)), index(vchar(3)))engine=innodb;
27 insert into t1(f1,f2,f3) values(1, repeat('a',8000), repeat('b', 9000));
28 update t1 set f1=5 where f1=1;
29 delete from t1 where f1=5;
30 set global innodb_purge_run_now=1;
31 set global innodb_fast_shutdown=0;
32 # restart
33 drop table t1;
34 #
35 # Bug #26838771: GCOL: INCORRECT BEHAVIOR WITH UPDATE ON FLY
36 #
37 CREATE TABLE t1(c1 INT);
38 CREATE TABLE t2(c1 INT, c2 JSON, c3 varchar(15) GENERATED ALWAYS AS
39 (concat(c2,_utf8mb4'x')) VIRTUAL);
40 CREATE TABLE t3(c1 JSON, c2 INT GENERATED ALWAYS AS ((c1 + 1)) VIRTUAL);
41 INSERT INTO t2(c1,c2) VALUES(1, '{"tr": "x"}'), (2, '{"tr": "x"}');
42 INSERT INTO t3(c1) VALUES(CAST(7 AS JSON));
43 UPDATE t3 SET c2 = 0;
44 ERROR HY000: The value specified for generated column 'c2' in table 't3' is not allowed.
45 UPDATE t3 JOIN t2 ON (t3.c1 = t2.c1) SET t3.c2 = 0;
46 ERROR HY000: The value specified for generated column 'c2' in table 't3' is not allowed.
47 UPDATE t1 RIGHT JOIN
48 t2 ON (t1.c1 = t2.c1),
49 t3
50 SET t2.c2 = 'tr', t3.c2 = 0;
51 ERROR HY000: The value specified for generated column 'c2' in table 't3' is not allowed.
52 DROP TABLE t1,t2,t3;