Server IP : 104.21.38.3 / Your IP : 108.162.226.168 Web Server : Apache System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64 User : www ( 1000) PHP Version : 7.4.33 Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /www/server/mysql/src/mysql-test/suite/ndb/include/ |
Upload File : |
# # ndb_check_unique_index.inc - check that all unique index use same fragment count as main table # # Usage: # let ndb_database= <table database>; # let ndb_table= <table name>; # --source suite/ndb/include/ndb_check_unique_index.inc # --perl use strict; my $db = $ENV{ndb_database} or die "Missing ndb_database in environment\n"; my $tbl = $ENV{ndb_table} or die "Missing ndb_table in environment\n"; my $cmd = "$ENV{NDB_DESC} -d$db $tbl"; my $fragcnt; my %idxfragcnts; open MAIN, "$cmd|"; print "Table: $db.$tbl\n"; while (<MAIN>) { if (/FragmentCount: (\S+).*/) { # print previous tables indices fragment counts foreach my $i (sort keys %idxfragcnts) { print $i; print $idxfragcnts{$i}; } # clear current tables indices fragment counts %idxfragcnts = undef; # print current tables fragment count print; $fragcnt = $1; } if (/([^(]+unique)\S+ - UniqueHashIndex.*/) { my $row = $_; $idxfragcnts{$row} = ''; my $index = $1; open IDX, "$ENV{NDB_DESC} -d$db -t$tbl $index|" or die "FAILED: $ENV{NDB_DESC} -d$db -t$tbl $index|"; while (<IDX>) { if (/FragmentCount: (\S+).*/) { $idxfragcnts{$row} = $_; } } close IDX; } } # print last tables indices fragment counts foreach my $i (sort keys %idxfragcnts) { print $i; print $idxfragcnts{$i}; } close MAIN; EOF let ndb_database=; let ndb_table=;