aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2018-12-10 14:25:55 +0200
committerSergey Poznyakoff <gray@gnu.org>2018-12-10 14:25:55 +0200
commit1f2122af3af26803267ca8c84b0f1050333240c9 (patch)
tree06974df6fe265e03d8cb7b8f78ad271238730e58
parent0700401f26aa83e68bf0a8e071fa891ee57bde30 (diff)
downloadvmod-sql-1f2122af3af26803267ca8c84b0f1050333240c9.tar.gz
vmod-sql-1f2122af3af26803267ca8c84b0f1050333240c9.tar.bz2
Version 1.3release-1.3
Supports Varnish 6.0.2 Includes improved version of wordsplit routines.
-rw-r--r--NEWS10
m---------acvmod0
-rwxr-xr-xbootstrap2
-rw-r--r--configure.ac8
-rw-r--r--doc/vmod-sql.38
-rw-r--r--src/mysql.c5
-rw-r--r--src/pgsql.c5
-rw-r--r--src/sql.c2
-rw-r--r--src/vmod-sql.c19
-rw-r--r--src/vmod-sql.h2
-rw-r--r--src/wordsplit.c1646
-rw-r--r--src/wordsplit.h214
12 files changed, 1485 insertions, 436 deletions
diff --git a/NEWS b/NEWS
index a366dd8..21a89fa 100644
--- a/NEWS
+++ b/NEWS
@@ -1,9 +1,13 @@
1vmod-sql -- history of user-visible changes. 2017-08-10 1vmod-sql -- history of user-visible changes. 2018-12-10
2Copyright (C) 2013-2017 Sergey Poznyakoff
3See the end of file for copying conditions. 2See the end of file for copying conditions.
4 3
5Please send vmod-sql bug reports to <gray@gnu.org> 4Please send vmod-sql bug reports to <gray@gnu.org>
6 5
6Version 1.3, 2018-12-10
7
8* Support for Varnish 6.0.2
9
10
7Version 1.2, 2017-08-10 11Version 1.2, 2017-08-10
8 12
9* Support for Varnish 5.1 13* Support for Varnish 5.1
@@ -26,7 +30,7 @@ Initial release
26========================================================================= 30=========================================================================
27Copyright information: 31Copyright information:
28 32
29Copyright (C) 2017 Sergey Poznyakoff 33Copyright (C) 2013-2018 Sergey Poznyakoff
30 34
31 Permission is granted to anyone to make or distribute verbatim copies 35 Permission is granted to anyone to make or distribute verbatim copies
32 of this document as received, in any medium, provided that the 36 of this document as received, in any medium, provided that the
diff --git a/acvmod b/acvmod
Subproject 5f6dce2f7dd35a154333bb42d134a018b981f81 Subproject 5b214e3d72f9e261a37cf31deb41e7f8a61a181
diff --git a/bootstrap b/bootstrap
index 89ccf31..42bce68 100755
--- a/bootstrap
+++ b/bootstrap
@@ -3,5 +3,7 @@ for dir in m4 build-aux
3do 3do
4 test -d $dir || mkdir $dir 4 test -d $dir || mkdir $dir
5done 5done
6git submodule init
7git submodule update
6test -f ChangeLog || touch ChangeLog 8test -f ChangeLog || touch ChangeLog
7autoreconf -f -i -s 9autoreconf -f -i -s
diff --git a/configure.ac b/configure.ac
index 324794f..8eae691 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,5 +1,5 @@
1# This file is part of vmod-sql -*- autoconf -*- 1# This file is part of vmod-sql -*- autoconf -*-
2# Copyright (C) 2013-2017 Sergey Poznyakoff 2# Copyright (C) 2013-2018 Sergey Poznyakoff
3# 3#
4# Vmod-sql is free software; you can redistribute it and/or modify 4# Vmod-sql is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License as published by 5# it under the terms of the GNU General Public License as published by
@@ -14,7 +14,7 @@
14# You should have received a copy of the GNU General Public License 14# You should have received a copy of the GNU General Public License
15# along with vmod-sql. If not, see <http://www.gnu.org/licenses/>. 15# along with vmod-sql. If not, see <http://www.gnu.org/licenses/>.
16AC_PREREQ(2.69) 16AC_PREREQ(2.69)
17AC_INIT([vmod-sql], 1.2, [gray@gnu.org]) 17AC_INIT([vmod-sql], 1.3, [gray@gnu.org])
18AC_CONFIG_AUX_DIR([build-aux]) 18AC_CONFIG_AUX_DIR([build-aux])
19AC_CONFIG_MACRO_DIR([m4]) 19AC_CONFIG_MACRO_DIR([m4])
20AC_CONFIG_SRCDIR(src/vmod-sql.c) 20AC_CONFIG_SRCDIR(src/vmod-sql.c)
@@ -43,7 +43,9 @@ AC_PROG_MAKE_SET
43AC_HEADER_STDC 43AC_HEADER_STDC
44AC_CHECK_HEADERS([sys/stdlib.h]) 44AC_CHECK_HEADERS([sys/stdlib.h])
45 45
46AM_VARNISHAPI([4.1],[5.1]) 46AM_VARNISHAPI([4.1],[6.0.2])
47AC_DEFINE_UNQUOTED([VARNISHAPI_MAJOR],[$VARNISHAPI_MAJOR],
48 [Varnish API major version number])
47 49
48########### 50###########
49# Check for SQL support 51# Check for SQL support
diff --git a/doc/vmod-sql.3 b/doc/vmod-sql.3
index 446cfbc..ad46771 100644
--- a/doc/vmod-sql.3
+++ b/doc/vmod-sql.3
@@ -1,5 +1,5 @@
1.\" This file is part of Vmod-sql -*- nroff -*- 1.\" This file is part of Vmod-sql -*- nroff -*-
2.\" Copyright (C) 2013-2014 Sergey Poznyakoff 2.\" Copyright (C) 2013-2018 Sergey Poznyakoff
3.\" 3.\"
4.\" Vmod-sql is free software; you can redistribute it and/or modify 4.\" Vmod-sql is free software; you can redistribute it and/or modify
5.\" it under the terms of the GNU General Public License as published by 5.\" it under the terms of the GNU General Public License as published by
@@ -13,7 +13,7 @@
13.\" 13.\"
14.\" You should have received a copy of the GNU General Public License 14.\" You should have received a copy of the GNU General Public License
15.\" along with vmod-sql. If not, see <http://www.gnu.org/licenses/>. 15.\" along with vmod-sql. If not, see <http://www.gnu.org/licenses/>.
16.TH VMOD-SQL 1 "November 1, 2014" "VMOD-SQL" "User Reference" 16.TH VMOD-SQL 3 "December 10, 2018" "VMOD-SQL" "User Reference"
17.SH NAME 17.SH NAME
18vmod-sql \- SQL access for Varnish Cache 18vmod-sql \- SQL access for Varnish Cache
19.SH SYNOPSIS 19.SH SYNOPSIS
@@ -207,7 +207,7 @@ vcl_recv {
207.\" for man-based doc pages. 207.\" for man-based doc pages.
208.if "\V[MANCGI]"WEBDOC" \{\ 208.if "\V[MANCGI]"WEBDOC" \{\
209. ds package vmod-sql 209. ds package vmod-sql
210. ds version 1.0 210. ds version 1.3
211. so download.inc 211. so download.inc
212\} 212\}
213.SH "SEE ALSO" 213.SH "SEE ALSO"
@@ -253,7 +253,7 @@ Sergey Poznyakoff
253.SH "BUG REPORTS" 253.SH "BUG REPORTS"
254Report bugs to <gray@gnu.org>. 254Report bugs to <gray@gnu.org>.
255.SH COPYRIGHT 255.SH COPYRIGHT
256Copyright \(co 2013 Sergey Poznyakoff 256Copyright \(co 2013-2018 Sergey Poznyakoff
257.br 257.br
258.na 258.na
259License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 259License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
diff --git a/src/mysql.c b/src/mysql.c
index f113b10..3cfbe03 100644
--- a/src/mysql.c
+++ b/src/mysql.c
@@ -1,5 +1,5 @@
1/* This file is part of vmod-sql 1/* This file is part of vmod-sql
2 Copyright (C) 2013-2014 Sergey Poznyakoff 2 Copyright (C) 2013-2018 Sergey Poznyakoff
3 3
4 Vmod-sql is free software; you can redistribute it and/or modify 4 Vmod-sql is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
@@ -211,7 +211,8 @@ s_mysql_num_tuples(struct vmod_sql_connection *conn)
211} 211}
212 212
213static const char * 213static const char *
214s_mysql_get_column(struct vmod_sql_connection *conn, size_t nrow, size_t ncol) 214s_mysql_get_column(struct vmod_sql_connection *conn,
215 unsigned nrow, unsigned ncol)
215{ 216{
216 struct vmod_mysql_data *mp = conn->data; 217 struct vmod_mysql_data *mp = conn->data;
217 MYSQL_ROW row; 218 MYSQL_ROW row;
diff --git a/src/pgsql.c b/src/pgsql.c
index 9d420fc..80b316a 100644
--- a/src/pgsql.c
+++ b/src/pgsql.c
@@ -1,5 +1,5 @@
1/* This file is part of vmod-sql 1/* This file is part of vmod-sql
2 Copyright (C) 2013-2014 Sergey Poznyakoff 2 Copyright (C) 2013-2018 Sergey Poznyakoff
3 3
4 Vmod-sql is free software; you can redistribute it and/or modify 4 Vmod-sql is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
@@ -142,7 +142,8 @@ s_pgsql_num_tuples(struct vmod_sql_connection *conn)
142} 142}
143 143
144static const char * 144static const char *
145s_pgsql_get_column(struct vmod_sql_connection *conn, size_t nrow, size_t ncol) 145s_pgsql_get_column(struct vmod_sql_connection *conn,
146 unsigned nrow, unsigned ncol)
146{ 147{
147 struct vmod_pgsql_data *dp = conn->data; 148 struct vmod_pgsql_data *dp = conn->data;
148 149
diff --git a/src/sql.c b/src/sql.c
index 3ceb95c..4b99f6a 100644
--- a/src/sql.c
+++ b/src/sql.c
@@ -1,5 +1,5 @@
1/* This file is part of vmod-sql 1/* This file is part of vmod-sql
2 Copyright (C) 2013-2014 Sergey Poznyakoff 2 Copyright (C) 2013-2018 Sergey Poznyakoff
3 3
4 Vmod-sql is free software; you can redistribute it and/or modify 4 Vmod-sql is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
diff --git a/src/vmod-sql.c b/src/vmod-sql.c
index 689b0f7..3653f69 100644
--- a/src/vmod-sql.c
+++ b/src/vmod-sql.c
@@ -1,5 +1,5 @@
1/* This file is part of vmod-sql 1/* This file is part of vmod-sql
2 Copyright (C) 2013-2017 Sergey Poznyakoff 2 Copyright (C) 2013-2018 Sergey Poznyakoff
3 3
4 Vmod-sql is free software; you can redistribute it and/or modify 4 Vmod-sql is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
@@ -17,13 +17,18 @@
17#include "vmod-sql.h" 17#include "vmod-sql.h"
18#include <stdarg.h> 18#include <stdarg.h>
19#include "wordsplit.h" 19#include "wordsplit.h"
20#include "vcl.h" 20#if VARNISHAPI_MAJOR > 5
21#include "vrt.h" 21# include "cache/cache.h"
22#include "vcc_if.h" 22# include "vcl.h"
23#include "pthread.h" 23# include "vcc_if.h"
24 24#else
25#include "cache/cache.h" 25# include "vcl.h"
26# include "vrt.h"
27# include "vcc_if.h"
28# include "cache/cache.h"
29#endif
26#define WSPTR(s) ((s)->ws) 30#define WSPTR(s) ((s)->ws)
31#include "pthread.h"
27 32
28static pthread_once_t thread_once = PTHREAD_ONCE_INIT; 33static pthread_once_t thread_once = PTHREAD_ONCE_INIT;
29static pthread_key_t thread_key; 34static pthread_key_t thread_key;
diff --git a/src/vmod-sql.h b/src/vmod-sql.h
index 2a423fe..e171414 100644
--- a/src/vmod-sql.h
+++ b/src/vmod-sql.h
@@ -1,5 +1,5 @@
1/* This file is part of vmod-sql 1/* This file is part of vmod-sql
2 Copyright (C) 2013-2014 Sergey Poznyakoff 2 Copyright (C) 2013-2018 Sergey Poznyakoff
3 3
4 Vmod-sql is free software; you can redistribute it and/or modify 4 Vmod-sql is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by 5 it under the terms of the GNU General Public License as published by
diff --git a/src/wordsplit.c b/src/wordsplit.c
index f4740bf..bad59b1 100644
--- a/