Details
- 
    Task 
- 
    Status: Closed (View Workflow)
- 
    Major 
- 
    Resolution: Fixed
- 
    1.1.12
- 
    None
- 
        3.13
Description
Check float parameter before executing and raise an exception if it is "nan", "inf" or "-inf".
|  | 
| {code:python} | 
| Python 3.13.0 (main, Feb 18 2025, 11:12:15) [GCC 13.3.0] on linux | 
| Type "help", "copyright", "credits" or "license" for more information. | 
| >>> import mariadb | 
| >>> conn=mariadb.connect() | 
| >>> cursor=conn.cursor() | 
| >>> a=float("inf") | 
| >>> cursor.execute("select ?", (a,)) | 
|  | 
| Traceback (most recent call last): | 
|   File "<python-input-4>", line 1, in <module> | 
|     cursor.execute("select ?", (a,)) | 
|     ~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^ | 
|   File "/home/georg/work/venv13/lib/python3.13/site-packages/mariadb/cursors.py", line 321, in execute | 
|     self._readresponse() | 
|     ~~~~~~~~~~~~~~~~~~^^ | 
| mariadb.ProgrammingError: Unknown column 'inf' in 'field list' | 
| {code} | 
| 
 | 
Diagnostic debug output for the SQL statement which was sent to the server:
| b'select inf'
 |