Loading mysql-test/r/mysql.result +4 −4 Original line number Diff line number Diff line Loading @@ -36,19 +36,19 @@ Tables_in_test t1 t2 t3 _ Test delimiter : from command line a 1 _ Test delimiter :; from command line a 1 _ Test 'go' command(vertical output) G *************************** 1. row *************************** a: 1 _ Test 'go' command g a 1 Loading mysql-test/r/select.result +6 −0 Original line number Diff line number Diff line Loading @@ -3398,3 +3398,9 @@ drop table t1,t2; SELECT 0.9888889889 * 1.011111411911; 0.9888889889 * 1.011111411911 0.9998769417899202067879 prepare stmt from 'select 1 as " a "'; Warnings: Warning 1466 Leading spaces are removed from name ' a ' execute stmt; a 1 mysql-test/t/mysql.test +4 −4 Original line number Diff line number Diff line Loading @@ -20,16 +20,16 @@ insert into t1 values(1); --disable_query_log # Test delimiter : supplied on the command line select "Test delimiter : from command line" as " "; select "Test delimiter : from command line" as "_"; --exec $MYSQL test --delimiter=":" -e "select * from t1:" # Test delimiter :; supplied on the command line select "Test delimiter :; from command line" as " "; select "Test delimiter :; from command line" as "_"; --exec $MYSQL test --delimiter=":;" -e "select * from t1:;" # Test 'go' command (vertical output) \G select "Test 'go' command(vertical output) \G" as " "; select "Test 'go' command(vertical output) \G" as "_"; --exec $MYSQL test -e "select * from t1\G" # Test 'go' command \g select "Test 'go' command \g" as " "; select "Test 'go' command \g" as "_"; --exec $MYSQL test -e "select * from t1\g" --enable_query_log drop table t1; Loading mysql-test/t/select.test +6 −0 Original line number Diff line number Diff line Loading @@ -2906,3 +2906,9 @@ drop table t1,t2; # Bug #20569: Garbage in DECIMAL results from some mathematical functions # SELECT 0.9888889889 * 1.011111411911; # # Bug #10977: No warning issued if a column name is truncated # prepare stmt from 'select 1 as " a "'; execute stmt; sql/item.cc +6 −0 Original line number Diff line number Diff line Loading @@ -573,6 +573,7 @@ void Item::set_name(const char *str, uint length, CHARSET_INFO *cs) } if (cs->ctype) { uint orig_len= length; /* This will probably need a better implementation in the future: a function in CHARSET_INFO structure. Loading @@ -582,6 +583,11 @@ void Item::set_name(const char *str, uint length, CHARSET_INFO *cs) length--; str++; } if (orig_len != length && !is_autogenerated_name) push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_REMOVED_SPACES, ER(ER_REMOVED_SPACES), str + length - orig_len); } if (!my_charset_same(cs, system_charset_info)) { Loading Loading
mysql-test/r/mysql.result +4 −4 Original line number Diff line number Diff line Loading @@ -36,19 +36,19 @@ Tables_in_test t1 t2 t3 _ Test delimiter : from command line a 1 _ Test delimiter :; from command line a 1 _ Test 'go' command(vertical output) G *************************** 1. row *************************** a: 1 _ Test 'go' command g a 1 Loading
mysql-test/r/select.result +6 −0 Original line number Diff line number Diff line Loading @@ -3398,3 +3398,9 @@ drop table t1,t2; SELECT 0.9888889889 * 1.011111411911; 0.9888889889 * 1.011111411911 0.9998769417899202067879 prepare stmt from 'select 1 as " a "'; Warnings: Warning 1466 Leading spaces are removed from name ' a ' execute stmt; a 1
mysql-test/t/mysql.test +4 −4 Original line number Diff line number Diff line Loading @@ -20,16 +20,16 @@ insert into t1 values(1); --disable_query_log # Test delimiter : supplied on the command line select "Test delimiter : from command line" as " "; select "Test delimiter : from command line" as "_"; --exec $MYSQL test --delimiter=":" -e "select * from t1:" # Test delimiter :; supplied on the command line select "Test delimiter :; from command line" as " "; select "Test delimiter :; from command line" as "_"; --exec $MYSQL test --delimiter=":;" -e "select * from t1:;" # Test 'go' command (vertical output) \G select "Test 'go' command(vertical output) \G" as " "; select "Test 'go' command(vertical output) \G" as "_"; --exec $MYSQL test -e "select * from t1\G" # Test 'go' command \g select "Test 'go' command \g" as " "; select "Test 'go' command \g" as "_"; --exec $MYSQL test -e "select * from t1\g" --enable_query_log drop table t1; Loading
mysql-test/t/select.test +6 −0 Original line number Diff line number Diff line Loading @@ -2906,3 +2906,9 @@ drop table t1,t2; # Bug #20569: Garbage in DECIMAL results from some mathematical functions # SELECT 0.9888889889 * 1.011111411911; # # Bug #10977: No warning issued if a column name is truncated # prepare stmt from 'select 1 as " a "'; execute stmt;
sql/item.cc +6 −0 Original line number Diff line number Diff line Loading @@ -573,6 +573,7 @@ void Item::set_name(const char *str, uint length, CHARSET_INFO *cs) } if (cs->ctype) { uint orig_len= length; /* This will probably need a better implementation in the future: a function in CHARSET_INFO structure. Loading @@ -582,6 +583,11 @@ void Item::set_name(const char *str, uint length, CHARSET_INFO *cs) length--; str++; } if (orig_len != length && !is_autogenerated_name) push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN, ER_REMOVED_SPACES, ER(ER_REMOVED_SPACES), str + length - orig_len); } if (!my_charset_same(cs, system_charset_info)) { Loading