#!/usr/local/cpanel/3rdparty/bin/perl # Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, # as published by the Free Software Foundation. # # This program is also distributed with certain software (including # but not limited to OpenSSL) that is licensed under separate terms, # as designated in a particular file or component or in included license # documentation. The authors of MySQL hereby grant you an additional # permission to link the program and your derivative works with the # separately licensed software that they have included with MySQL. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License, version 2.0, for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ################################################################################ # # This perl script checks for availability of the Perl modules DBI and # DBD::mysql using the "current" perl interpreter. # # Useful for test environment checking before testing executable perl scripts # in the MySQL Server distribution. # # NOTE: The "shebang" on the first line of this script should always point to # /usr/bin/perl, so that we can use this script to check whether or not we # support running perl scripts with such a shebang without specifying the # perl interpreter on the command line. Such a script is mysqlhotcopy. # # When run as "checkDBI_DBD-mysql.pl" the shebang line will be evaluated # and used. When run as "perl checkDBI_DBD-mysql.pl" the shebang line is # not used. # # NOTE: This script will create a temporary file in MTR's tmp dir. # If modules are found, a mysql-test statement which sets a special # variable is written to this file. If one of the modules is not found # (or cannot be loaded), the file will remain empty. # A test (or include file) which sources that file can then easily do # an if-check on the special variable to determine success or failure. # # Example: # # --let $perlChecker= $MYSQLTEST_VARDIR/std_data/checkDBI_DBD-mysql.pl # --let $resultFile= $MYSQL_TMP_DIR/dbidbd-mysql.txt # --chmod 0755 $perlChecker # --exec $perlChecker # --source $resultFile # if (!$dbidbd) { # --skip Test needs Perl modules DBI and DBD::mysql # } # # The calling script is also responsible for cleaning up after use: # # --remove_file $resultFile # # Windows notes: # - shebangs may work differently - call this script with "perl " in front. # # See mysql-test/include/have_dbi_dbd-mysql.inc for example use of this script. # This script should be executable for the user running MTR. # ################################################################################ BEGIN { # By using eval inside BEGIN we can suppress warnings and continue after. # We need to catch "Can't locate" as well as "Can't load" errors. eval{ $FOUND_DBI=0; $FOUND_DBD_MYSQL=0; # Check for DBI module: $FOUND_DBI=1 if require DBI; # Check for DBD::mysql module $FOUND_DBD_MYSQL=1 if require DBD::mysql; }; }; # Open a file to be used for transfer of result back to mysql-test. # The file must be created whether we write to it or not, otherwise mysql-test # will complain if trying to source it. # An empty file indicates failure to load modules. open(FILE, ">", $ENV{'MYSQL_TMP_DIR'}.'/dbidbd-mysql.txt'); if ($FOUND_DBI && $FOUND_DBD_MYSQL) { # write a mysql-test command setting a variable to indicate success print(FILE 'let $dbidbd= FOUND_DBI_DBD-MYSQL;'."\n"); } # close the file. close(FILE); 1;
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
crldir | Folder | 0755 |
|
|
funcs_1 | Folder | 0755 |
|
|
parts | Folder | 0755 |
|
|
.mylogin.cnf | File | 65 B | 0644 |
|
14897.frm | File | 8.41 KB | 0644 |
|
55_temporal.MYD | File | 80 B | 0644 |
|
55_temporal.MYI | File | 1 KB | 0644 |
|
55_temporal.frm | File | 8.45 KB | 0644 |
|
Index.xml | File | 170.35 KB | 0644 |
|
Moscow_leap | File | 2.61 KB | 0644 |
|
bad_gis_data.dat | File | 4 B | 0644 |
|
binlog_savepoint.000001 | File | 1014 B | 0644 |
|
binlog_transaction.000001 | File | 1.63 KB | 0644 |
|
binlog_transaction_with_GTID.000001 | File | 789 B | 0644 |
|
binlog_transaction_with_anonymous_GTID.000001 | File | 638 B | 0644 |
|
bug15328.cnf | File | 44 B | 0644 |
|
bug16171518_1.dat | File | 1.1 KB | 0644 |
|
bug16171518_2.dat | File | 169 B | 0644 |
|
bug16266.000001 | File | 532 B | 0644 |
|
bug17532932.MYD | File | 0 B | 0644 |
|
bug17532932.MYI | File | 1 KB | 0644 |
|
bug17532932.frm | File | 8.4 KB | 0644 |
|
bug19371.MYD | File | 40 B | 0644 |
|
bug19371.MYI | File | 1 KB | 0644 |
|
bug19371.frm | File | 8.38 KB | 0644 |
|
bug30435_10k_items.txt | File | 47.75 KB | 0644 |
|
bug30435_5k.txt | File | 23.33 KB | 0644 |
|
bug33029-slave-relay-bin.000001 | File | 3.84 KB | 0644 |
|
bug35469.dat | File | 45 B | 0644 |
|
bug36055.MYD | File | 10 B | 0644 |
|
bug36055.MYI | File | 1 KB | 0644 |
|
bug36055.frm | File | 8.36 KB | 0644 |
|
bug37631.MYD | File | 0 B | 0644 |
|
bug37631.MYI | File | 1 KB | 0644 |
|
bug37631.frm | File | 8.39 KB | 0644 |
|
bug40482-bin.000001 | File | 172 B | 0644 |
|
bug46565.ARZ | File | 8.47 KB | 0644 |
|
bug46565.frm | File | 8.35 KB | 0644 |
|
bug47012.ARM | File | 19 B | 0644 |
|
bug47012.ARZ | File | 22 B | 0644 |
|
bug47012.frm | File | 8.39 KB | 0644 |
|
bug47205.frm | File | 8.35 KB | 0644 |
|
bug48265.frm | File | 8.35 KB | 0644 |
|
bug48449.frm | File | 263 B | 0644 |
|
bug48633.ARM | File | 19 B | 0644 |
|
bug48633.ARZ | File | 157 B | 0644 |
|
bug48633.frm | File | 8.45 KB | 0644 |
|
bug49823.CSM | File | 35 B | 0644 |
|
bug49823.CSV | File | 73 B | 0644 |
|
bug49823.frm | File | 8.57 KB | 0644 |
|
ca-cert-verify-san.pem | File | 1.28 KB | 0644 |
|
ca-cert-verify.pem | File | 1.2 KB | 0644 |
|
ca-sha512.pem | File | 1.14 KB | 0644 |
|
cacert.pem | File | 4.28 KB | 0644 |
|
charset_utf8.txt | File | 7.81 KB | 0644 |
|
checkDBI_DBD-mysql.pl | File | 4.03 KB | 0755 |
|
client-cert-verify-san.pem | File | 1.16 KB | 0644 |
|
client-cert.pem | File | 4.42 KB | 0644 |
|
client-key-verify-san.pem | File | 1.64 KB | 0644 |
|
client-key.pem | File | 1.64 KB | 0644 |
|
cluster_7022_table.MYD | File | 0 B | 0644 |
|
cluster_7022_table.MYI | File | 1 KB | 0644 |
|
cluster_7022_table.frm | File | 8.59 KB | 0644 |
|
corrupt-relay-bin.000624 | File | 89.28 KB | 0644 |
|
corrupt_t1#P#p1.MYI | File | 1 KB | 0644 |
|
corrupt_t1.MYI | File | 1 KB | 0644 |
|
crl-ca-cert.pem | File | 4.39 KB | 0644 |
|
crl-certificate-readme.txt | File | 4.21 KB | 0644 |
|
crl-client-cert.pem | File | 3.92 KB | 0644 |
|
crl-client-key.pem | File | 1.64 KB | 0644 |
|
crl-client-revoked-cert.pem | File | 3.94 KB | 0644 |
|
crl-client-revoked-key.pem | File | 1.64 KB | 0644 |
|
crl-client-revoked.crl | File | 2.11 KB | 0644 |
|
crl-server-cert.pem | File | 3.92 KB | 0644 |
|
crl-server-key.pem | File | 1.64 KB | 0644 |
|
des_key_file | File | 55 B | 0644 |
|
dtrace.d | File | 2.55 KB | 0644 |
|
init_file.dat | File | 1.28 KB | 0644 |
|
intersect-bug50389.tsv | File | 20.98 KB | 0644 |
|
latin1.xml | File | 5.76 KB | 0644 |
|
loaddata1.dat | File | 56 B | 0644 |
|
loaddata2.dat | File | 95 B | 0644 |
|
loaddata3.dat | File | 210 B | 0644 |
|
loaddata4.dat | File | 85 B | 0644 |
|
loaddata5.dat | File | 69 B | 0644 |
|
loaddata6.dat | File | 2 B | 0644 |
|
loaddata_dq.dat | File | 46 B | 0644 |
|
loaddata_pair.dat | File | 20 B | 0644 |
|
loaddata_utf8.dat | File | 30 B | 0644 |
|
loadxml.dat | File | 1.44 KB | 0644 |
|
loadxml2.dat | File | 951 B | 0644 |
|
master-bin.000001 | File | 98 B | 0644 |
|
numbers.txt | File | 23 B | 0644 |
|
old-format-relay-log-win.info | File | 30 B | 0644 |
|
old-format-relay-log.info | File | 30 B | 0644 |
|
old_table-323.frm | File | 8.4 KB | 0644 |
|
onerow.xml | File | 339 B | 0644 |
|
rpl_bug28618.dat | File | 42 B | 0644 |
|
rpl_loaddata.dat | File | 12 B | 0644 |
|
rpl_loaddata2.dat | File | 140 B | 0644 |
|
rpl_mixed.dat | File | 30 B | 0644 |
|
rpl_timezone.dat | File | 30 B | 0644 |
|
rpl_timezone2.dat | File | 40 B | 0644 |
|
rsa_private_key.pem | File | 3.17 KB | 0644 |
|
rsa_public_key.pem | File | 800 B | 0644 |
|
server-cert-sha512.pem | File | 1.15 KB | 0644 |
|
server-cert-verify-fail.pem | File | 1.13 KB | 0644 |
|
server-cert-verify-pass.pem | File | 1.1 KB | 0644 |
|
server-cert-verify-san.pem | File | 1.38 KB | 0644 |
|
server-cert.pem | File | 4.42 KB | 0644 |
|
server-key-sha512.pem | File | 1.64 KB | 0644 |
|
server-key-verify-fail.pem | File | 1.64 KB | 0644 |
|
server-key-verify-pass.pem | File | 1.64 KB | 0644 |
|
server-key-verify-san.pem | File | 1.64 KB | 0644 |
|
server-key.pem | File | 1.64 KB | 0644 |
|
server8k-cert.pem | File | 12.4 KB | 0644 |
|
server8k-key.pem | File | 6.21 KB | 0644 |
|
slave-relay-bin_linux.index | File | 25 B | 0644 |
|
slave-relay-bin_win.index | File | 25 B | 0644 |
|
system_tap.stp | File | 3.47 KB | 0644 |
|
trunc_binlog.000001 | File | 174 B | 0644 |
|
untrusted-cacert.pem | File | 2.74 KB | 0644 |
|
vchar.frm | File | 8.41 KB | 0644 |
|
warnings_loaddata.dat | File | 211 B | 0644 |
|
wl6219_41.MYD | File | 120 B | 0644 |
|
wl6219_41.MYI | File | 1 KB | 0644 |
|
wl6219_41.frm | File | 8.47 KB | 0644 |
|
wl6219_55.MYD | File | 120 B | 0644 |
|
wl6219_55.MYI | File | 1 KB | 0644 |
|
wl6219_55.frm | File | 8.47 KB | 0644 |
|
wl6219_55_innodb.frm | File | 8.47 KB | 0644 |
|
words.dat | File | 581 B | 0644 |
|
words2.dat | File | 419 B | 0644 |
|