Bug #39762 create/drop user returns wrong rowcount

Submitted: 30 Sep 2008 19:38 Modified: 30 Sep 2008 20:37
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Security: Privileges Severity:S3 (Non-critical)
Version:5.0.67/5.1/6.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: qc

[30 Sep 2008 19:38] Peter Laursen
Description:
Here http://bugs.mysql.com/?id=36776 Konstantin asked me to create a seperate report for this issue.

How to repeat:
create user 'fooly'@'localhost' identified by 'sample'; -- returns '0 rows affected'
drop user 'fooly'@'localhost'; -- returns '0 rows affected'

Suggested fix:
well they both affect ONE row in mysql.user table, right?  
Why not then '1 rows affected'
[30 Sep 2008 20:37] MySQL Verification Team
Thank you for the bug report. Verified as described:

mysql 5.1 >create user 'fooly'@'localhost' identified by 'sample';
Query OK, 0 rows affected (0.08 sec)

mysql 5.1 >drop user 'fooly'@'localhost'; -- returns '0 rows affected'
Query OK, 0 rows affected (0.02 sec)

mysql 5.1 >show variables like "%version%";
+-------------------------+---------------------+
| Variable_name           | Value               |
+-------------------------+---------------------+
| protocol_version        | 10                  |
| version                 | 5.1.30-nt-debug-log |
| version_comment         | Source distribution |
| version_compile_machine | ia32                |
| version_compile_os      | Win32               |
+-------------------------+---------------------+
5 rows in set (0.00 sec)

c:\dbs>c:\dbs\6.0\bin\mysql -uroot --port=3600 --prompt="mysql 6.0 > "
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1
Server version: 6.0.8-alpha-nt-debug-log Source distribution

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql 6.0 > create user 'fooly'@'localhost' identified by 'sample'; -- returns '0 rows affected'
Query OK, 0 rows affected (0.05 sec)

mysql 6.0 > drop user 'fooly'@'localhost'; -- returns '0 rows affected'
Query OK, 0 rows affected (0.00 sec)

mysql 6.0 >

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

Page generated in 0.067 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.