[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnue/geas/src/objectstore compare.c
From: |
Reinhard Mueller |
Subject: |
gnue/geas/src/objectstore compare.c |
Date: |
Wed, 25 Jul 2001 07:53:11 -0700 |
CVSROOT: /cvsroot/gnue
Module name: gnue
Changes by: Reinhard Mueller <address@hidden> 01/07/25 07:53:11
Modified files:
geas/src/objectstore: compare.c
Log message:
Fixed quoting in comparsion.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/gnue/gnue/geas/src/objectstore/compare.c.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
Patches:
Index: gnue/geas/src/objectstore/compare.c
diff -u gnue/geas/src/objectstore/compare.c:1.2
gnue/geas/src/objectstore/compare.c:1.3
--- gnue/geas/src/objectstore/compare.c:1.2 Wed Jul 25 05:51:08 2001
+++ gnue/geas/src/objectstore/compare.c Wed Jul 25 07:53:11 2001
@@ -19,7 +19,7 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- $Id: compare.c,v 1.2 2001/07/25 12:51:08 reinhard Exp $
+ $Id: compare.c,v 1.3 2001/07/25 14:53:11 reinhard Exp $
*/
#include "config.h"
@@ -226,7 +226,7 @@
*
\* ------------------------------------------------------------------------- */
static DatabaseTable *
-find_database_table (DatabaseDefinition * def, const char *name, DBType db)
+find_database_table (DatabaseDefinition *def, const char *name, DBType db)
{
GList *l;
char *quoted;
@@ -237,13 +237,13 @@
l = def->tables;
while (l)
{
+ /* We have to quote this because the database can return the unquoted
+ names */
quoted = oql_quote_column (((DatabaseTable *) l->data)->name, NULL, db);
if (!g_strcasecmp (quoted, name))
{
- g_free (quoted);
return ((DatabaseTable *) l->data);
}
- g_free (quoted);
l = g_list_next (l);
}
return (NULL);
@@ -264,8 +264,10 @@
l = t->columns;
while (l)
{
+ /* We have to quote this because the database can return the unquoted
+ names */
quoted = oql_quote_column (NULL, ((DatabaseColumn *) l->data)->name, db);
- if (!g_strcasecmp (quoted, name) == 0)
+ if (!g_strcasecmp (quoted, name))
{
g_free (quoted);
return (l->data);
@@ -518,7 +520,7 @@
{
char *tmp;
- tmp = odl_mangle_qualified_name ((const char *) l->data);
+ tmp = oql_quote_column ((const char *) l->data, NULL, db);
t = find_database_table (database, tmp, db);
if (!t)
@@ -564,7 +566,8 @@
while (l)
{
char *tmp;
- tmp = odl_mangle_qualified_name ((const char *) l->data);
+
+ tmp = oql_quote_column ((const char *) l->data, NULL, db);
t = find_database_table (database, tmp, db);
g_free (tmp);
tmp = NULL;
@@ -580,7 +583,9 @@
while (l2)
{
odl_field *f = (odl_field *) l2->data;
- if (!find_databasetable_field (t, odl_field_get_name (f), db))
+ char *quoted = oql_quote_column (NULL, odl_field_get_name (f),
+ db);
+ if (!find_databasetable_field (t, quoted, db))
{
ch = find_named_change (c->adds, t->name);
if (!ch)
@@ -604,7 +609,7 @@
}
}
-
+ g_free (quoted);
l2 = g_list_next (l2);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnue/geas/src/objectstore compare.c,
Reinhard Mueller <=