diff options
author | Shiki-H <25473496+Shiki-H@users.noreply.github.com> | 2019-08-18 19:06:48 -0400 |
---|---|---|
committer | ᴊ. ᴄʜᴇɴ <u@gogs.io> | 2019-08-19 07:06:48 +0800 |
commit | 2f0cdfd564f5af6114797bd6596dea46c9c859c8 (patch) | |
tree | bba3633a87bce45c68a98909b8648dde73bc1d91 /scripts/mysql.sql | |
parent | c154721f4a8f3e24d2f6fb61e74b4b64529255c2 (diff) |
scripts/mysql: fix compatibility issue (#5786)
Diffstat (limited to 'scripts/mysql.sql')
-rw-r--r-- | scripts/mysql.sql | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/mysql.sql b/scripts/mysql.sql index e3f23ce0..3aab6b7d 100644 --- a/scripts/mysql.sql +++ b/scripts/mysql.sql @@ -1,5 +1,11 @@ -SET GLOBAL innodb_file_per_table = ON, - innodb_file_format = Barracuda, - innodb_large_prefix = ON; +SET @s = IF(version() < 8 OR version() LIKE '%MariaDB%', + 'SET GLOBAL innodb_file_per_table = ON, + innodb_file_format = Barracuda, + innodb_large_prefix = ON;', + 'SET GLOBAL innodb_file_per_table = ON;'); +PREPARE stmt1 FROM @s; +EXECUTE stmt1; + DROP DATABASE IF EXISTS gogs; CREATE DATABASE IF NOT EXISTS gogs CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; + |