Skip to content
This repository has been archived by the owner on Apr 9, 2021. It is now read-only.

Commit

Permalink
Updated --expose_dd_tables procedure to deal with DD changes in 8.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
datacharmer committed Jul 24, 2017
1 parent a3d6e43 commit 724d174
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
3.2.13 24-Jul-2017
- Updated --expose_dd_tables procedure to deal with DD changes in 8.0.2
3.2.12 18-Jul-2017
- Changed initial check for system tables: MySQL 8.0.2 has a tablespace instead
3.2.11 16-Jul-2017
Expand Down
9 changes: 7 additions & 2 deletions bin/low_level_make_sandbox
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,15 @@ if ($msb->{options}{expose_dd_tables})
$msb->{options}{post_grants_sql} = '';
}

# In MySQL 8.0.2 the "hidden" column was changed from integer (0=visible, 1=hidden)
# to an ENUM (System, Visible, SE, DDL)
$msb->{options}{post_grants_sql} =
"set persist debug='+d,skip_dd_table_access_check';
create table sys.dd_hidden_tables select id, name, schema_id from mysql.tables where hidden=1;
update mysql.tables set hidden=0 where hidden=1;
set \@col_type=(select c.type from mysql.columns c inner join mysql.tables t where t.id=table_id and t.name='tables' and c.name='hidden');
set \@visible=(if(\@col_type = 'MYSQL_TYPE_ENUM', 'Visible', '0'));
set \@hidden=(if(\@col_type = 'MYSQL_TYPE_ENUM', 'System', '1'));
create table sys.dd_hidden_tables select id, name, schema_id from mysql.tables where hidden=\@hidden;
update mysql.tables set hidden=\@visible where hidden=\@hidden and schema_id = 1;
"
. $msb->{options}{post_grants_sql};
}
Expand Down
2 changes: 1 addition & 1 deletion lib/MySQL/Sandbox.pm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ our @EXPORT_OK= qw( is_port_open
split_version
) ;

our $VERSION=q{3.2.12};
our $VERSION=q{3.2.13};
our $DEBUG;

BEGIN {
Expand Down
2 changes: 1 addition & 1 deletion lib/MySQL/Sandbox/Recipes.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package MySQL::Sandbox::Recipes;
use strict;
use warnings;

our $VERSION=q{3.2.12};
our $VERSION=q{3.2.13};

1;
__END__
Expand Down
2 changes: 1 addition & 1 deletion lib/MySQL/Sandbox/Scripts.pm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ our @EXPORT_OK = qw(
);
our @EXPORT = @EXPORT_OK;

our $VERSION=q{3.2.12};
our $VERSION=q{3.2.13};

our @MANIFEST = (
'clear.sh',
Expand Down
1 change: 1 addition & 0 deletions test_all_latest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ do
if [ "$?" != "0" ] ; then continue ; fi
make
if [ "$?" != "0" ] ; then continue ; fi
date
TEST_VERSION=$V make test
EC=$?
echo "`date` - $V - $EC" >> results.txt
Expand Down

0 comments on commit 724d174

Please sign in to comment.