Prechádzať zdrojové kódy

Prepare for DSN without dbname

Julien Schmidt 13 rokov pred
rodič
commit
7f692dbd8e
2 zmenil súbory, kde vykonal 12 pridanie a 2 odobranie
  1. 11 1
      README.md
  2. 1 1
      packets.go

+ 11 - 1
README.md

@@ -64,11 +64,16 @@ A DSN in its fullest form:
 username:password@protocol(address)/dbname?param=value
 ```
 
-Except the databasename all values are optional, so the shortest possible DSN is:
+Except the databasename all values are optional, so the minimal DSN is:
 ```
 /dbname
 ```
 
+If you don't want to preselect a database, leave `dbname` empty:
+```
+/
+```
+
 ### Password
 Passwords may consist of any char. No escaping necessary.
 
@@ -110,6 +115,11 @@ user:password@tcp(localhost:5555)/dbname?charset=utf8
 user:password@/dbname
 ```
 
+No Database preselected:
+```
+user:password@/
+```
+
 ```
 user:password@tcp([de:ad:be:ef::ca:fe]:80)/dbname
 ```

+ 1 - 1
packets.go

@@ -18,7 +18,7 @@ import (
 )
 
 // Packets documentation:
-// http://forge.mysql.com/wiki/MySQL_Internals_ClientServer_Protocol
+// http://dev.mysql.com/doc/internals/en/client-server-protocol.html
 
 // Read packet to buffer 'data'
 func (mc *mysqlConn) readPacket() ([]byte, error) {