Bug #16544 Wrong data size -> doesn't compile on all arches
Submitted: 16 Jan 2006 17:12 Modified: 16 May 2006 22:24
Reporter: [ name withheld ] Email Updates:
Status: Closed Impact on me:
Category:MySQL Query Browser Severity:S1 (Critical)
Version:1.1.18 OS:Linux (Debian/Linux)
Assigned to: Alfredo Kojima CPU Architecture:Any

[16 Jan 2006 17:12] [ name withheld ]
Original at: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=348181
Build logs: http://buildd.debian.org/fetch.php?&pkg=mysql-query-browser&ver=1.1.18-1&arch=ia64&stamp=1...

MGResultSetModel.cc: In member function 'virtual void MGResultSetModel::get_value_vfunc(const Gtk::TreeIter&, int, Glib::ValueBase&) const':
MGResultSetModel.cc:402: error: no matching function for call to 'MGResultSetModel::get_value(const Gtk::TreeIter&, int&, void*&, guint&) const'
MGResultSetModel.cc:259: note: candidates are: bool MGResultSetModel::get_value(const Gtk::TreeIter&, unsigned int, void*&, size_t&) const
make[4]: *** [MGResultSetModel.o] Error 1
make[4]: Leaving directory `/build/buildd/mysql-query-browser-1.1.18/mysql-quer
make[3]: *** [all] Error 2

The problem seems to be that it accepts a size_t, which is
an unsigned integer value, but depending on the arch it's
either an int or a long.  So a guint is the wrong type.

How to repeat:
see above

Suggested fix:
--- mysql-query-browser-1.1.18/mysql-query-browser/source/linux/MGResultSetModel.cc     2006-01-16 11:04:25.000000000 -0600
+++ mysql-query-browser-1.1.18.new/mysql-query-browser/source/linux/MGResultSetModel.cc 2006-01-16 10:58:54.000000000 -0600
@@ -384,7 +384,7 @@
       bool tmp= _disable_checks;
       gpointer data= NULL;
-      guint size= 0;
+      size_t size= 0;
       bool is_blob;
       switch (_resultset->columns[column/2].column_type)
[16 Jan 2006 17:13] [ name withheld ]

Attachment: diff (application/octet-stream, text), 474 bytes.

[16 Jan 2006 17:26] [ name withheld ]
The build log is not very useful :) This one might be better,

[26 Jan 2006 22:18] Jorge del Conde
Thanks fo ryour bug report
[16 May 2006 22:24] Alfredo Kojima
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at

Additional info:

Thank you for the patch!