1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
VC++Files/mysys/mysys.dsp:
  Auto merged
VC++Files/mysys/mysys_ia64.dsp:
  Auto merged
client/mysql.cc:
  Auto merged
include/my_sys.h:
  Auto merged
myisam/mi_check.c:
  Auto merged
myisam/myisamchk.c:
  Auto merged
mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/rpl_multi_delete2.result:
  Auto merged
mysql-test/t/innodb.test:
  Auto merged
mysql-test/t/rpl_multi_delete2-slave.opt:
  Auto merged
mysql-test/t/rpl_multi_delete2.test:
  Auto merged
sql/ha_myisam.cc:
  Auto merged
sql/opt_sum.cc:
  Auto merged
sql/set_var.cc:
  Auto merged
sql/sql_class.h:
  Auto merged
sql/sql_parse.cc:
  Auto merged
This commit is contained in:
unknown
2005-09-21 13:53:22 +02:00
19 changed files with 508 additions and 28 deletions

View File

@ -2450,11 +2450,6 @@ sub run_mysqltest ($) {
mtr_add_arg($args, "--big-test");
}
if ( $opt_record )
{
mtr_add_arg($args, "--record");
}
if ( $opt_compress )
{
mtr_add_arg($args, "--compress");
@ -2480,9 +2475,6 @@ sub run_mysqltest ($) {
$glob_mysql_test_dir);
}
mtr_add_arg($args, "-R");
mtr_add_arg($args, $tinfo->{'result_file'});
# ----------------------------------------------------------------------
# If embedded server, we create server args to give mysqltest to pass on
# ----------------------------------------------------------------------
@ -2497,6 +2489,18 @@ sub run_mysqltest ($) {
# ----------------------------------------------------------------------
$ENV{'MYSQL_TEST'}= "$exe_mysqltest " . join(" ", @$args);
# ----------------------------------------------------------------------
# Add args that should not go into the MYSQL_TEST environment var
# ----------------------------------------------------------------------
mtr_add_arg($args, "-R");
mtr_add_arg($args, $tinfo->{'result_file'});
if ( $opt_record )
{
mtr_add_arg($args, "--record");
}
return mtr_run_test($exe,$args,$tinfo->{'path'},"",$path_timefile,"");
}

View File

@ -1730,6 +1730,15 @@ explain select * from t1 order by a,b,c,d;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using filesort
drop table t1;
create table t1 (a char(1), b char(1), key(a, b)) engine=innodb;
insert into t1 values ('8', '6'), ('4', '7');
select min(a) from t1;
min(a)
4
select min(b) from t1 where a='8';
min(b)
6
drop table t1;
create table t1 (x bigint unsigned not null primary key) engine=innodb;
insert into t1(x) values (0xfffffffffffffff0),(0xfffffffffffffff1);
select * from t1;

View File

@ -608,6 +608,67 @@ checksum table t2;
Table Checksum
test.t2 984116287
drop table t1, t2;
show variables like 'myisam_stats_method';
Variable_name Value
myisam_stats_method nulls_inequal
create table t1 (a int, key(a));
insert into t1 values (0),(1),(2),(3),(4);
insert into t1 select NULL from t1;
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 1 a 1 a A 10 NULL NULL YES BTREE
insert into t1 values (11);
delete from t1 where a=11;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 1 a 1 a A 10 NULL NULL YES BTREE
set myisam_stats_method=nulls_equal;
show variables like 'myisam_stats_method';
Variable_name Value
myisam_stats_method nulls_equal
insert into t1 values (11);
delete from t1 where a=11;
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 1 a 1 a A 5 NULL NULL YES BTREE
insert into t1 values (11);
delete from t1 where a=11;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 1 a 1 a A 5 NULL NULL YES BTREE
set myisam_stats_method=DEFAULT;
show variables like 'myisam_stats_method';
Variable_name Value
myisam_stats_method nulls_inequal
insert into t1 values (11);
delete from t1 where a=11;
analyze table t1;
Table Op Msg_type Msg_text
test.t1 analyze status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 1 a 1 a A 10 NULL NULL YES BTREE
insert into t1 values (11);
delete from t1 where a=11;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
show index from t1;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 1 a 1 a A 10 NULL NULL YES BTREE
drop table t1;
set storage_engine=MyISAM;
drop table if exists t1,t2,t3;
--- Testing varchar ---

View File

@ -1259,6 +1259,15 @@ select * from t1 order by a,b,c,d;
explain select * from t1 order by a,b,c,d;
drop table t1;
#
# BUG#11039,#13218 Wrong key length in min()
#
create table t1 (a char(1), b char(1), key(a, b)) engine=innodb;
insert into t1 values ('8', '6'), ('4', '7');
select min(a) from t1;
select min(b) from t1 where a='8';
drop table t1;
# End of 4.1 tests
#

View File

@ -578,6 +578,59 @@ checksum table t1;
# The above should give the same number as the following.
checksum table t2;
drop table t1, t2;
#
# BUG#12232: New myisam_stats_method variable.
#
show variables like 'myisam_stats_method';
create table t1 (a int, key(a));
insert into t1 values (0),(1),(2),(3),(4);
insert into t1 select NULL from t1;
# default: NULLs considered inequal
analyze table t1;
show index from t1;
insert into t1 values (11);
delete from t1 where a=11;
check table t1;
show index from t1;
# Set nulls to be equal:
set myisam_stats_method=nulls_equal;
show variables like 'myisam_stats_method';
insert into t1 values (11);
delete from t1 where a=11;
analyze table t1;
show index from t1;
insert into t1 values (11);
delete from t1 where a=11;
check table t1;
show index from t1;
# Set nulls back to be equal
set myisam_stats_method=DEFAULT;
show variables like 'myisam_stats_method';
insert into t1 values (11);
delete from t1 where a=11;
analyze table t1;
show index from t1;
insert into t1 values (11);
delete from t1 where a=11;
check table t1;
show index from t1;
drop table t1;
# End of 4.1 tests
#
# Test varchar
#
@ -700,4 +753,3 @@ create table t3 (c1 int) engine=myisam pack_keys=default;
create table t4 (c1 int) engine=myisam pack_keys=2;
drop table t1, t2, t3;
# End of 4.1 tests