List:MySQL++« Previous MessageNext Message »
From:Michael Hanselmann Date:March 26 2007 8:25pm
Subject:Re: Conceptual issue in mysql++ 2.2.x (use(), store(), execute())
View as plain text  
Hello Warren

On Mon, Mar 26, 2007 at 06:28:13AM -0600, Warren Young wrote:
> Yes, we know, it's already fixed in svn.  You can read about the fix in 
> this message:
> How soon?  Sooner if you test it and report favorably.  :)

Unfortunately, I've got negative feedback for you.

Query template:
  SELECT jobid, owner, command, minute, hour, day_of_month, month,
  day_of_week, mailto FROM job WHERE owner = %0q:owner ORDER BY jobid

Query as it should be executed:
  SELECT jobid, owner, command, minute, hour, day_of_month, month,
  day_of_week, mailto FROM job WHERE owner = 'michael' ORDER BY jobid

And here's the executed query with current SVN of mysql++:
  SELECT jobid, owner, command, minute, hour, day_of_month, month,
  day_of_week, mailto FROM job WHERE owner = 'SELECT jobid, owner,
  command,\n minute, hour, day_of_month, month, day_of_week,\n mailto\n
  FROM job\n WHERE owner = \'michael\'\n ORDER BY jobid' ORDER BY jobid

C++ code:
  mysqlpp::Query query = _conn.query();
  /* Get query string */
  query << config().lookup<std::string>("global.mysql.query.jobs-by-user");
  query.parse();

  /* filter.owner() returns std::string */
  query.def["owner"] = filter.owner();

  mysqlpp::ResUse res(query.use());

Do you have an idea why this happens?

Greets,
Michael

-- 
Gentoo Linux developer, http://hansmi.ch/, http://forkbomb.ch/

Attachment: [application/pgp-signature]
Thread
Conceptual issue in mysql++ 2.2.x (use(), store(), execute())Michael Hanselmann25 Mar
  • Re: Conceptual issue in mysql++ 2.2.x (use(), store(), execute())Warren Young26 Mar
    • Re: Conceptual issue in mysql++ 2.2.x (use(), store(), execute())Michael Hanselmann26 Mar
      • Re: Conceptual issue in mysql++ 2.2.x (use(), store(), execute())Warren Young28 Mar
        • Re: Conceptual issue in mysql++ 2.2.x (use(), store(), execute())Warren Young28 Mar
        • Re: Conceptual issue in mysql++ 2.2.x (use(), store(), execute())Michael Hanselmann31 Mar
          • Re: Conceptual issue in mysql++ 2.2.x (use(), store(), execute())Warren Young2 Apr
            • Re: Conceptual issue in mysql++ 2.2.x (use(), store(), execute())Michael Hanselmann2 Apr
              • Re: Conceptual issue in mysql++ 2.2.x (use(), store(), execute())Warren Young3 Apr
                • Re: Conceptual issue in mysql++ 2.2.x (use(), store(), execute())Michael Hanselmann4 Apr
Re: Conceptual issue in mysql++ 2.2.x (use(), store(), execute())Warren Young29 Mar