apache / shardingsphere

Distributed SQL transaction & query engine for data sharding, scaling, encryption, and more - on any database.
Apache License 2.0
19.88k stars 6.73k forks source link

"ERROR 1046 (3D000): No database selected",`preview sql` can't act as nomale sql ,even though i appoint database in sql #20998

Open wsm12138 opened 2 years ago

wsm12138 commented 2 years ago

Bug Report

Which version of ShardingSphere did you use?

f44e5d3c09a38139dbb2e1b0548816aa572ccc3c

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere-Proxy

Expected behavior

preview select have same action like select

Actual behavior

image

Reason analyze (If you can)

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

  1. start proxy
  2. don't use db
  3. execute select 1 from db.table image

Example codes for reproduce this issue (such as a github link).

TeslaCN commented 2 years ago

@wsm12138 What does nomale SQL mean?

RaigorJiang commented 1 year ago

I will follow up @wsm12138

wsm12138 commented 2 months ago

I will follow up @wsm12138

Thanks