MariaDB appears to confuse some SMF column names with reserved words. This does not happen to all MariaDB installs, only some.
So if you are facing this issue, you can try to fix the offending SQL and move past it, but you will likely encounter similar problems throughout the upgrade.
In this case, it appears you have gotten past removal of the babylon theme. This takes place in the file 'other\upgrade_2-0_mysql.sql'.
The next step does the following, ~line 2817:
/******************************************************************************/
--- Installing new smileys sets...
/******************************************************************************/
---# Installing new smiley sets...
---{
// Don't do this twice!
if (empty($modSettings['installed_new_smiley_sets_20']))
{
// First, the entries.
upgrade_query("
UPDATE {$db_prefix}settings
SET value = CONCAT(value, ',aaron,akyhne')
WHERE variable = 'smiley_sets_known'");
// Second, the names.
upgrade_query("
UPDATE {$db_prefix}settings
SET value = CONCAT(value, '\nAaron\nAkyhne')
WHERE variable = 'smiley_sets_names'");
// This ain't running twice either.
upgrade_query("
REPLACE INTO {$db_prefix}settings
(variable, value)
VALUES
('installed_new_smiley_sets_20', '1')");
}
---}
---#
My suspicion is that MariaDB is considering variable & value to be reserved words, and that, for your installation of MariaDB, this code should be modified to put them in single quotes, e.g., 'variable' and 'value'.
I bet you could confirm this at a SQL prompt, e.g., in phpMyAdmin - try these updates with & without the quotes. That would confirm the issue (without rerunning the entire upgrade).