Compiling mysql-gui-tools

Ouvir com webReader

Me and a colleague were missing some features in mysql-query-browser and am trying to have a look at them, since no one at MySQL AB is very interested in supporting it. So I thought I could have a look at it. System is Fedora 10 (still), and I use it mainly because it's small, simple to use, and it's GTK!

Setting up the building (compile) environment

Got the sources from the notes at MySQL Forge: Building MySQL GUI Tools on Linux:

  1. svn co mysql-gui-common
  2. svn co mysql-query-browser

You'll need a patch from Oden Eriksson attached to Bug #32184, or you can use the one from the RPM - otherwise you'll get the error error: ‘SigC’ has not been declared found on that bug report. I had to cut it for building from the SVN tree, and patched mysql-gui-common and mysql-query-browser independently (split the patch).

Building mysql-gui-common is straightforward:

  1. ./
  2. ./configure --prefix=/home/nmct/mysql-query-browser/fake 
  3. make -j 2
  4. make install

Building mysql-query-browser seems to need explicit pointing to the libgtkhtml besides the packages it mentions on error:

  1. [root@speedy ~]# rpm -qa | grep gtkhtml | grep devel
  2. gtkhtml3-devel-3.24.5-1.fc10.i386
  3. [root@speedy ~]# rpm -ql gtkhtml3-devel | grep pc
  4. /usr/lib/pkgconfig/gtkhtml-editor.pc
  5. /usr/lib/pkgconfig/libgtkhtml-3.14.pc

So it's easy to spot the needed --with switch. I had to apply several other patches that I just took source RPM. Most of them were applied with -p2.

  1. [nmct@speedy mysql-query-browser]$ patch -p 2 < mysql-gui-tools-5.0_p12-libsigc++-2.2.patch
  2. patching file source/linux/MQResultTab.h
  3. [nmct@speedy mysql-query-browser]$ patch -p2 < mysql-gui-tools-gtksourceview-cflags.patch
  4. patching file source/linux/
  5. Hunk #1 succeeded at 119 (offset 17 lines).
  6. [nmct@speedy mysql-query-browser]$ patch -p2 < gtk_deprecated_typedefs.patch
  7. patching file source/linux/gtksourceview/gtksourceview/
  8. ...
  10. ...
  11. ./configure --with-gtkhtml=libgtkhtml-3.14 --prefix=/home/nmct/mysql-query-browser/fake
  12. make -j 2
  13. make install

And that should be it - actually there was a path concatenation issue (looking for ...fake/usr/local/share...) which I quickly fixed with symlinks. After that, we should be ready to rock.

First patch: mysql_affected_rows

One of the features I miss most is the number of affected rows of some DML commands, such as UPDATE and INSERT. This was not easy to do in five minutes because of the UI split: mysql_affected_rows() doesn't seem to reach the GUI. So I've made a simple test, and succeeded.


This looks promising. I just set a global var, which will do for now. I still have to check for potential race conditions, but expect the polished patch, along with a new RPM for Fedora 10, at least, in the near future.

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

One Response to “Compiling mysql-gui-tools”

  1. [...] I tried massaging mysql-gui-tools a bit to see if I could make affected rows show up on modification DMLs, sucha as INSERT, DELETE and UPDATE. Here is a briefing about it, along with all the patches I [...]

Leave a Reply