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
f34ca306
Commit
f34ca306
authored
Sep 15, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mysql.cc:
SQL_SELECT_LIMIT=0 protection client/mysql.cc: SQL_SELECT_LIMIT=0 protection
parent
eeb6f578
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
client/mysql.cc
client/mysql.cc
+9
-1
No files found.
client/mysql.cc
View file @
f34ca306
...
@@ -2842,6 +2842,10 @@ com_status(String *buffer __attribute__((unused)),
...
@@ -2842,6 +2842,10 @@ com_status(String *buffer __attribute__((unused)),
if
(
connected
)
if
(
connected
)
{
{
tee_fprintf
(
stdout
,
"
\n
Connection id:
\t\t
%lu
\n
"
,
mysql_thread_id
(
&
mysql
));
tee_fprintf
(
stdout
,
"
\n
Connection id:
\t\t
%lu
\n
"
,
mysql_thread_id
(
&
mysql
));
/*
Don't remove "limit 1",
it is protection againts SQL_SELECT_LIMIT=0
*/
if
(
!
mysql_query
(
&
mysql
,
"select DATABASE(), USER() limit 1"
)
&&
if
(
!
mysql_query
(
&
mysql
,
"select DATABASE(), USER() limit 1"
)
&&
(
result
=
mysql_use_result
(
&
mysql
)))
(
result
=
mysql_use_result
(
&
mysql
)))
{
{
...
@@ -2886,7 +2890,11 @@ com_status(String *buffer __attribute__((unused)),
...
@@ -2886,7 +2890,11 @@ com_status(String *buffer __attribute__((unused)),
if
((
id
=
mysql_insert_id
(
&
mysql
)))
if
((
id
=
mysql_insert_id
(
&
mysql
)))
tee_fprintf
(
stdout
,
"Insert id:
\t\t
%s
\n
"
,
llstr
(
id
,
buff
));
tee_fprintf
(
stdout
,
"Insert id:
\t\t
%s
\n
"
,
llstr
(
id
,
buff
));
if
(
!
mysql_query
(
&
mysql
,
"select @@character_set_client, @@character_set_connection, @@character_set_server, @@character_set_database"
)
&&
/*
Don't remove "limit 1",
it is protection againts SQL_SELECT_LIMIT=0
*/
if
(
!
mysql_query
(
&
mysql
,
"select @@character_set_client, @@character_set_connection, @@character_set_server, @@character_set_database limit 1"
)
&&
(
result
=
mysql_use_result
(
&
mysql
)))
(
result
=
mysql_use_result
(
&
mysql
)))
{
{
MYSQL_ROW
cur
=
mysql_fetch_row
(
result
);
MYSQL_ROW
cur
=
mysql_fetch_row
(
result
);
...
...
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