apache / apache/shardingsphere

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

Open
#20,998 3 comments 0 reactions 1 assignee View on GitHub

@RaigorJiang is already working on this.

Since Jan 29, 2023.

feature: DistSQL type: bug
Dominant language
Java
Stars
20.8k
Forks
6.9k
Avg merge
9h 55m
Merged PRs (30d)
311

Description

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).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.