github-actions[bot] commented on issue #15052:
URL: 
https://github.com/apache/dolphinscheduler/issues/15052#issuecomment-1770648382

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   Currently, my ds is version 3.1.7. When I try to update to 3.2.0, I execute 
sh ./tools/bin/upgrade-schema.sh and the sql reports an error;
   
   I took out all the sql under the path 
apache-dolphinscheduler-3.2.0-bin/tools/sql/sql/upgrade/3.2.0_schema/mysql/dolphinscheduler_ddl.sql
 and executed it successfully, but executing sh ./tools/bin The 
/upgrade-schema.sh script reports an error;
   
   But I created a new database and executed sh ./tools/bin/upgrade-schema.sh, 
no error was reported.
   
   ### What you expected to happen
   
   sh ./tools/bin/upgrade-schema.sh
   
   ### How to reproduce
   
   sh ./tools/bin/upgrade-schema.sh
   
   ### Anything else
   
   2023-10-19 19:10:44.476 INFO 5494 --- [main] 
o.a.d.t.d.UpgradeDolphinScheduler : Starting UpgradeDolphinScheduler v3.2.0 
using Java 1.8.0_25 on s2-100 with PID 5494 
(/opt/tmp/apache-dolphinscheduler-3.2. 
0-bin/tools/libs/dolphinscheduler-tools-3.2.0.jar started by dolphinscheduler 
in /opt/tmp/apache-dolphinscheduler-3.2.0-bin)
   2023-10-19 19:10:44.482 INFO 5494 --- [main] 
o.a.d.t.d.UpgradeDolphinScheduler : The following 2 profiles are active: 
"upgrade", "mysql"
   2023-10-19 19:10:45.860 WARN 5494 --- [main] 
o.m.s.mapper.ClassPathMapperScanner: No MyBatis mapper was found in 
'[org.apache.dolphinscheduler.tools.datasource]' package. Please check your 
configuration.
   2023-10-19 19:10:46.406 INFO 5494 --- [main] 
trationDelegate$BeanPostProcessorChecker : Bean 
'io.kubernetes.client.spring.extended.manifests.config.KubernetesManifestsAutoConfiguration'
 of type [io.kubernetes.client.spring 
.extended.manifests.config.KubernetesManifestsAutoConfiguration] is not 
eligible for getting processed by all BeanPostProcessors (for example: not 
eligible for auto-proxying)
   2023-10-19 19:10:46.438 INFO 5494 --- [main] 
trationDelegate$BeanPostProcessorChecker : Bean 
'kubernetes.manifests-io.kubernetes.client.spring.extended.manifests.config.KubernetesManifestsProperties'
 of type [io.kubernetes 
.client.spring.extended.manifests.config.KubernetesManifestsProperties] is not 
eligible for getting processed by all BeanPostProcessors (for example: not 
eligible for auto-proxying)
   2023-10-19 19:10:46.445 INFO 5494 --- [main] 
trationDelegate$BeanPostProcessorChecker : Bean 
'io.kubernetes.client.spring.extended.controller.config.KubernetesInformerAutoConfiguration'
 of type [io.kubernetes.client.spring 
.extended.controller.config.KubernetesInformerAutoConfiguration] is not 
eligible for getting processed by all BeanPostProcessors (for example: not 
eligible for auto-proxying)
   2023-10-19 19:10:46.795 INFO 5494 --- [main] 
trationDelegate$BeanPostProcessorChecker : Bean 'defaultApiClient' of type 
[io.kubernetes.client.openapi.ApiClient] is not eligible for getting processed 
by all BeanPostProcessors (for example: not eligible for auto-proxying)
    _ _ |_ _ _|_. ___ _ | _
   | | |\/|_)(_| | |_\ |_)||_|_\
        / |
                           3.5.2
   2023-10-19 19:10:48.227 INFO 5494 --- [main] 
com.zaxxer.hikari.HikariDataSource: DolphinScheduler - Starting...
   2023-10-19 19:10:48.445 INFO 5494 --- [main] 
com.zaxxer.hikari.HikariDataSource : DolphinScheduler - Start completed.
   2023-10-19 19:10:50.855 INFO 5494 --- [main] 
