view release on metacpan or search on metacpan
0.50 Wed Sep 7 01:36:18 2005
- add correspondence between BufCaElt and RDBlock via the
MailBag
- add hooks for _BCE_dirtyhook, _init_filewriteblock
0.49 Sun Aug 28 22:24:16 2005
- Util::FileSetHeaderInfo - method to add defs to existing datafile
0.48 Fri Aug 26 23:33:21 2005
- Consolidate all dictionary defs/prefs, see "dump prefs"
0.47 Thu Aug 25 02:03:21 2005
- Object-Oriented SysHook
- arbitrary user preferences (via -define) and fileheader info
(via -fileheader_define).
- align fileheader on blocksize boundary
0.46 Sun Aug 7 20:10:17 2005
- more efficient update of rows that exceed small row threshold.
- add sync (flush changes to disk without committing a transaction).
initialization (e.g. blocksize=2k).
Fix rowcount in DBI fetch (GenDBI::SelectFetch).
Cleanup Tablespace handling of filearr,used/unused to match
Dict _tsfiles fileidx.
Use Util::UNPACK_TEMPL_ARR to cache common unpacking templates
to speed up UnPackRow.
bt2: faster insertion
0.11 Tue Mar 30 23:14:54 2004
- change col1 and pref1 column names so not reserved words,
fix bufcache creation to get size from prefs, use all free
blocks before checking pin status, parse IS [NOT] NULL
predicates
0.10 Fri Mar 19 23:59:46 2004
- describe table, better string parsing of relop tokens
(e.g. =, <, > ...), primitive sql update (basically single
row update column=value, no subqueries), slight fixes on
RSFile/SMFile nextblock improve row packing density, remove
surrounding quotes on insert/update values, return undef's in
SelectFetch (versus the string "<undef>"), quiet undef warnings
lib/Genezzo/Dict.pm view on Meta::CPAN
# file header definitions
$self->{fhdefs} = $args{fhdefs};
}
else
{
$self->{fhdefs} = {};
}
# get all actual file header info
$self->{fileheaderinfo} = {}; # set when load SYSTEM tablespace
# get dictionary preference table info
$self->{prefs} = {};
$self->{basichelp} = Genezzo::BasicHelp->new();
# for raw filesystems we pretend /dev/raw is the home directory
# and raw1 is the file.
if($self->{gnz_home} eq "/dev/raw"){
setUseRaw(1);
}else{
setUseRaw(0);
lib/Genezzo/Dict.pm view on Meta::CPAN
print Dumper(%{ $self->{dict_tables}}), "\n";
}
elsif ($params[0] =~ m/help/i)
{
my %legitdefs = (
all => "dump dictionary table structs",
help => "this message",
table => "names of dictionary tables",
ts => "dump tablespace structs (very long)",
tstab => "dump loaded tablespace tables (short)",
prefs => "startup prefs",
bc => "buffer cache (per tablespace)",
tsidx => "tablespace index information",
files => "file headers and extent info"
);
print "\n";
while (my ($kk, $vv) = each (%legitdefs))
{
print "$kk:\t$vv\n";
}
lib/Genezzo/Dict.pm view on Meta::CPAN
if ($jj eq 'table_cache')
{
for my $tt (keys(%{$vv->{table_cache}}))
{
print " $tt\n";
}
}
}
}
}
elsif ($params[0] =~ m/^PREF/i) # dump prefs
{
print Dumper($self->{prefs});
print Dumper($self->{fileheaderinfo});
print Dumper($self->{unknown_defs});
print Dumper($self->{fhdefs});
}
elsif ($params[0] =~ m/^BC/i) # dump buffer cache
{
while (my ($kk, $vv) = each (%{$self->{tablespaces}}))
{
print "tablespace: $kk\n";
my $bc1;
lib/Genezzo/Dict.pm view on Meta::CPAN
#private
sub _DictDefineCoreTabs
{
my ($self, $tsname, $deffile, $deffilsize, $makepref1, $hdrsize) = @_;
# if makepref1 is set, build the preferences table, else use the
# existing one in default.dbf
if ($makepref1)
{
my %basicprefs = (
blocksize => $self->{blocksize},
home => $self->{gnz_home},
default_file => $deffile,
bc_size => 40,
automount => "TRUE", # "FALSE",
genezzo_version => $Genezzo::GenDBI::VERSION,
export_start_tid => 1
);
whisper "create _pref1...\n";
lib/Genezzo/Dict.pm view on Meta::CPAN
# ct _pref1 name=c value=c creationdate=c
my $rowarr = [
"pref_key",
"pref_value",
time_iso8601(), # creationdate
"init"
];
my $getcol = $corecolnum{"_pref1"};
while (my ($kk, $vv) = each (%basicprefs))
{
$rowarr->[$getcol->{pref_key}] = $kk;
$rowarr->[$getcol->{pref_value}] = $vv;
unless (defined($realtie->HPush($rowarr)))
{
my $msg = "Failed to create table $tablename";
my %earg = (self => $self, msg => $msg, severity => 'fatal');
&$GZERR(%earg)
if (defined($GZERR));
lib/Genezzo/Dict.pm view on Meta::CPAN
$self->{dbsize} = POSIX::floor($self->{dbsize});
# Note: number of blocks must be an integer -- true dbsize
# gets calculated in TSAddfile
}
my $ts1 = Genezzo::Tablespace->new(name => $tsname,
tsid => 1,
gnz_home => $self->{gnz_home},
blocksize => $self->{blocksize},
bc_size => $self->{prefs}->{bc_size},
GZERR => $self->{GZERR},
dict => $self);
$tshref->{$tsname} = {
tsref => $ts1,
};
my %af_args = (filename => $deffile,
filesize => $self->{dbsize});
if (exists($self->{fhdefs}))
lib/Genezzo/Dict.pm view on Meta::CPAN
}
return 1;
} # end dictrollback
sub doDictPreLoad
{
my $self = shift;
whisper "load prefs...\n";
my $tsname = "SYSTEM";
my $deffile = $self->{dbfile};
my $deffilsize = $self->{dbsize};
my $tshref = $self->{tablespaces};
# NOTE: clear out the tablespace info to force a
# clean tablespace reload from _get_table.
lib/Genezzo/Dict.pm view on Meta::CPAN
unless ($self->_loadDictMemStructs ());
# print Dumper(%{ $self->{dict_tables}}), "\n";
return 0
unless ($self->_TSForceFile1("SYSTEM", "_pref1"));
# XXX XXX: create a hash of methods associated with pref1, use the
# key/val pairs to reset system preferences
$self->{prefs} = {};
my $hashi = $self->_get_table (tname => '_pref1') ;
# XXX XXX: replace with filter and SQLFetch...
while ( my ($kk, $vv) = each ( %{$hashi}))
{
my $getcol = $corecolnum{"_pref1"};
my $pref_key = $vv->[$getcol->{pref_key}];
my $pref_val = $vv->[$getcol->{pref_value}];
$self->{prefs}->{$pref_key} = $pref_val;
if ($pref_key =~ m/bc_size/)
{
my $tshref = $self->{tablespaces};
my $tsname = 'SYSTEM';
my $ts1 = $tshref->{$tsname}->{tsref};
# greet $pref_val;
my $bufsz = $ts1->{the_ts}->{bc}->Resize($pref_val);
if ($pref_val ne $bufsz)
{
lib/Genezzo/Dict.pm view on Meta::CPAN
return undef;
}
my %tspace_args = (name => $tsname,
tsid => $tsid,
gnz_home => $self->{gnz_home},
blocksize => $self->{blocksize},
GZERR => $self->{GZERR},
dict => $self);
if (exists($self->{prefs})
&& exists($self->{prefs}->{bc_size}))
{
# set the buffer cache size if prefs are loaded
$tspace_args{bc_size} = $self->{prefs}->{bc_size}
}
my $ts1 = Genezzo::Tablespace->new(%tspace_args);
# XXX: need to perform special initialization for SYSTEM
# tablespace that only loads the core tables. dodictload will
# reload tablespace using dictionary tables after core dict
# tables are loaded. clear as mud.
my $loadtype = "NORMAL";
lib/Genezzo/Dict.pm view on Meta::CPAN
{
my $tshref = $self->{tablespaces};
my %tspace_args = (name => $tsname,
tsid => $tsid,
gnz_home => $self->{gnz_home},
blocksize => $blocksize,
GZERR => $self->{GZERR},
dict => $self);
if (exists($self->{prefs})
&& exists($self->{prefs}->{bc_size}))
{
# set the buffer cache size if prefs are loaded
$tspace_args{bc_size} = $self->{prefs}->{bc_size}
}
$ts1 = Genezzo::Tablespace->new(%tspace_args);
unless ($ts1->TSLoad(loadtype => "NORMAL"))
{
whisper "load failed";
return undef;
}
lib/Genezzo/Havok/OO_Examples.pm view on Meta::CPAN
sub new
{
whoami;
my $invocant = shift;
my $class = ref($invocant) || $invocant ;
my $self = { };
$self->{dict} = shift @_;
$self->{count} = 0;
greet $self->{dict}->{prefs};
return bless $self, $class;
}
sub SysHookInit
{
goto &new
}
lib/Genezzo/Havok/OO_Examples.pm view on Meta::CPAN
$cc++;
$self->{count} = $cc;
my $dict = $self->{dict};
my %args = @_;
if (exists($args{self}))
{
my $self2 = $args{self};
if (defined($self2) && exists($self2->{GZERR}))
{
my $d2 = Data::Dumper->Dump([$dict->{prefs}]);
$d2 .= "\ncount = $cc\n";
my $err_cb = $self2->{GZERR};
&$err_cb(self => $self2, severity => 'info',
msg => "Howdy!! $d2");
}
}
# call the callback
lib/Genezzo/Havok/OO_Examples.pm view on Meta::CPAN
$cc++;
$self->{count} = $cc;
my $dict = $self->{dict};
my %args = @_;
if (exists($args{self}))
{
my $self2 = $args{self};
if (defined($self2) && exists($self2->{GZERR}))
{
my $d2 = Data::Dumper->Dump([$dict->{prefs}]);
$d2 .= "\ncount = $cc\n";
my $err_cb = $self2->{GZERR};
&$err_cb(self => $self2, severity => 'info',
msg => "Ciao!! $d2");
}
}
# call the callback
not_ok ("could not startup");
}
my $dictobj = $fb->{dictobj};
while (my ($kk, $vv) = each (%other_defs))
{
print "$kk: $vv\n";
not_ok ("could not find $kk")
unless (exists($dictobj->{prefs}->{$kk}));
my $pval = $dictobj->{prefs}->{$kk};
not_ok ("$kk: mismatch - $pval not equal $vv")
unless ($vv eq $pval);
}
ok();
while (my ($kk, $vv) = each (%fhdefs))
{
print "$kk: $vv\n";
not_ok ("could not find $kk")
unless (exists($dictobj->{fileheaderinfo}->{$kk}));