## Verify if X Plugin can transfer a large amount of warnings --source include/xplugin_preamble.inc --source include/xplugin_create_user.inc ## Test starts here --write_file $MYSQL_TMP_DIR/testcase.tmp ## Test data import assert_messages.macro; echo ## 1. Setup the test; echo ## 2. Trigger warnings; echo ## a. trigger small amount of warnings (2); echo ## b. trigger large amount of warnings (14998); echo; echo # Ad 1.; echo #; noquery_result; USE test; CREATE TABLE table_with_ints(i INTEGER); SET max_error_count=20000; -->varlet %FIELDS% -->repeat 4999 varlet %FIELDS% %FIELDS%i/0,i/'s',; -->endrepeat varlet %FIELDS% %FIELDS%i/0; echo; echo # Ad 2.a.; echo #; INSERT INTO table_with_ints(i) VALUES(1),(0),(1),(0); expectwarnings ER_DIVISION_BY_ZERO; SELECT 1/i FROM table_with_ints; callmacro Assert_received_messages Mysqlx.Notice.Warning 2; echo; echo # Ad 2.b.; echo #; DELETE FROM table_with_ints WHERE TRUE; INSERT INTO table_with_ints(i) VALUES(1); expectwarnings ER_TRUNCATED_WRONG_VALUE,ER_DIVISION_BY_ZERO; varsub %FIELDS%; SELECT %FIELDS% FROM table_with_ints; callmacro Assert_received_messages Mysqlx.Notice.Warning 15000; EOF --exec $MYSQLXTEST -ux_root --password='' --file=$MYSQL_TMP_DIR/testcase.tmp 2>&1 ## Cleanup DROP TABLE table_with_ints; --remove_file $MYSQL_TMP_DIR/testcase.tmp --source include/xplugin_drop_user.inc