Bug #19857 | When a user with CREATE ROUTINE priv creates a routine it results in NULL p/w | ||
---|---|---|---|
Submitted: | 16 May 2006 16:59 | Modified: | 6 Jul 2006 22:31 |
Reporter: | Erica Moss | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server | Severity: | S1 (Critical) |
Version: | 5.0.21-community-nt | OS: | Windows (win32 - XP SP2) |
Assigned to: | Tatiana Azundris Nuernberg | CPU Architecture: | Any |
[16 May 2006 16:59]
Erica Moss
[24 May 2006 23:54]
ladimir Kolpakov
Confirmed on linux, see below ---- #!/bin/bash #-- "user.Password reset by CREATE PROCEDURE" bug # #--w 05/2006################################ host=localhost #-- Configure this for superuser pwd=super rootcmd="mysql -h$host -uroot -p$pwd mysql -tvvv" #-- Configure this for regular user pwd=secret user=pman cpwd='*14E65567ABDB5135D0CFD9A70B3032C179A49EE7' usercmd="mysql -h$host -u$user -p$pwd test -tvvv" ############################################################ # function create_user() { cat <<EoD GRANT USAGE ON *.* TO $user@'$host' IDENTIFIED BY '$pwd'; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE ROUTINE ON test.* TO $user@'$host'; EoD } #--------------- function show_pwd() { cat <<EoD SELECT Host,User,Password FROM user WHERE Host='$host' AND User='$user' ; EoD } #--------------- function show_user() { cat <<EoD SELECT CURRENT_USER(), DATABASE(); SHOW GRANTS FOR CURRENT_USER(); EoD } #--------------- function drop_proc() { cat <<EoD DROP PROCEDURE IF EXISTS test.someproc; EoD } #--------------- function create_proc() { cat <<EoD DELIMITER // CREATE PROCEDURE someproc() DETERMINISTIC BEGIN DECLARE a INT; SET a=1; SELECT a; END // DELIMITER ; EoD } #--------------- function restore_pwd() { cat <<EoD UPDATE user SET Password='$cpwd' WHERE Host='$host' AND User='$user' ; FLUSH PRIVILEGES; EoD } #--------------- function show_grants() { cat <<EoD SHOW GRANTS FOR $user@'$host'; EoD } ############################################################ #--- Initialisation create_user | $rootcmd show_user | $usercmd show_pwd | $rootcmd show_grants | $rootcmd drop_proc | $usercmd #--- Bug showcase show_pwd | $rootcmd create_proc | $usercmd show_pwd | $rootcmd show_grants | $rootcmd #--- Show error on access attempt cat << EoD =============================== echo "`drop_proc`" | $usercmd EoD drop_proc | $usercmd cat << EoD =============================== EoD #--- Reverse bug consequences restore_pwd | $rootcmd show_pwd | $rootcmd drop_proc | $usercmd show_grants | $rootcmd #--- Paranoid cleanup drop_proc | $rootcmd #--------------- exit 0 ############################################################
[9 Jun 2006 8:07]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/7430
[28 Jun 2006 10:40]
Bugs System
A patch for this bug has been committed. After review, it may be pushed to the relevant source trees for release in the next version. You can access the patch from: http://lists.mysql.com/commits/8391
[28 Jun 2006 16:21]
Chad MILLER
Looks good.
[4 Jul 2006 7:07]
Tatiana Azundris Nuernberg
fixed in 5.0.24
[6 Jul 2006 22:31]
Paul DuBois
Noted in 5.0.24 changelog.
[13 Jul 2006 3:35]
Paul DuBois
Fix went to 5.0.25 instead.