Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
1.1.10
-
None
-
Windows 11
-
3.12.1
Description
*Running this script returns tuple instead of dict after cursor.scroll(-1) in Windows 11.
This works okay (returns 2 dict's) on Ubuntu 22.04 with mariadb 1.1.6 and 1.1.10 *
import mariadb
dbconfig =
cnx = mariadb.connect(**dbconfig)
cnx.autocommit = True
csr = cnx.cursor(buffered=True, dictionary=True)
csr.execute("select ID,Text from test limit 2")
print("test 1")
i = 0
for row in csr:
print(row, type(row))
csr.scroll(-1)
i += 1
if i > 1: # this test is used to prevent endless loop
break
cnx.close()
OUTPUT
test 1
{'ID': 1, 'Text': 'aa'} <class 'dict'>
(1, 'aa') <class 'tuple'>
TABLE CONTENT
ID Text
1 aa
2 bb
3 cc
4 dd
5 ee