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

fix(open-mysql-db): fix connectionId scope bug #3820

Merged
merged 9 commits into from Mar 20, 2024

Conversation

yangwucheng
Copy link
Collaborator

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    Bug fix

  • What is the current behavior? (You can also link to an open issue here)

  1. connectionId is an instance var
  • What is the new behavior (if this is a feature change)?
  1. get connectionId dynamic from channel context

yangwucheng added 8 commits March 19, 2024 12:01
1. mock `show character set`
2. mock `show collation`
3. mock `show engines`
4. mock multi query
5. mock `information_schema.ROUTINES`
6. define `please enter database first` error
7. mock select tables, select columns, select count union, create database query
8. fix IOException cause bug
9. mock `SHOW FULL TABLES WHERE Table_type != 'VIEW'`
1. fix mysql COM_INIT_DB bug
2. mock `show status`
3. mock `INFORMATION_SCHEMA.VIEWS`
4. skip table_id field of query `show table status`
5. sqlEngine support use database
# Conflicts:
#	extensions/open-mysql-db/README.md
#	extensions/open-mysql-db/src/main/java/com/_4paradigm/openmldb/mysql/server/ServerConfig.java
# Conflicts:
#	extensions/open-mysql-db/src/main/java/cn/paxos/mysql/MySqlListener.java
@github-actions github-actions bot added the extensions airflow, kafaka extensions label Mar 20, 2024
Copy link
Collaborator

@tobegit3hub tobegit3hub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 40.70%. Comparing base (174b8dd) to head (dcf1160).

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #3820   +/-   ##
=========================================
  Coverage     40.70%   40.70%           
  Complexity      658      658           
=========================================
  Files           195      195           
  Lines         11514    11514           
  Branches       1380     1380           
=========================================
  Hits           4687     4687           
  Misses         6523     6523           
  Partials        304      304           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

SDK Test Report

101 files  ±0  101 suites  ±0   2m 8s ⏱️ -1s
347 tests ±0  333 ✅ ±0  14 💤 ±0  0 ❌ ±0 
473 runs  ±0  459 ✅ ±0  14 💤 ±0  0 ❌ ±0 

Results for commit dcf1160. ± Comparison against base commit 174b8dd.

This pull request removes 30 and adds 9 tests. Note that renamed tests count towards both.
  PARTITION BY db1.t1.col2 ORDER BY db1.t1.col1
  PARTITION BY t1.col2 ORDER BY t1.col1
  ROWS_RANGE BETWEEN 3 PRECEDING AND CURRENT ROW
 ) limit 10;](1)
 ) limit 10;](2)
 ) limit 10;](3)
 FROM db1.t1
 FROM t1
 WINDOW w1 AS (
 last join db2.t2 order by db2.t2.col1
…
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlLastJoinWithMultipleDB[,  SELECT sum(db1.t1.col1) over w1 as sum_t1_col1, db2.t2.str1 as t2_str1
 FROM db1.t1
 last join db2.t2 order by db2.t2.col1
 on db1.t1.col1 = db2.t2.col1 and db1.t1.col2 = db2.t2.col0
 WINDOW w1 AS (
  PARTITION BY db1.t1.col2 ORDER BY db1.t1.col1
  ROWS_RANGE BETWEEN 3 PRECEDING AND CURRENT ROW
 ) limit 10;](2)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlLastJoinWithMultipleDB[db1,  SELECT sum(t1.col1) over w1 as sum_t1_col1, db2.t2.str1 as t2_str1
 FROM t1
 last join db2.t2 order by db2.t2.col1
 on t1.col1 = db2.t2.col1 and t1.col2 = db2.t2.col0
 WINDOW w1 AS (
  PARTITION BY t1.col2 ORDER BY t1.col1
  ROWS_RANGE BETWEEN 3 PRECEDING AND CURRENT ROW
 ) limit 10;](1)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlLastJoinWithMultipleDB[null,  SELECT sum(db1.t1.col1) over w1 as sum_t1_col1, db2.t2.str1 as t2_str1
 FROM db1.t1
 last join db2.t2 order by db2.t2.col1
 on db1.t1.col1 = db2.t2.col1 and db1.t1.col2 = db2.t2.col0
 WINDOW w1 AS (
  PARTITION BY db1.t1.col2 ORDER BY db1.t1.col1
  ROWS_RANGE BETWEEN 3 PRECEDING AND CURRENT ROW
 ) limit 10;](3)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlMultipleDBErrorTest[, SELECT db2.t2.str1 as t2_str1
 FROM t1
 last join db2.t2 order by db2.t2.col1
 on t1.col1 = db2.t2.col1 and t1.col2 = db2.t2.col0;
, SQL parse error: Fail to transform data provider op: table t1 not exists in database []](4)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlMultipleDBErrorTest[db1, SELECT db1.t2.str1 as t2_str1
 FROM t1
 last join db2.t2 order by db2.t2.col1
 on t1.col1 = db2.t2.col1 and t1.col2 = db2.t2.col0;
, SQL parse error: Column Not found: db1.t2.str1](2)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlMultipleDBErrorTest[db1, SELECT db2.t2.str1 as t2_str1
 FROM t1
 last join db2.t2 order by db2.t2.col1
 on t1.col1 = t2.col1 and t1.col2 = db2.t2.col0;
, SQL parse error: Column Not found: .t2.col1](3)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlMultipleDBErrorTest[db1, SELECT t2.str1 as t2_str1
 FROM t1
 last join db2.t2 order by db2.t2.col1
 on t1.col1 = db2.t2.col1 and t1.col2 = db2.t2.col0;
, SQL parse error: Column Not found: .t2.str1](1)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlMultipleDBErrorTest[null, SELECT db2.t2.str1 as t2_str1
 FROM t1
 last join db2.t2 order by db2.t2.col1
 on t1.col1 = db2.t2.col1 and t1.col2 = db2.t2.col0;
, SQL parse error: Fail to transform data provider op: table t1 not exists in database []](5)
com._4paradigm.hybridse.sdk.SqlEngineTest ‑ sqlWindowLastJoin[ SELECT sum(t1.col1) over w1 as sum_t1_col1, t2.str1 as t2_str1
 FROM t1
 last join t2 order by t2.col1
 on t1.col1 = t2.col1 and t1.col2 = t2.col0
 WINDOW w1 AS (
  PARTITION BY t1.col2 ORDER BY t1.col1
  ROWS_RANGE BETWEEN 3 PRECEDING AND CURRENT ROW
 ) limit 10;](1)

@yangwucheng yangwucheng changed the title fix connectionId scope bug fix(open-mysql-db): fix connectionId scope bug Mar 20, 2024
Copy link
Contributor

Linux Test Report

 53 files   60 suites   28m 11s ⏱️
671 tests 651 ✅ 7 💤 13 ❌
672 runs  652 ✅ 7 💤 13 ❌

For more details on these failures, see this check.

Results for commit dcf1160.

@aceforeverd aceforeverd merged commit 60debe3 into 4paradigm:main Mar 20, 2024
20 of 24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extensions airflow, kafaka extensions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants