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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
2ae30d2e
Commit
2ae30d2e
authored
Jul 23, 2002
by
peter@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Trying to merge....
parents
e9435f24
cffcb38c
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
278 additions
and
48 deletions
+278
-48
Docs/Makefile.am
Docs/Makefile.am
+3
-3
Docs/manual.texi
Docs/manual.texi
+160
-17
Makefile.am
Makefile.am
+1
-1
include/my_sys.h
include/my_sys.h
+1
-2
include/myisam.h
include/myisam.h
+1
-1
libmysqld/Makefile.am
libmysqld/Makefile.am
+1
-1
myisam/mi_check.c
myisam/mi_check.c
+2
-2
mysql-test/r/merge.result
mysql-test/r/merge.result
+77
-10
mysql-test/t/merge.test
mysql-test/t/merge.test
+15
-6
sql/ha_myisammrg.cc
sql/ha_myisammrg.cc
+1
-2
sql/ha_myisammrg.h
sql/ha_myisammrg.h
+1
-1
sql/handler.cc
sql/handler.cc
+15
-2
No files found.
Docs/Makefile.am
View file @
2ae30d2e
...
...
@@ -27,7 +27,7 @@ EXTRA_DIST = $(noinst_SCRIPTS) $(BUILT_SOURCES) mysqld_error.txt \
all
:
$(targets) txt_files
txt_files
:
../INSTALL-SOURCE ../COPYING ../COPYING.LIB
\
../MIRRORS INSTALL-BINARY
INSTALL-BINARY
#
../MIRRORS
CLEAN_FILES
:
$(BUILD_SOURCES)
touch
$(BUILD_SOURCES)
...
...
@@ -254,8 +254,8 @@ INSTALL-BINARY: mysql.info $(GT)
../COPYING.LIB
:
mysql.info $(GT)
perl
-w
$(GT)
mysql.info
"LGPL license"
"Function Index"
>
$@
../MIRRORS
:
manual.texi $(srcdir)/Support/generate-mirror-listing.pl
perl
-w
$(srcdir)
/Support/generate-mirror-listing.pl manual.texi
>
$@
#
../MIRRORS: manual.texi $(srcdir)/Support/generate-mirror-listing.pl
#
perl -w $(srcdir)/Support/generate-mirror-listing.pl manual.texi > $@
# Don't update the files from bitkeeper
%
::
SCCS/s.%
Docs/manual.texi
View file @
2ae30d2e
This diff is collapsed.
Click to expand it.
Makefile.am
View file @
2ae30d2e
...
...
@@ -20,7 +20,7 @@ AUTOMAKE_OPTIONS = foreign
# These are built from source in the Docs directory
EXTRA_DIST
=
INSTALL-SOURCE README
\
COPYING COPYING.LIB
MIRRORS
COPYING COPYING.LIB
SUBDIRS
=
include @docs_dirs@ @readline_dir@
\
@thread_dirs@ pstack @sql_client_dirs@
\
@sql_server_dirs@ @libmysqld_dirs@ scripts man
\
...
...
include/my_sys.h
View file @
2ae30d2e
...
...
@@ -323,8 +323,7 @@ typedef struct st_io_cache_share
int
count
;
/* actual IO_CACHE that filled the buffer */
struct
st_io_cache
*
active
;
/* the following will be implemented whenever the need arises */
#ifdef NOT_IMPLEMENTED
#ifdef NOT_YET_IMPLEMENTED
/* whether the structure should be free'd */
my_bool
alloced
;
#endif
...
...
include/myisam.h
View file @
2ae30d2e
...
...
@@ -358,7 +358,7 @@ typedef struct st_sort_info
MI_CHECK
*
param
;
enum
data_file_type
new_data_file_type
;
SORT_KEY_BLOCKS
*
key_block
,
*
key_block_end
;
uint
kei
,
total_keys
;
uint
current_key
,
total_keys
;
my_off_t
filelength
,
dupp
,
buff_length
;
ha_rows
max_records
;
char
*
buff
;
...
...
libmysqld/Makefile.am
View file @
2ae30d2e
...
...
@@ -49,7 +49,7 @@ sqlsources = convert.cc derror.cc field.cc field_conv.cc filesort.cc \
repl_failsafe.cc slave.cc
\
sql_analyse.cc sql_base.cc sql_cache.cc sql_class.cc
\
sql_crypt.cc sql_db.cc sql_delete.cc sql_insert.cc sql_lex.cc
\
sql_list.cc sql_manager.cc sql_map.cc sql_parse.cc
\
sql_list.cc sql_manager.cc sql_map.cc sql_
olap.cc sql_
parse.cc
\
sql_rename.cc sql_repl.cc sql_select.cc sql_do.cc sql_show.cc
\
sql_string.cc sql_table.cc sql_test.cc sql_udf.cc
\
sql_update.cc sql_yacc.cc table.cc thr_malloc.cc time.cc
\
...
...
myisam/mi_check.c
View file @
2ae30d2e
...
...
@@ -3223,7 +3223,7 @@ static int sort_delete_record(MI_SORT_PARAM *sort_param)
old_file
=
info
->
dfile
;
info
->
dfile
=
info
->
rec_cache
.
file
;
if
(
sort_info
->
kei
)
if
(
sort_info
->
current_key
)
{
key
=
info
->
lastkey
+
info
->
s
->
base
.
max_key_length
;
if
((
error
=
(
*
info
->
s
->
read_rnd
)(
info
,
sort_param
->
record
,
info
->
lastpos
,
0
))
&&
...
...
@@ -3234,7 +3234,7 @@ static int sort_delete_record(MI_SORT_PARAM *sort_param)
DBUG_RETURN
(
1
);
}
for
(
i
=
0
;
i
<
sort_info
->
kei
;
i
++
)
for
(
i
=
0
;
i
<
sort_info
->
current_key
;
i
++
)
{
uint
key_length
=
_mi_make_key
(
info
,
i
,
key
,
sort_param
->
record
,
info
->
lastpos
);
if
(
_mi_ck_delete
(
info
,
i
,
key
,
key_length
))
...
...
mysql-test/r/merge.result
View file @
2ae30d2e
...
...
@@ -275,12 +275,12 @@ a b
1 2
drop table t3,t1,t2;
drop table if exists t6, t5, t4, t3, t2, t1;
create table t1 (a int not null, b int not null
,
key(a,b));
create table t2 (a int not null, b int not null
,
key(a,b));
create table t1 (a int not null, b int not null
auto_increment, primary
key(a,b));
create table t2 (a int not null, b int not null
auto_increment, primary
key(a,b));
create table t3 (a int not null, b int not null, key(a,b)) UNION=(t1,t2) INSERT_METHOD=NO;
create table t4 (a int not null, b int not null, key(a,b)) TYPE=MERGE UNION=(t1,t2) INSERT_METHOD=NO;
create table t5 (a int not null, b int not null
,
key(a,b)) TYPE=MERGE UNION=(t1,t2) INSERT_METHOD=FIRST;
create table t6 (a int not null, b int not null
,
key(a,b)) TYPE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST;
create table t5 (a int not null, b int not null
auto_increment, primary
key(a,b)) TYPE=MERGE UNION=(t1,t2) INSERT_METHOD=FIRST;
create table t6 (a int not null, b int not null
auto_increment, primary
key(a,b)) TYPE=MERGE UNION=(t1,t2) INSERT_METHOD=LAST;
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
...
...
@@ -299,18 +299,18 @@ show create table t5;
Table Create Table
t5 CREATE TABLE `t5` (
`a` int(11) NOT NULL default '0',
`b` int(11) NOT NULL
default '0'
,
KEY `a`
(`a`,`b`)
`b` int(11) NOT NULL
auto_increment
,
PRIMARY KEY
(`a`,`b`)
) TYPE=MRG_MyISAM INSERT_METHOD=FIRST UNION=(t1,t2)
show create table t6;
Table Create Table
t6 CREATE TABLE `t6` (
`a` int(11) NOT NULL default '0',
`b` int(11) NOT NULL
default '0'
,
KEY `a`
(`a`,`b`)
`b` int(11) NOT NULL
auto_increment
,
PRIMARY KEY
(`a`,`b`)
) TYPE=MRG_MyISAM INSERT_METHOD=LAST UNION=(t1,t2)
insert into t1 values (1,
1),(1,2),(1,3),(1,4
);
insert into t2 values (2,
1),(2,2),(2,3),(2,4
);
insert into t1 values (1,
NULL),(1,NULL),(1,NULL),(1,NULL
);
insert into t2 values (2,
NULL),(2,NULL),(2,NULL),(2,NULL
);
select * from t3 order by b,a limit 3;
a b
select * from t4 order by b,a limit 3;
...
...
@@ -461,6 +461,73 @@ a b
5 2
6 1
6 2
select 1;
1
1
insert into t5 values (1,NULL),(5,NULL);
insert into t6 values (2,NULL),(6,NULL);
select * from t1 order by a,b;
a b
1 1
1 2
1 3
1 4
1 5
4 1
4 2
5 1
5 2
5 3
select * from t2 order by a,b;
a b
2 1
2 2
2 3
2 4
2 5
6 1
6 2
6 3
select * from t5 order by a,b;
a b
1 1
1 2
1 3
1 4
1 5
2 1
2 2
2 3
2 4
2 5
4 1
4 2
5 1
5 2
5 3
6 1
6 2
6 3
select * from t6 order by a,b;
a b
1 1
1 2
1 3
1 4
1 5
2 1
2 2
2 3
2 4
2 5
4 1
4 2
5 1
5 2
5 3
6 1
6 2
6 3
drop table if exists t6, t5, t4, t3, t2, t1;
CREATE TABLE t1 ( a int(11) NOT NULL default '0', b int(11) NOT NULL default '0', PRIMARY KEY (a,b)) TYPE=MyISAM;
INSERT INTO t1 VALUES (1,1), (2,1);
...
...
mysql-test/t/merge.test
View file @
2ae30d2e
...
...
@@ -129,18 +129,18 @@ drop table t3,t1,t2;
drop
table
if
exists
t6
,
t5
,
t4
,
t3
,
t2
,
t1
;
# first testing of common stuff with new parameters
create
table
t1
(
a
int
not
null
,
b
int
not
null
,
key
(
a
,
b
));
create
table
t2
(
a
int
not
null
,
b
int
not
null
,
key
(
a
,
b
));
create
table
t1
(
a
int
not
null
,
b
int
not
null
auto_increment
,
primary
key
(
a
,
b
));
create
table
t2
(
a
int
not
null
,
b
int
not
null
auto_increment
,
primary
key
(
a
,
b
));
create
table
t3
(
a
int
not
null
,
b
int
not
null
,
key
(
a
,
b
))
UNION
=
(
t1
,
t2
)
INSERT_METHOD
=
NO
;
create
table
t4
(
a
int
not
null
,
b
int
not
null
,
key
(
a
,
b
))
TYPE
=
MERGE
UNION
=
(
t1
,
t2
)
INSERT_METHOD
=
NO
;
create
table
t5
(
a
int
not
null
,
b
int
not
null
,
key
(
a
,
b
))
TYPE
=
MERGE
UNION
=
(
t1
,
t2
)
INSERT_METHOD
=
FIRST
;
create
table
t6
(
a
int
not
null
,
b
int
not
null
,
key
(
a
,
b
))
TYPE
=
MERGE
UNION
=
(
t1
,
t2
)
INSERT_METHOD
=
LAST
;
create
table
t5
(
a
int
not
null
,
b
int
not
null
auto_increment
,
primary
key
(
a
,
b
))
TYPE
=
MERGE
UNION
=
(
t1
,
t2
)
INSERT_METHOD
=
FIRST
;
create
table
t6
(
a
int
not
null
,
b
int
not
null
auto_increment
,
primary
key
(
a
,
b
))
TYPE
=
MERGE
UNION
=
(
t1
,
t2
)
INSERT_METHOD
=
LAST
;
show
create
table
t3
;
show
create
table
t4
;
show
create
table
t5
;
show
create
table
t6
;
insert
into
t1
values
(
1
,
1
),(
1
,
2
),(
1
,
3
),(
1
,
4
);
insert
into
t2
values
(
2
,
1
),(
2
,
2
),(
2
,
3
),(
2
,
4
);
insert
into
t1
values
(
1
,
NULL
),(
1
,
NULL
),(
1
,
NULL
),(
1
,
NULL
);
insert
into
t2
values
(
2
,
NULL
),(
2
,
NULL
),(
2
,
NULL
),(
2
,
NULL
);
select
*
from
t3
order
by
b
,
a
limit
3
;
select
*
from
t4
order
by
b
,
a
limit
3
;
select
*
from
t5
order
by
b
,
a
limit
3
,
3
;
...
...
@@ -167,7 +167,16 @@ select * from t2 order by a,b;
select
*
from
t3
order
by
a
,
b
;
select
*
from
t4
order
by
a
,
b
;
select
*
from
t5
order
by
a
,
b
;
# auto_increment
select
1
;
insert
into
t5
values
(
1
,
NULL
),(
5
,
NULL
);
insert
into
t6
values
(
2
,
NULL
),(
6
,
NULL
);
select
*
from
t1
order
by
a
,
b
;
select
*
from
t2
order
by
a
,
b
;
select
*
from
t5
order
by
a
,
b
;
select
*
from
t6
order
by
a
,
b
;
drop
table
if
exists
t6
,
t5
,
t4
,
t3
,
t2
,
t1
;
CREATE
TABLE
t1
(
a
int
(
11
)
NOT
NULL
default
'0'
,
b
int
(
11
)
NOT
NULL
default
'0'
,
PRIMARY
KEY
(
a
,
b
))
TYPE
=
MyISAM
;
INSERT
INTO
t1
VALUES
(
1
,
1
),
(
2
,
1
);
CREATE
TABLE
t2
(
a
int
(
11
)
NOT
NULL
default
'0'
,
b
int
(
11
)
NOT
NULL
default
'0'
,
PRIMARY
KEY
(
a
,
b
))
TYPE
=
MyISAM
;
...
...
sql/ha_myisammrg.cc
View file @
2ae30d2e
...
...
@@ -75,8 +75,7 @@ int ha_myisammrg::write_row(byte * buf)
if
(
table
->
time_stamp
)
update_timestamp
(
buf
+
table
->
time_stamp
-
1
);
if
(
table
->
next_number_field
&&
buf
==
table
->
record
[
0
])
return
(
my_errno
=
HA_ERR_WRONG_COMMAND
);
// update_auto_increment(); - [phi] have to check this before allowing it
update_auto_increment
();
return
myrg_write
(
file
,
buf
);
}
...
...
sql/ha_myisammrg.h
View file @
2ae30d2e
...
...
@@ -34,7 +34,7 @@ class ha_myisammrg: public handler
const
char
**
bas_ext
()
const
;
ulong
table_flags
()
const
{
return
(
HA_REC_NOT_IN_SEQ
|
HA_READ_RND_SAME
|
return
(
HA_REC_NOT_IN_SEQ
|
HA_READ_RND_SAME
|
HA_AUTO_PART_KEY
|
HA_KEYPOS_TO_RNDPOS
|
HA_LASTKEY_ORDER
|
HA_NULL_KEY
|
HA_BLOB_KEY
);
}
...
...
sql/handler.cc
View file @
2ae30d2e
...
...
@@ -628,16 +628,29 @@ longlong handler::get_auto_increment()
{
longlong
nr
;
int
error
;
(
void
)
extra
(
HA_EXTRA_KEYREAD
);
index_init
(
table
->
next_number_index
);
if
(
!
table
->
next_number_key_offset
)
{
// Autoincrement at key-start
error
=
index_last
(
table
->
record
[
1
]);
}
else
{
byte
key
[
MAX_KEY_LENGTH
];
key_copy
(
key
,
table
,
table
->
next_number_index
,
table
->
next_number_key_offset
);
error
=
index_read
(
table
->
record
[
1
],
key
,
table
->
next_number_key_offset
,
HA_READ_PREFIX_LAST
);
}
if
(
error
)
nr
=
1
;
else
nr
=
(
longlong
)
table
->
next_number_field
->
val_int_offset
(
table
->
rec_buff_length
)
+
1
;
(
void
)
extra
(
HA_EXTRA_NO_KEYREAD
);
index_end
();
(
void
)
extra
(
HA_EXTRA_NO_KEYREAD
);
return
nr
;
}
...
...
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