Bug #5278 Stored procedure packets out of order if SET PASSWORD

Submitted: 28 Aug 2004 3:22 Modified: 9 Feb 2005 12:07
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.2-alpha-debug OS:Linux (SuSE 8.2)
Assigned to: Per-Erik Martin CPU Architecture:Any

[28 Aug 2004 3:22] Peter Gulutzan
Description:
I can say "SET PASSWORD" in a function. Predictably, this leads to trouble. Soon I get 
"Packets out of order". 
 

How to repeat:
mysql> create function pass2 () returns char begin SET PASSWORD FOR 
'bob'@'%.loc.gov' = PASSWORD('newpass'); return 'okay'; end;// 
Query OK, 0 rows affected (0.01 sec) 
 
mysql> select pass2()// 
ERROR 1133 (42000): Can't find any matching row in the user table 
mysql> select pass2()// 
Packets out of order (Found: 5, expected 1) 
ERROR 2013 (HY000): Lost connection to MySQL server during query 
 

Suggested fix:
Don't allow SET PASSWORD in a function.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.048 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.