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
49e71525
Commit
49e71525
authored
Oct 02, 2010
by
Alexey Kopytov
Browse files
Options
Browse Files
Download
Plain Diff
Manual merge from mysql-5.1-bugteam into mysql-5.5-bugteam.
conflicts: conflict dbug/dbug.c conflict sql/sql_load.cc
parents
16076e6a
e1e83816
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
60 additions
and
11 deletions
+60
-11
dbug/dbug.c
dbug/dbug.c
+3
-2
mysql-test/r/partition_error.result
mysql-test/r/partition_error.result
+10
-0
mysql-test/r/variables_debug.result
mysql-test/r/variables_debug.result
+13
-0
mysql-test/t/partition_error.test
mysql-test/t/partition_error.test
+14
-0
mysql-test/t/variables_debug.test
mysql-test/t/variables_debug.test
+13
-0
sql/item_timefunc.cc
sql/item_timefunc.cc
+2
-2
sql/item_timefunc.h
sql/item_timefunc.h
+0
-1
sql/sql_load.cc
sql/sql_load.cc
+5
-6
No files found.
dbug/dbug.c
View file @
49e71525
...
@@ -496,6 +496,7 @@ int DbugParse(CODE_STATE *cs, const char *control)
...
@@ -496,6 +496,7 @@ int DbugParse(CODE_STATE *cs, const char *control)
rel
=
control
[
0
]
==
'+'
||
control
[
0
]
==
'-'
;
rel
=
control
[
0
]
==
'+'
||
control
[
0
]
==
'-'
;
if
((
!
rel
||
(
!
stack
->
out_file
&&
!
stack
->
next
)))
if
((
!
rel
||
(
!
stack
->
out_file
&&
!
stack
->
next
)))
{
{
/* Free memory associated with the state before resetting its members */
FreeState
(
cs
,
stack
,
0
);
FreeState
(
cs
,
stack
,
0
);
stack
->
flags
=
0
;
stack
->
flags
=
0
;
stack
->
delay
=
0
;
stack
->
delay
=
0
;
...
@@ -1608,7 +1609,7 @@ static void PushState(CODE_STATE *cs)
...
@@ -1608,7 +1609,7 @@ static void PushState(CODE_STATE *cs)
struct
settings
*
new_malloc
;
struct
settings
*
new_malloc
;
new_malloc
=
(
struct
settings
*
)
DbugMalloc
(
sizeof
(
struct
settings
));
new_malloc
=
(
struct
settings
*
)
DbugMalloc
(
sizeof
(
struct
settings
));
bzero
(
new_malloc
,
sizeof
(
*
new_malloc
));
bzero
(
new_malloc
,
sizeof
(
struct
settings
));
new_malloc
->
next
=
cs
->
stack
;
new_malloc
->
next
=
cs
->
stack
;
cs
->
stack
=
new_malloc
;
cs
->
stack
=
new_malloc
;
}
}
...
@@ -2088,7 +2089,7 @@ static FILE *OpenProfile(CODE_STATE *cs, const char *name)
...
@@ -2088,7 +2089,7 @@ static FILE *OpenProfile(CODE_STATE *cs, const char *name)
static
void
DBUGCloseFile
(
CODE_STATE
*
cs
,
FILE
*
fp
)
static
void
DBUGCloseFile
(
CODE_STATE
*
cs
,
FILE
*
fp
)
{
{
if
(
fp
&&
fp
!=
stderr
&&
fp
!=
stdout
&&
fclose
(
fp
)
==
EOF
)
if
(
fp
!=
NULL
&&
fp
!=
stderr
&&
fp
!=
stdout
&&
fclose
(
fp
)
==
EOF
)
{
{
pthread_mutex_lock
(
&
THR_LOCK_dbug
);
pthread_mutex_lock
(
&
THR_LOCK_dbug
);
(
void
)
fprintf
(
cs
->
stack
->
out_file
,
ERR_CLOSE
,
cs
->
process
);
(
void
)
fprintf
(
cs
->
stack
->
out_file
,
ERR_CLOSE
,
cs
->
process
);
...
...
mysql-test/r/partition_error.result
View file @
49e71525
...
@@ -1196,4 +1196,14 @@ PARTITION p VALUES LESS THAN (1219089600),
...
@@ -1196,4 +1196,14 @@ PARTITION p VALUES LESS THAN (1219089600),
PARTITION pmax VALUES LESS THAN MAXVALUE);
PARTITION pmax VALUES LESS THAN MAXVALUE);
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
DROP TABLE old;
DROP TABLE old;
#
# Bug #56709: Memory leaks at running the 5.1 test suite
#
CREATE TABLE t1 (a TIMESTAMP NOT NULL PRIMARY KEY);
ALTER TABLE t1
PARTITION BY RANGE (EXTRACT(DAY FROM a)) (
PARTITION p VALUES LESS THAN (18),
PARTITION pmax VALUES LESS THAN MAXVALUE);
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
DROP TABLE t1;
End of 5.1 tests
End of 5.1 tests
mysql-test/r/variables_debug.result
View file @
49e71525
...
@@ -31,6 +31,19 @@ SELECT @@global.debug;
...
@@ -31,6 +31,19 @@ SELECT @@global.debug;
@@global.debug
@@global.debug
SET GLOBAL debug=@old_debug;
SET GLOBAL debug=@old_debug;
#
# Bug #56709: Memory leaks at running the 5.1 test suite
#
SET @old_local_debug = @@debug;
SET @@debug='d,foo';
SELECT @@debug;
@@debug
d,foo
SET @@debug='';
SELECT @@debug;
@@debug
SET @@debug = @old_local_debug;
End of 5.1 tests
End of 5.1 tests
#
#
# Bug#46165 server crash in dbug
# Bug#46165 server crash in dbug
...
...
mysql-test/t/partition_error.test
View file @
49e71525
...
@@ -1381,4 +1381,18 @@ PARTITION pmax VALUES LESS THAN MAXVALUE);
...
@@ -1381,4 +1381,18 @@ PARTITION pmax VALUES LESS THAN MAXVALUE);
DROP
TABLE
old
;
DROP
TABLE
old
;
--
echo
#
--
echo
# Bug #56709: Memory leaks at running the 5.1 test suite
--
echo
#
CREATE
TABLE
t1
(
a
TIMESTAMP
NOT
NULL
PRIMARY
KEY
);
--
error
ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
ALTER
TABLE
t1
PARTITION
BY
RANGE
(
EXTRACT
(
DAY
FROM
a
))
(
PARTITION
p
VALUES
LESS
THAN
(
18
),
PARTITION
pmax
VALUES
LESS
THAN
MAXVALUE
);
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
mysql-test/t/variables_debug.test
View file @
49e71525
...
@@ -35,6 +35,19 @@ SELECT @@global.debug;
...
@@ -35,6 +35,19 @@ SELECT @@global.debug;
SET
GLOBAL
debug
=@
old_debug
;
SET
GLOBAL
debug
=@
old_debug
;
--
echo
#
--
echo
# Bug #56709: Memory leaks at running the 5.1 test suite
--
echo
#
SET
@
old_local_debug
=
@@
debug
;
SET
@@
debug
=
'd,foo'
;
SELECT
@@
debug
;
SET
@@
debug
=
''
;
SELECT
@@
debug
;
SET
@@
debug
=
@
old_local_debug
;
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
...
...
sql/item_timefunc.cc
View file @
49e71525
...
@@ -2338,8 +2338,6 @@ void Item_extract::print(String *str, enum_query_type query_type)
...
@@ -2338,8 +2338,6 @@ void Item_extract::print(String *str, enum_query_type query_type)
void
Item_extract
::
fix_length_and_dec
()
void
Item_extract
::
fix_length_and_dec
()
{
{
value
.
alloc
(
32
);
// alloc buffer
maybe_null
=
1
;
// If wrong date
maybe_null
=
1
;
// If wrong date
switch
(
int_type
)
{
switch
(
int_type
)
{
case
INTERVAL_YEAR
:
max_length
=
4
;
date_value
=
1
;
break
;
case
INTERVAL_YEAR
:
max_length
=
4
;
date_value
=
1
;
break
;
...
@@ -2382,6 +2380,8 @@ longlong Item_extract::val_int()
...
@@ -2382,6 +2380,8 @@ longlong Item_extract::val_int()
}
}
else
else
{
{
char
buf
[
40
];
String
value
(
buf
,
sizeof
(
buf
),
&
my_charset_bin
);;
String
*
res
=
args
[
0
]
->
val_str
(
&
value
);
String
*
res
=
args
[
0
]
->
val_str
(
&
value
);
if
(
!
res
||
if
(
!
res
||
str_to_time_with_warn
(
res
->
charset
(),
res
->
ptr
(),
res
->
length
(),
str_to_time_with_warn
(
res
->
charset
(),
res
->
ptr
(),
res
->
length
(),
...
...
sql/item_timefunc.h
View file @
49e71525
...
@@ -733,7 +733,6 @@ class Item_date_add_interval :public Item_date_func
...
@@ -733,7 +733,6 @@ class Item_date_add_interval :public Item_date_func
class
Item_extract
:
public
Item_int_func
class
Item_extract
:
public
Item_int_func
{
{
String
value
;
bool
date_value
;
bool
date_value
;
public:
public:
const
interval_type
int_type
;
// keep it public
const
interval_type
int_type
;
// keep it public
...
...
sql/sql_load.cc
View file @
49e71525
...
@@ -1345,6 +1345,7 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
...
@@ -1345,6 +1345,7 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
MYF
(
MY_WME
)))
MYF
(
MY_WME
)))
{
{
my_free
(
buffer
);
/* purecov: inspected */
my_free
(
buffer
);
/* purecov: inspected */
buffer
=
NULL
;
error
=
1
;
error
=
1
;
}
}
else
else
...
@@ -1371,13 +1372,11 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
...
@@ -1371,13 +1372,11 @@ READ_INFO::READ_INFO(File file_par, uint tot_length, CHARSET_INFO *cs,
READ_INFO
::~
READ_INFO
()
READ_INFO
::~
READ_INFO
()
{
{
if
(
!
error
)
if
(
!
error
&&
need_end_io_cache
)
{
if
(
need_end_io_cache
)
::
end_io_cache
(
&
cache
);
::
end_io_cache
(
&
cache
);
if
(
buffer
!=
NULL
)
my_free
(
buffer
);
my_free
(
buffer
);
error
=
1
;
}
List_iterator
<
XML_TAG
>
xmlit
(
taglist
);
List_iterator
<
XML_TAG
>
xmlit
(
taglist
);
XML_TAG
*
t
;
XML_TAG
*
t
;
while
((
t
=
xmlit
++
))
while
((
t
=
xmlit
++
))
...
...
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