#NEWLINE# def connection_init( self ) : #NEWLINE# #INDENT# '\n        Run before any SQL to let database-specific config be sent as a command,\n        e.g. which storage engine (MySQL) or transaction serialisability level.\n        ' #NEWLINE# cursor = self . _get_connection ( ) . cursor ( ) #NEWLINE# if cursor . execute ( "SHOW variables WHERE Variable_Name='default_storage_engine';" ) : #NEWLINE# #INDENT# engine_var = 'default_storage_engine' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# engine_var = 'storage_engine' #NEWLINE# #UNINDENT# if ( self . _has_setting ( 'STORAGE_ENGINE' ) and self . _get_setting ( 'STORAGE_ENGINE' ) ) : #NEWLINE# #INDENT# cursor . execute ( ( 'SET %s=%s;' % ( engine_var , self . _get_setting ( 'STORAGE_ENGINE' ) ) ) )