diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result index 5df0b4d9448..f2e591ec629 100644 --- a/mysql-test/r/grant.result +++ b/mysql-test/r/grant.result @@ -1194,6 +1194,7 @@ ERROR 42000: SELECT command denied to user 'mysqltest_2'@'localhost' for table ' DROP DATABASE mysqltest1; DROP DATABASE mysqltest2; DROP USER mysqltest_1@localhost; +DROP USER mysqltest_2@localhost; use test; CREATE TABLE t1 (f1 int, f2 int); INSERT INTO t1 VALUES(1,1), (2,2); @@ -1213,6 +1214,7 @@ f1 f2 REVOKE UPDATE (f1) ON `test`.`t1` FROM 'mysqltest_1'@'localhost'; REVOKE SELECT ON `test`.* FROM 'mysqltest_1'@'localhost'; REVOKE ALL ON db27878.* FROM 'mysqltest_1'@'localhost'; +DROP USER mysqltest_1@localhost; DROP DATABASE db27878; use test; DROP TABLE t1; diff --git a/mysql-test/t/grant.test b/mysql-test/t/grant.test index 73775c95d52..373a1bd7828 100644 --- a/mysql-test/t/grant.test +++ b/mysql-test/t/grant.test @@ -1235,6 +1235,7 @@ DROP DATABASE mysqltest1; DROP DATABASE mysqltest2; DROP USER mysqltest_1@localhost; +DROP USER mysqltest_2@localhost; # # Bug#27878: Unchecked privileges on a view referring to a table from another @@ -1260,6 +1261,7 @@ connection default; REVOKE UPDATE (f1) ON `test`.`t1` FROM 'mysqltest_1'@'localhost'; REVOKE SELECT ON `test`.* FROM 'mysqltest_1'@'localhost'; REVOKE ALL ON db27878.* FROM 'mysqltest_1'@'localhost'; +DROP USER mysqltest_1@localhost; DROP DATABASE db27878; use test; DROP TABLE t1; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 960dda485be..312da4c8206 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -9224,7 +9224,7 @@ static Field *create_tmp_field_from_item(THD *thd, Item *item, TABLE *table, { uint8 dec= item->decimals; uint8 intg= ((Item_decimal *) item)->decimal_precision() - dec; - uint8 len= item->max_length; + uint32 len= item->max_length; /* Trying to put too many digits overall in a DECIMAL(prec,dec)