Bug #9391 mysqlshow prints incorrect "rows" information

Submitted: 24 Mar 2005 19:49 Modified: 25 Apr 2005 16:23
Reporter: Sergei Golubchik Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0 OS:
Assigned to: Magnus Blåudd CPU Architecture:Any

[24 Mar 2005 19:49] Sergei Golubchik
Description:
Since the early MySQL days, client-server protocol contains an 'extra_info' field between 'number of fields' and result data. It's only filled in by COM_FILED_LIST and SHOW COLUMNS and set to the number of rows in the table. It's only used by mysqlshow.

In the new SHOW framework in 5.0 this field is no longer set, so mysqlshow displays some garbage.

How to repeat:
% mysqlshow

Suggested fix:
Remove extra_info completely.

"mysql->extra_info=" from libmysql.c and client.c
"Protocol::send_records_num" from protocol.cc
"mysql->extra_info" from mysqlshow.c

mysqlshow.c should use legitimate ways of obtaining number of records. e.g. SELECT COUNT(*) FROM tbl or SHOW TABLE STATUS
(the second is probably better)
[13 Apr 2005 10:22] 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/internals/23951
[15 Apr 2005 11:15] Magnus Blåudd
Pushed to 5.0.5
[25 Apr 2005 16:23] Paul DuBois
Noted in 5.0.5 changelog.

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

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