From: Warren Young Date: May 20 2009 3:05pm Subject: Re: problem when calling mysqlpp connection object connect function after calling disconnect List-Archive: http://lists.mysql.com/plusplus/8579 Message-Id: <5B82BBB5-8E60-4219-89BD-784ECC0225FB@etr-usa.com> MIME-Version: 1.0 (Apple Message framework v935.3) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit On May 20, 2009, at 9:04 AM, Warren Young wrote: > See the attached patch. Grrr, this list and attachments... Inline this time: Index: examples/dbinfo.cpp =================================================================== --- examples/dbinfo.cpp (revision 2515) +++ examples/dbinfo.cpp (working copy) @@ -170,10 +170,22 @@ try { // Connect to server, then dump a bunch of stuff we find on it + cout << "Up..." << endl; mysqlpp::Connection con(mysqlpp::examples::db_name, cmdline.server(), cmdline.user(), cmdline.pass()); + cout << "down..." << endl; + con.disconnect(); + cout << "and up again..." << endl; + con.connect(mysqlpp::examples::db_name, + cmdline.server(), cmdline.user(), cmdline.pass()); + cout << "Here we go!" << endl; show_mysql_version(con); show_databases(con); + cout << "\nBouncing again..." << endl; + con.disconnect(); + con.connect(mysqlpp::examples::db_name, + cmdline.server(), cmdline.user(), cmdline.pass()); + cout << "And last stage!" << endl; show_tables(con); } catch (const mysqlpp::BadQuery& er) {