Skip to content

Commit

Permalink
[SQL] Make release patch compatible with mariadb 10. (#8225)
Browse files Browse the repository at this point in the history
An error was reported where the query being modified returns an SQL error because of the missing FROM clause on mariaDB 10.3

This fix was taken from the MAriaDB official documentation to fix the issue https://mariadb.com/kb/en/dual/
  • Loading branch information
ridz1208 committed Nov 9, 2022
1 parent 0d9aada commit 4211ddb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ ALTER TABLE mri_violations_log ADD COLUMN `EchoNumber` VARCHAR(20) D
-- ---------------------------------------------------------------------------------------------
INSERT INTO parameter_type (Name, Type, Description, SourceFrom)
SELECT 'PhaseEncodingDirection', 'text', 'BIDS PhaseEncodingDirection (a.k.a. i, i-, j, j-, k, k-)', 'parameter_file'
FROM DUAL
WHERE NOT EXISTS (SELECT * FROM parameter_type where Name='PhaseEncodingDirection');
1 change: 1 addition & 0 deletions SQL/Release_patches/24.0_To_24.1_upgrade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ ALTER TABLE mri_violations_log ADD COLUMN `EchoNumber` VARCHAR(20) D
-- ---------------------------------------------------------------------------------------------
INSERT INTO parameter_type (Name, Type, Description, SourceFrom)
SELECT 'PhaseEncodingDirection', 'text', 'BIDS PhaseEncodingDirection (a.k.a. i, i-, j, j-, k, k-)', 'parameter_file'
FROM DUAL
WHERE NOT EXISTS (SELECT * FROM parameter_type where Name='PhaseEncodingDirection');

-- ---------------------------------------------------------------------------------------------
Expand Down

0 comments on commit 4211ddb

Please sign in to comment.