File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -1547,17 +1547,23 @@ mod test {
1547
1547
& [ "mysql_native_password" ]
1548
1548
} ;
1549
1549
1550
- for plugin in plugins {
1550
+ for ( i , plugin) in plugins. iter ( ) . enumerate ( ) {
1551
1551
let mut rng = rand:: thread_rng ( ) ;
1552
1552
let mut pass = [ 0u8 ; 10 ] ;
1553
1553
pass. try_fill ( & mut rng) . unwrap ( ) ;
1554
1554
let pass: String = IntoIterator :: into_iter ( pass)
1555
1555
. map ( |x| ( ( x % ( 123 - 97 ) ) + 97 ) as char )
1556
1556
. collect ( ) ;
1557
1557
1558
- conn. query_drop ( "DROP USER /*!50700 IF EXISTS */ /*M!100103 IF EXISTS */ __mats" )
1559
- . await
1560
- . unwrap ( ) ;
1558
+ let result = conn
1559
+ . query_drop ( "DROP USER /*!50700 IF EXISTS */ /*M!100103 IF EXISTS */ __mats" )
1560
+ . await ;
1561
+ if matches ! ( conn. server_version( ) , ( 5 , 6 , _) ) && i == 0 {
1562
+ // IF EXISTS is not supported on 5.6 so the query will fail on the first iteration
1563
+ drop ( result) ;
1564
+ } else {
1565
+ result. unwrap ( ) ;
1566
+ }
1561
1567
1562
1568
if conn. inner . is_mariadb || conn. server_version ( ) < ( 5 , 7 , 0 ) {
1563
1569
if matches ! ( conn. server_version( ) , ( 5 , 6 , _) ) {
You can’t perform that action at this time.
0 commit comments