FS-5931 --resolve mod_mongo: update driver to v2.4
This commit is contained in:
parent
7540023b92
commit
d4916c3965
|
@ -1,6 +1,6 @@
|
|||
BASE=../../../..
|
||||
|
||||
MONGO_CXX_DRIVER_VERSION=v1.8
|
||||
MONGO_CXX_DRIVER_VERSION=v2.4
|
||||
MONGO_CXX_DRIVER_URL=http://downloads.mongodb.org/cxx-driver
|
||||
MONGO_CXX_DRIVER_TARBALL=mongodb-linux-x86_64-$(MONGO_CXX_DRIVER_VERSION)-latest.tgz
|
||||
MONGO_CXX_DRIVER_SRC=$(BASE)/libs/mongo-cxx-driver-$(MONGO_CXX_DRIVER_VERSION)
|
||||
|
@ -9,7 +9,7 @@ LIBMONGOCLIENT_A =$(MONGO_CXX_DRIVER_SRC)/libmongoclient.a
|
|||
LOCAL_SOURCES=mongo_conn.cpp
|
||||
LOCAL_OBJS=mongo_conn.o
|
||||
|
||||
LOCAL_CFLAGS=-I$(MONGO_CXX_DRIVER_SRC)/mongo
|
||||
LOCAL_CFLAGS=-I$(MONGO_CXX_DRIVER_SRC)/src
|
||||
LOCAL_LIBADD=$(LIBMONGOCLIENT_A)
|
||||
LOCAL_LDFLAGS=-lboost_thread -lboost_filesystem-mt -lboost_system-mt
|
||||
MODDIR=$(shell pwd)
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
--- SConstruct.orig 2011-04-28 19:00:36.000000000 +0200
|
||||
+++ SConstruct 2011-04-28 19:01:19.000000000 +0200
|
||||
@@ -45,7 +45,7 @@
|
||||
linux = True
|
||||
--- SConstruct 2013-10-30 17:18:51.160645496 -0400
|
||||
+++ new 2013-10-30 17:22:18.790072856 -0400
|
||||
@@ -78,7 +78,7 @@
|
||||
env['DIST_ARCHIVE_SUFFIX'] = '.tgz'
|
||||
|
||||
if nix:
|
||||
- env.Append( CPPFLAGS=" -O3" )
|
||||
+ env.Append( CPPFLAGS=" -I../pcre -fPIC -O3" )
|
||||
env.Append( LIBS=["pthread"] )
|
||||
- env.Append(CCFLAGS=["-O3", "-pthread"])
|
||||
+ env.Append(CCFLAGS=["-I../pcre", "-fPIC", "-O3", "-pthread"])
|
||||
if linux:
|
||||
env.Append( LINKFLAGS=" -Wl,--as-needed -Wl,-zdefs " )
|
||||
env.Append(LINKFLAGS=["-pthread"])
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ SWITCH_STANDARD_API(mongo_mapreduce_function)
|
|||
BSONObj out;
|
||||
BSONObjBuilder cmd;
|
||||
|
||||
cmd.append("mapreduce", conn->nsGetCollection(ns));
|
||||
cmd.append("mapreduce", nsGetCollection(ns));
|
||||
if (!zstr(globals.map)) {
|
||||
cmd.appendCode("map", globals.map);
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ SWITCH_STANDARD_API(mongo_mapreduce_function)
|
|||
|
||||
conn = mongo_connection_pool_get(globals.conn_pool);
|
||||
if (conn) {
|
||||
conn->runCommand(conn->nsGetDB(ns), cmd.done(), out);
|
||||
conn->runCommand(nsGetDB(ns), cmd.done(), out);
|
||||
mongo_connection_pool_put(globals.conn_pool, conn, SWITCH_FALSE);
|
||||
|
||||
stream->write_function(stream, "-OK\n%s\n", out.jsonString().c_str());
|
||||
|
|
|
@ -32,10 +32,7 @@
|
|||
#ifndef MOD_MONGO_H
|
||||
#define MOD_MONGO_H
|
||||
|
||||
#include <client/dbclient.h>
|
||||
#include <client/connpool.h>
|
||||
#include <db/json.h>
|
||||
#include <bson/bson.h>
|
||||
#include <mongo/client/dbclient.h>
|
||||
|
||||
using namespace mongo;
|
||||
|
||||
|
|
Loading…
Reference in New Issue