Commit 77a86154 authored by unknown's avatar unknown
Browse files

merged


BitKeeper/etc/ignore:
  auto-union
client/mysqlcheck.c:
  Auto merged
myisammrg/myrg_open.c:
  Auto merged
scripts/mysqld_safe.sh:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
parents b5c6ac6a 6b1444d7
Loading
Loading
Loading
Loading
+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)
+52 −0
Original line number Diff line number Diff line
slave stop;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
slave start;
drop database if exists mysqltest1;
create database mysqltest1 /*!40100 character set latin2 */;
use mysqltest1;
drop table if exists t1;
create table t1 (a varchar(255) character set latin2, b varchar(4));
SET CHARACTER SET cp1250_latin2;
INSERT INTO t1 VALUES ('','80');
INSERT INTO t1 VALUES ('','90');
INSERT INTO t1 VALUES ('','A0');
INSERT INTO t1 VALUES ('','B0');
INSERT INTO t1 VALUES ('','C0');
INSERT INTO t1 VALUES ('','D0');
INSERT INTO t1 VALUES ('','E0');
INSERT INTO t1 VALUES ('','F0');
select "--- on master ---";
--- on master ---
--- on master ---
select hex(a),b from t1 order by b;
hex(a)	b
A9A6ABAEAC	80
B9B6BBBEBC	90
A3A1AAAF	A0
B3B1BAA5B5BF	B0
C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF	C0
D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF	D0
E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF	E0
F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF	F0
show binlog events from 1979;
Log_name	Pos	Event_type	Server_id	Orig_log_pos	Info
master-bin.001	1979	Query	1	1979	use `mysqltest1`; SET CHARACTER SET DEFAULT
use mysqltest1;
select "--- on slave ---";
--- on slave ---
--- on slave ---
select hex(a),b from t1 order by b;
hex(a)	b
A9A6ABAEAC	80
B9B6BBBEBC	90
A3A1AAAF	A0
B3B1BAA5B5BF	B0
C0C1C2C3C4C5C6C7C8C9CACBCCCDCECF	C0
D0D1D2D3D4D5D6D7D8D9DADBDCDDDEDF	D0
E0E1E2E3E4E5E6E7E8E9EAEBECEDEEEF	E0
F0F1F2F3F4F5F6F7F8F9FAFBFCFDFEFF	F0
drop table t1;
drop database mysqltest1;
+42 −0
Original line number Diff line number Diff line
source include/master-slave.inc;
--disable_warnings
drop database if exists mysqltest1;
# 4.1 bases its conversion on the db's charset,
# while 4.0 uses the part of "SET CHARACTER SET" after "_".
# So for 4.1 we add a clause to CREATE DATABASE.
create database mysqltest1 /*!40100 character set latin2 */;
use mysqltest1;
drop table if exists t1;
--enable_warnings
create table t1 (a varchar(255) character set latin2, b varchar(4));
SET CHARACTER SET cp1250_latin2;
INSERT INTO t1 VALUES ('ŠŒŽ','80');
INSERT INTO t1 VALUES ('šœžŸ','90');
INSERT INTO t1 VALUES ('£¥ª¯','A0');
INSERT INTO t1 VALUES ('³¹º¼¾¿','B0');
INSERT INTO t1 VALUES ('ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏ','C0');
INSERT INTO t1 VALUES ('ÐÑÒÓÔÕÖרÙÚÛÜÝÞß','D0');
INSERT INTO t1 VALUES ('àáâãäåæçèéêëìíîï','E0');
INSERT INTO t1 VALUES ('ðñòóôõö÷øùúûüýþÿ','F0');
select "--- on master ---";
select hex(a),b from t1 order by b;
# It's complicated to verify that the charset is reset to default in
# the binlog after each query, except by checking the binlog. When you
# merge this into 4.1/5.0, the 1979 will have to be changed; all you have
# to do is read the var/log/master-bin.0*01 with mysqlbinlog, verify
# that a SET CHARACTER SET DEFAULT is just after the last INSERT, and
# replace 1979 by its position (the "# at" line above the SET).
show binlog events from 1979;
save_master_pos;
connection slave;
sync_with_master;
use mysqltest1;
select "--- on slave ---";
select hex(a),b from t1 order by b;
connection master;
drop table t1;
save_master_pos;
connection slave;
sync_with_master;
connection master;
drop database mysqltest1;
+14 −23
Original line number Diff line number Diff line
@@ -322,23 +322,13 @@ do
    # but should work for the rest of the servers.
    # The only thing is ps x => redhat 5 gives warnings when using ps -x.
    # kill -9 is used or the process won't react on the kill.
    if test -n "$mysql_tcp_port"
    then
      numofproces=`ps xa | grep -v "grep" | grep $ledir/$MYSQLD| grep -c "port=$mysql_tcp_port"`
    else
      numofproces=`ps xa | grep -v "grep" | grep -c $ledir/$MYSQLD`
    fi
    numofproces=`ps xa | grep -v "grep" | grep "$ledir/$MYSQLD\>" | grep -c "pid-file=$pid_file"`

    echo -e "\nNumber of processes running now: $numofproces" | tee -a $err_log
    I=1
    while test "$I" -le "$numofproces"
    do 
      if test -n "$mysql_tcp_port"
      then
        PROC=`ps xa | grep "$ledir/$MYSQLD\>" | grep -v "grep" | grep "port=$mysql_tcp_port" | sed -n '$p'` 
      else
        PROC=`ps xa | grep "$ledir/$MYSQLD\>" | grep -v "grep" | sed -n '$p'` 
      fi
      PROC=`ps xa | grep "$ledir/$MYSQLD\>" | grep -v "grep" | grep "pid-file=$pid_file" | sed -n '$p'` 

      for T in $PROC
      do
@@ -359,3 +349,4 @@ done

echo "`date +'%y%m%d %H:%M:%S'`  mysqld ended" | tee -a $err_log
echo "" | tee -a $err_log
+6 −28
Original line number Diff line number Diff line
@@ -1426,15 +1426,6 @@ COLLATION_CONNECTION=%u,COLLATION_DATABASE=%u,COLLATION_SERVER=%u",
        if (e.write(file))
          goto err;
      }
#if MYSQL_VERSION_ID < 40100      
      if (thd->variables.convert_set)
      {
	Query_log_event e(thd, "SET CHARACTER SET DEFAULT", 25, 0);
	e.set_log_pos(this);
	if (e.write(file))
	  goto err;
      }
#endif
    }

    /*
@@ -1932,19 +1923,6 @@ void MYSQL_LOG::set_max_size(ulong max_size_arg)
}


Disable_binlog::Disable_binlog(THD *thd_arg) : 
  thd(thd_arg), save_options(thd_arg->options)
{
  thd_arg->options&= ~OPTION_BIN_LOG;
}


Disable_binlog::~Disable_binlog()
{
  thd->options= save_options;
}


/*
  Check if a string is a valid number

Loading