Commit b99bea67 authored by unknown's avatar unknown
Browse files

manually merged


configure.in:
  Auto merged
client/mysqldump.c:
  Auto merged
innobase/buf/buf0rea.c:
  Auto merged
innobase/dict/dict0load.c:
  Auto merged
innobase/fil/fil0fil.c:
  Auto merged
innobase/include/fil0fil.h:
  Auto merged
innobase/include/row0mysql.h:
  Auto merged
innobase/include/trx0trx.h:
  Auto merged
innobase/os/os0file.c:
  Auto merged
innobase/row/row0ins.c:
  Auto merged
innobase/row/row0mysql.c:
  Auto merged
innobase/row/row0sel.c:
  Auto merged
innobase/srv/srv0start.c:
  Auto merged
innobase/trx/trx0trx.c:
  Auto merged
libmysqld/lib_sql.cc:
  Auto merged
mysql-test/mysql-test-run.sh:
  Auto merged
mysql-test/r/alter_table.result:
  Auto merged
mysql-test/r/ctype_ucs.result:
  Auto merged
mysql-test/r/func_str.result:
  Auto merged
mysql-test/r/grant.result:
  Auto merged
mysql-test/r/grant_cache.result:
  Auto merged
mysql-test/r/merge.result:
  Auto merged
mysql-test/r/ndb_blob.result:
  Auto merged
mysql-test/r/ps_1general.result:
  Auto merged
mysql-test/r/subselect.result:
  Auto merged
mysql-test/r/timezone2.result:
  Auto merged
mysql-test/t/ctype_ucs.test:
  Auto merged
mysql-test/t/grant.test:
  Auto merged
mysql-test/t/merge.test:
  Auto merged
mysql-test/t/multi_update.test:
  Auto merged
mysql-test/t/mysqldump.test:
  Auto merged
mysql-test/t/subselect.test:
  Auto merged
ndb/src/ndbapi/NdbBlob.cpp:
  Auto merged
ndb/src/ndbapi/NdbConnection.cpp:
  Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
  Auto merged
ndb/src/ndbapi/NdbOperationDefine.cpp:
  Auto merged
sql/ha_innodb.cc:
  Auto merged
sql/ha_myisammrg.cc:
  Auto merged
sql/ha_myisammrg.h:
  Auto merged
sql/item_cmpfunc.cc:
  Auto merged
sql/item_func.cc:
  Auto merged
sql/item_strfunc.cc:
  Auto merged
sql/log.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql/mysqld.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql-common/client.c:
  Auto merged
sql/sql_table.cc:
  Auto merged
sql/strfunc.cc:
  Auto merged
sql/unireg.cc:
  Auto merged
vio/vio.c:
  Auto merged
vio/viosocket.c:
  Auto merged
parents bd23099b 5eaf65ab
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
#!/bin/sh

if [ "$BK_USER" = "Administrator" -o "$BK_USER" = "mysqldev" ]
then
 echo "Error: you cannot checkin as 'Administrator' or 'mysqldev' user."
 echo "as a workaround set BK_USER to your nickname"
 echo "e.g.: export BK_USER='bar'"
 echo ""
 echo "Checkin FAILED!"
 echo "Set BK_USER and retry."
 exit 1
fi

if [ `tail -c1 $BK_FILE` ]
then
 echo "File $BK_FILE does not end with a new-line character!"
+1 −0
Original line number Diff line number Diff line
@@ -49,4 +49,5 @@ enum options_client
#ifdef HAVE_NDBCLUSTER_DB
  ,OPT_NDBCLUSTER,OPT_NDB_CONNECTSTRING
#endif
  ,OPT_IGNORE_TABLE
};
+93 −8
Original line number Diff line number Diff line
@@ -43,6 +43,7 @@
#include <my_sys.h>
#include <m_string.h>
#include <m_ctype.h>
#include <hash.h>

#include "client_priv.h"
#include "mysql.h"
@@ -130,6 +131,15 @@ const char *compatible_mode_names[]=
TYPELIB compatible_mode_typelib= {array_elements(compatible_mode_names) - 1,
				  "", compatible_mode_names, NULL};

#define TABLE_RULE_HASH_SIZE   16

typedef struct st_table_rule_ent
{
  char* key;    /* dbname.tablename */
  uint key_len;
} TABLE_RULE_ENT;

HASH ignore_table;

