Commit e9f5cb8a authored by monty@donna.mysql.com's avatar monty@donna.mysql.com
Browse files

merge

parents e3e84780 f0952ce3
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -16818,9 +16818,10 @@ from a database to another:
RENAME TABLE current_database.table_name TO other_database.table_name;
@end example
When you execute @code{RENAME}, you can't have any locked tables or active
transactions.  You must also have the @code{ALTER TABLE} privilege on both
the old and the new table.
When you execute @code{RENAME}, you can't have any locked tables or
active transactions.  You must also have the @code{ALTER TABLE}
privilege on the original table and @code{CREATE} and @code{INSERT}
privilege on the new table.
If @strong{MySQL} encounters any errors in a multiple table rename, it
will do a reverse rename for all renamed tables to get everything back
@@ -18222,7 +18223,9 @@ file name, @strong{MySQL} will close and reopen the update log file.
@item @code{PRIVILEGES} @tab Reloads the privileges from the grant tables in
the @code{mysql} database.
@item @code{TABLES} @tab Closes all open tables.
@item @code{TABLES} @tab Closes all open tables and force all tables in use to be closed.
@item @code{TABLES table_name [,table_name...]} @tab Flush only the given tables
@item @code{TABLES WITH READ LOCK} @tab Closes all open tables and locks all tables for all databases with a read until one executes @code{UNLOCK TABLES}.
@@ -35400,6 +35403,8 @@ and will soon be declared beta, gamma and release.
@appendixsubsec Changes in release 3.23.23
@itemize @bullet
@item
Added table_list to @code{FLUSH TABLES} commmand.
@item
Added atomic @code{RENAME} command.
@item
Don't count entries with @code{NULL} in @code{COUNT(DISTINCT ..)}.
+11 −11
Original line number Diff line number Diff line
@@ -286,8 +286,8 @@ int main(int argc,char *argv[])
      histfile=my_strdup(getenv("MYSQL_HISTFILE"),MYF(MY_WME));
    else if (getenv("HOME"))
    {
      histfile=(char*) my_malloc(strlen(getenv("HOME"))
				 + strlen("/.mysql_history")+2,
      histfile=(char*) my_malloc((uint) strlen(getenv("HOME"))
				 + (uint) strlen("/.mysql_history")+2,
				 MYF(MY_WME));
      if (histfile)
	sprintf(histfile,"%s/.mysql_history",getenv("HOME"));
@@ -743,7 +743,7 @@ static COMMANDS *find_command (char *name,char cmd_char)
	end=0;					// no arguments to function
    }
    else
      len=strlen(name);
      len=(uint) strlen(name);
  }

  for (uint i= 0; commands[i].name; i++)
@@ -772,7 +772,7 @@ static bool add_line(String &buffer,char *line,char *in_string)
    add_history(line);
#endif
#ifdef USE_MB
  char *strend=line+strlen(line);
  char *strend=line+(uint) strlen(line);
#endif

  for (pos=out=line ; (inchar= (uchar) *pos) ; pos++)
@@ -926,14 +926,14 @@ static char *new_command_generator(char *text,int state)
  static uint i;

  if (!state) {
    textlen=strlen(text);
    textlen=(uint) strlen(text);
  }

  if (textlen>0) { /* lookup in the hash */
    if (!state) {
      uint len;

      b = find_all_matches(&ht,text,strlen(text),&len);
      b = find_all_matches(&ht,text,(uint) strlen(text),&len);
      if (!b) {
	return NullS;
      }
@@ -961,7 +961,7 @@ static char *new_command_generator(char *text,int state)
    }
    ptr= NullS;
    while (e && !ptr) { /* find valid entry in bucket */
      if (strlen(e->str)==b->nKeyLength) {
      if ((uint) strlen(e->str)==b->nKeyLength) {
	ptr = strdup(e->str);
      }
      /* find the next used entry */
@@ -1054,7 +1054,7 @@ You can turn off this feature to get a quicker startup with -A\n\n");
      while ((table_row=mysql_fetch_row(tables)))
      {
	if (!completion_hash_exists(&ht,(char*) table_row[0],
				    strlen((const char*) table_row[0])))
				    (uint) strlen((const char*) table_row[0])))
	  add_word(&ht,table_row[0]);
      }
    }
