Skip to content

Commit ff865b0

Browse files
committed
MDEV-34741 - remove LOCK TABLE from mariadb-import
It currently serves no real purpose, but is suspected to cause occasional error when foreign keys are used. "Error: 1100, Table 'child' was not locked with LOCK TABLES, when using table: parent" as seen on CI
1 parent 05fe3f1 commit ff865b0

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

client/mysqlimport.cc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,6 @@ static int handle_one_table(const table_load_params *params, MYSQL *mysql)
628628
}
629629
if (tz_utc && exec_sql(mysql, "SET TIME_ZONE='+00:00';"))
630630
DBUG_RETURN(1);
631-
if (exec_sql(mysql, std::string("LOCK TABLE ") + full_tablename + "WRITE"))
632-
DBUG_RETURN(1);
633631
if (exec_sql(mysql, std::string("ALTER TABLE ") + full_tablename + " DISABLE KEYS"))
634632
DBUG_RETURN(1);
635633
}
@@ -716,8 +714,6 @@ static int handle_one_table(const table_load_params *params, MYSQL *mysql)
716714
if (exec_sql(mysql, std::string("FLUSH TABLE ").append(full_tablename).c_str()))
717715
DBUG_RETURN(1);
718716
}
719-
if (exec_sql(mysql, "UNLOCK TABLES"))
720-
DBUG_RETURN(1);
721717
}
722718

723719
if (tz_utc)

0 commit comments

Comments
 (0)