libgda r3150 - in trunk: . doc/C doc/C/tmpl libgda libgda/sqlite po providers/mysql providers/postgres tests/meta-store tests/parser tools
- From: vivien svn gnome org
- To: svn-commits-list gnome org
- Subject: libgda r3150 - in trunk: . doc/C doc/C/tmpl libgda libgda/sqlite po providers/mysql providers/postgres tests/meta-store tests/parser tools
- Date: Wed, 14 May 2008 20:39:02 +0100 (BST)
Author: vivien
Date: Wed May 14 19:39:01 2008
New Revision: 3150
URL: http://svn.gnome.org/viewvc/libgda?rev=3150&view=rev
Log:
2008-05-14 Vivien Malerba <malerba gnome-db org>
* libgda/gda-config.c: automatically correct spelling mistakes in
provider name, and correctly alphabetically order the DSN list
* libgda/gda-easy.c: don't warn if database name is NULL in gda_prepare_create_database()
and gda_prepare_drop_database()
* providers/mysql/gda-mysql.h: reset the provider's name to "MySQL"
* doc/C/Makefile.am:
* providers/mysql/Makefile.am: fixed "make distcheck" problem
* providers/postgres/postgres_specs_dsn.xml.in: doc improvement
* libgda/gda-connection.h: removed GDA_CONNECTION_FEATURE_XML_QUERIES and added
GDA_CONNECTION_FEATURE_LAST to set the last feature ID
* tests/meta-store/common.c: removed some useless test
* tests/parser/check_normalization.c:
* tests/parser/check_validation.c:
* tests/parser/check_dml_comp.c:
* tests/parser/Makefile.am: correctly set up the test environment so that "make distcheck"
works
* libgda/sqlite/gda-sqlite-provider.c: applied patch by Carlos Savoretti to handle
the G_TYPE_LONG type
* libgda/gda-statement.[ch]: added a GDA_STATEMENT_SQL_PARAMS_AS_UQMARK flag to
render variables in statements as a single "?"
* configure.in:
* tools/command-exec.c:
* tools/gda-sql.c:
* tools/tools-input.c: READLINE and HISTORY libraries detection made easier
Modified:
trunk/ChangeLog
trunk/configure.in
trunk/doc/C/Makefile.am
trunk/doc/C/tmpl/gda-connection.sgml
trunk/doc/C/tmpl/gda-sql-statement.sgml
trunk/doc/C/tmpl/gda-statement.sgml
trunk/doc/C/tmpl/gda-vconnection-data-model.sgml
trunk/libgda/gda-config.c
trunk/libgda/gda-connection.h
trunk/libgda/gda-easy.c
trunk/libgda/gda-init.c
trunk/libgda/gda-statement.c
trunk/libgda/gda-statement.h
trunk/libgda/sqlite/gda-sqlite-provider.c
trunk/po/POTFILES.in
trunk/providers/mysql/Makefile.am
trunk/providers/mysql/gda-mysql.h
trunk/providers/postgres/postgres_specs_dsn.xml.in
trunk/tests/meta-store/common.c
trunk/tests/parser/Makefile.am
trunk/tests/parser/check_dml_comp.c
trunk/tests/parser/check_normalization.c
trunk/tests/parser/check_validation.c
trunk/tools/command-exec.c
trunk/tools/gda-sql.c
trunk/tools/tools-input.c
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Wed May 14 19:39:01 2008
@@ -1075,22 +1075,19 @@
else
AC_CHECK_LIB(readline, readline, READLINE_LIB='-lreadline -lcurses', [], -lcurses)
fi
+if test ! x"$READLINE_LIB" = x ; then
+ AC_DEFINE(HAVE_READLINE)
+fi
AM_CONDITIONAL(READLINE_LIB, test ! "x$READLINE_LIB" = "x")
AC_SUBST(READLINE_LIB)
AC_CHECK_LIB(history,add_history,HISTORY_LIB=-lhistory)
+if test ! x"$HISTORY_LIB" = x ; then
+ AC_DEFINE(HAVE_HISTORY)
+fi
AM_CONDITIONAL(HISTORY_LIB, test ! "x$HISTORY_LIB" = "x")
AC_SUBST(HISTORY_LIB)
-AC_CHECK_HEADERS([readline/readline.h readline/history.h],,
- CONFIG_TOOL_HEADERS="wrong" && \
- echo Not building gda-config-tool)
-AM_CONDITIONAL(BUILD_CONFIG_TOOL,
- (test ! "x$CONFIG_TOOL_HEADERS" = "xwrong" -a \
- ! "x$READLINE_LIB" = "x" -a \
- ! "x$HISTORY_LIB" = "x" ))
-AC_SUBST(BUILD_CONFIG_TOOL)
-
AC_SUBST(LIB_PREFIX)
AC_SUBST(LIB_SONAME)
Modified: trunk/doc/C/Makefile.am
==============================================================================
--- trunk/doc/C/Makefile.am (original)
+++ trunk/doc/C/Makefile.am Wed May 14 19:39:01 2008
@@ -59,7 +59,7 @@
# Other files to distribute
EXTRA_DIST += examples/full_example.c installation.xml limitations.xml migration.xml migration2.xml \
server-operation.xml gettingstarted.xml virtual.xml virtual-notice.xml store-meta-type.xml \
- prov-writing.xml i_s_doc.xml \
+ prov-writing.xml i_s_doc.xml howto.xml \
DataModels.svg \
architecture.svg parts.svg stmt-unknown.svg stmt-select.svg stmt-insert1.svg stmt-insert2.svg \
stmt-update.svg stmt-compound.svg information_schema.svg
Modified: trunk/doc/C/tmpl/gda-connection.sgml
==============================================================================
--- trunk/doc/C/tmpl/gda-connection.sgml (original)
+++ trunk/doc/C/tmpl/gda-connection.sgml Wed May 14 19:39:01 2008
@@ -492,7 +492,7 @@
@GDA_CONNECTION_FEATURE_UPDATABLE_CURSOR:
@GDA_CONNECTION_FEATURE_USERS:
@GDA_CONNECTION_FEATURE_VIEWS:
- GDA_CONNECTION_FEATURE_XML_QUERIES:
+ GDA_CONNECTION_FEATURE_LAST:
<!-- ##### FUNCTION gda_connection_supports_feature ##### -->
<para>
Modified: trunk/doc/C/tmpl/gda-sql-statement.sgml
==============================================================================
--- trunk/doc/C/tmpl/gda-sql-statement.sgml (original)
+++ trunk/doc/C/tmpl/gda-sql-statement.sgml Wed May 14 19:39:01 2008
@@ -645,50 +645,6 @@
@case_s: not %NULL if expression is a CASE WHEN ... expression
@cast_as: not %NULL if expression must be cast to another data type
-<!-- ##### FUNCTION gda_sql_expr_new ##### -->
-<para>
-
-</para>
-
- parent:
- Returns:
-
-
-<!-- ##### FUNCTION gda_sql_expr_free ##### -->
-<para>
-
-</para>
-
- expr:
-
-
-<!-- ##### FUNCTION gda_sql_expr_copy ##### -->
-<para>
-
-</para>
-
- expr:
- Returns:
-
-
-<!-- ##### FUNCTION gda_sql_expr_serialize ##### -->
-<para>
-
-</para>
-
- expr:
- Returns:
-
-
-<!-- ##### FUNCTION gda_sql_expr_take_select ##### -->
-<para>
-
-</para>
-
- expr:
- stmt:
-
-
<!-- ##### STRUCT GdaSqlParamSpec ##### -->
<para>
@@ -778,62 +734,12 @@
This structure represents the name of a table's field.
</para>
- any: inheritance structure
- field_name: a table's field name, in the form [[[catalog.]schema.]table.]field_name
- validity_meta_table_column:
-
-<!-- ##### FUNCTION gda_sql_field_new ##### -->
-<para>
-
-</para>
-
- parent:
- Returns:
-
-
-<!-- ##### FUNCTION gda_sql_field_free ##### -->
-<para>
-
-</para>
-
- field:
-
-
-<!-- ##### FUNCTION gda_sql_field_copy ##### -->
-<para>
-
-</para>
-
- field:
- Returns:
-
-
-<!-- ##### FUNCTION gda_sql_field_serialize ##### -->
-<para>
-
-</para>
-
- field:
- Returns:
-
-
-<!-- ##### FUNCTION gda_sql_field_take_name ##### -->
-<para>
-
-</para>
-
- field:
- value:
-
<!-- ##### STRUCT GdaSqlTable ##### -->
<para>
This structure represents the name of a table.
</para>
- any: inheritance structure
- table_name: a table's name, in the form [[catalog.]schema.]table
- validity_meta_object:
<!-- ##### FUNCTION gda_sql_table_new ##### -->
<para>
Modified: trunk/doc/C/tmpl/gda-statement.sgml
==============================================================================
--- trunk/doc/C/tmpl/gda-statement.sgml (original)
+++ trunk/doc/C/tmpl/gda-statement.sgml Wed May 14 19:39:01 2008
@@ -72,6 +72,7 @@
@GDA_STATEMENT_SQL_PARAMS_AS_COLON: use the :<param_name> syntax for each parameter, replacing any char not in [0-9A-Za-z] by '_'
@GDA_STATEMENT_SQL_PARAMS_AS_DOLLAR: use the $<param_number> syntax for each parameter (starting numbering at 1)
@GDA_STATEMENT_SQL_PARAMS_AS_QMARK: use the ?<param_number> syntax for each parameter (starting numbering at 1)
+ GDA_STATEMENT_SQL_PARAMS_AS_UQMARK: use the ? syntax for each parameter (no numbering)
<!-- ##### ENUM GdaStatementModelUsage ##### -->
<para>
Modified: trunk/doc/C/tmpl/gda-vconnection-data-model.sgml
==============================================================================
--- trunk/doc/C/tmpl/gda-vconnection-data-model.sgml (original)
+++ trunk/doc/C/tmpl/gda-vconnection-data-model.sgml Wed May 14 19:39:01 2008
@@ -25,16 +25,6 @@
</para>
-<!-- ##### USER_FUNCTION GdaVConnectionDataModelFunc ##### -->
-<para>
-
-</para>
-
- model:
- table_name:
- data:
-
-
<!-- ##### STRUCT GdaVconnectionDataModelSpec ##### -->
<para>
Modified: trunk/libgda/gda-config.c
==============================================================================
--- trunk/libgda/gda-config.c (original)
+++ trunk/libgda/gda-config.c Wed May 14 19:39:01 2008
@@ -258,8 +258,14 @@
}
if (!strcmp ((gchar *) prop, "DSN"))
info->cnc_string = g_strdup ((gchar *)value);
- else if (!strcmp ((gchar *) prop, "Provider"))
- info->provider = g_strdup ((gchar *)value);
+ else if (!strcmp ((gchar *) prop, "Provider")) {
+ GdaProviderInfo *pinfo;
+ pinfo = gda_config_get_provider_info ((gchar *)value);
+ if (pinfo)
+ info->provider = g_strdup (pinfo->id);
+ else
+ info->provider = g_strdup ((gchar *)value);
+ }
else if (!strcmp ((gchar *) prop, "Description"))
info->description = g_strdup ((gchar *)value);
if (!strcmp ((gchar *) prop, "Auth"))
@@ -1037,6 +1043,11 @@
if (!unique_instance->priv->prov_list)
load_all_providers ();
+ if (!g_ascii_strcasecmp (provider_name, "MS Access")) {
+ GDA_CONFIG_UNLOCK ();
+ return gda_config_get_provider_info ("MSAccess");
+ }
+
for (list = unique_instance->priv->prov_list; list; list = list->next)
if (!g_ascii_strcasecmp (((GdaProviderInfo*) list->data)->id, provider_name)) {
GDA_CONFIG_UNLOCK ();
@@ -1381,8 +1392,16 @@
if (infoa) {
if (!infob)
return 1;
- else
- return strcmp (infoa->name, infob->name);
+ else {
+ gchar *u8a, *u8b;
+ gint res;
+ u8a = g_utf8_casefold (infoa->name, -1);
+ u8b = g_utf8_casefold (infob->name, -1);
+ res = strcmp (u8a, u8b);
+ g_free (u8a);
+ g_free (u8b);
+ return res;
+ }
}
else
return -1;
Modified: trunk/libgda/gda-connection.h
==============================================================================
--- trunk/libgda/gda-connection.h (original)
+++ trunk/libgda/gda-connection.h Wed May 14 19:39:01 2008
@@ -98,7 +98,8 @@
GDA_CONNECTION_FEATURE_UPDATABLE_CURSOR,
GDA_CONNECTION_FEATURE_USERS,
GDA_CONNECTION_FEATURE_VIEWS,
- GDA_CONNECTION_FEATURE_XML_QUERIES
+
+ GDA_CONNECTION_FEATURE_LAST
} GdaConnectionFeature;
typedef enum {
@@ -152,7 +153,7 @@
const gchar *gda_connection_get_dsn (GdaConnection *cnc);
gboolean gda_connection_set_dsn (GdaConnection *cnc, const gchar *datasource);
const gchar *gda_connection_get_cnc_string (GdaConnection *cnc);
-const gchar *gda_connection_get_authentication (GdaConnection *cnc);
+const gchar *gda_connection_get_authentication (GdaConnection *cnc);
void gda_connection_add_event (GdaConnection *cnc, GdaConnectionEvent *event);
GdaConnectionEvent *gda_connection_add_event_string (GdaConnection *cnc, const gchar *str, ...);
Modified: trunk/libgda/gda-easy.c
==============================================================================
--- trunk/libgda/gda-easy.c (original)
+++ trunk/libgda/gda-easy.c Wed May 14 19:39:01 2008
@@ -56,7 +56,6 @@
GdaServerProvider *prov;
g_return_val_if_fail (provider && *provider, NULL);
- g_return_val_if_fail (db_name && *db_name, NULL);
prov = gda_config_get_provider_object (provider, error);
if (prov) {
@@ -123,7 +122,6 @@
GdaServerProvider *prov;
g_return_val_if_fail (provider && *provider, NULL);
- g_return_val_if_fail (db_name && *db_name, NULL);
prov = gda_config_get_provider_object (provider, error);
if (prov) {
Modified: trunk/libgda/gda-init.c
==============================================================================
--- trunk/libgda/gda-init.c (original)
+++ trunk/libgda/gda-init.c Wed May 14 19:39:01 2008
@@ -96,8 +96,11 @@
gda_gbr_init ();
/* array DTD */
+ gda_array_dtd = NULL;
file = gda_gbr_get_file_path (GDA_DATA_DIR, LIBGDA_ABI_NAME, "dtd", "libgda-array.dtd", NULL);
- gda_array_dtd = xmlParseDTD (NULL, (xmlChar*)file);
+ if (g_file_test (file, G_FILE_TEST_EXISTS))
+ gda_array_dtd = xmlParseDTD (NULL, (xmlChar*)file);
+
if (!gda_array_dtd) {
if (g_getenv ("GDA_TOP_SRC_DIR")) {
g_free (file);
@@ -114,8 +117,11 @@
g_free (file);
/* paramlist DTD */
+ gda_paramlist_dtd = NULL;
file = gda_gbr_get_file_path (GDA_DATA_DIR, LIBGDA_ABI_NAME, "dtd", "libgda-paramlist.dtd", NULL);
- gda_paramlist_dtd = xmlParseDTD (NULL, (xmlChar*)file);
+ if (g_file_test (file, G_FILE_TEST_EXISTS))
+ gda_paramlist_dtd = xmlParseDTD (NULL, (xmlChar*)file);
+
if (!gda_paramlist_dtd) {
if (g_getenv ("GDA_TOP_SRC_DIR")) {
g_free (file);
@@ -132,8 +138,11 @@
g_free (file);
/* server operation DTD */
+ gda_server_op_dtd = NULL;
file = gda_gbr_get_file_path (GDA_DATA_DIR, LIBGDA_ABI_NAME, "dtd", "libgda-server-operation.dtd", NULL);
- gda_server_op_dtd = xmlParseDTD (NULL, (xmlChar*)file);
+ if (g_file_test (file, G_FILE_TEST_EXISTS))
+ gda_server_op_dtd = xmlParseDTD (NULL, (xmlChar*)file);
+
if (!gda_server_op_dtd) {
if (g_getenv ("GDA_TOP_SRC_DIR")) {
g_free (file);
Modified: trunk/libgda/gda-statement.c
==============================================================================
--- trunk/libgda/gda-statement.c (original)
+++ trunk/libgda/gda-statement.c Wed May 14 19:39:01 2008
@@ -1129,7 +1129,8 @@
GDA_STATEMENT_SQL_PARAMS_SHORT |
GDA_STATEMENT_SQL_PARAMS_AS_COLON |
GDA_STATEMENT_SQL_PARAMS_AS_DOLLAR |
- GDA_STATEMENT_SQL_PARAMS_AS_QMARK))
+ GDA_STATEMENT_SQL_PARAMS_AS_QMARK |
+ GDA_STATEMENT_SQL_PARAMS_AS_UQMARK))
render_pspec = TRUE;
if (is_default)
@@ -1151,7 +1152,9 @@
}
if (!h &&
(!render_pspec ||
- (context->flags & (GDA_STATEMENT_SQL_PARAMS_AS_DOLLAR | GDA_STATEMENT_SQL_PARAMS_AS_QMARK)))) {
+ (context->flags & (GDA_STATEMENT_SQL_PARAMS_AS_DOLLAR |
+ GDA_STATEMENT_SQL_PARAMS_AS_QMARK |
+ GDA_STATEMENT_SQL_PARAMS_AS_UQMARK)))) {
/* a real value is needed or @context->params_used needs to be correct, and no GdaHolder found */
g_set_error (error, GDA_STATEMENT_ERROR, GDA_STATEMENT_PARAM_ERROR,
_("Missing parameter '%s'"), pspec->name);
@@ -1196,11 +1199,15 @@
g_string_append_printf (string, ":%s", str);
g_free (str);
}
- else if (context->flags & (GDA_STATEMENT_SQL_PARAMS_AS_DOLLAR | GDA_STATEMENT_SQL_PARAMS_AS_QMARK)) {
+ else if (context->flags & (GDA_STATEMENT_SQL_PARAMS_AS_DOLLAR |
+ GDA_STATEMENT_SQL_PARAMS_AS_QMARK |
+ GDA_STATEMENT_SQL_PARAMS_AS_UQMARK)) {
if (context->flags & GDA_STATEMENT_SQL_PARAMS_AS_DOLLAR)
g_string_append_printf (string, "$%d", g_slist_length (context->params_used));
- else
+ else if (context->flags & GDA_STATEMENT_SQL_PARAMS_AS_QMARK)
g_string_append_printf (string, "?%d", g_slist_length (context->params_used));
+ else
+ g_string_append_c (string, '?');
}
else {
GdaStatementSqlFlag flag = context->flags;
Modified: trunk/libgda/gda-statement.h
==============================================================================
--- trunk/libgda/gda-statement.h (original)
+++ trunk/libgda/gda-statement.h Wed May 14 19:39:01 2008
@@ -60,7 +60,8 @@
GDA_STATEMENT_SQL_PARAMS_SHORT = 1 << 2,
GDA_STATEMENT_SQL_PARAMS_AS_COLON = 1 << 3,
GDA_STATEMENT_SQL_PARAMS_AS_DOLLAR = 1 << 4,
- GDA_STATEMENT_SQL_PARAMS_AS_QMARK = 1 << 5
+ GDA_STATEMENT_SQL_PARAMS_AS_QMARK = 1 << 5,
+ GDA_STATEMENT_SQL_PARAMS_AS_UQMARK = 1 << 6
} GdaStatementSqlFlag;
/* struct for the object's data */
Modified: trunk/libgda/sqlite/gda-sqlite-provider.c
==============================================================================
--- trunk/libgda/sqlite/gda-sqlite-provider.c (original)
+++ trunk/libgda/sqlite/gda-sqlite-provider.c Wed May 14 19:39:01 2008
@@ -1922,6 +1922,8 @@
g_value_get_string (value), -1, SQLITE_TRANSIENT);
else if (G_VALUE_TYPE (value) == G_TYPE_INT)
sqlite3_bind_int (ps->sqlite_stmt, i, g_value_get_int (value));
+ else if (G_VALUE_TYPE (value) == G_TYPE_LONG)
+ sqlite3_bind_int (ps->sqlite_stmt, i, g_value_get_long (value));
else if (G_VALUE_TYPE (value) == G_TYPE_DOUBLE)
sqlite3_bind_double (ps->sqlite_stmt, i, g_value_get_double (value));
else if (G_VALUE_TYPE (value) == G_TYPE_FLOAT)
Modified: trunk/po/POTFILES.in
==============================================================================
--- trunk/po/POTFILES.in (original)
+++ trunk/po/POTFILES.in Wed May 14 19:39:01 2008
@@ -3,6 +3,7 @@
libgda/gda-connection.c
libgda/gda-connection-event.c
libgda/gda-data-access-wrapper.c
+libgda/gda-data-comparator.c
libgda/gda-data-model-array.c
libgda/gda-data-model-bdb.c
libgda/gda-data-model.c
@@ -64,6 +65,23 @@
providers/mdb/gda-mdb-provider.c
providers/mdb/libmain.c
providers/mdb/mdb_specs_dsn.xml.in
+providers/mysql/gda-mysql-ddl.c
+providers/mysql/gda-mysql-provider.c
+providers/mysql/gda-mysql-recordset.c
+providers/mysql/gda-mysql-util.c
+providers/mysql/libmain.c
+providers/mysql/mysql_specs_add_column.xml.in
+providers/mysql/mysql_specs_create_db.xml.in
+providers/mysql/mysql_specs_create_index.xml.in
+providers/mysql/mysql_specs_create_table.xml.in
+providers/mysql/mysql_specs_create_view.xml.in
+providers/mysql/mysql_specs_drop_column.xml.in
+providers/mysql/mysql_specs_drop_db.xml.in
+providers/mysql/mysql_specs_drop_index.xml.in
+providers/mysql/mysql_specs_drop_table.xml.in
+providers/mysql/mysql_specs_drop_view.xml.in
+providers/mysql/mysql_specs_dsn.xml.in
+providers/mysql/mysql_specs_rename_table.xml.in
providers/postgres/gda-postgres-blob-op.c
providers/postgres/gda-postgres-ddl.c
providers/postgres/gda-postgres-handler-bin.c
Modified: trunk/providers/mysql/Makefile.am
==============================================================================
--- trunk/providers/mysql/Makefile.am (original)
+++ trunk/providers/mysql/Makefile.am Wed May 14 19:39:01 2008
@@ -12,10 +12,10 @@
# parser generation
parser.c parser.h: parser.y $(top_builddir)/libgda/sql-parser/lemon$(EXEEXT_FOR_BUILD)
- - $(top_builddir)/libgda/sql-parser/lemon$(EXEEXT_FOR_BUILD) parser.y
+ - $(top_builddir)/libgda/sql-parser/lemon$(EXEEXT_FOR_BUILD) -q -d $(srcdir)/parser.y $(top_srcdir)/libgda/sql-parser/lempar.c
gen_def$(EXEEXT_FOR_BUILD): gen_def.c
- $(CC_FOR_BUILD) -o gen_def$(EXEEXT_FOR_BUILD) -DIMPOSED_HEADER=\""$(top_builddir)/libgda/sql-parser/parser_tokens.h"\" gen_def.c
+ $(CC_FOR_BUILD) -o gen_def$(EXEEXT_FOR_BUILD) -DIMPOSED_HEADER=\""$(top_srcdir)/libgda/sql-parser/parser_tokens.h"\" $(srcdir)/gen_def.c
mysql_token_types.h: gen_def$(EXEEXT_FOR_BUILD) parser.h
./gen_def$(EXEEXT_FOR_BUILD) > mysql_token_types.h
@@ -72,7 +72,7 @@
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libgda-mysql-4.0.pc
-EXTRA_DIST = $(xml_in_files) libgda-mysql-4.0.pc.in parser.y
+EXTRA_DIST = $(xml_in_files) libgda-mysql-4.0.pc.in parser.y gen_def.c
DISTCLEANFILES = $(xml_DATA)
CLEANFILES = parser.h parser.c parser.out mysql_token_types.h gen_def$(EXEEXT_FOR_BUILD)
Modified: trunk/providers/mysql/gda-mysql.h
==============================================================================
--- trunk/providers/mysql/gda-mysql.h (original)
+++ trunk/providers/mysql/gda-mysql.h Wed May 14 19:39:01 2008
@@ -26,7 +26,7 @@
/*
* Provider name
*/
-#define MYSQL_PROVIDER_NAME "Mysql"
+#define MYSQL_PROVIDER_NAME "MySQL"
#include <libgda/libgda.h>
#include <mysql.h>
Modified: trunk/providers/postgres/postgres_specs_dsn.xml.in
==============================================================================
--- trunk/providers/postgres/postgres_specs_dsn.xml.in (original)
+++ trunk/providers/postgres/postgres_specs_dsn.xml.in Wed May 14 19:39:01 2008
@@ -2,7 +2,7 @@
<data-set-spec>
<parameters>
<parameter id="DB_NAME" _name="Database name" _descr="The name of a database to connect to" gdatype="gchararray" nullok="FALSE"/>
- <parameter id="SEARCHPATH" _name="Search Path" _descr="Search path among database's schemas" gdatype="gchararray"/>
+ <parameter id="SEARCHPATH" _name="Search Path" _descr="Search path among database's schemas ('search_path' variable)" gdatype="gchararray"/>
<parameter id="HOST" _name="Database server" _descr="Host on which the database server is running (for servers running on unix domain sockets, enter the socket's path (usually /tmp), or leave this field empty)" gdatype="gchararray"/>
<parameter id="PORT" _name="Port" _descr="Database server port (for servers running on unix domain sockets, enter the socket's file name extension (usually 5432), or leave this field empty)" gdatype="gint"/>
<parameter id="OPTIONS" _name="Options" _descr="Extra connection options" gdatype="gchararray"/>
Modified: trunk/tests/meta-store/common.c
==============================================================================
--- trunk/tests/meta-store/common.c (original)
+++ trunk/tests/meta-store/common.c Wed May 14 19:39:01 2008
@@ -335,12 +335,12 @@
test_schemata_1 (store);
test_schemata_2 (store);
test_builtin_data_types (store);
- test_domains (store);
+ //test_domains (store);
test_tables (store);
test_views (store);
test_routines (store);
test_triggers (store);
- test_columns (store);
+ //test_columns (store);
test_table_constraints (store);
test_referential_constraints (store);
/*test_key_column_usage (store);*/
Modified: trunk/tests/parser/Makefile.am
==============================================================================
--- trunk/tests/parser/Makefile.am (original)
+++ trunk/tests/parser/Makefile.am Wed May 14 19:39:01 2008
@@ -3,7 +3,9 @@
-I$(top_srcdir)/libgda \
-I$(top_builddir) \
$(LIBGDA_CFLAGS) \
- -DROOT_DIR=\""$(top_srcdir)"\"
+ -DROOT_DIR=\""$(top_srcdir)"\" \
+ -DTOP_BUILD_DIR=\""$(top_builddir)"\" \
+ -DTOP_SRC_DIR=\""$(top_srcdir)"\"
TESTS = check_parser check_validation check_normalization check_dml_comp
check_PROGRAMS = check_parser check_validation check_normalization check_dml_comp
Modified: trunk/tests/parser/check_dml_comp.c
==============================================================================
--- trunk/tests/parser/check_dml_comp.c (original)
+++ trunk/tests/parser/check_dml_comp.c Wed May 14 19:39:01 2008
@@ -25,6 +25,9 @@
gint ntests = 0;
gchar *fname;
+ /* set up test environment */
+ g_setenv ("GDA_TOP_BUILD_DIR", TOP_BUILD_DIR, 0);
+ g_setenv ("GDA_TOP_SRC_DIR", TOP_SRC_DIR, 0);
gda_init ();
/* open connection */
Modified: trunk/tests/parser/check_normalization.c
==============================================================================
--- trunk/tests/parser/check_normalization.c (original)
+++ trunk/tests/parser/check_normalization.c Wed May 14 19:39:01 2008
@@ -24,6 +24,9 @@
gint ntests = 0;
gchar *fname;
+ /* set up test environment */
+ g_setenv ("GDA_TOP_BUILD_DIR", TOP_BUILD_DIR, 0);
+ g_setenv ("GDA_TOP_SRC_DIR", TOP_SRC_DIR, 0);
gda_init ();
/* open connection */
Modified: trunk/tests/parser/check_validation.c
==============================================================================
--- trunk/tests/parser/check_validation.c (original)
+++ trunk/tests/parser/check_validation.c Wed May 14 19:39:01 2008
@@ -24,6 +24,9 @@
gint ntests = 0;
gchar *fname;
+ /* set up test environment */
+ g_setenv ("GDA_TOP_BUILD_DIR", TOP_BUILD_DIR, 0);
+ g_setenv ("GDA_TOP_SRC_DIR", TOP_SRC_DIR, 0);
gda_init ();
/* open connection */
Modified: trunk/tools/command-exec.c
==============================================================================
--- trunk/tools/command-exec.c (original)
+++ trunk/tools/command-exec.c Wed May 14 19:39:01 2008
@@ -23,7 +23,7 @@
#include <glib/gi18n-lib.h>
#include <string.h>
#include "tools-input.h"
-#ifdef HAVE_READLINE_HISTORY_H
+#ifdef HAVE_HISTORY
#include <readline/history.h>
#endif
@@ -363,7 +363,7 @@
res->type = GDA_INTERNAL_COMMAND_RESULT_TXT;
GString *string;
-#ifdef HAVE_READLINE_HISTORY_H
+#ifdef HAVE_HISTORY
if (args[0]) {
if (!save_history (args[0], error)) {
g_free (res);
Modified: trunk/tools/gda-sql.c
==============================================================================
--- trunk/tools/gda-sql.c (original)
+++ trunk/tools/gda-sql.c Wed May 14 19:39:01 2008
@@ -41,7 +41,7 @@
#include <pwd.h>
#endif
-#ifdef HAVE_READLINE_READLINE_H
+#ifdef HAVE_READLINE
#include <readline/readline.h>
#endif
@@ -2571,7 +2571,7 @@
static char **
completion_func (const char *text, int start, int end)
{
-#ifdef HAVE_READLINE_READLINE_H
+#ifdef HAVE_READLINE
ConnectionSetting *cs = main_data->current;
char **array;
gchar **gda_compl;
Modified: trunk/tools/tools-input.c
==============================================================================
--- trunk/tools/tools-input.c (original)
+++ trunk/tools/tools-input.c Wed May 14 19:39:01 2008
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2007 The GNOME Foundation.
+ * Copyright (C) 2007 - 2008 The GNOME Foundation.
*
* AUTHORS:
* Vivien Malerba <malerba gnome-db org>
@@ -29,10 +29,10 @@
#include <sys/ioctl.h>
#endif
-#ifdef HAVE_READLINE_READLINE_H
+#ifdef HAVE_READLINE
#include <readline/readline.h>
#endif
-#ifdef HAVE_READLINE_HISTORY_H
+#ifdef HAVE_HISTORY
#include <readline/history.h>
#endif
@@ -49,7 +49,7 @@
gchar *
input_from_console (const gchar *prompt)
{
-#ifdef HAVE_READLINE_READLINE_H
+#ifdef HAVE_READLINE
char *read;
if (isatty (fileno (stdin))) {
@@ -103,7 +103,7 @@
void
init_input ()
{
-#ifdef HAVE_READLINE_READLINE_H
+#ifdef HAVE_READLINE
rl_set_signals ();
rl_readline_name = "gda-sql";
#endif
@@ -117,7 +117,7 @@
void
set_completion_func (CompletionFunc func)
{
-#ifdef HAVE_READLINE_READLINE_H
+#ifdef HAVE_READLINE
rl_attempted_completion_function = func;
rl_basic_word_break_characters = " \t\n\\'` $><=;|&{(";
#endif
@@ -163,7 +163,7 @@
void
init_history ()
{
-#ifdef HAVE_READLINE_HISTORY_H
+#ifdef HAVE_HISTORY
rl_set_signals ();
if (history_init_done)
@@ -189,7 +189,7 @@
void
add_to_history (const gchar *txt)
{
-#ifdef HAVE_READLINE_HISTORY_H
+#ifdef HAVE_HISTORY
if (!history_init_done)
init_history ();
if (!txt || !(*txt))
@@ -210,7 +210,7 @@
gboolean
save_history (const gchar *file, GError **error)
{
-#ifdef HAVE_READLINE_HISTORY_H
+#ifdef HAVE_HISTORY
int res;
if (!history_init_done || !history_file)
return FALSE;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]