当前位置: 首页 > Web与应用 > 正文

近日在对PHPWind 8.5 升级到 8.7 的时候遇到了一个棘手的问题。PW官方论坛求助,一直未获解答。官方也根本不理你。

废话少说,贴出出错信息:

Query Error: CREATE TABLE `pw_merge_posts` ( `pid` int(10) unsigned NOT NULL AUTO_INCREMENT, `fid` smallint(6) unsigned NOT NULL DEFAULT ‘0’, `tid` mediumint(8) unsigned NOT NULL DEFAULT ‘0’, `aid` mediumtext NOT NULL, `author` varchar(15) NOT NULL DEFAULT ”, `authorid` mediumint(8) unsigned NOT NULL DEFAULT ‘0’, `icon` tinyint(2) NOT NULL DEFAULT ‘0’, `postdate` int(10) unsigned NOT NULL DEFAULT ‘0’, `subject` varchar(100) NOT NULL DEFAULT ”, `userip` varchar(15) NOT NULL DEFAULT ”, `ifsign` tinyint(3) NOT NULL DEFAULT ‘0’, `buy` mediumtext NOT NULL, `alterinfo` varchar(50) NOT NULL DEFAULT ”, `remindinfo` varchar(150) NOT NULL, `leaveword` varchar(255) NOT NULL DEFAULT ”, `ipfrom` varchar(255) NOT NULL, `ifconvert` tinyint(3) NOT NULL DEFAULT ‘1’, `ifwordsfb` tinyint(3) NOT NULL DEFAULT ‘1’, `ifcheck` tinyint(3) NOT NULL DEFAULT ‘0’, `content` mediumtext NOT NULL, `ifmark` varchar(255) NOT NULL DEFAULT ”, `ifreward` tinyint(3) NOT NULL DEFAULT ‘0’, `ifshield` tinyint(3) unsigned NOT NULL DEFAULT ‘0’, `anonymous` tinyint(3) NOT NULL DEFAULT ‘0’, `ifhide` tinyint(3) NOT NULL DEFAULT ‘0’, `eventid` int(10) NOT NULL DEFAULT ‘0’, `frommob` tinyint(3) unsigned NOT NULL DEFAULT ‘0’, PRIMARY KEY (`pid`), KEY `idx_fid` (`fid`), KEY `idx_postdate` (`postdate`), KEY `idx_tid` (`tid`,`postdate`), KEY `idx_authorid` (`authorid`), KEY `idx_ifcheck` (`ifcheck`) ) ENGINE=MERGE UNION=(pw_posts,pw_posts,pw_posts1) DEFAULT CHARSET=gbk INSERT_METHOD=LAST

应该是创建表结构的时候可能存在相同字段的内容。

经查询,在表少量pw_posts1中存在与表pw_posts相同的内容,将多出的部分删除,问题解决。

[分享]PHPWind 8.5 升级 8.7 数据库分表错误解决方法:等您坐沙发呢!

发表评论