Let mysqlcc work correctly with mysql 5.x.
ok brad@, wilfried@
This commit is contained in:
parent
64522860ee
commit
e4091875b6
@ -1,10 +1,10 @@
|
||||
# $OpenBSD: Makefile,v 1.4 2005/09/07 00:41:04 brad Exp $
|
||||
# $OpenBSD: Makefile,v 1.5 2006/07/24 09:18:13 bernd Exp $
|
||||
|
||||
COMMENT= "GUI client for MySQL"
|
||||
|
||||
VERSION= 0.9.4
|
||||
DISTNAME= mysqlcc-${VERSION}-src
|
||||
PKGNAME= mysqlcc-${VERSION}p1
|
||||
PKGNAME= mysqlcc-${VERSION}p2
|
||||
CATEGORIES= databases
|
||||
|
||||
HOMEPAGE= http://mysql.com/products/mysqlcc/index.html
|
||||
|
25
databases/mysqlcc/patches/patch-src_CQueryWindow_cpp
Normal file
25
databases/mysqlcc/patches/patch-src_CQueryWindow_cpp
Normal file
@ -0,0 +1,25 @@
|
||||
$OpenBSD: patch-src_CQueryWindow_cpp,v 1.1 2006/07/24 09:18:13 bernd Exp $
|
||||
|
||||
Let mysqlcc work with mysql5. See: http://lists.mysql.com/gui-tools/1842
|
||||
|
||||
--- src/CQueryWindow.cpp.orig Sun Dec 14 00:10:44 2003
|
||||
+++ src/CQueryWindow.cpp Tue Jul 18 13:31:58 2006
|
||||
@@ -467,8 +467,16 @@ bool CQuerySet::execQuery(const QString
|
||||
if (explain_rows == 1)
|
||||
{
|
||||
explain_query->next(true);
|
||||
- default_table = explain_query->row(mysql()->mysql()->version().major >= 4 &&
|
||||
- mysql()->mysql()->version().minor >= 1 ? 2 : 0);
|
||||
+
|
||||
+ if (mysql()->mysql()->version().major >= 5 ||
|
||||
+ (mysql()->mysql()->version().major == 4 &&
|
||||
+ mysql()->mysql()->version().minor >= 1))
|
||||
+ {
|
||||
+ default_table = explain_query->row(2);
|
||||
+ }
|
||||
+ else
|
||||
+ default_table = explain_query->row(0);
|
||||
+
|
||||
if (!default_table.isEmpty())
|
||||
{
|
||||
finished_evt->read_only = default_database.isEmpty() ||
|
Loading…
Reference in New Issue
Block a user