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
5f099df3
Commit
5f099df3
authored
Sep 28, 2006
by
msvensson@neptunus.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.1-new-maint
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint
parents
648a9ae1
6042eebd
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
62 additions
and
7 deletions
+62
-7
client/mysql.cc
client/mysql.cc
+2
-2
include/mysql_com.h
include/mysql_com.h
+4
-4
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+12
-0
mysql-test/r/func_time.result
mysql-test/r/func_time.result
+12
-0
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+11
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+19
-0
sql/item_strfunc.cc
sql/item_strfunc.cc
+2
-1
No files found.
client/mysql.cc
View file @
5f099df3
...
@@ -2896,7 +2896,7 @@ com_connect(String *buffer, char *line)
...
@@ -2896,7 +2896,7 @@ com_connect(String *buffer, char *line)
bzero
(
buff
,
sizeof
(
buff
));
bzero
(
buff
,
sizeof
(
buff
));
if
(
buffer
)
if
(
buffer
)
{
{
strmake
(
buff
,
line
,
sizeof
(
buff
));
strmake
(
buff
,
line
,
sizeof
(
buff
)
-
1
);
tmp
=
get_arg
(
buff
,
0
);
tmp
=
get_arg
(
buff
,
0
);
if
(
tmp
&&
*
tmp
)
if
(
tmp
&&
*
tmp
)
{
{
...
@@ -3011,7 +3011,7 @@ com_use(String *buffer __attribute__((unused)), char *line)
...
@@ -3011,7 +3011,7 @@ com_use(String *buffer __attribute__((unused)), char *line)
int
select_db
;
int
select_db
;
bzero
(
buff
,
sizeof
(
buff
));
bzero
(
buff
,
sizeof
(
buff
));
strm
ov
(
buff
,
line
);
strm
ake
(
buff
,
line
,
sizeof
(
buff
)
-
1
);
tmp
=
get_arg
(
buff
,
0
);
tmp
=
get_arg
(
buff
,
0
);
if
(
!
tmp
||
!*
tmp
)
if
(
!
tmp
||
!*
tmp
)
{
{
...
...
include/mysql_com.h
View file @
5f099df3
...
@@ -141,11 +141,11 @@ enum enum_server_command
...
@@ -141,11 +141,11 @@ enum enum_server_command
#define CLIENT_TRANSACTIONS 8192
/* Client knows about transactions */
#define CLIENT_TRANSACTIONS 8192
/* Client knows about transactions */
#define CLIENT_RESERVED 16384
/* Old flag for 4.1 protocol */
#define CLIENT_RESERVED 16384
/* Old flag for 4.1 protocol */
#define CLIENT_SECURE_CONNECTION 32768
/* New 4.1 authentication */
#define CLIENT_SECURE_CONNECTION 32768
/* New 4.1 authentication */
#define CLIENT_MULTI_STATEMENTS (
((ulong) 1) << 16)
/* Enable/disable multi-stmt support */
#define CLIENT_MULTI_STATEMENTS (
1UL << 16)
/* Enable/disable multi-stmt support */
#define CLIENT_MULTI_RESULTS (
((ulong) 1) << 17)
/* Enable/disable multi-results */
#define CLIENT_MULTI_RESULTS (
1UL << 17)
/* Enable/disable multi-results */
#define CLIENT_SSL_VERIFY_SERVER_CERT
(((ulong) 1)
<< 30)
#define CLIENT_SSL_VERIFY_SERVER_CERT
(1UL
<< 30)
#define CLIENT_REMEMBER_OPTIONS
(((ulong) 1)
<< 31)
#define CLIENT_REMEMBER_OPTIONS
(1UL
<< 31)
#define SERVER_STATUS_IN_TRANS 1
/* Transaction has started */
#define SERVER_STATUS_IN_TRANS 1
/* Transaction has started */
#define SERVER_STATUS_AUTOCOMMIT 2
/* Server in auto_commit mode */
#define SERVER_STATUS_AUTOCOMMIT 2
/* Server in auto_commit mode */
...
...
mysql-test/r/ctype_utf8.result
View file @
5f099df3
...
@@ -1353,6 +1353,18 @@ database()
...
@@ -1353,6 +1353,18 @@ database()
имя_базы_в_кодировке_утф8_длиной_больше_чем_45
имя_базы_в_кодировке_утф8_длиной_больше_чем_45
drop database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
drop database имя_базы_в_кодировке_утф8_длиной_больше_чем_45;
use test;
use test;
create table t1(a char(10)) default charset utf8;
insert into t1 values ('123'), ('456');
explain
select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE Y ALL NULL NULL NULL NULL 2 Using temporary; Using filesort
1 SIMPLE Z ALL NULL NULL NULL NULL 2 Using where
select substr(Z.a,-1), Z.a from t1 as Y join t1 as Z on Y.a=Z.a order by 1;
substr(Z.a,-1) a
3 123
6 456
drop table t1;
CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8;
CREATE TABLE t1(id varchar(20) NOT NULL) DEFAULT CHARSET=utf8;
INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa');
INSERT INTO t1 VALUES ('xxx'), ('aa'), ('yyy'), ('aa');
SELECT id FROM t1;
SELECT id FROM t1;
...
...
mysql-test/r/func_time.result
View file @
5f099df3
...
@@ -890,6 +890,18 @@ t1 CREATE TABLE `t1` (
...
@@ -890,6 +890,18 @@ t1 CREATE TABLE `t1` (
`from_unixtime(1) + 0` double(23,6) DEFAULT NULL
`from_unixtime(1) + 0` double(23,6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
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)
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H)
union
union
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H);
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H);
...
...
mysql-test/t/ctype_utf8.test
View file @
5f099df3
...
@@ -1086,6 +1086,17 @@ select database();
...
@@ -1086,6 +1086,17 @@ select database();
drop
database
имя_базы_в_кодировке_утф8_длиной_больше_чем_45
;
drop
database
имя_базы_в_кодировке_утф8_длиной_больше_чем_45
;
use
test
;
use
test
;
#
# Bug #20204: "order by" changes the results returned
#
create
table
t1
(
a
char
(
10
))
default
charset
utf8
;
insert
into
t1
values
(
'123'
),
(
'456'
);
explain
select
substr
(
Z
.
a
,
-
1
),
Z
.
a
from
t1
as
Y
join
t1
as
Z
on
Y
.
a
=
Z
.
a
order
by
1
;
select
substr
(
Z
.
a
,
-
1
),
Z
.
a
from
t1
as
Y
join
t1
as
Z
on
Y
.
a
=
Z
.
a
order
by
1
;
drop
table
t1
;
# End of 4.1 tests
# End of 4.1 tests
#
#
...
...
mysql-test/t/func_time.test
View file @
5f099df3
...
@@ -446,6 +446,25 @@ create table t1 select now() - now(), curtime() - curtime(),
...
@@ -446,6 +446,25 @@ create table t1 select now() - now(), curtime() - curtime(),
show
create
table
t1
;
show
create
table
t1
;
drop
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
# Bug #19844 time_format in Union truncates values
#
#
...
...
sql/item_strfunc.cc
View file @
5f099df3
...
@@ -1149,12 +1149,13 @@ void Item_func_substr::fix_length_and_dec()
...
@@ -1149,12 +1149,13 @@ void Item_func_substr::fix_length_and_dec()
}
}
if
(
arg_count
==
3
&&
args
[
2
]
->
const_item
())
if
(
arg_count
==
3
&&
args
[
2
]
->
const_item
())
{
{
int32
length
=
(
int32
)
args
[
2
]
->
val_int
()
*
collation
.
collation
->
mbmaxlen
;
int32
length
=
(
int32
)
args
[
2
]
->
val_int
();
if
(
length
<=
0
)
if
(
length
<=
0
)
max_length
=
0
;
/* purecov: inspected */
max_length
=
0
;
/* purecov: inspected */
else
else
set_if_smaller
(
max_length
,(
uint
)
length
);
set_if_smaller
(
max_length
,(
uint
)
length
);
}
}
max_length
*=
collation
.
collation
->
mbmaxlen
;
}
}
...
...
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