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
e66f7538
Commit
e66f7538
authored
Jun 06, 2009
by
Tatiana A. Nurnberg
Browse files
Options
Browse Files
Download
Plain Diff
auto-merge
parents
640b7cd6
d5109c91
Changes
22
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
198 additions
and
146 deletions
+198
-146
client/mysqldump.c
client/mysqldump.c
+2
-2
cmd-line-utils/readline/bind.c
cmd-line-utils/readline/bind.c
+1
-1
cmd-line-utils/readline/chardefs.h
cmd-line-utils/readline/chardefs.h
+2
-1
cmd-line-utils/readline/display.c
cmd-line-utils/readline/display.c
+1
-1
dbug/user.r
dbug/user.r
+1
-0
include/my_sys.h
include/my_sys.h
+1
-1
mysql-test/Makefile.am
mysql-test/Makefile.am
+3
-4
mysql-test/include/mix1.inc
mysql-test/include/mix1.inc
+10
-0
mysql-test/r/ctype_ldml.result
mysql-test/r/ctype_ldml.result
+8
-0
mysql-test/r/innodb_mysql.result
mysql-test/r/innodb_mysql.result
+12
-0
mysql-test/r/sp-fib.result
mysql-test/r/sp-fib.result
+46
-0
mysql-test/r/sp.result
mysql-test/r/sp.result
+0
-46
mysql-test/t/ctype_ldml.test
mysql-test/t/ctype_ldml.test
+9
-0
mysql-test/t/sp-fib.test
mysql-test/t/sp-fib.test
+60
-0
mysql-test/t/sp.test
mysql-test/t/sp.test
+0
-55
sql/item.cc
sql/item.cc
+3
-0
sql/mysql_priv.h
sql/mysql_priv.h
+5
-5
sql/sql_parse.cc
sql/sql_parse.cc
+6
-6
sql/sql_prepare.cc
sql/sql_prepare.cc
+22
-22
storage/myisammrg/myrg_create.c
storage/myisammrg/myrg_create.c
+1
-1
strings/ctype-uca.c
strings/ctype-uca.c
+1
-0
strings/ctype.c
strings/ctype.c
+4
-1
No files found.
client/mysqldump.c
View file @
e66f7538
...
...
@@ -4110,7 +4110,7 @@ static my_bool dump_all_views_in_db(char *database)
for
(
numrows
=
0
;
(
table
=
getTableName
(
1
));
)
{
char
*
end
=
strmov
(
afterdot
,
table
);
if
(
include_table
(
(
uchar
*
)
hash_key
,
end
-
hash_key
))
if
(
include_table
(
hash_key
,
end
-
hash_key
))
{
numrows
++
;
dynstr_append_checked
(
&
query
,
quote_name
(
table
,
table_buff
,
1
));
...
...
@@ -4131,7 +4131,7 @@ static my_bool dump_all_views_in_db(char *database)
while
((
table
=
getTableName
(
0
)))
{
char
*
end
=
strmov
(
afterdot
,
table
);
if
(
include_table
(
(
uchar
*
)
hash_key
,
end
-
hash_key
))
if
(
include_table
(
hash_key
,
end
-
hash_key
))
get_view_structure
(
table
,
database
);
}
if
(
opt_xml
)
...
...
cmd-line-utils/readline/bind.c
View file @
e66f7538
...
...
@@ -701,7 +701,7 @@ rl_function_of_keyseq (keyseq, map, type)
{
unsigned
char
ic
=
keyseq
[
i
];
if
(
META_
CHAR
(
ic
)
&&
_rl_convert_meta_chars_to_ascii
)
if
(
META_
BYTE
(
ic
)
&&
_rl_convert_meta_chars_to_ascii
)
{
if
(
map
[
ESC
].
type
==
ISKMAP
)
{
...
...
cmd-line-utils/readline/chardefs.h
View file @
e66f7538
...
...
@@ -59,7 +59,8 @@
#define largest_char 255
/* Largest character value. */
#define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0))
#define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char)
#define META_BYTE(c) ((c) > meta_character_threshold)
#define META_CHAR(c) (META_BYTE(c) && (c) <= largest_char)
#define CTRL(c) ((c) & control_character_mask)
#define META(c) ((c) | meta_character_bit)
...
...
cmd-line-utils/readline/display.c
View file @
e66f7538
...
...
@@ -1888,7 +1888,7 @@ rl_character_len (c, pos)
uc
=
(
unsigned
char
)
c
;
if
(
META_
CHAR
(
uc
))
if
(
META_
BYTE
(
uc
))
return
((
_rl_output_meta_chars
==
0
)
?
4
:
1
);
if
(
uc
==
'\t'
)
...
...
dbug/user.r
View file @
e66f7538
...
...
@@ -32,6 +32,7 @@
.\" === Set line length
.\".ll 6.5i
.TL
.warn 0
D B U G
.P 0
C Program Debugging Package
...
...
include/my_sys.h
View file @
e66f7538
...
...
@@ -511,7 +511,7 @@ typedef int (*qsort2_cmp)(const void *, const void *, const void *);
((info)->write_pos + (Count) <=(info)->write_end ?\
(memcpy((info)->write_pos, (Buffer), (size_t)(Count)),\
((info)->write_pos+=(Count)),0) : \
(*(info)->write_function)((info),(Buffer),(Count)))
(*(info)->write_function)((info),(
uchar *)(
Buffer),(Count)))
#define my_b_get(info) \
((info)->read_pos != (info)->read_end ?\
...
...
mysql-test/Makefile.am
View file @
e66f7538
...
...
@@ -25,6 +25,7 @@ test_SCRIPTS = mtr \
mysql-stress-test.pl
nobase_test_DATA
=
\
valgrind.supp
\
lib/v1/mysql-test-run.pl
\
lib/v1/mtr_cases.pl
\
lib/v1/mtr_io.pl
\
...
...
@@ -41,7 +42,6 @@ nobase_test_DATA = \
lib/v1/mtr_im.pl
\
lib/v1/mtr_process.pl
\
lib/v1/mtr_unique.pl
\
\
lib/mtr_cases.pm
\
lib/mtr_gcov.pl
\
lib/mtr_gprof.pl
\
...
...
@@ -69,9 +69,8 @@ nobase_test_DATA = \
SUBDIRS
=
lib/My/SafeProcess
EXTRA_DIST
=
README
\
valgrind.supp
\
$(test_SCRIPTS)
\
$(nobase_test_DATA)
$(nobase_test_DATA)
# List of directories containing test + result files and the
# related test data files that should be copied
...
...
@@ -93,7 +92,7 @@ TEST_DIRS = t r include std_data std_data/parts collections \
suite/jp suite/jp/t suite/jp/r suite/jp/std_data suite/jp/include
\
suite/manual/t suite/manual/r
\
suite/ndb_team suite/ndb_team/t suite/ndb_team/r
\
suite/rpl suite/rpl/
data suite/rpl/
include suite/rpl/r
\
suite/rpl suite/rpl/include suite/rpl/r
\
suite/rpl/t
\
suite/stress/include suite/stress/t suite/stress/r
\
suite/ndb suite/ndb/t suite/ndb/r
\
...
...
mysql-test/include/mix1.inc
View file @
e66f7538
...
...
@@ -1171,6 +1171,16 @@ CREATE TABLE t1 (f1 INTEGER PRIMARY KEY COMMENT 'My ID#', f2 INTEGER DEFAULT NUL
SHOW
CREATE
TABLE
t1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug #36995: valgrind error in remove_const during subquery executions
--
echo
#
create
table
t1
(
a
bit
(
1
)
not
null
,
b
int
)
engine
=
myisam
;
create
table
t2
(
c
int
)
engine
=
innodb
;
explain
select
b
from
t1
where
a
not
in
(
select
b
from
t1
,
t2
group
by
a
)
group
by
a
;
DROP
TABLE
t1
,
t2
;
--
echo
End
of
5.0
tests
# Fix for BUG#19243 "wrong LAST_INSERT_ID() after ON DUPLICATE KEY
...
...
mysql-test/r/ctype_ldml.result
View file @
e66f7538
...
...
@@ -40,6 +40,14 @@ abcd abcd
efgh efgh
ijkl ijkl
DROP TABLE t1;
#
# Bug#43827 Server closes connections and restarts
#
CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci);
INSERT INTO t1 SELECT REPEAT('a',11);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
DROP TABLE t1;
show collation like 'ucs2_vn_ci';
Collation Charset Id Default Compiled Sortlen
ucs2_vn_ci ucs2 242 8
...
...
mysql-test/r/innodb_mysql.result
View file @
e66f7538
...
...
@@ -1420,6 +1420,18 @@ t1 CREATE TABLE `t1` (
CONSTRAINT `f2_ref` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1;
#
# Bug #36995: valgrind error in remove_const during subquery executions
#
create table t1 (a bit(1) not null,b int) engine=myisam;
create table t2 (c int) engine=innodb;
explain
select b from t1 where a not in (select b from t1,t2 group by a) group by a;
id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
2 DEPENDENT SUBQUERY t1 system NULL NULL NULL NULL 0 const row not found
2 DEPENDENT SUBQUERY t2 ALL NULL NULL NULL NULL 1
DROP TABLE t1,t2;
End of 5.0 tests
CREATE TABLE `t2` (
`k` int(11) NOT NULL auto_increment,
...
...
mysql-test/r/sp-fib.result
0 → 100644
View file @
e66f7538
drop table if exists t3;
create table t3 ( f bigint unsigned not null );
drop procedure if exists fib;
create procedure fib(n int unsigned)
begin
if n > 1 then
begin
declare x, y bigint unsigned;
declare c cursor for select f from t3 order by f desc limit 2;
open c;
fetch c into y;
fetch c into x;
close c;
insert into t3 values (x+y);
call fib(n-1);
end;
end if;
end|
set @@max_sp_recursion_depth= 20|
insert into t3 values (0), (1)|
call fib(3)|
select * from t3 order by f asc|
f
0
1
1
2
truncate table t3|
insert into t3 values (0), (1)|
call fib(10)|
select * from t3 order by f asc|
f
0
1
1
2
3
5
8
13
21
34
55
drop table t3|
drop procedure fib|
set @@max_sp_recursion_depth= 0|
mysql-test/r/sp.result
View file @
e66f7538
...
...
@@ -1337,52 +1337,6 @@ drop procedure opp|
drop procedure ip|
show procedure status where name like '%p%' and db='test'|
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
drop table if exists t3|
create table t3 ( f bigint unsigned not null )|
drop procedure if exists fib|
create procedure fib(n int unsigned)
begin
if n > 1 then
begin
declare x, y bigint unsigned;
declare c cursor for select f from t3 order by f desc limit 2;
open c;
fetch c into y;
fetch c into x;
close c;
insert into t3 values (x+y);
call fib(n-1);
end;
end if;
end|
set @@max_sp_recursion_depth= 20|
insert into t3 values (0), (1)|
call fib(3)|
select * from t3 order by f asc|
f
0
1
1
2
truncate table t3|
insert into t3 values (0), (1)|
call fib(10)|
select * from t3 order by f asc|
f
0
1
1
2
3
5
8
13
21
34
55
drop table t3|
drop procedure fib|
set @@max_sp_recursion_depth= 0|
drop procedure if exists bar|
create procedure bar(x char(16), y int)
comment "111111111111" sql security invoker
...
...
mysql-test/t/ctype_ldml.test
View file @
e66f7538
...
...
@@ -37,6 +37,15 @@ UPDATE t1 SET col2=col1;
SELECT
*
FROM
t1
WHERE
col1
=
col2
ORDER
BY
col1
;
DROP
TABLE
t1
;
--
echo
#
--
echo
# Bug#43827 Server closes connections and restarts
--
echo
#
# Crash happened with a user-defined utf8 collation,
# on attempt to insert a string longer than the column can store.
CREATE
TABLE
t1
(
c1
VARCHAR
(
10
)
CHARACTER
SET
utf8
COLLATE
utf8_test_ci
);
INSERT
INTO
t1
SELECT
REPEAT
(
'a'
,
11
);
DROP
TABLE
t1
;
#
# Vietnamese experimental collation
#
...
...
mysql-test/t/sp-fib.test
0 → 100644
View file @
e66f7538
# Fibonacci, for recursion test. (Yet Another Numerical series :)
# Split from main.sp due to problems reported in Bug#15866
--
disable_warnings
drop
table
if
exists
t3
;
--
enable_warnings
create
table
t3
(
f
bigint
unsigned
not
null
);
# We deliberately do it the awkward way, fetching the last two
# values from the table, in order to exercise various statements
# and table accesses at each turn.
--
disable_warnings
drop
procedure
if
exists
fib
;
--
enable_warnings
# Now for multiple statements...
delimiter
|
;
create
procedure
fib
(
n
int
unsigned
)
begin
if
n
>
1
then
begin
declare
x
,
y
bigint
unsigned
;
declare
c
cursor
for
select
f
from
t3
order
by
f
desc
limit
2
;
open
c
;
fetch
c
into
y
;
fetch
c
into
x
;
close
c
;
insert
into
t3
values
(
x
+
y
);
call
fib
(
n
-
1
);
end
;
end
if
;
end
|
# Enable recursion
set
@@
max_sp_recursion_depth
=
20
|
# Minimum test: recursion of 3 levels
insert
into
t3
values
(
0
),
(
1
)
|
call
fib
(
3
)
|
select
*
from
t3
order
by
f
asc
|
truncate
table
t3
|
# The original test, 20 levels, ran into memory limits on some machines
# and builds. Try 10 instead...
insert
into
t3
values
(
0
),
(
1
)
|
call
fib
(
10
)
|
select
*
from
t3
order
by
f
asc
|
drop
table
t3
|
drop
procedure
fib
|
set
@@
max_sp_recursion_depth
=
0
|
mysql-test/t/sp.test
View file @
e66f7538
...
...
@@ -1561,61 +1561,6 @@ drop procedure ip|
show
procedure
status
where
name
like
'%p%'
and
db
=
'test'
|
# Fibonacci, for recursion test. (Yet Another Numerical series :)
#
--
disable_warnings
drop
table
if
exists
t3
|
--
enable_warnings
create
table
t3
(
f
bigint
unsigned
not
null
)
|
# We deliberately do it the awkward way, fetching the last two
# values from the table, in order to exercise various statements
# and table accesses at each turn.
--
disable_warnings
drop
procedure
if
exists
fib
|
--
enable_warnings
create
procedure
fib
(
n
int
unsigned
)
begin
if
n
>
1
then
begin
declare
x
,
y
bigint
unsigned
;
declare
c
cursor
for
select
f
from
t3
order
by
f
desc
limit
2
;
open
c
;
fetch
c
into
y
;
fetch
c
into
x
;
close
c
;
insert
into
t3
values
(
x
+
y
);
call
fib
(
n
-
1
);
end
;
end
if
;
end
|
# Enable recursion
set
@@
max_sp_recursion_depth
=
20
|
# Minimum test: recursion of 3 levels
insert
into
t3
values
(
0
),
(
1
)
|
call
fib
(
3
)
|
select
*
from
t3
order
by
f
asc
|
truncate
table
t3
|
# The original test, 20 levels, ran into memory limits on some machines
# and builds. Try 10 instead...
insert
into
t3
values
(
0
),
(
1
)
|
call
fib
(
10
)
|
select
*
from
t3
order
by
f
asc
|
drop
table
t3
|
drop
procedure
fib
|
set
@@
max_sp_recursion_depth
=
0
|
#
# Comment & suid
#
...
...
sql/item.cc
View file @
e66f7538
...
...
@@ -417,6 +417,7 @@ Item::Item(THD *thd, Item *item):
name
(
item
->
name
),
orig_name
(
item
->
orig_name
),
max_length
(
item
->
max_length
),
name_length
(
item
->
name_length
),
marker
(
item
->
marker
),
decimals
(
item
->
decimals
),
maybe_null
(
item
->
maybe_null
),
...
...
@@ -424,7 +425,9 @@ Item::Item(THD *thd, Item *item):
unsigned_flag
(
item
->
unsigned_flag
),
with_sum_func
(
item
->
with_sum_func
),
fixed
(
item
->
fixed
),
is_autogenerated_name
(
item
->
is_autogenerated_name
),
collation
(
item
->
collation
),
with_subselect
(
item
->
with_subselect
),
cmp_context
(
item
->
cmp_context
)
{
next
=
thd
->
free_list
;
// Put in free list
...
...
sql/mysql_priv.h
View file @
e66f7538
...
...
@@ -1413,14 +1413,14 @@ enum enum_schema_tables get_schema_table_idx(ST_SCHEMA_TABLE *schema_table);
/* sql_prepare.cc */
void
mysql_stmt_prepare
(
THD
*
thd
,
const
char
*
packet
,
uint
packet_length
);
void
mysql_stmt_execute
(
THD
*
thd
,
char
*
packet
,
uint
packet_length
);
void
mysql_stmt_close
(
THD
*
thd
,
char
*
packet
);
void
mysql
d
_stmt_prepare
(
THD
*
thd
,
const
char
*
packet
,
uint
packet_length
);
void
mysql
d
_stmt_execute
(
THD
*
thd
,
char
*
packet
,
uint
packet_length
);
void
mysql
d
_stmt_close
(
THD
*
thd
,
char
*
packet
);
void
mysql_sql_stmt_prepare
(
THD
*
thd
);
void
mysql_sql_stmt_execute
(
THD
*
thd
);
void
mysql_sql_stmt_close
(
THD
*
thd
);
void
mysql_stmt_fetch
(
THD
*
thd
,
char
*
packet
,
uint
packet_length
);
void
mysql_stmt_reset
(
THD
*
thd
,
char
*
packet
);
void
mysql
d
_stmt_fetch
(
THD
*
thd
,
char
*
packet
,
uint
packet_length
);
void
mysql
d
_stmt_reset
(
THD
*
thd
,
char
*
packet
);
void
mysql_stmt_get_longdata
(
THD
*
thd
,
char
*
pos
,
ulong
packet_length
);
void
reinit_stmt_before_use
(
THD
*
thd
,
LEX
*
lex
);
...
...
sql/sql_parse.cc
View file @
e66f7538
...
...
@@ -1165,12 +1165,12 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
}
case
COM_STMT_EXECUTE
:
{
mysql_stmt_execute
(
thd
,
packet
,
packet_length
);
mysql
d
_stmt_execute
(
thd
,
packet
,
packet_length
);
break
;
}
case
COM_STMT_FETCH
:
{
mysql_stmt_fetch
(
thd
,
packet
,
packet_length
);
mysql
d
_stmt_fetch
(
thd
,
packet
,
packet_length
);
break
;
}
case
COM_STMT_SEND_LONG_DATA
:
...
...
@@ -1180,17 +1180,17 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
}
case
COM_STMT_PREPARE
:
{
mysql_stmt_prepare
(
thd
,
packet
,
packet_length
);
mysql
d
_stmt_prepare
(
thd
,
packet
,
packet_length
);
break
;
}
case
COM_STMT_CLOSE
:
{
mysql_stmt_close
(
thd
,
packet
);
mysql
d
_stmt_close
(
thd
,
packet
);
break
;
}
case
COM_STMT_RESET
:
{
mysql_stmt_reset
(
thd
,
packet
);
mysql
d
_stmt_reset
(
thd
,
packet
);
break
;
}
case
COM_QUERY
:
...
...
@@ -5739,7 +5739,7 @@ mysql_new_select(LEX *lex, bool move_down)
/*
Don't evaluate this subquery during statement prepare even if
it's a constant one. The flag is switched off in the end of
mysql_stmt_prepare.
mysql
d
_stmt_prepare.
*/
if
(
thd
->
stmt_arena
->
is_stmt_prepare
())
select_lex
->
uncacheable
|=
UNCACHEABLE_PREPARE
;
...
...
sql/sql_prepare.cc
View file @
e66f7538
...
...
@@ -716,9 +716,9 @@ static void setup_one_conversion_function(THD *thd, Item_param *param,
prepared statement, parameter markers are replaced with variable names.
Example:
@verbatim
mysql_stmt_prepare("UPDATE t1 SET a=a*1.25 WHERE a=?")
mysql
d
_stmt_prepare("UPDATE t1 SET a=a*1.25 WHERE a=?")
--> general logs gets [Prepare] UPDATE t1 SET a*1.25 WHERE a=?"
mysql_stmt_execute(stmt);
mysql
d
_stmt_execute(stmt);
--> general and binary logs get
[Execute] UPDATE t1 SET a*1.25 WHERE a=1"
@endverbatim
...
...
@@ -2056,11 +2056,11 @@ static bool init_param_array(Prepared_statement *stmt)
to the client, otherwise an error message is set in THD.
*/
void
mysql_stmt_prepare
(
THD
*
thd
,
const
char
*
packet
,
uint
packet_length
)
void
mysql
d
_stmt_prepare
(
THD
*
thd
,
const
char
*
packet
,
uint
packet_length
)
{
Prepared_statement
*
stmt
;
bool
error
;
DBUG_ENTER
(
"mysql_stmt_prepare"
);
DBUG_ENTER
(
"mysql
d
_stmt_prepare"
);
DBUG_PRINT
(
"prep_query"
,
(
"%s"
,
packet
));
...
...
@@ -2423,7 +2423,7 @@ static void reset_stmt_params(Prepared_statement *stmt)
client, otherwise an error message is set in THD.
*/
void
mysql_stmt_execute
(
THD
*
thd
,
char
*
packet_arg
,
uint
packet_length
)
void
mysql
d
_stmt_execute
(
THD
*
thd
,
char
*
packet_arg
,
uint
packet_length
)
{
uchar
*
packet
=
(
uchar
*
)
packet_arg
;
// GCC 4.0.1 workaround
ulong
stmt_id
=
uint4korr
(
packet
);
...
...
@@ -2433,7 +2433,7 @@ void mysql_stmt_execute(THD *thd, char *packet_arg, uint packet_length)
uchar
*
packet_end
=
packet
+
packet_length
;
Prepared_statement
*
stmt
;
bool
open_cursor
;
DBUG_ENTER
(
"mysql_stmt_execute"
);
DBUG_ENTER
(
"mysql
d
_stmt_execute"
);
packet
+=
9
;
/* stmt_id + 5 bytes of flags */
...
...
@@ -2444,7 +2444,7 @@ void mysql_stmt_execute(THD *thd, char *packet_arg, uint packet_length)
{
char
llbuf
[
22
];
my_error
(
ER_UNKNOWN_STMT_HANDLER
,
MYF
(
0
),
sizeof
(
llbuf
),
llstr
(
stmt_id
,
llbuf
),
"mysql_stmt_execute"
);
llstr
(
stmt_id
,
llbuf
),
"mysql
d
_stmt_execute"
);
DBUG_VOID_RETURN
;
}
...
...
@@ -2525,7 +2525,7 @@ void mysql_sql_stmt_execute(THD *thd)
@param packet_length Length of packet
*/
void
mysql_stmt_fetch
(
THD
*
thd
,
char
*
packet
,
uint
packet_length
)
void
mysql
d
_stmt_fetch
(
THD
*
thd
,
char
*
packet
,
uint
packet_length
)
{
/* assume there is always place for 8-16 bytes */
ulong
stmt_id
=
uint4korr
(
packet
);
...
...
@@ -2533,7 +2533,7 @@ void mysql_stmt_fetch(THD *thd, char *packet, uint packet_length)
Prepared_statement
*
stmt
;
Statement
stmt_backup
;
Server_side_cursor
*
cursor
;
DBUG_ENTER
(
"mysql_stmt_fetch"
);
DBUG_ENTER
(
"mysql
d
_stmt_fetch"
);
/* First of all clear possible warnings from the previous command */
mysql_reset_thd_for_next_command
(
thd
);
...
...
@@ -2542,7 +2542,7 @@ void mysql_stmt_fetch(THD *thd, char *packet, uint packet_length)
{
char
llbuf
[
22
];
my_error
(
ER_UNKNOWN_STMT_HANDLER
,
MYF
(
0
),
sizeof
(
llbuf
),
llstr
(
stmt_id
,
llbuf
),
"mysql_stmt_fetch"
);
llstr
(
stmt_id
,
llbuf
),
"mysql
d
_stmt_fetch"
);
DBUG_VOID_RETURN
;
}
...
...
@@ -2583,9 +2583,9 @@ void mysql_stmt_fetch(THD *thd, char *packet, uint packet_length)
This function resets statement to the state it was right after prepare.
It can be used to:
- clear an error happened during mysql_stmt_send_long_data
- clear an error happened during mysql
d
_stmt_send_long_data
- cancel long data stream for all placeholders without
having to call mysql_stmt_execute.
having to call mysql
d
_stmt_execute.
- close an open cursor
Sends 'OK' packet in case of success (statement was reset)
or 'ERROR' packet (unrecoverable error/statement not found/etc).
...
...
@@ -2594,12 +2594,12 @@ void mysql_stmt_fetch(THD *thd, char *packet, uint packet_length)
@param packet Packet with stmt id
*/
void
mysql_stmt_reset
(
THD
*
thd
,
char
*
packet
)
void
mysql
d
_stmt_reset
(
THD
*
thd
,
char
*
packet
)
{
/* There is always space for 4 bytes in buffer */
ulong
stmt_id
=
uint4korr
(
packet
);
Prepared_statement
*
stmt
;
DBUG_ENTER
(
"mysql_stmt_reset"
);
DBUG_ENTER
(
"mysql
d
_stmt_reset"
);
/* First of all clear possible warnings from the previous command */
mysql_reset_thd_for_next_command
(
thd
);
...
...
@@ -2609,7 +2609,7 @@ void mysql_stmt_reset(THD *thd, char *packet)
{
char
llbuf
[
22
];
my_error
(
ER_UNKNOWN_STMT_HANDLER
,
MYF
(
0
),
sizeof
(
llbuf
),
llstr
(
stmt_id
,
llbuf
),
"mysql_stmt_reset"
);
llstr
(
stmt_id
,
llbuf
),
"mysql
d
_stmt_reset"
);
DBUG_VOID_RETURN
;
}
...
...
@@ -2617,7 +2617,7 @@ void mysql_stmt_reset(THD *thd, char *packet)
/*
Clear parameters from data which could be set by
mysql_stmt_send_long_data() call.
mysql
d
_stmt_send_long_data() call.
*/
reset_stmt_params
(
stmt
);
...
...
@@ -2638,12 +2638,12 @@ void mysql_stmt_reset(THD *thd, char *packet)
we don't send any reply to this command.
*/
void
mysql_stmt_close
(
THD
*
thd
,
char
*
packet
)
void
mysql
d
_stmt_close
(
THD
*
thd
,
char
*
packet
)
{
/* There is always space for 4 bytes in packet buffer */
ulong
stmt_id
=
uint4korr
(
packet
);
Prepared_statement
*
stmt
;
DBUG_ENTER
(
"mysql_stmt_close"
);
DBUG_ENTER
(
"mysql
d
_stmt_close"
);
thd
->
main_da
.
disable_status
();
...
...
@@ -2742,7 +2742,7 @@ void mysql_stmt_get_longdata(THD *thd, char *packet, ulong packet_length)
stmt
->
state
=
Query_arena
::
ERROR
;
stmt
->
last_errno
=
ER_WRONG_ARGUMENTS
;
sprintf
(
stmt
->
last_error
,
ER
(
ER_WRONG_ARGUMENTS
),
"mysql_stmt_send_long_data"
);
"mysql
d
_stmt_send_long_data"
);
DBUG_VOID_RETURN
;
}
#endif
...
...
@@ -3166,7 +3166,7 @@ Prepared_statement::set_parameters(String *expanded_query,
if
(
res
)
{
my_error
(
ER_WRONG_ARGUMENTS
,
MYF
(
0
),
is_sql_ps
?
"EXECUTE"
:
"mysql_stmt_execute"
);
is_sql_ps
?
"EXECUTE"
:
"mysql
d
_stmt_execute"
);
reset_stmt_params
(
this
);
}
return
res
;
...
...
@@ -3621,11 +3621,11 @@ error:
}
/** Common part of DEALLOCATE PREPARE and mysql_stmt_close. */
/** Common part of DEALLOCATE PREPARE and mysql
d
_stmt_close. */
void
Prepared_statement
::
deallocate
()
{
/* We account deallocate in the same manner as mysql_stmt_close */
/* We account deallocate in the same manner as mysql
d
_stmt_close */
status_var_increment
(
thd
->
status_var
.
com_stmt_close
);
/* Statement map calls delete stmt on erase */
thd
->
stmt_map
.
erase
(
this
);
...
...
storage/myisammrg/myrg_create.c
View file @
e66f7538
...
...
@@ -46,7 +46,7 @@ int myrg_create(const char *name, const char **table_names,
fn_same
(
buff
,
name
,
4
);
*
(
end
=
strend
(
buff
))
=
'\n'
;
end
[
1
]
=
0
;
if
(
my_write
(
file
,(
char
*
)
buff
,(
uint
)
(
end
-
buff
+
1
),
if
(
my_write
(
file
,(
u
char
*
)
buff
,(
uint
)
(
end
-
buff
+
1
),
MYF
(
MY_WME
|
MY_NABP
)))
goto
err
;
}
...
...
strings/ctype-uca.c
View file @
e66f7538
...
...
@@ -7992,6 +7992,7 @@ static my_bool create_tailoring(CHARSET_INFO *cs, void *(*alloc)(size_t))
static
my_bool
my_coll_init_uca
(
CHARSET_INFO
*
cs
,
void
*
(
*
alloc
)(
size_t
))
{
cs
->
pad_char
=
' '
;
cs
->
ctype
=
my_charset_utf8_unicode_ci
.
ctype
;
return
create_tailoring
(
cs
,
alloc
);
}
...
...
strings/ctype.c
View file @
e66f7538
...
...
@@ -328,7 +328,10 @@ my_string_repertoire(CHARSET_INFO *cs, const char *str, ulong length)
{
my_wc_t
wc
;
int
chlen
;
for
(;
(
chlen
=
cs
->
cset
->
mb_wc
(
cs
,
&
wc
,
str
,
strend
))
>
0
;
str
+=
chlen
)
for
(;
(
chlen
=
cs
->
cset
->
mb_wc
(
cs
,
&
wc
,
(
const
unsigned
char
*
)
str
,
(
const
unsigned
char
*
)
strend
))
>
0
;
str
+=
chlen
)
{
if
(
wc
>
0x7F
)
return
MY_REPERTOIRE_UNICODE30
;
...
...
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