Author: wyoung
Date: Sun Mar 23 07:45:26 2008
New Revision: 2262
URL: http://svn.gna.org/viewcvs/mysqlpp?rev=2262&view=rev
Log:
On second thought, just removing dbinfo and fieldinf examples from dtest
routine. They're mostly informational, and don't tell us much about
whether MySQL++ is working right.
Modified:
trunk/bmark.txt
trunk/dtest
trunk/examples/dbinfo.cpp
trunk/examples/fieldinf.cpp
Modified: trunk/bmark.txt
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/bmark.txt?rev=2262&r1=2261&r2=2262&view=diff
==============================================================================
--- trunk/bmark.txt (original)
+++ trunk/bmark.txt Sun Mar 23 07:45:26 2008
@@ -116,56 +116,6 @@
Pickle Relish
================ END tquery3 OUTPUT ================
----------------- BEGIN dbinfo OUTPUT ----------------
-
-
-================================= show tables
==================================
-Tables found: 4
- deadlock_test1
- deadlock_test2
- images
- stock
-
-=========================== describe deadlock_test1
============================
-|field ||type ||null||key||default |
- x int(11) YES NULL
-
-
-=========================== describe deadlock_test2
============================
-|field ||type ||null||key||default |
- x int(11) YES NULL
-
-
-=============================== describe images
================================
-|field ||type ||null||key||default |
- id int(10) unsigned NO PRI NULL
- data blob YES NULL
-
-
-================================ describe stock
================================
-|field ||type ||null||key||default |
- item char(30) NO NULL
- num bigint(20) NO NULL
- weight double NO NULL
- price decimal(6,2) NO NULL
- sdate date NO NULL
- description mediumtext YES NULL
-================ END dbinfo OUTPUT ================
-
----------------- BEGIN fieldinf OUTPUT ----------------
-Field SQL Type Equivalent C++ Type
-=========== =====================
=============================================
-item CHAR NOT NULL (25) n/a
-num BIGINT NOT NULL (11) n/a
-weight DOUBLE NOT NULL (8) n/a
-price DECIMAL NOT NULL (0) n/a
-sdate DATE NOT NULL (15) n/a
-description BLOB NULL (49) n/a
-
-SQL type of 'item' field most closely resembles the C++ string type.
-SQL type of 'description' field resembles a nullable variant of the C++ string
type.
-================ END fieldinf OUTPUT ================
-
---------------- BEGIN resetdb OUTPUT ----------------
Connecting to database server...
Dropping existing sample data tables...
Modified: trunk/dtest
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/dtest?rev=2262&r1=2261&r2=2262&view=diff
==============================================================================
--- trunk/dtest (original)
+++ trunk/dtest Sun Mar 23 07:45:26 2008
@@ -34,7 +34,7 @@
echo -n 'Running examples:'
for t in \
resetdb simple[0-9] store_if for_each multiquery tquery1 \
- resetdb tquery[2-9] dbinfo fieldinf \
+ resetdb tquery[2-9] \
resetdb ssqls[0-9]
do
if [ -x $t ]
Modified: trunk/examples/dbinfo.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/dbinfo.cpp?rev=2262&r1=2261&r2=2262&view=diff
==============================================================================
--- trunk/examples/dbinfo.cpp (original)
+++ trunk/examples/dbinfo.cpp Sun Mar 23 07:45:26 2008
@@ -36,11 +36,6 @@
#include <vector>
using namespace std;
-
-
-// Access the flag that's set when running under the dtest framework, so
-// we modify our output to be testable.
-extern bool dtest_mode;
// Insert a bar into the stream with the given query string centered
@@ -174,16 +169,10 @@
}
try {
- // Establish the connection to the database server.
+ // Connect to server, then dump a bunch of stuff we find on it
mysqlpp::Connection con(db, server, user, pass);
-
- // Show system-specific tests info when run by hand only.
- if (!dtest_mode) {
- show_mysql_version(con);
- show_databases(con);
- }
-
- // Show database info that's platform-independent
+ show_mysql_version(con);
+ show_databases(con);
show_tables(con);
}
catch (const mysqlpp::BadQuery& er) {
Modified: trunk/examples/fieldinf.cpp
URL:
http://svn.gna.org/viewcvs/mysqlpp/trunk/examples/fieldinf.cpp?rev=2262&r1=2261&r2=2262&view=diff
==============================================================================
--- trunk/examples/fieldinf.cpp (original)
+++ trunk/examples/fieldinf.cpp Sun Mar 23 07:45:26 2008
@@ -34,11 +34,6 @@
using namespace std;
-// Access the flag that's set when running under the dtest framework, so
-// we modify our output to be testable.
-extern bool dtest_mode;
-
-
int
main(int argc, char *argv[])
{
@@ -71,7 +66,7 @@
for (size_t i = 0; i < res.field_names()->size(); i++) {
// Suppress C++ type name outputs when run under dtest,
// as they're system-specific.
- const char* cname = dtest_mode ? "n/a" :
res.field_type(i).name();
+ const char* cname = res.field_type(i).name();
mysqlpp::FieldTypes::value_type ft = res.field_type(i);
ostringstream os;
os << ft.sql_name() << " (" << ft.id() << ')';
_______________________________________________
Mysqlpp-commits mailing list
[email protected]
https://mail.gna.org/listinfo/mysqlpp-commits