Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix backup table detection bug in acl-config. #920

Merged
merged 2 commits into from
May 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions bin/acl-config
Original file line number Diff line number Diff line change
Expand Up @@ -2127,12 +2127,6 @@ function verifyDatabase()
function tablesExist(iDatabase $db, array $tables, $schema, $all = true)
chakrabortyr marked this conversation as resolved.
Show resolved Hide resolved
{
$handle = $db->handle();
$query = <<<SQL
SELECT *
FROM information_schema.tables
WHERE table_schema = :table_schema
AND table_name in (:table_list);
SQL;

$tables = array_reduce(
$tables,
Expand All @@ -2145,10 +2139,18 @@ SQL;
);

$tableList = implode(',', $tables);

$query = <<<SQL
SELECT *
FROM information_schema.tables
WHERE table_schema = :table_schema
AND table_name in ($tableList);
SQL;

$params = array(
':table_schema' => $schema,
':table_list' => $tableList
':table_schema' => $schema
);

$results = $db->query(
$query,
$params
Expand Down