1SET @save_sql_mode=@@sql_mode; 2SET sql_mode=''; 3Warnings: 4Warning 3090 Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release. 5drop procedure if exists p; 6drop procedure if exists p2; 7drop procedure if exists p3; 8create procedure p() 9begin 10declare utf8_var VARCHAR(128) CHARACTER SET UTF8; 11set utf8_var = concat(repeat('A', 128), 'X'); 12show warnings; 13select length(utf8_var), utf8_var; 14end 15$$ 16create procedure p2() 17begin 18declare msg VARCHAR(129) CHARACTER SET UTF8; 19set msg = concat(repeat('A', 128), 'X'); 20select length(msg), msg; 21signal sqlstate '55555' set message_text = msg; 22end 23$$ 24create procedure p3() 25begin 26declare name VARCHAR(65) CHARACTER SET UTF8; 27set name = concat(repeat('A', 64), 'X'); 28select length(name), name; 29signal sqlstate '55555' set 30message_text = 'Message', 31table_name = name; 32end 33$$ 34call p; 35Level Code Message 36Warning 1265 Data truncated for column 'utf8_var' at row 1 37length(utf8_var) utf8_var 38128 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 39call p2; 40length(msg) msg 41129 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX 42ERROR 55555: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 43call p3; 44length(name) name 4565 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX 46ERROR 55555: Message 47drop procedure p; 48drop procedure p2; 49drop procedure p3; 50SET sql_mode=default; 51create procedure p() 52begin 53declare utf8_var VARCHAR(128) CHARACTER SET UTF8; 54set utf8_var = concat(repeat('A', 128), 'X'); 55select length(utf8_var), utf8_var; 56end 57$$ 58create procedure p2() 59begin 60declare msg VARCHAR(129) CHARACTER SET UTF8; 61set msg = concat(repeat('A', 128), 'X'); 62select length(msg), msg; 63signal sqlstate '55555' set message_text = msg; 64end 65$$ 66create procedure p3() 67begin 68declare name VARCHAR(65) CHARACTER SET UTF8; 69set name = concat(repeat('A', 64), 'X'); 70select length(name), name; 71signal sqlstate '55555' set 72message_text = 'Message', 73table_name = name; 74end 75$$ 76call p; 77ERROR 22001: Data too long for column 'utf8_var' at row 1 78call p2; 79length(msg) msg 80129 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX 81ERROR HY000: Data too long for condition item 'MESSAGE_TEXT' 82call p3; 83length(name) name 8465 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAX 85ERROR HY000: Data too long for condition item 'TABLE_NAME' 86drop procedure p; 87drop procedure p2; 88drop procedure p3; 89SET @@sql_mode=@save_sql_mode; 90