Skip to content

Commit

Permalink
MDEV-18182 : Galera test failure on galera.galera_many_tables_nopk
Browse files Browse the repository at this point in the history
Decrease the number of tables and operations.
  • Loading branch information
Jan Lindström committed May 16, 2022
1 parent a68c698 commit e2173e8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
6 changes: 3 additions & 3 deletions mysql-test/suite/galera/r/galera_many_tables_nopk.result
Expand Up @@ -6,16 +6,16 @@ START TRANSACTION;
COMMIT;
connection node_2;
CREATE TABLE sum_table (f1 INTEGER);
SELECT SUM(f1) = 900 FROM sum_table;
SUM(f1) = 900
SELECT SUM(f1) = 100 FROM sum_table;
SUM(f1) = 100
1
connection node_1;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
connection node_2;
SET AUTOCOMMIT=OFF;
START TRANSACTION;
UPDATE t900 SET f1 = 3;
UPDATE t100 SET f1 = 3;
connection node_1;
COMMIT;
connection node_2;
Expand Down
23 changes: 11 additions & 12 deletions mysql-test/suite/galera/t/galera_many_tables_nopk.test
Expand Up @@ -7,18 +7,17 @@ if (!`SELECT @@open_files_limit >= 1024`){
}

#
# This test forces 900 tables without a PK to participate in a single
# transaction. The reason for 900 is that some linux system has by default
# a limit of 1024 open files / process
# This test forces 100 tables without a PK to participate in a single
# transaction.
#

#
# First, create 900 tables
# First, create 100 tables
#

--connection node_1

--let $count = 900
--let $count = 100
while ($count)
{
--disable_query_log
Expand All @@ -28,7 +27,7 @@ while ($count)
--dec $count
}

--let $count = 900
--let $count = 100
while ($count)
{
--disable_query_log
Expand All @@ -39,13 +38,13 @@ while ($count)
}

#
# Second, perform 900 updates
# Second, perform 100 updates
#

SET AUTOCOMMIT=OFF;
START TRANSACTION;

--let $count = 900
--let $count = 100
while ($count)
{
--disable_query_log
Expand All @@ -63,7 +62,7 @@ COMMIT;
--connection node_2
CREATE TABLE sum_table (f1 INTEGER);

--let $count = 900
--let $count = 100
while ($count)
{
--disable_query_log
Expand All @@ -73,7 +72,7 @@ while ($count)
--dec $count
}

SELECT SUM(f1) = 900 FROM sum_table;
SELECT SUM(f1) = 100 FROM sum_table;

#
# Fourth, create a deadlock
Expand All @@ -83,7 +82,7 @@ SELECT SUM(f1) = 900 FROM sum_table;
SET AUTOCOMMIT=OFF;
START TRANSACTION;

--let $count = 900
--let $count = 100
while ($count)
{
--disable_query_log
Expand All @@ -96,7 +95,7 @@ while ($count)
--connection node_2
SET AUTOCOMMIT=OFF;
START TRANSACTION;
UPDATE t900 SET f1 = 3;
UPDATE t100 SET f1 = 3;

--connection node_1
COMMIT;
Expand Down

0 comments on commit e2173e8

Please sign in to comment.