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

feat(stonedb): show stonedb tag version. (#1251) #1252

Merged
merged 1 commit into from
Jan 31, 2023

Conversation

lujiashun
Copy link

@lujiashun lujiashun commented Jan 30, 2023

Summary about this PR

Issue Number: close #1251

Tests Check List

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Changelog

  • New Feature
  • Bug Fix
  • Performance Improvement
  • Build/Testing/CI/CD
  • Documentation
  • Not for changelog (changelog entry is not required)

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features

@mergify
Copy link
Contributor

mergify bot commented Jan 30, 2023

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@mergify mergify bot added the PR-feature feature for pull request label Jan 30, 2023
lujiashun pushed a commit to lujiashun/stonedb that referenced this pull request Jan 30, 2023
@lujiashun lujiashun force-pushed the feat-1252-stonedb5.7 branch from ef982d1 to 1af591d Compare January 30, 2023 05:49
@lujiashun lujiashun changed the title feat(stonedb): show stonedb tag version. (#1252) feat(stonedb): show stonedb tag version. (#1251) Jan 30, 2023
@lujiashun lujiashun force-pushed the feat-1252-stonedb5.7 branch from 1af591d to 3adabd7 Compare January 30, 2023 07:19
@lujiashun
Copy link
Author

for debug version

root@ub01:/data/codebase/stonedb57/stonedb/build/build_stonedb-5.7-dev_x86_64_Ubuntu20.04_Debug_2023-01-30_12-48-37# /data/stonedb57/install/bin/mysql -uroot -p -S /data/stonedb57/install/tmp/mysql.sock
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.36-StoneDB-v1.0.2.b1350c790 build-

Copyright (c) 2021, 2022 StoneAtom Group Holding Limited
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select version
    -> ^C
mysql> select version();
+---------------------------------+
| version()                       |
+---------------------------------+
| 5.7.36-StoneDB-v1.0.2.b1350c790 |
+---------------------------------+
1 row in set (0.00 sec)

mysql>

@lujiashun
Copy link
Author

for release version:

root@ub01:/data/codebase/stonedb57/stonedb/build# /data/stonedb57/install/bin/mysql -uroot -p -S /data/stonedb57/install/tmp/mysql.sock
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 3
Server version: 5.7.36-StoneDB-v1.0.2 build-

Copyright (c) 2021, 2022 StoneAtom Group Holding Limited
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> select version();
+-----------------------+
| version()             |
+-----------------------+
| 5.7.36-StoneDB-v1.0.2 |
+-----------------------+
1 row in set (0.00 sec)

@codecov
Copy link

codecov bot commented Jan 30, 2023

Codecov Report

Base: 43.39% // Head: 43.34% // Decreases project coverage by -0.05% ⚠️

Coverage data is based on head (d10f4f4) compared to base (a486f2a).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head d10f4f4 differs from pull request most recent head 2019d0a. Consider uploading reports for the commit 2019d0a to get more accurate results

Additional details and impacted files
@@                 Coverage Diff                 @@
##           stonedb-5.7-dev    #1252      +/-   ##
===================================================
- Coverage            43.39%   43.34%   -0.05%     
===================================================
  Files                 1830     1830              
  Lines               396142   396143       +1     
===================================================
- Hits                171888   171727     -161     
- Misses              224254   224416     +162     
Impacted Files Coverage Δ
sql/mysqld.cc 68.13% <100.00%> (+0.01%) ⬆️
storage/tianmu/core/multi_index_builder.h 20.00% <0.00%> (-60.00%) ⬇️
storage/innobase/include/ut0mutex.ic 52.38% <0.00%> (-19.05%) ⬇️
strings/ctype-bin.c 46.15% <0.00%> (-12.31%) ⬇️
sql/aggregate_check.cc 39.73% <0.00%> (-9.61%) ⬇️
storage/tianmu/core/parallel_hash_join.h 41.17% <0.00%> (-5.89%) ⬇️
storage/tianmu/vc/expr_column.cpp 65.69% <0.00%> (-2.92%) ⬇️
storage/tianmu/core/item_tianmu_field.h 62.16% <0.00%> (-2.71%) ⬇️
storage/innobase/include/ibuf0ibuf.ic 87.50% <0.00%> (-2.50%) ⬇️
sql-common/my_time.c 73.37% <0.00%> (-2.27%) ⬇️
... and 44 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@lujiashun lujiashun force-pushed the feat-1252-stonedb5.7 branch from 3adabd7 to 6900467 Compare January 30, 2023 09:35
@@ -0,0 +1,3 @@
select (select version() regexp '^5.7.36-StoneDB-v[0-9]*\\.[0-9]*\\.[0-9]*$') or (select version() regexp '^5.7.36-StoneDB-v[0-9]*\\.[0-9]*\\.[0-9]*\\.[0-9a-z]{9}$');
Copy link
Contributor

Choose a reason for hiding this comment

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

if we upgrade our core to 5.7.4x, what will happen to this line code.

Copy link
Author

Choose a reason for hiding this comment

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

the sql result wil be 0, need to modify the testcase if upgrade to 5.7.4x

@@ -8103,6 +8103,7 @@ static void set_server_version(void)
{
char *end= strxmov(server_version, MYSQL_SERVER_VERSION,
MYSQL_SERVER_SUFFIX_STR, NullS);
#if 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Add some comments here will be better?
Old code logic --> new code.
mysqld include storage engines like tianmu, innodb, myisam..., after we change the code, select version() acctually only shows tianmu version.

Copy link
Author

@lujiashun lujiashun Jan 31, 2023

Choose a reason for hiding this comment

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

OK, thanks, I will add some comment here later. select version() shows stonedb version, include the sql layer and storage layer include tianmu, innodb

@lujiashun lujiashun force-pushed the feat-1252-stonedb5.7 branch 2 times, most recently from 6351e84 to aafd632 Compare January 31, 2023 08:04
@lujiashun lujiashun force-pushed the feat-1252-stonedb5.7 branch from aafd632 to 2019d0a Compare January 31, 2023 08:07
@mergify mergify bot merged commit e65c757 into stoneatom:stonedb-5.7-dev Jan 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-feature feature for pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feature: show stonedb tag version
4 participants