#NEWLINE# def _check_sql_mode( self , **kwargs ) : #NEWLINE# #INDENT# with self . connection . cursor ( ) as cursor : #NEWLINE# #INDENT# cursor . execute ( 'SELECT @@sql_mode' ) #NEWLINE# sql_mode = cursor . fetchone ( ) #NEWLINE# #UNINDENT# modes = set ( sql_mode [ 0 ] . split ( ',' ) ) #NEWLINE# if ( not ( modes & { 'STRICT_TRANS_TABLES' , 'STRICT_ALL_TABLES' } ) ) : #NEWLINE# #INDENT# return [ checks . Warning ( ( "MySQL Strict Mode is not set for database connection '%s'" % modes . connection . alias ) , hint = ( "MySQL's Strict Mode fixes many data integrity problems in MySQL, such as data truncation upon insertion, by escalating warnings into errors. It is strongly recommended you activate it. See: https://docs.djangoproject.com/en/%s/ref/databases/#mysql-sql-mode" % ( get_docs_version ( ) , ) ) , id = 'mysql.W002' ) ] #NEWLINE# #UNINDENT# return [ ]