Test that the new table's charset can be changed.

This commit is contained in:
Daniel Nichter
2013-06-26 10:47:19 -07:00
parent 57f35b22b3
commit 1346757702
2 changed files with 99 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
package pt_online_schema_change_plugin;
use strict;
use warnings FATAL => 'all';
use English qw(-no_match_vars);
use constant PTDEBUG => $ENV{PTDEBUG} || 0;
sub new {
my ($class, %args) = @_;
my $self = { %args };
return bless $self, $class;
}
sub after_create_new_table {
my ($self, %args) = @_;
my $new_tbl = $args{new_tbl};
my $dbh = $self->{cxn}->dbh;
my $row = $dbh->selectrow_arrayref("SHOW CREATE TABLE $new_tbl->{name}");
warn "after_create_new_table: $row->[1]\n\n";
}
sub after_alter_new_table {
my ($self, %args) = @_;
my $new_tbl = $args{new_tbl};
my $dbh = $self->{cxn}->dbh;
my $row = $dbh->selectrow_arrayref("SHOW CREATE TABLE $new_tbl->{name}");
warn "after_alter_new_table: $row->[1]\n\n";
}
1;