~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to m4/pandora_have_libgtest.m4

  • Committer: Stewart Smith
  • Author(s): Marko Mäkelä, Stewart Smith
  • Date: 2010-11-17 05:52:09 UTC
  • mto: (2021.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1971.
  • Revision ID: stewart@flamingspork.com-20101117055209-69m035q6h7e1txrc
Merge Revision revid:marko.makela@oracle.com-20100629113248-fvl48lnzr44z94gg from MySQL InnoDB

Original revid:marko.makela@oracle.com-20100629113248-fvl48lnzr44z94gg

Original Authors: Marko Mkel <marko.makela@oracle.com>
Original commit message:
Bug#52199 utf32: mbminlen=4, mbmaxlen=4, type->mbminlen=0, type->mbmaxlen=4

Merge and adjust a forgotten change to fix this bug.
rb://393 approved by Jimmy Yang
  ------------------------------------------------------------------------
  r3794 | marko | 2009-01-07 14:14:53 +0000 (Wed, 07 Jan 2009) | 18 lines

  branches/6.0: Allow the minimum length of a multi-byte character to be
  up to 4 bytes. (Bug #35391)

  dtype_t, dict_col_t: Replace mbminlen:2, mbmaxlen:3 with mbminmaxlen:5.
  In this way, the 5 bits can hold two values of 0..4, and the storage size
  of the fields will not cross the 64-bit boundary.  Encode the values as
  DATA_MBMAX * mbmaxlen + mbminlen.  Define the auxiliary macros
  DB_MBMINLEN(mbminmaxlen), DB_MBMAXLEN(mbminmaxlen), and
  DB_MINMAXLEN(mbminlen, mbmaxlen).

  Try to trim and pad UTF-16 and UTF-32 with spaces as appropriate.

  Alexander Barkov suggested the use of cs->cset->fill(cs, buff, len, 0x20).
  ha_innobase::store_key_val_for_row() now does that, but the added function
  row_mysql_pad_col() does not, because it doesn't have the MySQL TABLE object.

  rb://49 approved by Heikki Tuuri
  ------------------------------------------------------------------------

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Copyright (C) 2010 Monty Taylor
 
2
dnl This file is free software; Monty Taylor
 
3
dnl gives unlimited permission to copy and/or distribute it,
 
4
dnl with or without modifications, as long as this notice is preserved.
 
5
 
 
6
AC_DEFUN([_PANDORA_SEARCH_LIBGTEST],[
 
7
  AC_REQUIRE([AC_LIB_PREFIX])
 
8
 
 
9
  dnl --------------------------------------------------------------------
 
10
  dnl  Check for libgtest
 
11
  dnl --------------------------------------------------------------------
 
12
 
 
13
  AC_ARG_ENABLE([libgtest],
 
14
    [AS_HELP_STRING([--disable-libgtest],
 
15
      [Build with libgtest support @<:@default=on@:>@])],
 
16
    [ac_enable_libgtest="$enableval"],
 
17
    [ac_enable_libgtest="yes"])
 
18
 
 
19
  AS_IF([test "x$ac_enable_libgtest" = "xyes"],[
 
20
    AC_LANG_PUSH(C++)
 
21
    save_CXXFLAGS="${CXXFLAGS}"
 
22
    CXXFLAGS="${AM_CXXFLAGS} ${CXXFLAGS}"
 
23
    AC_LIB_HAVE_LINKFLAGS(gtest,,[
 
24
      #include <gtest/gtest.h>
 
25
TEST(pandora_test_libgtest, PandoraTest)
 
26
{
 
27
  ASSERT_EQ(1, 1);
 
28
}
 
29
    ],[])
 
30
    CXXFLAGS="${save_CXXFLAGS}"
 
31
    AC_LANG_POP()
 
32
  ],[
 
33
    ac_cv_libgtest="no"
 
34
  ])
 
35
 
 
36
  AM_CONDITIONAL(HAVE_LIBGTEST, [test "x${ac_cv_libgtest}" = "xyes"])
 
37
])
 
38
 
 
39
AC_DEFUN([PANDORA_HAVE_LIBGTEST],[
 
40
  AC_REQUIRE([_PANDORA_SEARCH_LIBGTEST])
 
41
])
 
42
 
 
43
AC_DEFUN([PANDORA_REQUIRE_LIBGTEST],[
 
44
  AC_REQUIRE([_PANDORA_SEARCH_LIBGTEST])
 
45
  AS_IF([test "x${ac_cv_libgtest}" = "xno"],
 
46
    AC_MSG_ERROR([libgtest is required for ${PACKAGE}]))
 
47
])