mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 12:32:27 +01:00
Merge bk-internal:/home/bk/mysql-4.0/
into serg.mylan:/usr/home/serg/Abk/mysql-4.0
This commit is contained in:
commit
96757dd788
4 changed files with 48 additions and 1 deletions
|
@ -78,7 +78,7 @@ char *get_tty_password(char *opt_message)
|
||||||
char *pos=to,*end=to+sizeof(to)-1;
|
char *pos=to,*end=to+sizeof(to)-1;
|
||||||
int i=0;
|
int i=0;
|
||||||
DBUG_ENTER("get_tty_password");
|
DBUG_ENTER("get_tty_password");
|
||||||
fprintf(stdout,opt_message ? opt_message : "Enter password: ");
|
_cputs(opt_message ? opt_message : "Enter password: ");
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
char tmp;
|
char tmp;
|
||||||
|
|
|
@ -1123,3 +1123,34 @@ a b
|
||||||
select * from t2;
|
select * from t2;
|
||||||
a b
|
a b
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
create table t1 (x int not null, index(x)) type=bdb;
|
||||||
|
insert into t1 values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
select * from t1 where x <= 10 and x >= 7;
|
||||||
|
x
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
10
|
||||||
|
select * from t1 where x <= 10 and x >= 7 order by x;
|
||||||
|
x
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
10
|
||||||
|
select * from t1 where x <= 10 and x >= 7 order by x desc;
|
||||||
|
x
|
||||||
|
10
|
||||||
|
9
|
||||||
|
8
|
||||||
|
7
|
||||||
|
select * from t1 where x <= 8 and x >= 5 order by x desc;
|
||||||
|
x
|
||||||
|
8
|
||||||
|
7
|
||||||
|
6
|
||||||
|
5
|
||||||
|
select * from t1 where x < 8 and x > 5 order by x desc;
|
||||||
|
x
|
||||||
|
7
|
||||||
|
6
|
||||||
|
drop table t1;
|
||||||
|
|
|
@ -783,3 +783,16 @@ select * from t1;
|
||||||
select * from t2;
|
select * from t2;
|
||||||
select * from t2;
|
select * from t2;
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
|
||||||
|
#
|
||||||
|
# The bug #971
|
||||||
|
#
|
||||||
|
|
||||||
|
create table t1 (x int not null, index(x)) type=bdb;
|
||||||
|
insert into t1 values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
|
||||||
|
select * from t1 where x <= 10 and x >= 7;
|
||||||
|
select * from t1 where x <= 10 and x >= 7 order by x;
|
||||||
|
select * from t1 where x <= 10 and x >= 7 order by x desc;
|
||||||
|
select * from t1 where x <= 8 and x >= 5 order by x desc;
|
||||||
|
select * from t1 where x < 8 and x > 5 order by x desc;
|
||||||
|
drop table t1;
|
||||||
|
|
|
@ -1420,6 +1420,8 @@ int ha_berkeley::index_read(byte * buf, const byte * key,
|
||||||
bzero((char*) &row,sizeof(row));
|
bzero((char*) &row,sizeof(row));
|
||||||
if (key_len == key_info->key_length)
|
if (key_len == key_info->key_length)
|
||||||
{
|
{
|
||||||
|
if (find_flag == HA_READ_AFTER_KEY)
|
||||||
|
key_info->handler.bdb_return_if_eq= 1;
|
||||||
error=read_row(cursor->c_get(cursor, pack_key(&last_key,
|
error=read_row(cursor->c_get(cursor, pack_key(&last_key,
|
||||||
active_index,
|
active_index,
|
||||||
key_buff,
|
key_buff,
|
||||||
|
@ -1428,6 +1430,7 @@ int ha_berkeley::index_read(byte * buf, const byte * key,
|
||||||
(find_flag == HA_READ_KEY_EXACT ?
|
(find_flag == HA_READ_KEY_EXACT ?
|
||||||
DB_SET : DB_SET_RANGE)),
|
DB_SET : DB_SET_RANGE)),
|
||||||
(char*) buf, active_index, &row, (DBT*) 0, 0);
|
(char*) buf, active_index, &row, (DBT*) 0, 0);
|
||||||
|
key_info->handler.bdb_return_if_eq= 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue