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
0a64381c
Commit
0a64381c
authored
Jan 14, 2006
by
konstantin@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/opt/local/work/mysql-4.1-12734
into mysql.com:/opt/local/work/mysql-5.0-root
parents
86daf2d4
48d48bc9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
0 deletions
+37
-0
mysql-test/t/ps.test
mysql-test/t/ps.test
+30
-0
sql/item_cmpfunc.cc
sql/item_cmpfunc.cc
+6
-0
sql/item_cmpfunc.h
sql/item_cmpfunc.h
+1
-0
No files found.
mysql-test/t/ps.test
View file @
0a64381c
...
...
@@ -870,6 +870,36 @@ drop table t1;
set
names
default
;
deallocate
prepare
stmt
;
#
# A test case for Bug#12734 "prepared statement may return incorrect result
# set for a select SQL request": test that canDoTurboBM is reset for each
# execute of a prepared statement.
#
create
table
t1
(
word_id
mediumint
(
8
)
unsigned
not
null
default
'0'
,
formatted
varchar
(
20
)
not
null
default
''
);
insert
into
t1
values
(
80
,
'pendant'
),
(
475
,
'pretendants'
),
(
989
,
'tendances'
),
(
1019
,
'cependant'
),(
1022
,
'abondance'
),(
1205
,
'independants'
),
(
13
,
'lessiver'
),(
25
,
'lambiner'
),(
46
,
'situer'
),(
71
,
'terminer'
),
(
82
,
'decrocher'
);
select
count
(
*
)
from
t1
where
formatted
like
'%NDAN%'
;
select
count
(
*
)
from
t1
where
formatted
like
'%ER'
;
prepare
stmt
from
"select count(*) from t1 where formatted like ?"
;
set
@
like
=
"%NDAN%"
;
execute
stmt
using
@
like
;
set
@
like
=
"%ER"
;
execute
stmt
using
@
like
;
set
@
like
=
"%NDAN%"
;
execute
stmt
using
@
like
;
set
@
like
=
"%ER"
;
execute
stmt
using
@
like
;
deallocate
prepare
stmt
;
drop
table
t1
;
# End of 4.1 tests
#
...
...
sql/item_cmpfunc.cc
View file @
0a64381c
...
...
@@ -3059,6 +3059,12 @@ bool Item_func_like::fix_fields(THD *thd, Item **ref)
return
FALSE
;
}
void
Item_func_like
::
cleanup
()
{
canDoTurboBM
=
FALSE
;
Item_bool_func2
::
cleanup
();
}
#ifdef USE_REGEX
bool
...
...
sql/item_cmpfunc.h
View file @
0a64381c
...
...
@@ -1001,6 +1001,7 @@ public:
cond_result
eq_cmp_result
()
const
{
return
COND_TRUE
;
}
const
char
*
func_name
()
const
{
return
"like"
;
}
bool
fix_fields
(
THD
*
thd
,
Item
**
ref
);
void
cleanup
();
};
#ifdef USE_REGEX
...
...
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