Commit 3fb79dac authored by unknown's avatar unknown

Merge pgalbraith@bk-internal.mysql.com:/home/bk/mysql-5.0

into krsna.patg.net:/home/patg/mysql-5.0

parents bc430174 29f460f2
#!/usr/bin/perl
#
# By Matt Wagner <matt@mysql.com> 2005
#
# This script generates HP Depot packages for MySQL Server.
# It basically repackages a binary tarball as a depot.
#
# Usage: ./Do-hpux-depot <untarred-binary-tarball>
#
$fullname = shift @ARGV;
$fullname or die "No package name was specified";
-d $fullname or die "That directory is not present!";
$fullname =~ s,/+$,,; # Remove ending slash if any
chomp($pwd= `pwd`);
%title= (
"mysql-standard" => "MySQL Community Edition - Standard (GPL)",
"mysql-debug" => "MySQL Community Edition - Debug (GPL)",
"mysql-max" => "MySQL Community Edition - Experimental (GPL)",
"mysql-pro" => "MySQL Pro (Commercial)",
"mysql-classic" => "MySQL Classic (Commercial)",
"mysql-cluster" => "MySQL Cluster (Commercial)",
);
%architecture= (
"hpux11.23" => "HP-UX_B.11.23",
"hpux11.11" => "HP-UX_B.11.11",
"hpux11.00" => "HP-UX_B.11.00",
);
%os_release= (
"hpux11.23" => "?.11.2?",
"hpux11.11" => "?.11.1?",
"hpux11.00" => "?.11.0?",
);
%machine_type= (
"ia64" => "ia64*",
"hppa2.0w" => "9000/*",
);
$fullname =~ m/^(mysql-\w+)-([\d\.]+)-hp-(hpux11\.\d\d)-(hppa2\.0w|(ia64))-?(64bit)?$/;
# print "title: $1\n";
# print "version: $2\n";
# print "os: $3\n";
# print "cpu: $4\n";
# print "64: $6\n";
$cpu64= ($6 ne "") ? "_64" : "";
open (PSF,">${fullname}.psf") or die "Unable to write PSF file ($!)\n";
print PSF <<EOF;
product
tag $1
vendor_tag "MySQL_AB"
title "$title{$1}"
description "MySQL Database Server and Clients"
revision $2
architecture $architecture{$3}$cpu64
machine_type $machine_type{$4}
os_name HP-UX
os_release $os_release{$3}
directory /usr/local
fileset
tag all
revision $2
directory $fullname=/usr/local/$fullname
file_permissions -u 222 -g bin -o bin
file *
end
end
EOF
close(PSF);
system("/usr/sbin/swpackage -v -d \"|gzip -c > $fullname.depot.gz\" -x target_type=tape -s ${pwd}/${fullname}.psf");
......@@ -360,6 +360,10 @@ sub main () {
if ( $opt_start_and_exit )
{
if ( ndbcluster_start() )
{
mtr_error("Can't start ndbcluster");
}
if ( mysqld_start('master',0,[],[]) )
{
mtr_report("Servers started, exiting");
......@@ -1055,7 +1059,7 @@ sub ndbcluster_start () {
"--data-dir=$glob_mysql_test_dir/var"],
"", "/dev/null", "", "") )
{
mtr_error("Error ndbcluster_install");
mtr_error("Error ndbcluster_start");
return 1;
}
......
......@@ -1718,9 +1718,6 @@ Innodb_rows_deleted 2070
show status like "Innodb_rows_inserted";
Variable_name Value
Innodb_rows_inserted 31708
show status like "Innodb_rows_read";
Variable_name Value
Innodb_rows_read 80162
show status like "Innodb_rows_updated";
Variable_name Value
Innodb_rows_updated 29530
......
......@@ -2674,7 +2674,6 @@ Warning 1265 Data truncated for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' at row 1
Warning 1264 Out of range value adjusted for column 'c7' at row 1
Note 1265 Data truncated for column 'c12' at row 1
Warning 1264 Out of range value adjusted for column 'c12' at row 1
execute my_select ;
c1 1
......@@ -2725,7 +2724,6 @@ Warning 1265 Data truncated for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' at row 1
Warning 1264 Out of range value adjusted for column 'c7' at row 1
Note 1265 Data truncated for column 'c12' at row 1
Warning 1264 Out of range value adjusted for column 'c12' at row 1
execute my_select ;
c1 -1
......
......@@ -59,8 +59,8 @@ def test t9 t9 c7 c7 4 12 1 Y 32768 31 63
def test t9 t9 c8 c8 5 22 1 Y 32768 31 63
def test t9 t9 c9 c9 5 22 1 Y 32768 31 63
def test t9 t9 c10 c10 5 22 1 Y 32768 31 63
def test t9 t9 c11 c11 0 9 6 Y 32768 4 63
def test t9 t9 c12 c12 0 10 6 Y 32768 4 63
def test t9 t9 c11 c11 246 7 6 Y 0 4 63
def test t9 t9 c12 c12 246 8 6 Y 0 4 63
def test t9 t9 c13 c13 10 10 10 Y 128 0 63
def test t9 t9 c14 c14 12 19 19 Y 128 0 63
def test t9 t9 c15 c15 7 19 19 N 1249 0 63
......@@ -1755,8 +1755,8 @@ Table Create Table
t5 CREATE TABLE `t5` (
`const01` bigint(1) NOT NULL default '0',
`param01` bigint(20) default NULL,
`const02` double(3,1) NOT NULL default '0.0',
`param02` double default NULL,
`const02` decimal(3,1) NOT NULL default '0.0',
`param02` decimal(64,30) default NULL,
`const03` double NOT NULL default '0',
`param03` double default NULL,
`const04` varchar(3) NOT NULL default '',
......@@ -1777,7 +1777,7 @@ t5 CREATE TABLE `t5` (
`param11` bigint(20) default NULL,
`const12` binary(0) default NULL,
`param12` bigint(20) default NULL,
`param13` double default NULL,
`param13` decimal(64,30) default NULL,
`param14` longtext,
`param15` longblob
) ENGINE=MyISAM DEFAULT CHARSET=latin1
......@@ -1785,9 +1785,9 @@ select * from t5 ;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr
def test t5 t5 const01 const01 8 1 1 N 32769 0 63
def test t5 t5 param01 param01 8 20 1 Y 32768 0 63
def test t5 t5 const02 const02 5 3 3 N 32769 1 63
def test t5 t5 param02 param02 5 20 1 Y 32768 31 63
def test t5 t5 const03 const03 5 23 1 N 32769 31 63
def test t5 t5 const02 const02 246 3 3 N 1 1 63
def test t5 t5 param02 param02 246 64 32 Y 0 30 63
def test t5 t5 const03 const03 5 17 1 N 32769 31 63
def test t5 t5 param03 param03 5 20 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 1 0 8
def test t5 t5 param04 param04 252 16777215 3 Y 16 0 8
......@@ -1807,13 +1807,13 @@ def test t5 t5 const11 const11 3 4 4 Y 32768 0 63
def test t5 t5 param11 param11 8 20 4 Y 32768 0 63
def test t5 t5 const12 const12 254 0 0 Y 128 0 63
def test t5 t5 param12 param12 8 20 0 Y 32768 0 63
def test t5 t5 param13 param13 5 20 0 Y 32768 31 63
def test t5 t5 param13 param13 246 64 0 Y 0 30 63
def test t5 t5 param14 param14 252 16777215 0 Y 16 0 8
def test t5 t5 param15 param15 252 16777215 0 Y 144 0 63
const01 8
param01 8
const02 8.0
param02 8
param02 8.000000000000000000000000000000
const03 8
param03 8
const04 abc
......@@ -1905,8 +1905,8 @@ def @arg07 253 20 1 Y 128 31 63
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
def @arg11 253 20 1 Y 128 31 63
def @arg12 253 20 1 Y 128 31 63
def @arg11 253 64 6 Y 128 30 63
def @arg12 253 64 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
......@@ -1928,7 +1928,7 @@ def @arg30 253 8192 8 Y 0 31 8
def @arg31 253 8192 3 Y 0 31 8
def @arg32 253 8192 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select @arg01:= c1, @arg02:= c2, @arg03:= c3, @arg04:= c4,
@arg05:= c5, @arg06:= c6, @arg07:= c7, @arg08:= c8,
@arg09:= c9, @arg10:= c10, @arg11:= c11, @arg12:= c12,
......@@ -1952,8 +1952,8 @@ def @arg07 253 20 0 Y 128 31 63
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
def @arg11 253 20 0 Y 128 31 63
def @arg12 253 20 0 Y 128 31 63
def @arg11 253 64 0 Y 128 30 63
def @arg12 253 64 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
......@@ -2002,8 +2002,8 @@ def @arg07 253 20 1 Y 128 31 63
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
def @arg11 253 20 1 Y 128 31 63
def @arg12 253 20 1 Y 128 31 63
def @arg11 253 64 6 Y 128 30 63
def @arg12 253 64 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
......@@ -2025,7 +2025,7 @@ def @arg30 253 8192 8 Y 0 31 8
def @arg31 253 8192 3 Y 0 31 8
def @arg32 253 8192 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
execute stmt1 using @my_key ;
@arg01:= c1 @arg02:= c2 @arg03:= c3 @arg04:= c4 @arg05:= c5 @arg06:= c6 @arg07:= c7 @arg08:= c8 @arg09:= c9 @arg10:= c10 @arg11:= c11 @arg12:= c12 @arg13:= c13 @arg14:= c14 @arg15:= c15 @arg16:= c16 @arg17:= c17 @arg18:= c18 @arg19:= c19 @arg20:= c20 @arg21:= c21 @arg22:= c22 @arg23:= c23 @arg24:= c24 @arg25:= c25 @arg26:= c26 @arg27:= c27 @arg28:= c28 @arg29:= c29 @arg30:= c30 @arg31:= c31 @arg32:= c32
......@@ -2042,8 +2042,8 @@ def @arg07 253 20 0 Y 128 31 63
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
def @arg11 253 20 0 Y 128 31 63
def @arg12 253 20 0 Y 128 31 63
def @arg11 253 64 0 Y 128 30 63
def @arg12 253 64 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
......@@ -2090,8 +2090,8 @@ def @arg07 253 20 1 Y 128 31 63
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
def @arg11 253 20 1 Y 128 31 63
def @arg12 253 20 1 Y 128 31 63
def @arg11 253 64 6 Y 128 30 63
def @arg12 253 64 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
......@@ -2113,7 +2113,7 @@ def @arg30 253 8192 8 Y 0 31 8
def @arg31 253 8192 3 Y 0 31 8
def @arg32 253 8192 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12,
c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24,
c25, c26, c27, c28, c29, c30, c31, c32
......@@ -2134,8 +2134,8 @@ def @arg07 253 20 0 Y 128 31 63
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
def @arg11 253 20 0 Y 128 31 63
def @arg12 253 20 0 Y 128 31 63
def @arg11 253 64 0 Y 128 30 63
def @arg12 253 64 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
......@@ -2180,8 +2180,8 @@ def @arg07 253 20 1 Y 128 31 63
def @arg08 253 20 1 Y 128 31 63
def @arg09 253 20 1 Y 128 31 63
def @arg10 253 20 1 Y 128 31 63
def @arg11 253 20 1 Y 128 31 63
def @arg12 253 20 1 Y 128 31 63
def @arg11 253 64 6 Y 128 30 63
def @arg12 253 64 6 Y 128 30 63
def @arg13 253 8192 10 Y 128 31 63
def @arg14 253 8192 19 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
......@@ -2203,7 +2203,7 @@ def @arg30 253 8192 8 Y 0 31 8
def @arg31 253 8192 3 Y 0 31 8
def @arg32 253 8192 6 Y 0 31 8
@arg01 @arg02 @arg03 @arg04 @arg05 @arg06 @arg07 @arg08 @arg09 @arg10 @arg11 @arg12 @arg13 @arg14 @arg15 @arg16 @arg17 @arg18 @arg19 @arg20 @arg21 @arg22 @arg23 @arg24 @arg25 @arg26 @arg27 @arg28 @arg29 @arg30 @arg31 @arg32
1 1 1 1 1 1 1 1 1 1 1 1 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
1 1 1 1 1 1 1 1 1 1 1.0000 1.0000 2004-02-29 2004-02-29 11:11:11 2004-02-29 11:11:11 11:11:11 2004 1 1 a 123456789a 123456789a123456789b123456789c tinyblob tinytext blob text mediumblob mediumtext longblob longtext one monday
set @my_key= 0 ;
execute stmt1 using @my_key ;
execute full_info ;
......@@ -2218,8 +2218,8 @@ def @arg07 253 20 0 Y 128 31 63
def @arg08 253 20 0 Y 128 31 63
def @arg09 253 20 0 Y 128 31 63
def @arg10 253 20 0 Y 128 31 63
def @arg11 253 20 0 Y 128 31 63
def @arg12 253 20 0 Y 128 31 63
def @arg11 253 64 0 Y 128 30 63
def @arg12 253 64 0 Y 128 30 63
def @arg13 253 8192 0 Y 128 31 63
def @arg14 253 8192 0 Y 128 31 63
def @arg15 253 8192 19 Y 128 31 63
......@@ -2567,7 +2567,7 @@ c7 9.22337e+18
c8 9.22337203685478e+18
c9 9.22337203685478e+18
c10 9.22337203685478e+18
c12 99999.9999
c12 9999.9999
execute my_delete ;
set @arg00= '9223372036854775807' ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
......@@ -2590,7 +2590,7 @@ c7 9.22337e+18
c8 9.22337203685478e+18
c9 9.22337203685478e+18
c10 9.22337203685478e+18
c12 99999.9999
c12 9999.9999
execute my_delete ;
set @arg00= -9223372036854775808 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
......@@ -2661,7 +2661,7 @@ c7 3.40282e+38
c8 1.11111111111111e+50
c9 1.11111111111111e+50
c10 1.11111111111111e+50
c12 99999.9999
c12 9999.9999
execute my_delete ;
set @arg00= '1.11111111111111111111e+50' ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
......@@ -2674,7 +2674,6 @@ Warning 1265 Data truncated for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' at row 1
Warning 1264 Out of range value adjusted for column 'c7' at row 1
Note 1265 Data truncated for column 'c12' at row 1
Warning 1264 Out of range value adjusted for column 'c12' at row 1
execute my_select ;
c1 1
......@@ -2687,7 +2686,7 @@ c7 3.40282e+38
c8 1.11111111111111e+50
c9 1.11111111111111e+50
c10 1.11111111111111e+50
c12 99999.9999
c12 9999.9999
execute my_delete ;
set @arg00= -1.11111111111111111111e+50 ;
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
......@@ -2725,7 +2724,6 @@ Warning 1265 Data truncated for column 'c4' at row 1
Warning 1265 Data truncated for column 'c5' at row 1
Warning 1265 Data truncated for column 'c6' at row 1
Warning 1264 Out of range value adjusted for column 'c7' at row 1
Note 1265 Data truncated for column 'c12' at row 1
Warning 1264 Out of range value adjusted for column 'c12' at row 1
execute my_select ;
c1 -1
......@@ -2798,10 +2796,10 @@ c1 c20 c21 c22 c23 c24 c25 c26 c27 c28 c29 c30
41 4 41 41 41 41 41 41 41 41 41 41
42 4 42 42 42 42 42 42 42 42 42 42
43 4 43 43 43 43 43 43 43 43 43 43
50 5 50 50 50.00 50.00 50.00 50.00 50.00 50.00 50.00 50.00
51 5 51 51 51 51 51 51 51 51 51 51
52 5 52 52 52.00 52.00 52.00 52.00 52.00 52.00 52.00 52.00
53 5 53 53 53.00 53.00 53.00 53.00 53.00 53.00 53.00 53.00
50 5 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0 50.0
51 5 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0 51.0
52 5 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0 52.0
53 5 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0 53.0
54 5 54 54 54.00 54.00 54.00 54.00 54.00 54.00 54.00 54.00
55 5 55 55 55 55 55 55 55 55 55 55
56 6 56 56 56.00 56.00 56.00 56.00 56.00 56.00 56.00 56.00
......
......@@ -2401,3 +2401,25 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 5
1 SIMPLE t2 ref a a 23 test.t1.a 2
DROP TABLE t1, t2;
CREATE TABLE t1 ( city char(30) );
INSERT INTO t1 VALUES ('London');
INSERT INTO t1 VALUES ('Paris');
SELECT * FROM t1 WHERE city='London';
city
London
SELECT * FROM t1 WHERE city='london';
city
London
EXPLAIN SELECT * FROM t1 WHERE city='London' AND city='london';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
SELECT * FROM t1 WHERE city='London' AND city='london';
city
London
EXPLAIN SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
city
London
DROP TABLE t1;
......@@ -1221,7 +1221,6 @@ show status like "Innodb_buffer_pool_pages_total";
show status like "Innodb_page_size";
show status like "Innodb_rows_deleted";
show status like "Innodb_rows_inserted";
show status like "Innodb_rows_read";
show status like "Innodb_rows_updated";
# Test for row locks InnoDB status variables.
......
......@@ -1985,3 +1985,22 @@ EXPLAIN SELECT * FROM t1 LEFT JOIN t2 USE INDEX (a) ON t1.a=t2.a;
EXPLAIN SELECT * FROM t1 LEFT JOIN t2 FORCE INDEX (a) ON t1.a=t2.a;
DROP TABLE t1, t2;
#
# Test case for bug 7098: substitution of a constant for a string field
#
CREATE TABLE t1 ( city char(30) );
INSERT INTO t1 VALUES ('London');
INSERT INTO t1 VALUES ('Paris');
SELECT * FROM t1 WHERE city='London';
SELECT * FROM t1 WHERE city='london';
EXPLAIN SELECT * FROM t1 WHERE city='London' AND city='london';
SELECT * FROM t1 WHERE city='London' AND city='london';
EXPLAIN SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
SELECT * FROM t1 WHERE city LIKE '%london%' AND city='London';
DROP TABLE t1;
......@@ -531,6 +531,12 @@ extern "C" {
int ndb_mgm_set_connectstring(NdbMgmHandle handle,
const char *connect_string);
int ndb_mgm_set_configuration_nodeid(NdbMgmHandle handle, int nodeid);
int ndb_mgm_get_configuration_nodeid(NdbMgmHandle handle);
int ndb_mgm_get_connected_port(NdbMgmHandle handle);
const char *ndb_mgm_get_connected_host(NdbMgmHandle handle);
const char *ndb_mgm_get_connectstring(NdbMgmHandle handle, char *buf, int buf_sz);
/**
* Gets the connectstring used for a connection
*
......
......@@ -55,6 +55,8 @@ public:
*/
Uint32 allocNodeId(int no_retries, int retry_delay_in_seconds);
int setNodeId(Uint32 nodeid);
/**
* Get config using socket
*/
......
......@@ -316,6 +316,12 @@ ConfigRetriever::verifyConfig(const struct ndb_mgm_configuration * conf, Uint32
return true;
}
int
ConfigRetriever::setNodeId(Uint32 nodeid)
{
return ndb_mgm_set_configuration_nodeid(m_handle, nodeid);
}
Uint32
ConfigRetriever::allocNodeId(int no_retries, int retry_delay_in_seconds)
{
......
......@@ -141,6 +141,8 @@ Configuration::init(int argc, char** argv)
else
_programName = strdup("");
globalData.ownId= 0;
return true;
}
......@@ -215,6 +217,13 @@ Configuration::fetch_configuration(){
ConfigRetriever &cr= *m_config_retriever;
/**
* if we have a nodeid set (e.g in a restart situation)
* reuse it
*/
if (globalData.ownId)
cr.setNodeId(globalData.ownId);
globalData.ownId = cr.allocNodeId(2 /*retry*/,3 /*delay*/);
if(globalData.ownId == 0){
......
......@@ -1727,6 +1727,15 @@ ndb_mgm_destroy_configuration(struct ndb_mgm_configuration *cfg)
}
}
extern "C"
int
ndb_mgm_set_configuration_nodeid(NdbMgmHandle handle, int nodeid)
{
CHECK_HANDLE(handle, -1);
handle->cfg._ownNodeId= nodeid;
return 0;
}
extern "C"
int
ndb_mgm_get_configuration_nodeid(NdbMgmHandle handle)
......
......@@ -1069,16 +1069,19 @@ print_nodes(ndb_mgm_cluster_state *state, ndb_mgm_configuration_iterator *it,
}
ndbout << ")" << endl;
} else {
if(ndb_mgm_find(it, CFG_NODE_ID, node_id) != 0){
ndb_mgm_first(it);
if(ndb_mgm_find(it, CFG_NODE_ID, node_id) == 0){
const char *config_hostname= 0;
ndb_mgm_get_string_parameter(it, CFG_NODE_HOST, &config_hostname);
if (config_hostname == 0 || config_hostname[0] == 0)
config_hostname= "any host";
ndbout_c(" (not connected, accepting connect from %s)",
config_hostname);
}
else
{
ndbout_c("Unable to find node with id: %d", node_id);
return;
}
const char *config_hostname= 0;
ndb_mgm_get_string_parameter(it, CFG_NODE_HOST, &config_hostname);
if (config_hostname == 0 || config_hostname[0] == 0)
config_hostname= "any host";
ndbout << " (not connected, accepting connect from "
<< config_hostname << ")" << endl;
}
}
}
......
......@@ -985,7 +985,7 @@ public:
Item *new_item()
{
return new Item_string(name, str_value.ptr(),
str_value.length(), &my_charset_bin);
str_value.length(), collation.collation);
}
Item *safe_charset_converter(CHARSET_INFO *tocs);
String *const_string() { return &str_value; }
......
......@@ -921,7 +921,7 @@ void TEST_filesort(SORT_FIELD *sortorder,uint s_length);
void print_plan(JOIN* join, double read_time, double record_count,
uint idx, const char *info);
#endif
void mysql_print_status(THD *thd);
void mysql_print_status();
/* key.cc */
int find_ref_key(TABLE *form,Field *field, uint *offset);
void key_copy(byte *to_key, byte *from_record, KEY *key_info, uint key_length);
......
......@@ -2143,7 +2143,7 @@ extern "C" void *signal_hand(void *arg __attribute__((unused)))
case SIGHUP:
if (!abort_loop)
{
mysql_print_status((THD*) 0); // Print some debug info
mysql_print_status(); // Print some debug info
reload_acl_and_cache((THD*) 0,
(REFRESH_LOG | REFRESH_TABLES | REFRESH_FAST |
REFRESH_GRANT |
......
......@@ -1992,7 +1992,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
statistic_increment(thd->status_var.com_other, &LOCK_status);
if (check_global_access(thd, SUPER_ACL))
break; /* purecov: inspected */
mysql_print_status(thd);
mysql_print_status();
mysql_log.write(thd,command,NullS);
send_eof(thd);
break;
......
......@@ -436,29 +436,24 @@ reads: %10lu\n\n",
}
void mysql_print_status(THD *thd)
void mysql_print_status()
{
char current_dir[FN_REFLEN];
STATUS_VAR tmp;
calc_sum_of_all_status(&tmp);
printf("\nStatus information:\n\n");
my_getwd(current_dir, sizeof(current_dir),MYF(0));
printf("Current dir: %s\n", current_dir);
printf("Running threads: %d Stack size: %ld\n", thread_count,
(long) thread_stack);
if (thd)
thd->proc_info="locks";
thr_print_locks(); // Write some debug info
#ifndef DBUG_OFF
if (thd)
thd->proc_info="table cache";
print_cached_tables();
#endif
/* Print key cache status */
if (thd)
thd->proc_info="key cache";
puts("\nKey caches:");
process_key_caches(print_key_cache_status);
if (thd)
thd->proc_info="status";
pthread_mutex_lock(&LOCK_status);
printf("\nhandler status:\n\
read_key: %10lu\n\
......@@ -468,20 +463,20 @@ read_first: %10lu\n\
write: %10lu\n\
delete %10lu\n\
update: %10lu\n",
thd->status_var.ha_read_key_count,
thd->status_var.ha_read_next_count,
thd->status_var.ha_read_rnd_count,
thd->status_var.ha_read_first_count,
thd->status_var.ha_write_count,
thd->status_var.ha_delete_count,
thd->status_var.ha_update_count);
tmp.ha_read_key_count,
tmp.ha_read_next_count,
tmp.ha_read_rnd_count,
tmp.ha_read_first_count,
tmp.ha_write_count,
tmp.ha_delete_count,
tmp.ha_update_count);
pthread_mutex_unlock(&LOCK_status);
printf("\nTable status:\n\
Opened tables: %10lu\n\
Open tables: %10lu\n\
Open files: %10lu\n\
Open streams: %10lu\n",
thd->status_var.opened_tables,
tmp.opened_tables,
(ulong) cached_tables(),
(ulong) my_file_opened,
(ulong) my_stream_opened);
......@@ -499,8 +494,6 @@ Next alarm time: %lu\n",
#endif
display_table_locks();
fflush(stdout);
if (thd)
thd->proc_info="malloc";
my_checkmalloc();
TERMINATE(stdout); // Write malloc information
......@@ -531,6 +524,4 @@ Estimated memory (with thread stack): %ld\n",
(long) (thread_count * thread_stack + info.hblkhd + info.arena));
#endif
puts("");
if (thd)
thd->proc_info=0;
}
......@@ -39,17 +39,20 @@
# If you want to affect other MySQL variables, you should make your changes
# in the /etc/my.cnf, ~/.my.cnf or other MySQL configuration files.
# If you change base dir, you must also change datadir
basedir=
datadir=
# The following variables are only set for letting mysql.server find things.
# Set some defaults
datadir=@localstatedir@
pid_file=
if test -z "$basedir"
then
basedir=@prefix@
bindir=@bindir@
datadir=@localstatedir@
else
bindir="$basedir/bin"
fi
......
......@@ -277,7 +277,6 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-$PATH}\" \
--includedir=%{_includedir} \
--mandir=%{_mandir} \
--enable-thread-safe-client \
--with-comment=\"Official MySQL RPM\" \
--with-readline ;
# Add this for more debugging support
# --with-debug
......@@ -335,6 +334,7 @@ BuildMySQL "--enable-shared \
--with-example-storage-engine \
--with-federated-storage-engine \
--with-embedded-server \
--with-comment=\"MySQL Community Edition - Max (GPL)\" \
--with-server-suffix='-Max'"
# Save everything for debug
......@@ -381,6 +381,7 @@ BuildMySQL "--disable-shared \
--with-client-ldflags='-all-static' \
$USE_OTHER_LIBC_DIR \
%endif
--with-comment=\"MySQL Community Edition - Standard (GPL)\" \
--with-server-suffix='%{server_suffix}' \
--without-embedded-server \
--without-berkeley-db \
......@@ -689,7 +690,12 @@ fi
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
* Monday Feb 7 2005 Tomas Ulin <tomas@mysql.com>
* Mon Feb 14 2005 Lenz Grimmer <lenz@mysql.com>
* Fixed the compilation comments and moved them into the separate build sections
for Max and Standard
* Mon Feb 7 2005 Tomas Ulin <tomas@mysql.com>
- enabled the "Ndbcluster" storage engine for the max binary
- added extra make install in ndb subdir after Max build to get ndb binaries
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment