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
9f92bd5e
Commit
9f92bd5e
authored
May 07, 2005
by
mwagner@ultrafly.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-4.0
into ultrafly.mysql.com:/Users/mwagner/work/bk/mysql-4.0
parents
ded73edd
f0841a27
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
0 deletions
+54
-0
BitKeeper/etc/logging_ok
BitKeeper/etc/logging_ok
+1
-0
libmysql/libmysql.c
libmysql/libmysql.c
+34
-0
mysql-test/r/innodb.result
mysql-test/r/innodb.result
+4
-0
mysql-test/t/innodb.test
mysql-test/t/innodb.test
+10
-0
sql/item_func.cc
sql/item_func.cc
+5
-0
No files found.
BitKeeper/etc/logging_ok
View file @
9f92bd5e
...
@@ -144,6 +144,7 @@ serg@sergbook.mylan
...
@@ -144,6 +144,7 @@ serg@sergbook.mylan
serg@sergbook.mysql.com
serg@sergbook.mysql.com
sergefp@mysql.com
sergefp@mysql.com
sinisa@rhols221.adsl.netsonic.fi
sinisa@rhols221.adsl.netsonic.fi
svoj@mysql.com
tfr@beta.frontier86.ee
tfr@beta.frontier86.ee
tfr@indrek.tfr.cafe.ee
tfr@indrek.tfr.cafe.ee
tfr@sarvik.tfr.cafe.ee
tfr@sarvik.tfr.cafe.ee
...
...
libmysql/libmysql.c
View file @
9f92bd5e
...
@@ -3228,6 +3228,23 @@ mysql_sub_escape_string(CHARSET_INFO *charset_info, char *to,
...
@@ -3228,6 +3228,23 @@ mysql_sub_escape_string(CHARSET_INFO *charset_info, char *to,
from
--
;
from
--
;
continue
;
continue
;
}
}
/*
If the next character appears to begin a multi-byte character, we
escape that first byte of that apparent multi-byte character. (The
character just looks like a multi-byte character -- if it were actually
a multi-byte character, it would have been passed through in the test
above.)
Without this check, we can create a problem by converting an invalid
multi-byte character into a valid one. For example, 0xbf27 is not
a valid GBK character, but 0xbf5c is. (0x27 = ', 0x5c = \)
*/
if
(
use_mb_flag
&&
(
l
=
my_mbcharlen
(
charset_info
,
*
from
))
>
1
)
{
*
to
++=
'\\'
;
*
to
++=
*
from
;
continue
;
}
#endif
#endif
switch
(
*
from
)
{
switch
(
*
from
)
{
case
0
:
/* Must be escaped for 'mysql' */
case
0
:
/* Must be escaped for 'mysql' */
...
@@ -3300,6 +3317,23 @@ mysql_odbc_escape_string(MYSQL *mysql,
...
@@ -3300,6 +3317,23 @@ mysql_odbc_escape_string(MYSQL *mysql,
from
--
;
from
--
;
continue
;
continue
;
}
}
/*
If the next character appears to begin a multi-byte character, we
escape that first byte of that apparent multi-byte character. (The
character just looks like a multi-byte character -- if it were actually
a multi-byte character, it would have been passed through in the test
above.)
Without this check, we can create a problem by converting an invalid
multi-byte character into a valid one. For example, 0xbf27 is not
a valid GBK character, but 0xbf5c is. (0x27 = ', 0x5c = \)
*/
if
(
use_mb_flag
&&
(
l
=
my_mbcharlen
(
mysql
->
charset
,
*
from
))
>
1
)
{
*
to
++=
'\\'
;
*
to
++=
*
from
;
continue
;
}
}
}
#endif
#endif
switch
(
*
from
)
{
switch
(
*
from
)
{
...
...
mysql-test/r/innodb.result
View file @
9f92bd5e
...
@@ -1272,3 +1272,7 @@ Cannot delete or update a parent row: a foreign key constraint fails
...
@@ -1272,3 +1272,7 @@ Cannot delete or update a parent row: a foreign key constraint fails
delete from t1 where id=15;
delete from t1 where id=15;
delete from t1 where id=0;
delete from t1 where id=0;
drop table t1;
drop table t1;
CREATE TABLE t1 ( a char(10) ) ENGINE=InnoDB;
SELECT a FROM t1 WHERE MATCH (a) AGAINST ('test' IN BOOLEAN MODE);
The used table type doesn't support FULLTEXT indexes
DROP TABLE t1;
mysql-test/t/innodb.test
View file @
9f92bd5e
...
@@ -911,3 +911,13 @@ delete from t1 where id=15;
...
@@ -911,3 +911,13 @@ delete from t1 where id=15;
delete
from
t1
where
id
=
0
;
delete
from
t1
where
id
=
0
;
drop
table
t1
;
drop
table
t1
;
#
# BUG#7709 test case - Boolean fulltext query against unsupported
# engines does not fail
#
CREATE
TABLE
t1
(
a
char
(
10
)
)
ENGINE
=
InnoDB
;
--
error
1214
;
SELECT
a
FROM
t1
WHERE
MATCH
(
a
)
AGAINST
(
'test'
IN
BOOLEAN
MODE
);
DROP
TABLE
t1
;
sql/item_func.cc
View file @
9f92bd5e
...
@@ -2257,6 +2257,11 @@ bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist)
...
@@ -2257,6 +2257,11 @@ bool Item_func_match::fix_fields(THD *thd,struct st_table_list *tlist)
key
=
NO_SUCH_KEY
;
key
=
NO_SUCH_KEY
;
const_item_cache
=
0
;
const_item_cache
=
0
;
table
=
((
Item_field
*
)
fields
.
head
())
->
field
->
table
;
table
=
((
Item_field
*
)
fields
.
head
())
->
field
->
table
;
if
(
!
(
table
->
file
->
table_flags
()
&
HA_CAN_FULLTEXT
))
{
my_error
(
ER_TABLE_CANT_HANDLE_FULLTEXT
,
MYF
(
0
));
return
1
;
}
table
->
fulltext_searched
=
1
;
table
->
fulltext_searched
=
1
;
record
=
table
->
record
[
0
];
record
=
table
->
record
[
0
];
if
(
key
==
NO_SUCH_KEY
&&
mode
!=
FT_BOOL
)
if
(
key
==
NO_SUCH_KEY
&&
mode
!=
FT_BOOL
)
...
...
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