Commit 91827782 authored by unknown's avatar unknown
Browse files

Merge mysql.com:/home/mydev/mysql-5.0

into mysql.com:/home/mydev/mysql-5.0-5000


sql/sql_select.cc:
  Auto merged
parents b00551a2 026dacc1
Loading
Loading
Loading
Loading
+12 −2
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@
#include <locale.h>
#endif

const char *VER= "14.7";
const char *VER= "14.8";

/* Don't try to make a nice table if the data is too big */
#define MAX_COLUMN_LENGTH	     1024
@@ -144,6 +144,7 @@ static char *current_host,*current_db,*current_user=0,*opt_password=0,
            *current_prompt=0, *delimiter_str= 0,
            *default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME;
static char *histfile;
static char *histfile_tmp;
static String glob_buffer,old_buffer;
static String processed_prompt;
static char *full_username=0,*part_username=0,*default_prompt=0;
@@ -442,6 +443,13 @@ int main(int argc,char *argv[])
      if (verbose)
	tee_fprintf(stdout, "Reading history-file %s\n",histfile);
      read_history(histfile);
      if (!(histfile_tmp= (char*) my_malloc((uint) strlen(histfile) + 5,
					    MYF(MY_WME))))
      {
	fprintf(stderr, "Couldn't allocate memory for temp histfile!\n");
	exit(1);
      }
      sprintf(histfile_tmp, "%s.TMP", histfile);
    }
  }
#endif
@@ -470,7 +478,8 @@ sig_handler mysql_end(int sig)
    /* write-history */
    if (verbose)
      tee_fprintf(stdout, "Writing history-file %s\n",histfile);
    write_history(histfile);
    if (!write_history(histfile_tmp))
      my_rename(histfile_tmp, histfile, MYF(MY_WME));
  }
  batch_readline_end(status.line_buff);
  completion_hash_free(&ht);
@@ -485,6 +494,7 @@ sig_handler mysql_end(int sig)
  my_free(opt_password,MYF(MY_ALLOW_ZERO_PTR));
  my_free(opt_mysql_unix_port,MYF(MY_ALLOW_ZERO_PTR));
  my_free(histfile,MYF(MY_ALLOW_ZERO_PTR));
  my_free(histfile_tmp,MYF(MY_ALLOW_ZERO_PTR));
  my_free(current_db,MYF(MY_ALLOW_ZERO_PTR));
  my_free(current_host,MYF(MY_ALLOW_ZERO_PTR));
  my_free(current_user,MYF(MY_ALLOW_ZERO_PTR));
+7 −1
Original line number Diff line number Diff line
@@ -780,7 +780,13 @@ static int check_master_version(MYSQL* mysql,

  if (mysql_query(mysql, "SELECT VERSION()") ||
      !(res = mysql_store_result(mysql)))
    die("Error checking master version: %s", mysql_error(mysql));
  {
    char errmsg[FN_REFLEN];

    strmake(errmsg, mysql_error(mysql), sizeof(errmsg) - 1);
    mysql_close(mysql);
    die("Error checking master version: %s", errmsg);
  }
  if (!(row = mysql_fetch_row(res)))
  {
    mysql_free_result(res);
+2 −1
Original line number Diff line number Diff line
@@ -1022,7 +1022,8 @@ btr_cur_optimistic_insert(

	/* Now, try the insert */

	*rec = page_cur_insert_rec_low(page_cursor, entry, index, NULL, mtr);
	*rec = page_cur_insert_rec_low(page_cursor, entry, index,
							NULL, NULL, mtr);
	if (!(*rec)) {
		/* If the record did not fit, reorganize */
		btr_page_reorganize(page, index, mtr);
+2 −0
Original line number Diff line number Diff line
@@ -144,6 +144,7 @@ page_cur_rec_insert(
	page_cur_t*	cursor,	/* in: a page cursor */
	rec_t*		rec,	/* in: record to insert */
	dict_index_t*	index,	/* in: record descriptor */
	ulint*		offsets,/* in: rec_get_offsets(rec, index) */
	mtr_t*		mtr);	/* in: mini-transaction handle */
/***************************************************************
Inserts a record next to page cursor. Returns pointer to inserted record if
@@ -160,6 +161,7 @@ page_cur_insert_rec_low(
	dtuple_t*	tuple,	/* in: pointer to a data tuple or NULL */
	dict_index_t*	index,	/* in: record descriptor */
	rec_t*		rec,	/* in: pointer to a physical record or NULL */
	ulint*		offsets,/* in: rec_get_offsets(rec, index) or NULL */
	mtr_t*		mtr);	/* in: mini-transaction handle */
/*****************************************************************
Copies records from page to a newly created page, from a given record onward,
+4 −2
Original line number Diff line number Diff line
@@ -195,7 +195,7 @@ page_cur_tuple_insert(
	dict_index_t*	index,	/* in: record descriptor */
	mtr_t*		mtr)	/* in: mini-transaction handle */
{
	return(page_cur_insert_rec_low(cursor, tuple, index, NULL, mtr));
	return(page_cur_insert_rec_low(cursor, tuple, index, NULL, NULL, mtr));
}

/***************************************************************
@@ -211,8 +211,10 @@ page_cur_rec_insert(
	page_cur_t*	cursor,	/* in: a page cursor */
	rec_t*		rec,	/* in: record to insert */
	dict_index_t*	index,	/* in: record descriptor */
	ulint*		offsets,/* in: rec_get_offsets(rec, index) */
	mtr_t*		mtr)	/* in: mini-transaction handle */
{
	return(page_cur_insert_rec_low(cursor, NULL, index, rec, mtr));
	return(page_cur_insert_rec_low(cursor, NULL, index, rec,
				offsets, mtr));
}
Loading