Skip to content

Commit 0d11cfd

Browse files
committed
2 parents b1d98b0 + d1b10f5 commit 0d11cfd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+14139
-2714
lines changed

CHANGES.txt

Lines changed: 45 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,58 @@
11
====================================================
2-
MySQL Connector/Python 2.0 - Release Notes & Changes
2+
MySQL Connector/Python 2.1 - Release Notes & Changes
33
====================================================
44

55
MySQL Connector/Python
6-
Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
6+
Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
77

88
Full release notes:
99
http://dev.mysql.com/doc/relnotes/connector-python/en/
1010

11-
v2.0.1
11+
v2.1.3
1212
======
1313

14-
- WL7954: Add support for RANGE_STRING Fabric sharding type
15-
- WL7955: Add support for RANGE_DATETIME Fabric sharding type
16-
- BUG19440592: Fix exception not captured when SSL is unavailable
17-
- BUG19481761: Fix option files with !include with trailing newline
18-
- BUG18798953: Add MySQLConnection.shutdown() to abruply close connection
19-
- BUG19168737: Fix unsupported connection argument error with option files
20-
- BUG19282158: Fix NULL values to work with prepared statements
21-
- BUG19179711: Fix using '%s' in django backend
22-
- BUG19169143: Fix raising error with duplicate option files
23-
- BUG19170287: Fix duplicate section error with Python v3
24-
- BUG19163169: Add support for Django 1.7
25-
- BUG19225481: Fix floating point inaccuracy with Python v2
26-
- BUG19164627: Fix cursor trying to decode linestring data as utf-8
27-
28-
29-
v2.0.0a1
14+
- BUG#21782246: Fix Install check of bitness of libmysql c client fails
15+
- BUG#21505096: MySQL Connector python 2.1.2 does not ship with required __init.py__ files
16+
- BUG#21499127: Fix copyright year in README.txt
17+
- BUG#21420633: Fix CExtension crashing while fetching large number of NULL value
18+
- BUG#21420906: Fix connect using SHA256 user with blank password
19+
- BUG#21090014: Fix handshake with MySQL server 5.5.8
20+
- BUG#21054559: Using a binary field in Django raises an exception
21+
- BUG#21054556: Attribute error raised with Django
22+
- BUG#20638660: The account_locked needs value for MySQL 5.7.6
23+
- BUG#20653441: C/Py hangs if a query is killed
24+
- BUG#20987205: C/Py Django backend doesn't work with Django 1.8
25+
- BUG#21492815: Fix callproc when consuming results turned on
26+
- BUG#21529781: Fix usage of auth_plugin option with CExtension
27+
- BUG#21535573: Fix character decoding of identifiers using CExtension
28+
- BUG#21536507: Fix raising warnings as exceptions
29+
- BUG#21490865: Fix compiling CExtension with relocated libmysqlclient
30+
- BUG#21492428: Fix using passwords with leading/trailing whitespaces
31+
- BUG#21541244: Fix running unit tests for MySQL server 5.5
32+
- BUG#21782246: Fix Install check of bitness of libmysql c client fails
33+
34+
v2.1.2b1
3035
========
3136

32-
- BUG19207922: Fix fetching multiple results when executing procedure
33-
- BUG19184025: Fix results containing NULL
34-
- BUG19169990: Fix sending/receiving using compressed connection
35-
- BUG18956789: Fix Django TimeField 00:00:00 converting to MySQL NULL
36-
- WL7228: Allow Connector/Python to use MySQL option files
37-
- BUG18843153: Fix Django to check connection on each request
38-
- WL7937: Allow LOAD DATA LOCAL INFILE by default
39-
- BUG18742429: Fix prepared statements returning lots of columns
40-
- BUG18814880: Fix stopping mysqld running unit tests on Windows
41-
- WL7292: Add cursors returning dict and namedtuple as rows
42-
- WL7462: Consolidate Python v2 and v3 code
43-
- WL7716: Move commercial files and distribution to CPYINT
37+
- WL7956: Support MySQL Protocol connecting to MySQL Fabric
38+
- BUG20462427: Fix receiving large field data from server
39+
- BUG20365619: Fix MySQL version detection for C Extension
40+
- BUG20301989: Fix conversion of empty set
41+
- BUG20407036: Fix incorrect arguments to mysld_stmt_execute error
42+
- BUG20106629: Support Django Safetext and SafeBytes type
43+
- BUG20324089: Fix HASH baesd sharding with MySQL Fabric
44+
- BUG20217174: Fix install command honouring --install-lib when given
45+
- BUG19777815: Add support for warnings with MySQLCursor.callproc()
46+
- BUG19331658: Fix connection pooling with fabric
47+
- BUG19972427: Fix creating of redundant connections in Django
48+
- BUG20022533: Fix failing Django inspectdb command with C/Python
49+
- BUG19703022: Fix using passwords with integers only in option files
50+
- BUG19803702: Fix reporting errors with non-ascii characters
51+
- BUG20834643: Attribute Error while promoting servers using MySQL Fabric
52+
- BUG20811802: Fix buffered named tuple cursor with CExtension
53+
54+
v2.1.1a1
55+
========
56+
57+
- WL7643: Add Python C Extension using Connector/C
4458

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ include MANIFEST.in
99
recursive-include examples *.py
1010
recursive-include lib *.py
1111
recursive-include tests *.py *.csv *.pem *.cnf
12+
recursive-include src *.c *.h *.cc
1213

