Skip to content

Commit d1beafd

Browse files
authored
Merge branch 'master' into add-tidb
2 parents 1da8266 + a4c260b commit d1beafd

40 files changed

+1518
-676
lines changed

.github/workflows/codeql.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
pull_request:
7+
branches: [ "master" ]
8+
schedule:
9+
- cron: "18 19 * * 1"
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [ go ]
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v2
31+
with:
32+
languages: ${{ matrix.language }}
33+
queries: +security-and-quality
34+
35+
- name: Autobuild
36+
uses: github/codeql-action/autobuild@v2
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@v2
40+
with:
41+
category: "/language:${{ matrix.language }}"

.github/workflows/test.yml

+23-12
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@ env:
1111
MYSQL_TEST_CONCURRENT: 1
1212

1313
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: dominikh/[email protected]
19+
with:
20+
version: "2023.1.3"
21+
1422
list:
1523
runs-on: ubuntu-latest
1624
outputs:
@@ -20,20 +28,21 @@ jobs:
2028
id: set-matrix
2129
run: |
2230
import json
31+
import os
2332
go = [
2433
# Keep the most recent production release at the top
25-
'1.18',
34+
'1.21',
2635
# Older production releases
27-
'1.17',
28-
'1.16',
29-
'1.15',
30-
'1.14',
31-
'1.13',
36+
'1.20',
37+
'1.19',
38+
'1.18',
3239
]
3340
mysql = [
41+
'8.1',
3442
'8.0',
3543
'5.7',
3644
'5.6',
45+
'mariadb-10.11',
3746
'mariadb-10.6',
3847
'mariadb-10.5',
3948
'mariadb-10.4',
@@ -43,7 +52,7 @@ jobs:
4352
includes = []
4453
# Go versions compatibility check
4554
for v in go[1:]:
46-
includes.append({'os': 'ubuntu-latest', 'go': v, 'mysql': mysql[0]})
55+
includes.append({'os': 'ubuntu-latest', 'go': v, 'mysql': mysql[0]})
4756
4857
matrix = {
4958
# OS vs MySQL versions
@@ -54,7 +63,8 @@ jobs:
5463
'include': includes
5564
}
5665
output = json.dumps(matrix, separators=(',', ':'))
57-
print('::set-output name=matrix::{0}'.format(output))
66+
with open(os.environ["GITHUB_OUTPUT"], 'a', encoding="utf-8") as f:
67+
f.write('matrix={0}\n'.format(output))
5868
shell: python
5969
test:
6070
needs: list
@@ -63,11 +73,11 @@ jobs:
6373
fail-fast: false
6474
matrix: ${{ fromJSON(needs.list.outputs.matrix) }}
6575
steps:
66-
- uses: actions/checkout@v2
67-
- uses: actions/setup-go@v2
76+
- uses: actions/checkout@v3
77+
- uses: actions/setup-go@v4
6878
with:
6979
go-version: ${{ matrix.go }}
70-
- uses: shogo82148/actions-setup-mysql@v1
80+
- uses: shogo82148/actions-setup-mysql@v1.21.0
7181
with:
7282
mysql-version: ${{ matrix.mysql }}
7383
user: ${{ env.MYSQL_TEST_USER }}
@@ -79,13 +89,14 @@ jobs:
7989
; TestConcurrent fails if max_connections is too large
8090
max_connections=50
8191
local_infile=1
92+
performance_schema=on
8293
- name: setup database
8394
run: |
8495
mysql --user 'root' --host '127.0.0.1' -e 'create database gotest;'
8596
8697
- name: test
8798
run: |
88-
go test -v '-covermode=count' '-coverprofile=coverage.out'
99+
go test -v '-race' '-covermode=atomic' '-coverprofile=coverage.out'
89100
90101
- name: Send coverage
91102
uses: shogo82148/actions-goveralls@v1

AUTHORS

+13
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
Aaron Hopkins <go-sql-driver at die.net>
1515
Achille Roussel <achille.roussel at gmail.com>
16+
Aidan <aidan.liu at pingcap.com>
1617
Alex Snast <alexsn at fb.com>
1718
Alexey Palazhchenko <alexey.palazhchenko at gmail.com>
1819
Andrew Reid <andrew.reid at tixtrack.com>
@@ -26,13 +27,15 @@ Carlos Nieto <jose.carlos at menteslibres.net>
2627
Chris Kirkland <chriskirkland at github.com>
2728
Chris Moos <chris at tech9computers.com>
2829
Craig Wilson <craiggwilson at gmail.com>
30+
Daemonxiao <735462752 at qq.com>
2931
Daniel Montoya <dsmontoyam at gmail.com>
3032
Daniel Nichter <nil at codenode.com>
3133
Daniël van Eeden <git at myname.nl>
3234
Dave Protasowski <dprotaso at gmail.com>
3335
DisposaBoy <disposaboy at dby.me>
3436
Egor Smolyakov <egorsmkv at gmail.com>
3537
Erwan Martin <hello at erwan.io>
38+
Evan Elias <evan at skeema.net>
3639
Evan Shaw <evan at vendhq.com>
3740
Frederick Mayle <frederickmayle at gmail.com>
3841
Gustavo Kristic <gkristic at gmail.com>
@@ -47,6 +50,7 @@ INADA Naoki <songofacandy at gmail.com>
4750
Jacek Szwec <szwec.jacek at gmail.com>
4851
James Harr <james.harr at gmail.com>
4952
Janek Vedock <janekvedock at comcast.net>
53+
Jean-Yves Pellé <jy at pelle.link>
5054
Jeff Hodges <jeff at somethingsimilar.com>
5155
Jeffrey Charles <jeffreycharles at gmail.com>
5256
Jerome Meyer <jxmeyer at gmail.com>
@@ -61,6 +65,7 @@ Kamil Dziedzic <kamil at klecza.pl>
6165
Kei Kamikawa <x00.x7f.x86 at gmail.com>
6266
Kevin Malachowski <kevin at chowski.com>
6367
Kieron Woodhouse <kieron.woodhouse at infosum.com>
68+
Lance Tian <lance6716 at gmail.com>
6469
Lennart Rudolph <lrudolph at hmc.edu>
6570
Leonardo YongUk Kim <dalinaum at gmail.com>
6671
Linh Tran Tuan <linhduonggnu at gmail.com>
@@ -73,15 +78,18 @@ Maciej Zimnoch <maciej.zimnoch at codilime.com>
7378
Michael Woolnough <michael.woolnough at gmail.com>
7479
Nathanial Murphy <nathanial.murphy at gmail.com>
7580
Nicola Peduzzi <thenikso at gmail.com>
81+
Oliver Bone <owbone at github.com>
7682
Olivier Mengué <dolmen at cpan.org>
7783
oscarzhao <oscarzhaosl at gmail.com>
7884
Paul Bonser <misterpib at gmail.com>
7985
Peter Schultz <peter.schultz at classmarkets.com>
86+
Phil Porada <philporada at gmail.com>
8087
Rebecca Chin <rchin at pivotal.io>
8188
Reed Allman <rdallman10 at gmail.com>
8289
Richard Wilkes <wilkes at me.com>
8390
Robert Russell <robert at rrbrussell.com>
8491
Runrioter Wung <runrioter at gmail.com>
92+
Samantha Frank <hello at entropy.cat>
8593
Santhosh Kumar Tekuri <santhosh.tekuri at gmail.com>
8694
Sho Iizuka <sho.i518 at gmail.com>
8795
Sho Ikeda <suicaicoca at gmail.com>
@@ -92,6 +100,7 @@ Stan Putrya <root.vagner at gmail.com>
92100
Stanley Gunawan <gunawan.stanley at gmail.com>
93101
Steven Hartland <steven.hartland at multiplay.co.uk>
94102
Tan Jinhua <312841925 at qq.com>
103+
Tetsuro Aoki <t.aoki1130 at gmail.com>
95104
Thomas Wodarek <wodarekwebpage at gmail.com>
96105
Tim Ruffles <timruffles at gmail.com>
97106
Tom Jenkinson <tom at tjenkinson.me>
@@ -101,9 +110,11 @@ Xiangyu Hu <xiangyu.hu at outlook.com>
101110
Xiaobing Jiang <s7v7nislands at gmail.com>
102111
Xiuming Chen <cc at cxm.cc>
103112
Xuehong Chan <chanxuehong at gmail.com>
113+
Zhang Xiang <angwerzx at 126.com>
104114
Zhenye Xie <xiezhenye at gmail.com>
105115
Zhixin Wen <john.wenzhixin at gmail.com>
106116
Ziheng Lyu <zihenglv at gmail.com>
117+
Brian Hendriks <brian at dolthub.com>
107118

108119
# Organizations
109120

@@ -118,6 +129,8 @@ InfoSum Ltd.
118129
Keybase Inc.
119130
Multiplay Ltd.
120131
Percona LLC
132+
PingCAP Inc.
121133
Pivotal Inc.
122134
Stripe Inc.
123135
Zendesk Inc.
136+
Dolthub Inc.

CHANGELOG.md

+37-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,37 @@
1+
## Version 1.7.1 (2023-04-25)
2+
3+
Changes:
4+
5+
- bump actions/checkout@v3 and actions/setup-go@v3 (#1375)
6+
- Add go1.20 and mariadb10.11 to the testing matrix (#1403)
7+
- Increase default maxAllowedPacket size. (#1411)
8+
9+
Bugfixes:
10+
11+
- Use SET syntax as specified in the MySQL documentation (#1402)
12+
13+
14+
## Version 1.7 (2022-11-29)
15+
16+
Changes:
17+
18+
- Drop support of Go 1.12 (#1211)
19+
- Refactoring `(*textRows).readRow` in a more clear way (#1230)
20+
- util: Reduce boundary check in escape functions. (#1316)
21+
- enhancement for mysqlConn handleAuthResult (#1250)
22+
23+
New Features:
24+
25+
- support Is comparison on MySQLError (#1210)
26+
- return unsigned in database type name when necessary (#1238)
27+
- Add API to express like a --ssl-mode=PREFERRED MySQL client (#1370)
28+
- Add SQLState to MySQLError (#1321)
29+
30+
Bugfixes:
31+
32+
- Fix parsing 0 year. (#1257)
33+
34+
135
## Version 1.6 (2021-04-01)
236

337
Changes:
@@ -128,7 +162,7 @@ New Features:
128162

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

177211
New Features:
178212

@@ -220,7 +254,7 @@ Bugfixes:
220254

221255
- Fixed MySQL 4.1 support: MySQL 4.1 sends packets with lengths which differ from the specification
222256
- Convert to DB timezone when inserting `time.Time`
223-
- Splitted packets (more than 16MB) are now merged correctly
257+
- Split packets (more than 16MB) are now merged correctly
224258
- Fixed false positive `io.EOF` errors when the data was fully read
225259
- Avoid panics on reuse of closed connections
226260
- Fixed empty string producing false nil values

0 commit comments

Comments
 (0)