-
-
Notifications
You must be signed in to change notification settings - Fork 141
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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}$'); | ||
(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}$') | ||
1 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- source include/have_tianmu.inc | ||
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}$'); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8103,6 +8103,9 @@ static void set_server_version(void) | |
{ | ||
char *end= strxmov(server_version, MYSQL_SERVER_VERSION, | ||
MYSQL_SERVER_SUFFIX_STR, NullS); | ||
//for release version: 5.7.36-StoneDB-v0.0.2 | ||
//for debug version: 5.7.36-StoneDB-v0.0.2.abcdef123, abcdef123 means commit id; | ||
#if 0 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add some comments here will be better? There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
#ifdef EMBEDDED_LIBRARY | ||
end= my_stpcpy(end, "-embedded"); | ||
#endif | ||
|
@@ -8122,6 +8125,24 @@ static void set_server_version(void) | |
static_cast<int>(sizeof("-asan"))) | ||
end= my_stpcpy(end, "-asan"); | ||
#endif | ||
#endif | ||
|
||
if (SERVER_VERSION_LENGTH - (end - server_version) > | ||
static_cast<int>(sizeof("-"))) | ||
end = my_stpcpy(end, "-"); | ||
if (SERVER_VERSION_LENGTH - (end - server_version) > | ||
static_cast<int>(sizeof(STONEDB_TAG_NAME))) | ||
end = my_stpcpy(end, STONEDB_TAG_NAME); | ||
|
||
#ifndef NDEBUG | ||
if (SERVER_VERSION_LENGTH - (end - server_version) > | ||
static_cast<int>(sizeof("."))) | ||
end = my_stpcpy(end, "."); | ||
if (SERVER_VERSION_LENGTH - (end - server_version) > | ||
static_cast<int>(sizeof(STONEDB_COMMIT_ID))) | ||
end = my_stpcpy(end, STONEDB_COMMIT_ID); | ||
#endif | ||
|
||
} | ||
|
||
|
||
|
There was a problem hiding this comment.
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.There was a problem hiding this comment.
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