@@ -1102,7 +1102,7 @@ You can turn off this feature to get a quicker startup with -A\n\n");
	add_word(&ht,field_names[i][j]);
	field_names[i][num_fields+j] = my_strdup(sql_field->name,MYF(0));
	if (!completion_hash_exists(&ht,field_names[i][num_fields+j],
				    strlen(field_names[i][num_fields+j])))
				    (uint) strlen(field_names[i][num_fields+j])))
	  add_word(&ht,field_names[i][num_fields+j]);
	j++;
      }
@@ -1351,7 +1351,7 @@ print_table_data(MYSQL_RES *result)
  separator.copy("+",1);
  while ((field = mysql_fetch_field(result)))
  {
    uint length=skip_column_names ? 0 : strlen(field->name);
    uint length=skip_column_names ? 0 : (uint) strlen(field->name);
    if (quick)
      length=max(length,field->length);
    else
@@ -1437,7 +1437,7 @@ print_table_data_vertically(MYSQL_RES *result)

  while ((field = mysql_fetch_field(result)))
  {
    uint length=strlen(field->name);
    uint length=(uint) strlen(field->name);
    if (length > max_length)
      max_length= length;
    field->max_length=length;
+2 −2
Original line number Diff line number Diff line
@@ -909,7 +909,7 @@ static void print_top(MYSQL_RES *result)
  mysql_field_seek(result,0);
  while((field = mysql_fetch_field(result)))
  {
    if ((length=strlen(field->name)) > field->max_length)
    if ((length=(uint) strlen(field->name)) > field->max_length)
      field->max_length=length;
    else
      length=field->max_length;
@@ -974,7 +974,7 @@ static void print_relative_row_vert(MYSQL_RES *result __attribute__((unused)),
	 llstr((tmp - last_values[row]), buff));

  /* Find the minimum row length needed to output the relative value */
  if ((length=strlen(buff) > ex_val_max_len[row]) && ex_status_printed)
  if ((length=(uint) strlen(buff) > ex_val_max_len[row]) && ex_status_printed)
    ex_val_max_len[row] = length;
  last_values[row] = tmp;
}
+3 −3
Original line number Diff line number Diff line
@@ -782,7 +782,7 @@ static char *add_load_option(char *ptr,const char *object,
  if (object)
  {
    ptr= strxmov(ptr," ",statement," '",NullS);
    ptr= field_escape(ptr,object,strlen(object));
    ptr= field_escape(ptr,object,(uint) strlen(object));
    *ptr++= '\'';
  }
  return ptr;
@@ -910,7 +910,7 @@ static void dumpTable(uint numFields, char *table)
    total_length=net_buffer_length;		/* Force row break */
    row_break=0;
    rownr=0;
    init_length=strlen(insert_pat)+4;
    init_length=(uint) strlen(insert_pat)+4;

    while ((row=mysql_fetch_row(res)))
    {
@@ -1215,7 +1215,7 @@ static void print_value(FILE *file, MYSQL_RES *result, MYSQL_ROW row,
	fputc(' ',file);
	fputs(prefix, file);
	if (string_value)
	  unescape(file,row[0],strlen(row[0]));
	  unescape(file,row[0],(uint) strlen(row[0]));
	else
	  fputs(row[0], file);
	return;
+1 −1
Original line number Diff line number Diff line
@@ -454,7 +454,7 @@ static char *add_load_option(char *ptr,const char *object,const char *statement)
  if (object)
  {
    ptr= strxmov(ptr," ",statement," '",NullS);
    ptr= field_escape(ptr,object,strlen(object));
    ptr= field_escape(ptr,object,(uint) strlen(object));
    *ptr++= '\'';
  }
  return ptr;
Loading