sqldata/sqlmysqlapi.cpp
// Initialize global options that take effect only for new connections
Initialize global options that take effect only for new connections
Initialize global options that take effect only for new connections
int SqlMysqlApi::InitGlobalOptions()
{
	if(_parameters == NULL)
		return -1;
	int rc = 0;
	const char *max_allowed_packet = NULL;
	if(_subtype == SQLDATA_SUBTYPE_MARIADB)
		max_allowed_packet = _parameters->Get("-mariadb_max_allowed_packet");
	if(max_allowed_packet != NULL)
	{
		rc = Connect(NULL);
		if(rc != -1)
		{
			rc = ExecuteNonQuery(std::string("SET GLOBAL max_allowed_packet=").append(max_allowed_packet).c_str(), NULL);
			Disconnect();
		}
	}
	return rc; 
}
int SqlMysqlApi :: InitGlobalOptions ( ) { if ( _parameters == NULL ) return -1 ; int rc = 0 ; const char * max_allowed_packet = NULL ; if ( _subtype == SQLDATA_SUBTYPE_MARIADB ) max_allowed_packet = _parameters -> Get ( " " ) ; if ( max_allowed_packet != NULL ) { rc = Connect ( NULL ) ; if ( rc != -1 ) { rc = ExecuteNonQuery ( std :: string ( " " ) . append ( max_allowed_packet ) . c_str ( ) , NULL ) ; Disconnect ( ) ; } } return rc ; }
Initialize global options that take effect only for new connections
Initialize global options that take effect only for new connections
// MariaDB options // Set options in dedicated connection before all other connections