Author: mysqlpp
Date: Sun Feb 7 13:28:13 2010
New Revision: 2622
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2622&view=rev
Log:
- Added -f N support to lib/*.pl to allow overriding the default limit
of 25 fields for tqueries and SSQLSes.
- Added --with-field-limit option to configure script so you can give
both -f options at once during the build process.
Modified:
trunk/Wishlist
trunk/configure.ac
trunk/lib/querydef.pl
trunk/lib/ssqls.pl
Modified: trunk/Wishlist
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/Wishlist?rev=2622&r1=2621&r2=2622&view=diff
==============================================================================
--- trunk/Wishlist (original)
+++ trunk/Wishlist Sun Feb 7 13:28:13 2010
@@ -35,13 +35,7 @@
v3.1 Tentative Plan
-------------------
- o Add --max-fields configure script option, and corresponding -n
- option to ssqls.pl and querydef.pl. Lets the maximum number
- of fields be set for SSQLS and tqueries at library build time.
- Especially convenient for people making binary packages for
- OS distros, since, knowing the target platform, they can set
- a higher known-good limit. Ensure "make rpm" process doesn't
- override this.
+ o Ensure "make rpm" process doesn't override --with-field-limit
o Check that it works with Connector/C and MySQL 5.1
Modified: trunk/configure.ac
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/configure.ac?rev=2622&r1=2621&r2=2622&view=diff
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Sun Feb 7 13:28:13 2010
@@ -52,6 +52,20 @@
fi
+# Let caller provide -f to lib/*.pl scripts in a uniform way
+AC_ARG_WITH([field-limit],
+ AS_HELP_STRING([--with-field-limit=<n>],
+ [set max template query and SSQLS field count]),
+ [], [])
+if test -n "$with_field_limit"
+then
+ ( cd lib ;
+ ./querydef.pl -f $with_field_limit ;
+ ./ssqls.pl -f $with_field_limit
+ )
+fi
+
+
# Try to find local getopt(); if we fail, we'll use the one in lib/cmdline.*
AC_CHECK_FUNC(getopt,
[AC_DEFINE(HAVE_POSIX_GETOPT, [], Define if getopt() is
available in unistd.h)],
Modified: trunk/lib/querydef.pl
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/querydef.pl?rev=2622&r1=2621&r2=2622&view=diff
==============================================================================
--- trunk/lib/querydef.pl (original)
+++ trunk/lib/querydef.pl Sun Feb 7 13:28:13 2010
@@ -6,7 +6,7 @@
# number limits the number of parameters a MySQL++ template query can
# accept. This value can be changed from its default, below.
#
-# Copyright (c) 2006-2009 by Educational Technology Resources, Inc.
+# Copyright (c) 2006-2010 by Educational Technology Resources, Inc.
# Others may also hold copyrights on code in this file. See the CREDITS
# file in the top directory of the distribution for details.
#
@@ -39,6 +39,11 @@
# No user-serviceable parts below.
use strict;
+use Getopt::Std;
+
+our $opt_f;
+getopts('f:') or die "usage: $0 [-f fields]\n\n";
+$max_parameters = int($opt_f) if defined $opt_f;
open (OUT, ">querydef.h");
Modified: trunk/lib/ssqls.pl
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/lib/ssqls.pl?rev=2622&r1=2621&r2=2622&view=diff
==============================================================================
--- trunk/lib/ssqls.pl (original)
+++ trunk/lib/ssqls.pl Sun Feb 7 13:28:13 2010
@@ -5,7 +5,7 @@
# functions and classes, varying only in trivial ways.
#
# Copyright (c) 1998 by Kevin Atkinson, (c) 1999-2001 by MySQL AB, and
-# (c) 2004-2009 by Educational Technology Resources, Inc. Others may
+# (c) 2004-2010 by Educational Technology Resources, Inc. Others may
# also hold copyrights on code in this file. See the CREDITS.txt file
# in the top directory of the distribution for details.
#
@@ -46,6 +46,11 @@
# No user-serviceable parts below.
use strict;
+use Getopt::Std;
+
+our $opt_f;
+getopts('f:') or die "usage: $0 [-f fields]\n\n";
+$max_data_members = int($opt_f) if defined $opt_f;
open (OUT, ">ssqls.h");
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits