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
fa083eb7
Commit
fa083eb7
authored
Apr 06, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.1
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-single-user
parents
0507590a
a005dfb6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
20 deletions
+26
-20
mysql-test/t/events_scheduling.test
mysql-test/t/events_scheduling.test
+0
-1
sql/event_scheduler.cc
sql/event_scheduler.cc
+7
-17
sql/parse_file.cc
sql/parse_file.cc
+13
-2
sql/sp_head.cc
sql/sp_head.cc
+6
-0
No files found.
mysql-test/t/events_scheduling.test
View file @
fa083eb7
# Can't test with embedded server that doesn't support grants
--
source
include
/
not_embedded
.
inc
--
source
include
/
not_valgrind
.
inc
CREATE
DATABASE
IF
NOT
EXISTS
events_test
;
USE
events_test
;
...
...
sql/event_scheduler.cc
View file @
fa083eb7
...
...
@@ -154,8 +154,6 @@ deinit_event_thread(THD *thd)
thread_running
--
;
delete
thd
;
pthread_mutex_unlock
(
&
LOCK_thread_count
);
my_thread_end
();
}
...
...
@@ -231,8 +229,7 @@ event_scheduler_thread(void *arg)
if
(
!
res
)
scheduler
->
run
(
thd
);
deinit_event_thread
(
thd
);
pthread_exit
(
0
);
my_thread_end
();
DBUG_RETURN
(
0
);
// Against gcc warnings
}
...
...
@@ -260,6 +257,7 @@ event_worker_thread(void *arg)
Event_worker_thread
worker_thread
;
worker_thread
.
run
(
thd
,
event
);
my_thread_end
();
return
0
;
// Can't return anything here
}
...
...
@@ -494,12 +492,14 @@ Event_scheduler::run(THD *thd)
}
DBUG_PRINT
(
"info"
,
(
"state=%s"
,
scheduler_states_names
[
state
].
str
));
}
LOCK_DATA
();
DBUG_PRINT
(
"info"
,
(
"Signalling back to the stopper COND_state"
));
deinit_event_thread
(
thd
);
scheduler_thd
=
NULL
;
state
=
INITIALIZED
;
DBUG_PRINT
(
"info"
,
(
"Signalling back to the stopper COND_state"
));
pthread_cond_signal
(
&
COND_state
);
UNLOCK_DATA
();
sql_print_information
(
"Event Scheduler: Stopped"
);
DBUG_RETURN
(
res
);
}
...
...
@@ -651,17 +651,7 @@ Event_scheduler::stop()
COND_STATE_WAIT
(
thd
,
NULL
,
"Waiting scheduler to stop"
);
}
while
(
state
==
STOPPING
);
DBUG_PRINT
(
"info"
,
(
"Scheduler thread has cleaned up. Set state to INIT"
));
/*
The rationale behind setting it to NULL here but not destructing it
beforehand is because the THD will be deinited in event_scheduler_thread().
It's more clear when the post_init and the deinit is done in one function.
Here we just mark that the scheduler doesn't have a THD anymore. Though for
milliseconds the old thread could exist we can't use it anymore. When we
unlock the mutex in this function a little later the state will be
INITIALIZED. Therefore, a connection thread could enter the critical section
and will create a new THD object.
*/
scheduler_thd
=
NULL
;
sql_print_information
(
"Event Scheduler: Stopped"
);
end:
UNLOCK_DATA
();
DBUG_RETURN
(
FALSE
);
...
...
sql/parse_file.cc
View file @
fa083eb7
...
...
@@ -733,14 +733,18 @@ bool get_file_options_ulllist(char *&ptr, char *end, char *line,
/*
parse parameters
SYNOPSIS
File_parser::parse()
base base address for parameter writing (structure like
TABLE)
mem_root MEM_ROOT for parameters allocation
parameters parameters description
required number of required parameters in above list
required number of parameters in the above list. If the file
contains more parameters than "required", they will
be ignored. If the file contains less parameters
then "required", non-existing parameters will
remain their values.
hook hook called for unknown keys
hook_data some data specific for the hook
...
...
@@ -923,6 +927,13 @@ File_parser::parse(gptr base, MEM_ROOT *mem_root,
}
}
}
/*
NOTE: if we read less than "required" parameters, it is still Ok.
Probably, we've just read the file of the previous version, which
contains less parameters.
*/
DBUG_RETURN
(
FALSE
);
}
...
...
sql/sp_head.cc
View file @
fa083eb7
...
...
@@ -992,6 +992,12 @@ sp_head::execute(THD *thd)
m_first_instance
->
m_last_cached_sp
==
this
)
||
(
m_recursion_level
+
1
==
m_next_cached_sp
->
m_recursion_level
));
/*
NOTE: The SQL Standard does not specify the context that should be
preserved for stored routines. However, at SAP/Walldorf meeting it was
decided that current database should be preserved.
*/
if
(
m_db
.
length
&&
(
err_status
=
sp_use_new_db
(
thd
,
m_db
,
&
old_db
,
0
,
&
dbchanged
)))
goto
done
;
...
...
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