Commit 40649e92 authored by unknown's avatar unknown
Browse files

Merge mysql.com:/home/jonas/src/mysql-4.1

into mysql.com:/home/jonas/src/mysql-5.0


libmysql_r/Makefile.am:
  Auto merged
mysql-test/r/analyse.result:
  Auto merged
sql/sql_analyse.cc:
  Auto merged
parents dd3cfa8d ed6c9afd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@

target = libmysqlclient_r.la
target_defs = -DDONT_USE_RAID -DMYSQL_CLIENT @LIB_EXTRA_CCFLAGS@
LIBS = @LIBS@ @openssl_libs@
LIBS = @LIBS@ @ZLIB_LIBS@ @openssl_libs@

INCLUDES = @MT_INCLUDES@ \
	   -I$(top_srcdir)/include $(openssl_includes) @ZLIB_INCLUDES@ \
+3 −3
Original line number Diff line number Diff line
@@ -191,7 +191,7 @@ if ( cd "$fs_ndb" ; $exec_mgmtsrvr -f config.ini ) ; then :; else
  echo "Unable to start $exec_mgmtsrvr from `pwd`"
  exit 1
fi
if sleep_until_file_created $fs_ndb/ndb_3.pid 30
if sleep_until_file_created $fs_ndb/ndb_3.pid 120
then :; else
  exit 1
fi
@@ -201,7 +201,7 @@ cat `find "$fs_ndb" -name 'ndb_*.pid'` > "$fs_ndb/$pidfile"

echo "Starting ndbd"
( cd "$fs_ndb" ; $exec_ndb $flags_ndb & )
if sleep_until_file_created $fs_ndb/ndb_1.pid 30
if sleep_until_file_created $fs_ndb/ndb_1.pid 120
then :; else
  stop_default_ndbcluster
  exit 1
@@ -212,7 +212,7 @@ cat `find "$fs_ndb" -name 'ndb_*.pid'` > "$fs_ndb/$pidfile"

echo "Starting ndbd"
( cd "$fs_ndb" ; $exec_ndb $flags_ndb & )
if sleep_until_file_created $fs_ndb/ndb_2.pid 30
if sleep_until_file_created $fs_ndb/ndb_2.pid 120
then :; else
  stop_default_ndbcluster
  exit 1
+6 −0
Original line number Diff line number Diff line
@@ -96,3 +96,9 @@ select * from t2;
Field_name	Min_value	Max_value	Min_length	Max_length	Empties_or_zeros	Nulls	Avg_value_or_avg_length	Std	Optimal_fieldtype
test.t1.a	1	2	1	1	0	0	1.5000	0.5000	ENUM('1','2') NOT NULL
drop table t1,t2;
create table t1 (v varchar(128));
insert into t1 values ('abc'),('abc\'def\\hij\"klm\0opq'),('\''),('\"'),('\\'),('a\0'),('b\''),('c\"'),('d\\'),('\'b'),('\"c'),('\\d'),('a\0\0\0b'),('a\'\'\'\'b'),('a\"\"\"\"b'),('a\\\\\\\\b'),('\'\0\\\"'),('\'\''),('\"\"'),('\\\\'),('The\ZEnd');
select * from t1 procedure analyse();
Field_name	Min_value	Max_value	Min_length	Max_length	Empties_or_zeros	Nulls	Avg_value_or_avg_length	Std	Optimal_fieldtype
test.t1.v	"	\\	1	19	0	0	3.7619	NULL	ENUM('"','""','"c','\'\0\\"','\'','\'\'','\'b','a\0\0\0b','a\0','a""""b','a\'\'\'\'b','abc','abc\'def\\hij"klm\0opq','a\\\\\\\\b','b\'','c"','d\\','The\ZEnd','\\','\\d','\\\\') NOT NULL
drop table t1;
+4 −0
Original line number Diff line number Diff line
@@ -38,3 +38,7 @@ select * from t2;
insert into t2 select * from t1 procedure analyse();
select * from t2;
drop table t1,t2;
create table t1 (v varchar(128));
insert into t1 values ('abc'),('abc\'def\\hij\"klm\0opq'),('\''),('\"'),('\\'),('a\0'),('b\''),('c\"'),('d\\'),('\'b'),('\"c'),('\\d'),('a\0\0\0b'),('a\'\'\'\'b'),('a\"\"\"\"b'),('a\\\\\\\\b'),('\'\0\\\"'),('\'\''),('\"\"'),('\\\\'),('The\ZEnd');
select * from t1 procedure analyse();
drop table t1;
+20 −22
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@
   0, 0, \
   0, \
   (desc), \
   (void *)(value) }
   (value) }

#define CPC_ARG(name, type, opt, desc) \
 { (name), \
@@ -351,17 +351,12 @@ SimpleCpcClient::define_process(Process & p, Properties& reply){

int
SimpleCpcClient::list_processes(Vector<Process> &procs, Properties& reply) {
  enum Proclist {
    Proclist_Start,
    Proclist_End,
    Proclist_Entry
  };
  int start, end, entry; 
  const ParserRow_t list_reply[] = {
    CPC_CMD("start processes", Proclist_Start, ""),

    CPC_CMD("end processes", Proclist_End, ""),
    CPC_CMD("start processes", &start, ""),
    CPC_CMD("end processes", &end, ""),

    CPC_CMD("process", Proclist_Entry, ""),
    CPC_CMD("process", &entry, ""),
    CPC_ARG("id",    Int,    Mandatory, "Id of process."),
    CPC_ARG("name",  String, Mandatory, "Name of process"),
    CPC_ARG("group", String, Mandatory, "Group of process"),
@@ -390,26 +385,29 @@ SimpleCpcClient::list_processes(Vector<Process> &procs, Properties& reply) {
  bool done = false;
  while(!done) {
    const Properties *proc;
    enum Proclist p;
    cpc_recv(list_reply, &proc, (void **)&p);
    void *p;
    cpc_recv(list_reply, &proc, &p);

    switch(p) {
    case Proclist_Start:
    if(p == &start)
    {
      /* do nothing */
      break;
    case Proclist_End:
    }
    else if(p == &end)
    {
      done = true;
      break;
    case Proclist_Entry:
    }
    else if(p == &entry)
    {
      if(proc != NULL){
	Process p;
	convert(* proc, p);
	procs.push_back(p);
      }
      break;
    default:
      /* ignore */
      break;
    }
    else
    {
      ndbout_c("internal error: %d", __LINE__);
      return -1;
    }
  }
  return 0;
Loading