Bug #9391 mysqlshow prints incorrect "rows" information
Submitted: 24 Mar 2005 20:49 Modified: 25 Apr 2005 18:23
Reporter: Sergei Golubchik
Status: Closed
Category:Server Severity:S3 (Non-critical)
Version:5.0 OS:
Assigned to: Magnus Svensson Target Version:

[24 Mar 2005 20: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 12: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 13:15] Magnus Svensson
Pushed to 5.0.5
[25 Apr 2005 18:23] Paul DuBois
Noted in 5.0.5 changelog.