mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Add triggers to notify InnoDB developers when MySQL developers change files
that they control. BitKeeper/triggers/post-commit.innodb.pl: Trigger to notify InnoDB developers about changes in InnoDB files. BitKeeper/triggers/post-incoming.innodb.pl: Trigger to notify InnoDB developers about changes in InnoDB files. BitKeeper/triggers/pre-commit.innodb.pl: Trigger to warn MySQL developers that they have changed InnoDB files, and that their changes will be sent to the InnoDB developers if they choose to commit. BitKeeper/triggers/triggers-lib.pl: Utility functions for BK triggers written in Perl.
This commit is contained in:
21
BitKeeper/triggers/pre-commit.innodb.pl
Executable file
21
BitKeeper/triggers/pre-commit.innodb.pl
Executable file
@@ -0,0 +1,21 @@
|
||||
#! /usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use FindBin;
|
||||
require "$FindBin::Bin/triggers-lib.pl";
|
||||
|
||||
die "$0: Script error: \$BK_PENDING is not set in pre-commit trigger\n"
|
||||
unless defined $ENV{BK_PENDING};
|
||||
|
||||
# Read changed files from $BK_PENDING directly. Do not bother user about
|
||||
# merge changes; they don't have any choice, the merge must be done.
|
||||
my $changes = innodb_get_changes('file', $ENV{BK_PENDING}, undef)
|
||||
or exit 0;
|
||||
|
||||
innodb_inform_and_query_user($changes)
|
||||
or exit 1; # Abort commit
|
||||
|
||||
# OK, continue with commit
|
||||
exit 0;
|
||||
Reference in New Issue
Block a user