Commit d9d1337e authored by unknown's avatar unknown
Browse files

Merge mysql.com:/home/jimw/my/mysql-4.1-clean

into  mysql.com:/home/jimw/my/mysql-5.0-clean


mysql-test/r/union.result:
  Auto merged
sql/item.cc:
  Auto merged
vio/viosslfactories.c:
  Auto merged
mysql-test/t/union.test:
  Resolve conflict
parents e77da4fc a171aa69
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -1270,3 +1270,29 @@ id
5
99
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;
+18 −0
Original line number Diff line number Diff line
@@ -753,6 +753,24 @@ create table t2 select a from t1 union select b from t1;
show columns from t2;
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
#
+5 −2
Original line number Diff line number Diff line
@@ -5812,6 +5812,9 @@ bool Item_type_holder::join_types(THD *thd, Item *item)
    {
      int delta1= max_length_orig - decimals_orig;
      int delta2= item->max_length - item->decimals;
      if (fld_type == MYSQL_TYPE_DECIMAL)
        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);
    }
+10 −11
Original line number Diff line number Diff line
@@ -191,9 +191,6 @@ void netware_ssl_cleanup()
/* NetWare SSL initialization */
static void netware_ssl_init()
{
  /* initialize OpenSSL library */
  SSL_library_init();

  /* cleanup OpenSSL library */
  NXVmRegisterExitHandler(netware_ssl_cleanup, NULL);
}
@@ -228,16 +225,17 @@ new_VioSSLConnectorFd(const char* key_file,
  ptr->ssl_method=  0;
  /* FIXME: constants! */

#ifdef __NETWARE__
  netware_ssl_init();
#endif

  if (!ssl_algorithms_added)
  {
    DBUG_PRINT("info", ("todo: OpenSSL_add_all_algorithms()"));
    ssl_algorithms_added = TRUE;
    SSL_library_init();
    OpenSSL_add_all_algorithms();
  }
#ifdef __NETWARE__
  netware_ssl_init();
#endif

  if (!ssl_error_strings_loaded)
  {
    DBUG_PRINT("info", ("todo:SSL_load_error_strings()"));
@@ -319,17 +317,18 @@ new_VioSSLAcceptorFd(const char *key_file,
  /* FIXME: constants! */
  ptr->session_id_context= ptr;

#ifdef __NETWARE__
  netware_ssl_init();
#endif

  if (!ssl_algorithms_added)
  {
    DBUG_PRINT("info", ("todo: OpenSSL_add_all_algorithms()"));
    ssl_algorithms_added = TRUE;
    SSL_library_init();
    OpenSSL_add_all_algorithms();

  }
#ifdef __NETWARE__
  netware_ssl_init();
#endif

  if (!ssl_error_strings_loaded)
  {
    DBUG_PRINT("info", ("todo: SSL_load_error_strings()"));