Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
71c6d0c4
Commit
71c6d0c4
authored
Jan 29, 2004
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mysql.com:/home/my/mysql-4.0
parents
8c49856f
151b558e
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
93 additions
and
11 deletions
+93
-11
.bzrignore
.bzrignore
+1
-0
mysql-test/r/bdb.result
mysql-test/r/bdb.result
+25
-0
mysql-test/r/myisam.result
mysql-test/r/myisam.result
+29
-1
mysql-test/t/bdb.test
mysql-test/t/bdb.test
+14
-0
mysql-test/t/myisam.test
mysql-test/t/myisam.test
+17
-1
sql/ha_berkeley.h
sql/ha_berkeley.h
+1
-1
sql/item_strfunc.cc
sql/item_strfunc.cc
+4
-7
sql/table.cc
sql/table.cc
+2
-1
No files found.
.bzrignore
View file @
71c6d0c4
...
@@ -541,3 +541,4 @@ libmysql_r/vio_priv.h
...
@@ -541,3 +541,4 @@ libmysql_r/vio_priv.h
hardcopy.0
hardcopy.0
scripts/make_sharedlib_distribution
scripts/make_sharedlib_distribution
sql/udf_example.so
sql/udf_example.so
man/*.1
mysql-test/r/bdb.result
View file @
71c6d0c4
...
@@ -1165,3 +1165,28 @@ create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, pri
...
@@ -1165,3 +1165,28 @@ create table t2 (c char(8) not null, b char(8) not null, a char(8) not null, pri
insert into t2 select * from t1;
insert into t2 select * from t1;
delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
delete t1,t2 from t2,t1 where t1.a<'B' and t2.b=t1.b;
drop table t1,t2;
drop table t1,t2;
create table t1 (a char(10), key(a), b int not null, key(b)) engine=bdb;
insert into t1 values ('a',1),('A',2);
explain select a from t1;
table type possible_keys key key_len ref rows Extra
t1 ALL NULL NULL NULL NULL 2
select a from t1;
a
a
A
explain select b from t1;
table type possible_keys key key_len ref rows Extra
t1 index NULL b 4 NULL 2 Using index
select b from t1;
b
1
2
alter table t1 modify a char(10) binary;
explain select a from t1;
table type possible_keys key key_len ref rows Extra
t1 index NULL a 11 NULL 2 Using index
select a from t1;
a
A
a
drop table t1;
mysql-test/r/myisam.result
View file @
71c6d0c4
...
@@ -386,7 +386,10 @@ Table Op Msg_type Msg_text
...
@@ -386,7 +386,10 @@ Table Op Msg_type Msg_text
test.t1 check status OK
test.t1 check status OK
drop table t1;
drop table t1;
create table t1 ( a text not null, key a (a(20)));
create table t1 ( a text not null, key a (a(20)));
insert into t1 values ('aaa '),('aaa');
insert into t1 values ('aaa '),('aaa'),('aa');
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
repair table t1;
repair table t1;
Table Op Msg_type Msg_text
Table Op Msg_type Msg_text
test.t1 repair status OK
test.t1 repair status OK
...
@@ -394,6 +397,15 @@ select concat(a,'.') from t1 where a='aaa';
...
@@ -394,6 +397,15 @@ select concat(a,'.') from t1 where a='aaa';
concat(a,'.')
concat(a,'.')
aaa.
aaa.
aaa .
aaa .
select concat(a,'.') from t1 where binary a='aaa';
concat(a,'.')
aaa.
update t1 set a='bbb' where a='aaa';
select concat(a,'.') from t1;
concat(a,'.')
bbb.
bbb.
aa.
drop table t1;
drop table t1;
create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10)));
create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10)));
insert into t1 values('807780', '477', '165');
insert into t1 values('807780', '477', '165');
...
@@ -403,3 +415,19 @@ select * from t1 where a='807780' and b='477' and c='165';
...
@@ -403,3 +415,19 @@ select * from t1 where a='807780' and b='477' and c='165';
a b c
a b c
807780 477 165
807780 477 165
drop table t1;
drop table t1;
create table t1 (a int not null auto_increment primary key, b text not null, unique b (b(20)));
insert into t1 (b) values ('a'),('a '),('a ');
select concat(b,'.') from t1;
concat(b,'.')
a.
a .
a .
update t1 set b='b ' where a=2;
update t1 set b='b ' where a > 1;
Duplicate entry 'b ' for key 2
delete from t1 where b='b';
select a,concat(b,'.') from t1;
a concat(b,'.')
1 a.
3 a .
drop table t1;
mysql-test/t/bdb.test
View file @
71c6d0c4
...
@@ -815,3 +815,17 @@ insert into t2 select * from t1;
...
@@ -815,3 +815,17 @@ insert into t2 select * from t1;
delete
t1
,
t2
from
t2
,
t1
where
t1
.
a
<
'B'
and
t2
.
b
=
t1
.
b
;
delete
t1
,
t2
from
t2
,
t1
where
t1
.
a
<
'B'
and
t2
.
b
=
t1
.
b
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
#
# Test index only read (Bug #2509)
#
create
table
t1
(
a
char
(
10
),
key
(
a
),
b
int
not
null
,
key
(
b
))
engine
=
bdb
;
insert
into
t1
values
(
'a'
,
1
),(
'A'
,
2
);
explain
select
a
from
t1
;
select
a
from
t1
;
explain
select
b
from
t1
;
select
b
from
t1
;
alter
table
t1
modify
a
char
(
10
)
binary
;
explain
select
a
from
t1
;
select
a
from
t1
;
drop
table
t1
;
mysql-test/t/myisam.test
View file @
71c6d0c4
...
@@ -390,9 +390,13 @@ drop table t1;
...
@@ -390,9 +390,13 @@ drop table t1;
# two bugs in myisam-space-stripping feature
# two bugs in myisam-space-stripping feature
#
#
create
table
t1
(
a
text
not
null
,
key
a
(
a
(
20
)));
create
table
t1
(
a
text
not
null
,
key
a
(
a
(
20
)));
insert
into
t1
values
(
'aaa '
),(
'aaa'
);
insert
into
t1
values
(
'aaa '
),(
'aaa'
),(
'aa'
);
check
table
t1
;
repair
table
t1
;
repair
table
t1
;
select
concat
(
a
,
'.'
)
from
t1
where
a
=
'aaa'
;
select
concat
(
a
,
'.'
)
from
t1
where
a
=
'aaa'
;
select
concat
(
a
,
'.'
)
from
t1
where
binary
a
=
'aaa'
;
update
t1
set
a
=
'bbb'
where
a
=
'aaa'
;
select
concat
(
a
,
'.'
)
from
t1
;
drop
table
t1
;
drop
table
t1
;
#
#
...
@@ -406,3 +410,15 @@ insert into t1 values('807780', '472', '162');
...
@@ -406,3 +410,15 @@ insert into t1 values('807780', '472', '162');
select
*
from
t1
where
a
=
'807780'
and
b
=
'477'
and
c
=
'165'
;
select
*
from
t1
where
a
=
'807780'
and
b
=
'477'
and
c
=
'165'
;
drop
table
t1
;
drop
table
t1
;
#
# Test text and unique
#
create
table
t1
(
a
int
not
null
auto_increment
primary
key
,
b
text
not
null
,
unique
b
(
b
(
20
)));
insert
into
t1
(
b
)
values
(
'a'
),(
'a '
),(
'a '
);
select
concat
(
b
,
'.'
)
from
t1
;
update
t1
set
b
=
'b '
where
a
=
2
;
--
error
1062
update
t1
set
b
=
'b '
where
a
>
1
;
delete
from
t1
where
b
=
'b'
;
select
a
,
concat
(
b
,
'.'
)
from
t1
;
drop
table
t1
;
sql/ha_berkeley.h
View file @
71c6d0c4
...
@@ -92,7 +92,7 @@ class ha_berkeley: public handler
...
@@ -92,7 +92,7 @@ class ha_berkeley: public handler
HA_NULL_KEY
|
HA_BLOB_KEY
|
HA_NOT_EXACT_COUNT
|
HA_NULL_KEY
|
HA_BLOB_KEY
|
HA_NOT_EXACT_COUNT
|
HA_PRIMARY_KEY_IN_READ_INDEX
|
HA_DROP_BEFORE_CREATE
|
HA_PRIMARY_KEY_IN_READ_INDEX
|
HA_DROP_BEFORE_CREATE
|
HA_AUTO_PART_KEY
|
HA_TABLE_SCAN_ON_INDEX
|
HA_AUTO_PART_KEY
|
HA_TABLE_SCAN_ON_INDEX
|
HA_FILE_BASED
),
HA_
KEY_READ_WRONG_STR
|
HA_
FILE_BASED
),
changed_rows
(
0
),
last_dup_key
((
uint
)
-
1
),
version
(
0
),
using_ignore
(
0
)
changed_rows
(
0
),
last_dup_key
((
uint
)
-
1
),
version
(
0
),
using_ignore
(
0
)
{
{
}
}
...
...
sql/item_strfunc.cc
View file @
71c6d0c4
...
@@ -1507,14 +1507,11 @@ void Item_func_elt::fix_length_and_dec()
...
@@ -1507,14 +1507,11 @@ void Item_func_elt::fix_length_and_dec()
{
{
max_length
=
0
;
max_length
=
0
;
decimals
=
0
;
decimals
=
0
;
/*
#if MYSQL_VERSION_ID < 40100
first numeric argument isn't in args (3.23 and 4.0)
but since 4.1 the cycle should start from 1
so this change
should NOT be merged into 4.1!!!
*/
for
(
uint
i
=
0
;
i
<
arg_count
;
i
++
)
for
(
uint
i
=
0
;
i
<
arg_count
;
i
++
)
#else
for
(
uint
i
=
1
;
i
<
arg_count
;
i
++
)
#endif
{
{
set_if_bigger
(
max_length
,
args
[
i
]
->
max_length
);
set_if_bigger
(
max_length
,
args
[
i
]
->
max_length
);
set_if_bigger
(
decimals
,
args
[
i
]
->
decimals
);
set_if_bigger
(
decimals
,
args
[
i
]
->
decimals
);
...
...
sql/table.cc
View file @
71c6d0c4
...
@@ -498,7 +498,8 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
...
@@ -498,7 +498,8 @@ int openfrm(const char *name, const char *alias, uint db_stat, uint prgflag,
field
->
type
()
!=
FIELD_TYPE_BLOB
)
field
->
type
()
!=
FIELD_TYPE_BLOB
)
{
{
if
(
field
->
key_type
()
!=
HA_KEYTYPE_TEXT
||
if
(
field
->
key_type
()
!=
HA_KEYTYPE_TEXT
||
(
!
(
ha_option
&
HA_KEY_READ_WRONG_STR
)
&&
((
!
(
ha_option
&
HA_KEY_READ_WRONG_STR
)
||
field
->
flags
&
BINARY_FLAG
)
&&
!
(
keyinfo
->
flags
&
HA_FULLTEXT
)))
!
(
keyinfo
->
flags
&
HA_FULLTEXT
)))
field
->
part_of_key
|=
((
key_map
)
1
<<
key
);
field
->
part_of_key
|=
((
key_map
)
1
<<
key
);
if
((
field
->
key_type
()
!=
HA_KEYTYPE_TEXT
||
if
((
field
->
key_type
()
!=
HA_KEYTYPE_TEXT
||
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment