@@ -16,14 +16,14 @@ MySQLPDOTest::skipNotTransactionalEngine();
1616
1717 MySQLPDOTest::createTestTable ($ table , $ db , MySQLPDOTest::detect_transactional_mysql_engine ($ db ));
1818
19- if (1 !== $ db ->getAttribute (PDO ::ATTR_AUTOCOMMIT ))
19+ if (true !== $ db ->getAttribute (PDO ::ATTR_AUTOCOMMIT ))
2020 printf ("[001] Autocommit should be on by default \n" );
2121
2222 if (false == $ db ->beginTransaction ())
2323 printf ("[002] Cannot start a transaction, [%s] [%s] \n" ,
2424 $ db ->errorCode (), implode (' ' , $ db ->errorInfo ()));
2525
26- if (1 !== $ db ->getAttribute (PDO ::ATTR_AUTOCOMMIT ))
26+ if (true !== $ db ->getAttribute (PDO ::ATTR_AUTOCOMMIT ))
2727 printf ("[003] Autocommit should be on by default, beginTransaction() shall not impact it \n" );
2828
2929 if (0 == $ db ->exec ("DELETE FROM {$ table }" ))
@@ -50,7 +50,7 @@ MySQLPDOTest::skipNotTransactionalEngine();
5050 if (!$ db ->commit ())
5151 printf ("[008] [%s] %s \n" , $ db ->errorCode (), implode (' ' , $ db ->errorInfo ()));
5252
53- if (1 !== $ db ->getAttribute (PDO ::ATTR_AUTOCOMMIT ))
53+ if (true !== $ db ->getAttribute (PDO ::ATTR_AUTOCOMMIT ))
5454 printf ("[009] Autocommit should be on after commit() \n" );
5555
5656 if (!($ stmt = $ db ->query (sprintf ('SELECT id, label FROM %s WHERE id = %d ' , $ table , $ row ['id ' ]))))
@@ -91,7 +91,7 @@ MySQLPDOTest::skipNotTransactionalEngine();
9191 if (!$ db ->rollback ())
9292 printf ("[018] [%s] %s \n" , $ db ->errorCode (), implode (' ' , $ db ->errorInfo ()));
9393
94- if (1 !== $ db ->getAttribute (PDO ::ATTR_AUTOCOMMIT ))
94+ if (true !== $ db ->getAttribute (PDO ::ATTR_AUTOCOMMIT ))
9595 printf ("[019] Autocommit should be on after rollback \n" );
9696
9797 if (!($ stmt = $ db ->query (sprintf ('SELECT id, label FROM %s WHERE id = %d ' , $ table , $ row ['id ' ]))))
@@ -132,7 +132,7 @@ MySQLPDOTest::skipNotTransactionalEngine();
132132
133133 // Turn off autocommit using a server variable
134134 $ db ->exec ('SET @@autocommit = 0 ' );
135- if (1 === $ db ->getAttribute (PDO ::ATTR_AUTOCOMMIT ))
135+ if (true === $ db ->getAttribute (PDO ::ATTR_AUTOCOMMIT ))
136136 printf ("[028] I'm confused, how can autocommit be on? Didn't I say I want to manually control transactions? \n" );
137137
138138 if (!$ db ->beginTransaction ())
@@ -155,7 +155,7 @@ MySQLPDOTest::skipNotTransactionalEngine();
155155 printf ("[031] Cannot start a transaction, [%s] [%s] \n" ,
156156 $ db ->errorCode (), implode (' ' , $ db ->errorInfo ()));
157157
158- if (1 !== $ db ->getAttribute (PDO ::ATTR_AUTOCOMMIT ))
158+ if (true !== $ db ->getAttribute (PDO ::ATTR_AUTOCOMMIT ))
159159 printf ("[032] Autocommit should be on my default, beginTransaction() should not change that \n" );
160160
161161 if (0 == $ db ->exec ("DELETE FROM {$ table }" ))
0 commit comments