Commit 10ede1a5 authored by unknown's avatar unknown
Browse files

Merge bk-internal:/home/bk/mysql-5.0

into serg.mylan:/usr/home/serg/Abk/mysql-5.0

parents aa95b0b5 fe7b8634
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -155,6 +155,8 @@ static char mysql_charsets_dir[FN_REFLEN+1];
static const char *xmlmeta[] = {
  "&", "&",
  "<", "&lt;",
  ">", "&gt;",
  "\"", "&quot;",
  0, 0
};
static const char *day_names[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
@@ -2126,13 +2128,11 @@ print_table_data_xml(MYSQL_RES *result)
    (void) tee_fputs("\n  <row>\n", PAGER);
    for (uint i=0; i < mysql_num_fields(result); i++)
    {
      tee_fprintf(PAGER, "\t<%s>", (fields[i].name ?
				  (fields[i].name[0] ? fields[i].name :
				   " &nbsp; ") : "NULL"));
      tee_fprintf(PAGER, "\t<field name=\"");
      xmlencode_print(fields[i].name, strlen(fields[i].name));
      tee_fprintf(PAGER, "\">");
      xmlencode_print(cur[i], lengths[i]);
      tee_fprintf(PAGER, "</%s>\n", (fields[i].name ?
				     (fields[i].name[0] ? fields[i].name :
				      " &nbsp; ") : "NULL"));
      tee_fprintf(PAGER, "</field>\n");
    }
    (void) tee_fputs("  </row>\n", PAGER);
  }
+2 −2
Original line number Diff line number Diff line
@@ -493,7 +493,7 @@ static void write_header(FILE *sql_file, char *db_name)
");
    }
    fprintf(sql_file,
	    "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=\"%s%s%s\" */;\n",
	    "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='%s%s%s' */;\n",
	    path?"":"NO_AUTO_VALUE_ON_ZERO",compatible_mode_normal_str[0]==0?"":",",
	    compatible_mode_normal_str);
    check_io(sql_file);
@@ -867,7 +867,7 @@ static int dbConnect(char *host, char *user,char *passwd)
    cannot reconnect.
  */
  sock->reconnect= 0;
  sprintf(buff, "/*!40100 SET @@SQL_MODE=\"%s\" */",
  sprintf(buff, "/*!40100 SET @@SQL_MODE='%s' */",
	  compatible_mode_normal_str);
  if (mysql_query_with_error_report(sock, 0, buff))
  {
+17 −0
Original line number Diff line number Diff line
@@ -405,3 +405,20 @@ AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_CHARSET_NAME], ["$default_charset"],
                   [Define the default charset name])
AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_COLLATION_NAME], ["$default_collation"],
                   [Define the default charset name])

# Shall we build the UCA-based Unicode collations
AC_ARG_WITH(uca,
    [  --without-uca           Skip building of the national Unicode collations.],
    [with_uca=$withval],
    [with_uca=yes]
)

AC_MSG_CHECKING([whether to compile national Unicode collations])

if test "$with_uca" = "yes"
then
  AC_MSG_RESULT(yes)
  AC_DEFINE([HAVE_UCA_COLLATIONS], [1], [national Unicode collations])
else
  AC_MSG_RESULT(no)
fi
+12 −1
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@ int main(int argc,char *argv[])
{
  int error,code,found;
  const char *msg;
  char *unknown_error = 0;
  MY_INIT(argv[0]);

  if (get_options(&argc,&argv))
@@ -217,7 +218,12 @@ int main(int argc,char *argv[])
      string 'Unknown Error'.  To avoid printing it we try to find the
      error string by asking for an impossible big error message.
    */
    const char *unknown_error= strerror(10000);
    msg = strerror(10000);

    /* allocate a buffer for unknown_error since strerror always returns the same pointer 
      on some platforms such as Windows */
    unknown_error = malloc( strlen(msg)+1 );
    strcpy( unknown_error, msg );

    for ( ; argc-- > 0 ; argv++)
    {
@@ -267,6 +273,11 @@ int main(int argc,char *argv[])
      }
    }
  }

  /* if we allocated a buffer for unknown_error, free it now */
  if (unknown_error)
	  free(unknown_error);

  exit(error);
  return error;
}
+4 −0
Original line number Diff line number Diff line
-- require r/have_cp932.require
disable_query_log;
show collation like "cp932_japanese_ci";
enable_query_log;
Loading