Details
-
New Feature
-
Status: Closed (View Workflow)
-
Minor
-
Resolution: Not a Bug
-
1.0.4
-
None
-
Ubuntu 18.04, Mariadb 10.5.8
Description
used Table def:
CREATE TABLE `data` (
`Element` varchar(12) NOT NULL,
`Data` varchar(48) NOT NULL,
`Status` tinyint(1) unsigned DEFAULT 1,
`EmailAddress` varchar(96) DEFAULT NULL,
`Destination` varchar(12) DEFAULT NULL,
KEY `Element` (`Element`,`Data`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
cnx = mariadb.connect(**dbconfig)
cnx.autocommit = True
csr = cnx.cursor(dictionary=True, buffered=True)
csr.execute("select * from `data` where `Status`=1") is ok
csr.execute("select `Element`,`Data`,`EmailAddress`,`Destination` from `data` where `Status`=1") causes unknown MySQL error
csr.execute("select `Data`,`EmailAddress`,`Destination` from `data` where `Status`=1") is ok
So it seems that select `Element` .... causes the error.
When using select * from .... the column `Element` is returned correctly.