Commit ff865b08 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

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
parent 05fe3f1c
......@@ -628,8 +628,6 @@ static int handle_one_table(const table_load_params *params, MYSQL *mysql)
}
if (tz_utc && exec_sql(mysql, "SET TIME_ZONE='+00:00';"))
DBUG_RETURN(1);
if (exec_sql(mysql, std::string("LOCK TABLE ") + full_tablename + "WRITE"))
DBUG_RETURN(1);
if (exec_sql(mysql, std::string("ALTER TABLE ") + full_tablename + " DISABLE KEYS"))
DBUG_RETURN(1);
}
......@@ -716,8 +714,6 @@ static int handle_one_table(const table_load_params *params, MYSQL *mysql)
if (exec_sql(mysql, std::string("FLUSH TABLE ").append(full_tablename).c_str()))
DBUG_RETURN(1);
}
if (exec_sql(mysql, "UNLOCK TABLES"))
DBUG_RETURN(1);
}
if (tz_utc)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment