|
|
Sponsor |
Re: Strange result from query::execute()?: msg#00052db.mysql.c++
Kevin Regan wrote: Should the following have different results? It's a known weakness in the library's current design. If we added an overload for execute(const std::string&), we'd run into ambiguous conversion problems. This Wishlist item is on point, if you'd like to tackle it: Currently, all overloads for Query's execute(), store() and use() methods eventually call the const char* version, which does the actual work of executing the query. This rules out query strings with embedded nulls, as you're likely to get with BLOB columns. Also, it means MySQL++ must scan the string for length in a few places. The C API isn't limited in this way if you use mysql_real_query(), but you need an accurate length value to call it. We could get that length with binary data if the end of the call chain were a std::string overload, but we can't do that easily because each of these functions has a version taking a SQLString (a subclass of std:string) for template queries. One way around this is to add a parallel set of functions (e.g. do_execute(), or execute_(), or some such) that take a single std::string, which are the new terminus of the call chain. Reimplement const char* versions in terms of these. Another way is to rename the template query versions (e.g. to execute_tq()) to avoid the overload conflict. With that done, we can use C API functions like mysql_real_query(), which can take binary data. Yet another way is to add a length parameter to the call chain end functions. And finally, we may be able to co-opt the first template query version of each of these functions, as it takes a single SQLString. If done right, the change can go into v2.1, as it wouldn't break the ABI. Otherwise, it'll have to wait for v3.0. -- MySQL++ Mailing List For list archives: http://lists.mysql.com/plusplus To unsubscribe: http://lists.mysql.com/plusplus?unsub=gcdmc-plusplus@xxxxxxxxxxx
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Stability problems with mysql++, Warren Young |
|---|---|
| Next by Date: | RE: Strange result from query::execute()?, Kevin Regan |
| Previous by Thread: | RE: Strange result from query::execute()?, Kevin Regan |
| Next by Thread: | RE: Strange result from query::execute()?, Kevin Regan |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |
Home | sitemap
| advertise | OSDir is
an inevitable website.
|