Browse Source

Merge branch 'master' of https://github.com/go-sql-driver/mysql into colconv

Arne Hormann 10 năm trước cách đây
mục cha
commit
654304f409
3 tập tin đã thay đổi với 13 bổ sung2 xóa
  1. 1 0
      AUTHORS
  2. 3 1
      README.md
  3. 9 1
      const.go

+ 1 - 0
AUTHORS

@@ -31,6 +31,7 @@ Luke Scott <luke at webconnex.com>
 Michael Woolnough <michael.woolnough at gmail.com>
 Nicola Peduzzi <thenikso at gmail.com>
 Runrioter Wung <runrioter at gmail.com>
+Soroush Pour <me at soroushjp.com>
 Xiaobing Jiang <s7v7nislands at gmail.com>
 Xiuming Chen <cc at cxm.cc>
 

+ 3 - 1
README.md

@@ -205,6 +205,8 @@ Default:        UTC
 
 Sets the location for time.Time values (when using `parseTime=true`). *"Local"* sets the system's location. See [time.LoadLocation](http://golang.org/pkg/time/#LoadLocation) for details.
 
+Note that this sets the location for time.Time values but does not change MySQL's [time_zone setting](https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html). For that see the [time_zone system variable](#system-variables), which can also be set as a DSN parameter.
+
 Please keep in mind, that param values must be [url.QueryEscape](http://golang.org/pkg/net/url/#QueryEscape)'ed. Alternatively you can manually replace the `/` with `%2F`. For example `US/Pacific` would be `loc=US%2FPacific`.
 
 
@@ -257,7 +259,7 @@ Default:        false
 
 All other parameters are interpreted as system variables:
   * `autocommit`: `"SET autocommit=<value>"`
-  * `time_zone`: `"SET time_zone=<value>"`
+  * [`time_zone`](https://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html): `"SET time_zone=<value>"`
   * [`tx_isolation`](https://dev.mysql.com/doc/refman/5.5/en/server-system-variables.html#sysvar_tx_isolation): `"SET tx_isolation=<value>"`
   * `param`: `"SET <param>=<value>"`
 

+ 9 - 1
const.go

@@ -24,6 +24,7 @@ const (
 	iERR         byte = 0xff
 )
 
+// https://dev.mysql.com/doc/internals/en/capability-flags.html#packet-Protocol::CapabilityFlags
 type clientFlag uint32
 
 const (
@@ -45,6 +46,13 @@ const (
 	clientSecureConn
 	clientMultiStatements
 	clientMultiResults
+	clientPSMultiResults
+	clientPluginAuth
+	clientConnectAttrs
+	clientPluginAuthLenEncClientData
+	clientCanHandleExpiredPasswords
+	clientSessionTrack
+	clientDeprecateEOF
 )
 
 const (
@@ -78,6 +86,7 @@ const (
 	comStmtFetch
 )
 
+// https://dev.mysql.com/doc/internals/en/com-query-response.html#packet-Protocol::ColumnType
 const (
 	fieldTypeDecimal byte = iota
 	fieldTypeTiny
@@ -132,7 +141,6 @@ const (
 )
 
 // http://dev.mysql.com/doc/internals/en/status-flags.html
-
 type statusFlag uint16
 
 const (