mirror of
https://github.com/MariaDB/server.git
synced 2025-01-24 07:44:22 +01:00
Merge bk@192.168.21.1:mysql-5.1-opt
into mysql.com:/home/hf/work/28333/my51-28333
This commit is contained in:
commit
a7f5132591
1 changed files with 11 additions and 1 deletions
|
@ -480,6 +480,10 @@ void handle_error(struct st_command*,
|
||||||
void handle_no_error(struct st_command*);
|
void handle_no_error(struct st_command*);
|
||||||
|
|
||||||
#ifdef EMBEDDED_LIBRARY
|
#ifdef EMBEDDED_LIBRARY
|
||||||
|
|
||||||
|
/* attributes of the query thread */
|
||||||
|
pthread_attr_t cn_thd_attrib;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
send_one_query executes query in separate thread what is
|
send_one_query executes query in separate thread what is
|
||||||
necessary in embedded library to run 'send' in proper way.
|
necessary in embedded library to run 'send' in proper way.
|
||||||
|
@ -518,7 +522,7 @@ static int do_send_query(struct st_connection *cn, const char *q, int q_len,
|
||||||
cn->cur_query= q;
|
cn->cur_query= q;
|
||||||
cn->cur_query_len= q_len;
|
cn->cur_query_len= q_len;
|
||||||
cn->query_done= 0;
|
cn->query_done= 0;
|
||||||
if (pthread_create(&tid, NULL, send_one_query, (void*)cn))
|
if (pthread_create(&tid, &cn_thd_attrib, send_one_query, (void*)cn))
|
||||||
die("Cannot start new thread for query");
|
die("Cannot start new thread for query");
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -5985,6 +5989,12 @@ int main(int argc, char **argv)
|
||||||
next_con= connections + 1;
|
next_con= connections + 1;
|
||||||
cur_con= connections;
|
cur_con= connections;
|
||||||
|
|
||||||
|
#ifdef EMBEDDED_LIBRARY
|
||||||
|
/* set appropriate stack for the 'query' threads */
|
||||||
|
(void) pthread_attr_init(&cn_thd_attrib);
|
||||||
|
pthread_attr_setstacksize(&cn_thd_attrib, DEFAULT_THREAD_STACK);
|
||||||
|
#endif /*EMBEDDED_LIBRARY*/
|
||||||
|
|
||||||
/* Init file stack */
|
/* Init file stack */
|
||||||
memset(file_stack, 0, sizeof(file_stack));
|
memset(file_stack, 0, sizeof(file_stack));
|
||||||
file_stack_end=
|
file_stack_end=
|
||||||
|
|
Loading…
Add table
Reference in a new issue