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
43194fad
Commit
43194fad
authored
Sep 21, 2006
by
ramil/ram@mysql.com/myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/ram/work/mysql-4.1-maint
parents
fcf99e85
59671a1b
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
88 additions
and
22 deletions
+88
-22
client/mysql.cc
client/mysql.cc
+2
-2
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+12
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+19
-0
mysql-test/t/lowercase_fs_off.test
mysql-test/t/lowercase_fs_off.test
+1
-0
sql/mysqld.cc
sql/mysqld.cc
+2
-2
sql/sql_string.cc
sql/sql_string.cc
+6
-1
sql/stacktrace.c
sql/stacktrace.c
+40
-15
sql/stacktrace.h
sql/stacktrace.h
+6
-2
No files found.
client/mysql.cc
View file @
43194fad
...
...
@@ -2629,7 +2629,7 @@ com_connect(String *buffer, char *line)
bzero
(
buff
,
sizeof
(
buff
));
if
(
buffer
)
{
strm
ov
(
buff
,
line
);
strm
ake
(
buff
,
line
,
sizeof
(
buff
)
-
1
);
tmp
=
get_arg
(
buff
,
0
);
if
(
tmp
&&
*
tmp
)
{
...
...
@@ -2743,7 +2743,7 @@ com_use(String *buffer __attribute__((unused)), char *line)
char
*
tmp
,
buff
[
FN_REFLEN
+
1
];
bzero
(
buff
,
sizeof
(
buff
));
strm
ov
(
buff
,
line
);
strm
ake
(
buff
,
line
,
sizeof
(
buff
)
-
1
);
tmp
=
get_arg
(
buff
,
0
);
if
(
!
tmp
||
!*
tmp
)
{
...
...
mysql-test/r/func_time.result
View file @
43194fad
...
...
@@ -694,6 +694,18 @@ t1 CREATE TABLE `t1` (
`from_unixtime(1) + 0` double(23,6) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
SET NAMES latin1;
SET character_set_results = NULL;
SHOW VARIABLES LIKE 'character_set_results';
Variable_name Value
character_set_results
CREATE TABLE testBug8868 (field1 DATE, field2 VARCHAR(32) CHARACTER SET BINARY);
INSERT INTO testBug8868 VALUES ('2006-09-04', 'abcd');
SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868;
fmtddate field2
Sep-4 12:00AM abcd
DROP TABLE testBug8868;
SET NAMES DEFAULT;
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H)
union
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H);
...
...
mysql-test/t/func_time.test
View file @
43194fad
...
...
@@ -368,6 +368,25 @@ create table t1 select now() - now(), curtime() - curtime(),
show
create
table
t1
;
drop
table
t1
;
#
# 21913: DATE_FORMAT() Crashes mysql server if I use it through
# mysql-connector-j driver.
#
SET
NAMES
latin1
;
SET
character_set_results
=
NULL
;
SHOW
VARIABLES
LIKE
'character_set_results'
;
CREATE
TABLE
testBug8868
(
field1
DATE
,
field2
VARCHAR
(
32
)
CHARACTER
SET
BINARY
);
INSERT
INTO
testBug8868
VALUES
(
'2006-09-04'
,
'abcd'
);
SELECT
DATE_FORMAT
(
field1
,
'%b-%e %l:%i%p'
)
as
fmtddate
,
field2
FROM
testBug8868
;
DROP
TABLE
testBug8868
;
SET
NAMES
DEFAULT
;
#
# Bug #19844 time_format in Union truncates values
#
...
...
mysql-test/t/lowercase_fs_off.test
View file @
43194fad
...
...
@@ -3,6 +3,7 @@
# i.e. lower_case_filesystem=OFF
#
--
source
include
/
have_case_sensitive_file_system
.
inc
--
source
include
/
not_embedded
.
inc
connect
(
master
,
localhost
,
root
,,);
connection
master
;
...
...
sql/mysqld.cc
View file @
43194fad
...
...
@@ -6552,10 +6552,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
}
switch
(
method
-
1
)
{
case
0
:
method_conv
=
MI_STATS_METHOD_NULLS_EQUAL
;
method_conv
=
MI_STATS_METHOD_NULLS_
NOT_
EQUAL
;
break
;
case
1
:
method_conv
=
MI_STATS_METHOD_NULLS_
NOT_
EQUAL
;
method_conv
=
MI_STATS_METHOD_NULLS_EQUAL
;
break
;
case
2
:
method_conv
=
MI_STATS_METHOD_IGNORE_NULLS
;
...
...
sql/sql_string.cc
View file @
43194fad
...
...
@@ -248,6 +248,10 @@ bool String::copy(const char *str,uint32 arg_length, CHARSET_INFO *cs)
0 No conversion needed
1 Either character set conversion or adding leading zeros
(e.g. for UCS-2) must be done
NOTE
to_cs may be NULL for "no conversion" if the system variable
character_set_results is NULL.
*/
bool
String
::
needs_conversion
(
uint32
arg_length
,
...
...
@@ -256,7 +260,8 @@ bool String::needs_conversion(uint32 arg_length,
uint32
*
offset
)
{
*
offset
=
0
;
if
((
to_cs
==
&
my_charset_bin
)
||
if
(
!
to_cs
||
(
to_cs
==
&
my_charset_bin
)
||
(
to_cs
==
from_cs
)
||
my_charset_same
(
from_cs
,
to_cs
)
||
((
from_cs
==
&
my_charset_bin
)
&&
...
...
sql/stacktrace.c
View file @
43194fad
...
...
@@ -21,6 +21,7 @@
#ifdef HAVE_STACKTRACE
#include <unistd.h>
#include <strings.h>
#define PTR_SANE(p) ((p) && (char*)(p) >= heap_start && (char*)(p) <= heap_end)
...
...
@@ -44,7 +45,29 @@ void safe_print_str(const char* name, const char* val, int max_len)
}
#ifdef TARGET_OS_LINUX
#define SIGRETURN_FRAME_COUNT 2
#ifdef __i386__
#define SIGRETURN_FRAME_OFFSET 17
#endif
#ifdef __x86_64__
#define SIGRETURN_FRAME_OFFSET 23
#endif
static
my_bool
is_nptl
;
/* Check if we are using NPTL or LinuxThreads on Linux */
void
check_thread_lib
(
void
)
{
char
buf
[
5
];
#ifdef _CS_GNU_LIBPTHREAD_VERSION
confstr
(
_CS_GNU_LIBPTHREAD_VERSION
,
buf
,
sizeof
(
buf
));
is_nptl
=
!
strncasecmp
(
buf
,
"NPTL"
,
sizeof
(
buf
));
#else
is_nptl
=
0
;
#endif
}
#if defined(__alpha__) && defined(__GNUC__)
/*
...
...
@@ -90,7 +113,7 @@ inline uint32* find_prev_pc(uint32* pc, uchar** fp)
void
print_stacktrace
(
gptr
stack_bottom
,
ulong
thread_stack
)
{
uchar
**
fp
;
uint
frame_count
=
0
;
uint
frame_count
=
0
,
sigreturn_frame_count
;
#if defined(__alpha__) && defined(__GNUC__)
uint32
*
pc
;
#endif
...
...
@@ -100,28 +123,27 @@ void print_stacktrace(gptr stack_bottom, ulong thread_stack)
Attempting backtrace. You can use the following information to find out
\n
\
where mysqld died. If you see no messages after this, something went
\n
\
terribly wrong...
\n
"
);
#ifdef __i386__
#ifdef __i386__
__asm
__volatile__
(
"movl %%ebp,%0"
:
"=r"
(
fp
)
:
"r"
(
fp
));
if
(
!
fp
)
{
fprintf
(
stderr
,
"frame pointer (ebp) is NULL, did you compile with
\n
\
-fomit-frame-pointer? Aborting backtrace!
\n
"
);
return
;
}
#endif
#ifdef __x86_64__
__asm
__volatile__
(
"movq %%rbp,%0"
:
"=r"
(
fp
)
:
"r"
(
fp
));
#endif
#if defined(__alpha__) && defined(__GNUC__)
__asm
__volatile__
(
"mov $30,%0"
:
"=r"
(
fp
)
:
"r"
(
fp
));
#endif
if
(
!
fp
)
{
fprintf
(
stderr
,
"frame pointer
(fp)
is NULL, did you compile with
\n
\
fprintf
(
stderr
,
"frame pointer is NULL, did you compile with
\n
\
-fomit-frame-pointer? Aborting backtrace!
\n
"
);
return
;
}
#endif
/* __alpha__ */
if
(
!
stack_bottom
||
(
gptr
)
stack_bottom
>
(
gptr
)
&
fp
)
{
...
...
@@ -151,13 +173,16 @@ terribly wrong...\n");
:
"r"
(
pc
));
#endif
/* __alpha__ */
/* We are 1 frame above signal frame with NPTL and 2 frames above with LT */
sigreturn_frame_count
=
is_nptl
?
1
:
2
;
while
(
fp
<
(
uchar
**
)
stack_bottom
)
{
#if
def __i386__
#if
defined(__i386__) || defined(__x86_64__)
uchar
**
new_fp
=
(
uchar
**
)
*
fp
;
fprintf
(
stderr
,
"%p
\n
"
,
frame_count
==
SIGRETURN_FRAME_COUNT
?
*
(
fp
+
17
)
:
*
(
fp
+
1
));
#endif
/*
__386__
*/
fprintf
(
stderr
,
"%p
\n
"
,
frame_count
==
sigreturn_frame_count
?
*
(
fp
+
SIGRETURN_FRAME_OFFSET
)
:
*
(
fp
+
1
));
#endif
/*
defined(__386__) || defined(__x86_64__)
*/
#if defined(__alpha__) && defined(__GNUC__)
uchar
**
new_fp
=
find_prev_fp
(
pc
,
fp
);
...
...
sql/stacktrace.h
View file @
43194fad
...
...
@@ -19,16 +19,20 @@ extern "C" {
#endif
#ifdef TARGET_OS_LINUX
#if defined(HAVE_STACKTRACE) || (defined (__i386__) || (defined(__alpha__) && defined(__GNUC__)))
#if defined(HAVE_STACKTRACE) || (defined (__
x86_64__) || defined (__
i386__) || (defined(__alpha__) && defined(__GNUC__)))
#undef HAVE_STACKTRACE
#define HAVE_STACKTRACE
extern
char
*
__bss_start
;
extern
char
*
heap_start
;
#define init_stacktrace() { heap_start = (char*) &__bss_start; }
#define init_stacktrace() do { \
heap_start = (char*) &__bss_start; \
check_thread_lib(); \
} while(0);
void
print_stacktrace
(
gptr
stack_bottom
,
ulong
thread_stack
);
void
safe_print_str
(
const
char
*
name
,
const
char
*
val
,
int
max_len
);
void
check_thread_lib
(
void
);
#endif
/* (defined (__i386__) || (defined(__alpha__) && defined(__GNUC__))) */
#endif
/* TARGET_OS_LINUX */
...
...
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