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
f8afbe6f
Commit
f8afbe6f
authored
Nov 29, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/home/jimw/my/mysql-4.1-clean
into mysql.com:/home/jimw/my/mysql-5.0-clean
parents
04d1ef90
f353bec5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
13 deletions
+59
-13
mysql-test/r/union.result
mysql-test/r/union.result
+26
-0
mysql-test/t/union.test
mysql-test/t/union.test
+18
-0
sql/item.cc
sql/item.cc
+5
-2
vio/viosslfactories.c
vio/viosslfactories.c
+10
-11
No files found.
mysql-test/r/union.result
View file @
f8afbe6f
...
@@ -1270,3 +1270,29 @@ id
...
@@ -1270,3 +1270,29 @@ id
5
5
99
99
drop table t1;
drop table t1;
create table t1 (f1 decimal(60,25), f2 decimal(60,25));
insert into t1 values (0.0,0.0);
select f1 from t1 union all select f2 from t1;
f1
0.0000000000000000000000000
0.0000000000000000000000000
select 'XXXXXXXXXXXXXXXXXXXX' as description, f1 from t1
union all
select 'YYYYYYYYYYYYYYYYYYYY' as description, f2 from t1;
description f1
XXXXXXXXXXXXXXXXXXXX 0.0000000000000000000000000
YYYYYYYYYYYYYYYYYYYY 0.0000000000000000000000000
drop table t1;
create table t1 (f1 decimal(60,24), f2 decimal(60,24));
insert into t1 values (0.0,0.0);
select f1 from t1 union all select f2 from t1;
f1
0.000000000000000000000000
0.000000000000000000000000
select 'XXXXXXXXXXXXXXXXXXXX' as description, f1 from t1
union all
select 'YYYYYYYYYYYYYYYYYYYY' as description, f2 from t1;
description f1
XXXXXXXXXXXXXXXXXXXX 0.000000000000000000000000
YYYYYYYYYYYYYYYYYYYY 0.000000000000000000000000
drop table t1;
mysql-test/t/union.test
View file @
f8afbe6f
...
@@ -753,6 +753,24 @@ create table t2 select a from t1 union select b from t1;
...
@@ -753,6 +753,24 @@ create table t2 select a from t1 union select b from t1;
show
columns
from
t2
;
show
columns
from
t2
;
drop
table
t2
,
t1
;
drop
table
t2
,
t1
;
#
# Bug #14216: UNION + DECIMAL wrong values in result
#
create
table
t1
(
f1
decimal
(
60
,
25
),
f2
decimal
(
60
,
25
));
insert
into
t1
values
(
0.0
,
0.0
);
select
f1
from
t1
union
all
select
f2
from
t1
;
select
'XXXXXXXXXXXXXXXXXXXX'
as
description
,
f1
from
t1
union
all
select
'YYYYYYYYYYYYYYYYYYYY'
as
description
,
f2
from
t1
;
drop
table
t1
;
create
table
t1
(
f1
decimal
(
60
,
24
),
f2
decimal
(
60
,
24
));
insert
into
t1
values
(
0.0
,
0.0
);
select
f1
from
t1
union
all
select
f2
from
t1
;
select
'XXXXXXXXXXXXXXXXXXXX'
as
description
,
f1
from
t1
union
all
select
'YYYYYYYYYYYYYYYYYYYY'
as
description
,
f2
from
t1
;
drop
table
t1
;
#
#
# Test that union with VARCHAR produces dynamic row tables
# Test that union with VARCHAR produces dynamic row tables
#
#
...
...
sql/item.cc
View file @
f8afbe6f
...
@@ -5812,8 +5812,11 @@ bool Item_type_holder::join_types(THD *thd, Item *item)
...
@@ -5812,8 +5812,11 @@ bool Item_type_holder::join_types(THD *thd, Item *item)
{
{
int
delta1
=
max_length_orig
-
decimals_orig
;
int
delta1
=
max_length_orig
-
decimals_orig
;
int
delta2
=
item
->
max_length
-
item
->
decimals
;
int
delta2
=
item
->
max_length
-
item
->
decimals
;
max_length
=
min
(
max
(
delta1
,
delta2
)
+
decimals
,
if
(
fld_type
==
MYSQL_TYPE_DECIMAL
)
(
fld_type
==
MYSQL_TYPE_FLOAT
)
?
FLT_DIG
+
6
:
DBL_DIG
+
7
);
max_length
=
max
(
delta1
,
delta2
)
+
decimals
;
else
max_length
=
min
(
max
(
delta1
,
delta2
)
+
decimals
,
(
fld_type
==
MYSQL_TYPE_FLOAT
)
?
FLT_DIG
+
6
:
DBL_DIG
+
7
);
}
}
else
else
max_length
=
(
fld_type
==
MYSQL_TYPE_FLOAT
)
?
FLT_DIG
+
6
:
DBL_DIG
+
7
;
max_length
=
(
fld_type
==
MYSQL_TYPE_FLOAT
)
?
FLT_DIG
+
6
:
DBL_DIG
+
7
;
...
...
vio/viosslfactories.c
View file @
f8afbe6f
...
@@ -191,9 +191,6 @@ void netware_ssl_cleanup()
...
@@ -191,9 +191,6 @@ void netware_ssl_cleanup()
/* NetWare SSL initialization */
/* NetWare SSL initialization */
static
void
netware_ssl_init
()
static
void
netware_ssl_init
()
{
{
/* initialize OpenSSL library */
SSL_library_init
();
/* cleanup OpenSSL library */
/* cleanup OpenSSL library */
NXVmRegisterExitHandler
(
netware_ssl_cleanup
,
NULL
);
NXVmRegisterExitHandler
(
netware_ssl_cleanup
,
NULL
);
}
}
...
@@ -228,16 +225,17 @@ new_VioSSLConnectorFd(const char* key_file,
...
@@ -228,16 +225,17 @@ new_VioSSLConnectorFd(const char* key_file,
ptr
->
ssl_method
=
0
;
ptr
->
ssl_method
=
0
;
/* FIXME: constants! */
/* FIXME: constants! */
#ifdef __NETWARE__
netware_ssl_init
();
#endif
if
(
!
ssl_algorithms_added
)
if
(
!
ssl_algorithms_added
)
{
{
DBUG_PRINT
(
"info"
,
(
"todo: OpenSSL_add_all_algorithms()"
));
DBUG_PRINT
(
"info"
,
(
"todo: OpenSSL_add_all_algorithms()"
));
ssl_algorithms_added
=
TRUE
;
ssl_algorithms_added
=
TRUE
;
SSL_library_init
();
OpenSSL_add_all_algorithms
();
OpenSSL_add_all_algorithms
();
}
}
#ifdef __NETWARE__
netware_ssl_init
();
#endif
if
(
!
ssl_error_strings_loaded
)
if
(
!
ssl_error_strings_loaded
)
{
{
DBUG_PRINT
(
"info"
,
(
"todo:SSL_load_error_strings()"
));
DBUG_PRINT
(
"info"
,
(
"todo:SSL_load_error_strings()"
));
...
@@ -319,17 +317,18 @@ new_VioSSLAcceptorFd(const char *key_file,
...
@@ -319,17 +317,18 @@ new_VioSSLAcceptorFd(const char *key_file,
/* FIXME: constants! */
/* FIXME: constants! */
ptr
->
session_id_context
=
ptr
;
ptr
->
session_id_context
=
ptr
;
#ifdef __NETWARE__
netware_ssl_init
();
#endif
if
(
!
ssl_algorithms_added
)
if
(
!
ssl_algorithms_added
)
{
{
DBUG_PRINT
(
"info"
,
(
"todo: OpenSSL_add_all_algorithms()"
));
DBUG_PRINT
(
"info"
,
(
"todo: OpenSSL_add_all_algorithms()"
));
ssl_algorithms_added
=
TRUE
;
ssl_algorithms_added
=
TRUE
;
SSL_library_init
();
OpenSSL_add_all_algorithms
();
OpenSSL_add_all_algorithms
();
}
}
#ifdef __NETWARE__
netware_ssl_init
();
#endif
if
(
!
ssl_error_strings_loaded
)
if
(
!
ssl_error_strings_loaded
)
{
{
DBUG_PRINT
(
"info"
,
(
"todo: SSL_load_error_strings()"
));
DBUG_PRINT
(
"info"
,
(
"todo: SSL_load_error_strings()"
));
...
...
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