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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
9de15fa9
Commit
9de15fa9
authored
Feb 25, 2006
by
brian@zim.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into zim.(none):/home/brian/mysql/dep-5.1
parents
3f3473cf
7234f79c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
+14
-0
client/mysqlimport.c
client/mysqlimport.c
+8
-0
client/mysqlslap.c
client/mysqlslap.c
+6
-0
No files found.
client/mysqlimport.c
View file @
9de15fa9
...
...
@@ -29,12 +29,16 @@
#include "client_priv.h"
#include "mysql_version.h"
#ifdef HAVE_LIBPTHREAD
#include <my_pthread.h>
#endif
/* Global Thread counter */
int
counter
=
0
;
#ifdef HAVE_LIBPTHREAD
pthread_mutex_t
counter_mutex
;
#endif
static
void
db_error_with_table
(
MYSQL
*
mysql
,
char
*
table
);
static
void
db_error
(
MYSQL
*
mysql
);
...
...
@@ -516,6 +520,7 @@ static char *field_escape(char *to,const char *from,uint length)
int
exitcode
=
0
;
#ifdef HAVE_LIBPTHREAD
pthread_handler_t
worker_thread
(
void
*
arg
)
{
int
error
;
...
...
@@ -554,6 +559,7 @@ error:
return
0
;
}
#endif
int
main
(
int
argc
,
char
**
argv
)
...
...
@@ -571,6 +577,7 @@ int main(int argc, char **argv)
return
(
1
);
}
#ifdef HAVE_LIBPTHREAD
if
(
opt_use_threads
&&
!
lock_tables
)
{
pthread_t
mainthread
;
/* Thread descriptor */
...
...
@@ -621,6 +628,7 @@ loop_label:
VOID
(
pthread_mutex_destroy
(
&
counter_mutex
));
}
else
#endif
{
MYSQL
*
mysql
=
0
;
if
(
!
(
mysql
=
db_connect
(
current_host
,
current_db
,
current_user
,
opt_password
)))
...
...
client/mysqlslap.c
View file @
9de15fa9
...
...
@@ -76,7 +76,9 @@ TODO:
#define RAND_STRING_SIZE 126
#include "client_priv.h"
#ifdef HAVE_LIBPTHREAD
#include <my_pthread.h>
#endif
#include <my_sys.h>
#include <m_string.h>
#include <mysql.h>
...
...
@@ -987,6 +989,7 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
exit
(
0
);
}
#ifdef HAVE_LIBPTHREAD
if
(
opt_use_threads
)
{
pthread_t
mainthread
;
/* Thread descriptor */
...
...
@@ -1008,8 +1011,11 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
}
}
}
#endif
#ifndef __WIN__
#ifdef HAVE_LIBPTHREAD
else
#endif
{
fflush
(
NULL
);
for
(
x
=
0
;
x
<
concur
;
x
++
)
...
...
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