Skip to content

Commit 2c65a22

Browse files
author
Philio
committed
removed conflicts
1 parent 46be3af commit 2c65a22

File tree

3 files changed

+12
-75
lines changed

3 files changed

+12
-75
lines changed

Makefile

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@ include $(GOROOT)/src/Make.inc
22

33
TARG=mysql
44
GOFILES=mysql.go\
5-
types.go\
6-
const.go\
7-
error.go\
8-
password.go\
9-
reader.go\
10-
writer.go\
11-
packet.go\
12-
convert.go\
13-
handler.go\
14-
result.go\
15-
statement.go
5+
types.go\
6+
const.go\
7+
error.go\
8+
password.go\
9+
reader.go\
10+
writer.go\
11+
packet.go\
12+
convert.go\
13+
handler.go\
14+
result.go\
15+
statement.go
1616

1717
include $(GOROOT)/src/Make.pkg

README.markdown

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
1-
<<<<<<< HEAD
2-
GoMySQL Version 0.2.10
3-
======================
4-
=======
51
GoMySQL Version 0.3.0-beta-1
62
============================
7-
>>>>>>> dev
83

94

105
Revision History
116
----------------
127

13-
0.3.x series [development]
8+
0.3.x series [testing]
149

1510
* 0.3.0-beta-1 - Added full statement and functions. Refactored packet handlers into generic functions. Added new BindResult/Fetch method to get result data from prepared statements. Added type conversions for similar types to populate the result pointers with values from the row data. Added simple type conversion to standard queries. Added automatic reconnect for a select number of operations. Added greater number of client errors from the MySQL manual. Added date/time types to allow date/time elements to be stored as integers and ints, making them more useful.
1611
* 0.3.0-alpha-3 - Added new error structs ClientError and ServerError. Replaced majority of os.Error/os.NewError functionality with MySQL specific ClientError objects. Server error responses now return a ServerError. Removed Client.Errno and Client.Error. Added deferred error processing to reader, writer and packets to catch and errors and always return a ClientError. Rewrote auto reconnect to check for specific MySQL error codes.
@@ -19,15 +14,9 @@ Revision History
1914

2015
0.2.x series [current]
2116

22-
<<<<<<< HEAD
23-
* 0.2.12 - Forgot to bump the version constant.
24-
* 0.2.11 - Fix a bug in getPrepareResult() causing queries returning no fields (e.g. DROP TABLE ...) to hang.
25-
* 0.2.10 - Compatability update for Go release.2011-01-20
26-
=======
2717
* 0.2.12 - Fix a bug in getPrepareResult() causing queries returning no fields (e.g. DROP TABLE ...) to hang.
2818
* 0.2.11 - Skipped
2919
* 0.2.10 - Compatibility update for Go release.2011-01-20
30-
>>>>>>> dev
3120
* 0.2.9 - Added support for MySQL 5.5
3221
* 0.2.8 - Fixes issue #38.
3322
* 0.2.7 - Added additional binary type support: medium int (int32/uint32), decimal (string), new decimal (string), bit ([]byte), year (uint16), set ([]byte), enum/set use string type.

mysql.go

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,6 @@ import (
2020

2121
// Constants
2222
const (
23-
<<<<<<< HEAD
24-
Version = "0.2.12"
25-
DefaultPort = 3306
26-
DefaultSock = "/var/run/mysqld/mysqld.sock"
27-
MaxPacketSize = 1 << 24
28-
=======
2923
// General
3024
VERSION = "0.3.0-beta-1"
3125
DEFAULT_PORT = "3306"
@@ -48,7 +42,6 @@ const (
4842
RESULT_STORED = 0x1
4943
RESULT_USED = 0x2
5044
RESULT_FREE = 0x3
51-
>>>>>>> dev
5245
)
5346

5447
// Client struct
@@ -592,12 +585,6 @@ func (c *Client) dial() (err os.Error) {
592585
}
593586
return
594587
}
595-
<<<<<<< HEAD
596-
// Get packet
597-
pkt := new(packetInit)
598-
pkt.header = hdr
599-
err = pkt.read(mysql.reader)
600-
=======
601588
// Log connect success
602589
c.log(1, "Connected to server")
603590
// Create reader and writer
@@ -614,7 +601,6 @@ func (c *Client) init() (err os.Error) {
614601
c.log(1, "Reading handshake initialization packet from server")
615602
// Read packet
616603
p, err := c.r.readPacket(PACKET_INIT)
617-
>>>>>>> dev
618604
if err != nil {
619605
return
620606
}
@@ -650,43 +636,6 @@ func (c *Client) init() (err os.Error) {
650636
return
651637
}
652638

653-
<<<<<<< HEAD
654-
/**
655-
* Generic function to determine type of result packet received and process it
656-
*/
657-
func (mysql *MySQL) getResult() (err os.Error) {
658-
// Get header and validate header info
659-
hdr := new(packetHeader)
660-
err = hdr.read(mysql.reader)
661-
// Read error
662-
if err != nil {
663-
if mysql.connected {
664-
// Assume lost connection to server
665-
mysql.error(CR_SERVER_LOST, CR_SERVER_LOST_STR)
666-
} else {
667-
mysql.error(CR_SERVER_HANDSHAKE_ERR, CR_SERVER_HANDSHAKE_ERR_STR)
668-
}
669-
return os.NewError("An error occured receiving packet from MySQL")
670-
}
671-
// Check sequence number
672-
if hdr.sequence != mysql.sequence {
673-
mysql.error(CR_COMMANDS_OUT_OF_SYNC, CR_COMMANDS_OUT_OF_SYNC_STR)
674-
return os.NewError("An error occured receiving packet from MySQL")
675-
}
676-
// Read the next byte to identify the type of packet
677-
c, err := mysql.reader.ReadByte()
678-
mysql.reader.UnreadByte()
679-
switch {
680-
// Unknown packet, remove it from the buffer
681-
default:
682-
bytes := make([]byte, hdr.length)
683-
_, err = io.ReadFull(mysql.reader, bytes)
684-
// Set error response
685-
if err != nil {
686-
err = os.NewError("An unknown packet was received from MySQL, in addition an error occurred when attempting to read the packet from the buffer: " + err.String());
687-
} else {
688-
err = os.NewError("An unknown packet was received from MySQL")
689-
=======
690639
// Send auth packet to the server
691640
func (c *Client) auth() (err os.Error) {
692641
// Log write packet
@@ -719,7 +668,6 @@ func (c *Client) auth() (err os.Error) {
719668
if c.serverFlags&CLIENT_CONNECT_WITH_DB > 0 && len(c.dbname) > 0 {
720669
p.clientFlags |= uint32(CLIENT_CONNECT_WITH_DB)
721670
p.database = c.dbname
722-
>>>>>>> dev
723671
}
724672
} else {
725673
p.scrambleBuff = scramble323(c.scrambleBuff, []byte(c.passwd))

0 commit comments

Comments
 (0)