File: alter_table_errors.result

package info (click to toggle)
mariadb 1%3A11.8.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 772,520 kB
  • sloc: ansic: 2,414,714; cpp: 1,791,394; asm: 381,336; perl: 62,905; sh: 49,647; pascal: 40,897; java: 39,363; python: 20,791; yacc: 20,432; sql: 17,907; xml: 12,344; ruby: 8,544; cs: 6,542; makefile: 6,145; ada: 1,879; lex: 1,193; javascript: 996; objc: 80; tcl: 73; awk: 46; php: 22
file content (43 lines) | stat: -rw-r--r-- 1,766 bytes parent folder | download
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#
# MDEV-16110 ALTER with ALGORITHM=INPLACE breaks temporary table with virtual columns
#
create table t (a int, v int as (a)) engine=innodb;
alter table t change column a b tinyint, algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Cannot change column type. Try ALGORITHM=COPY
show create table t;
Table	Create Table
t	CREATE TABLE `t` (
  `a` int(11) DEFAULT NULL,
  `v` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
drop table t;
create temporary table t1 (a int, v int as (a));
alter table t1 change column a b int, algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
show create table t1;
Table	Create Table
t1	CREATE TEMPORARY TABLE `t1` (
  `a` int(11) DEFAULT NULL,
  `v` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
create temporary table t2 (a int, v int as (a));
lock table t2 write;
alter table t2 change column a b int, algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
show create table t2;
Table	Create Table
t2	CREATE TEMPORARY TABLE `t2` (
  `a` int(11) DEFAULT NULL,
  `v` int(11) GENERATED ALWAYS AS (`a`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
drop temporary table t1, t2;
unlock tables;
#
# MDEV-18083 ASAN heap-use-after-free in Field::set_warning_truncated_wrong_value upon inserting into temporary table
#
create temporary table t1 (a int);
alter table t1 add column f text;
insert into t1 values ('x','foo');
ERROR 22007: Incorrect integer value: 'x' for column `test`.`t1`.`a` at row 1
drop temporary table t1;
# End of 10.2 tests