Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ensembl-gh-mirror
ensembl-hive
Commits
322a5675
Commit
322a5675
authored
Jul 09, 2013
by
Leo Gordon
Browse files
schema change: allow recording of log_messages with worker_id=NULL
parent
dd8ba28f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
3 deletions
+21
-3
sql/patch_2013-07-09.sql
sql/patch_2013-07-09.sql
+18
-0
sql/procedures.mysql
sql/procedures.mysql
+1
-1
sql/procedures.pgsql
sql/procedures.pgsql
+1
-1
sql/procedures.sqlite
sql/procedures.sqlite
+1
-1
No files found.
sql/patch_2013-07-09.sql
0 → 100644
View file @
322a5675
-- Relax the restriction that each log_message entry has to have a non-NULL worker_id; allow a NULL there:
ALTER
TABLE
log_message
MODIFY
COLUMN
worker_id
INTEGER
DEFAULT
NULL
;
-- Allow log_messages from 'SEMAPHORED' jobs:
ALTER
TABLE
log_message
MODIFY
COLUMN
status
ENUM
(
'UNKNOWN'
,
'SPECIALIZATION'
,
'COMPILATION'
,
'SEMAPHORED'
,
'READY'
,
'PRE_CLEANUP'
,
'FETCH_INPUT'
,
'RUN'
,
'WRITE_OUTPUT'
,
'POST_CLEANUP'
,
'PASSED_ON'
)
DEFAULT
'UNKNOWN'
;
-- LEFT JOIN with worker so that entries with worker_id=NULL would still be shown:
CREATE
OR
REPLACE
VIEW
msg
AS
SELECT
a
.
analysis_id
,
a
.
logic_name
,
m
.
*
FROM
log_message
m
LEFT
JOIN
worker
w
USING
(
worker_id
)
LEFT
JOIN
job
j
ON
(
j
.
job_id
=
m
.
job_id
)
LEFT
JOIN
analysis_base
a
ON
(
a
.
analysis_id
=
j
.
analysis_id
);
-- UPDATE hive_sql_schema_version
UPDATE
hive_meta
SET
meta_value
=
50
WHERE
meta_key
=
'hive_sql_schema_version'
AND
meta_value
=
'49'
;
sql/procedures.mysql
View file @
322a5675
...
...
@@ -37,7 +37,7 @@ CREATE OR REPLACE VIEW progress AS
CREATE OR REPLACE VIEW msg AS
SELECT a.analysis_id, a.logic_name, m.*
FROM log_message m
JOIN worker w USING (worker_id)
LEFT
JOIN worker w USING (worker_id)
LEFT JOIN job j ON (j.job_id=m.job_id)
LEFT JOIN analysis_base a ON (a.analysis_id=j.analysis_id);
...
...
sql/procedures.pgsql
View file @
322a5675
...
...
@@ -37,7 +37,7 @@ CREATE OR REPLACE VIEW progress AS
CREATE OR REPLACE VIEW msg AS
SELECT a.analysis_id, a.logic_name, m.*
FROM log_message m
JOIN worker w USING (worker_id)
LEFT
JOIN worker w USING (worker_id)
LEFT JOIN job j ON (j.job_id=m.job_id)
LEFT JOIN analysis_base a ON (a.analysis_id=j.analysis_id);
sql/procedures.sqlite
View file @
322a5675
...
...
@@ -37,7 +37,7 @@ CREATE VIEW IF NOT EXISTS progress AS
CREATE VIEW IF NOT EXISTS msg AS
SELECT a.analysis_id, a.logic_name, m.*
FROM log_message m
JOIN worker w USING (worker_id)
LEFT
JOIN worker w USING (worker_id)
LEFT JOIN job j ON (j.job_id=m.job_id)
LEFT JOIN analysis_base a ON (a.analysis_id=j.analysis_id);
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