Commit ee4b4969 authored by unknown's avatar unknown
Browse files

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

into  neptunus.(none):/home/msvensson/mysql/bug10713_new/my50-bug10713_new


mysql-test/r/mysqldump.result:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/table.h:
  Auto merged
parents c8fcc511 74b51205
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
@@ -277,6 +277,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysql_test_run_new", "mysql
		{D2B00DE0-F6E9-40AF-B90D-A257D014F098} = {D2B00DE0-F6E9-40AF-B90D-A257D014F098}
	EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mysqlmanager", "server-tools\instance-manager\mysqlmanager.vcproj", "{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}"
	ProjectSection(ProjectDependencies) = postProject
		{EEC1300B-85A5-497C-B3E1-F708021DF859} = {EEC1300B-85A5-497C-B3E1-F708021DF859}
		{BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB} = {BA86AE72-0CF5-423D-BBA2-E12B0D72EBFB}
		{DB28DE80-837F-4497-9AA9-CC0A20584C98} = {DB28DE80-837F-4497-9AA9-CC0A20584C98}
		{8762A9B8-72A9-462E-A9A2-F3265081F8AF} = {8762A9B8-72A9-462E-A9A2-F3265081F8AF}
		{F74653C4-8003-4A79-8F53-FC69E0AD7A9B} = {F74653C4-8003-4A79-8F53-FC69E0AD7A9B}
		{44D9C7DC-6636-4B82-BD01-6876C64017DF} = {44D9C7DC-6636-4B82-BD01-6876C64017DF}
		{FC369DF4-AEB7-4531-BF34-A638C4363BFE} = {FC369DF4-AEB7-4531-BF34-A638C4363BFE}
	EndProjectSection
EndProject
Global
	GlobalSection(SolutionConfiguration) = preSolution
		classic = classic
@@ -1204,6 +1215,32 @@ Global
		{6189F838-21C6-42A1-B2D0-9146316573F7}.pro nt.Build.0 = Release|Win32
		{6189F838-21C6-42A1-B2D0-9146316573F7}.Release.ActiveCfg = Release|Win32
		{6189F838-21C6-42A1-B2D0-9146316573F7}.Release.Build.0 = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.classic.ActiveCfg = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.classic.Build.0 = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.classic nt.ActiveCfg = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.classic nt.Build.0 = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Debug.ActiveCfg = Debug|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Debug.Build.0 = Debug|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Embedded_Classic.ActiveCfg = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Embedded_Classic.Build.0 = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Embedded_Debug.ActiveCfg = Debug|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Embedded_Debug.Build.0 = Debug|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Embedded_Pro.ActiveCfg = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Embedded_Pro.Build.0 = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Embedded_Release.ActiveCfg = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Embedded_Release.Build.0 = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Max.ActiveCfg = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Max.Build.0 = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Max nt.ActiveCfg = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Max nt.Build.0 = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.nt.ActiveCfg = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.nt.Build.0 = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.pro.ActiveCfg = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.pro.Build.0 = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.pro nt.ActiveCfg = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.pro nt.Build.0 = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Release.ActiveCfg = Release|Win32
		{6D524B3E-210A-4FCD-8D41-FEC0D21E83AC}.Release.Build.0 = Release|Win32
	EndGlobalSection
	GlobalSection(ExtensibilityGlobals) = postSolution
	EndGlobalSection
+3 −0
Original line number Diff line number Diff line
@@ -1638,6 +1638,9 @@
					PreprocessorDefinitions=""/>
			</FileConfiguration>
		</File>
		<File
			RelativePath=".\mf_unixpath.c">
		</File>
		<File
			RelativePath="mf_wcomp.c">
			<FileConfiguration
