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
3dfbc35f
Commit
3dfbc35f
authored
Aug 29, 2004
by
sergefp@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for BUG#5242: Made SQL Syntax Prepared Statement names case-insensitive.
parent
34dc3a86
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
1 deletion
+40
-1
mysql-test/r/ps.result
mysql-test/r/ps.result
+18
-0
mysql-test/t/ps.test
mysql-test/t/ps.test
+21
-0
sql/sql_class.cc
sql/sql_class.cc
+1
-1
No files found.
mysql-test/r/ps.result
View file @
3dfbc35f
...
...
@@ -241,3 +241,21 @@ prepare stmt1 from "select * from t1 into outfile 'f1.txt'";
execute stmt1;
deallocate prepare stmt1;
drop table t1;
prepare stmt1 from 'select 1';
prepare STMT1 from 'select 2';
execute sTmT1;
2
2
deallocate prepare StMt1;
deallocate prepare Stmt1;
ERROR HY000: Unknown prepared statement handler (Stmt1) given to DEALLOCATE PREPARE
set names utf8;
prepare `ü` from 'select 1234';
execute `ü` ;
1234
1234
set names latin1;
execute ``;
1234
1234
set names default;
mysql-test/t/ps.test
View file @
3dfbc35f
...
...
@@ -240,3 +240,24 @@ prepare stmt1 from "select * from t1 into outfile 'f1.txt'";
execute
stmt1
;
deallocate
prepare
stmt1
;
drop
table
t1
;
#
# BUG#5242 "Prepared statement names are case sensitive"
#
prepare
stmt1
from
'select 1'
;
prepare
STMT1
from
'select 2'
;
execute
sTmT1
;
deallocate
prepare
StMt1
;
--
error
1243
deallocate
prepare
Stmt1
;
# also check that statement names are in right charset.
set
names
utf8
;
prepare
`ü`
from
'select 1234'
;
execute
`ü`
;
set
names
latin1
;
execute
``
;
set
names
default
;
sql/sql_class.cc
View file @
3dfbc35f
...
...
@@ -1503,7 +1503,7 @@ Statement_map::Statement_map() :
hash_init
(
&
st_hash
,
default_charset_info
,
START_STMT_HASH_SIZE
,
0
,
0
,
get_statement_id_as_hash_key
,
delete_statement_as_hash_key
,
MYF
(
0
));
hash_init
(
&
names_hash
,
&
my_charset_bin
,
START_NAME_HASH_SIZE
,
0
,
0
,
hash_init
(
&
names_hash
,
system_charset_info
,
START_NAME_HASH_SIZE
,
0
,
0
,
(
hash_get_key
)
get_stmt_name_hash_key
,
NULL
,
MYF
(
0
));
}
...
...
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