1314
include docs/README_DOCS.txt
1415

README.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
==========================
2-
MySQL Connector/Python 2.0
2+
MySQL Connector/Python 2.1
33
==========================
44

55
MySQL Connector/Python
6-
Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
6+
Copyright (c) 2009, 2015, Oracle and/or its affiliates. All rights reserved.
77

88
License information can be found in the LICENSE.txt file.
99

@@ -28,7 +28,7 @@ doubt, this particular copy of the software is released
2828
under the version 2 of the GNU General Public License.
2929
MySQL Connector/Python is brought to you by Oracle.
3030

31-
Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
31+
Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3232

3333
License information can be found in the LICENSE.txt file.
3434

cpyint

examples/microseconds.py

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
with millisecond precision.
3737
"""
3838

39-
from datetime import time
39+
from datetime import time, datetime
4040

4141
import mysql.connector
4242

@@ -45,6 +45,7 @@
4545
"teamid TINYINT UNSIGNED NOT NULL, "
4646
"swimmer TINYINT UNSIGNED NOT NULL, "
4747
"lap TIME(3), "
48+
"start_shot DATETIME(6), "
4849
"PRIMARY KEY (teamid, swimmer)"
4950
") ENGINE=InnoDB"
5051
)
@@ -68,24 +69,29 @@ def main(config):
6869

6970
teams = {}
7071
teams[1] = [
71-
(1, time(second=47, microsecond=510000)),
72-
(2, time(second=47, microsecond=20000)),
73-
(3, time(second=47, microsecond=650000)),
74-
(4, time(second=46, microsecond=60000)),
72+
(1, time(second=47, microsecond=510000),
73+
datetime(2009, 6, 7, 9, 15, 2, 234)),
74+
(2, time(second=47, microsecond=20000),
75+
datetime(2009, 6, 7, 9, 30, 5, 102345)),
76+
(3, time(second=47, microsecond=650000),
77+
datetime(2009, 6, 7, 9, 50, 23, 2300)),
78+
(4, time(second=46, microsecond=60000),
79+
datetime(2009, 6, 7, 10, 30, 56, 1)),
7580
]
7681

77-
insert = "INSERT INTO relay_laps (teamid,swimmer,lap) VALUES (%s,%s,%s)"
82+
insert = ("INSERT INTO relay_laps (teamid, swimmer, lap, start_shot) "
83+
"VALUES (%s, %s, %s, %s)")
7884
for team, swimmers in teams.items():
7985
for swimmer in swimmers:
80-
cursor.execute(insert, (team, swimmer[0], swimmer[1]))
86+
cursor.execute(insert, (team, swimmer[0], swimmer[1], swimmer[2]))
8187
cnx.commit()
8288

8389
cursor.execute("SELECT * FROM relay_laps")
8490
for row in cursor:
85-
output.append("{0: 2d} | {1: 2d} | {2}".format(*row))
91+
output.append("{0: 2d} | {1: 2d} | {2} | {3}".format(*row))
8692

8793
try:
88-
cursor.execute("DROP TABLE IF EXISTS relay_laps")
94+
cursor.execute("DROP TABLE IF EXISTS relay_lapss")
8995
except:
9096
# Ignoring the fact that it was not there
9197
pass

examples/warnings.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,16 @@ def main(config):
6464
#
6565
# Configure MySQL login and database to use in config.py
6666
#
67-
import config
68-
config = config.Config.dbinfo().copy()
67+
config = {
68+
'host': 'localhost',
69+
'port': 3306,
70+
'database': 'test',
71+
'user': 'root',
72+
'password': '',
73+
'charset': 'utf8',
74+
'use_unicode': True,
75+
'get_warnings': True,
76+
}
77+
6978
out = main(config)
7079
print('\n'.join(out))

0 commit comments

Comments
 (0)