| |
| | |

CodersClub

 Forgot password?
 Register
Search
View: 2928|Reply: 1
Collapse the left

[X3.5] install/data/common_district_4.sql

[Copy link]
Post time: 2023-04-09 14:23
| Show all posts |Read mode
本帖最後由 thanatos 於 2023-04-09 17:00 編輯

The file install/data/common_district_4.sql contains two kinds of errors.

1. Accidentally putting the ALTER statement to the comment:
  1. -- 1) ADD THE LOCATION CODE FIELD
  2. -- ALTER TABLE `pre_common_district` ADD `code` VARCHAR( 64 ) NOT NULL;
Copy the Code
The ALTER statement should be executed, or the later INSERT statements will result in errors due to the lack of field "code":
Initializing data in data table pre_common_template  ... Success
Initializing data in data table pre_common_usergroup  ... Success
Initializing data in data table pre_common_usergroup_field  ... Success
Initializing data in data table pre_common_word_type  ... Success
Initializing data in data table pre_forum_bbcode  ... Success
Initializing data in data table pre_forum_forum  ... Success
Initializing data in data table pre_forum_forumfield  ... Success
Initializing data in data table pre_forum_grouplevel  ... Success
Initializing data in data table pre_forum_imagetype  ... Success
Initializing data in data table pre_forum_medal  ... Success
Initializing data in data table pre_forum_onlinelist  ... Success
Initializing data in data table pre_forum_typeoption  ... Success
Initializing data in data table pre_home_click  ... Success
Initializing data in data table pre_common_block_style  ... Success
Initializing data in data table pre_common_admincp_group  ... Success
Initializing data in data table pre_common_admincp_perm  ... Success
Initializing data in data table pre_forum_threadprofile  ... Success
Data installed successfully ...
Data installed successfullySuccess
Install regional data :  
Initializing data in data table pre_common_district  ... Success
Initializing data in data table pre_common_district  ... Success
Initializing data in data table pre_common_district  ... Success
Failed
Initializing data in data table INSERT INTO `pre_common_district`(`id`, `level`, `upid`, `usetype`, `code`, `name`) VALUES(48001, 2, 45120, 3, 'GG', 'Gagra'),(48002, 2, 45120, 3, 'GD', 'Gudauta'),(48003, 2, 45120, 3, 'SH', 'Sukhum'),(48004, 2, 45120, 3, 'GR', 'Gulripsh'),(48005, 2, 45120, 3, 'OC', 'Ochamchira'),(48006, 2, 45120, 3, 'TQ', 'Tquarchal'),(48007, 2, 45120, 3, 'GL', 'Gali')  ... Failed

2. Comments shouldn't be present in VALUES clause
  1. (45230, 'AQ', 'Antarctica', 0, 0, 0, 1120),
  2. -- `code`='AR', `name`='Argentina', `displayorder`=1130 WHERE `id`=563;
  3. (45240, 'AS', 'American Samoa', 0, 0, 3, 1140),
  4. -- `code`='AT', `name`='Austria', `level`=0, `upid`=0, `usetype`=3, `displayorder`=1150 WHERE `id`=551;
  5. -- `code`='AU', `name`='Australia', `level`=0, `upid`=0, `usetype`=3, `displayorder`=1160 WHERE `id`=537;
  6. (45250, 'AW', 'Aruba', 0, 0, 3, 1170),
  7. (45260, 'AX', 'Aland Islands', 0, 0, 3, 1180),
  8. (45270, 'AZ', 'Azerbaijan', 0, 0, 3, 1190),
Copy the Code
These comments cause SQL syntax error during the installation process:
Initializing data in data table pre_common_word_type  ... Success
Initializing data in data table pre_forum_bbcode  ... Success
Initializing data in data table pre_forum_forum  ... Success
Initializing data in data table pre_forum_forumfield  ... Success
Initializing data in data table pre_forum_grouplevel  ... Success
Initializing data in data table pre_forum_imagetype  ... Success
Initializing data in data table pre_forum_medal  ... Success
Initializing data in data table pre_forum_onlinelist  ... Success
Initializing data in data table pre_forum_typeoption  ... Success
Initializing data in data table pre_home_click  ... Success
Initializing data in data table pre_common_block_style  ... Success
Initializing data in data table pre_common_admincp_group  ... Success
Initializing data in data table pre_common_admincp_perm  ... Success
Initializing data in data table pre_forum_threadprofile  ... Success
Data installed successfully ...
Data installed successfullySuccess
Install regional data :  
Initializing data in data table pre_common_district  ... Success
Initializing data in data table pre_common_district  ... Success
Initializing data in data table pre_common_district  ... Success
Initializing data in data table INSERT INTO `pre_common_district`(`id`, `code`, `name`, `level`, `upid`, `usetype`, `displayorder`) VALUES(45100, 'A1', 'Anonymous Proxy', 0, 0, 0, 9999),(45110, 'A2', 'Satellite Provider', 0, 0, 0, 9999),(45120, 'AB', 'Abkhazia', 0, 0, 3, 1010),(45130, 'AD', 'Andorra', 0, 0, 3, 1020),(45140, 'AE', 'United Arab Emirates', 0, 0, 3, 1030),(45150, 'AF', 'Afghanistan', 0, 0, 3, 1040),(45160, 'AG', 'Antigua and Barbuda', 0, 0, 3, 1050),(45170, 'AI', 'Anguilla', 0, 0, 3, 1060),(45180, 'AL', 'Albania', 0, 0, 3, 1070),(45190, 'AM', 'Armenia', 0, 0, 3, 1080),(45200, 'AN', 'Netherlands Antilles', 0, 0, 3, 1090),(45210, 'AO', 'Angola', 0, 0, 3, 1100),(45220, 'AP', 'Asia/Pacific Region', 0, 0, 0, 1110),(45230, 'AQ', 'Antarctica', 0, 0, 0, 1120),  ... Failed

The error could be fixed by removing those comments inner VALUES clause.
I'm using Percona 8.0.26.16 which is compatible with MySQL 8.0.26. I don't know if it works on other MySQL versions.
You have to log in before you can reply Login | Register

Points Rules

Archive|Mobile|Dark room|CodersClub

Top.Mail.Ru
Top.Mail.Ru

2024-11-23 10:57 GMT+3 , Processed in 0.032125 sec., 8 queries .

Powered by Discuz! X3.4 Release 20230520

© 2001-2024 Discuz! Team.

MultiLingual version, Rev. 4301, © codersclub.org

Quick Reply To Top Return to the list