Add DBVersion #1723

Merged
lunny merged 7 commits from lunny/version into master 6 months ago
lunny commented 1 year ago
Owner
There is no content yet.
lunny added the
kind/enhancement
label 1 year ago
lunny added 1 commit 1 year ago
05c0fe2e30
Add DBVersion
6543 reviewed 1 year ago
Dismissed
}
// Table table struct
type Table struct {
6543 commented 1 year ago

this rm looks unrelated

this rm looks unrelated
lunny commented 1 year ago
Poster
Owner

Yes, this is unused codes.

Yes, this is unused codes.
lunny marked this conversation as resolved
6543 commented 1 year ago

from CI:

  • Postgress: 9.5.22 on x86_64-pc-linux-gnu (Debian 9.5.22-1.pgdg90+1), compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit
  • Sqlite3: 3.31.1
  • MySQL: 5.7.29
  • MSSQL: Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64) Nov 30 2018 12:57:58 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)
  • TiDB: 5.7.25-TiDB-v3.0.3
  • CockroachDB: CockroachDB CCL v19.2.4 (x86_64-unknown-linux-gnu, built

I dont know if it should return the full string or only the real version number ...

from CI: * Postgress: `9.5.22 on x86_64-pc-linux-gnu (Debian 9.5.22-1.pgdg90+1), compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit` * Sqlite3: `3.31.1` * MySQL: `5.7.29` * MSSQL: `Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64) Nov 30 2018 12:57:58 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)` * TiDB: `5.7.25-TiDB-v3.0.3` * CockroachDB: `CockroachDB CCL v19.2.4 (x86_64-unknown-linux-gnu, built` I dont know if it should return the full string or only the real version number ...
Poster
Owner

from CI:

  • Postgress: 9.5.22 on x86_64-pc-linux-gnu (Debian 9.5.22-1.pgdg90+1), compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit
  • Sqlite3: 3.31.1
  • MySQL: 5.7.29
  • MSSQL: Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64) Nov 30 2018 12:57:58 Copyright (C) 2017 Microsoft Corporation Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)
  • TiDB: 5.7.25-TiDB-v3.0.3
  • CockroachDB: CockroachDB CCL v19.2.4 (x86_64-unknown-linux-gnu, built

I dont know if it should return the full string or only the real version number ...

It's difficult to parse? ?

> from CI: > > * Postgress: `9.5.22 on x86_64-pc-linux-gnu (Debian 9.5.22-1.pgdg90+1), compiled by gcc (Debian 6.3.0-18+deb9u1) 6.3.0 20170516, 64-bit` > * Sqlite3: `3.31.1` > * MySQL: `5.7.29` > * MSSQL: `Microsoft SQL Server 2017 (RTM-CU13) (KB4466404) - 14.0.3048.4 (X64) > Nov 30 2018 12:57:58 > Copyright (C) 2017 Microsoft Corporation > Developer Edition (64-bit) on Linux (Ubuntu 16.04.5 LTS)` > * TiDB: `5.7.25-TiDB-v3.0.3` > * CockroachDB: `CockroachDB CCL v19.2.4 (x86_64-unknown-linux-gnu, built` > > I dont know if it should return the full string or only the real version number ... It's difficult to parse? ?
6543 commented 1 year ago

I'll thought about it ... but in the end I think the user has to parse this itself because we cant realy tell what exat info he like to have ...

on MSSQL for example, he might like to get the patch number (KB4466404) or just the name of the "generel" version (Microsoft SQL Server 2017) ...

so for me I come to the conclusion that this output should be ok

I'll thought about it ... but in the end I think the user has to parse this itself because we cant realy tell what exat info he like to have ... on MSSQL for example, he might like to get the patch number (KB4466404) or just the name of the "generel" version (Microsoft SQL Server 2017) ... so for me I come to the conclusion that this output should be ok
6543 approved these changes 1 year ago
Dismissed
6543 commented 1 year ago

Ping

Ping
lunny added 1 commit 1 year ago
88fe939758 Merge branch 'master' into lunny/version
Poster
Owner

I think we should parse it on xorm layer. So that we should get the version like this.

Postgress: 9.5.22
Sqlite3: 3.31.1
MySQL: 5.7.29
MSSQL: 14.0.3048.4
TiDB: 3.0.3
CockroachDB: 19.2.4
I think we should parse it on xorm layer. So that we should get the version like this. ``` Postgress: 9.5.22 Sqlite3: 3.31.1 MySQL: 5.7.29 MSSQL: 14.0.3048.4 TiDB: 3.0.3 CockroachDB: 19.2.4 ```
lunny added 2 commits 8 months ago
babca38d2d parse version
lunny force-pushed lunny/version from babca38d2d to ee8327d364 6 months ago
lunny added 1 commit 6 months ago
d69ee56816
fix build
lunny added 1 commit 6 months ago
efa495a76c Merge branch 'master' into lunny/version

rows.go:13:2: xorm.io/builder@v0.3.8: Get "https://goproxy.io/xorm.io/builder/@v/v0.3.8.zip": read tcp 172.19.0.3:49170->119.28.201.50:443: read: connection reset by peer
make: *** [Makefile:151: test-mssql] Error 1

rows.go:13:2: xorm.io/builder@v0.3.8: Get "https://goproxy.io/xorm.io/builder/@v/v0.3.8.zip": read tcp 172.19.0.3:49170->119.28.201.50:443: read: connection reset by peer make: *** [Makefile:151: test-mssql] Error 1
lunny added 1 commit 6 months ago
7bc6fe5165 Merge branch 'master' into lunny/version
lunny force-pushed lunny/version from 7bc6fe5165 to 47710175c6 6 months ago
lunny added 1 commit 6 months ago
7ecc85926b
Fix version
lunny added this to the 1.1.1 milestone 6 months ago
lunny force-pushed lunny/version from 7ecc85926b to 6d24d15e11 6 months ago
lunny force-pushed lunny/version from 6d24d15e11 to e76b98c444 6 months ago
6543 reviewed 6 months ago
return nil, err
}
if strings.HasPrefix(version, "TiDB:") {
6543 commented 6 months ago

make sure with regex, strings.Split do have 3 items or we could get out of range exeptions

and use it to make sure its TiDB in the same time :)

make sure with regex, strings.Split do have 3 items or we could get out of range exeptions and use it to make sure its TiDB in the same time :)
lunny commented 6 months ago
Poster
Owner

The rule is simple, three fields with -. So I don't think we need regex here.

The rule is simple, three fields with `-`. So I don't think we need regex here.
lunny marked this conversation as resolved
lunny force-pushed lunny/version from e76b98c444 to edb5cdc2bb 6 months ago
lunny added 1 commit 6 months ago
ff0e803343
Fix tidb version parse
lunny force-pushed lunny/version from ff0e803343 to c8144bd716 6 months ago
lunny merged commit 7fd6356a85 into master 6 months ago
lunny referenced this issue from a commit 6 months ago
lunny deleted branch lunny/version 6 months ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as 7fd6356a85.
Sign in to join this conversation.
Loading…
There is no content yet.