@@ -334,6 +334,7 @@ public void selectQueryTest(RdbEngine rdbEngineType) throws SQLException {
334334 case MYSQL :
335335 case POSTGRESQL :
336336 case YUGABYTE :
337+ case MARIADB :
337338 expectedQuery =
338339 "SELECT c1,c2 FROM n1.t1 WHERE p1=? AND c1>=? AND c1<=? "
339340 + "ORDER BY c1 ASC,c2 DESC LIMIT 10" ;
@@ -1300,6 +1301,7 @@ public void upsertQueryTest(RdbEngine rdbEngineType) throws SQLException {
13001301 preparedStatement = mock (PreparedStatement .class );
13011302 switch (rdbEngineType ) {
13021303 case MYSQL :
1304+ case MARIADB :
13031305 expectedQuery =
13041306 "INSERT INTO n1.t1 (p1,v1,v2,v3) VALUES (?,?,?,?)"
13051307 + " ON DUPLICATE KEY UPDATE v1=?,v2=?,v3=?" ;
@@ -1340,6 +1342,7 @@ public void upsertQueryTest(RdbEngine rdbEngineType) throws SQLException {
13401342 case POSTGRESQL :
13411343 case SQLITE :
13421344 case YUGABYTE :
1345+ case MARIADB :
13431346 verify (preparedStatement ).setString (1 , "p1Value" );
13441347 verify (preparedStatement ).setString (2 , "v1Value" );
13451348 verify (preparedStatement ).setString (3 , "v2Value" );
@@ -1364,6 +1367,7 @@ public void upsertQueryTest(RdbEngine rdbEngineType) throws SQLException {
13641367 preparedStatement = mock (PreparedStatement .class );
13651368 switch (rdbEngineType ) {
13661369 case MYSQL :
1370+ case MARIADB :
13671371 expectedQuery =
13681372 "INSERT INTO n1.t1 (p1,c1,v1,v2,v3) VALUES (?,?,?,?,?)"
13691373 + " ON DUPLICATE KEY UPDATE v1=?,v2=?,v3=?" ;
@@ -1406,6 +1410,7 @@ public void upsertQueryTest(RdbEngine rdbEngineType) throws SQLException {
14061410 case POSTGRESQL :
14071411 case SQLITE :
14081412 case YUGABYTE :
1413+ case MARIADB :
14091414 verify (preparedStatement ).setString (1 , "p1Value" );
14101415 verify (preparedStatement ).setString (2 , "c1Value" );
14111416 verify (preparedStatement ).setString (3 , "v1Value" );
@@ -1434,6 +1439,7 @@ public void upsertQueryTest(RdbEngine rdbEngineType) throws SQLException {
14341439 preparedStatement = mock (PreparedStatement .class );
14351440 switch (rdbEngineType ) {
14361441 case MYSQL :
1442+ case MARIADB :
14371443 expectedQuery =
14381444 "INSERT INTO n1.t1 (p1,p2,c1,c2,v1,v2,v3,v4) VALUES (?,?,?,?,?,?,?,?)"
14391445 + " ON DUPLICATE KEY UPDATE v1=?,v2=?,v3=?,v4=?" ;
@@ -1480,6 +1486,7 @@ public void upsertQueryTest(RdbEngine rdbEngineType) throws SQLException {
14801486 case POSTGRESQL :
14811487 case SQLITE :
14821488 case YUGABYTE :
1489+ case MARIADB :
14831490 verify (preparedStatement ).setString (1 , "p1Value" );
14841491 verify (preparedStatement ).setString (2 , "p2Value" );
14851492 verify (preparedStatement ).setString (3 , "c1Value" );
@@ -1518,6 +1525,7 @@ public void upsertQueryTest(RdbEngine rdbEngineType) throws SQLException {
15181525 preparedStatement = mock (PreparedStatement .class );
15191526 switch (rdbEngineType ) {
15201527 case MYSQL :
1528+ case MARIADB :
15211529 expectedQuery =
15221530 "INSERT INTO n1.t1 (p1,p2,c1,c2,v1,v2,v3,v4,v5) VALUES (?,?,?,?,?,?,?,?,?)"
15231531 + " ON DUPLICATE KEY UPDATE v1=?,v2=?,v3=?,v4=?,v5=?" ;
@@ -1565,6 +1573,7 @@ public void upsertQueryTest(RdbEngine rdbEngineType) throws SQLException {
15651573 case POSTGRESQL :
15661574 case SQLITE :
15671575 case YUGABYTE :
1576+ case MARIADB :
15681577 verify (preparedStatement ).setString (1 , "p1Value" );
15691578 verify (preparedStatement ).setString (2 , "p2Value" );
15701579 verify (preparedStatement ).setString (3 , "c1Value" );
@@ -1617,6 +1626,7 @@ public void upsertQueryWithoutValuesTest(RdbEngine rdbEngineType) throws SQLExce
16171626 preparedStatement = mock (PreparedStatement .class );
16181627 switch (rdbEngineType ) {
16191628 case MYSQL :
1629+ case MARIADB :
16201630 expectedQuery = "INSERT IGNORE INTO n1.t1 (p1) VALUES (?)" ;
16211631 break ;
16221632 case POSTGRESQL :
@@ -1649,6 +1659,7 @@ public void upsertQueryWithoutValuesTest(RdbEngine rdbEngineType) throws SQLExce
16491659 case POSTGRESQL :
16501660 case SQLITE :
16511661 case YUGABYTE :
1662+ case MARIADB :
16521663 verify (preparedStatement ).setString (1 , "p1Value" );
16531664 break ;
16541665 case ORACLE :
@@ -1661,6 +1672,7 @@ public void upsertQueryWithoutValuesTest(RdbEngine rdbEngineType) throws SQLExce
16611672 preparedStatement = mock (PreparedStatement .class );
16621673 switch (rdbEngineType ) {
16631674 case MYSQL :
1675+ case MARIADB :
16641676 expectedQuery = "INSERT IGNORE INTO n1.t1 (p1,c1) VALUES (?,?)" ;
16651677 break ;
16661678 case POSTGRESQL :
@@ -1698,6 +1710,7 @@ public void upsertQueryWithoutValuesTest(RdbEngine rdbEngineType) throws SQLExce
16981710 case POSTGRESQL :
16991711 case SQLITE :
17001712 case YUGABYTE :
1713+ case MARIADB :
17011714 verify (preparedStatement ).setString (1 , "p1Value" );
17021715 verify (preparedStatement ).setString (2 , "c1Value" );
17031716 break ;
@@ -1713,6 +1726,7 @@ public void upsertQueryWithoutValuesTest(RdbEngine rdbEngineType) throws SQLExce
17131726 preparedStatement = mock (PreparedStatement .class );
17141727 switch (rdbEngineType ) {
17151728 case MYSQL :
1729+ case MARIADB :
17161730 expectedQuery = "INSERT IGNORE INTO n1.t1 (p1,p2,c1,c2) VALUES (?,?,?,?)" ;
17171731 break ;
17181732 case POSTGRESQL :
@@ -1754,6 +1768,7 @@ public void upsertQueryWithoutValuesTest(RdbEngine rdbEngineType) throws SQLExce
17541768 case POSTGRESQL :
17551769 case SQLITE :
17561770 case YUGABYTE :
1771+ case MARIADB :
17571772 verify (preparedStatement ).setString (1 , "p1Value" );
17581773 verify (preparedStatement ).setString (2 , "p2Value" );
17591774 verify (preparedStatement ).setString (3 , "c1Value" );
0 commit comments