Commit 0abaf88c authored by unknown's avatar unknown
Browse files

Merge joreland@bk-internal.mysql.com:/home/bk/mysql-5.0

into  perch.ndb.mysql.com:/home/jonas/src/mysql-5.0

parents 70cce17d 72470a98
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -44,8 +44,8 @@ set -e
export AM_MAKEFLAGS
AM_MAKEFLAGS="-j 4"

# SSL library to use. Should be changed to --with-yassl
SSL_LIBRARY=--with-openssl
# SSL library to use.
SSL_LIBRARY=--with-yassl

# If you are not using codefusion add "-Wpointer-arith" to WARNINGS
# The following warning flag will give too many warnings:
+29 −2
Original line number Diff line number Diff line
@@ -373,8 +373,10 @@ const char *command_names[]=
  "enable_rpl_parse",
  "disable_rpl_parse",
  "eval_result",
  /* Enable/disable that the _query_ is logged to result file */
  "enable_query_log",
  "disable_query_log",
  /* Enable/disable that the _result_ from a query is logged to result file */
  "enable_result_log",
  "disable_result_log",
  "server_start",
@@ -425,6 +427,7 @@ static VAR* var_init(VAR* v, const char *name, int name_len, const char *val,
static void var_free(void* v);

void dump_result_to_reject_file(const char *record_file, char *buf, int size);
void dump_result_to_log_file(const char *record_file, char *buf, int size);

int close_connection(struct st_query*);
static void set_charset(struct st_query*);
@@ -615,6 +618,8 @@ static void die(const char *fmt, ...)
{
  va_list args;
  DBUG_ENTER("die");

  /* Print the error message */
  va_start(args, fmt);
  if (fmt)
  {
@@ -629,6 +634,12 @@ static void die(const char *fmt, ...)
    fflush(stderr);
  }
  va_end(args);

  /* Dump the result that has been accumulated so far to .log file */
  if (result_file && ds_res.length)
    dump_result_to_log_file(result_file, ds_res.str, ds_res.length);

  /* Clean up and exit */
  free_used_memory();
  my_end(MY_CHECK_ERROR);

@@ -752,8 +763,8 @@ static int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname)
  check_result
  ds - content to be checked
  fname - name of file to check against
  require_option - if set and check fails, the test will be aborted with the special
                   exit code "not supported test"
  require_option - if set and check fails, the test will be aborted
                   with the special exit code "not supported test"

  RETURN VALUES
   error - the function will not return
@@ -3129,6 +3140,12 @@ void dump_result_to_reject_file(const char *record_file, char *buf, int size)
  str_to_file(fn_format(reject_file, record_file,"",".reject",2), buf, size);
}

void dump_result_to_log_file(const char *record_file, char *buf, int size)
{
  char log_file[FN_REFLEN];
  str_to_file(fn_format(log_file, record_file,"",".log",2), buf, size);
}


#ifdef __WIN__

@@ -3708,7 +3725,17 @@ static void handle_error(const char *query, struct st_query *q,
  DBUG_ENTER("handle_error");

  if (q->require_file)
  {
    /*
      The query after a "--require" failed. This is fine as long the server
      returned a valid reponse. Don't allow 2013 or 2006 to trigger an
      abort_not_supported_test
     */
    if (err_errno == CR_SERVER_LOST ||
        err_errno == CR_SERVER_GONE_ERROR)
      die("require query '%s' failed: %d: %s", query, err_errno, err_error);
    abort_not_supported_test();
  }

  if (q->abort_on_error)
    die("query '%s' failed: %d: %s", query, err_errno, err_error);
+30 −14
Original line number Diff line number Diff line
@@ -1547,6 +1547,18 @@ else
fi
#---END:

# dlopen, dlerror
case "$with_mysqld_ldflags " in

  *"-static "*)
    # No need to check for dlopen when mysqld is linked with
    # -all-static or -static as it won't be able to load any functions.
    # NOTE! It would be better if it was possible to test if dlopen
    # can be used, but a good way to test it couldn't be found

    ;;

  *)
    # Check for dlopen, needed for user definable functions
    # This must be checked after threads on AIX
    # We only need this for mysqld, not for the clients.
@@ -1558,6 +1570,15 @@ LIBDL=$LIBS
    LIBS="$my_save_LIBS"
    AC_SUBST(LIBDL)

    my_save_LIBS="$LIBS"
    LIBS="$LIBS $LIBDL"
    AC_CHECK_FUNCS(dlopen dlerror)
    LIBS="$my_save_LIBS"

    ;;
esac


# System characteristics
case $SYSTEM_TYPE in
  *netware*) ;;
@@ -1925,11 +1946,6 @@ then
fi]
)

my_save_LIBS="$LIBS"
LIBS="$LIBS $LIBDL"
AC_CHECK_FUNCS(dlopen dlerror)
LIBS="$my_save_LIBS"

