[CONPY-158] Проблема с RETURNING Created: 2021-08-04  Updated: 2021-08-06  Resolved: 2021-08-06

Status: Closed
Project: MariaDB Connector/Python
Component/s: Other
Affects Version/s: 1.0.7
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Zhan Assignee: Georg Richter
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

Ubuntu 20.04.2 LTS, Python 3.8.10 (default, Jun 2 2021, 10:49:15), mariadb 1.0.7, MariaDB 10.5.11



 Description   

Когда выполняю команду в Python INSERT INTO t (a, b, c) VALUES(1, 4, None), команда cursor.fetchone() возвращает Tuple. При печати объекта, показывает (<NULL>, <NULL>).
Причина столбец "c" имеет ограничение NOT NULL. При обращении на первый элемент Tuple, для проверки, подпрограмма зависает или зацикливается.



 Comments   
Comment by Georg Richter [ 2021-08-06 ]

cursor.fetchone() will raise an exception if the previous executed command was an insert statement (and therefore didn't produce an result set).

Generated at Thu Feb 08 03:30:41 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.