jeetkune
Member
- Affected version
- 2.3.6
Description:
When attempting to import a database backup into a fresh XenForo 2.3.6 installation on a new server, I encounter an SQL syntax error related to the xf_forum table creation. The error occurs specifically around the forum_type_id column definition.
Environment:
ERROR 1064 (42000) at line 4066: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AS 64697363757373696f6e,
type_config mediumblob NOT NULL,
moderate_t...' at line 12
Problematic SQL Statement:
sql
CREATE TABLE xf_forum (
...
forum_type_id varbinary(50) NOT NULL DEFAULT x AS 64697363757373696f6e,
...
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
Steps to Reproduce:
The database should import successfully without syntax errors, as it was exported from an identical XenForo installation on a server with the same specifications.
Possible Causes:
Please investigate why the database export from a working XenForo installation would generate invalid SQL syntax when imported to an identical environment, and provide guidance on how to properly export/import the database without errors.
When attempting to import a database backup into a fresh XenForo 2.3.6 installation on a new server, I encounter an SQL syntax error related to the xf_forum table creation. The error occurs specifically around the forum_type_id column definition.
Environment:
- Source and Target Server: Identical configurations
- OS: Debian (same version on both servers)
- Web Server: Nginx (same version)
- Database: MariaDB (same version)
- PHP: Same version
- phpMyAdmin: Same version on both servers
- XenForo: Clean installation of 2.3.6 (no upgrades)
- No third-party add-ons installed
- No Redis or other caching systems configured
ERROR 1064 (42000) at line 4066: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'AS 64697363757373696f6e,
type_config mediumblob NOT NULL,
moderate_t...' at line 12
Problematic SQL Statement:
sql
CREATE TABLE xf_forum (
...
forum_type_id varbinary(50) NOT NULL DEFAULT x AS 64697363757373696f6e,
...
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci
Steps to Reproduce:
- Perform a clean installation of XenForo 2.3.6
- Export database from original server using phpMyAdmin (default settings)
- Attempt to import the database to new server via:
- phpMyAdmin interface
- SSH command line
- Error occurs during import
- The database export was performed without any modifications to default settings
- The same error occurs regardless of import method (phpMyAdmin or command line)
- The hexadecimal value appears to be a representation of the word "discussion" (64697363757373696f6e)
- This is a fresh installation with no modifications or add-ons
- Both servers have identical software versions
The database should import successfully without syntax errors, as it was exported from an identical XenForo installation on a server with the same specifications.
Possible Causes:
- The DEFAULT value syntax for the varbinary column might be incorrectly formatted in the SQL dump
- There might be an issue with how the hexadecimal value is being interpreted during import
- The SQL export might be generating invalid syntax for MariaDB despite identical versions
Please investigate why the database export from a working XenForo installation would generate invalid SQL syntax when imported to an identical environment, and provide guidance on how to properly export/import the database without errors.