# Check definition of gethostbyaddr_r (glibc2 defines this with 8 arguments)
ac_save_CXXFLAGS="$CXXFLAGS"
AC_CACHE_CHECK([style of gethost* routines], mysql_cv_gethost_style,
+15 −0
Original line number Diff line number Diff line
@@ -407,8 +407,15 @@ inline double ulonglong2double(ulonglong value)

#define shared_memory_buffer_length 16000
#define default_shared_memory_base_name "MYSQL"

#ifdef CYBOZU
#define MYSQL_DEFAULT_CHARSET_NAME "utf8"
#define MYSQL_DEFAULT_COLLATION_NAME "utf8_general_cs"
#define HAVE_UTF8_GENERAL_CS 1
#else
#define MYSQL_DEFAULT_CHARSET_NAME "latin1"
#define MYSQL_DEFAULT_COLLATION_NAME "latin1_swedish_ci"
#endif

#define HAVE_SPATIAL 1
#define HAVE_RTREE_KEYS 1
@@ -419,8 +426,10 @@ inline double ulonglong2double(ulonglong value)
/* Define charsets you want */
/* #undef HAVE_CHARSET_armscii8 */
/* #undef HAVE_CHARSET_ascii */
#ifndef CYBOZU
#define HAVE_CHARSET_big5 1
#define HAVE_CHARSET_cp1250 1
#endif
/* #undef HAVE_CHARSET_cp1251 */
/* #undef HAVE_CHARSET_cp1256 */
/* #undef HAVE_CHARSET_cp1257 */
@@ -429,27 +438,33 @@ inline double ulonglong2double(ulonglong value)
/* #undef HAVE_CHARSET_cp866 */
#define HAVE_CHARSET_cp932 1
/* #undef HAVE_CHARSET_dec8 */
#ifndef CYBOZU
#define HAVE_CHARSET_eucjpms 1
#define HAVE_CHARSET_euckr 1
#define HAVE_CHARSET_gb2312 1
#define HAVE_CHARSET_gbk 1
#endif
/* #undef HAVE_CHARSET_greek */
/* #undef HAVE_CHARSET_hebrew */
/* #undef HAVE_CHARSET_hp8 */
/* #undef HAVE_CHARSET_keybcs2 */
/* #undef HAVE_CHARSET_koi8r */
/* #undef HAVE_CHARSET_koi8u */
#ifndef CYBOZU
#define HAVE_CHARSET_latin1 1
#define HAVE_CHARSET_latin2 1
#endif
/* #undef HAVE_CHARSET_latin5 */
/* #undef HAVE_CHARSET_latin7 */
/* #undef HAVE_CHARSET_macce */
/* #undef HAVE_CHARSET_macroman */
#define HAVE_CHARSET_sjis 1
/* #undef HAVE_CHARSET_swe7 */
#ifndef CYBOZU
#define HAVE_CHARSET_tis620 1
#define HAVE_CHARSET_ucs2 1
#define HAVE_CHARSET_ujis 1
#endif
#define HAVE_CHARSET_utf8 1
#define HAVE_UCA_COLLATIONS 1
+19 −4
Original line number Diff line number Diff line
@@ -44,13 +44,23 @@ typedef struct unicase_info_st
  uint16 sort;
} MY_UNICASE_INFO;


extern MY_UNICASE_INFO *my_unicase_default[256];
extern MY_UNICASE_INFO *my_unicase_turkish[256];

#define MY_CS_ILSEQ	0
#define MY_CS_ILUNI	0
#define MY_CS_TOOSMALL	-1
#define MY_CS_TOOFEW(n)	(-1-(n))

/* wm_wc and wc_mb return codes */
#define MY_CS_ILSEQ	0     /* Wrong by sequence: wb_wc                   */
#define MY_CS_ILUNI	0     /* Cannot encode Unicode to charset: wc_mb    */
#define MY_CS_TOOSMALL  -101  /* Need at least one byte:    wc_mb and mb_wc */
#define MY_CS_TOOSMALL2 -102  /* Need at least two bytes:   wc_mb and mb_wc */
#define MY_CS_TOOSMALL3 -103  /* Need at least three bytes: wc_mb and mb_wc */
/* These following three are currently not really used */
#define MY_CS_TOOSMALL4 -104  /* Need at least 4 bytes: wc_mb and mb_wc */
#define MY_CS_TOOSMALL5 -105  /* Need at least 5 bytes: wc_mb and mb_wc */
#define MY_CS_TOOSMALL6 -106  /* Need at least 6 bytes: wc_mb and mb_wc */
/* A helper macros for "need at least n bytes" */
#define MY_CS_TOOSMALLN(n)    (-100-(n))

#define MY_SEQ_INTTAIL	1
#define MY_SEQ_SPACES	2
@@ -360,6 +370,11 @@ int my_wildcmp_8bit(CHARSET_INFO *,
		    const char *wildstr,const char *wildend,
		    int escape, int w_one, int w_many);

int my_wildcmp_bin(CHARSET_INFO *,
		   const char *str,const char *str_end,
		   const char *wildstr,const char *wildend,
		   int escape, int w_one, int w_many);

uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
uint my_numcells_8bit(CHARSET_INFO *, const char *b, const char *e);
uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos);
Loading