allow no-vertical-format option for mysql clients that dont support it

This commit is contained in:
frank-cizmich
2015-12-06 19:14:06 -03:00
parent c6a94bb449
commit 9f81fa5c4a
9 changed files with 915 additions and 21 deletions

View File

@@ -349,16 +349,18 @@ override query_report => sub {
default_db => $default_db,
Quoter => $q,
);
my $mark = $args{no_v_format} ? '' : '\G';
foreach my $db_tbl ( @table_names ) {
my ( $db, $tbl ) = @$db_tbl;
my $status
= 'SHOW TABLE STATUS'
. ($db ? " FROM `$db`" : '')
. " LIKE '$tbl'\\G";
. " LIKE '$tbl'${mark}";
my $create
= "SHOW CREATE TABLE "
. $q->quote(grep { $_ } @$db_tbl)
. "\\G";
. ${mark};
push @tables, { status => $status, create => $create };
}