@@ -5,6 +5,7 @@ import gosql "database/sql"
5
5
// ServerInfo represents the online config of a MySQL server.
6
6
type ServerInfo struct {
7
7
Version string
8
+ VersionComment string
8
9
Hostname string
9
10
Port gosql.NullInt64
10
11
BinlogFormat string
@@ -22,13 +23,12 @@ type ServerInfo struct {
22
23
// the online config of a MySQL server.
23
24
func GetServerInfo (db * gosql.DB ) (* ServerInfo , error ) {
24
25
var info ServerInfo
25
- query := `select /* gh-ost */ @@global.version, @@global.hostname , @@global.port ,
26
- @@global.binlog_format, @@global.binlog_row_image, @@global.log_bin,
26
+ query := `select /* gh-ost */ @@global.version, @@global.version_comment , @@global.hostname ,
27
+ @@global.port, @@global. binlog_format, @@global.binlog_row_image, @@global.log_bin,
27
28
@@global.log_slave_updates, @@global.sql_mode, @@global.time_zone`
28
- if err := db .QueryRow (query ).Scan (& info .Version , & info .Hostname ,
29
- & info .Port , & info .BinlogFormat , & info .BinlogRowImage ,
30
- & info .LogBin , & info .LogSlaveUpdates , & info .SQLMode ,
31
- & info .TimeZone ,
29
+ if err := db .QueryRow (query ).Scan (& info .Version , & info .VersionComment , & info .Hostname ,
30
+ & info .Port , & info .BinlogFormat , & info .BinlogRowImage , & info .LogBin ,
31
+ & info .LogSlaveUpdates , & info .SQLMode , & info .TimeZone ,
32
32
); err != nil {
33
33
return nil , err
34
34
}
0 commit comments