o.a.d.t.d.UpgradeDolphinScheduler : Started UpgradeDolphinScheduler in 7.277 
seconds (JVM running for 7.975)
   2023-10-19 19:10:50.869 INFO 5494 --- [main] 
o.a.d.t.d.DolphinSchedulerManager : The database has been initialized. Skip the 
initialization step
   2023-10-19 19:10:50.891 INFO 5494 --- [main] 
o.a.d.t.d.DolphinSchedulerManager : upgrade DolphinScheduler metadata version 
from 3.1.7 to 3.2.0
   2023-10-19 19:10:50.892 INFO 5494 --- [main] 
o.a.d.t.d.DolphinSchedulerManager: Begin upgrading DolphinScheduler's table 
structure
   2023-10-19 19:10:50.906 INFO 5494 --- [main] 
o.a.d.common.sql.SqlScriptRunner: Execute sql: SET sql_mode=(SELECT 
REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); success
   2023-10-19 19:10:50.909 INFO 5494 --- [main] 
o.a.d.common.sql.SqlScriptRunner: Execute sql: DROP PROCEDURE IF EXISTS 
ut_dolphin_T_t_ds_fav; success
   2023-10-19 19:10:50.912 INFO 5494 --- [main] 
o.a.d.common.sql.SqlScriptRunner: Execute sql: CREATE PROCEDURE 
ut_dolphin_T_t_ds_fav()
   BEGIN
   IF EXISTS (SELECT 1 FROM information_schema.TABLES
   WHERE TABLE_NAME='t_ds_fav'
   AND TABLE_SCHEMA=(SELECT DATABASE()))
   THEN
   ALTER TABLE t_ds_fav RENAME t_ds_fav_task;
   END IF;
   END;success
   2023-10-19 19:10:50.931 ERROR 5494 --- [main] 
o.a.d.tools.datasource.dao.UpgradeDao: Execute ddl file failed, meet an unknown 
exception, schemaDir: 3.2.0_schema, ddlScript: dolphinscheduler_ddl.sql
   
   java.sql.SQLSyntaxErrorException: 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 'DROP PROCEDURE ut_dolphin_T_t_ds_fav;
   CREATE TABLE if not exists `t_ds_fav_task`' at line 2
   at 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) 
~[mysql-connector-java-8.0.27.jar:8.0.27]
   at 
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
 ~[mysql-connector-java-8.0.27.jar:8.0.27]
   at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:768) 
~[mysql-connector-java-8.0.27.jar:8.0.27]
   at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:653) 
~[mysql-connector-java-8.0.27.jar:8.0.27]
   at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:94) 
~[HikariCP-4.0.3.jar:na]
   at 
com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) 
~[HikariCP-4.0.3.jar:na]
   at 
org.apache.dolphinscheduler.common.sql.SqlScriptRunner.execute(SqlScriptRunner.java:58)
 ~[dolphinscheduler-common-3.2.0.jar:3.2.0]
   at 
org.apache.dolphinscheduler.tools.datasource.dao.UpgradeDao.upgradeDolphinSchedulerDDL(UpgradeDao.java:158)
 [dolphinscheduler-tools-3.2.0.jar:3.2.0]
   at 
org.apache.dolphinscheduler.tools.datasource.dao.UpgradeDao.upgradeDolphinScheduler(UpgradeDao.java:93)
 [dolphinscheduler-tools-3.2.0.jar:3.2.0]
   at 
org.apache.dolphinscheduler.tools.datasource.DolphinSchedulerManager.upgradeDolphinScheduler(DolphinSchedulerManager.java:123)
 [dolphinscheduler-tools-3.2.0.jar:3.2.0]
   at 
org.apache.dolphinscheduler.tools.datasource.UpgradeDolphinScheduler$UpgradeRunner.run(UpgradeDolphinScheduler.java:53)
 [dolphinscheduler-tools-3.2.0.jar:3.2.0]
   at 
org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:771)
 [spring-boot-2.7.3.jar:2.7.3]
   at 
org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:755)
 [spring-boot-2.7.3.jar:2.7.3]
   at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:315) 
[spring-boot-2.7.3.jar:2.7.3]
   at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) 
[spring-boot-2.7.3.jar:2.7.3]
   at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) 