+25 −39
Original line number Diff line number Diff line
@@ -1193,12 +1193,12 @@ static void print_xml_row(FILE *xml_file, const char *row_name,

static uint dump_routines_for_db (char *db)
{
  char       query_buff[512], routine_type[10];
  char       db_name_buff[NAME_LEN+3], name_buff[NAME_LEN+3];
  char       query_buff[512];
  const char *routine_type[]={"FUNCTION", "PROCEDURE"};
  char       db_name_buff[NAME_LEN*2+3], name_buff[NAME_LEN*2+3], *routine_name;
  int        i;
  FILE       *sql_file = md_result_file;
  MYSQL_RES  *routine_res= NULL;
  MYSQL_RES  *routine_list_res= NULL;
  MYSQL_RES  *routine_res, *routine_list_res;
  MYSQL_ROW  row, routine_list_row;

  DBUG_ENTER("dump_routines_for_db");
@@ -1211,23 +1211,20 @@ static uint dump_routines_for_db (char *db)
    fprintf(sql_file, "\n--\n-- Dumping routines for database '%s'\n--\n", db);

  /*
    not using "mysql_query_with_error_report" because of privileges 
    not using "mysql_query_with_error_report" because we may have not
    enough privileges to lock mysql.proc.
  */
  if (opt_lock)
  if (lock_tables)
    mysql_query(sock, "LOCK TABLES mysql.proc READ");

  fprintf(sql_file, "\n/*!50003 SET @OLD_SQL_MODE=@@SQL_MODE*/;\n");
  fprintf(sql_file, "DELIMITER //\n");

  /* 0, retrieve and dump functions, 1, procedures */
  for (i=0; i <= 1; i++)
  {
    my_snprintf(routine_type, sizeof(routine_type),
                  "%s", i == 0 ? "FUNCTION" : "PROCEDURE");

    my_snprintf(query_buff, sizeof(query_buff),
                "SHOW %s STATUS WHERE Db = '%s'",
                routine_type, db_name_buff);
                routine_type[i], db_name_buff);

    if (mysql_query_with_error_report(sock, &routine_list_res, query_buff))
      DBUG_RETURN(1);
@@ -1237,11 +1234,11 @@ static uint dump_routines_for_db (char *db)

      while((routine_list_row= mysql_fetch_row(routine_list_res)))
      {
        DBUG_PRINT("info", ("retrieving CREATE %s for %s", routine_type, name_buff));
        mysql_real_escape_string(sock, name_buff,
                                 routine_list_row[1], strlen(routine_list_row[1]));
        DBUG_PRINT("info", ("retrieving CREATE %s for %s", routine_type[i],
                            name_buff));
        routine_name=quote_name(routine_list_row[1], name_buff, 0);
        my_snprintf(query_buff, sizeof(query_buff), "SHOW CREATE %s %s",
                    routine_type, name_buff);
                    routine_type[i], routine_name);

        if (mysql_query_with_error_report(sock, &routine_res, query_buff))
          DBUG_RETURN(1);
@@ -1249,41 +1246,36 @@ static uint dump_routines_for_db (char *db)
        while ((row=mysql_fetch_row(routine_res)))
        {
          /*
            the user can see routine names, but NOT the routine body of other
            routines that are not the creator of!
            if the user has EXECUTE privilege he see routine names, but NOT the
            routine body of other routines that are not the creator of!
          */
          DBUG_PRINT("info",("length of body for %s row[2] '%s' is %d",
                             name_buff, row[2], strlen(row[2])));
                             routine_name, row[2], strlen(row[2])));
          if (strlen(row[2]))
          {
            fprintf(sql_file, "/*!50003 SET SESSION SQL_MODE=\"%s\"*/ //\n",
                    row[1] /* sql_mode */);

            if (opt_drop)
              fprintf(sql_file, "/*!50003 DROP %s IF EXISTS %s */ //\n",
                      routine_type, name_buff);
                      routine_type[i], routine_name);
            /*
              the i==0 is temporary until we can figure out why functions
              can't be in comments
            */
            /* create proc/func body */;
              we need to change sql_mode only for the CREATE PROCEDURE/FUNCTION
              otherwise we may need to re-quote routine_name
            */;
            fprintf(sql_file, "/*!50003 SET SESSION SQL_MODE=\"%s\"*/ //\n",
                    row[1] /* sql_mode */);
            fprintf(sql_file, "/*!50003 %s */ //\n", row[2]);
            fprintf(sql_file, "/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/ //\n");
          }
        } /* end of routine printing */
      } /* end of list of routines */
      mysql_free_result(routine_res);
      routine_res=NULL;
    }
    mysql_free_result(routine_list_res);
    routine_list_res=NULL;
  } /* end of for i (0 .. 1)  */
  /* set the delimiter back to ';' */
  fprintf(sql_file, "DELIMITER ;\n");
  fprintf(sql_file, "/*!50003 SET SESSION SQL_MODE=@OLD_SQL_MODE*/;\n");

  /* again, no error report due to permissions */
  if (opt_lock)
    mysql_query(sock, "UNLOCK TABLES");
  if (lock_tables)
    mysql_query_with_error_report(sock, 0, "UNLOCK TABLES");
  DBUG_RETURN(0);
}

@@ -1739,12 +1731,6 @@ static uint get_table_structure(char *table, char *db)
  the tables have been dumped in case a trigger depends on the existence
  of a table

  INPUT
    char * tablename and db name
  RETURNS
   0 Failure
   1 Succes

*/

static void dump_triggers_for_table (char *table, char *db)
@@ -1752,7 +1738,7 @@ static void dump_triggers_for_table (char *table, char *db)
  MYSQL_RES  *result;
  MYSQL_ROW  row;
  char	     *result_table;
  char	     name_buff[NAME_LEN+3], table_buff[NAME_LEN*2+3];
  char	     name_buff[NAME_LEN*4+3], table_buff[NAME_LEN*2+3];
  char       query_buff[512];
  FILE       *sql_file = md_result_file;

+4 −4
Original line number Diff line number Diff line
@@ -568,13 +568,13 @@ class Portable
    static word Add(word *C, const word *A, const word *B, unsigned int N);
    static word Subtract(word *C, const word *A, const word*B, unsigned int N);

    static inline void Multiply2(word *C, const word *A, const word *B);
    static inline word Multiply2Add(word *C, const word *A, const word *B);
    static void Multiply2(word *C, const word *A, const word *B);
    static word Multiply2Add(word *C, const word *A, const word *B);
    static void Multiply4(word *C, const word *A, const word *B);
    static void Multiply8(word *C, const word *A, const word *B);
    static inline unsigned int MultiplyRecursionLimit() {return 8;}

    static inline void Multiply2Bottom(word *C, const word *A, const word *B);
    static void Multiply2Bottom(word *C, const word *A, const word *B);
    static void Multiply4Bottom(word *C, const word *A, const word *B);
    static void Multiply8Bottom(word *C, const word *A, const word *B);
    static inline unsigned int MultiplyBottomRecursionLimit() {return 8;}
@@ -668,7 +668,7 @@ void Portable::Multiply2(word *C, const word *A, const word *B)
    C[3] = t.GetHighHalf();
}

inline void Portable::Multiply2Bottom(word *C, const word *A, const word *B)
void Portable::Multiply2Bottom(word *C, const word *A, const word *B)
{
    DWord t = DWord::Multiply(A[0], B[0]);
    C[0] = t.GetLowHalf();
+9 −1
Original line number Diff line number Diff line
@@ -235,6 +235,7 @@ DO_GDB=""
MANUAL_GDB=""
DO_DDD=""
DO_CLIENT_GDB=""
DO_VALGRIND_MYSQL_TEST=""
SLEEP_TIME_AFTER_RESTART=1
SLEEP_TIME_FOR_DELETE=10
SLEEP_TIME_FOR_FIRST_MASTER=400		# Enough time to create innodb tables
@@ -432,6 +433,9 @@ while test $# -gt 0; do
      TMP=`$ECHO "$1" | $SED -e "s;--valgrind-options=;;"`
      VALGRIND="$VALGRIND $TMP"
      ;;
    --valgrind-mysqltest)
      DO_VALGRIND_MYSQL_TEST=1
      ;;
    --skip-ndbcluster | --skip-ndb)
      USE_NDBCLUSTER=""
      EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-ndbcluster"
@@ -666,7 +670,7 @@ else
     MYSQL_CLIENT_TEST="$CLIENT_BINDIR/mysql_client_test_embedded"
   fi
 else
   MYSQL_TEST="$CLIENT_BINDIR/mysqltest"
   MYSQL_TEST="$VALGRIND_MYSQLTEST $CLIENT_BINDIR/mysqltest"
   MYSQL_CLIENT_TEST="$CLIENT_BINDIR/mysql_client_test"
 fi
fi
@@ -681,6 +685,10 @@ then
SLAVE_MYSQLD=$MYSQLD
fi

if [ x$DO_VALGRIND_MYSQL_TEST = x1 ] ; then
  MYSQL_TEST="$VALGRIND $MYSQL_TEST"
fi

# If we should run all tests cases, we will use a local server for that

if [ -z "$1" ]
Loading