Skip to content
Snippets Groups Projects
Verified Commit b7cd45a6 authored by Daniel Hornung's avatar Daniel Hornung
Browse files

FIX: "Offset" is a reserved keyword in MariaDB 10.6

parent 5143b553
No related branches found
No related tags found
2 merge requests!31ENH: Update script for outdated dumps.,!30Mariadb 10.11: New reserved keyword
Pipeline #55880 canceled
...@@ -47,6 +47,5 @@ do ...@@ -47,6 +47,5 @@ do
done done
cd ../ cd ../
echo "updating procedures"
$UTILSPATH/update_sql_procedures.sh $UTILSPATH/update_sql_procedures.sh
...@@ -34,14 +34,8 @@ fi ...@@ -34,14 +34,8 @@ fi
check_version $OLD_VERSION check_version $OLD_VERSION
echo "version checked"
mysql_execute "UPDATE data_type SET datatype=17 WHERE datatype=3" mysql_execute "UPDATE data_type SET datatype=17 WHERE datatype=3"
echo "updated"
update_version $NEW_VERSION update_version $NEW_VERSION
echo "version updated"
success success
...@@ -283,7 +283,7 @@ DROP FUNCTION IF EXISTS db_5_0.get_head_relative // ...@@ -283,7 +283,7 @@ DROP FUNCTION IF EXISTS db_5_0.get_head_relative //
* ---------- * ----------
* EntityID : VARCHAR(255) * EntityID : VARCHAR(255)
* The entity id. * The entity id.
* Offset : INT UNSIGNED * HeadOffset : INT UNSIGNED
* Distance in the sequence of primary parents of the entity. E.g. `0` is the * Distance in the sequence of primary parents of the entity. E.g. `0` is the
* HEAD itself. `1` is the primary parent of the HEAD. `2` is the primary * HEAD itself. `1` is the primary parent of the HEAD. `2` is the primary
* parent of the primary parent of the HEAD, and so on. * parent of the primary parent of the HEAD, and so on.
...@@ -294,7 +294,7 @@ DROP FUNCTION IF EXISTS db_5_0.get_head_relative // ...@@ -294,7 +294,7 @@ DROP FUNCTION IF EXISTS db_5_0.get_head_relative //
*/ */
CREATE FUNCTION db_5_0.get_head_relative( CREATE FUNCTION db_5_0.get_head_relative(
EntityID VARCHAR(255), EntityID VARCHAR(255),
Offset INT UNSIGNED) HeadOffset INT UNSIGNED)
RETURNS VARBINARY(255) RETURNS VARBINARY(255)
READS SQL DATA READS SQL DATA
BEGIN BEGIN
...@@ -311,7 +311,7 @@ BEGIN ...@@ -311,7 +311,7 @@ BEGIN
FROM entity_version AS e FROM entity_version AS e
WHERE e.entity_id = InternalEntityID WHERE e.entity_id = InternalEntityID
ORDER BY e._iversion DESC ORDER BY e._iversion DESC
LIMIT 1 OFFSET Offset LIMIT 1 OFFSET HeadOffset
); );
END; END;
// //
......
...@@ -37,7 +37,7 @@ fi ...@@ -37,7 +37,7 @@ fi
source $UTILSPATH/load_settings.sh source $UTILSPATH/load_settings.sh
source $UTILSPATH/helpers.sh source $UTILSPATH/helpers.sh
echo -n "updating procedures ... " echo "Updating procedures ... "
temp_proc_sql=$(mktemp --suffix=.sql) temp_proc_sql=$(mktemp --suffix=.sql)
sed -e "s/db_5_0/$DATABASE_NAME/g" procedures/*.sql procedures/query/*.sql \ sed -e "s/db_5_0/$DATABASE_NAME/g" procedures/*.sql procedures/query/*.sql \
> "$temp_proc_sql" > "$temp_proc_sql"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment