mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
Fix spurious permissions problem when CONVERT_TZ() is used
in a multi-table update query. (Bug #9979)
This commit is contained in:
@ -45,6 +45,13 @@ select * from mysql.time_zone_name;
|
||||
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
|
||||
select Name, convert_tz('2004-11-30 12:00:00', Name, 'UTC') from mysql.time_zone_name;
|
||||
ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table 'time_zone_name'
|
||||
drop table t1, t2;
|
||||
create table t1 (a int, b datetime);
|
||||
create table t2 (a int, b varchar(40));
|
||||
update t1 set b = '2005-01-01 10:00';
|
||||
update t1 set b = convert_tz(b, 'UTC', 'UTC');
|
||||
update t1 join t2 on (t1.a = t2.a) set t1.b = '2005-01-01 10:00' where t2.b = 'foo';
|
||||
update t1 join t2 on (t1.a = t2.a) set t1.b = convert_tz('2005-01-01 10:00','UTC','UTC') where t2.b = 'foo';
|
||||
delete from mysql.user where user like 'mysqltest\_%';
|
||||
delete from mysql.db where user like 'mysqltest\_%';
|
||||
delete from mysql.tables_priv where user like 'mysqltest\_%';
|
||||
|
Reference in New Issue
Block a user