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
94bf0163
Commit
94bf0163
authored
Jun 28, 2012
by
Sergey Petrunya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql_select.cc: work compiler warnings
my_apc-t.cc: make it compile on Windows.
parent
84fd4e25
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
10 deletions
+9
-10
sql/sql_select.cc
sql/sql_select.cc
+2
-3
unittest/sql/my_apc-t.cc
unittest/sql/my_apc-t.cc
+7
-7
No files found.
sql/sql_select.cc
View file @
94bf0163
...
...
@@ -15804,12 +15804,11 @@ do_select(JOIN *join,List<Item> *fields,TABLE *table,Procedure *procedure)
{
DBUG_ASSERT
(
join
->
table_count
);
THD
*
thd
=
join
->
thd
;
DBUG_EXECUTE_IF
(
"show_explain_probe_do_select"
,
if
(
dbug_user_var_equals_int
(
thd
,
if
(
dbug_user_var_equals_int
(
join
->
thd
,
"show_explain_probe_select_id"
,
join
->
select_lex
->
select_number
))
dbug_serve_apcs
(
thd
,
1
);
dbug_serve_apcs
(
join
->
thd
,
1
);
);
if
(
join
->
outer_ref_cond
&&
!
join
->
outer_ref_cond
->
val_int
())
...
...
unittest/sql/my_apc-t.cc
View file @
94bf0163
...
...
@@ -53,7 +53,7 @@ mysql_mutex_t target_mutex;
int
int_rand
(
int
size
)
{
return
round
(
((
double
)
rand
()
/
RAND_MAX
)
*
size
);
return
(
int
)
(
0.5
+
((
double
)
rand
()
/
RAND_MAX
)
*
size
);
}
/*
...
...
@@ -71,12 +71,12 @@ void *test_apc_service_thread(void *ptr)
while
(
!
service_should_exit
)
{
//apc_target.disable();
u
sleep
(
10000
);
my_
sleep
(
10000
);
//apc_target.enable();
for
(
int
i
=
0
;
i
<
10
&&
!
service_should_exit
;
i
++
)
{
apc_target
.
process_apc_requests
();
u
sleep
(
int_rand
(
30
));
my_
sleep
(
int_rand
(
30
));
}
}
apc_target
.
disable
();
...
...
@@ -99,7 +99,7 @@ public:
void
call_in_target_thread
()
{
u
sleep
(
int_rand
(
1000
));
my_
sleep
(
int_rand
(
1000
));
*
where_to
=
value
;
increment_counter
(
&
apcs_served
);
}
...
...
@@ -145,7 +145,7 @@ void *test_apc_requestor_thread(void *ptr)
have_errors
=
true
;
}
}
//
u
sleep(300);
//
my_
sleep(300);
}
fprintf
(
stderr
,
"# test_apc_requestor_thread exiting
\n
"
);
my_thread_end
();
...
...
@@ -171,13 +171,13 @@ int main(int args, char **argv)
pthread_create
(
&
service_thr
,
NULL
,
test_apc_service_thread
,
(
void
*
)
NULL
);
while
(
!
started
)
u
sleep
(
1000
);
my_
sleep
(
1000
);
for
(
i
=
0
;
i
<
N_THREADS
;
i
++
)
pthread_create
(
&
request_thr
[
i
],
NULL
,
test_apc_requestor_thread
,
(
void
*
)
NULL
);
for
(
i
=
0
;
i
<
15
;
i
++
)
{
u
sleep
(
500
*
1000
);
my_
sleep
(
500
*
1000
);
fprintf
(
stderr
,
"# %d APCs served %d missed
\n
"
,
apcs_served
,
apcs_missed
);
}
fprintf
(
stderr
,
"# Shutting down requestors
\n
"
);
...
...
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