Why do I get different results for the same SQL command in IDEA's console compared to MySQL's native command-line tool? Is this a bug?

已回答

hello, 

I get different results for the same SQL command in IDEA's console compared to MySQL's native command-line tool while I use IDEA.

 - there is the command: SELECT md.config_id AS configId, COALESCE(usc.is_enable, md.default_enable) AS isAllow FROM meta_data_config md LEFT JOIN config usc ON md.config_id = usc.meta_data_config_id; 

- Expected Behavior​​:

        Return usc.is_enable (from config table) when matching records exist.

        Fall back to md.default_enable (from meta_data_config table) otherwise.

- problem: The query returns values from meta_data_config even when corresponding records exist in the config table Visual

-  comparison screenshots demonstrating discrepancies in query outputs. 

ther are my all code:

 

 

0

Hi,

Please share the results of the following queries executed in the MySQL command line:

  1. SHOW CREATE TABLE config;
  2. SHOW CREATE TABLE meta_data_config;

Additionally, provide the following details:

  • MySQL version
  • MySQL JDBC driver version
  • "Database Tools and SQL" plugin version
1

Good morning,

There are result of SHOW CREATE TABLE config;  and   SHOW CREATE TABLE meta_data_config;

 

There is my 

  • MySQL version:8.0.40
  • MySQL JDBC driver version:9.1.0
  • "Database Tools and SQL" plugin version:243.23654.189

 

Mysql:

MySQL JDBC driver:

      There are different result of two method?Maybe my problem caused by these?

      I am not set the version explicitly.

Database Tools and SQL" plugin:

0

Hi,

Thank you for sharing this. I’ve been able to reproduce the issue and created ticket DBE-23322 to investigate further and address the current behavior. You can follow this ticket for updates. 

If you're not familiar with our bug-tracking system, see this article.

0

请先登录再写评论。