当前使用版本 3.5.6 当前环境信息 例如: Java17 + sqlite

描述bug现象 使用脚本自动维护功能时,无法正常执行sql,异常日志如下:

2024-05-11 13:40:43.154 ERROR 55540 --- [           main] c.b.mybatisplus.extension.ddl.DdlHelper  : run script sql:sql/master/datav_t_sys_user/0.sql , error: [SQLITE_ERROR] SQL error or missing database (no such table: ddl_history) , Please check if the table `ddl_history` exists
2024-05-11 13:40:43.246 ERROR 55540 --- [           main] c.b.mybatisplus.extension.ddl.DdlHelper  : run script sql:sql/master/datav_t_sys_file/0.sql , error: [SQLITE_ERROR] SQL error or missing database (no such table: ddl_history) , Please check if the table `ddl_history` exists
2024-05-11 13:40:43.491 ERROR 55540 --- [           main] c.b.mybatisplus.extension.ddl.DdlHelper  : run script sql:sql/master/datav_t_goview_project_data/0.sql , error: [SQLITE_ERROR] SQL error or missing database (no such table: ddl_history) , Please check if the table `ddl_history` exists
2024-05-11 13:40:43.630 ERROR 55540 --- [           main] c.b.mybatisplus.extension.ddl.DdlHelper  : run script sql:sql/master/datav_t_goview_project/0.sql , error: [SQLITE_ERROR] SQL error or missing database (no such table: ddl_history) , Please check if the table `ddl_history` exists

错误信息为Please check if the tableddl_historyexists,也就是创建ddl_history表出现了错误,根据分析是com.baomidou.mybatisplus.extension.ddl.history.SQLiteDdlGenerator.existTable()中查询表是否存在的sql语句不正确,SELECT count(1) FROM sqlite_master中没有定义输出结果的列名为NUM,导致无法正确判断ddl_history表是否存在,需要改为sql.append("SELECT count(1) NUM FROM sqlite_master WHERE name='");

提供问题复现步骤 切换sqlite数据库,使用脚本自动维护功能 提供完整堆栈日志(可选)

提供问题复现工程(可选) 请尽量提供复现工程,减少大家排错的时间.