Skip to content

Commit

Permalink
Spelling, grammar, and link fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Oct 4, 2023
1 parent 19171b5 commit 81af0c8
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ New Features:

- Enable microsecond resolution on TIME, DATETIME and TIMESTAMP (#249)
- Support for returning table alias on Columns() (#289, #359, #382)
- Placeholder interpolation, can be actived with the DSN parameter `interpolateParams=true` (#309, #318, #490)
- Placeholder interpolation, can be activated with the DSN parameter `interpolateParams=true` (#309, #318, #490)
- Support for uint64 parameters with high bit set (#332, #345)
- Cleartext authentication plugin support (#327)
- Exported ParseDSN function and the Config struct (#403, #419, #429)
Expand Down Expand Up @@ -206,7 +206,7 @@ Changes:
- Also exported the MySQLWarning type
- mysqlConn.Close returns the first error encountered instead of ignoring all errors
- writePacket() automatically writes the packet size to the header
- readPacket() uses an iterative approach instead of the recursive approach to merge splitted packets
- readPacket() uses an iterative approach instead of the recursive approach to merge split packets

New Features:

Expand Down Expand Up @@ -254,7 +254,7 @@ Bugfixes:

- Fixed MySQL 4.1 support: MySQL 4.1 sends packets with lengths which differ from the specification
- Convert to DB timezone when inserting `time.Time`
- Splitted packets (more than 16MB) are now merged correctly
- Split packets (more than 16MB) are now merged correctly
- Fixed false positive `io.EOF` errors when the data was fully read
- Avoid panics on reuse of closed connections
- Fixed empty string producing false nil values
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Passwords can consist of any character. Escaping is **not** necessary.

#### Protocol
See [net.Dial](https://golang.org/pkg/net/#Dial) for more information which networks are available.
In general you should use an Unix domain socket if available and TCP otherwise for best performance.
In general you should use a Unix domain socket if available and TCP otherwise for best performance.

#### Address
For TCP and UDP networks, addresses have the form `host[:port]`.
Expand Down
4 changes: 2 additions & 2 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ func (mc *mysqlConn) handleAuthResult(oldAuthData []byte, plugin string) error {

switch plugin {

// https://insidemysql.com/preparing-your-community-connector-for-mysql-8-part-2-sha256/
// https://dev.mysql.com/blog-archive/preparing-your-community-connector-for-mysql-8-part-2-sha256/
case "caching_sha2_password":
switch len(authData) {
case 0:
Expand Down Expand Up @@ -376,7 +376,7 @@ func (mc *mysqlConn) handleAuthResult(oldAuthData []byte, plugin string) error {
}

if data[0] != iAuthMoreData {
return fmt.Errorf("unexpect resp from server for caching_sha2_password perform full authentication")
return fmt.Errorf("unexpected resp from server for caching_sha2_password, perform full authentication")
}

// parse public key
Expand Down
10 changes: 5 additions & 5 deletions driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ func TestLongData(t *testing.T) {
dbt.Fatalf("LONGBLOB: length in: %d, length out: %d", len(inS), len(out))
}
if rows.Next() {
dbt.Error("LONGBLOB: unexpexted row")
dbt.Error("LONGBLOB: unexpected row")
}
} else {
dbt.Fatalf("LONGBLOB: no data")
Expand All @@ -1217,7 +1217,7 @@ func TestLongData(t *testing.T) {
dbt.Fatalf("LONGBLOB: length in: %d, length out: %d", len(in), len(out))
}
if rows.Next() {
dbt.Error("LONGBLOB: unexpexted row")
dbt.Error("LONGBLOB: unexpected row")
}
} else {
if err = rows.Err(); err != nil {
Expand Down Expand Up @@ -1293,7 +1293,7 @@ func TestLoadData(t *testing.T) {
dbt.Fatalf("unexpected row count: got %d, want 0", count)
}

// Then fille File with data and try to load it
// Then fill File with data and try to load it
file.WriteString("1\ta string\n2\ta string containing a \\t\n3\ta string containing a \\n\n4\ta string containing both \\t\\n\n")
file.Close()
dbt.mustExec(fmt.Sprintf("LOAD DATA LOCAL INFILE %q INTO TABLE test", file.Name()))
Expand Down Expand Up @@ -1899,7 +1899,7 @@ func TestConcurrent(t *testing.T) {
}(i)
}

// wait until all conections are open
// wait until all connections are open
wg.Wait()

if fatalError != "" {
Expand Down Expand Up @@ -1948,7 +1948,7 @@ func TestCustomDial(t *testing.T) {
t.Skipf("MySQL server not running on %s", netAddr)
}

// our custom dial function which justs wraps net.Dial here
// our custom dial function which just wraps net.Dial here
RegisterDialContext("mydial", func(ctx context.Context, addr string) (net.Conn, error) {
var d net.Dialer
return d.DialContext(ctx, prot, addr)
Expand Down
2 changes: 1 addition & 1 deletion dsn_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ func TestDSNReformat(t *testing.T) {
dsn2 := cfg1.FormatDSN()
if dsn2 != dsn1 {
// Just log
t.Logf("%d. %q reformated as %q", i, dsn1, dsn2)
t.Logf("%d. %q reformatted as %q", i, dsn1, dsn2)
}

cfg2, err := ParseDSN(dsn2)
Expand Down
6 changes: 3 additions & 3 deletions packets.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ func (mc *mysqlConn) readHandshakePacket() (data []byte, plugin string, err erro
// reserved (all [00]) [10 bytes]
pos += 1 + 2 + 2 + 1 + 10

// second part of the password cipher [mininum 13 bytes],
// second part of the password cipher [minimum 13 bytes],
// where len=MAX(13, length of auth-plugin-data - 8)
//
// The web documentation is ambiguous about the length. However,
Expand Down Expand Up @@ -538,7 +538,7 @@ func (mc *mysqlConn) readAuthResult() ([]byte, string, error) {
}
}

// Returns error if Packet is not an 'Result OK'-Packet
// Returns error if Packet is not a 'Result OK'-Packet
func (mc *okHandler) readResultOK() error {
data, err := mc.conn().readPacket()
if err != nil {
Expand Down Expand Up @@ -647,7 +647,7 @@ func (mc *mysqlConn) resultUnchanged() *okHandler {
// Both return an instance of type *okHandler.
type okHandler mysqlConn

// Exposees the underlying type's methods.
// Exposes the underlying type's methods.
func (mc *okHandler) conn() *mysqlConn {
return (*mysqlConn)(mc)
}
Expand Down
4 changes: 2 additions & 2 deletions packets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ func TestReadPacketSplit(t *testing.T) {
data[4] = 0x11
data[maxPacketSize+3] = 0x22

// 2nd packet has payload length 0 and squence id 1
// 2nd packet has payload length 0 and sequence id 1
// 00 00 00 01
data[pkt2ofs+3] = 0x01

Expand Down Expand Up @@ -220,7 +220,7 @@ func TestReadPacketSplit(t *testing.T) {
data[pkt2ofs+4] = 0x33
data[pkt2ofs+maxPacketSize+3] = 0x44

// 3rd packet has payload length 0 and squence id 2
// 3rd packet has payload length 0 and sequence id 2
// 00 00 00 02
data[pkt3ofs+3] = 0x02

Expand Down

0 comments on commit 81af0c8

Please sign in to comment.