View | Details | Raw Unified | Return to bug 228522
Collapse All | Expand All

(-)configure.d/config_os_libs2 (-2 / +9 lines)
Lines 54-59 Link Here
54
#include <my_sys.h>
54
#include <my_sys.h>
55
#include <mysql.h>
55
#include <mysql.h>
56
#include <errmsg.h>
56
#include <errmsg.h>
57
#include <mysql_version.h>
57
58
58
netsnmp_feature_require(container_fifo)
59
netsnmp_feature_require(container_fifo)
59
60
Lines 437-442 netsnmp_mysql_init(void) Link Here
437
        return -1;
438
        return -1;
438
    }
439
    }
439
440
441
#if MYSQL_VERSION_ID < 100000
440
#ifdef HAVE_BROKEN_LIBMYSQLCLIENT
442
#ifdef HAVE_BROKEN_LIBMYSQLCLIENT
441
    my_init();
443
    my_init();
442
#else
444
#else
Lines 445-450 netsnmp_mysql_init(void) Link Here
445
447
446
    /** load .my.cnf values */
448
    /** load .my.cnf values */
447
    load_defaults ("my", _sql.groups, &not_argc, &not_argv);
449
    load_defaults ("my", _sql.groups, &not_argc, &not_argv);
450
#endif
448
    for(i=0; i < not_argc; ++i) {
451
    for(i=0; i < not_argc; ++i) {
449
        if (NULL == not_argv[i])
452
        if (NULL == not_argv[i])
450
            continue;
453
            continue;
Lines 542-547 netsnmp_mysql_init(void) Link Here
542
        return -1;
545
        return -1;
543
    }
546
    }
544
547
548
#if MYSQL_VERSION_ID > 100000
549
    mysql_options(_sql.conn, MYSQL_READ_DEFAULT_GROUP, "snmptrapd");
550
#endif
551
545
    /** try to connect; we'll try again later if we fail */
552
    /** try to connect; we'll try again later if we fail */
546
    (void) netsnmp_mysql_connect();
553
    (void) netsnmp_mysql_connect();
547
--- configure.d/config_os_libs2	2017-07-18 09:44:00.600109376 +0200
554
--- configure.d/config_os_libs2	2017-07-18 09:44:00.600109376 +0200
Lines 485-492 if test "x$with_mysql" = "xyes" ; then Link Here
485
      [AC_MSG_RESULT(no)
485
      [AC_MSG_RESULT(no)
486
       AC_DEFINE([HAVE_BROKEN_LIBMYSQLCLIENT], 1,
486
       AC_DEFINE([HAVE_BROKEN_LIBMYSQLCLIENT], 1,
487
                 [Define if using MY_INIT() causes a linker error])])
487
                 [Define if using MY_INIT() causes a linker error])])
488
  CPPFLAGS="${_cppflags}"
488
#  CPPFLAGS="${_cppflags}"
489
  LIBS="${_libs}"
489
#  LIBS="${_libs}"
490
  AC_MSG_CACHE_ADD(MYSQL Trap Logging:         enabled)
490
  AC_MSG_CACHE_ADD(MYSQL Trap Logging:         enabled)
491
else
491
else
492
  AC_MSG_CACHE_ADD(MYSQL Trap Logging:         unavailable)
492
  AC_MSG_CACHE_ADD(MYSQL Trap Logging:         unavailable)

Return to bug 228522