Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
da386f31
Commit
da386f31
authored
Apr 15, 2005
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/bug9391
parents
303af405
3416e429
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
22 deletions
+16
-22
VC++Files/winmysqladmin/mysql.h
VC++Files/winmysqladmin/mysql.h
+1
-1
client/mysqlshow.c
client/mysqlshow.c
+14
-2
include/mysql.h
include/mysql.h
+1
-1
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+0
-5
sql-common/client.c
sql-common/client.c
+0
-2
sql/protocol.cc
sql/protocol.cc
+0
-10
sql/protocol.h
sql/protocol.h
+0
-1
No files found.
VC++Files/winmysqladmin/mysql.h
View file @
da386f31
...
...
@@ -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
;
...
...
client/mysqlshow.c
View file @
da386f31
...
...
@@ -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
))
{
...
...
@@ -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
);
...
...
@@ -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'
);
...
...
include/mysql.h
View file @
da386f31
...
...
@@ -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
;
...
...
libmysqld/lib_sql.cc
View file @
da386f31
...
...
@@ -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
...
...
sql-common/client.c
View file @
da386f31
...
...
@@ -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
);
...
...
sql/protocol.cc
View file @
da386f31
...
...
@@ -645,16 +645,6 @@ bool Protocol::send_fields(List<Item> *list, uint flags)
}
bool
Protocol
::
send_records_num
(
List
<
Item
>
*
list
,
ulonglong
records
)
{
char
*
pos
;
char
buff
[
20
];
pos
=
net_store_length
(
buff
,
(
uint
)
list
->
elements
);
pos
=
net_store_length
(
pos
,
records
);
return
my_net_write
(
&
thd
->
net
,
buff
,(
uint
)
(
pos
-
buff
));
}
bool
Protocol
::
write
()
{
DBUG_ENTER
(
"Protocol::write"
);
...
...
sql/protocol.h
View file @
da386f31
...
...
@@ -54,7 +54,6 @@ class Protocol
enum
{
SEND_NUM_ROWS
=
1
,
SEND_DEFAULTS
=
2
,
SEND_EOF
=
4
};
virtual
bool
send_fields
(
List
<
Item
>
*
list
,
uint
flags
);
bool
send_records_num
(
List
<
Item
>
*
list
,
ulonglong
records
);
bool
store
(
I_List
<
i_string
>
*
str_list
);
bool
store
(
const
char
*
from
,
CHARSET_INFO
*
cs
);
String
*
storage_packet
()
{
return
packet
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment