22,300
社区成员




select *
from T_CASE_FILE tcasefile0_ where 1=1 and tcasefile0_.ISDELETE=0 and tcasefile0_.FILESSSATUS='2'
and tcasefile0_.STAIR='98acd79f1a2b4c67959b14863cc7264e'
order by substring_index(tcasefile0_.FILENO, '-', 1) desc, substring_index(substring_index(substring_index(tcasefile0_.FILENO, '-', 2), '-', -1), '.', 1),
CONVERT(IFNULL(substring_index(substring_index(substring_index(tcasefile0_.FILENO, '-', 2), '-', -1), '.', -1), 0), SIGNED) asc,
CONVERT(IFNULL(SUBSTRING_INDEX(tcasefile0_.FILENO, '-', -1), 0), SIGNED) limit 30
CREATE TABLE log_sync_plan_data(
planLogId BIGINT PRIMARY KEY NOT NULL auto_increment,
syncType int NOT NULL DEFAULT 0,
tablesCnt int NOT NULL,
finishedCnt int NOT NULL DEFAULT 0,
beginTime datetime NOT NULL DEFAULT NOW(),
endTime datetime NOT NULL DEFAULT '1900-01-01',
elapsedSeconds INT generated always AS (case when endTime<beginTime then -1 ELSE timestampdiff(SECOND,endTime,beginTime) END) VIRTUAL,
errMsg varchar(4000) NULL,
success INT generated always AS( case when endTime<beginTime OR ifnull(errMsg,'')<>'' OR tablesCnt<>finishedCnt then 0 else 1 end) VIRTUAL
);
你把你的SQL改成跟我这个类似就可以了: