FS-5084 There is only one thing I can see that might be the case, try this patch [bounty payable via paypal@freeswitch.org]
This commit is contained in:
parent
7989798ec4
commit
578f455741
|
@ -6292,6 +6292,7 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
|
||||||
|
|
||||||
switch_cache_db_handle_t *dbh = sofia_glue_get_db_handle(profile);
|
switch_cache_db_handle_t *dbh = sofia_glue_get_db_handle(profile);
|
||||||
char *test2;
|
char *test2;
|
||||||
|
char *err;
|
||||||
|
|
||||||
if (!dbh) {
|
if (!dbh) {
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -6309,15 +6310,21 @@ int sofia_glue_init_sql(sofia_profile_t *profile)
|
||||||
|
|
||||||
test2 = switch_mprintf("%s;%s", test_sql, test_sql);
|
test2 = switch_mprintf("%s;%s", test_sql, test_sql);
|
||||||
|
|
||||||
if (switch_cache_db_execute_sql(dbh, test2, NULL) != SWITCH_STATUS_SUCCESS) {
|
if (switch_cache_db_execute_sql(dbh, test2, &err) != SWITCH_STATUS_SUCCESS) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "GREAT SCOTT!!! Cannot execute batched statements!\n"
|
|
||||||
"If you are using mysql, make sure you are using MYODBC 3.51.18 or higher and enable FLAG_MULTI_STATEMENTS\n");
|
if (switch_stristr("read-only", err)) {
|
||||||
|
free(err);
|
||||||
|
} else {
|
||||||
|
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "GREAT SCOTT!!! Cannot execute batched statements! [%s]\n"
|
||||||
|
"If you are using mysql, make sure you are using MYODBC 3.51.18 or higher and enable FLAG_MULTI_STATEMENTS\n", err);
|
||||||
|
|
||||||
switch_cache_db_release_db_handle(&dbh);
|
switch_cache_db_release_db_handle(&dbh);
|
||||||
free(test2);
|
free(test2);
|
||||||
free(test_sql);
|
free(test_sql);
|
||||||
|
free(err);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
free(test2);
|
free(test2);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue