Commit 91066868 authored by unknown's avatar unknown
Browse files

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1

into build.mysql.com:/users/tulin/mysql-4.1-ndb-merge


sql/ha_ndbcluster.cc:
  Auto merged
sql/handler.cc:
  Auto merged
sql/sql_class.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_table.cc:
  Auto merged
parents c59228f8 1460e454
Loading
Loading
Loading
Loading
+20 −16
Original line number Diff line number Diff line
@@ -2602,13 +2602,14 @@ com_use(String *buffer __attribute__((unused)), char *line)
    put_info("USE must be followed by a database name", INFO_ERROR);
    return 0;
  }

  /*
    We need to recheck the current database, because it may change
    under our feet, for example if DROP DATABASE or RENAME DATABASE
    (latter one not yet available by the time the comment was written)
  */
  current_db= 0; // Let's reset current_db, assume it's gone
  /*  Let's reset current_db, assume it's gone */
  my_free(current_db, MYF(MY_ALLOW_ZERO_PTR));
  current_db= 0;
  /*
    We don't care about in case of an error below because current_db
    was just set to 0.
@@ -2617,10 +2618,8 @@ com_use(String *buffer __attribute__((unused)), char *line)
      (res= mysql_use_result(&mysql)))
  {
    row= mysql_fetch_row(res);
    if (row[0] &&
	(!current_db || cmp_database(charset_info, current_db, row[0])))
    if (row[0])
    {
      my_free(current_db, MYF(MY_ALLOW_ZERO_PTR));
      current_db= my_strdup(row[0], MYF(MY_WME));
    }
    (void) mysql_fetch_row(res);               // Read eof
@@ -2948,7 +2947,12 @@ put_info(const char *str,INFO_TYPE info_type, uint error, const char *sqlstate)
      (void) fflush(file);
      fprintf(file,"ERROR");
      if (error)
      {
	if (sqlstate)
	  (void) fprintf(file," %d (%s)",error, sqlstate);
        else
	  (void) fprintf(file," %d",error);
      }
      if (status.query_start_line && line_numbers)
      {
	(void) fprintf(file," at line %lu",status.query_start_line);
+4 −4
Original line number Diff line number Diff line
@@ -436,8 +436,8 @@ static int process_all_tables_in_db(char *database)
  LINT_INIT(res);
  if (use_db(database))
    return 1;
  if (!(mysql_query(sock, "SHOW TABLES") ||
	(res = mysql_store_result(sock))))
  if (mysql_query(sock, "SHOW TABLES") ||
	!((res= mysql_store_result(sock))))
    return 1;

  if (opt_all_in_1)
+7 −0
Original line number Diff line number Diff line
@@ -312,6 +312,13 @@ my_bool my_like_range_simple(CHARSET_INFO *cs,
			      char *min_str, char *max_str,
			      uint *min_length, uint *max_length);

my_bool  my_like_range_mb(CHARSET_INFO *cs,
			  const char *ptr, uint ptr_length,
			  pbool escape, pbool w_one, pbool w_many,
			  uint res_length,
			  char *min_str, char *max_str,
			  uint *min_length, uint *max_length);

my_bool  my_like_range_ucs2(CHARSET_INFO *cs,
			    const char *ptr, uint ptr_length,
			    pbool escape, pbool w_one, pbool w_many,
+13 −27
Original line number Diff line number Diff line
@@ -1056,33 +1056,14 @@ innobase_start_or_create_for_mysql(void)
	  	return(DB_ERROR);
	}

	/* Set the maximum number of threads which can wait for a semaphore
	inside InnoDB */
#if defined(__WIN__) || defined(__NETWARE__)

/* Create less event semaphores because Win 98/ME had difficulty creating
40000 event semaphores.
Comment from Novell, Inc.: also, these just take a lot of memory on
NetWare. */
	srv_max_n_threads = 1000;
#else
	if (srv_pool_size >= 8 * 1024) {
			          /* Here we still have srv_pool_size counted
				  in kilobytes, srv_boot converts the value to
				  pages; if buffer pool is less than 8 MB,
				  assume fewer threads. */
		srv_max_n_threads = 10000;
	} else {
	        srv_max_n_threads = 1000;	/* saves several MB of memory,
						especially in 64-bit
						computers */
	}
#endif
	/* Note that the call srv_boot() also changes the values of
	srv_pool_size etc. to the units used by InnoDB internally */

        /* Set the maximum number of threads which can wait for a semaphore
        inside InnoDB */
        inside InnoDB: this is the 'sync wait array' size, as well as the
	maximum number of threads that can wait in the 'srv_conc array' for
	their time to enter InnoDB. */

#if defined(__WIN__) || defined(__NETWARE__)

/* Create less event semaphores because Win 98/ME had difficulty creating
@@ -1091,11 +1072,16 @@ Comment from Novell, Inc.: also, these just take a lot of memory on
NetWare. */
        srv_max_n_threads = 1000;
#else
        if (srv_pool_size >= 8 * 1024 * 1024) {
        if (srv_pool_size >= 1000 * 1024) {
                                  /* Here we still have srv_pool_size counted
                                  in bytes, srv_boot converts the value to
                                  pages; if buffer pool is less than 8 MB,
                                  in kilobytes (in 4.0 this was in bytes)
				  srv_boot() converts the value to
                                  pages; if buffer pool is less than 1000 MB,
                                  assume fewer threads. */
                srv_max_n_threads = 50000;

        } else if (srv_pool_size >= 8 * 1024) {

                srv_max_n_threads = 10000;
        } else {
		srv_max_n_threads = 1000;       /* saves several MB of memory,
@@ -1103,7 +1089,7 @@ NetWare. */
                                                computers */
        }
#endif
	err = srv_boot();
	err = srv_boot(); /* This changes srv_pool_size to units of a page */

	if (err != DB_SUCCESS) {

+1 −1
Original line number Diff line number Diff line
@@ -404,7 +404,7 @@ trx_undo_seg_create(
	        ut_print_timestamp(stderr);
	        fprintf(stderr,
"InnoDB: Warning: cannot find a free slot for an undo log. Do you have too\n"
"InnoDB: many active transactions running concurrently?");
"InnoDB: many active transactions running concurrently?\n");

		return(NULL);
	}
Loading