Commit f8a1a341 authored by unknown's avatar unknown
Browse files

Merge jlindstrom@bk-internal.mysql.com:/home/bk/mysql-4.1

into hundin.mysql.fi:/home/jan/mysql-4.1

parents ca8fcc00 8191a28b
Loading
Loading
Loading
Loading
+14 −14
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ $opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env="";
$opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix="";
$opt_tmp=$opt_version_suffix="";
$opt_bundled_zlib=$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_one_error=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_archive=$opt_with_cluster=$opt_with_csv=$opt_with_example=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=$opt_readline=0;
$opt_embedded_test=$opt_ps_test=$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=0;
$opt_skip_embedded_test=$opt_skip_ps_test=$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=0;

GetOptions(
	"bdb",
@@ -25,7 +25,6 @@ GetOptions(
	"delete",
	"distribution=s",
	"enable-shared",
	"embedded-test",
	"fast-benchmark",
	"help|Information",
	"innodb",
@@ -41,9 +40,10 @@ GetOptions(
	"one-error",
	"perl-files=s",
	"perl-options=s",
 	"ps-test",
	"raid",
	"readline",
	"skip-embedded-test",
 	"skip-ps-test",
	"stage=i",
	"static-client",
	"static-perl",
@@ -278,7 +278,7 @@ if ($opt_stage <= 1)
		$opt_config_options.= " --with-libedit";
	}
  $opt_config_options.= " --with-embedded-server" unless ($opt_without_embedded);
  $opt_embedded_test= 0 if ($opt_without_embedded);
  $opt_skip_embedded_test= 1 if ($opt_without_embedded);
  $opt_config_options.= " --with-archive-storage-engine" if ($opt_with_archive);
  $opt_config_options.= " --with-ndbcluster" if ($opt_with_cluster);
  $opt_config_options.= " --with-csv-storage-engine" if ($opt_with_csv);
@@ -391,14 +391,14 @@ if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest)
  safe_cd("${test_dir}/mysql-test");
  check_system("./mysql-test-run $flags --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful");

  if ($opt_ps_test)
  unless ($opt_skip_ps_test)
  {
    log_timestamp();
    info("Running test suite using prepared statements");
    check_system("./mysql-test-run $flags --ps-protocol --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful");
  }
  
  if ($opt_embedded_test)
  unless ($opt_skip_embedded_test)
  {
    log_timestamp();
    info("Running embedded server test suite");
@@ -551,9 +551,6 @@ Delete the distribution file.
--distribution=<distribution_file>
Name of the MySQL source distribution file.

--embedded-test
Run the test suite against the embedded server

--enable-shared
Compile with shared libraries

@@ -602,15 +599,18 @@ Compile and install the given perl modules.
--perl-options=<options>
Build Perl modules with the additional options

--ps-test
Run an additional test run, using prepared statements

--raid
Compile with RAID support

--readline
Compile against readline library instead of libedit

--skip-embedded-test
Skip running the test suite against the embedded server

--skip-ps-test
Skip running the additional test run that uses the prepared statement protocol

--stage=[1-6]
Start script from some specific point.

+1 −0
Original line number Diff line number Diff line
@@ -146,3 +146,4 @@ EXPORTS
	mysql_rpl_query_type
	mysql_slave_query
	mysql_embedded
	get_defaults_files
+1 −0
Original line number Diff line number Diff line
@@ -157,3 +157,4 @@ EXPORTS
	mysql_stmt_attr_get
	mysql_stmt_attr_set
	mysql_stmt_field_count
	get_defaults_files
+5 −0
Original line number Diff line number Diff line
@@ -38,6 +38,11 @@ select * from t2;
insert into t2 select * from t1 procedure analyse();
select * from t2;
drop table t1,t2;

#
# Bug#2813 - analyse does not quote string values in enums from string
#

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();
+26 −3
Original line number Diff line number Diff line
@@ -98,6 +98,7 @@ static bool fixDepricated(InitConfigFileParser::Context & ctx, const char *);
static bool saveInConfigValues(InitConfigFileParser::Context & ctx, const char *);
static bool fixFileSystemPath(InitConfigFileParser::Context & ctx, const char * data);
static bool fixBackupDataDir(InitConfigFileParser::Context & ctx, const char * data);
static bool fixShmUniqueId(InitConfigFileParser::Context & ctx, const char * data);

const ConfigInfo::SectionRule 
ConfigInfo::m_SectionRules[] = {
@@ -111,6 +112,8 @@ ConfigInfo::m_SectionRules[] = {
  { "REP",  transformNode, 0 },
  { "EXTERNAL REP",  transformExtNode, 0 },

  { MGM_TOKEN,  fixShmUniqueId, 0 },

  { "TCP",  checkConnectionSupport, 0 },
  { "SHM",  checkConnectionSupport, 0 },
  { "SCI",  checkConnectionSupport, 0 },
@@ -3155,19 +3158,39 @@ fixPortNumber(InitConfigFileParser::Context & ctx, const char * data){
  DBUG_RETURN(true);
}

static bool 
fixShmUniqueId(InitConfigFileParser::Context & ctx, const char * data)
{
  DBUG_ENTER("fixShmUniqueId");
  Uint32 nodes= 0;
  ctx.m_userProperties.get(ctx.fname, &nodes);
  if (nodes == 1) // first management server
  {
    Uint32 portno= atoi(NDB_PORT);
    ctx.m_currentSection->get("PortNumber", &portno);
    ctx.m_userProperties.put("ShmUniqueId", portno);
  }
  DBUG_RETURN(true);
}

static 
bool 
fixShmKey(InitConfigFileParser::Context & ctx, const char *)
{
  DBUG_ENTER("fixShmKey");
  Uint32 id1= 0, id2= 0, key= 0;
  require(ctx.m_currentSection->get("NodeId1", &id1));
  require(ctx.m_currentSection->get("NodeId2", &id2));
  if(ctx.m_currentSection->get("ShmKey", &key))
    return true;
  {
    DBUG_RETURN(true);
  }

  key= (id1 > id2 ? id1 << 16 | id2 : id2 << 16 | id1);
  require(ctx.m_userProperties.get("ShmUniqueId", &key));
  key= key << 16 | (id1 > id2 ? id1 << 8 | id2 : id2 << 8 | id1);
  ctx.m_currentSection->put("ShmKey", key);
  return true;
  DBUG_PRINT("info",("Added ShmKey=0x%x", key));
  DBUG_RETURN(true);
}

/**
Loading