You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
|
Feb
(2) |
Mar
|
Apr
(29) |
May
|
Jun
(23) |
Jul
(1) |
Aug
(12) |
Sep
|
Oct
|
Nov
|
Dec
(2) |
| 2004 |
Jan
(21) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2005 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(4) |
May
(5) |
Jun
|
Jul
|
Aug
(18) |
Sep
(14) |
Oct
(8) |
Nov
(11) |
Dec
|
| 2006 |
Jan
(2) |
Feb
(1) |
Mar
(5) |
Apr
(3) |
May
(35) |
Jun
(6) |
Jul
|
Aug
(2) |
Sep
(4) |
Oct
(34) |
Nov
(5) |
Dec
|
| 2007 |
Jan
|
Feb
(4) |
Mar
(29) |
Apr
(7) |
May
(11) |
Jun
|
Jul
(2) |
Aug
(3) |
Sep
|
Oct
|
Nov
(6) |
Dec
(18) |
| 2008 |
Jan
(5) |
Feb
(4) |
Mar
(9) |
Apr
|
May
|
Jun
(5) |
Jul
(24) |
Aug
(29) |
Sep
(3) |
Oct
(12) |
Nov
(13) |
Dec
(18) |
| 2009 |
Jan
(1) |
Feb
(3) |
Mar
(21) |
Apr
(26) |
May
(34) |
Jun
(10) |
Jul
(2) |
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2010 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(5) |
Aug
(8) |
Sep
(38) |
Oct
(9) |
Nov
(13) |
Dec
(9) |
| 2011 |
Jan
(5) |
Feb
(12) |
Mar
|
Apr
(2) |
May
(2) |
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2013 |
Jan
(4) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
(12) |
Nov
|
Dec
|
| 2014 |
Jan
(6) |
Feb
|
Mar
(7) |
Apr
|
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
| 2016 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2019 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Markus H. <mar...@mh...> - 2022-02-11 23:37:48
|
Hi, here's a ping to everyone who is still and maybe accidentally subscribed to this list. A bout of corona, quite harmless thanks to three helpings of Comirnaty, created some free time to fiddle with my software projects again, after being forced to neglect them for years. Long story short, I'd like to revert an ill-advised patch from 2017 and add an option to the MySQL driver which allows users to set the SQL mode per session, without having to reconfigure an entire server for specific purposes like some legacy SQL code. Problem is, my knowledge about release versioning and, even more so, library versioning, is rusty, to say the least. Neither of the changes will affect backward compatibility. The change to libdbi fixes a stupid patch which caused an extra error message without affecting the function of the library itself. The change to the driver honors another option but the driver works the same if the option is not set. So how am I supposed to deal with the versioning here? Helpful hints are greatly welcome. Also, feel free to suggest additional changes that the project might need. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 |
|
From: Markus H. <mar...@mh...> - 2021-10-20 23:39:57
|
Am 2021-10-14 09:17, schrub Herve Codina: > The MYSQL_CONFIG variable is used to check 'mysql_config' prog. > This variable can be override by the user but was not used for > retrieving MYSQL_INCLUDE, MYSQL_LIBS, ... > > This commit replaces the hardcoded usage of 'mysql_config' by > the use of MYSQL_CONFIG variable. > > This lead to 'MYSQL_CONFIG=/some/where/mysql_config ./configure' > command to work properly. > > Signed-off-by: Herve Codina <her...@bo...> > --- > acinclude.m4 | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/acinclude.m4 b/acinclude.m4 > index e99318f..9dd2b0f 100644 > --- a/acinclude.m4 > +++ b/acinclude.m4 > @@ -116,15 +116,15 @@ if test "$ac_mysql" = "yes"; then > fi > > if test "$ac_mysql_incdir" = "no"; then > - MYSQL_INCLUDE=`mysql_config --include` > + MYSQL_INCLUDE=`$MYSQL_CONFIG --include` > else > MYSQL_INCLUDE=-I$ac_mysql_incdir > fi > if test "$ac_mysql_libdir" = "no"; then > if test "$ac_mysql_threadsafe" = "YES"; then > - MYSQL_LIBS=`mysql_config --libs_r` > + MYSQL_LIBS=`$MYSQL_CONFIG --libs_r` > else > - MYSQL_LIBS=`mysql_config --libs` > + MYSQL_LIBS=`$MYSQL_CONFIG --libs` > fi > else > if test "$ac_mysql_threadsafe" = "YES"; then Hi Herve, thanks for providing the patch - I've just pushed the changes. best regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 |
|
From: Herve C. <her...@bo...> - 2021-10-14 08:02:59
|
The MYSQL_CONFIG variable is used to check 'mysql_config' prog. This variable can be override by the user but was not used for retrieving MYSQL_INCLUDE, MYSQL_LIBS, ... This commit replaces the hardcoded usage of 'mysql_config' by the use of MYSQL_CONFIG variable. This lead to 'MYSQL_CONFIG=/some/where/mysql_config ./configure' command to work properly. Signed-off-by: Herve Codina <her...@bo...> --- acinclude.m4 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index e99318f..9dd2b0f 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -116,15 +116,15 @@ if test "$ac_mysql" = "yes"; then fi if test "$ac_mysql_incdir" = "no"; then - MYSQL_INCLUDE=`mysql_config --include` + MYSQL_INCLUDE=`$MYSQL_CONFIG --include` else MYSQL_INCLUDE=-I$ac_mysql_incdir fi if test "$ac_mysql_libdir" = "no"; then if test "$ac_mysql_threadsafe" = "YES"; then - MYSQL_LIBS=`mysql_config --libs_r` + MYSQL_LIBS=`$MYSQL_CONFIG --libs_r` else - MYSQL_LIBS=`mysql_config --libs` + MYSQL_LIBS=`$MYSQL_CONFIG --libs` fi else if test "$ac_mysql_threadsafe" = "YES"; then -- 2.31.1 |
|
From: Jan E. <je...@in...> - 2019-03-22 02:20:23
|
On Friday 2019-03-22 00:23, Markus Hoenicka wrote: > Am 2019-03-21 15:45, schrieb Jan Engelhardt: >> The openSUSE PostgreSQL 11 no longer ships the pg_config program. >> Instead, there exists a .pc file (likewise in pg10), so make use of >> that, by default. [...] > > thanks for taking care of these PostgreSQL changes. Will you go ahead and push > your changes to the repository? Thanks for the (uneventful) review. Done the push now. |
|
From: Markus H. <mar...@mh...> - 2019-03-21 23:24:07
|
Am 2019-03-21 15:45, schrieb Jan Engelhardt:
> The openSUSE PostgreSQL 11 no longer ships the pg_config program.
> Instead, there exists a .pc file (likewise in pg10), so make use of
> that, by default.
>
> The old --with-pgsql-inc and --with-pgsql-lib option are going away
> and replaced by the standardized mechanisms pkg-config.m4 has in
> store for when there is no .pc file or an unusual location:
>
> ./configure --with-pgsql pgsql_CFLAGS="-I/opt/pgsql/include" \
> pgsql_LIBS="-L/opt/pgsql/lib -lpq"
> ---
> acinclude.m4 | 66 ++++++---------------------------------
> drivers/pgsql/Makefile.am | 4 +--
> 2 files changed, 12 insertions(+), 58 deletions(-)
>
> diff --git a/acinclude.m4 b/acinclude.m4
> index 85eec28..e99318f 100644
> --- a/acinclude.m4
> +++ b/acinclude.m4
> @@ -154,64 +154,18 @@ AC_SUBST(MYSQL_TEST)
>
> AC_DEFUN([AC_CHECK_PGSQL],
> [
> -AM_CONDITIONAL(HAVE_PGSQL, false)
> -ac_pgsql="no"
> -ac_pgsql_incdir="no"
> -ac_pgsql_libdir="no"
>
> -# exported variables
> -PGSQL_LIBS=""
> -PGSQL_LDFLAGS=""
> -PGSQL_INCLUDE=""
> -PGSQL_TEST=""
> +AC_ARG_WITH([pgsql], [AS_HELP_STRING([--without-pgsql], [Build
> without pgsql output plugin [default=test]])],
> + [ac_pgsql="$withval"], [ac_pgsql=auto])
> +enable_pgsql=no
> +AS_IF([test "$ac_pgsql" = "auto"], [
> + PKG_CHECK_MODULES([pgsql], [libpq], [enable_pgsql=yes], [:])
> +], [test "$ac_pgsql" != "no"], [
> + PKG_CHECK_MODULES([pgsql], [libpq], [enable_pgsql=yes])
> +])
>
> -AC_MSG_CHECKING(for PostgreSQL support)
> -
> -AC_ARG_WITH(pgsql,
> - [ --with-pgsql Include PostgreSQL support.],
> - [ ac_pgsql="$withval" ])
> -AC_ARG_WITH(pgsql-incdir,
> - [ --with-pgsql-incdir Specifies where the PostgreSQL include
> files are.],
> - [ ac_pgsql_incdir="$withval" ])
> -AC_ARG_WITH(pgsql-libdir,
> - [ --with-pgsql-libdir Specifies where the PostgreSQL libraries
> are.],
> - [ ac_pgsql_libdir="$withval" ])
> -
> -if test "$ac_pgsql" = "yes"; then
> - AC_MSG_RESULT([yes])
> - if test "$ac_pgsql_incdir" = "no" || test "$ac_pgsql_libdir" = "no";
> then
> - AC_CHECK_PROG([PG_CONFIG], [pg_config], [yes], [no])
> - if test "$PG_CONFIG" = "no"; then
> - AC_MSG_ERROR([cannot auto-configure PostgreSQL without
> pg_config])
> - fi
> - fi
> - if test "$ac_pgsql_incdir" = "no"; then
> - PGSQL_INCLUDE="-I"`pg_config --includedir`
> - else
> - PGSQL_INCLUDE=-I$ac_pgsql_incdir
> - fi
> - if test "$ac_pgsql_libdir" = "no"; then
> - PGSQL_LDFLAGS=`pg_config --libdir`
> - else
> - PGSQL_LDFLAGS=-L$ac_pgsql_libdir
> - fi
> -
> - PGSQL_LIBS=-lpq
> - PGSQL_TEST="test_pgsql.sh"
> -
> -
> - AM_CONDITIONAL(HAVE_PGSQL, true)
> -
> - AC_SUBST(PGSQL_LIBS)
> - AC_SUBST(PGSQL_INCLUDE)
> - AC_MSG_CHECKING(for PostgreSQL includes)
> - AC_MSG_RESULT($PGSQL_INCLUDE)
> - AC_SUBST(PGSQL_LDFLAGS)
> - AC_MSG_CHECKING(for PostgreSQL libraries)
> - AC_MSG_RESULT($PGSQL_LDFLAGS)
> -else
> - AC_MSG_RESULT(no)
> -fi
> +AM_CONDITIONAL([HAVE_PGSQL], [test "$enable_pgsql" = yes])
> +AS_IF([test "$enable_pgsql" = yes], [PGSQL_TEST="test_pgsql.sh"])
> AC_SUBST(PGSQL_TEST)
> ])
>
> diff --git a/drivers/pgsql/Makefile.am b/drivers/pgsql/Makefile.am
> index 058a9b5..f482eac 100644
> --- a/drivers/pgsql/Makefile.am
> +++ b/drivers/pgsql/Makefile.am
> @@ -28,11 +28,11 @@ pgsql_sources =
>
> endif
>
> -AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include @DBI_INCLUDE@
> @PGSQL_INCLUDE@
> +AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include @DBI_INCLUDE@
> ${pgsql_CFLAGS}
>
> driver_LTLIBRARIES = $(pgsql_ltlibs)
> libdbdpgsql_la_LDFLAGS = $(pgsql_ldflags)
> -libdbdpgsql_la_LIBADD = @PGSQL_LDFLAGS@ @PGSQL_LIBS@ @LIBADD_LIBDBI@
> +libdbdpgsql_la_LIBADD = ${pgsql_LIBS} @LIBADD_LIBDBI@
> libdbdpgsql_la_SOURCES = $(pgsql_sources)
> libdbdpgsql_la_DEPENDENCIES = dbd_pgsql.h
Hi Jan,
thanks for taking care of these PostgreSQL changes. Will you go ahead
and push your changes to the repository?
regards,
Markus
--
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38
|
|
From: Jan E. <je...@in...> - 2019-03-21 15:02:50
|
The openSUSE PostgreSQL 11 no longer ships the pg_config program.
Instead, there exists a .pc file (likewise in pg10), so make use of
that, by default.
The old --with-pgsql-inc and --with-pgsql-lib option are going away
and replaced by the standardized mechanisms pkg-config.m4 has in
store for when there is no .pc file or an unusual location:
./configure --with-pgsql pgsql_CFLAGS="-I/opt/pgsql/include" \
pgsql_LIBS="-L/opt/pgsql/lib -lpq"
---
acinclude.m4 | 66 ++++++---------------------------------
drivers/pgsql/Makefile.am | 4 +--
2 files changed, 12 insertions(+), 58 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index 85eec28..e99318f 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -154,64 +154,18 @@ AC_SUBST(MYSQL_TEST)
AC_DEFUN([AC_CHECK_PGSQL],
[
-AM_CONDITIONAL(HAVE_PGSQL, false)
-ac_pgsql="no"
-ac_pgsql_incdir="no"
-ac_pgsql_libdir="no"
-# exported variables
-PGSQL_LIBS=""
-PGSQL_LDFLAGS=""
-PGSQL_INCLUDE=""
-PGSQL_TEST=""
+AC_ARG_WITH([pgsql], [AS_HELP_STRING([--without-pgsql], [Build without pgsql output plugin [default=test]])],
+ [ac_pgsql="$withval"], [ac_pgsql=auto])
+enable_pgsql=no
+AS_IF([test "$ac_pgsql" = "auto"], [
+ PKG_CHECK_MODULES([pgsql], [libpq], [enable_pgsql=yes], [:])
+], [test "$ac_pgsql" != "no"], [
+ PKG_CHECK_MODULES([pgsql], [libpq], [enable_pgsql=yes])
+])
-AC_MSG_CHECKING(for PostgreSQL support)
-
-AC_ARG_WITH(pgsql,
- [ --with-pgsql Include PostgreSQL support.],
- [ ac_pgsql="$withval" ])
-AC_ARG_WITH(pgsql-incdir,
- [ --with-pgsql-incdir Specifies where the PostgreSQL include files are.],
- [ ac_pgsql_incdir="$withval" ])
-AC_ARG_WITH(pgsql-libdir,
- [ --with-pgsql-libdir Specifies where the PostgreSQL libraries are.],
- [ ac_pgsql_libdir="$withval" ])
-
-if test "$ac_pgsql" = "yes"; then
- AC_MSG_RESULT([yes])
- if test "$ac_pgsql_incdir" = "no" || test "$ac_pgsql_libdir" = "no"; then
- AC_CHECK_PROG([PG_CONFIG], [pg_config], [yes], [no])
- if test "$PG_CONFIG" = "no"; then
- AC_MSG_ERROR([cannot auto-configure PostgreSQL without pg_config])
- fi
- fi
- if test "$ac_pgsql_incdir" = "no"; then
- PGSQL_INCLUDE="-I"`pg_config --includedir`
- else
- PGSQL_INCLUDE=-I$ac_pgsql_incdir
- fi
- if test "$ac_pgsql_libdir" = "no"; then
- PGSQL_LDFLAGS=`pg_config --libdir`
- else
- PGSQL_LDFLAGS=-L$ac_pgsql_libdir
- fi
-
- PGSQL_LIBS=-lpq
- PGSQL_TEST="test_pgsql.sh"
-
-
- AM_CONDITIONAL(HAVE_PGSQL, true)
-
- AC_SUBST(PGSQL_LIBS)
- AC_SUBST(PGSQL_INCLUDE)
- AC_MSG_CHECKING(for PostgreSQL includes)
- AC_MSG_RESULT($PGSQL_INCLUDE)
- AC_SUBST(PGSQL_LDFLAGS)
- AC_MSG_CHECKING(for PostgreSQL libraries)
- AC_MSG_RESULT($PGSQL_LDFLAGS)
-else
- AC_MSG_RESULT(no)
-fi
+AM_CONDITIONAL([HAVE_PGSQL], [test "$enable_pgsql" = yes])
+AS_IF([test "$enable_pgsql" = yes], [PGSQL_TEST="test_pgsql.sh"])
AC_SUBST(PGSQL_TEST)
])
diff --git a/drivers/pgsql/Makefile.am b/drivers/pgsql/Makefile.am
index 058a9b5..f482eac 100644
--- a/drivers/pgsql/Makefile.am
+++ b/drivers/pgsql/Makefile.am
@@ -28,11 +28,11 @@ pgsql_sources =
endif
-AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include @DBI_INCLUDE@ @PGSQL_INCLUDE@
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include @DBI_INCLUDE@ ${pgsql_CFLAGS}
driver_LTLIBRARIES = $(pgsql_ltlibs)
libdbdpgsql_la_LDFLAGS = $(pgsql_ldflags)
-libdbdpgsql_la_LIBADD = @PGSQL_LDFLAGS@ @PGSQL_LIBS@ @LIBADD_LIBDBI@
+libdbdpgsql_la_LIBADD = ${pgsql_LIBS} @LIBADD_LIBDBI@
libdbdpgsql_la_SOURCES = $(pgsql_sources)
libdbdpgsql_la_DEPENDENCIES = dbd_pgsql.h
--
2.21.0
|
|
From: Rehbein, A. <ale...@fo...> - 2017-12-04 17:15:37
|
Dear developers, I stumbled across a problem where the queried value `72623859790382856` (in hex: `0xFF01020304050607`) wasn't converted correctly when reading data from a `MYSQL_ROW`. The cause: In `_get_row_data`, no distinction is made between signed/unsigned integer types, so if a `MYSQL_ROW` holds, for instance, a string representation of a `uint64_t` that is too large for an `int64_t`, then `_get_row_data` will still call `atoll` to convert it, and we get undefined behavior. I haven't encountered corresponding errors for other integer types, because the values I had been using so far were too small in those cases, but the problem persists for *any* integer type (a distinction needs to be made). Regards Alexander Rehbein |
|
From: Ruben U. <rub...@gm...> - 2016-05-11 20:46:33
|
Hi again, Sorry, I see that this has already been fixed in the repository in 24f48b86c8988ee3aaebc5f303d71e9d789f77b6 The thing is just that it hasn't been integrated into Debian and therefore causing headaches. Cheers Ruben On Wed, May 11, 2016 at 09:25:45PM +0200, Ruben Undheim wrote: > Hi, > > I've identified a memory problem which is causing segmentation faults when > running the test suite of OpenBSC which links with libdbd. > > > See also: > http://lists.osmocom.org/pipermail/openbsc/2016-March/008207.html > and > https://sourceforge.net/p/libdbi/mailman/message/32607036/ > > > One suggested fix is given below. Please modify the fix as you would like to have it. > It's here just to demonstrate the problem and one way to fix it. > > > Index: libdbi-drivers/drivers/sqlite3/dbd_sqlite3.c > =================================================================== > --- libdbi-drivers.orig/drivers/sqlite3/dbd_sqlite3.c 2016-05-11 21:13:28.927363294 +0200 > +++ libdbi-drivers/drivers/sqlite3/dbd_sqlite3.c 2016-05-11 21:14:13.412832180 +0200 > @@ -1451,15 +1451,15 @@ > break; > } > > - word_lower[item-start+1]; > - strncpy(word_lower,start,item-start); > - word_lower[item-start] = '\0'; > + char word_lower2[item-start+1]; > + strncpy(word_lower2,start,item-start); > + word_lower2[item-start] = '\0'; > int i = 0; > - while (word_lower[i]) { > - word_lower[i] = tolower(word_lower[i]); > + while (word_lower2[i]) { > + word_lower2[i] = tolower(word_lower2[i]); > i++; > } > - if ( strcmp("join",word_lower) == 0 ) { > + if ( strcmp("join",word_lower2) == 0 ) { > //printf("stop skip after join found\n"); > // we have found the next join, stop skipping > join_flag = 1; > @@ -1467,7 +1467,7 @@ > break; > } > for ( i = 0 ; i < (sizeof(endwords)/sizeof *(endwords)) ; i++ ) { > - if ( strcmp(endwords[i],word_lower) == 0 ) { > + if ( strcmp(endwords[i],word_lower2) == 0 ) { > /* printf("end word!\n"); */ > return index; > } > > > > Best regards, > Ruben |
|
From: Ruben U. <rub...@gm...> - 2016-05-11 19:26:09
|
Hi, I've identified a memory problem which is causing segmentation faults when running the test suite of OpenBSC which links with libdbd. See also: http://lists.osmocom.org/pipermail/openbsc/2016-March/008207.html and https://sourceforge.net/p/libdbi/mailman/message/32607036/ One suggested fix is given below. Please modify the fix as you would like to have it. It's here just to demonstrate the problem and one way to fix it. Index: libdbi-drivers/drivers/sqlite3/dbd_sqlite3.c =================================================================== --- libdbi-drivers.orig/drivers/sqlite3/dbd_sqlite3.c 2016-05-11 21:13:28.927363294 +0200 +++ libdbi-drivers/drivers/sqlite3/dbd_sqlite3.c 2016-05-11 21:14:13.412832180 +0200 @@ -1451,15 +1451,15 @@ break; } - word_lower[item-start+1]; - strncpy(word_lower,start,item-start); - word_lower[item-start] = '\0'; + char word_lower2[item-start+1]; + strncpy(word_lower2,start,item-start); + word_lower2[item-start] = '\0'; int i = 0; - while (word_lower[i]) { - word_lower[i] = tolower(word_lower[i]); + while (word_lower2[i]) { + word_lower2[i] = tolower(word_lower2[i]); i++; } - if ( strcmp("join",word_lower) == 0 ) { + if ( strcmp("join",word_lower2) == 0 ) { //printf("stop skip after join found\n"); // we have found the next join, stop skipping join_flag = 1; @@ -1467,7 +1467,7 @@ break; } for ( i = 0 ; i < (sizeof(endwords)/sizeof *(endwords)) ; i++ ) { - if ( strcmp(endwords[i],word_lower) == 0 ) { + if ( strcmp(endwords[i],word_lower2) == 0 ) { /* printf("end word!\n"); */ return index; } Best regards, Ruben |
|
From: Markus H. <mar...@mh...> - 2016-02-26 22:50:39
|
On 2016-02-26 20:58, Shakti Tripathy was heard to say: > Hi > > I am trying to use the DB2 driver in libdbi-drivers-0.9.0 with the libdbi-0.9.0 library. Libdbi is used by collectd's (https://collectd.org/ [1]) dbi plugin. > I am interested in using this for DB2 - please could some one suggest how I can use this driver? When I run collectd I get this issue: > > libdbi: Failed to load driver: /usr/local/lib/dbd/libdbddb2.so > > But ldd doesn't indicate any issues with this shared lib. > > ldd /usr/local/lib/dbd/libdbddb2.so -> > linux-vdso.so.1 => (0x00002aaaaaaab000) > libdb2.so.1 => /home/db2inst1/sqllib/lib64/libdb2.so.1 (0x00002aaaaacb4000) > libdbi.so.1 => /usr/local/lib/libdbi.so.1 (0x00002aaaadd8b000) > libdl.so.2 => /lib64/libdl.so.2 (0x00002aaaadfad000) > libm.so.6 => /lib64/libm.so.6 (0x00002aaaae1b1000) > libc.so.6 => /lib64/libc.so.6 (0x00002aaaae436000) > libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002aaaae7cb000) > libpthread.so.0 => /lib64/libpthread.so.0 (0x00002aaaaea02000) > libpam.so.0 => /lib64/libpam.so.0 (0x00002aaaaec1f000) > libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00002aaaaee2e000) > libdb2dascmn.so.1 => /home/db2inst1/sqllib/lib64/libdb2dascmn.so.1 (0x00002aaaaf181000) > libdb2g11n.so.1 => /home/db2inst1/sqllib/lib64/libdb2g11n.so.1 (0x00002aaaaf3ae000) > libdb2genreg.so.1 => /home/db2inst1/sqllib/lib64/libdb2genreg.so.1 (0x00002aaaafd77000) > libdb2install.so.1 => /home/db2inst1/sqllib/lib64/libdb2install.so.1 (0x00002aaaaffbe000) > libdb2locale.so.1 => /home/db2inst1/sqllib/lib64/libdb2locale.so.1 (0x00002aaab01c9000) > libdb2osse.so.1 => /home/db2inst1/sqllib/lib64/libdb2osse.so.1 (0x00002aaab03f1000) > libdb2osse_db2.so.1 => /home/db2inst1/sqllib/lib64/libdb2osse_db2.so.1 (0x00002aaab0b98000) > libdb2sdbin.so.1 => /home/db2inst1/sqllib/lib64/libdb2sdbin.so.1 (0x00002aaab0e25000) > libdb2trcapi.so.1 => /home/db2inst1/sqllib/lib64/libdb2trcapi.so.1 (0x00002aaab10c0000) > libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002aaab12da000) > libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002aaab15e0000) > /lib64/ld-linux-x86-64.so.2 (0x0000003be3000000) > libfreebl3.so => /lib64/libfreebl3.so (0x00002aaab17f7000) > libaudit.so.1 => /lib64/libaudit.so.1 (0x00002aaab19fa000) > libz.so.1 => /lib64/libz.so.1 (0x00002aaab1c1d000) > librt.so.1 => /lib64/librt.so.1 (0x00002aaab1e34000) > > Thank you > Best regards, > Shakti Hi, looks like the current db2 driver code has not yet been updated to the latest driver API. In other words, the driver fails to load because it lacks functions considered essential by libdbi. This is not a linker issue, therefore your ldd output is perfectly fine. There were a couple of major changes in the past, including the introduction of instances and of reentrant functions wherever this is needed. As none of the more or less active developers seems to run db2, there was no chance to update this driver. If you have some programming skills, you may use any of the officially supported drivers, such as mysql, as a guidance to retrofit these changes to the db2 driver. best regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 Links: ------ [1] https://collectd.org/ |
|
From: Shakti T. <TRI...@ie...> - 2016-02-26 20:29:14
|
Hi I am trying to use the DB2 driver in libdbi-drivers-0.9.0 with the libdbi-0.9.0 library. Libdbi is used by collectd's (https://collectd.org/ ) dbi plugin. I am interested in using this for DB2 - please could some one suggest how I can use this driver? When I run collectd I get this issue: libdbi: Failed to load driver: /usr/local/lib/dbd/libdbddb2.so But ldd doesn't indicate any issues with this shared lib. ldd /usr/local/lib/dbd/libdbddb2.so -> linux-vdso.so.1 => (0x00002aaaaaaab000) libdb2.so.1 => /home/db2inst1/sqllib/lib64/libdb2.so.1 (0x00002aaaaacb4000) libdbi.so.1 => /usr/local/lib/libdbi.so.1 (0x00002aaaadd8b000) libdl.so.2 => /lib64/libdl.so.2 (0x00002aaaadfad000) libm.so.6 => /lib64/libm.so.6 (0x00002aaaae1b1000) libc.so.6 => /lib64/libc.so.6 (0x00002aaaae436000) libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00002aaaae7cb000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00002aaaaea02000) libpam.so.0 => /lib64/libpam.so.0 (0x00002aaaaec1f000) libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00002aaaaee2e000) libdb2dascmn.so.1 => /home/db2inst1/sqllib/lib64/libdb2dascmn.so.1 (0x00002aaaaf181000) libdb2g11n.so.1 => /home/db2inst1/sqllib/lib64/libdb2g11n.so.1 (0x00002aaaaf3ae000) libdb2genreg.so.1 => /home/db2inst1/sqllib/lib64/libdb2genreg.so.1 (0x00002aaaafd77000) libdb2install.so.1 => /home/db2inst1/sqllib/lib64/libdb2install.so.1 (0x00002aaaaffbe000) libdb2locale.so.1 => /home/db2inst1/sqllib/lib64/libdb2locale.so.1 (0x00002aaab01c9000) libdb2osse.so.1 => /home/db2inst1/sqllib/lib64/libdb2osse.so.1 (0x00002aaab03f1000) libdb2osse_db2.so.1 => /home/db2inst1/sqllib/lib64/libdb2osse_db2.so.1 (0x00002aaab0b98000) libdb2sdbin.so.1 => /home/db2inst1/sqllib/lib64/libdb2sdbin.so.1 (0x00002aaab0e25000) libdb2trcapi.so.1 => /home/db2inst1/sqllib/lib64/libdb2trcapi.so.1 (0x00002aaab10c0000) libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00002aaab12da000) libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00002aaab15e0000) /lib64/ld-linux-x86-64.so.2 (0x0000003be3000000) libfreebl3.so => /lib64/libfreebl3.so (0x00002aaab17f7000) libaudit.so.1 => /lib64/libaudit.so.1 (0x00002aaab19fa000) libz.so.1 => /lib64/libz.so.1 (0x00002aaab1c1d000) librt.so.1 => /lib64/librt.so.1 (0x00002aaab1e34000) Thank you Best regards, Shakti |
|
From: Kjell I. <kj...@sp...> - 2015-09-24 09:21:41
|
On 09/24/2015 12:55 AM, Jan Engelhardt wrote: > On Wednesday 2015-09-23 22:11, Mike Rylander wrote: > >> We use the C tm struct to hold parsed timestamps on the way to returning a >> time_t, and the tm_usec field is not available per the standard[1] > The reason libdbi gained 'struct tm' was to support dates before the > epoch. > >> though some C libraries define it. I think a reasonable API extension would >> be a function to read the microseconds part of a timestamp field, separate > >from the time_t value. > > nanoseconds, if anything. Isn't struct timespec standard these days? At least if you have nanosleep() you also have struct timespec. I would suggest adding something like dbi_result_get_timespec() and keep the dbi_result_get_datetime() for compatibility. Also, it should not be impossible to make the source compile on systems where timespec is not available, and not providing a dbi_result_get_timespec() on these systems. --Kjell CONFIDENTIALITY This e-mail and any attachment contain KONGSBERG information which may be proprietary, confidential or subject to export regulations, and is only meant for the intended recipient(s). Any disclosure, copying, distribution or use is prohibited, if not otherwise explicitly agreed with KONGSBERG. If received in error, please delete it immediately from your system and notify the sender properly. |
|
From: Jan E. <je...@in...> - 2015-09-23 23:11:31
|
On Wednesday 2015-09-23 22:11, Mike Rylander wrote: >We use the C tm struct to hold parsed timestamps on the way to returning a >time_t, and the tm_usec field is not available per the standard[1] The reason libdbi gained 'struct tm' was to support dates before the epoch. >though some C libraries define it. I think a reasonable API extension would >be a function to read the microseconds part of a timestamp field, separate >from the time_t value. nanoseconds, if anything. |
|
From: Mike R. <mry...@gm...> - 2015-09-23 20:11:35
|
We use the C tm struct to hold parsed timestamps on the way to returning a time_t, and the tm_usec field is not available per the standard[1] even though some C libraries define it. I think a reasonable API extension would be a function to read the microseconds part of a timestamp field, separate from the time_t value. It's likely that a pseudo-time such as 'now' was was used to generate the stored timestamps. [1] http://pubs.opengroup.org/onlinepubs/007908775/xsh/time.h.html Hope that helps, -- Mike Rylander | President | Equinox Software, Inc. / The Open Source Experts | phone: 1-877-OPEN-ILS (673-6457) | email: mi...@es... | web: http://www.esilibrary.com On Wed, Sep 23, 2015 at 1:21 AM, Kjell Irgens <kj...@sp...> wrote: > Hi, > > I use libdbi to access a database in some software I have made at work. > The database is postgresql. In one of the tables I need to have higher > time resolution than just whole seconds. The dbi_result_get_datetime() > function fetches data as time_t: > > > http://libdbi.sourceforge.net/docs/programmers-guide/reference-field.html#DBI-RESULT-GET-DATETIME > > I have had to create a column nsec in my table to hold the > fraction-of-a-second information. This is what I get when I do a query > from psql: > > SELECT time,nsec FROM prop LIMIT 1 > time | nsec > ------------------------------------- > 2015-09-22 20:46:11.843 | 842523000 > > Inserts were done via libdbi. So clearly libdbi has passed on more than > whole second precition to postgresql. Postgresql stores microseconds in > the timestamp type: > > http://www.postgresql.org/docs/9.1/static/datatype-datetime.html > > I would be very nice somehow to be able to pull this information out, and > get rid of the extra nsec column. Is that possible? > > --Kjell > > > > CONFIDENTIALITY > This e-mail and any attachment contain KONGSBERG information which may be > proprietary, confidential or subject to export regulations, and is only > meant > for the intended recipient(s). Any disclosure, copying, distribution or > use is > prohibited, if not otherwise explicitly agreed with KONGSBERG. If received > in > error, please delete it immediately from your system and notify the sender > properly. > > > > ------------------------------------------------------------------------------ > Monitor Your Dynamic Infrastructure at Any Scale With Datadog! > Get real-time metrics from all of your servers, apps and tools > in one place. > SourceForge users - Click here to start your Free Trial of Datadog now! > http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140 > _______________________________________________ > Libdbi-drivers-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/libdbi-drivers-devel > |
|
From: Kjell I. <kj...@sp...> - 2015-09-23 05:43:50
|
Hi, I use libdbi to access a database in some software I have made at work. The database is postgresql. In one of the tables I need to have higher time resolution than just whole seconds. The dbi_result_get_datetime() function fetches data as time_t: http://libdbi.sourceforge.net/docs/programmers-guide/reference-field.html#DBI-RESULT-GET-DATETIME I have had to create a column nsec in my table to hold the fraction-of-a-second information. This is what I get when I do a query from psql: SELECT time,nsec FROM prop LIMIT 1 time | nsec ------------------------------------- 2015-09-22 20:46:11.843 | 842523000 Inserts were done via libdbi. So clearly libdbi has passed on more than whole second precition to postgresql. Postgresql stores microseconds in the timestamp type: http://www.postgresql.org/docs/9.1/static/datatype-datetime.html I would be very nice somehow to be able to pull this information out, and get rid of the extra nsec column. Is that possible? --Kjell CONFIDENTIALITY This e-mail and any attachment contain KONGSBERG information which may be proprietary, confidential or subject to export regulations, and is only meant for the intended recipient(s). Any disclosure, copying, distribution or use is prohibited, if not otherwise explicitly agreed with KONGSBERG. If received in error, please delete it immediately from your system and notify the sender properly. |
|
From: Markus H. <mar...@mh...> - 2015-05-12 07:36:36
|
At 2015-05-11 09:53, Simon Tiong was heard to say: > On 8/5/2015 9:01 PM, Markus Hoenicka wrote: > > At 2015-05-08 03:33, Simon Tiong was heard to say: > On 8/5/2015 7:38 AM, mar...@mh... wrote: > > Simon Tiong writes: >> Dear All, >> >> I try to compile libdbi-drivers on centos 5.9 to work with sqlite3.Can >> anyone advice me ? Below is the error message that i get. >> >> >> [root@localhost libdbi-drivers-0.9.0]# make >> make all-recursive >> make[1]: Entering directory `/root/libdbi-drivers-0.9.0' >> Making all in drivers >> make[2]: Entering directory `/root/libdbi-drivers-0.9.0/drivers' >> Making all in mysql >> make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/mysql' >> make[3]: Nothing to be done for `all'. >> make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/mysql' >> Making all in pgsql >> make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/pgsql' >> make[3]: Nothing to be done for `all'. >> make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/pgsql' >> Making all in sqlite >> make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/sqlite' >> make[3]: Nothing to be done for `all'. >> make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/sqlite' >> Making all in sqlite3 >> make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/sqlite3' >> /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. >> -I../.. -I../.. -I../../include >> -DDBDIR="/usr/local/var/lib/libdbi/sqlite3" -std=gnu99 -MT >> dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c -o dbd_sqlite3.lo >> dbd_sqlite3.c >> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. >> -I../../include -DDBDIR="/usr/local/var/lib/libdbi/sqlite3" -std=gnu99 >> -MT dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c dbd_sqlite3.c >> -fPIC -DPIC -o .libs/dbd_sqlite3.o >> dbd_sqlite3.c: In function '_real_dbd_connect': >> dbd_sqlite3.c:172: error: 'DBI_ERROR_CLIENT' undeclared (first use in >> this function) >> dbd_sqlite3.c:172: error: (Each undeclared identifier is reported only once >> dbd_sqlite3.c:172: error: for each function it appears in.) >> dbd_sqlite3.c: At top level: >> dbd_sqlite3.c:316: error: conflicting types for 'dbd_goto_row' >> /usr/include/dbi/dbd.h:41: error: previous declaration of 'dbd_goto_row' >> was here >> dbd_sqlite3.c: In function 'dbd_list_dbs': >> dbd_sqlite3.c:404: error: 'DBI_ERROR_CLIENT' undeclared (first use in >> this function) >> dbd_sqlite3.c:409: warning: implicit declaration of function >> '_dirent_buf_size' >> dbd_sqlite3.c: In function 'dbd_list_tables': >> dbd_sqlite3.c:504: error: 'dbi_inst' undeclared (first use in this function) >> dbd_sqlite3.c:504: error: expected ';' before 'instance' >> dbd_sqlite3.c:513: error: 'instance' undeclared (first use in this function) >> dbd_sqlite3.c:513: warning: implicit declaration of function >> 'dbi_driver_get_instance' >> dbd_sqlite3.c:514: warning: implicit declaration of function >> 'dbi_conn_new_r' >> dbd_sqlite3.c:514: warning: assignment makes pointer from integer >> without a cast >> make[3]: *** [dbd_sqlite3.lo] Error 1 >> make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/sqlite3' >> make[2]: *** [all-recursive] Error 1 >> make[2]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers' >> make[1]: *** [all-recursive] Error 1 >> make[1]: Leaving directory `/root/libdbi-drivers-0.9.0' >> make: *** [all] Error 2 >> >> Thank For help. >> > > Hi Simon, > > this kind of error usually happens when libdbi and libdbi-drivers are > out of sync, or if more than one version of libdbi is installed and > libdbi-drivers picks up the wrong headers during compilation. Please > verify that your libdbi installation is at 0.9.0 or later as well, and > remove any outdated headers. > > regards, > Markus > > Hi Markus, > > Thank you for advices. I solved it with uninstall libdbi & libdbi-drives version which in rpm, and install libdbi 0.9 and libdbi-drives 0.9 . > > This is my step: > > Install libdbi-0.9.0: > ./configure > make > Make install > > Install libdbi-drivers-0.9.0 > [root@localhost libdbi-drivers-0.9.0]# ./configure --with-sqlite3 (RESULT SUCCEEDED DURING MAKE) > but ./configure --with-sqlite3 --with-mysql (not success during make) > > checking dbi/dbi.h presence... yes > checking for dbi/dbi.h... yes > checking for MySQL support... yes > checking for mysql_config... yes > checking for MySQL includes... -I/usr/include/mysql > checking for MySQL libraries... > checking for PostgreSQL support... no > checking for SQLite support... no > checking for SQLite3 support... yes > checking sqlite3.h usability... yes > checking sqlite3.h presence... yes > checking for sqlite3.h... yes > > error during MAKE: > Attached with ryslog.log > > Please guide me. Thank You. Have a nice day. Hi, this error is a bit weird. The official tarballs contain the documentation so make should not try to build them. The SGML setup on your box appears to be broke, all it takes is probably some tweaking of your SGML_CATALOG_FILES environment variable or of your catalogs proper. In any case, if you don't need the docs installed locally (they are available on the libdbi-drivers homepage), you can use the --disable-docs configure switch to disable building the docs. hope this helps Markus -- Markus Hoenicka http://www.mhoenicka.de [1] AQ score 38 HI Markus, Thank you for the advice, Now i could successfully build it. but i get some error during make check. I wonder why it failed at .PLUGINS/LIBDBDMYSQL.SO Can you advice me? [root@localhost dbd]# cd /root/rsyslog/libdbi-drivers-0.9.0 [root@localhost libdbi-drivers-0.9.0]# make check Making check in drivers make[1]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers' Making check in mysql make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/mysql' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/mysql' Making check in pgsql make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/pgsql' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/pgsql' Making check in sqlite make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/sqlite' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/sqlite' Making check in sqlite3 make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/sqlite3' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/sqlite3' Making check in msql make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/msql' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/msql' Making check in oracle make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/oracle' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/oracle' Making check in firebird make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/firebird' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/firebird' Making check in freetds make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/freetds' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/freetds' Making check in ingres make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/ingres' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/ingres' Making check in db2 make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/db2' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/db2' make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers' make[2]: Nothing to be done for `check-am'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers' make[1]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers' Making check in tests make[1]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' Making check in cgreen make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/tests/cgreen' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/tests/cgreen' make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' make libtest_dbi_plugin.la test_dbi test_dbi_dlopen make[3]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' make[3]: `libtest_dbi_plugin.la' is up to date. make[3]: `test_dbi' is up to date. make[3]: `test_dbi_dlopen' is up to date. make[3]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' make check-TESTS make[3]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' Installing MySQL system tables... OK Filling help tables... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h password 'new-password' Alternatively you can run: /usr/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd mysql-test ; perl mysql-test-run.pl Please report any problems with the /usr/bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com [2] Support MySQL by buying support/licenses at http://shop.mysql.com [3] InnoDB: The first specified data file ./ibdata1 did not exist: InnoDB: a new database to be created! 150507 19:09:29 InnoDB: Setting file ./ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 150507 19:09:29 InnoDB: Log file ./ib_logfile0 did not exist: new to be created InnoDB: Setting log file ./ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait... 150507 19:09:29 InnoDB: Log file ./ib_logfile1 did not exist: new to be created InnoDB: Setting log file ./ib_logfile1 size to 5 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 150507 19:09:29 InnoDB: Started; log sequence number 0 0 150507 19:09:29 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.0.95' socket: '/root/rsyslog/libdbi-drivers-0.9.0/tests/tmpv14034/mysql.sock' port: 0 Source distribution pinging mysqld.mysqld is alive libdbi-drivers test program: $Id: test_dbi.c,v 1.72 2013/02/24 15:06:57 mhoenicka Exp $ test instance-based (i) or legacy (l) libdbi interface? [i] log query (y|n)? [n] libdbi driver directory? [/usr/local/lib/dbd] 1 drivers available: mysql test which driver? database administrator name? database administrator password? database hostname? [(blank for local socket if possible)] database name? [libdbitest] encoding? [] Connection information: -------------------- Legacy mode: 0 Log query: 0 Driverdir: ../drivers/mysql/.libs Drivername: mysql Dbdir: Initial Database: mysql Database: libdbitest Username: root Password: Hostname: localhost Version: Initial tables schema: CREATE TABLE test_datatypes ( the_char TINYINT,the_uchar TINYINT,the_short SMALLINT,the_ushort SMALLINT,the_long INT,the_ulong INT,the_longlong BIGINT,the_ulonglong BIGINT,the_float FLOAT4,the_double FLOAT8,the_conn_quoted_string VARCHAR(255),the_conn_quoted_string_copy VARCHAR(255),the_conn_escaped_string VARCHAR(255),the_conn_escaped_string_copy VARCHAR(255),the_numstring VARCHAR(255),the_empty_string VARCHAR(255),the_null_string VARCHAR(255),the_binary_quoted_string BLOB,the_binary_escaped_string BLOB,the_datetime DATETIME,the_datetime_tz DATETIME,the_date DATE,the_time TIME,the_time_tz TIME,id INT AUTO_INCREMENT,PRIMARY KEY (id)) ENGINE=InnoDB Initial sub schema: 0: 1: 2: 3: 4: Initial data schema: INSERT INTO test_datatypes (the_char,the_uchar,the_short,the_ushort,the_long,the_ulong,the_longlong,the_ulonglong,the_float,the_double,the_conn_quoted_string,the_conn_quoted_string_copy,the_conn_escaped_string,the_conn_escaped_string_copy,the_numstring,the_empty_string,the_null_string,the_binary_quoted_string,the_binary_escaped_string,the_datetime,the_datetime_tz,the_date,the_time,the_time_tz) VALUES (-127,127,-32768,32767,-2147483648,2147483647,-9223372036854775807,9223372036854775807,3.402823466E+38,1.7976931348623157E+307,'Can ''we'' "quote" this properly?','Can ''we'' "quote" this properly?','Can ''we'' "escape" this properly?','Can ''we'' "escape" this properly?','-54321','',NULL,'ABC'D','ABC'D','2001-12-31 23:59:59','2001-12-31 23:59:59 -10:00','2001-12-31','23:59:59','23:59:59-10:00') Begin tests: -------------------- Running "libdbi framework test"... Completed "libdbi framework test": 413 passes, 0 failures, 0 exceptions. 150507 19:09:33 [Note] /usr/libexec/mysqld: Normal shutdown 150507 19:09:33 InnoDB: Starting shutdown... 150507 19:09:35 InnoDB: Shutdown completed; log sequence number 0 788643 150507 19:09:35 [Note] /usr/libexec/mysqld: Shutdown complete PASS: test_mysql.sh create symbolic link `/root/rsyslog/libdbi-drivers-0.9.0/tests/.plugins/libdbdmysql.so' to `/root/rsyslog/libdbi-drivers-0.9.0/drivers/mysql/.libs/libdbdmysql.so' LIBDBI: FAILED TO LOAD DRIVER: .PLUGINS/LIBDBDMYSQL.SO EITHER YOU HAVE NO DRIVERS IN .PLUGINS , OR THERE WAS A PROBLEM LOADING THEM. FAIL: TEST_LIBDBI.SH =================== 1 of 2 tests failed =================== make[3]: *** [check-TESTS] Error 1 make[3]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' make[2]: *** [check-am] Error 2 make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' make: *** [check-recursive] Error 1 Thank You. Hi, I haven't seen this error yet. Do you have write permissions in the directory where the symlink is to be created? The weird thing is why this symlink is created *after* the test succeeds. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 Links: ------ [1] http://www.mhoenicka.de [2] http://www.mysql.com [3] http://shop.mysql.com |
|
From: Simon T. <sim...@sa...> - 2015-05-11 07:54:03
|
On 8/5/2015 9:01 PM, Markus Hoenicka wrote: > > At 2015-05-08 03:33, Simon Tiong was heard to say: > >> On 8/5/2015 7:38 AM, mar...@mh... wrote: >>> Simon Tiong writes: >>> > Dear All, >>> > >>> > I try to compile libdbi-drivers on centos 5.9 to work with sqlite3.Can >>> > anyone advice me ? Below is the error message that i get. >>> > >>> > >>> > [root@localhost libdbi-drivers-0.9.0]# make >>> > make all-recursive >>> > make[1]: Entering directory `/root/libdbi-drivers-0.9.0' >>> > Making all in drivers >>> > make[2]: Entering directory `/root/libdbi-drivers-0.9.0/drivers' >>> > Making all in mysql >>> > make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/mysql' >>> > make[3]: Nothing to be done for `all'. >>> > make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/mysql' >>> > Making all in pgsql >>> > make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/pgsql' >>> > make[3]: Nothing to be done for `all'. >>> > make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/pgsql' >>> > Making all in sqlite >>> > make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/sqlite' >>> > make[3]: Nothing to be done for `all'. >>> > make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/sqlite' >>> > Making all in sqlite3 >>> > make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/sqlite3' >>> > /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. >>> > -I../.. -I../.. -I../../include >>> > -DDBDIR=\"/usr/local/var/lib/libdbi/sqlite3\" -std=gnu99 -MT >>> > dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c -o dbd_sqlite3.lo >>> > dbd_sqlite3.c >>> > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. >>> > -I../../include -DDBDIR=\"/usr/local/var/lib/libdbi/sqlite3\" -std=gnu99 >>> > -MT dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c dbd_sqlite3.c >>> > -fPIC -DPIC -o .libs/dbd_sqlite3.o >>> > dbd_sqlite3.c: In function '_real_dbd_connect': >>> > dbd_sqlite3.c:172: error: 'DBI_ERROR_CLIENT' undeclared (first use in >>> > this function) >>> > dbd_sqlite3.c:172: error: (Each undeclared identifier is reported only once >>> > dbd_sqlite3.c:172: error: for each function it appears in.) >>> > dbd_sqlite3.c: At top level: >>> > dbd_sqlite3.c:316: error: conflicting types for 'dbd_goto_row' >>> > /usr/include/dbi/dbd.h:41: error: previous declaration of 'dbd_goto_row' >>> > was here >>> > dbd_sqlite3.c: In function 'dbd_list_dbs': >>> > dbd_sqlite3.c:404: error: 'DBI_ERROR_CLIENT' undeclared (first use in >>> > this function) >>> > dbd_sqlite3.c:409: warning: implicit declaration of function >>> > '_dirent_buf_size' >>> > dbd_sqlite3.c: In function 'dbd_list_tables': >>> > dbd_sqlite3.c:504: error: 'dbi_inst' undeclared (first use in this function) >>> > dbd_sqlite3.c:504: error: expected ';' before 'instance' >>> > dbd_sqlite3.c:513: error: 'instance' undeclared (first use in this function) >>> > dbd_sqlite3.c:513: warning: implicit declaration of function >>> > 'dbi_driver_get_instance' >>> > dbd_sqlite3.c:514: warning: implicit declaration of function >>> > 'dbi_conn_new_r' >>> > dbd_sqlite3.c:514: warning: assignment makes pointer from integer >>> > without a cast >>> > make[3]: *** [dbd_sqlite3.lo] Error 1 >>> > make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/sqlite3' >>> > make[2]: *** [all-recursive] Error 1 >>> > make[2]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers' >>> > make[1]: *** [all-recursive] Error 1 >>> > make[1]: Leaving directory `/root/libdbi-drivers-0.9.0' >>> > make: *** [all] Error 2 >>> > >>> > Thank For help. >>> > >>> >>> Hi Simon, >>> >>> this kind of error usually happens when libdbi and libdbi-drivers are >>> out of sync, or if more than one version of libdbi is installed and >>> libdbi-drivers picks up the wrong headers during compilation. Please >>> verify that your libdbi installation is at 0.9.0 or later as well, and >>> remove any outdated headers. >>> >>> regards, >>> Markus >>> >> Hi Markus, >> >> Thank you for advices. I solved it with uninstall libdbi & >> libdbi-drives version which in rpm, and install libdbi 0.9 and >> libdbi-drives 0.9 . >> >> This is my step: >> >> Install libdbi-0.9.0: >> ./configure >> make >> Make install >> >> >> Install libdbi-drivers-0.9.0 >> [root@localhost libdbi-drivers-0.9.0]# ./configure --with-sqlite3 >> (*Result Succeeded during make*) >> but ./configure --with-sqlite3 --with-mysql (not success during make) >> >> checking dbi/dbi.h presence... yes >> checking for dbi/dbi.h... yes >> checking for MySQL support... yes >> checking for mysql_config... yes >> checking for MySQL includes... -I/usr/include/mysql >> checking for MySQL libraries... >> checking for PostgreSQL support... no >> checking for SQLite support... no >> checking for SQLite3 support... yes >> checking sqlite3.h usability... yes >> checking sqlite3.h presence... yes >> checking for sqlite3.h... yes >> >> error during *make*: >> Attached with ryslog.log >> >> Please guide me. Thank You. Have a nice day. >> >> >> >> >> >> > Hi, > > this error is a bit weird. The official tarballs contain the > documentation so make should not try to build them. The SGML setup on > your box appears to be broke, all it takes is probably some tweaking > of your SGML_CATALOG_FILES environment variable or of your catalogs > proper. In any case, if you don't need the docs installed locally > (they are available on the libdbi-drivers homepage), you can use the > --disable-docs configure switch to disable building the docs. > > hope this helps > > Markus > > -- > Markus Hoenicka > http://www.mhoenicka.de > AQ score 38 HI Markus, Thank you for the advice, Now i could successfully build it. but i get some error during make check. I wonder why it failed at *.plugins/libdbdmysql.so* Can you advice me? [root@localhost dbd]# cd /root/rsyslog/libdbi-drivers-0.9.0 [root@localhost libdbi-drivers-0.9.0]# make check Making check in drivers make[1]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers' Making check in mysql make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/mysql' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/mysql' Making check in pgsql make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/pgsql' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/pgsql' Making check in sqlite make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/sqlite' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/sqlite' Making check in sqlite3 make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/sqlite3' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/sqlite3' Making check in msql make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/msql' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/msql' Making check in oracle make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/oracle' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/oracle' Making check in firebird make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/firebird' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/firebird' Making check in freetds make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/freetds' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/freetds' Making check in ingres make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/ingres' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/ingres' Making check in db2 make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/db2' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers/db2' make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers' make[2]: Nothing to be done for `check-am'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers' make[1]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/drivers' Making check in tests make[1]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' Making check in cgreen make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/tests/cgreen' make[2]: Nothing to be done for `check'. make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/tests/cgreen' make[2]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' make libtest_dbi_plugin.la test_dbi test_dbi_dlopen make[3]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' make[3]: `libtest_dbi_plugin.la' is up to date. make[3]: `test_dbi' is up to date. make[3]: `test_dbi_dlopen' is up to date. make[3]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' make check-TESTS make[3]: Entering directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' Installing MySQL system tables... OK Filling help tables... OK To start mysqld at boot time you have to copy support-files/mysql.server to the right place for your system PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER ! To do so, start the server, then issue the following commands: /usr/bin/mysqladmin -u root password 'new-password' /usr/bin/mysqladmin -u root -h password 'new-password' Alternatively you can run: /usr/bin/mysql_secure_installation which will also give you the option of removing the test databases and anonymous user created by default. This is strongly recommended for production servers. See the manual for more instructions. You can start the MySQL daemon with: cd /usr ; /usr/bin/mysqld_safe & You can test the MySQL daemon with mysql-test-run.pl cd mysql-test ; perl mysql-test-run.pl Please report any problems with the /usr/bin/mysqlbug script! The latest information about MySQL is available on the web at http://www.mysql.com Support MySQL by buying support/licenses at http://shop.mysql.com InnoDB: The first specified data file ./ibdata1 did not exist: InnoDB: a new database to be created! 150507 19:09:29 InnoDB: Setting file ./ibdata1 size to 10 MB InnoDB: Database physically writes the file full: wait... 150507 19:09:29 InnoDB: Log file ./ib_logfile0 did not exist: new to be created InnoDB: Setting log file ./ib_logfile0 size to 5 MB InnoDB: Database physically writes the file full: wait... 150507 19:09:29 InnoDB: Log file ./ib_logfile1 did not exist: new to be created InnoDB: Setting log file ./ib_logfile1 size to 5 MB InnoDB: Database physically writes the file full: wait... InnoDB: Doublewrite buffer not found: creating new InnoDB: Doublewrite buffer created InnoDB: Creating foreign key constraint system tables InnoDB: Foreign key constraint system tables created 150507 19:09:29 InnoDB: Started; log sequence number 0 0 150507 19:09:29 [Note] /usr/libexec/mysqld: ready for connections. Version: '5.0.95' socket: '/root/rsyslog/libdbi-drivers-0.9.0/tests/tmpv14034/mysql.sock' port: 0 Source distribution pinging mysqld.mysqld is alive libdbi-drivers test program: $Id: test_dbi.c,v 1.72 2013/02/24 15:06:57 mhoenicka Exp $ test instance-based (i) or legacy (l) libdbi interface? [i] log query (y|n)? [n] libdbi driver directory? [/usr/local/lib/dbd] 1 drivers available: mysql test which driver? database administrator name? database administrator password? database hostname? [(blank for local socket if possible)] database name? [libdbitest] encoding? [] Connection information: -------------------- Legacy mode: 0 Log query: 0 Driverdir: ../drivers/mysql/.libs Drivername: mysql Dbdir: Initial Database: mysql Database: libdbitest Username: root Password: Hostname: localhost Version: Initial tables schema: CREATE TABLE test_datatypes ( the_char TINYINT,the_uchar TINYINT,the_short SMALLINT,the_ushort SMALLINT,the_long INT,the_ulong INT,the_longlong BIGINT,the_ulonglong BIGINT,the_float FLOAT4,the_double FLOAT8,the_conn_quoted_string VARCHAR(255),the_conn_quoted_string_copy VARCHAR(255),the_conn_escaped_string VARCHAR(255),the_conn_escaped_string_copy VARCHAR(255),the_numstring VARCHAR(255),the_empty_string VARCHAR(255),the_null_string VARCHAR(255),the_binary_quoted_string BLOB,the_binary_escaped_string BLOB,the_datetime DATETIME,the_datetime_tz DATETIME,the_date DATE,the_time TIME,the_time_tz TIME,id INT AUTO_INCREMENT,PRIMARY KEY (id)) ENGINE=InnoDB Initial sub schema: 0: 1: 2: 3: 4: Initial data schema: INSERT INTO test_datatypes (the_char,the_uchar,the_short,the_ushort,the_long,the_ulong,the_longlong,the_ulonglong,the_float,the_double,the_conn_quoted_string,the_conn_quoted_string_copy,the_conn_escaped_string,the_conn_escaped_string_copy,the_numstring,the_empty_string,the_null_string,the_binary_quoted_string,the_binary_escaped_string,the_datetime,the_datetime_tz,the_date,the_time,the_time_tz) VALUES (-127,127,-32768,32767,-2147483648,2147483647,-9223372036854775807,9223372036854775807,3.402823466E+38,1.7976931348623157E+307,'Can ''we'' "quote" this properly?','Can ''we'' "quote" this properly?','Can ''we'' "escape" this properly?','Can ''we'' "escape" this properly?','-54321','',NULL,'AB\0C\'D','AB\0C\'D','2001-12-31 23:59:59','2001-12-31 23:59:59 -10:00','2001-12-31','23:59:59','23:59:59-10:00') Begin tests: -------------------- Running "libdbi framework test"... Completed "libdbi framework test": 413 passes, 0 failures, 0 exceptions. 150507 19:09:33 [Note] /usr/libexec/mysqld: Normal shutdown 150507 19:09:33 InnoDB: Starting shutdown... 150507 19:09:35 InnoDB: Shutdown completed; log sequence number 0 788643 150507 19:09:35 [Note] /usr/libexec/mysqld: Shutdown complete PASS: test_mysql.sh create symbolic link `/root/rsyslog/libdbi-drivers-0.9.0/tests/.plugins/libdbdmysql.so' to `/root/rsyslog/libdbi-drivers-0.9.0/drivers/mysql/.libs/libdbdmysql.so' *libdbi: Failed to load driver: .plugins/libdbdmysql.so* *Either you have no drivers in .plugins , or there was a problem loading them.** **FAIL: test_libdbi.sh* =================== 1 of 2 tests failed =================== make[3]: *** [check-TESTS] Error 1 make[3]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' make[2]: *** [check-am] Error 2 make[2]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' make[1]: *** [check-recursive] Error 1 make[1]: Leaving directory `/root/rsyslog/libdbi-drivers-0.9.0/tests' make: *** [check-recursive] Error 1 Thank You. |
|
From: Markus H. <mar...@mh...> - 2015-05-08 13:01:45
|
At 2015-05-08 03:33, Simon Tiong was heard to say: > On 8/5/2015 7:38 AM, mar...@mh... wrote: > >> Simon Tiong writes: >>> Dear All, >>> >>> I try to compile libdbi-drivers on centos 5.9 to work with sqlite3.Can >>> anyone advice me ? Below is the error message that i get. >>> >>> >>> [root@localhost libdbi-drivers-0.9.0]# make >>> make all-recursive >>> make[1]: Entering directory `/root/libdbi-drivers-0.9.0' >>> Making all in drivers >>> make[2]: Entering directory `/root/libdbi-drivers-0.9.0/drivers' >>> Making all in mysql >>> make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/mysql' >>> make[3]: Nothing to be done for `all'. >>> make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/mysql' >>> Making all in pgsql >>> make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/pgsql' >>> make[3]: Nothing to be done for `all'. >>> make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/pgsql' >>> Making all in sqlite >>> make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/sqlite' >>> make[3]: Nothing to be done for `all'. >>> make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/sqlite' >>> Making all in sqlite3 >>> make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/sqlite3' >>> /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. >>> -I../.. -I../.. -I../../include >>> -DDBDIR="/usr/local/var/lib/libdbi/sqlite3" -std=gnu99 -MT >>> dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c -o dbd_sqlite3.lo >>> dbd_sqlite3.c >>> libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. >>> -I../../include -DDBDIR="/usr/local/var/lib/libdbi/sqlite3" -std=gnu99 >>> -MT dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c dbd_sqlite3.c >>> -fPIC -DPIC -o .libs/dbd_sqlite3.o >>> dbd_sqlite3.c: In function '_real_dbd_connect': >>> dbd_sqlite3.c:172: error: 'DBI_ERROR_CLIENT' undeclared (first use in >>> this function) >>> dbd_sqlite3.c:172: error: (Each undeclared identifier is reported only once >>> dbd_sqlite3.c:172: error: for each function it appears in.) >>> dbd_sqlite3.c: At top level: >>> dbd_sqlite3.c:316: error: conflicting types for 'dbd_goto_row' >>> /usr/include/dbi/dbd.h:41: error: previous declaration of 'dbd_goto_row' >>> was here >>> dbd_sqlite3.c: In function 'dbd_list_dbs': >>> dbd_sqlite3.c:404: error: 'DBI_ERROR_CLIENT' undeclared (first use in >>> this function) >>> dbd_sqlite3.c:409: warning: implicit declaration of function >>> '_dirent_buf_size' >>> dbd_sqlite3.c: In function 'dbd_list_tables': >>> dbd_sqlite3.c:504: error: 'dbi_inst' undeclared (first use in this function) >>> dbd_sqlite3.c:504: error: expected ';' before 'instance' >>> dbd_sqlite3.c:513: error: 'instance' undeclared (first use in this function) >>> dbd_sqlite3.c:513: warning: implicit declaration of function >>> 'dbi_driver_get_instance' >>> dbd_sqlite3.c:514: warning: implicit declaration of function >>> 'dbi_conn_new_r' >>> dbd_sqlite3.c:514: warning: assignment makes pointer from integer >>> without a cast >>> make[3]: *** [dbd_sqlite3.lo] Error 1 >>> make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/sqlite3' >>> make[2]: *** [all-recursive] Error 1 >>> make[2]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers' >>> make[1]: *** [all-recursive] Error 1 >>> make[1]: Leaving directory `/root/libdbi-drivers-0.9.0' >>> make: *** [all] Error 2 >>> >>> Thank For help. >>> >> >> Hi Simon, >> >> this kind of error usually happens when libdbi and libdbi-drivers are >> out of sync, or if more than one version of libdbi is installed and >> libdbi-drivers picks up the wrong headers during compilation. Please >> verify that your libdbi installation is at 0.9.0 or later as well, and >> remove any outdated headers. >> >> regards, >> Markus > Hi Markus, > > Thank you for advices. I solved it with uninstall libdbi & libdbi-drives version which in rpm, and install libdbi 0.9 and libdbi-drives 0.9 . > > This is my step: > > Install libdbi-0.9.0: > ./configure > make > Make install > > Install libdbi-drivers-0.9.0 > [root@localhost libdbi-drivers-0.9.0]# ./configure --with-sqlite3 (RESULT SUCCEEDED DURING MAKE) > but ./configure --with-sqlite3 --with-mysql (not success during make) > > checking dbi/dbi.h presence... yes > checking for dbi/dbi.h... yes > checking for MySQL support... yes > checking for mysql_config... yes > checking for MySQL includes... -I/usr/include/mysql > checking for MySQL libraries... > checking for PostgreSQL support... no > checking for SQLite support... no > checking for SQLite3 support... yes > checking sqlite3.h usability... yes > checking sqlite3.h presence... yes > checking for sqlite3.h... yes > > error during MAKE: > Attached with ryslog.log > > Please guide me. Thank You. Have a nice day. Hi, this error is a bit weird. The official tarballs contain the documentation so make should not try to build them. The SGML setup on your box appears to be broke, all it takes is probably some tweaking of your SGML_CATALOG_FILES environment variable or of your catalogs proper. In any case, if you don't need the docs installed locally (they are available on the libdbi-drivers homepage), you can use the --disable-docs configure switch to disable building the docs. hope this helps Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 |
|
From: <mar...@mh...> - 2015-05-07 23:51:12
|
Simon Tiong writes: > Dear All, > > I try to compile libdbi-drivers on centos 5.9 to work with sqlite3.Can > anyone advice me ? Below is the error message that i get. > > > [root@localhost libdbi-drivers-0.9.0]# make > make all-recursive > make[1]: Entering directory `/root/libdbi-drivers-0.9.0' > Making all in drivers > make[2]: Entering directory `/root/libdbi-drivers-0.9.0/drivers' > Making all in mysql > make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/mysql' > make[3]: Nothing to be done for `all'. > make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/mysql' > Making all in pgsql > make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/pgsql' > make[3]: Nothing to be done for `all'. > make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/pgsql' > Making all in sqlite > make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/sqlite' > make[3]: Nothing to be done for `all'. > make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/sqlite' > Making all in sqlite3 > make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/sqlite3' > /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. > -I../.. -I../.. -I../../include > -DDBDIR=\"/usr/local/var/lib/libdbi/sqlite3\" -std=gnu99 -MT > dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c -o dbd_sqlite3.lo > dbd_sqlite3.c > libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. > -I../../include -DDBDIR=\"/usr/local/var/lib/libdbi/sqlite3\" -std=gnu99 > -MT dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c dbd_sqlite3.c > -fPIC -DPIC -o .libs/dbd_sqlite3.o > dbd_sqlite3.c: In function '_real_dbd_connect': > dbd_sqlite3.c:172: error: 'DBI_ERROR_CLIENT' undeclared (first use in > this function) > dbd_sqlite3.c:172: error: (Each undeclared identifier is reported only once > dbd_sqlite3.c:172: error: for each function it appears in.) > dbd_sqlite3.c: At top level: > dbd_sqlite3.c:316: error: conflicting types for 'dbd_goto_row' > /usr/include/dbi/dbd.h:41: error: previous declaration of 'dbd_goto_row' > was here > dbd_sqlite3.c: In function 'dbd_list_dbs': > dbd_sqlite3.c:404: error: 'DBI_ERROR_CLIENT' undeclared (first use in > this function) > dbd_sqlite3.c:409: warning: implicit declaration of function > '_dirent_buf_size' > dbd_sqlite3.c: In function 'dbd_list_tables': > dbd_sqlite3.c:504: error: 'dbi_inst' undeclared (first use in this function) > dbd_sqlite3.c:504: error: expected ';' before 'instance' > dbd_sqlite3.c:513: error: 'instance' undeclared (first use in this function) > dbd_sqlite3.c:513: warning: implicit declaration of function > 'dbi_driver_get_instance' > dbd_sqlite3.c:514: warning: implicit declaration of function > 'dbi_conn_new_r' > dbd_sqlite3.c:514: warning: assignment makes pointer from integer > without a cast > make[3]: *** [dbd_sqlite3.lo] Error 1 > make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/sqlite3' > make[2]: *** [all-recursive] Error 1 > make[2]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/root/libdbi-drivers-0.9.0' > make: *** [all] Error 2 > > Thank For help. > Hi Simon, this kind of error usually happens when libdbi and libdbi-drivers are out of sync, or if more than one version of libdbi is installed and libdbi-drivers picks up the wrong headers during compilation. Please verify that your libdbi installation is at 0.9.0 or later as well, and remove any outdated headers. regards, Markus -- Markus Hoenicka http://www.mhoenicka.de AQ score 38 |
|
From: Simon T. <sim...@sa...> - 2015-05-07 17:06:34
|
Dear All, I try to compile libdbi-drivers on centos 5.9 to work with sqlite3.Can anyone advice me ? Below is the error message that i get. [root@localhost libdbi-drivers-0.9.0]# make make all-recursive make[1]: Entering directory `/root/libdbi-drivers-0.9.0' Making all in drivers make[2]: Entering directory `/root/libdbi-drivers-0.9.0/drivers' Making all in mysql make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/mysql' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/mysql' Making all in pgsql make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/pgsql' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/pgsql' Making all in sqlite make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/sqlite' make[3]: Nothing to be done for `all'. make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/sqlite' Making all in sqlite3 make[3]: Entering directory `/root/libdbi-drivers-0.9.0/drivers/sqlite3' /bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -DDBDIR=\"/usr/local/var/lib/libdbi/sqlite3\" -std=gnu99 -MT dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c -o dbd_sqlite3.lo dbd_sqlite3.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../../include -DDBDIR=\"/usr/local/var/lib/libdbi/sqlite3\" -std=gnu99 -MT dbd_sqlite3.lo -MD -MP -MF .deps/dbd_sqlite3.Tpo -c dbd_sqlite3.c -fPIC -DPIC -o .libs/dbd_sqlite3.o dbd_sqlite3.c: In function '_real_dbd_connect': dbd_sqlite3.c:172: error: 'DBI_ERROR_CLIENT' undeclared (first use in this function) dbd_sqlite3.c:172: error: (Each undeclared identifier is reported only once dbd_sqlite3.c:172: error: for each function it appears in.) dbd_sqlite3.c: At top level: dbd_sqlite3.c:316: error: conflicting types for 'dbd_goto_row' /usr/include/dbi/dbd.h:41: error: previous declaration of 'dbd_goto_row' was here dbd_sqlite3.c: In function 'dbd_list_dbs': dbd_sqlite3.c:404: error: 'DBI_ERROR_CLIENT' undeclared (first use in this function) dbd_sqlite3.c:409: warning: implicit declaration of function '_dirent_buf_size' dbd_sqlite3.c: In function 'dbd_list_tables': dbd_sqlite3.c:504: error: 'dbi_inst' undeclared (first use in this function) dbd_sqlite3.c:504: error: expected ';' before 'instance' dbd_sqlite3.c:513: error: 'instance' undeclared (first use in this function) dbd_sqlite3.c:513: warning: implicit declaration of function 'dbi_driver_get_instance' dbd_sqlite3.c:514: warning: implicit declaration of function 'dbi_conn_new_r' dbd_sqlite3.c:514: warning: assignment makes pointer from integer without a cast make[3]: *** [dbd_sqlite3.lo] Error 1 make[3]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers/sqlite3' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/root/libdbi-drivers-0.9.0/drivers' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/root/libdbi-drivers-0.9.0' make: *** [all] Error 2 Thank For help. |
|
From: Jan E. <je...@in...> - 2014-05-03 18:34:18
|
On Friday 2014-05-02 00:55, Jan Engelhardt wrote:
>On Friday 2014-05-02 00:15, Markus Hoenicka wrote:
>>Am 2014-05-01 18:50, schrieb Jan Engelhardt:
>>> I have identified another bug and prepared a patch for
>>> dbd_mysql/dbd_msql. The purpose of result->currowidx was not totally
>>> clear-cut, so I am posting this patch for potential comments.
>>
>>[...] was designed to avoid an expensive call to mysql_data_seek()
>>in *every single* iteration of stepping through a result set. There
>>are data in the mailing list archives which show that MySQL is
>>slowed down abysmally [...]. It would be great if we could find a
>>way to synchronize result->currowidx with the DBD row pointer in a
>>cheaper way.
Indeed, I found that libmysql uses a singly-linked list. That is truly
abysmal, already from a design point.
I have this new patch, for libdbi this time. Looks better?
====
dbi: resolve bogus seeking into dbd
I have a query result that, when iteratively seeked with
dbi_result_next_row() and read with dbi_result_get_string(), yields
these 15 values (1-based row indices shown in parentheses):
B-W(1) BAY(2) BER(3) BRE(4) HAM(5) HES(6) M-V(7) NDS(8)
NRW(9) RLP(10) SAR(11) SAC(12) S-A(13) S-H(14) THU(15)
Now, when using dbi_result_seek_row() to seek to arbitrary rows
(given in parentheses), dbi_result_get_string() can return incorrect
values. In particular, I have observed:
B-W(1) S-H(14) B-W(1) THU(2)
What happens:
* row 1 is not already present, dbd_goto_row(1) is executed,
the row data retrieved, and result->currowidx set to 1
* row 14 is not already present, a goto_row(14) is executed,
the row data retrieved, and result->currowidx set to 14
* row 1 is already present, result->currowidx set to 1
* row 2 is not already present, dbd_goto_row(2) is NOT executed,
because of rowidx == currowidx + 1 [2 == 2].
So the next mysql row fetched is row 15, rather than 2.
result->currowidx is a high-level pointer that always gets updated.
But we do need to track the pointer that the DBD has, as well.
After applying this patch, the seeked results correctly yield:
B-W(1) S-H(14) B-W(1) BAY(2)
---
include/dbi/dbi-dev.h | 7 +++++++
src/dbd_helper.c | 1 +
src/dbi_result.c | 5 ++---
3 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/include/dbi/dbi-dev.h b/include/dbi/dbi-dev.h
index 0e21005..175cd7e 100644
--- a/include/dbi/dbi-dev.h
+++ b/include/dbi/dbi-dev.h
@@ -71,7 +71,14 @@ typedef struct dbi_result_s {
enum { NOTHING_RETURNED, ROWS_RETURNED } result_state;
dbi_row_t **rows; /* array of filled rows, elements set to NULL if not fetched yet */
+
+ /* Current row pointer index (1-based) for DBI. */
unsigned long long currowidx;
+ /*
+ * Current row pointer index (1-based) that is synchronized to what
+ * the current pointer inside the DBD.
+ */
+ unsigned long long dbd_currowidx;
} dbi_result_t;
typedef struct _field_binding_s {
diff --git a/src/dbd_helper.c b/src/dbd_helper.c
index 0c03408..d0a9360 100644
--- a/src/dbd_helper.c
+++ b/src/dbd_helper.c
@@ -78,6 +78,7 @@ dbi_result_t *_dbd_result_create(dbi_conn_t *conn, void *handle, unsigned long l
result->field_types = NULL;
result->field_attribs = NULL;
result->result_state = (numrows_matched > 0) ? ROWS_RETURNED : NOTHING_RETURNED;
+ /* result->rows[0] is intentionally unused; rows are in [1..n] */
result->rows = calloc(numrows_matched+1, sizeof(dbi_row_t *));
result->currowidx = 0;
diff --git a/src/dbi_result.c b/src/dbi_result.c
index 751e490..59e64d9 100644
--- a/src/dbi_result.c
+++ b/src/dbi_result.c
@@ -108,7 +108,7 @@ int dbi_result_seek_row(dbi_result Result, unsigned long long rowidx) {
}
/* row is one-based for the user, but zero-based to the dbd conn */
- retval = RESULT->conn->driver->functions->goto_row(RESULT, rowidx-1, RESULT->currowidx-1);
+ retval = RESULT->conn->driver->functions->goto_row(RESULT, rowidx-1, RESULT->dbd_currowidx-1);
if (retval == -1) {
_error_handler(RESULT->conn, DBI_ERROR_DBD);
return 0;
@@ -120,6 +120,7 @@ int dbi_result_seek_row(dbi_result Result, unsigned long long rowidx) {
}
RESULT->currowidx = rowidx;
+ RESULT->dbd_currowidx = rowidx;
_activate_bindings(RESULT);
return retval;
}
@@ -1789,8 +1790,6 @@ static unsigned int _find_field(dbi_result_t *result, const char *fieldname, dbi
}
static int _is_row_fetched(dbi_result_t *result, unsigned long long row) {
- /* Bull patch reported by Tom Lane */
- /* if (!result->rows || (row >= result->numrows_matched)) return -1; */
if (!result->rows || (row > result->numrows_matched)) return -1;
return !(result->rows[row] == NULL);
}
--
# Created with git-export-patch
|
|
From: Jan E. <je...@in...> - 2014-05-01 22:55:33
|
On Friday 2014-05-02 00:15, Markus Hoenicka wrote: >Am 2014-05-01 18:50, schrieb Jan Engelhardt: >> I have identified another bug and prepared a patch for >> dbd_mysql/dbd_msql. The purpose of result->currowidx was not totally >> clear-cut, so I am posting this patch for potential comments. > >[...] was designed to avoid an expensive call to mysql_data_seek() >in *every single* iteration of stepping through a result set. There >are data in the mailing list archives which show that MySQL is >slowed down abysmally [...]. It would be great if we could find a >way to synchronize result->currowidx with the DBD row pointer in a >cheaper way. That is the answer I was looking for. I can cook something up now :) |
|
From: Markus H. <mar...@mh...> - 2014-05-01 22:28:32
|
Am 2014-05-01 18:50, schrieb Jan Engelhardt:
> I have identified another bug and prepared a patch for
> dbd_mysql/dbd_msql. The purpose of result->currowidx was not totally
> clear-cut, so I am posting this patch for potential comments.
>
>
> parent 1619049a1e0eb018cdc8490f3cf344b4f2f53b0f ()
> commit 537c2673f36465c2700829130da4054f53354a00
> Author: Jan Engelhardt <je...@in...>
> Date: Thu May 1 18:04:47 2014 +0200
>
> dbd_mysql, dbd_msql: resolve bogus seeking and a crash
>
> I have a query result that, when iteratively seeked with
> dbi_result_next_row() and read with dbi_result_get_string(), yields
> these 15 values (1-based row indices shown in parentheses):
>
> B-W(1) BAY(2) BER(3) BRE(4) HAM(5) HES(6) M-V(7) NDS(8)
> NRW(9) RLP(10) SAR(11) SAC(12) S-A(13) S-H(14) THU(15)
>
> Now, when using dbi_result_seek_row() to seek to arbitrary rows
> (given in parentheses), dbi_result_get_string() can return incorrect
> values. In particular, I have observed:
>
> B-W(1) S-H(14) B-W(1) THU(2)
>
> What happens:
>
> * row 1 is not already present, dbd_goto_row(1) is executed,
> the row data retrieved, and result->currowidx set to 1
> * row 14 is not already present, a goto_row(14) is executed,
> the row data retrieved, and result->currowidx set to 14
> * row 1 is already present, result->currowidx set to 1
> * row 2 is not already present, dbd_goto_row(2) is NOT executed,
> because of rowidx == currowidx + 1 [2 == 2].
> So the next mysql row fetched is row 15, rather than 2.
>
> Now, if my seek order was {1, 15, 1, 2}, then mysql_fetch_row()
> called from function dbd_mysql.c:_get_row_data() will return NULL
> because there are no more rows. There will be a subsequent NULL
> dereference and crash.
>
> It seems that result->currowidx is a high-level pointer, and is not
> synchronized to the current DBD row pointer.
>
> As such, these checks should be killed and a goto_row always
> performed when so requested; the other DBD backends do the same.
>
> After applying this patch, the seeked results correctly yield:
>
> B-W(1) S-H(14) B-W(1) BAY(2)
Hi,
I can't offer a better solution off the top of my head, but you
essentially revert a patch which was designed to avoid an expensive call
to mysql_data_seek() in *every single* iteration of stepping through a
result set. There are data in the mailing list archives which show that
MySQL is slowed down abysmally in large result sets when accessed
through libdbi in comparison to libmysqlclient. It would be great if we
could find a way to synchronize result->currowidx with the DBD row
pointer in a cheaper way.
regards,
Markus
--
Markus Hoenicka
http://www.mhoenicka.de
AQ score 38
|
|
From: Jan E. <je...@in...> - 2014-05-01 16:50:18
|
I have identified another bug and prepared a patch for
dbd_mysql/dbd_msql. The purpose of result->currowidx was not totally
clear-cut, so I am posting this patch for potential comments.
parent 1619049a1e0eb018cdc8490f3cf344b4f2f53b0f ()
commit 537c2673f36465c2700829130da4054f53354a00
Author: Jan Engelhardt <je...@in...>
Date: Thu May 1 18:04:47 2014 +0200
dbd_mysql, dbd_msql: resolve bogus seeking and a crash
I have a query result that, when iteratively seeked with
dbi_result_next_row() and read with dbi_result_get_string(), yields
these 15 values (1-based row indices shown in parentheses):
B-W(1) BAY(2) BER(3) BRE(4) HAM(5) HES(6) M-V(7) NDS(8)
NRW(9) RLP(10) SAR(11) SAC(12) S-A(13) S-H(14) THU(15)
Now, when using dbi_result_seek_row() to seek to arbitrary rows
(given in parentheses), dbi_result_get_string() can return incorrect
values. In particular, I have observed:
B-W(1) S-H(14) B-W(1) THU(2)
What happens:
* row 1 is not already present, dbd_goto_row(1) is executed,
the row data retrieved, and result->currowidx set to 1
* row 14 is not already present, a goto_row(14) is executed,
the row data retrieved, and result->currowidx set to 14
* row 1 is already present, result->currowidx set to 1
* row 2 is not already present, dbd_goto_row(2) is NOT executed,
because of rowidx == currowidx + 1 [2 == 2].
So the next mysql row fetched is row 15, rather than 2.
Now, if my seek order was {1, 15, 1, 2}, then mysql_fetch_row()
called from function dbd_mysql.c:_get_row_data() will return NULL
because there are no more rows. There will be a subsequent NULL
dereference and crash.
It seems that result->currowidx is a high-level pointer, and is not
synchronized to the current DBD row pointer.
As such, these checks should be killed and a goto_row always
performed when so requested; the other DBD backends do the same.
After applying this patch, the seeked results correctly yield:
B-W(1) S-H(14) B-W(1) BAY(2)
---
drivers/msql/dbd_msql.c | 7 +++----
drivers/mysql/dbd_mysql.c | 5 ++---
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/msql/dbd_msql.c b/drivers/msql/dbd_msql.c
index d8edd50..f3709c4 100644
--- a/drivers/msql/dbd_msql.c
+++ b/drivers/msql/dbd_msql.c
@@ -149,11 +149,8 @@ int dbd_free_query(dbi_result_t *result)
int dbd_goto_row(dbi_result_t *result, unsigned long long rowidx, unsigned long long currowidx)
{
- if (rowidx != currowidx+1) {
msqlDataSeek((m_result *)result->result_handle, rowidx);
- }
- /* else: nothing to do, next fetch will fetch the desired row */
- return 1;
+ return 1;
}
@@ -462,6 +459,8 @@ void _get_row_data(dbi_result_t *result, dbi_row_t *row, unsigned long long rowi
msqlDataSeek(_res, rowidx);
_row = msqlFetchRow(_res);
+ if (_row == NULL)
+ return;
while ( curfield < result->numfields ) {
raw = _row[curfield];
data = &row->field_values[curfield];
diff --git a/drivers/mysql/dbd_mysql.c b/drivers/mysql/dbd_mysql.c
index a167fdf..94c11f6 100644
--- a/drivers/mysql/dbd_mysql.c
+++ b/drivers/mysql/dbd_mysql.c
@@ -273,13 +273,10 @@ int dbd_free_query(dbi_result_t *result) {
}
int dbd_goto_row(dbi_result_t *result, unsigned long long rowidx, unsigned long long currowidx) {
- if (rowidx != currowidx+1) {
mysql_data_seek((MYSQL_RES *)result->result_handle, rowidx);
/* the return type of this function is indeed void, so it is
unclear what happens if rowidx is outside the range. The
calling function must make sure the row index is valid */
- }
- /* else: nothing to do, next fetch will fetch next row */
return 1;
}
@@ -837,6 +834,8 @@ void _get_row_data(dbi_result_t *result, dbi_row_t *row, unsigned long long rowi
dbi_data_t *data;
_row = mysql_fetch_row(_res);
+ if (_row == NULL)
+ return;
strsizes = (size_t *)mysql_fetch_lengths(_res);
while (curfield < result->numfields) {
--
# Created with git-export-patch
|
|
From: Holger H. P. F. <ho...@fr...> - 2014-03-23 20:07:36
|
On Mon, Mar 10, 2014 at 01:10:37AM +0100, mar...@mh... wrote: > Hi, > > this problem affects all drivers, so adding a workaround to the > sqlite3 driver does not seem the best way to address this. I've added > some lines to _dbd_decode_binary in libdbi/src/dbd_helper.c to deal > with empty strings without accessing any memory past the initial > NULL. Can you please test the following patch and see if it fixes your > problem? Hi, sorry for the delay. I will try to test it this week. holger |