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
53f34e0c
Commit
53f34e0c
authored
Mar 24, 2008
by
gkodinov/kgeorge@magare.gmz
Browse files
Options
Browse Files
Download
Plain Diff
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into magare.gmz:/home/kgeorge/mysql/autopush/warnings-5.1-opt
parents
ba2ba454
0b9d543a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
9 deletions
+35
-9
client/mysqltest.c
client/mysqltest.c
+25
-9
mysql-test/r/flush.result
mysql-test/r/flush.result
+1
-0
mysql-test/t/flush.test
mysql-test/t/flush.test
+9
-0
No files found.
client/mysqltest.c
View file @
53f34e0c
...
@@ -536,6 +536,17 @@ static int do_send_query(struct st_connection *cn, const char *q, int q_len,
...
@@ -536,6 +536,17 @@ static int do_send_query(struct st_connection *cn, const char *q, int q_len,
return
0
;
return
0
;
}
}
static
void
wait_query_thread_end
(
struct
st_connection
*
con
)
{
if
(
!
con
->
query_done
)
{
pthread_mutex_lock
(
&
con
->
mutex
);
while
(
!
con
->
query_done
)
pthread_cond_wait
(
&
con
->
cond
,
&
con
->
mutex
);
pthread_mutex_unlock
(
&
con
->
mutex
);
}
}
#else
/*EMBEDDED_LIBRARY*/
#else
/*EMBEDDED_LIBRARY*/
#define do_send_query(cn,q,q_len,flags) mysql_send_query(&cn->mysql, q, q_len)
#define do_send_query(cn,q,q_len,flags) mysql_send_query(&cn->mysql, q, q_len)
...
@@ -4069,7 +4080,14 @@ void do_close_connection(struct st_command *command)
...
@@ -4069,7 +4080,14 @@ void do_close_connection(struct st_command *command)
con
->
mysql
.
net
.
vio
=
0
;
con
->
mysql
.
net
.
vio
=
0
;
}
}
}
}
#endif
#else
/*
As query could be still executed in a separate theread
we need to check if the query's thread was finished and probably wait
(embedded-server specific)
*/
wait_query_thread_end
(
con
);
#endif
/*EMBEDDED_LIBRARY*/
if
(
con
->
stmt
)
if
(
con
->
stmt
)
mysql_stmt_close
(
con
->
stmt
);
mysql_stmt_close
(
con
->
stmt
);
con
->
stmt
=
0
;
con
->
stmt
=
0
;
...
@@ -4355,6 +4373,9 @@ void do_connect(struct st_command *command)
...
@@ -4355,6 +4373,9 @@ void do_connect(struct st_command *command)
(
int
)
(
sizeof
(
connections
)
/
sizeof
(
struct
st_connection
)));
(
int
)
(
sizeof
(
connections
)
/
sizeof
(
struct
st_connection
)));
}
}
#ifdef EMBEDDED_LIBRARY
con_slot
->
query_done
=
1
;
#endif
if
(
!
mysql_init
(
&
con_slot
->
mysql
))
if
(
!
mysql_init
(
&
con_slot
->
mysql
))
die
(
"Failed on mysql_init()"
);
die
(
"Failed on mysql_init()"
);
if
(
opt_compress
||
con_compress
)
if
(
opt_compress
||
con_compress
)
...
@@ -5857,12 +5878,7 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
...
@@ -5857,12 +5878,7 @@ void run_query_normal(struct st_connection *cn, struct st_command *command,
query's thread was finished and probably wait
query's thread was finished and probably wait
*/
*/
else
if
(
flags
&
QUERY_REAP_FLAG
)
else
if
(
flags
&
QUERY_REAP_FLAG
)
{
wait_query_thread_end
(
cn
);
pthread_mutex_lock
(
&
cn
->
mutex
);
while
(
!
cn
->
query_done
)
pthread_cond_wait
(
&
cn
->
cond
,
&
cn
->
mutex
);
pthread_mutex_unlock
(
&
cn
->
mutex
);
}
#endif
/*EMBEDDED_LIBRARY*/
#endif
/*EMBEDDED_LIBRARY*/
if
(
!
(
flags
&
QUERY_REAP_FLAG
))
if
(
!
(
flags
&
QUERY_REAP_FLAG
))
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
...
...
mysql-test/r/flush.result
View file @
53f34e0c
...
@@ -72,6 +72,7 @@ flush tables with read lock;
...
@@ -72,6 +72,7 @@ flush tables with read lock;
unlock tables;
unlock tables;
drop table t1, t2;
drop table t1, t2;
set session low_priority_updates=default;
set session low_priority_updates=default;
select benchmark(200, (select sin(1))) > 1000;
End of 5.0 tests
End of 5.0 tests
set @old_general_log= @@general_log;
set @old_general_log= @@general_log;
set @old_read_only= @@read_only;
set @old_read_only= @@read_only;
...
...
mysql-test/t/flush.test
View file @
53f34e0c
...
@@ -164,6 +164,15 @@ drop table t1, t2;
...
@@ -164,6 +164,15 @@ drop table t1, t2;
set
session
low_priority_updates
=
default
;
set
session
low_priority_updates
=
default
;
#
# Bug #33334 mysqltest_embedded crashes when disconnecting before reap
#
connect
(
con1
,
localhost
,
root
,,);
send
select
benchmark
(
200
,
(
select
sin
(
1
)))
>
1000
;
disconnect
con1
;
connection
default
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
#
#
...
...
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