Hello community,
here is the log from the commit of package pg_comparator for openSUSE:Factory checked in at 2013-01-30 22:23:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pg_comparator (Old)
and /work/SRC/openSUSE:Factory/.pg_comparator.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pg_comparator", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/pg_comparator/pg_comparator.changes 2012-10-17 07:15:16.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.pg_comparator.new/pg_comparator.changes 2013-01-30 22:23:28.000000000 +0100
@@ -1,0 +2,12 @@
+Wed Jan 2 19:39:39 UTC 2013 - aldemir.akpinar@airties.com
+
+- Fix the factory compilation error
+
+-------------------------------------------------------------------
+Fri Nov 30 12:21:02 UTC 2012 - aldemir.akpinar@airties.com
+
+- New version: 2.1.2
+- improved see also section in doc
+- improve quote handling in some cases
+
+-------------------------------------------------------------------
Old:
----
pg_comparator-2.1.1.tgz
New:
----
pg_comparator-2.1.2.tgz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pg_comparator.spec ++++++
--- /var/tmp/diff_new_pack.aRsMUL/_old 2013-01-30 22:23:29.000000000 +0100
+++ /var/tmp/diff_new_pack.aRsMUL/_new 2013-01-30 22:23:29.000000000 +0100
@@ -1,8 +1,8 @@
#
# spec file for package pg_comparator
#
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
-# Copyright (c) 2012 Aldemir Akpinar
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 Aldemir Akpinar
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,8 +17,12 @@
#
+#
+%define pglibdir %{expand:%%(/usr/bin/pg_config --pkglibdir)}
+%define pgdocdir %{expand:%%(/usr/bin/pg_config --docdir)}
+
Name: pg_comparator
-Version: 2.1.1
+Version: 2.1.2
Release: 1%{?dist}
Summary: A tool to compare and sync tables in different locations
License: BSD-3-Clause
@@ -45,26 +49,41 @@
make %{?_smp_mflags}
%install
-%makeinstall
+#%makeinstall
+install -d %{buildroot}/%{pglibdir}/%{_lib}
+install -d %{buildroot}/%{_bindir}
+install -d %{buildroot}/%{pgdocdir}
+install -d %{buildroot}/%{pgdocdir}/contrib
+install pgc_casts.so %{buildroot}/%{pglibdir}/%{_lib}/pgc_casts.so
+install pgc_checksum.so %{buildroot}/%{pglibdir}/%{_lib}/pgc_checksum.so
+install pg_comparator %{buildroot}/%{_bindir}/pg_comparator
+install LICENSE %{buildroot}/%{pgdocdir}/LICENSE
+install README.pgc_checksum %{buildroot}/%{pgdocdir}/README.pgc_checksum
+install README.pgc_casts %{buildroot}/%{pgdocdir}/README.pgc_casts
+install README.pg_comparator %{buildroot}/%{pgdocdir}/README.pg_comparator
+install README.xor_aggregate %{buildroot}/%{pgdocdir}/README.xor_aggregate
+install pgc_casts.sql %{buildroot}/%{pgdocdir}/contrib/pgc_casts.sql
+install pgc_checksum.sql %{buildroot}/%{pgdocdir}/contrib/pgc_checksum.sql
+install xor_aggregate.sql %{buildroot}/%{pgdocdir}/contrib/xor_aggregate.sql
%files
%defattr(-, root, root, -)
%{_bindir}/pg_comparator
-%{_libdir}/postgresql/pgc_casts.so
-%{_libdir}/postgresql/pgc_checksum.so
+%dir %{pglibdir}
+%dir %{pglibdir}/%{_lib}
+%{pglibdir}/%{_lib}/pgc_casts.so
+%{pglibdir}/%{_lib}/pgc_checksum.so
%defattr(644, root, root, 755)
-%dir %{_libdir}/postgresql
-%dir %{_docdir}/postgresql
-%dir %{_docdir}/postgresql/contrib
-%dir %{_datadir}/postgresql
-%dir %{_datadir}/postgresql/contrib
-%doc LICENSE
-
-%{_docdir}/postgresql/contrib/README.checksum
-%{_docdir}/postgresql/contrib/README.pg_comparator
-%{_docdir}/postgresql/contrib/README.xor_aggregate
-%{_datadir}/postgresql/contrib/pgc_casts.sql
-%{_datadir}/postgresql/contrib/pgc_checksum.sql
-%{_datadir}/postgresql/contrib/xor_aggregate.sql
+%dir %{pgdocdir}
+%dir %{pgdocdir}/contrib
+%doc %{pgdocdir}/LICENSE
+%doc %{pgdocdir}/README.pgc_checksum
+%doc %{pgdocdir}/README.pgc_casts
+%doc %{pgdocdir}/README.pg_comparator
+%doc %{pgdocdir}/README.xor_aggregate
+
+%{pgdocdir}/contrib/pgc_casts.sql
+%{pgdocdir}/contrib/pgc_checksum.sql
+%{pgdocdir}/contrib/xor_aggregate.sql
%changelog
++++++ pg_comparator-2.1.1.tgz -> pg_comparator-2.1.2.tgz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pg_comparator-2.1.1/Makefile new/pg_comparator-2.1.2/Makefile
--- old/pg_comparator-2.1.1/Makefile 2012-08-19 18:56:24.000000000 +0200
+++ new/pg_comparator-2.1.2/Makefile 2012-08-20 16:18:53.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: Makefile 1349 2012-08-19 16:56:24Z fabien $
+# $Id: Makefile 1383 2012-08-20 14:18:53Z fabien $
#
# PostgreSQL stuff
@@ -12,7 +12,8 @@
DATA = xor_aggregate.sql
DOCS = README.$(name) \
README.xor_aggregate \
- README.checksum
+ README.pgc_checksum \
+ README.pgc_casts
EXTRA_CLEAN = $(name).1 $(name).html pod2htm?.tmp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pg_comparator-2.1.1/README.checksum new/pg_comparator-2.1.2/README.checksum
--- old/pg_comparator-2.1.1/README.checksum 2010-08-06 09:22:06.000000000 +0200
+++ new/pg_comparator-2.1.2/README.checksum 1970-01-01 01:00:00.000000000 +0100
@@ -1,15 +0,0 @@
-provide fast NOT cryptographycally-secure checksum functions
-for TEXT, results being of INT2, INT4 and INT8 types.
-
-load with:
-
- sh> psql < <path-to-postgresql>/share/contrib/pgc_checksum.sql
-
-use as:
-
- psql> SELECT cksum2('some text');
- psql> SELECT cksum4('some text');
- psql> SELECT cksum8('some text');
-
-An empty text results in hash value 0.
-A NULL value results in some predefined value.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pg_comparator-2.1.1/README.pgc_casts new/pg_comparator-2.1.2/README.pgc_casts
--- old/pg_comparator-2.1.1/README.pgc_casts 1970-01-01 01:00:00.000000000 +0100
+++ new/pg_comparator-2.1.2/README.pgc_casts 2012-08-20 16:18:29.000000000 +0200
@@ -0,0 +1,7 @@
+provide useful casts for pg_comparator:
+ - bytea to/from bit & varbit,
+ - bit & varbit to int2.
+
+load with:
+
+ sh> psql < <path-to-postgresql>/share/contrib/pgc_casts.sql
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pg_comparator-2.1.1/README.pgc_checksum new/pg_comparator-2.1.2/README.pgc_checksum
--- old/pg_comparator-2.1.1/README.pgc_checksum 1970-01-01 01:00:00.000000000 +0100
+++ new/pg_comparator-2.1.2/README.pgc_checksum 2012-08-20 16:18:21.000000000 +0200
@@ -0,0 +1,15 @@
+provide fast NOT cryptographycally-secure checksum functions
+for TEXT, results being of INT2, INT4 and INT8 types.
+
+load with:
+
+ sh> psql < <path-to-postgresql>/share/contrib/pgc_checksum.sql
+
+use as:
+
+ psql> SELECT cksum2('some text');
+ psql> SELECT cksum4('some text');
+ psql> SELECT cksum8('some text');
+
+An empty text results in hash value 0.
+A NULL value results in some predefined value.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pg_comparator-2.1.1/pg_comparator new/pg_comparator-2.1.2/pg_comparator
--- old/pg_comparator-2.1.1/pg_comparator 2012-08-20 11:15:10.000000000 +0200
+++ new/pg_comparator-2.1.2/pg_comparator 2012-10-28 14:42:01.000000000 +0100
@@ -1,6 +1,6 @@
#! /usr/bin/perl
#
-# $Id: pg_comparator.pl 1375 2012-08-20 09:15:10Z fabien $
+# $Id: pg_comparator.pl 1401 2012-10-28 13:42:01Z fabien $
#
# HELP 1: pg_comparator --man
# HELP 2: pod2text pg_comparator
@@ -8,7 +8,7 @@
#
use strict; # I don't like perl
-use warnings; # I dont trust perl
+use warnings; # neither do I trust perl
=head1 NAME
@@ -93,14 +93,17 @@
=item C<--checksum-size=n> or C<--check-size=n> or C<--cs=n> or C<-z n>
-Checksum size, must be B<2>, B<4> or B<8> bytes.
+Tuple checksum size, must be B<2>, B<4> or B<8> bytes.
+The key checksum size is always 4 bytes long.
-Default is B<8>. There should be no reason to change that.
+Default is B<8>, so that the false negative probability is very low.
+There should be no reason to change that.
=item C<--cleanup>
Drop checksum and summary tables beforehand.
-Useful after a run with C<--no-temp> and C<--no-clear>.
+Useful after a run with C<--no-temp> and C<--no-clear>, typically used
+for debugging.
Default is not to drop because it is not needed.
@@ -109,6 +112,7 @@
Drop checksum and summary tables explicitly after the computation.
Note that they are dropped implicitly by default when the connection
is closed as they are temporary, see C<-(-no)-temporary> option.
+This option is useful for debugging.
Default is B<not> to clear explicitely the checksum and summary tables,
as it is not needed.
@@ -121,16 +125,18 @@
Default is not to run in debug mode.
-=item C<--env-pass=var>
+=item C<--env-pass='var'>
Take password from environment variables C<var1>, C<var2> or C<var>
for connection one, two, or both.
This is tried before asking interactively if C<--ask-pass> is also set.
+Default is not to look for passwords from environment variables.
+
=item C<--expect n> or C<-e n>
Total number of differences to expect (updates, deletes and inserts).
-This option is used by non regression tests.
+This option is only used for non regression tests. See the TESTS section.
=item C<--folding-factor=7> or C<-f 7>
@@ -156,6 +162,8 @@
Consider C<--use-key> instead if you already have a reasonably distributed
integer primary key.
+Default is to build both key and tuple checksums on the fly.
+
=item C<--lock>, C<--no-lock>
Whether to lock tables.
@@ -253,7 +261,7 @@
the comparison authentication part of the source or target URLs.
One can connect with "DBI:Pg:service=backup", use an alternate driver,
set any option allowed by the driver...
-See C<man DBD::Pg> and C<man DBD:mysql> for the various options that can
+See LDBD::Pg and LDBD:mysql manuals for the various options that can
be set through the DBI data source specification.
However, the database server specified in the URL must be consistent with
this source specification so that the queries' syntax is the right one.
@@ -263,7 +271,7 @@
=item C<--stats=(txt|csv)>
Show various statistics about the comparison performed in this format.
-Also, option C<--stats-name> gives the test a name, usefull to generate csv
+Also, option C<--stats-name> gives the test a name, useful to generate csv
files that will be processed automatically.
Default is B<not> to show statistics, because it requires additional
@@ -281,7 +289,7 @@
Whether to use temporary tables. If you don't, the tables are kept by default
at the end, so they will have to be deleted by hand. See C<--clear> option
-to request a cleanup.
+to request a cleanup. This option is useful for debugging.
Default is to use temporary tables that are automatically wiped out when the
connection is closed.
@@ -296,7 +304,6 @@
light weight threads, really.
This does NOT work at all with PostgreSQL.
-
It works partially with MySQL, at the price of turning off C<--transaction>.
Default is B<not> to use threads, as it does not work for all databases.
@@ -305,7 +312,7 @@
Timeout comparison after C<n> seconds.
-Default is not to timeout. Be patient.
+Default is no timeout. Be patient.
=item C<--transaction>, C<--no-transaction>
@@ -322,7 +329,7 @@
not appear in the lists of key and value columns.
See also the EXAMPLES section below for how to set a checksum trigger.
-Default is to build both checksums on the fly.
+Default is to build both key and tuple checksums on the fly.
=item C<--use-key> or C<-u>
@@ -528,8 +535,9 @@
=back
-In case of key-checksum or data-checksum collision, false negative results
-may occur. Changing the checksum function would help in such cases.
+In case of tuple checksum collisions, false negative results may occur.
+Changing the checksum function would help in such cases.
+See the ANALYSIS sub-section.
=head1 DEPENDENCES
@@ -546,11 +554,13 @@
A checksum function must be used to reduce and distribute key
and columns values. It may be changed with the C<--checksum> option.
Its size can be selected with the C<--checksize> option (currently 2, 4 or 8
-bytes).
+bytes). The checksums also require casts to be converted to integers of
+various sizes.
Suitable implementations are available for PostgreSQL and can be loaded into
-the server by processing C. New checksums and
-casts are also available for MySQL, see C.
+the server by processing C and
+C. New checksums and casts are also available
+for MySQL, see C.
=item 3
@@ -570,29 +580,29 @@
=item
-CGetopt::Long for option management.
+LGetopt::Long for option management.
=item
-C<DBI>,
-CDBD::Pg to connect to PostgreSQL,
-and CDBD::mysql to connect to MySQL.
+L<DBI>,
+LDBD::Pg to connect to PostgreSQL,
+and LDBD::mysql to connect to MySQL.
=item
-CTerm::ReadPassword for C<--ask-pass> option.
+LTerm::ReadPassword for C<--ask-pass> option.
=item
-CPod::Usage for doc self-extraction (C<--man> C<--opt> C<--help>).
+LPod::Usage for doc self-extraction (C<--man> C<--opt> C<--help>).
=item
-C<threads> for the experimental threaded version with option C<--threads>.
+L<threads> for the experimental threaded version with option C<--threads>.
=back
-These modules are only loaded by the script if they are actually required.
+Modules are only loaded by the script if they are actually required.
=head1 ALGORITHM
@@ -815,6 +825,23 @@
This script is reasonably tested, but due to its proof of concept nature
there is a lot of options the combination of which cannot all be tested.
+=head2 NOTE
+
+If the tables to compare are in the same database, a simple SQL
+query can extract the differences. Assuming Tables I<T1> and I<T2>
+with primary key I<id> and non null contents I<data>, then their
+differences is summarized by the following query:
+
+ SELECT COALESCE(T1.id, T2.id) AS key,
+ CASE WHEN T1.id IS NULL THEN 'DELETE'
+ WHEN T2.id IS NULL THEN 'INSERT'
+ ELSE 'UPDATE'
+ END AS operation
+ FROM T1 FULL JOIN T2 USING (id)
+ WHERE T1.id IS NULL -- DELETE
+ OR T2.id IS NULL -- INSERT
+ OR T1.data <> T2.data -- UPDATE
+
=head2 REFERENCES
A paper was presented at a conference about this tool and its algorithm:
@@ -824,12 +851,12 @@
pp 23-28, St Marteen, The Netherlands Antilles, January 2011.
ISBN: 978-1-61208-002-4.
Copyright IARIA 2011.
-Online at Lhttp://www.thinkmind.org/index.php?view=article&articleid=dbkda_2011_2_10_30021.
+Online at Lhttp://www.thinkmind.org/index.php?view=article&articleid=dbkda_2011_2_10_30021>.
The algorithm and script was inspired by
B<Taming the Distributed Database Problem: A Case Study Using MySQL>
by I<Giuseppe Maxia> in B<Sys Admin> vol 13 num 8, Aug 2004, pp 29-40.
-See Lhttp://www.perlmonks.org/index.pl?node_id=381053 for details.
+See Lhttp://www.perlmonks.org/index.pl?node_id=381053> for details.
In this paper, three algorithms are presented.
The first one compares two tables with a checksum technique.
The second one finds UPDATE or INSERT differences based on a 2-level
@@ -852,7 +879,7 @@
=head1 SEE ALSO
-I<Michael Nacos> made a robust implementation Lhttp://pgdba.net/pg51g/
+I<Michael Nacos> made a robust implementation Lhttp://pgdba.net/pg51g/>
based on triggers. He also noted that although database contents are compared
by the algorithm, the database schema differences can I<also> be detected
by comparing system tables which describe them.
@@ -865,39 +892,77 @@
presented with a Java/JDBC/MySQL implementation of two algorithms, including
this one.
-Some products or projects implement such features, for instance:
-Lhttp://code.google.com/p/maatkit/ (mk-table-sync, by I<Baron Schwartz>,
-see Lhttp://tinyurl.com/mysql-data-diff-algorithm)
-(formerly Lhttp://sourceforge.net/projects/mysqltoolkit).
+I<Baron Schwartz> discusses comparison algorithms in an
+Lhttp://tinyurl.com/mysql-data-diff-algorithm>.
Some more links:
-Lhttp://www.altova.com/databasespy/,
-Lhttp://www.citrustechnology.com/solutions/data-comparison,
-Lhttp://comparezilla.sourceforge.net/,
-Lhttp://www.dbbalance.com/db_comparison.htm,
-Lhttp://www.dbsolo.com/datacomp.html,
-Lhttp://www.devart.com/dbforge/sql/datacompare/,
-Lhttp://www.dkgas.com/dbdiff.htm,
-Lhttp://www.programurl.com/software/sql-server-comparison.htm,
-Lhttp://www.red-gate.com/products/sql-development/sql-data-compare/,
-Lhttp://www.sql-server-tool.com/,
-Lhttp://www.webyog.com/,
-Lhttp://www.xsqlsoftware.com/Product/Sql_Data_Compare.aspx.
-If the tables to compare are in the same database, a simple SQL
-query can extract the differences. Assuming Tables I<T1> and I<T2>
-with primary key I<id> and non null contents I<data>, then their
-differences is summarized by the following query:
+=over 2
- SELECT COALESCE(T1.id, T2.id) AS key,
- CASE WHEN T1.id IS NULL THEN 'DELETE'
- WHEN T2.id IS NULL THEN 'INSERT'
- ELSE 'UPDATE'
- END AS operation
- FROM T1 FULL JOIN T2 USING (id)
- WHERE T1.id IS NULL -- DELETE
- OR T2.id IS NULL -- INSERT
- OR T1.data <> T2.data -- UPDATE
+=item *
+Lhttp://www.adeptsql.com/>
+
+=item *
+Lhttp://www.altova.com/databasespy/>
+
+=item *
+Lhttp://auisoft.com/sqlmerger/>
+
+=item *
+Lhttp://www.citrustechnology.com/solutions/data-comparison>
+
+=item *
+Lhttp://www.clevercomponents.com/products/dbcomparer/>
+
+=item *
+Lhttp://comparezilla.sourceforge.net/>
+
+=item *
+Lhttp://www.datanamic.com/datadiff/>
+
+=item *
+Lhttp://www.dbbalance.com/db_comparison.htm>
+
+=item *
+Lhttp://www.dbsolo.com/datacomp.html>
+
+=item *
+Lhttp://www.devart.com/dbforge/sql/datacompare/>
+
+=item *
+Lhttp://www.diffkit.org/>
+
+=item *
+Lhttp://www.dkgas.com/dbdiff.htm>
+
+=item *
+Lhttp://code.google.com/p/maatkit/>
+
+=item *
+Lhttp://dev.mysql.com/doc/workbench/en/mysqldbcompare.html>
+
+=item *
+Lhttp://www.programurl.com/software/sql-server-comparison.htm>
+
+=item *
+Lhttp://www.red-gate.com/products/sql-development/sql-data-compare/>
+
+=item *
+Lhttp://www.spectralcore.com/omegasync/>,
+
+=item *
+Lhttp://www.sqldelta.com/>
+
+=item *
+Lhttp://www.sql-server-tool.com/>
+
+=item *
+Lhttp://www.webyog.com/>
+
+=item *
+Lhttp://www.xsqlsoftware.com/Product/Sql_Data_Compare.aspx>
+
+=back
=head1 TESTS
@@ -909,37 +974,38 @@
=over 4
-=item I<sanity> validation - about 30 seconds & 30 runs
+=item I<sanity> - about 30 seconds & 30 runs
Run a comparison, synchronization & check for all databases combinaisons
and all working asynchronous queries and threading options.
-=item I<fast> validation - about 8 minutes & 300 runs
+=item I<fast> - about 5 minutes & 360 runs
Run 12 tests similar to the previous one with varrying options (number of
key columns, number of value columns, aggregate function, checksum function,
null handling, folding factor, table locking or not...).
-=item I<feature> validation - about 2 minutes & 168 or 348 runs
+=item I<feature> - about 3-4 minutes & 177 or 357 runs
Test various features:
I<cc> for checksum computation strategies,
-I<auto> for trigger-maintained checksums,
+I<auto> for trigger-maintained checksums on PostgreSQL,
I<empty> for corner cases with empty tables,
+I<quote> for table quoting,
I<engine> for InnoDB vs MyISAM MySQL backends,
I<width> for large columns,
I<nullkey> for possible NULL values in keys.
-=item I<release> validation - about 12 minutes & 816 runs
+=item I<release> - about 12 minutes & 876 runs
This is the I<feature> with two table sizes and the I<fast> validations.
-=item I<hour> validation - about 1 hour & 2400 runs
+=item I<hour> - about 1 hour & 2880 runs
A combination of 8 I<fast> validations with varrying table sizes and
difference ratio ranging from 0.1% to 99.9%.
-=item I<full> validation - about 6 hours, seldom run
+=item I<full> - about 6 hours & 16128 runs... seldom run
A combinatorial test involving numerous options: aggregation, checksums,
null handling, foldings, number of key and value attributes...
@@ -977,11 +1043,20 @@
=head1 VERSIONS
-See Lhttp://pgfoundry.org/projects/pg-comparator/ for the latest version.
-My web site for the tool is Lhttp://www.coelho.net/pg_comparator/.
+See Lhttp://pgfoundry.org/projects/pg-comparator/> for the latest
+version. My Lhttp://www.coelho.net/pg_comparator/> for the tool.
=over 4
+=item B 2012-10-28 (r1402)
+
+Fix an issue when table names were quoted, raised by I<Robert Coup>.
+Improved documentation, especially Section L"SEE ALSO">.
+More precise warning.
+Improved validation.
+The I<release> and I<hour> validations were run successfully
+on PostgreSQL 9.2.1 and MySQL 5.5.27.
+
=item B 2012-08-20 (r1375)
Synchronization now handles possible NULLs in keys.
@@ -1157,7 +1232,7 @@
=item B 2004-08-31 (r239)
-Project moved to Lhttp://pgfoundry.org/.
+Project moved to Lhttp://pgfoundry.org/>.
Use cksum8 checksum function by default.
Minor doc updates.
@@ -1198,8 +1273,8 @@
=cut
-my $script_version = '2.1.1 (r1375)';
-my $revision = '$Revision: 1375 $';
+my $script_version = '2.1.2 (r1402)';
+my $revision = '$Revision: 1401 $';
$revision =~ tr/0-9//cd;
################################################################# SOME DEFAULTS
@@ -1579,16 +1654,29 @@
####################################################################### QUERIES
-# returns (schema, table)
+# return unquoted (schema, table)
sub table_id($$)
{
my ($db, $table) = @_;
- # ??? quotes are kept
- # no 'schema' under MySQL... well, there is, but it is named 'database'...
- return (undef, $table) if $db eq 'mysql';
- # else $db eq 'pgsql'
- return split '\.', $table if $table =~ /\./;
- return ('', $table);
+ if ($db eq 'pgsql') {
+ # ??? this is not really a parser as it should be...
+ die "too many '.' in table $table" if $table =~ /\..*\./;
+ if ($table =~ /\./) {
+ my ($s, $t) = split '\.', $table;
+ return (db_unquote($db, $s), db_unquote($db, $t));
+ }
+ else {
+ $table = db_unquote($db, $table);
+ return ('', $table);
+ }
+ }
+ elsif ($db eq 'mysql')
+ {
+ $table = db_unquote($db, $table);
+ # no 'schema' under MySQL... well, there is one, but it is named 'database'.
+ return (undef, $table) if $db eq 'mysql';
+ }
+ die "unexpected db $db";
}
# get all attribute names, possibly ignoring a set of columns
@@ -2215,7 +2303,7 @@
#print "read 2: $kcs2, $tcs2", defined $key2? $key2:'', "\n";
}
}
- # nothing left on both side, merge is completed
+ # nothing left on both side, merge is complete
last unless defined $kcs1 or defined $kcs2;
#debug: verb 6, "merging: @r1 / @r2" if $verb>=6;
# else at least one of the list contains something
@@ -2404,7 +2492,8 @@
# it seems that statements are closed when playing with threads
# so we cannot use transactions.
$do_trans = 0, $changed++ unless $do_trans==0;
- warn "WARNING $changed options fixed for threads..." if $changed;
+ #warn "WARNING $changed options fixed for threads..." if $changed;
+ warn "WARNING option '--transaction' disabled for threads..." if $changed;
# note: do_lock & temp==0 seems a bad idea.
}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org