dbx icon indicating copy to clipboard operation
dbx copied to clipboard

[Bug] 顶部执行和左侧执行sql查询结果不一致问题

Open devyangbw opened this issue 5 months ago • 3 comments

数据库类型和版本

MySQL 8.2.0

问题描述

Image 选中执行同一sql,通过顶部的执行按钮执行后可以查到数据,通过sql左侧的执行按钮执行查不到数据,具体如gif所示。

附日志: `DBX debug log Exported: 2026-07-02T03:03:26.986Z User agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36 Edg/149.0.0.0 Platform: Win32 Timezone: Asia/Shanghai

[2026-07-02T03:01:19.569Z] [INFO] [DBX][debug-log] enabled {"url":"http://tauri.localhost/","viewport":"1920x1032","devicePixelRatio":1,"language":"zh-CN","online":true} [2026-07-02T03:01:19.569Z] [DEBUG] [DBX][api:start] saveDesktopSettings [2026-07-02T03:01:19.580Z] [DEBUG] [DBX][api:success] {"operation":"saveDesktopSettings","elapsedMs":11} [2026-07-02T03:01:23.687Z] [DEBUG] [ui:click] {"tag":"button"} [2026-07-02T03:01:23.688Z] [INFO] [DBX][executeTabSql:start] {"traceId":"2eccfacc","tabId":"525d7ac5-b847-4725-b313-a6a931549287","mode":"query","connectionId":"8d0a76b1-9495-4244-85e5-1b97bc80699a","database":"tyl-bsms-bdco","sql":"SELECT data_time, data1,data2\nFROM\n data_static_original AS ds\nWHERE\n project_code = 'GDQ_JH'\n AND point_code = 'GDQ_JH_P20250327110312623'\n AND data_time >= '2026-04-01 00:00:00'\n AND data_time <= '2026-06-30 23:59:59';"} [2026-07-02T03:01:23.688Z] [INFO] [DBX][executeTabSql:ensure-connected:start] {"traceId":"2eccfacc","elapsed":"0ms"} [2026-07-02T03:01:23.688Z] [DEBUG] [DBX][api:start] checkConnectionHealth [2026-07-02T03:01:23.695Z] [DEBUG] [DBX][api:success] {"operation":"checkConnectionHealth","elapsedMs":7} [2026-07-02T03:01:23.695Z] [INFO] [DBX][executeTabSql:ensure-connected:done] {"traceId":"2eccfacc","elapsed":"7ms"} [2026-07-02T03:01:23.695Z] [INFO] [DBX][executeTabSql:previous-session-close:start] {"traceId":"2eccfacc","elapsed":"7ms"} [2026-07-02T03:01:23.695Z] [INFO] [DBX][executeTabSql:previous-session-close:done] {"traceId":"2eccfacc","elapsed":"7ms"} [2026-07-02T03:01:23.695Z] [DEBUG] [DBX][api:start] prepareQueryPaginationExecutionPlan [2026-07-02T03:01:23.698Z] [DEBUG] [DBX][api:success] {"operation":"prepareQueryPaginationExecutionPlan","elapsedMs":3} [2026-07-02T03:01:23.698Z] [INFO] [DBX][executeTabSql:execute-multi:start] {"traceId":"2eccfacc","elapsed":"10ms"} [2026-07-02T03:01:23.698Z] [INFO] [DBX][executeTabSql:execute-multi:invoke] {"traceId":"2eccfacc","elapsed":"10ms","optionKeys":["maxRows","fetchSize","clientSessionId","timeoutSecs"],"clientSession":true} [2026-07-02T03:01:23.698Z] [DEBUG] [DBX][api:start] executeMulti [2026-07-02T03:01:29.197Z] [DEBUG] [DBX][completion-metadata:limit] {"event":"start","scope":"8d0a76b1-9495-4244-85e5-1b97bc80699a:tyl-bsms-bdco","kind":"tables","active":1,"queued":0} [2026-07-02T03:01:29.197Z] [DEBUG] [DBX][api:start] checkConnectionHealth [2026-07-02T03:01:29.200Z] [DEBUG] [DBX][api:success] {"operation":"checkConnectionHealth","elapsedMs":3} [2026-07-02T03:01:29.200Z] [DEBUG] [DBX][api:start] listTables [2026-07-02T03:01:29.242Z] [DEBUG] [DBX][api:success] {"operation":"listTables","elapsedMs":42} [2026-07-02T03:01:29.242Z] [DEBUG] [DBX][api:start] listTables [2026-07-02T03:01:29.246Z] [DEBUG] [DBX][api:success] {"operation":"listTables","elapsedMs":4} [2026-07-02T03:01:29.246Z] [DEBUG] [DBX][completion-metadata:limit] {"event":"done","scope":"8d0a76b1-9495-4244-85e5-1b97bc80699a:tyl-bsms-bdco","kind":"tables","active":0,"queued":0} [2026-07-02T03:01:29.249Z] [DEBUG] [DBX][completion-metadata:limit] {"event":"start","scope":"8d0a76b1-9495-4244-85e5-1b97bc80699a:tyl-bsms-bdco","kind":"columns","active":1,"queued":0} [2026-07-02T03:01:29.249Z] [DEBUG] [DBX][api:start] completionAssistantSearch [2026-07-02T03:01:29.253Z] [DEBUG] [DBX][api:success] {"operation":"completionAssistantSearch","elapsedMs":4} [2026-07-02T03:01:29.254Z] [DEBUG] [DBX][completion-metadata:limit] {"event":"done","scope":"8d0a76b1-9495-4244-85e5-1b97bc80699a:tyl-bsms-bdco","kind":"columns","active":0,"queued":0} [2026-07-02T03:01:29.431Z] [DEBUG] [DBX][api:success] {"operation":"executeMulti","elapsedMs":5733} [2026-07-02T03:01:29.432Z] [INFO] [DBX][executeTabSql:execute-multi:done] {"traceId":"2eccfacc","resultCount":1,"rowCounts":[100],"columnCounts":[3],"elapsed":"5744ms"} [2026-07-02T03:01:29.432Z] [INFO] [DBX][executeTabSql:count:start] {"traceId":"2eccfacc","elapsed":"5744ms"} [2026-07-02T03:01:29.432Z] [DEBUG] [DBX][api:start] executeQuery [2026-07-02T03:01:29.432Z] [INFO] [DBX][executeTabSql:result:assigned] {"traceId":"2eccfacc","rowCount":100,"columnCount":3,"backendMs":5728,"elapsed":"5744ms"} [2026-07-02T03:01:29.432Z] [INFO] [DBX][executeTabSql:metadata:start] {"traceId":"2eccfacc","elapsed":"5744ms"} [2026-07-02T03:01:29.432Z] [INFO] [DBX][executeTabSql:metadata:editability:start] {"traceId":"2eccfacc","elapsed":"5744ms"} [2026-07-02T03:01:29.432Z] [DEBUG] [DBX][api:start] analyzeEditableQueryEditability [2026-07-02T03:01:29.432Z] [INFO] [DBX][executeTabSql:finish] {"traceId":"2eccfacc","elapsed":"5744ms"} [2026-07-02T03:01:29.433Z] [INFO] [DBX][ContentArea:result:observed] {"tabId":"525d7ac5-b847-4725-b313-a6a931549287","rowCount":100,"columnCount":3,"backendMs":5728,"isExecuting":false} [2026-07-02T03:01:29.440Z] [INFO] [DBX][DataGrid:setup] {"traceId":"1e7bff38","cacheKey":"525d7ac5-b847-4725-b313-a6a931549287-current-0","rowCount":100,"columnCount":3,"backendMs":5728,"loading":false} [2026-07-02T03:01:29.440Z] [INFO] [DBX][DataGrid:result:prop] {"traceId":"1e7bff38","cacheKey":"525d7ac5-b847-4725-b313-a6a931549287-current-0","rowCount":100,"columnCount":3,"backendMs":5728,"loading":false,"elapsedSinceSetup":"0ms"} [2026-07-02T03:01:29.442Z] [INFO] [DBX][DataGrid:display-items:ready] {"traceId":"1e7bff38","cacheKey":"525d7ac5-b847-4725-b313-a6a931549287-current-0","displayItemCount":100,"sourceRowCount":100,"elapsedSinceSetup":"2ms"} [2026-07-02T03:01:29.461Z] [INFO] [DBX][ContentArea:result:nextTick] {"tabId":"525d7ac5-b847-4725-b313-a6a931549287","elapsed":"28ms","isExecuting":false} [2026-07-02T03:01:29.461Z] [INFO] [DBX][DataGrid:result:nextTick] {"traceId":"1e7bff38","cacheKey":"525d7ac5-b847-4725-b313-a6a931549287-current-0","elapsed":"21ms","loading":false} [2026-07-02T03:01:29.465Z] [DEBUG] [DBX][api:start] saveHistory [2026-07-02T03:01:29.468Z] [INFO] [DBX][ContentArea:result:first-frame] {"tabId":"525d7ac5-b847-4725-b313-a6a931549287","elapsed":"35ms","isExecuting":false} [2026-07-02T03:01:29.469Z] [INFO] [DBX][DataGrid:result:first-frame] {"traceId":"1e7bff38","cacheKey":"525d7ac5-b847-4725-b313-a6a931549287-current-0","elapsed":"29ms","loading":false} [2026-07-02T03:01:29.469Z] [INFO] [DBX][DataGrid:display-items:first-frame] {"traceId":"1e7bff38","cacheKey":"525d7ac5-b847-4725-b313-a6a931549287-current-0","displayItemCount":100,"renderedRows":0,"elapsed":"27ms","elapsedSinceSetup":"30ms","loading":false} [2026-07-02T03:01:29.480Z] [DEBUG] [DBX][api:success] {"operation":"analyzeEditableQueryEditability","elapsedMs":48} [2026-07-02T03:01:29.480Z] [INFO] [DBX][executeTabSql:metadata:editability:done] {"traceId":"2eccfacc","editable":true,"elapsed":"5793ms"} [2026-07-02T03:01:29.481Z] [INFO] [DBX][executeTabSql:metadata:get-columns:start] {"traceId":"2eccfacc","schema":"tyl-bsms-bdco","table":"data_static_original","elapsed":"5793ms"} [2026-07-02T03:01:29.481Z] [DEBUG] [DBX][api:start] getColumns [2026-07-02T03:01:29.481Z] [DEBUG] [DBX][api:success] {"operation":"saveHistory","elapsedMs":17} [2026-07-02T03:01:29.496Z] [DEBUG] [DBX][api:success] {"operation":"getColumns","elapsedMs":15} [2026-07-02T03:01:29.496Z] [INFO] [DBX][executeTabSql:metadata:get-columns:done] {"traceId":"2eccfacc","columnCount":26,"elapsed":"5808ms"} [2026-07-02T03:01:29.496Z] [DEBUG] [DBX][api:start] listIndexes [2026-07-02T03:01:29.500Z] [DEBUG] [DBX][api:success] {"operation":"listIndexes","elapsedMs":4} [2026-07-02T03:01:29.500Z] [INFO] [DBX][executeTabSql:metadata:done] {"traceId":"2eccfacc","elapsed":"5812ms"} [2026-07-02T03:01:33.369Z] [INFO] [DBX][executeTabSql:start] {"traceId":"e0ed1fe7","tabId":"525d7ac5-b847-4725-b313-a6a931549287","mode":"query","connectionId":"8d0a76b1-9495-4244-85e5-1b97bc80699a","database":"tyl-bsms-bdco","sql":"# 9925000107 240305004132883\nSELECT data_time, data1,data2\nFROM\n data_static_original AS ds\nWHERE\n project_code = 'GDQ_JH'\n AND point_code = 'GDQ_JH_P20250327110312623'\n AND data_time >= '2026-04-01 00:00:00'\n AND data_time <= '2026-06-30 23:59:59';"} [2026-07-02T03:01:33.369Z] [INFO] [DBX][executeTabSql:ensure-connected:start] {"traceId":"e0ed1fe7","elapsed":"0ms"} [2026-07-02T03:01:33.369Z] [DEBUG] [DBX][api:start] checkConnectionHealth [2026-07-02T03:01:33.377Z] [DEBUG] [DBX][api:success] {"operation":"checkConnectionHealth","elapsedMs":8} [2026-07-02T03:01:33.377Z] [INFO] [DBX][executeTabSql:ensure-connected:done] {"traceId":"e0ed1fe7","elapsed":"9ms"} [2026-07-02T03:01:33.377Z] [INFO] [DBX][executeTabSql:previous-session-close:start] {"traceId":"e0ed1fe7","elapsed":"9ms"} [2026-07-02T03:01:33.377Z] [INFO] [DBX][executeTabSql:previous-session-close:done] {"traceId":"e0ed1fe7","elapsed":"9ms"} [2026-07-02T03:01:33.377Z] [DEBUG] [DBX][api:start] prepareQueryPaginationExecutionPlan [2026-07-02T03:01:33.380Z] [DEBUG] [DBX][api:success] {"operation":"prepareQueryPaginationExecutionPlan","elapsedMs":2} [2026-07-02T03:01:33.380Z] [INFO] [DBX][executeTabSql:execute-multi:start] {"traceId":"e0ed1fe7","elapsed":"11ms"} [2026-07-02T03:01:33.380Z] [INFO] [DBX][executeTabSql:execute-multi:invoke] {"traceId":"e0ed1fe7","elapsed":"12ms","optionKeys":["clientSessionId","timeoutSecs"],"clientSession":true} [2026-07-02T03:01:33.380Z] [DEBUG] [DBX][api:start] executeMulti [2026-07-02T03:01:33.480Z] [DEBUG] [ui:click] {"tag":"button","type":"button","label":"Execute statement"} [2026-07-02T03:01:36.655Z] [DEBUG] [DBX][api:success] {"operation":"executeQuery","elapsedMs":7223} [2026-07-02T03:01:36.655Z] [INFO] [DBX][executeTabSql:count:done] {"traceId":"2eccfacc","total":755982,"elapsed":"12968ms"} [2026-07-02T03:01:36.656Z] [DEBUG] [DBX][api:start] closeClientConnectionSession [2026-07-02T03:01:36.658Z] [DEBUG] [DBX][api:success] {"operation":"closeClientConnectionSession","elapsedMs":2} [2026-07-02T03:01:41.468Z] [DEBUG] [DBX][api:success] {"operation":"executeMulti","elapsedMs":8087} [2026-07-02T03:01:41.468Z] [INFO] [DBX][executeTabSql:execute-multi:done] {"traceId":"e0ed1fe7","resultCount":1,"rowCounts":[0],"columnCounts":[0],"elapsed":"8099ms"} [2026-07-02T03:01:41.468Z] [INFO] [DBX][executeTabSql:result:assigned] {"traceId":"e0ed1fe7","rowCount":0,"columnCount":0,"backendMs":8084,"elapsed":"8099ms"} [2026-07-02T03:01:41.468Z] [INFO] [DBX][executeTabSql:metadata:start] {"traceId":"e0ed1fe7","elapsed":"8100ms"} [2026-07-02T03:01:41.468Z] [INFO] [DBX][executeTabSql:finish] {"traceId":"e0ed1fe7","elapsed":"8100ms"} [2026-07-02T03:01:41.469Z] [INFO] [DBX][ContentArea:result:observed] {"tabId":"525d7ac5-b847-4725-b313-a6a931549287","rowCount":0,"columnCount":0,"backendMs":8084,"isExecuting":false} [2026-07-02T03:01:41.470Z] [INFO] [DBX][executeTabSql:metadata:done] {"traceId":"e0ed1fe7","elapsed":"8101ms"} [2026-07-02T03:01:41.470Z] [INFO] [DBX][ContentArea:result:nextTick] {"tabId":"525d7ac5-b847-4725-b313-a6a931549287","elapsed":"1ms","isExecuting":false} [2026-07-02T03:01:41.470Z] [DEBUG] [DBX][api:start] saveHistory [2026-07-02T03:01:41.476Z] [INFO] [DBX][ContentArea:result:first-frame] {"tabId":"525d7ac5-b847-4725-b313-a6a931549287","elapsed":"8ms","isExecuting":false} [2026-07-02T03:01:41.478Z] [DEBUG] [DBX][api:success] {"operation":"saveHistory","elapsedMs":8} [2026-07-02T03:01:43.079Z] [DEBUG] [ui:click] {"tag":"button"} [2026-07-02T03:01:44.776Z] [DEBUG] [ui:click] {"tag":"button","type":"button","label":"外观"} [2026-07-02T03:01:49.984Z] [DEBUG] [ui:click] {"tag":"button","type":"button","label":"复制日志"} [2026-07-02T03:02:21.633Z] [DEBUG] [ui:click] {"tag":"button","id":"debug-logging-enabled","role":"switch","type":"button","label":"启用调试日志"} [2026-07-02T03:03:26.986Z] [DEBUG] [ui:click] {"tag":"button","type":"button","label":"复制日志"}

===== Native / Tauri logs ===== Native log dir: C:\Users\Administrator\AppData\Local\com.dbx.app\logs

===== DBX.log ===== [2026-07-02][03:01:23][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:01:23][sqlparser::parser][DEBUG] Parsing sql 'SELECT data_time, data1,data2 FROM data_static_original AS ds WHERE project_code = 'GDQ_JH' AND point_code = 'GDQ_JH_P20250327110312623' AND data_time >= '2026-04-01 00:00:00' AND data_time <= '2026-06-30 23:59:59';'... [2026-07-02][03:01:23][sqlparser::parser][DEBUG] parsing expr [2026-07-02][03:01:23][sqlparser::parser][DEBUG] prefix: Identifier(Ident { value: "data_time", quote_style: None, span: Span(Location(1,8)..Location(1,17)) }) [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: Comma, span: Span(Location(1,17)..Location(1,18)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 0 [2026-07-02][03:01:23][sqlparser::parser][DEBUG] parsing expr [2026-07-02][03:01:23][sqlparser::parser][DEBUG] prefix: Identifier(Ident { value: "data1", quote_style: None, span: Span(Location(1,19)..Location(1,24)) }) [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: Comma, span: Span(Location(1,24)..Location(1,25)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 0 [2026-07-02][03:01:23][sqlparser::parser][DEBUG] parsing expr [2026-07-02][03:01:23][sqlparser::parser][DEBUG] prefix: Identifier(Ident { value: "data2", quote_style: None, span: Span(Location(1,25)..Location(1,30)) }) [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: Word(Word { value: "FROM", quote_style: None, keyword: FROM }), span: Span(Location(2,1)..Location(2,5)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 0 [2026-07-02][03:01:23][sqlparser::parser][DEBUG] parsing expr [2026-07-02][03:01:23][sqlparser::parser][DEBUG] prefix: Identifier(Ident { value: "project_code", quote_style: None, span: Span(Location(5,3)..Location(5,15)) }) [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: Eq, span: Span(Location(5,16)..Location(5,17)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 20 [2026-07-02][03:01:23][sqlparser::parser][DEBUG] infix: TokenWithSpan { token: Eq, span: Span(Location(5,16)..Location(5,17)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] parsing expr [2026-07-02][03:01:23][sqlparser::parser][DEBUG] prefix: Value(ValueWithSpan { value: SingleQuotedString("GDQ_JH"), span: Span(Location(5,18)..Location(5,26)) }) [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: Word(Word { value: "AND", quote_style: None, keyword: AND }), span: Span(Location(6,3)..Location(6,6)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 10 [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: Word(Word { value: "AND", quote_style: None, keyword: AND }), span: Span(Location(6,3)..Location(6,6)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 10 [2026-07-02][03:01:23][sqlparser::parser][DEBUG] infix: TokenWithSpan { token: Word(Word { value: "AND", quote_style: None, keyword: AND }), span: Span(Location(6,3)..Location(6,6)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] parsing expr [2026-07-02][03:01:23][sqlparser::parser][DEBUG] prefix: Identifier(Ident { value: "point_code", quote_style: None, span: Span(Location(6,7)..Location(6,17)) }) [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: Eq, span: Span(Location(6,18)..Location(6,19)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 20 [2026-07-02][03:01:23][sqlparser::parser][DEBUG] infix: TokenWithSpan { token: Eq, span: Span(Location(6,18)..Location(6,19)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] parsing expr [2026-07-02][03:01:23][sqlparser::parser][DEBUG] prefix: Value(ValueWithSpan { value: SingleQuotedString("GDQ_JH_P20250327110312623"), span: Span(Location(6,20)..Location(6,47)) }) [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: Word(Word { value: "AND", quote_style: None, keyword: AND }), span: Span(Location(7,3)..Location(7,6)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 10 [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: Word(Word { value: "AND", quote_style: None, keyword: AND }), span: Span(Location(7,3)..Location(7,6)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 10 [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: Word(Word { value: "AND", quote_style: None, keyword: AND }), span: Span(Location(7,3)..Location(7,6)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 10 [2026-07-02][03:01:23][sqlparser::parser][DEBUG] infix: TokenWithSpan { token: Word(Word { value: "AND", quote_style: None, keyword: AND }), span: Span(Location(7,3)..Location(7,6)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] parsing expr [2026-07-02][03:01:23][sqlparser::parser][DEBUG] prefix: Identifier(Ident { value: "data_time", quote_style: None, span: Span(Location(7,7)..Location(7,16)) }) [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: GtEq, span: Span(Location(7,17)..Location(7,19)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 20 [2026-07-02][03:01:23][sqlparser::parser][DEBUG] infix: TokenWithSpan { token: GtEq, span: Span(Location(7,17)..Location(7,19)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] parsing expr [2026-07-02][03:01:23][sqlparser::parser][DEBUG] prefix: Value(ValueWithSpan { value: SingleQuotedString("2026-04-01 00:00:00"), span: Span(Location(7,20)..Location(7,41)) }) [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: Word(Word { value: "AND", quote_style: None, keyword: AND }), span: Span(Location(8,3)..Location(8,6)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 10 [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: Word(Word { value: "AND", quote_style: None, keyword: AND }), span: Span(Location(8,3)..Location(8,6)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 10 [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: Word(Word { value: "AND", quote_style: None, keyword: AND }), span: Span(Location(8,3)..Location(8,6)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 10 [2026-07-02][03:01:23][sqlparser::parser][DEBUG] infix: TokenWithSpan { token: Word(Word { value: "AND", quote_style: None, keyword: AND }), span: Span(Location(8,3)..Location(8,6)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] parsing expr [2026-07-02][03:01:23][sqlparser::parser][DEBUG] prefix: Identifier(Ident { value: "data_time", quote_style: None, span: Span(Location(8,7)..Location(8,16)) }) [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: LtEq, span: Span(Location(8,17)..Location(8,19)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 20 [2026-07-02][03:01:23][sqlparser::parser][DEBUG] infix: TokenWithSpan { token: LtEq, span: Span(Location(8,17)..Location(8,19)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] parsing expr [2026-07-02][03:01:23][sqlparser::parser][DEBUG] prefix: Value(ValueWithSpan { value: SingleQuotedString("2026-06-30 23:59:59"), span: Span(Location(8,20)..Location(8,41)) }) [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: SemiColon, span: Span(Location(8,41)..Location(8,42)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 0 [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: SemiColon, span: Span(Location(8,41)..Location(8,42)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 0 [2026-07-02][03:01:23][sqlparser::dialect][DEBUG] get_next_precedence_full() TokenWithSpan { token: SemiColon, span: Span(Location(8,41)..Location(8,42)) } [2026-07-02][03:01:23][sqlparser::parser][DEBUG] next precedence: 0 [2026-07-02][03:01:23][dbx_lib::commands::query][INFO] [query][execute_multi:start] trace_id=2eccfacc-48b8-4f88-a478-e8435b9d885d connection_id=8d0a76b1-9495-4244-85e5-1b97bc80699a database=tyl-bsms-bdco schema=None sql=SELECT data_time, data1,data2 FROM data_static_original AS ds WHERE project_code = 'GDQ_JH' AND point_code = 'GDQ_JH_P20250327110312623' AND data_time >= '2026-04-01 00:00:00' AND data_time <= '2026-06-30 23:59:59' LIMIT 100; [2026-07-02][03:01:23][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:01:24][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:01:29][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:01:29][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:01:29][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:01:29][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:01:29][dbx_core::schema][DEBUG] [schema][completion_assistant:start] connection_id=8d0a76b1-9495-4244-85e5-1b97bc80699a database=tyl-bsms-bdco schema=None kinds=[Column] mask= limit=Some(500) [2026-07-02][03:01:29][dbx_lib::commands::query][INFO] [query][execute_multi:done] trace_id=2eccfacc-48b8-4f88-a478-e8435b9d885d elapsed_ms=5730 result_count=1 row_counts=[100] backend_execution_times_ms=[5728] [2026-07-02][03:01:29][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:01:29][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=6 timeout_ms=5000 [2026-07-02][03:01:29][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=1 timeout_ms=5000 [2026-07-02][03:01:29][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:01:33][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=1 timeout_ms=5000 [2026-07-02][03:01:33][dbx_lib::commands::query][INFO] [query][execute_multi:start] trace_id=e0ed1fe7-eaaa-4cdc-a27b-ef0c30e80815 connection_id=8d0a76b1-9495-4244-85e5-1b97bc80699a database=tyl-bsms-bdco schema=None sql=# 9925000107 240305004132883 SELECT data_time, data1,data2 FROM data_static_original AS ds WHERE project_code = 'GDQ_JH' AND point_code = 'GDQ_JH_P20250327110312623' AND data_time >= '2026-04-01 00:00:00' AND data_time <= '2026-06-30 23:59:59'; [2026-07-02][03:01:33][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:01:33][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:01:41][dbx_lib::commands::query][INFO] [query][execute_multi:done] trace_id=e0ed1fe7-eaaa-4cdc-a27b-ef0c30e80815 elapsed_ms=8084 result_count=1 row_counts=[0] backend_execution_times_ms=[8084] [2026-07-02][03:01:42][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:01:53][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:01:54][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:02:12][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:02:23][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:02:24][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=1 timeout_ms=5000 [2026-07-02][03:02:42][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:02:53][dbx_core::connection][INFO] Closing idle session-scoped connection pool '8d0a76b1-9495-4244-85e5-1b97bc80699a:tyl-bsms-bdco:session:525d7ac5-b847-4725-b313-a6a931549287' after 60s [2026-07-02][03:02:54][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:03:12][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000 [2026-07-02][03:03:24][dbx_core::db::mysql][DEBUG] [db:health.check:done] elapsed_ms=0 timeout_ms=5000

`