static struct my_option my_long_options[] =
{
@@ -235,6 +245,11 @@ static struct my_option my_long_options[] =
   (gptr*) &opt_hex_blob, (gptr*) &opt_hex_blob, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
  {"host", 'h', "Connect to host.", (gptr*) &current_host,
   (gptr*) &current_host, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
  {"ignore-table", OPT_IGNORE_TABLE,
   "Do not dump the specified table. To specify more than one table to ignore, "
   "use the directive multiple times, once for each table.  Each table must "
   "be specified with both database and table names, e.g. --ignore-table=database.table",
   0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
  {"lines-terminated-by", OPT_LTB, "Lines in the i.file are terminated by ...",
   (gptr*) &lines_terminated, (gptr*) &lines_terminated, 0, GET_STR,
   REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -506,6 +521,28 @@ static void write_footer(FILE *sql_file)
} /* write_footer */


static void free_table_ent(TABLE_RULE_ENT* e)
{
  my_free((gptr) e, MYF(0));
}


static byte* get_table_key(TABLE_RULE_ENT* e, uint* len,
			   my_bool not_used __attribute__((unused)))
{
  *len= e->key_len;
  return (byte*)e->key;
}


void init_table_rule_hash(HASH* h)
{
  if(hash_init(h, charset_info, TABLE_RULE_HASH_SIZE, 0, 0,
	       (hash_get_key) get_table_key,
	       (hash_free_key) free_table_ent, 0))
    exit(EX_EOM);
}


static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
@@ -577,6 +614,30 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
  case (int) OPT_TABLES:
    opt_databases=0;
    break;
  case (int) OPT_IGNORE_TABLE:
  {
    uint len= (uint)strlen(argument);
    TABLE_RULE_ENT* e;
    if (!strchr(argument, '.'))
    {
      fprintf(stderr, "Illegal use of option --ignore-table=<database>.<table>\n");
      exit(1);
    }
    /* len is always > 0 because we know the there exists a '.' */
    e= (TABLE_RULE_ENT*)my_malloc(sizeof(TABLE_RULE_ENT) + len, MYF(MY_WME));
    if (!e)
      exit(EX_EOM);
    e->key= (char*)e + sizeof(TABLE_RULE_ENT);
    e->key_len= len;
    memcpy(e->key, argument, len);

    if (!hash_inited(&ignore_table))
      init_table_rule_hash(&ignore_table);

    if(my_hash_insert(&ignore_table, (byte*)e))
      exit(EX_EOM);
    break;
  }
  case (int) OPT_COMPATIBLE:
    {
      char buff[255];
@@ -617,6 +678,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
      }
      if (end!=compatible_mode_normal_str)
	end[-1]= 0;
      /* 
        Set charset to the default compiled value if it hasn't
        been reset yet by --default-character-set=xxx.
      */
      if (default_charset == (char*) MYSQL_UNIVERSAL_CLIENT_CHARSET)
        default_charset= (char*) MYSQL_DEFAULT_CHARSET_NAME;
      break;
    }
  case (int) OPT_MYSQL_PROTOCOL:
@@ -1991,6 +2058,14 @@ static int init_dumping(char *database)
} /* init_dumping */


my_bool include_table(byte* hash_key, uint len)
{
  if (hash_search(&ignore_table, (byte*) hash_key, len))
    return FALSE;

  return TRUE;
}


static int dump_all_tables_in_db(char *database)
{
@@ -1998,6 +2073,12 @@ static int dump_all_tables_in_db(char *database)
  uint numrows;
  char table_buff[NAME_LEN*2+3];

  char hash_key[2*NAME_LEN+2];  /* "db.tablename" */
  char *afterdot;

  afterdot= strmov(hash_key, database);
  *afterdot++= '.';

  if (init_dumping(database))
    return 1;
  if (opt_xml)
@@ -2023,6 +2104,9 @@ static int dump_all_tables_in_db(char *database)
           /* We shall continue here, if --force was given */
  }
  while ((table= getTableName(0)))
  {
    char *end= strmov(afterdot, table);
    if (include_table(hash_key, end - hash_key))
    {
      numrows = getTableStructure(table, database);
      if (!dFlag && numrows > 0)
@@ -2030,6 +2114,7 @@ static int dump_all_tables_in_db(char *database)
      my_free(order_by, MYF(MY_ALLOW_ZERO_PTR));
      order_by= 0;
    }
  }
  if (opt_xml)
  {
    fputs("</database>\n", md_result_file);
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ NDB_VERSION_STATUS="alpha"
# Remember that regexps needs to quote [ and ] since this is run through m4
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"`
MYSQL_BASE_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|\.[[^.]]*$||"`
MYSQL_VERSION_ID=`echo $MYSQL_NO_DASH_VERSION. | sed -e 's/\./  /g; s/ \([[0-9]]\) / 0\\1 /g; s/ //g'`
MYSQL_VERSION_ID=`echo $MYSQL_NO_DASH_VERSION. | sed -e 's/[[^0-9.]]//g; s/\./  /g; s/ \([[0-9]]\) / 0\\1 /g; s/ //g'`

# The port should be constant for a LONG time
MYSQL_TCP_PORT_DEFAULT=3306
+12 −10
Original line number Diff line number Diff line
@@ -45,7 +45,8 @@ Vio* vio_new_win32shared_memory(NET *net,HANDLE handle_file_map,
                                HANDLE event_server_wrote,
                                HANDLE event_server_read,
                                HANDLE event_client_wrote,
				   HANDLE event_client_read);
                                HANDLE event_client_read,
                                HANDLE event_conn_closed);
int vio_read_pipe(Vio *vio, gptr buf, int size);
int vio_write_pipe(Vio *vio, const gptr buf, int size);
int vio_close_pipe(Vio * vio);
@@ -197,6 +198,7 @@ struct st_vio
  HANDLE  event_server_read;
  HANDLE  event_client_wrote;
  HANDLE  event_client_read;
  HANDLE  event_conn_closed;
  long    shared_memory_remain;
  char    *shared_memory_pos;
  NET     *net;
Loading