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
fe85a604
Commit
fe85a604
authored
Dec 07, 2000
by
serg@serg.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
68bd2df7
97f6bc11
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
23 deletions
+48
-23
myisammrg/mymrgdef.h
myisammrg/mymrgdef.h
+5
-3
myisammrg/myrg_info.c
myisammrg/myrg_info.c
+5
-3
myisammrg/myrg_rrnd.c
myisammrg/myrg_rrnd.c
+12
-14
mysql-test/mysql-test-run
mysql-test/mysql-test-run
+3
-3
mysql-test/r/3.23/mrg000001.dummy.result
mysql-test/r/3.23/mrg000001.dummy.result
+1
-0
mysql-test/r/3.23/mrg000001.result
mysql-test/r/3.23/mrg000001.result
+5
-0
mysql-test/t/3.23/mrg000001.test
mysql-test/t/3.23/mrg000001.test
+17
-0
No files found.
myisammrg/mymrgdef.h
View file @
fe85a604
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
(at your option) any later version.
This program is distributed in the hope that it will be useful,
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
...
@@ -30,3 +30,5 @@ extern pthread_mutex_t THR_LOCK_open;
...
@@ -30,3 +30,5 @@ extern pthread_mutex_t THR_LOCK_open;
int
_myrg_init_queue
(
MYRG_INFO
*
info
,
int
inx
,
enum
ha_rkey_function
search_flag
);
int
_myrg_init_queue
(
MYRG_INFO
*
info
,
int
inx
,
enum
ha_rkey_function
search_flag
);
int
_myrg_finish_scan
(
MYRG_INFO
*
info
,
int
inx
,
enum
ha_rkey_function
type
);
int
_myrg_finish_scan
(
MYRG_INFO
*
info
,
int
inx
,
enum
ha_rkey_function
type
);
MYRG_TABLE
*
_myrg_find_table
(
MYRG_INFO
*
info
,
ulonglong
pos
);
myisammrg/myrg_info.c
View file @
fe85a604
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
/* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This program is free software; you can redistribute it and/or modify
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
(at your option) any later version.
This program is distributed in the hope that it will be useful,
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
...
@@ -35,6 +35,8 @@ int myrg_status(MYRG_INFO *info,register MYMERGE_INFO *x,int flag)
...
@@ -35,6 +35,8 @@ int myrg_status(MYRG_INFO *info,register MYMERGE_INFO *x,int flag)
MYRG_TABLE
*
current_table
;
MYRG_TABLE
*
current_table
;
DBUG_ENTER
(
"myrg_status"
);
DBUG_ENTER
(
"myrg_status"
);
_myrg_find_table
(
info
,
HA_OFFSET_ERROR
);
if
(
!
(
current_table
=
info
->
current_table
)
&&
if
(
!
(
current_table
=
info
->
current_table
)
&&
info
->
open_tables
!=
info
->
end_table
)
info
->
open_tables
!=
info
->
end_table
)
current_table
=
info
->
open_tables
;
current_table
=
info
->
open_tables
;
...
...
myisammrg/myrg_rrnd.c
View file @
fe85a604
...
@@ -21,8 +21,6 @@
...
@@ -21,8 +21,6 @@
#include "mymrgdef.h"
#include "mymrgdef.h"
static
MYRG_TABLE
*
find_table
(
MYRG_TABLE
*
start
,
MYRG_TABLE
*
end
,
ulonglong
pos
);
/*
/*
If filepos == HA_OFFSET_ERROR, read next
If filepos == HA_OFFSET_ERROR, read next
Returns same as mi_rrnd:
Returns same as mi_rrnd:
...
@@ -80,8 +78,7 @@ int myrg_rrnd(MYRG_INFO *info,byte *buf,ulonglong filepos)
...
@@ -80,8 +78,7 @@ int myrg_rrnd(MYRG_INFO *info,byte *buf,ulonglong filepos)
isam_info
->
lastinx
=
(
uint
)
-
1
;
isam_info
->
lastinx
=
(
uint
)
-
1
;
}
}
}
}
info
->
current_table
=
find_table
(
info
->
open_tables
,
info
->
current_table
=
_myrg_find_table
(
info
,
filepos
);
info
->
end_table
-
1
,
filepos
);
isam_info
=
info
->
current_table
->
table
;
isam_info
=
info
->
current_table
->
table
;
isam_info
->
update
&=
HA_STATE_CHANGED
;
isam_info
->
update
&=
HA_STATE_CHANGED
;
return
((
*
isam_info
->
s
->
read_rnd
)
return
((
*
isam_info
->
s
->
read_rnd
)
...
@@ -93,18 +90,19 @@ int myrg_rrnd(MYRG_INFO *info,byte *buf,ulonglong filepos)
...
@@ -93,18 +90,19 @@ int myrg_rrnd(MYRG_INFO *info,byte *buf,ulonglong filepos)
/* Find which table to use according to file-pos */
/* Find which table to use according to file-pos */
static
MYRG_TABLE
*
find_table
(
MYRG_TABLE
*
start
,
MYRG_TABLE
*
end
,
MYRG_TABLE
*
_myrg_find_table
(
MYRG_INFO
*
info
,
ulonglong
pos
)
ulonglong
pos
)
{
{
MYRG_TABLE
*
mid
;
MYRG_TABLE
*
t
;
info
->
records
=
info
->
del
=
info
->
data_file_length
=
0
;
while
(
start
!=
end
)
for
(
t
=
info
->
open_tables
;
t
<
info
->
end_table
;
t
++
)
{
{
mid
=
start
+
((
uint
)
(
end
-
start
)
+
1
)
/
2
;
t
->
file_offset
=
info
->
data_file_length
;
if
(
mid
->
file_offset
>
pos
)
if
(
pos
<
t
->
file_offset
)
return
t
-
1
;
end
=
mid
-
1
;
info
->
data_file_length
+=
t
->
table
->
state
->
data_file_length
;
else
info
->
records
+=
t
->
table
->
state
->
records
;
start
=
mid
;
info
->
del
+=
t
->
table
->
state
->
del
;
}
}
return
start
;
return
t
-
1
;
}
}
mysql-test/mysql-test-run
View file @
fe85a604
...
@@ -147,7 +147,7 @@ echo_pass () {
...
@@ -147,7 +147,7 @@ echo_pass () {
prompt_user
()
prompt_user
()
{
{
echo
$1
echo
$1
read
read
not_used
}
}
echo_fail
()
{
echo_fail
()
{
...
@@ -285,7 +285,7 @@ start_slave()
...
@@ -285,7 +285,7 @@ start_slave()
--master-connect-retry=1
\
--master-connect-retry=1
\
--master-host=127.0.0.1
\
--master-host=127.0.0.1
\
--master-port=
$MASTER_MYPORT
\
--master-port=
$MASTER_MYPORT
\
--core-file
\
--core-file
--log-bin --log-slave-updates
\
--basedir=
$CWD
\
--basedir=
$CWD
\
--datadir=
$SLAVE_MYDDIR
\
--datadir=
$SLAVE_MYDDIR
\
--pid-file=
$SLAVE_MYPID
\
--pid-file=
$SLAVE_MYPID
\
...
@@ -363,7 +363,7 @@ run_testcase ()
...
@@ -363,7 +363,7 @@ run_testcase ()
tname
=
`
$ECHO
$tname
|
$CUT
-d
.
-f
1
`
tname
=
`
$ECHO
$tname
|
$CUT
-d
.
-f
1
`
master_opt_file
=
$TESTDIR
/
$tname
-master
.opt
master_opt_file
=
$TESTDIR
/
$tname
-master
.opt
slave_opt_file
=
$TESTDIR
/
$tname
-slave
.opt
slave_opt_file
=
$TESTDIR
/
$tname
-slave
.opt
SKIP_SLAVE
=
`
$EXPR
\(
match
$tname
rpl
\)
=
0
`
SKIP_SLAVE
=
`
$EXPR
\(
$tname
:
rpl
\)
=
0
`
if
[
-f
$master_opt_file
]
;
if
[
-f
$master_opt_file
]
;
then
then
...
...
mysql-test/r/3.23/mrg000001.dummy.result
0 → 100644
View file @
fe85a604
incr othr
mysql-test/r/3.23/mrg000001.result
0 → 100644
View file @
fe85a604
incr othr
1 10
2 24
4 33
3 53
mysql-test/t/3.23/mrg000001.test
0 → 100644
View file @
fe85a604
DROP
TABLE
IF
EXISTS
test1
;
DROP
TABLE
IF
EXISTS
test2
;
DROP
TABLE
IF
EXISTS
test3
;
CREATE
TABLE
test1
(
incr
int
not
null
,
othr
int
not
null
,
primary
key
(
incr
));
CREATE
TABLE
test2
(
incr
int
not
null
,
othr
int
not
null
,
primary
key
(
incr
));
CREATE
TABLE
test3
(
incr
int
not
null
,
othr
int
not
null
,
primary
key
(
incr
))
TYPE
=
MERGE
UNION
=
(
test1
,
test2
);
@
r
/
3.23
/
mrg000001
.
dummy
.
result
SELECT
*
from
test3
;
INSERT
INTO
test1
VALUES
(
1
,
10
),(
3
,
53
),(
5
,
21
),(
7
,
12
),(
9
,
17
);
INSERT
INTO
test2
VALUES
(
2
,
24
),(
4
,
33
),(
6
,
41
),(
8
,
26
),(
0
,
32
);
INSERT
INTO
test1
VALUES
(
11
,
20
),(
13
,
43
),(
15
,
11
),(
17
,
22
),(
19
,
37
);
INSERT
INTO
test2
VALUES
(
12
,
25
),(
14
,
31
),(
16
,
42
),(
18
,
27
),(
10
,
30
);
@
r
/
3.23
/
mrg000001
.
result
SELECT
*
from
test3
where
incr
in
(
1
,
2
,
3
,
4
)
order
by
othr
;
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