@@ -328,10 +328,10 @@ MrdbConnection_Initialize(MrdbConnection *self,
328
328
329
329
#if MARIADB_PACKAGE_VERSION_ID < 30302
330
330
if (status_callback )
331
- {
332
- mariadb_throw_exception ( NULL , Mariadb_OperationalError , 1 ,
333
- "Use of status_callback requires Connector/C version 3.3.2 or higher." );
334
- return -1 ;
331
+ {
332
+ /* status callback requires C/C 3.3.2 */
333
+ PyErr_WarnFormat ( PyExc_RuntimeWarning , 1 , " status_callback support requires MariaDB Connector/C >= 3.3.2 " \
334
+ "(found version %s)" , mysql_get_client_info ()) ;
335
335
}
336
336
#else
337
337
self -> status_callback = status_callback ;
@@ -346,7 +346,13 @@ MrdbConnection_Initialize(MrdbConnection *self,
346
346
347
347
#if MARIADB_PACKAGE_VERSION_ID > 30301
348
348
if (mysql_optionsv (self -> mysql , MARIADB_OPT_STATUS_CALLBACK , MrdbConnection_process_status_info , self ))
349
- goto end ;
349
+ {
350
+ /* Generate a warning, not an error - this will allow to run the module if Connector/C installation
351
+ was overwritten */
352
+ PyErr_WarnFormat (PyExc_RuntimeWarning , 1 , "MariaDB Connector/Python was build with MariaDB Connector/C version %s " \
353
+ "but loaded Connector/C library has version %s" , MARIADB_PACKAGE_VERSION ,
354
+ mysql_get_client_info ());
355
+ }
350
356
#endif
351
357
352
358
MARIADB_BEGIN_ALLOW_THREADS (self );
0 commit comments