RusLog.com
Вебмастерская => Вебпрограмминг/Скрипты => Тема начата: admin от 23 Октября 2010, 11:36:05
-
Решил поменять метод поиска в форуме с FULLTEXT на customindex.
Не вышло, получил ошибку:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM' at line 5
File: /home/***/Sources/ManageSearch.php
Line: 424
Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 1.1.11, while your database is at version 1.1.1. The above error might possibly go away if you execute the latest version of upgrade.php.
То бишь, обновляй базу, собака.
Начал обновлять.
Скачал отседа: http://download.simplemachines.org/ полный комплект (Large upgrade)
Из него взял файлы:
upgrade.php
upgrade_1-0.sql
upgrade_1-1.sql
Запустил.
Первая ошибка:
This query:
ALTER TABLE smf_smileys
ORDER BY LENGTH(code) DESC;
Caused the error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'LENGTH(code) DESC' at line 2
Решение нашёл здесь:
http://docs.simplemachines.org/index.php?topic=1079.0
Открываем файл upgrade_1-1.sql и меняем ALTER TABLE {$db_prefix}smileys
ORDER BY LENGTH(code) DESC;
на
ALTER TABLE {$db_prefix}smileys
ORDER BY code DESC;
Ошибка номер 2:
... You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TYPE=MyISAM ...
Решение: http://www.simplemachines.org/community/index.php?topic=398369.0
Заменить во всём файле upgrade_1-1.sql TYPE=MyISAM на ENGINE=MyISAM
Третья ошибка:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(14) /*!40102 NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP */,' at line 3
Решение: http://www.simplemachines.org/community/index.php?topic=398369.0
Меняем
logTime timestamp(14) /*!40102 NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP */,
на
logTime TIMESTAMP DEFAULT 0,
Бонус: если база большая, стоит запустить mytop, потому как скрипту надоедает ждать и он выдаёт 504ю ошибку