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
b167a4ac
Commit
b167a4ac
authored
May 16, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/my/mysql-5.0 sql/sql_select.cc: Auto merged
parents
1004189b
fee5ea44
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
13 deletions
+25
-13
mysql-test/r/ps.result
mysql-test/r/ps.result
+1
-0
mysql-test/t/index_merge_ror.test
mysql-test/t/index_merge_ror.test
+1
-1
mysql-test/t/ps.test
mysql-test/t/ps.test
+3
-0
sql-common/client.c
sql-common/client.c
+6
-3
sql/sql_prepare.cc
sql/sql_prepare.cc
+5
-5
sql/sql_select.cc
sql/sql_select.cc
+3
-1
tests/mysql_client_test.c
tests/mysql_client_test.c
+6
-3
No files found.
mysql-test/r/ps.result
View file @
b167a4ac
drop table if exists t1,t2;
drop database if exists client_test_db;
create table t1
(
a int primary key,
...
...
mysql-test/t/index_merge_ror.test
View file @
b167a4ac
...
...
@@ -185,7 +185,7 @@ explain select st_a from t1 ignore index (st_a) where st_a=1 and st_b=1;
#
# Different value on 32 and 64 bit
--
replace
sta_swt12a
sta_swt21a
--
replace
_result
sta_swt12a
sta_swt21a
sta_swt12a
,
sta_swt12a
,
explain
select
*
from
t1
where
st_a
=
1
and
swt1a
=
1
and
swt2a
=
1
;
explain
select
*
from
t1
where
st_b
=
1
and
swt1b
=
1
and
swt2b
=
1
;
...
...
mysql-test/t/ps.test
View file @
b167a4ac
...
...
@@ -3,6 +3,9 @@
#
--
disable_warnings
drop
table
if
exists
t1
,
t2
;
# Avoid wrong warnings if mysql_client_test fails
drop
database
if
exists
client_test_db
;
--
enable_warnings
create
table
t1
...
...
sql-common/client.c
View file @
b167a4ac
...
...
@@ -650,6 +650,7 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
NET
*
net
=
&
mysql
->
net
;
my_bool
result
=
1
;
init_sigpipe_variables
DBUG_ENTER
(
"cli_advanced_command"
);
/* Don't give sigpipe errors if the client doesn't want them */
set_sigpipe
(
mysql
);
...
...
@@ -657,13 +658,13 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
if
(
mysql
->
net
.
vio
==
0
)
{
/* Do reconnect if possible */
if
(
mysql_reconnect
(
mysql
))
return
1
;
DBUG_RETURN
(
1
)
;
}
if
(
mysql
->
status
!=
MYSQL_STATUS_READY
)
{
DBUG_PRINT
(
"error"
,(
"state: %d"
,
mysql
->
status
));
set_mysql_error
(
mysql
,
CR_COMMANDS_OUT_OF_SYNC
,
unknown_sqlstate
);
return
1
;
DBUG_RETURN
(
1
)
;
}
net
->
last_error
[
0
]
=
0
;
...
...
@@ -702,7 +703,8 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
1
:
0
);
end:
reset_sigpipe
(
mysql
);
return
result
;
DBUG_PRINT
(
"exit"
,(
"result: %d"
,
result
));
DBUG_RETURN
(
result
);
}
void
free_old_query
(
MYSQL
*
mysql
)
...
...
@@ -2458,6 +2460,7 @@ static my_bool cli_read_query_result(MYSQL *mysql)
mysql
->
status
=
MYSQL_STATUS_GET_RESULT
;
mysql
->
field_count
=
(
uint
)
field_count
;
mysql
->
warning_count
=
0
;
DBUG_PRINT
(
"exit"
,(
"ok"
));
DBUG_RETURN
(
0
);
}
...
...
sql/sql_prepare.cc
View file @
b167a4ac
...
...
@@ -1934,12 +1934,12 @@ void reset_stmt_for_execute(THD *thd, LEX *lex)
}
/*
Clears parameters from data left from previous execution or long data
/*
Clears parameters from data left from previous execution or long data
SYNOPSIS
reset_stmt_params()
stmt -
prepared statement for which parameters should be reset
stmt
prepared statement for which parameters should be reset
*/
static
void
reset_stmt_params
(
Prepared_statement
*
stmt
)
...
...
@@ -1955,6 +1955,7 @@ static void reset_stmt_params(Prepared_statement *stmt)
Executes previously prepared query.
If there is any parameters, then replace markers with the data supplied
from client, and then execute the query.
SYNOPSIS
mysql_stmt_execute()
thd Current thread
...
...
@@ -2208,7 +2209,7 @@ void mysql_stmt_fetch(THD *thd, char *packet, uint packet_length)
{
/* assume there is always place for 8-16 bytes */
ulong
stmt_id
=
uint4korr
(
packet
);
ulong
num_rows
=
uint4korr
(
packet
+
=
4
);
ulong
num_rows
=
uint4korr
(
packet
+
4
);
Statement
*
stmt
;
DBUG_ENTER
(
"mysql_stmt_fetch"
);
...
...
@@ -2266,7 +2267,6 @@ void mysql_stmt_reset(THD *thd, char *packet)
/* There is always space for 4 bytes in buffer */
ulong
stmt_id
=
uint4korr
(
packet
);
Prepared_statement
*
stmt
;
DBUG_ENTER
(
"mysql_stmt_reset"
);
if
(
!
(
stmt
=
find_prepared_statement
(
thd
,
stmt_id
,
"mysql_stmt_reset"
)))
...
...
sql/sql_select.cc
View file @
b167a4ac
...
...
@@ -1834,13 +1834,14 @@ Cursor::fetch(ulong num_rows)
THD
*
thd
=
join
->
thd
;
JOIN_TAB
*
join_tab
=
join
->
join_tab
+
join
->
const_tables
;
enum_nested_loop_state
error
=
NESTED_LOOP_OK
;
DBUG_ENTER
(
"Cursor::fetch"
);
DBUG_PRINT
(
"enter"
,(
"rows: %lu"
,
num_rows
));
/* save references to memory, allocated during fetch */
thd
->
set_n_backup_item_arena
(
this
,
&
thd
->
stmt_backup
);
join
->
fetch_limit
+=
num_rows
;
error
=
sub_select
(
join
,
join_tab
,
0
);
if
(
error
==
NESTED_LOOP_OK
||
error
==
NESTED_LOOP_NO_MORE_ROWS
)
error
=
sub_select
(
join
,
join_tab
,
1
);
...
...
@@ -1873,6 +1874,7 @@ Cursor::fetch(ulong num_rows)
else
if
(
error
!=
NESTED_LOOP_KILLED
)
my_message
(
ER_OUT_OF_RESOURCES
,
ER
(
ER_OUT_OF_RESOURCES
),
MYF
(
0
));
}
DBUG_VOID_RETURN
;
}
...
...
tests/mysql_client_test.c
View file @
b167a4ac
...
...
@@ -71,7 +71,7 @@ static const char *embedded_server_groups[]= {
static
time_t
start_time
,
end_time
;
static
double
total_time
;
const
char
*
default_dbug_option
=
"d:t:o,/tmp/client_test.trace"
;
const
char
*
default_dbug_option
=
"d:t:o,/tmp/
mysql_
client_test.trace"
;
struct
my_tests_st
{
...
...
@@ -12942,6 +12942,7 @@ static void test_bug9478()
char
a
[
6
];
ulong
a_len
;
int
rc
,
i
;
DBUG_ENTER
(
"test_bug9478"
);
myheader
(
"test_bug9478"
);
...
...
@@ -13014,6 +13015,7 @@ static void test_bug9478()
for
(
i
=
0
;
i
<
5
;
i
++
)
{
DBUG_PRINT
(
"loop"
,(
"i: %d"
,
i
));
rc
=
mysql_stmt_execute
(
stmt
);
check_execute
(
stmt
,
rc
);
rc
=
mysql_stmt_fetch
(
stmt
);
...
...
@@ -13029,10 +13031,10 @@ static void test_bug9478()
*/
{
char
buff
[
9
];
bzero
(
buff
,
sizeof
(
buff
));
/* Fill in the execute packet */
int4store
(
buff
,
stmt
->
stmt_id
);
int4store
(
buff
+
5
,
1
);
buff
[
4
]
=
0
;
/* Flag */
int4store
(
buff
+
5
,
1
);
/* Return 1 row */
rc
=
((
*
mysql
->
methods
->
advanced_command
)(
mysql
,
COM_EXECUTE
,
buff
,
sizeof
(
buff
),
0
,
0
,
1
)
||
(
*
mysql
->
methods
->
read_query_result
)(
mysql
));
...
...
@@ -13072,6 +13074,7 @@ static void test_bug9478()
rc
=
mysql_query
(
mysql
,
"drop table t1"
);
myquery
(
rc
);
DBUG_VOID_RETURN
;
}
...
...
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