DBX 版本

v0.5.43

操作系统

Windows

优先级(是否紧急)

🟠 P1 重要 · 尽快处理

补充信息

No response

devyangbw avatar Jul 02 '26 03:07 devyangbw

@devyangbw 我这边查看没有出现此问题,如果还是存在,可以再次反馈一下。

aiLi0617 avatar Jul 25 '26 16:07 aiLi0617

我在当前 main(d72d4beed)上使用本地 MySQL 8.4 测试库复测,暂未复现。

测试 SQL 保留了原日志中的 # 9925000107 240305004132883 前置注释,后面查询本地测试表。选中 SQL 使用顶部执行入口返回 2 行;随后直接点击编辑器左侧的语句执行按钮,同样返回 2 行,最终执行 SQL 和结果一致。

原反馈版本为 v0.5.43,当前版本该执行路径应已修复,因此这里不认领。

zipg avatar Aug 09 '26 06:08 zipg

已确认该问题由 d14fd8470 完整修复,并已随 v0.5.61 发布,本 Issue 将关闭。

根因是 MySQL 结果集分类未跳过 # 行注释,导致左侧入口附带前置注释时,已执行的 SELECT 结果行被当作非查询结果丢弃。修复后改为按 MySQL 方言识别首个可执行关键字,并覆盖了 SELECT、SHOW 与非查询语句边界;当前 main 也已使用 MySQL 8.4 对两个入口完成复测。

请升级到 v0.5.61 或更高版本再次验证。如果仍有问题,请新建 Issue,并附当前版本、完整 SQL、两个入口的执行日志及本 Issue 链接。

t8y2 avatar Aug 13 '26 08:08 t8y2