Changeset: 8563aa91e7a3 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8563aa91e7a3 Modified Files: clients/configure.ag clients/src/Makefile.ag clients/src/mapilite/Makefile.ag clients/src/mapilite/mapilite.c clients/src/mapilite/mapilite.h clients/src/mapilite/tests/__init__.py clients/src/mapilite/tests/generate.sh clients/src/mapilite/tests/mapi_structs.h clients/src/mapilite/tests/mapi_structs.py clients/src/mapilite/tests/runtests.py clients/src/mapilite/tests/test_mapi.py Branch: default Log Message:
Remove mapilite: the project has been abandoned. diffs (truncated from 5837 to 300 lines): diff -r b75df91c26f8 -r 8563aa91e7a3 clients/configure.ag --- a/clients/configure.ag Mon Jul 19 11:05:36 2010 +0200 +++ b/clients/configure.ag Mon Jul 19 16:41:53 2010 +0200 @@ -83,18 +83,6 @@ AC_PROG_LIBTOOL -have_mapilite=no -AC_ARG_WITH([mapilite], -[AS_HELP_STRING([--with-mapilite], -[enable experimental lightweight mapi library])], -[have_mapilite=yes], -[have_mapilite=no]) - -AS_IF([test "x$have_mapilite" != xno], - AC_DEFINE([HAVE_MAPILITE], [1], [Define if you want to use the mapilite library]) -) -AM_CONDITIONAL(HAVE_MAPILITE, test x$have_mapilite != xno) - # Checks for libraries. dnl unixODBC dnl this is only used by the ODBC driver diff -r b75df91c26f8 -r 8563aa91e7a3 clients/src/Makefile.ag --- a/clients/src/Makefile.ag Mon Jul 19 11:05:36 2010 +0200 +++ b/clients/src/Makefile.ag Mon Jul 19 16:41:53 2010 +0200 @@ -15,4 +15,4 @@ # Copyright August 2008-2010 MonetDB B.V. # All Rights Reserved. -SUBDIRS = mapilib mapiclient HAVE_ODBC?odbc HAVE_PERL?perl php HAVE_RUBYGEM?ruby examples HAVE_MAPILITE?mapilite +SUBDIRS = mapilib mapiclient HAVE_ODBC?odbc HAVE_PERL?perl php HAVE_RUBYGEM?ruby examples diff -r b75df91c26f8 -r 8563aa91e7a3 clients/src/mapilite/Makefile.ag --- a/clients/src/mapilite/Makefile.ag Mon Jul 19 11:05:36 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,32 +0,0 @@ -# The contents of this file are subject to the MonetDB Public License -# Version 1.1 (the "License"); you may not use this file except in -# compliance with the License. You may obtain a copy of the License at -# http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html -# -# Software distributed under the License is distributed on an "AS IS" -# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the -# License for the specific language governing rights and limitations -# under the License. -# -# The Original Code is the MonetDB Database System. -# -# The Initial Developer of the Original Code is CWI. -# Portions created by CWI are Copyright (C) 1997-July 2008 CWI. -# Copyright August 2008-2010 MonetDB B.V. -# All Rights Reserved. - -MTSAFE -INCLUDES = $(MONETDB_INCS) $(READLINE_INCS) $(OPENSSL_INCS) - -MAPI_LIBS = $(SOCKET_LIBS) $(OPENSSL_LIBS) - -lib_mapilite = { - SOURCES = mapilite.c - LIBS = $(MAPI_LIBS) $(MONETDB_LIBS) -lmutils -lstream -} - -headers_mapilite = { - DIR = includedir/MonetDB/mapilitelib - HEADERS = h - SOURCES = mapilite.h -} diff -r b75df91c26f8 -r 8563aa91e7a3 clients/src/mapilite/mapilite.c --- a/clients/src/mapilite/mapilite.c Mon Jul 19 11:05:36 2010 +0200 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,4046 +0,0 @@ - -#include "clients_config.h" -#include <monet_utils.h> -#include <stream.h> /* include before Mapi.h */ -#include <stream_socket.h> -#include "mapilite.h" - -#ifdef HAVE_UNISTD_H -# include <unistd.h> -#endif -#include <stdio.h> -#ifdef HAVE_PWD_H -#include <pwd.h> -#endif -#include <sys/types.h> - -#ifdef HAVE_SYS_UN_H -#include <sys/un.h> -#endif -#ifdef HAVE_NETDB_H -# include <netdb.h> -# include <netinet/in.h> -#endif - -#include <signal.h> -#include <string.h> -#include <memory.h> - -/*additional definitions for date and time*/ -#ifdef HAVE_FTIME -#include <sys/timeb.h> -#endif - -#ifdef TIME_WITH_SYS_TIME -# include <sys/time.h> -# include <time.h> -#else -# ifdef HAVE_SYS_TIME_H -# include <sys/time.h> -# else -# include <time.h> -# endif -#endif - -#ifdef NATIVE_WIN32 -#define strdup _strdup -#endif - -#ifdef HAVE_CRYPT_H -# include <crypt.h> -#else -# if defined(HAVE_CRYPT) && defined(__MINGW32__) -_CRTIMP char *__cdecl crypt(const char *key, const char *salt); -# endif -#endif - -#ifdef HAVE_OPENSSL -# include <openssl/md5.h> -# include <openssl/sha.h> -# include <openssl/ripemd.h> -#endif - -#ifndef INVALID_SOCKET -#define INVALID_SOCKET (-1) -#endif - - -#define MAPIBLKSIZE 256 /* minimum buffer shipped */ -#define MAXQUERYSIZE (100*1024) -#define QUERYBLOCK (16*1024) - - -/* information about the columns in a result set */ -struct MapiColumn { - char *tablename; - char *columnname; - char *columntype; - int columnlength; -}; - -/* information about bound columns */ -struct MapiBinding { - void *outparam; /* pointer to application variable */ - int outtype; /* type of application variable */ - int precision; - int scale; -}; - -/* information about statement parameters */ -struct MapiParam { - void *inparam; /* pointer to application variable */ - int *sizeptr; /* if string, points to length of string or -1 */ - int intype; /* type of application variable */ - int outtype; /* type of value */ - int precision; - int scale; -}; - -struct MapiRowBuf { - int rowlimit; /* maximum number of rows to cache */ - int shuffle; /* percentage of rows to shuffle upon overflow */ - int limit; /* current storage space limit */ - int writer; - int reader; - mapi_int64 first; /* row # of first tuple */ - mapi_int64 tuplecount; /* number of tuples in the cache */ - struct { - int fldcnt; /* actual number of fields in each row */ - char *rows; /* string representation of rows received */ - int tupleindex; /* index of tuple rows */ - mapi_int64 tuplerev; /* reverse map of tupleindex */ - char **anchors; /* corresponding field pointers */ - } *line; -}; - -struct BlockCache { - char *buf; - int lim; - int nxt; - int end; - int eos; /* end of sequence */ -}; - -/* A connection to a server is represented by a struct MapiStruct. An - application can have any number of connections to any number of - servers. Connections are completely independent of each other. -*/ -struct MapiStruct { - char *server; /* server version */ - char *mapiversion; /* mapi version */ - char *hostname; - int port; - char *username; - char *password; - char *language; - char *database; /* to obtain from server */ - int languageId; - int versionId; /* Monet 4 or 5 */ - char *motd; /* welcome message from server */ - - int profile; /* profile Mapi interaction */ - int trace; /* Trace Mapi interaction */ - int auto_commit; - char *noexplain; /* on error, don't explain, only print result */ - MapiMsg error; /* Error occurred */ - char *errorstr; /* error from server */ - const char *action; /* pointer to constant string */ - - struct BlockCache blk; - int connected; - MapiHdl first; /* start of doubly-linked list */ - MapiHdl active; /* set when not all rows have been received */ - - int cachelimit; /* default maximum number of rows to cache */ - int redircnt; /* redirection count, used to cut of redirect loops */ - int redirmax; /* maximum redirects before giving up */ - char *redirects[50];/* NULL-terminated list of redirects */ - - stream *tracelog; /* keep a log for inspection */ - stream *from, *to; - int index; /* to mark the log records */ -}; - -struct MapiResultSet { - struct MapiResultSet *next; - struct MapiStatement *hdl; - int tableid; /* SQL id of current result set */ - int querytype; /* type of SQL query */ - mapi_int64 row_count; - mapi_int64 last_id; - int fieldcnt; - int maxfields; - char *errorstr; /* error from server */ - struct MapiColumn *fields; - struct MapiRowBuf cache; -}; - -struct MapiStatement { - struct MapiStruct *mid; - char *template; /* keep parameterized query text around */ - char *query; - int maxbindings; - struct MapiBinding *bindings; - int maxparams; - struct MapiParam *params; - struct MapiResultSet *result, *active, *lastresult; - int needmore; /* need more input */ - int *pending_close; - int npending_close; - MapiHdl prev, next; -}; - -/* -#ifdef DEBUG -#define debugprint(fmt,arg) printf(fmt,arg) -#else -#define debugprint(fmt,arg) ((void) 0) -#endif -*/ - -/* -#define mapi_check(X,C) \ - do { \ - debugprint("entering %s\n", (C)); \ - assert(X); \ - if ((X)->connected == 0) { \ - mapi_setError((X), "Connection lost", (C), MERROR); \ - return (X)->error; \ - } \ - mapi_clrError(X); \ - } while (0) -*/ - -#define mapi_check0(X,C) \ - do { \ - debugprint("entering %s\n", (C)); \ - assert(X); \ - if ((X)->connected == 0) { \ - mapi_setError((X), "Connection lost", (C), MERROR); \ - return 0; \ - } \ - mapi_clrError(X); \ - } while (0) - -#define mapi_hdl_check(X,C) \ - do { \ - debugprint("entering %s\n", (C)); \ - assert(X); \ - assert((X)->mid); \ _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
