Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 04896fc

Browse filesBrowse files
committed
Treat BIT as binary type.
1 parent 06905e5 commit 04896fc
Copy full SHA for 04896fc

File tree

Expand file treeCollapse file tree

2 files changed

+3
-2
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-2
lines changed

‎_mysql.c

Copy file name to clipboardExpand all lines: _mysql.c
+2-1Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1372,7 +1372,8 @@ _mysql_field_to_python(
13721372
field_type == FIELD_TYPE_LONG_BLOB ||
13731373
field_type == FIELD_TYPE_BLOB ||
13741374
field_type == FIELD_TYPE_VAR_STRING ||
1375-
field_type == FIELD_TYPE_STRING) {
1375+
field_type == FIELD_TYPE_STRING ||
1376+
field_type == FIELD_TYPE_BIT) {
13761377
binary = 1;
13771378
}
13781379
#endif

‎tests/test_MySQLdb_capabilities.py

Copy file name to clipboardExpand all lines: tests/test_MySQLdb_capabilities.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def test_BIT(self):
9292
row = c.fetchone()
9393
self.assertEqual(row[0], b'\x03')
9494
self.assertEqual(row[1], b'\x03\xff')
95-
self.assertEqual(row[2], 'b\xff'*8)
95+
self.assertEqual(row[2], b'\xff'*8)
9696
finally:
9797
c.execute("drop table if exists test_BIT")
9898

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.