[spring-boot-2.7.3.jar:2.7.3]
   at 
org.apache.dolphinscheduler.tools.datasource.UpgradeDolphinScheduler.main(UpgradeDolphinScheduler.java:36)
 [dolphinscheduler-tools-3.2.0.jar:3.2.0]
   
   2023-10-19 19:10:50.935 INFO 5494 --- [main] 
ConditionEvaluationReportLoggingListener:
   
   Error starting ApplicationContext. To display the conditions report re-run 
your application with 'debug' enabled.
   2023-10-19 19:10:50.968 ERROR 5494 --- [main] o.s.boot.SpringApplication: 
Application run failed
   
   java.lang.IllegalStateException: Failed to execute CommandLineRunner
   at 
org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:774)
 [spring-boot-2.7.3.jar:2.7.3]
   at 
org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:755)
 [spring-boot-2.7.3.jar:2.7.3]
   at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:315) 
[spring-boot-2.7.3.jar:2.7.3]
   at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) 
[spring-boot-2.7.3.jar:2.7.3]
   at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) 
[spring-boot-2.7.3.jar:2.7.3]
   at 
org.apache.dolphinscheduler.tools.datasource.UpgradeDolphinScheduler.main(UpgradeDolphinScheduler.java:36)
 [dolphinscheduler-tools-3.2.0.jar:3.2.0]
   Caused by: java.lang.RuntimeException: Execute ddl file failed, meet an 
unknown exception
   at 
org.apache.dolphinscheduler.tools.datasource.dao.UpgradeDao.upgradeDolphinSchedulerDDL(UpgradeDao.java:166)
 ~[dolphinscheduler-tools-3.2.0.jar:3.2.0]
   at 
org.apache.dolphinscheduler.tools.datasource.dao.UpgradeDao.upgradeDolphinScheduler(UpgradeDao.java:93)
 ~[dolphinscheduler-tools-3.2.0.jar:3.2.0]
   at 
org.apache.dolphinscheduler.tools.datasource.DolphinSchedulerManager.upgradeDolphinScheduler(DolphinSchedulerManager.java:123)
 ~[dolphinscheduler-tools-3.2.0.jar:3.2.0]
   at 
org.apache.dolphinscheduler.tools.datasource.UpgradeDolphinScheduler$UpgradeRunner.run(UpgradeDolphinScheduler.java:53)
 ~[dolphinscheduler-tools-3.2.0.jar:3.2.0]
   at 
org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:771)
 [spring-boot-2.7.3.jar:2.7.3]
   ... 5 common frames omitted
   Caused by: java.sql.SQLSyntaxErrorException: 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 'DROP PROCEDURE ut_dolphin_T_t_ds_fav;
   CREATE TABLE if not exists `t_ds_fav_task`' at line 2
   at 
com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) 
~[mysql-connector-java-8.0.27.jar:8.0.27]
   at 
com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
 ~[mysql-connector-java-8.0.27.jar:8.0.27]
   at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:768) 
~[mysql-connector-java-8.0.27.jar:8.0.27]
   at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:653) 
~[mysql-connector-java-8.0.27.jar:8.0.27]
   at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:94) 
~[HikariCP-4.0.3.jar:na]
   at 
com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) 
~[HikariCP-4.0.3.jar:na]
   at 
org.apache.dolphinscheduler.common.sql.SqlScriptRunner.execute(SqlScriptRunner.java:58)
 ~[dolphinscheduler-common-3.2.0.jar:3.2.0]
   at 
org.apache.dolphinscheduler.tools.datasource.dao.UpgradeDao.upgradeDolphinSchedulerDDL(UpgradeDao.java:158)
 ~[dolphinscheduler-tools-3.2.0.jar:3.2.0]
   ... 9 common frames omitted
   
   2023-10-19 19:10:50.974 INFO 5494 --- [main] 
com.zaxxer.hikari.HikariDataSource : DolphinScheduler - Shutdown initiated...
   2023-10-19 19:10:50.993 INFO 5494 --- [main] 
com.zaxxer.hikari.HikariDataSource: DolphinScheduler - Shutdown completed.
   
   
   ### Version
   
   3.2.x
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to