Loading VC++Files/winmysqladmin/mysql.h +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ typedef struct st_mysql { unsigned long thread_id; /* Id for connection in server */ my_ulonglong affected_rows; my_ulonglong insert_id; /* id if insert on table with NEXTNR */ my_ulonglong extra_info; /* Used by mysqlshow */ my_ulonglong extra_info; /* Not used */ unsigned long packet_length; enum mysql_status status; MYSQL_FIELD *fields; Loading client/mysqlshow.c +14 −2 Original line number Diff line number Diff line Loading @@ -611,6 +611,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table, char query[1024],*end; MYSQL_RES *result; MYSQL_ROW row; ulong rows; if (mysql_select_db(mysql,db)) { Loading @@ -618,6 +619,17 @@ list_fields(MYSQL *mysql,const char *db,const char *table, mysql_error(mysql)); return 1; } sprintf(query,"select count(*) from `%s`", table); if (mysql_query(mysql,query) || !(result=mysql_store_result(mysql))) { fprintf(stderr,"%s: Cannot get record count for db: %s, table: %s: %s\n", my_progname,db,table,mysql_error(mysql)); return 1; } row = mysql_fetch_row(result); rows = (ulong) strtoull(row[0], (char**) 0, 10); mysql_free_result(result); end=strmov(strmov(strmov(query,"show /*!32332 FULL */ columns from `"),table),"`"); if (wild && wild[0]) strxmov(end," like '",wild,"'",NullS); Loading @@ -628,8 +640,8 @@ list_fields(MYSQL *mysql,const char *db,const char *table, return 1; } printf("Database: %s Table: %s Rows: %lu", db,table, (ulong) mysql->extra_info); printf("Database: %s Table: %s Rows: %lu", db, table, rows); if (wild && wild[0]) printf(" Wildcard: %s",wild); putchar('\n'); Loading include/mysql.h +1 −1 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ typedef struct st_mysql MEM_ROOT field_alloc; my_ulonglong affected_rows; my_ulonglong insert_id; /* id if insert on table with NEXTNR */ my_ulonglong extra_info; /* Used by mysqlshow */ my_ulonglong extra_info; /* Not used */ unsigned long thread_id; /* Id for connection in server */ unsigned long packet_length; unsigned int port; Loading libmysqld/lib_sql.cc +0 −5 Original line number Diff line number Diff line Loading @@ -709,11 +709,6 @@ bool Protocol::send_fields(List<Item> *list, uint flags) DBUG_RETURN(1); /* purecov: inspected */ } bool Protocol::send_records_num(List<Item> *list, ulonglong records) { return false; } bool Protocol::write() { if (!thd->mysql) // bootstrap file handling Loading sql-common/client.c +0 −2 Original line number Diff line number Diff line Loading @@ -2446,8 +2446,6 @@ static my_bool cli_read_query_result(MYSQL *mysql) if (!(mysql->server_status & SERVER_STATUS_AUTOCOMMIT)) mysql->server_status|= SERVER_STATUS_IN_TRANS; mysql->extra_info= net_field_length_ll(&pos); /* Maybe number of rec */ if (!(fields=(*mysql->methods->read_rows)(mysql,(MYSQL_FIELD*)0, protocol_41(mysql) ? 7 : 5))) DBUG_RETURN(1); Loading Loading
VC++Files/winmysqladmin/mysql.h +1 −1 Original line number Diff line number Diff line Loading @@ -145,7 +145,7 @@ typedef struct st_mysql { unsigned long thread_id; /* Id for connection in server */ my_ulonglong affected_rows; my_ulonglong insert_id; /* id if insert on table with NEXTNR */ my_ulonglong extra_info; /* Used by mysqlshow */ my_ulonglong extra_info; /* Not used */ unsigned long packet_length; enum mysql_status status; MYSQL_FIELD *fields; Loading
client/mysqlshow.c +14 −2 Original line number Diff line number Diff line Loading @@ -611,6 +611,7 @@ list_fields(MYSQL *mysql,const char *db,const char *table, char query[1024],*end; MYSQL_RES *result; MYSQL_ROW row; ulong rows; if (mysql_select_db(mysql,db)) { Loading @@ -618,6 +619,17 @@ list_fields(MYSQL *mysql,const char *db,const char *table, mysql_error(mysql)); return 1; } sprintf(query,"select count(*) from `%s`", table); if (mysql_query(mysql,query) || !(result=mysql_store_result(mysql))) { fprintf(stderr,"%s: Cannot get record count for db: %s, table: %s: %s\n", my_progname,db,table,mysql_error(mysql)); return 1; } row = mysql_fetch_row(result); rows = (ulong) strtoull(row[0], (char**) 0, 10); mysql_free_result(result); end=strmov(strmov(strmov(query,"show /*!32332 FULL */ columns from `"),table),"`"); if (wild && wild[0]) strxmov(end," like '",wild,"'",NullS); Loading @@ -628,8 +640,8 @@ list_fields(MYSQL *mysql,const char *db,const char *table, return 1; } printf("Database: %s Table: %s Rows: %lu", db,table, (ulong) mysql->extra_info); printf("Database: %s Table: %s Rows: %lu", db, table, rows); if (wild && wild[0]) printf(" Wildcard: %s",wild); putchar('\n'); Loading
include/mysql.h +1 −1 Original line number Diff line number Diff line Loading @@ -231,7 +231,7 @@ typedef struct st_mysql MEM_ROOT field_alloc; my_ulonglong affected_rows; my_ulonglong insert_id; /* id if insert on table with NEXTNR */ my_ulonglong extra_info; /* Used by mysqlshow */ my_ulonglong extra_info; /* Not used */ unsigned long thread_id; /* Id for connection in server */ unsigned long packet_length; unsigned int port; Loading
libmysqld/lib_sql.cc +0 −5 Original line number Diff line number Diff line Loading @@ -709,11 +709,6 @@ bool Protocol::send_fields(List<Item> *list, uint flags) DBUG_RETURN(1); /* purecov: inspected */ } bool Protocol::send_records_num(List<Item> *list, ulonglong records) { return false; } bool Protocol::write() { if (!thd->mysql) // bootstrap file handling Loading
sql-common/client.c +0 −2 Original line number Diff line number Diff line Loading @@ -2446,8 +2446,6 @@ static my_bool cli_read_query_result(MYSQL *mysql) if (!(mysql->server_status & SERVER_STATUS_AUTOCOMMIT)) mysql->server_status|= SERVER_STATUS_IN_TRANS; mysql->extra_info= net_field_length_ll(&pos); /* Maybe number of rec */ if (!(fields=(*mysql->methods->read_rows)(mysql,(MYSQL_FIELD*)0, protocol_41(mysql) ? 7 : 5))) DBUG_RETURN(1); Loading