create schema assignment_conversion_to_year;
set current_schema = assignment_conversion_to_year;
set dolphin.b_compatibility_mode = on;
create table test_type_table
(
`int1` tinyint,
`uint1` tinyint unsigned,
`int2` smallint,
`uint2` smallint unsigned,
`int4` integer,
`uint4` integer unsigned,
`int8` bigint,
`uint8` bigint unsigned,
`float4` float4,
`float8` float8,
`numeric` decimal(20, 6),
`bit1` bit(1),
`bit64` bit(64),
`boolean` boolean,
`date` date,
`time` time,
`time(4)` time(4),
`datetime` datetime,
`datetime(4)` datetime(4) default '2022-11-11 11:11:11',
`timestamp` timestamp,
`timestamp(4)` timestamp(4) default '2022-11-11 11:11:11',
`year` year,
`char` char(100),
`varchar` varchar(100),
`binary` binary(100),
`varbinary` varbinary(100),
`tinyblob` tinyblob,
`blob` blob,
`mediumblob` mediumblob,
`longblob` longblob,
`text` text,
`enum_t` enum('a', 'b', 'c'),
`set_t` set('a', 'b', 'c'),
`json` json
);
insert into test_type_table values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, b'1', b'111', true, '2023-02-05', '19:10:50', '19:10:50.3456', '2023-02-05 19:10:50', '2023-02-05 19:10:50.456', '2023-02-05 19:10:50', '2023-02-05 19:10:50.456', '2023', '1.23a', '1.23a', '1.23a', '1.23a', '1.23a', '1.23a', '1.23a', '1.23a', '1.23a', 'a', 'a,c', json_object('a', 1, 'b', 2));
update test_type_table set `year` = `int1`;
update test_type_table set `year` = `uint1`;
update test_type_table set `year` = `int2`;
update test_type_table set `year` = `uint2`;
update test_type_table set `year` = `int4`;
update test_type_table set `year` = `uint4`;
update test_type_table set `year` = `int8`;
update test_type_table set `year` = `uint8`;
update test_type_table set `year` = `float4`;
update test_type_table set `year` = `float8`;
update test_type_table set `year` = `numeric`;
update test_type_table set `year` = `bit1`;
update test_type_table set `year` = `bit64`;
update test_type_table set `year` = `boolean`;
update test_type_table set `year` = `date`;
update test_type_table set `year` = `time`;
update test_type_table set `year` = `time(4)`;
update test_type_table set `year` = `datetime`;
update test_type_table set `year` = `datetime(4)`;
update test_type_table set `year` = `timestamp`;
update test_type_table set `year` = `timestamp(4)`;
update test_type_table set `year` = `year`;
update test_type_table set `year` = `char`;
update test_type_table set `year` = `varchar`;
update test_type_table set `year` = `binary`;
update test_type_table set `year` = `varbinary`;
update test_type_table set `year` = `tinyblob`;
update test_type_table set `year` = `blob`;
update test_type_table set `year` = `mediumblob`;
update test_type_table set `year` = `longblob`;
update test_type_table set `year` = `text`;
update test_type_table set `year` = `enum_t`;
update test_type_table set `year` = `set_t`;
update test_type_table set `year` = `json`;
update ignore test_type_table set `year` = `int1`;
update ignore test_type_table set `year` = `uint1`;
update ignore test_type_table set `year` = `int2`;
update ignore test_type_table set `year` = `uint2`;
update ignore test_type_table set `year` = `int4`;
update ignore test_type_table set `year` = `uint4`;
update ignore test_type_table set `year` = `int8`;
update ignore test_type_table set `year` = `uint8`;
update ignore test_type_table set `year` = `float4`;
update ignore test_type_table set `year` = `float8`;
update ignore test_type_table set `year` = `numeric`;
update ignore test_type_table set `year` = `bit1`;
update ignore test_type_table set `year` = `bit64`;
update ignore test_type_table set `year` = `boolean`;
update ignore test_type_table set `year` = `date`;
update ignore test_type_table set `year` = `time`;
update ignore test_type_table set `year` = `time(4)`;
update ignore test_type_table set `year` = `datetime`;
update ignore test_type_table set `year` = `datetime(4)`;
update ignore test_type_table set `year` = `timestamp`;
update ignore test_type_table set `year` = `timestamp(4)`;
update ignore test_type_table set `year` = `year`;
update ignore test_type_table set `year` = `char`;
update ignore test_type_table set `year` = `varchar`;
update ignore test_type_table set `year` = `binary`;
update ignore test_type_table set `year` = `varbinary`;
update ignore test_type_table set `year` = `tinyblob`;
update ignore test_type_table set `year` = `blob`;
update ignore test_type_table set `year` = `mediumblob`;
update ignore test_type_table set `year` = `longblob`;
update ignore test_type_table set `year` = `text`;
update ignore test_type_table set `year` = `enum_t`;
update ignore test_type_table set `year` = `set_t`;
update ignore test_type_table set `year` = `json`;
drop table test_type_table;
reset current_schema;
drop schema assignment_conversion_to_year;