Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERR-CODE: [PXC-4700][ERR_SERVER] server error by null #41

Open
Caelebs opened this issue Nov 20, 2024 · 0 comments
Open

ERR-CODE: [PXC-4700][ERR_SERVER] server error by null #41

Caelebs opened this issue Nov 20, 2024 · 0 comments

Comments

@Caelebs
Copy link

Caelebs commented Nov 20, 2024

我业务代码中引入了三方的一个扩展,会自动创建一个视图,在MySQL场景下一切正常,在docker部署的polardb-x中,视图正常创建,但是查询报错。

ERR-CODE: [PXC-4700][ERR_SERVER] server error by null 

这是我的查询SQL,以及对应的视图SQL

SELECT
	* 
FROM
	scheduler_jobrunr_jobs_stats
SELECT COALESCE
	( max(( SELECT `job_stat_results`.`count` FROM DUAL WHERE ( `job_stat_results`.`state` IS NULL ))), 0 ) AS `total`,
	COALESCE ( max(( SELECT `job_stat_results`.`count` FROM DUAL WHERE ( `job_stat_results`.`state` = 'SCHEDULED' ))), 0 ) AS `scheduled`,
	COALESCE ( max(( SELECT `job_stat_results`.`count` FROM DUAL WHERE ( `job_stat_results`.`state` = 'ENQUEUED' ))), 0 ) AS `enqueued`,
	COALESCE ( max(( SELECT `job_stat_results`.`count` FROM DUAL WHERE ( `job_stat_results`.`state` = 'PROCESSING' ))), 0 ) AS `processing`,
	COALESCE ( max(( SELECT `job_stat_results`.`count` FROM DUAL WHERE ( `job_stat_results`.`state` = 'FAILED' ))), 0 ) AS `failed`,
	COALESCE ( max(( SELECT `job_stat_results`.`count` FROM DUAL WHERE ( `job_stat_results`.`state` = 'SUCCEEDED' ))), 0 ) AS `succeeded`,
	COALESCE ((
		SELECT
			cast(
			cast( `jm`.`value` AS CHAR ( 10 ) charset utf8mb4 ) AS DECIMAL ( 10, 0 )) 
		FROM
			`scheduler_jobrunr_metadata` `jm` 
		WHERE
			( `jm`.`id` = 'succeeded-jobs-counter-cluster' )),
		0 
	) AS `allTimeSucceeded`,
	COALESCE ( max(( SELECT `job_stat_results`.`count` FROM DUAL WHERE ( `job_stat_results`.`state` = 'DELETED' ))), 0 ) AS `deleted`,(
	SELECT
		count( 0 ) 
	FROM
		`scheduler_jobrunr_backgroundjobservers` 
		) AS `nbrOfBackgroundJobServers`,(
	SELECT
		count( 0 ) 
	FROM
		`scheduler_jobrunr_recurring_jobs` 
	) AS `nbrOfRecurringJobs` 
FROM
	( SELECT `scheduler_jobrunr_jobs`.`state` AS `state`, count( 0 ) AS `count` FROM `scheduler_jobrunr_jobs` GROUP BY `scheduler_jobrunr_jobs`.`state` WITH ROLLUP ) `job_stat_results`

我测试过rpm部署的polardb,查询是正常的,在rpm部署的polardb中,我通过select @@versionselect version() 的返回一致,都是返回8.0.32-X-Cluster-8.4.19,但是在docker部署的polardb-x中,select version()返回 5.6.29-PXC-5.4.19-SNAPSHOT, select @@version 返回的是8.0.32-X-Cluster-8.4.19,我认为SQL查询时的错误可能会和这个有关系
image
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant