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
901dc028
Commit
901dc028
authored
Dec 07, 2007
by
holyfoot/hf@hfmain.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk@192.168.21.1:mysql-5.1-opt
into mysql.com:/home/hf/work/26921/my51-26921
parents
d349effe
d26de7be
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
libmysqld/lib_sql.cc
libmysqld/lib_sql.cc
+5
-3
tests/mysql_client_test.c
tests/mysql_client_test.c
+11
-0
No files found.
libmysqld/lib_sql.cc
View file @
901dc028
...
@@ -243,9 +243,11 @@ static my_bool emb_read_query_result(MYSQL *mysql)
...
@@ -243,9 +243,11 @@ static my_bool emb_read_query_result(MYSQL *mysql)
mysql
->
warning_count
=
res
->
embedded_info
->
warning_count
;
mysql
->
warning_count
=
res
->
embedded_info
->
warning_count
;
mysql
->
server_status
=
res
->
embedded_info
->
server_status
;
mysql
->
server_status
=
res
->
embedded_info
->
server_status
;
mysql
->
field_count
=
res
->
fields
;
mysql
->
field_count
=
res
->
fields
;
mysql
->
fields
=
res
->
embedded_info
->
fields_list
;
if
(
!
(
mysql
->
fields
=
res
->
embedded_info
->
fields_list
))
{
mysql
->
affected_rows
=
res
->
embedded_info
->
affected_rows
;
mysql
->
affected_rows
=
res
->
embedded_info
->
affected_rows
;
mysql
->
insert_id
=
res
->
embedded_info
->
insert_id
;
mysql
->
insert_id
=
res
->
embedded_info
->
insert_id
;
}
net_clear_error
(
&
mysql
->
net
);
net_clear_error
(
&
mysql
->
net
);
mysql
->
info
=
0
;
mysql
->
info
=
0
;
...
...
tests/mysql_client_test.c
View file @
901dc028
...
@@ -15883,6 +15883,8 @@ static void test_status()
...
@@ -15883,6 +15883,8 @@ static void test_status()
Test that client gets updated value of insert_id on UPDATE that uses
Test that client gets updated value of insert_id on UPDATE that uses
LAST_INSERT_ID(expr).
LAST_INSERT_ID(expr).
select_query added to test for bug
#26921 Problem in mysql_insert_id() Embedded C API function
*/
*/
static
void
test_bug21726
()
static
void
test_bug21726
()
{
{
...
@@ -15895,6 +15897,8 @@ static void test_bug21726()
...
@@ -15895,6 +15897,8 @@ static void test_bug21726()
const
char
*
update_query
=
"UPDATE t1 SET i= LAST_INSERT_ID(i + 1)"
;
const
char
*
update_query
=
"UPDATE t1 SET i= LAST_INSERT_ID(i + 1)"
;
int
rc
;
int
rc
;
my_ulonglong
insert_id
;
my_ulonglong
insert_id
;
const
char
*
select_query
=
"SELECT * FROM t1"
;
MYSQL_RES
*
result
;
DBUG_ENTER
(
"test_bug21726"
);
DBUG_ENTER
(
"test_bug21726"
);
myheader
(
"test_bug21726"
);
myheader
(
"test_bug21726"
);
...
@@ -15911,6 +15915,13 @@ static void test_bug21726()
...
@@ -15911,6 +15915,13 @@ static void test_bug21726()
insert_id
=
mysql_insert_id
(
mysql
);
insert_id
=
mysql_insert_id
(
mysql
);
DIE_UNLESS
(
insert_id
==
3
);
DIE_UNLESS
(
insert_id
==
3
);
rc
=
mysql_query
(
mysql
,
select_query
);
myquery
(
rc
);
insert_id
=
mysql_insert_id
(
mysql
);
DIE_UNLESS
(
insert_id
==
3
);
result
=
mysql_store_result
(
mysql
);
mysql_free_result
(
result
);
DBUG_VOID_RETURN
;
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