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
6d9a7969
Commit
6d9a7969
authored
Apr 09, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk@192.168.21.1:mysql-5.0
into mysql.com:/d2/hf/mrg/mysql-5.0-opt sql/sql_table.cc: Auto merged
parents
a978d84c
ddaeead8
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
66 additions
and
10 deletions
+66
-10
mysql-test/r/archive.result
mysql-test/r/archive.result
+9
-0
mysql-test/r/fulltext_left_join.result
mysql-test/r/fulltext_left_join.result
+7
-0
mysql-test/t/archive.test
mysql-test/t/archive.test
+10
-0
mysql-test/t/fulltext_left_join.test
mysql-test/t/fulltext_left_join.test
+11
-0
sql/examples/ha_example.cc
sql/examples/ha_example.cc
+6
-0
sql/ha_archive.cc
sql/ha_archive.cc
+1
-1
sql/handler.h
sql/handler.h
+11
-0
sql/item_func.cc
sql/item_func.cc
+4
-4
sql/item_func.h
sql/item_func.h
+4
-4
sql/sql_table.cc
sql/sql_table.cc
+3
-1
No files found.
mysql-test/r/archive.result
View file @
6d9a7969
...
@@ -12355,3 +12355,12 @@ auto fld1 companynr fld3 fld4 fld5
...
@@ -12355,3 +12355,12 @@ auto fld1 companynr fld3 fld4 fld5
4 011403 37 intercepted audiology tinily
4 011403 37 intercepted audiology tinily
4 011403 37 intercepted audiology tinily
4 011403 37 intercepted audiology tinily
drop table t1, t2, t4;
drop table t1, t2, t4;
create table t1 (i int) engine=archive;
insert into t1 values (1);
repair table t1 use_frm;
Table Op Msg_type Msg_text
test.t1 repair status OK
select * from t1;
i
1
drop table t1;
mysql-test/r/fulltext_left_join.result
View file @
6d9a7969
...
@@ -90,3 +90,10 @@ id link name relevance
...
@@ -90,3 +90,10 @@ id link name relevance
1 1 string 0
1 1 string 0
2 0 string 0
2 0 string 0
DROP TABLE t1,t2;
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT);
CREATE TABLE t2 (b INT, c TEXT, KEY(b));
INSERT INTO t1 VALUES(1);
INSERT INTO t2(b,c) VALUES(2,'castle'),(3,'castle');
SELECT * FROM t1 LEFT JOIN t2 ON a=b WHERE MATCH(c) AGAINST('+castle' IN BOOLEAN MODE);
a b c
DROP TABLE t1, t2;
mysql-test/t/archive.test
View file @
6d9a7969
...
@@ -1364,3 +1364,13 @@ SELECT * from t2;
...
@@ -1364,3 +1364,13 @@ SELECT * from t2;
drop
table
t1
,
t2
,
t4
;
drop
table
t1
,
t2
,
t4
;
#
# BUG#26138 - REPAIR TABLE with option USE_FRM erases all records in ARCHIVE
# table
#
create
table
t1
(
i
int
)
engine
=
archive
;
insert
into
t1
values
(
1
);
repair
table
t1
use_frm
;
select
*
from
t1
;
drop
table
t1
;
mysql-test/t/fulltext_left_join.test
View file @
6d9a7969
...
@@ -87,3 +87,14 @@ SELECT t1.*, MATCH(t1.name) AGAINST('string') AS relevance
...
@@ -87,3 +87,14 @@ SELECT t1.*, MATCH(t1.name) AGAINST('string') AS relevance
DROP
TABLE
t1
,
t2
;
DROP
TABLE
t1
,
t2
;
# End of 4.1 tests
# End of 4.1 tests
#
# BUG#25729 - boolean full text search is confused by NULLs produced by LEFT
# JOIN
#
CREATE
TABLE
t1
(
a
INT
);
CREATE
TABLE
t2
(
b
INT
,
c
TEXT
,
KEY
(
b
));
INSERT
INTO
t1
VALUES
(
1
);
INSERT
INTO
t2
(
b
,
c
)
VALUES
(
2
,
'castle'
),(
3
,
'castle'
);
SELECT
*
FROM
t1
LEFT
JOIN
t2
ON
a
=
b
WHERE
MATCH
(
c
)
AGAINST
(
'+castle'
IN
BOOLEAN
MODE
);
DROP
TABLE
t1
,
t2
;
sql/examples/ha_example.cc
View file @
6d9a7969
...
@@ -211,6 +211,12 @@ ha_example::ha_example(TABLE *table_arg)
...
@@ -211,6 +211,12 @@ ha_example::ha_example(TABLE *table_arg)
If frm_error() is called then we will use this to to find out what file extentions
If frm_error() is called then we will use this to to find out what file extentions
exist for the storage engine. This is also used by the default rename_table and
exist for the storage engine. This is also used by the default rename_table and
delete_table method in handler.cc.
delete_table method in handler.cc.
For engines that have two file name extentions (separate meta/index file
and data file), the order of elements is relevant. First element of engine
file name extentions array should be meta/index file extention. Second
element - data file extention. This order is assumed by
prepare_for_repair() when REPAIR TABLE ... USE_FRM is issued.
*/
*/
static
const
char
*
ha_example_exts
[]
=
{
static
const
char
*
ha_example_exts
[]
=
{
NullS
NullS
...
...
sql/ha_archive.cc
View file @
6d9a7969
...
@@ -503,8 +503,8 @@ int ha_archive::init_archive_writer()
...
@@ -503,8 +503,8 @@ int ha_archive::init_archive_writer()
We just implement one additional file extension.
We just implement one additional file extension.
*/
*/
static
const
char
*
ha_archive_exts
[]
=
{
static
const
char
*
ha_archive_exts
[]
=
{
ARZ
,
ARM
,
ARM
,
ARZ
,
NullS
NullS
};
};
...
...
sql/handler.h
View file @
6d9a7969
...
@@ -780,6 +780,17 @@ public:
...
@@ -780,6 +780,17 @@ public:
virtual
void
free_foreign_key_create_info
(
char
*
str
)
{}
virtual
void
free_foreign_key_create_info
(
char
*
str
)
{}
/* The following can be called without an open handler */
/* The following can be called without an open handler */
virtual
const
char
*
table_type
()
const
=
0
;
virtual
const
char
*
table_type
()
const
=
0
;
/*
If frm_error() is called then we will use this to find out what file
extentions exist for the storage engine. This is also used by the default
rename_table and delete_table method in handler.cc.
For engines that have two file name extentions (separate meta/index file
and data file), the order of elements is relevant. First element of engine
file name extentions array should be meta/index file extention. Second
element - data file extention. This order is assumed by
prepare_for_repair() when REPAIR TABLE ... USE_FRM is issued.
*/
virtual
const
char
**
bas_ext
()
const
=
0
;
virtual
const
char
**
bas_ext
()
const
=
0
;
virtual
ulong
table_flags
(
void
)
const
=
0
;
virtual
ulong
table_flags
(
void
)
const
=
0
;
virtual
ulong
index_flags
(
uint
idx
,
uint
part
,
bool
all_parts
)
const
=
0
;
virtual
ulong
index_flags
(
uint
idx
,
uint
part
,
bool
all_parts
)
const
=
0
;
...
...
sql/item_func.cc
View file @
6d9a7969
...
@@ -4617,14 +4617,14 @@ void Item_func_match::init_search(bool no_order)
...
@@ -4617,14 +4617,14 @@ void Item_func_match::init_search(bool no_order)
fields
.
push_back
(
new
Item_string
(
" "
,
1
,
cmp_collation
.
collation
));
fields
.
push_back
(
new
Item_string
(
" "
,
1
,
cmp_collation
.
collation
));
for
(
uint
i
=
1
;
i
<
arg_count
;
i
++
)
for
(
uint
i
=
1
;
i
<
arg_count
;
i
++
)
fields
.
push_back
(
args
[
i
]);
fields
.
push_back
(
args
[
i
]);
concat
=
new
Item_func_concat_ws
(
fields
);
concat
_ws
=
new
Item_func_concat_ws
(
fields
);
/*
/*
Above function used only to get value and do not need fix_fields for it:
Above function used only to get value and do not need fix_fields for it:
Item_string - basic constant
Item_string - basic constant
fields - fix_fields() was already called for this arguments
fields - fix_fields() was already called for this arguments
Item_func_concat_ws - do not need fix_fields() to produce value
Item_func_concat_ws - do not need fix_fields() to produce value
*/
*/
concat
->
quick_fix_field
();
concat
_ws
->
quick_fix_field
();
}
}
if
(
master
)
if
(
master
)
...
@@ -4839,8 +4839,8 @@ double Item_func_match::val_real()
...
@@ -4839,8 +4839,8 @@ double Item_func_match::val_real()
if
(
key
==
NO_SUCH_KEY
)
if
(
key
==
NO_SUCH_KEY
)
{
{
String
*
a
=
concat
->
val_str
(
&
value
);
String
*
a
=
concat
_ws
->
val_str
(
&
value
);
if
((
null_value
=
(
a
==
0
)))
if
((
null_value
=
(
a
==
0
))
||
!
a
->
length
()
)
DBUG_RETURN
(
0
);
DBUG_RETURN
(
0
);
DBUG_RETURN
(
ft_handler
->
please
->
find_relevance
(
ft_handler
,
DBUG_RETURN
(
ft_handler
->
please
->
find_relevance
(
ft_handler
,
(
byte
*
)
a
->
ptr
(),
a
->
length
()));
(
byte
*
)
a
->
ptr
(),
a
->
length
()));
...
...
sql/item_func.h
View file @
6d9a7969
...
@@ -1308,12 +1308,12 @@ public:
...
@@ -1308,12 +1308,12 @@ public:
FT_INFO
*
ft_handler
;
FT_INFO
*
ft_handler
;
TABLE
*
table
;
TABLE
*
table
;
Item_func_match
*
master
;
// for master-slave optimization
Item_func_match
*
master
;
// for master-slave optimization
Item
*
concat
;
// Item_func_concat_ws
Item
*
concat
_ws
;
// Item_func_concat_ws
String
value
;
// value of concat
String
value
;
// value of concat
_ws
String
search_value
;
// key_item()'s value converted to cmp_collation
String
search_value
;
// key_item()'s value converted to cmp_collation
Item_func_match
(
List
<
Item
>
&
a
,
uint
b
)
:
Item_real_func
(
a
),
key
(
0
),
flags
(
b
),
Item_func_match
(
List
<
Item
>
&
a
,
uint
b
)
:
Item_real_func
(
a
),
key
(
0
),
flags
(
b
),
join_key
(
0
),
ft_handler
(
0
),
table
(
0
),
master
(
0
),
concat
(
0
)
{
}
join_key
(
0
),
ft_handler
(
0
),
table
(
0
),
master
(
0
),
concat
_ws
(
0
)
{
}
void
cleanup
()
void
cleanup
()
{
{
DBUG_ENTER
(
"Item_func_match"
);
DBUG_ENTER
(
"Item_func_match"
);
...
@@ -1321,7 +1321,7 @@ public:
...
@@ -1321,7 +1321,7 @@ public:
if
(
!
master
&&
ft_handler
)
if
(
!
master
&&
ft_handler
)
ft_handler
->
please
->
close_search
(
ft_handler
);
ft_handler
->
please
->
close_search
(
ft_handler
);
ft_handler
=
0
;
ft_handler
=
0
;
concat
=
0
;
concat
_ws
=
0
;
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
enum
Functype
functype
()
const
{
return
FT_FUNC
;
}
enum
Functype
functype
()
const
{
return
FT_FUNC
;
}
...
...
sql/sql_table.cc
View file @
6d9a7969
...
@@ -2091,7 +2091,9 @@ static int prepare_for_repair(THD* thd, TABLE_LIST *table_list,
...
@@ -2091,7 +2091,9 @@ static int prepare_for_repair(THD* thd, TABLE_LIST *table_list,
/*
/*
Check if this is a table type that stores index and data separately,
Check if this is a table type that stores index and data separately,
like ISAM or MyISAM
like ISAM or MyISAM. We assume fixed order of engine file name
extentions array. First element of engine file name extentions array
is meta/index file extention. Second element - data file extention.
*/
*/
if
(
!
ext
[
0
]
||
!
ext
[
1
])
if
(
!
ext
[
0
]
||
!
ext
[
1
])
goto
end
;
// No data file
goto
end
;
// No data file
...
...
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