summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-09-11 20:51:09 +0200
committerSergei Golubchik <serg@mariadb.org>2016-09-11 20:51:09 +0200
commit7ae555c1148f190f91d00499c2541fe7c2d4f555 (patch)
tree861c0054243efee45b7a4b72135f897afc8972ba /sql
parentb9631e310b7cadf8711eef643e432d7e816680b4 (diff)
parent754e7eff2872995e2b6e62f9da7448587a411c7b (diff)
downloadmariadb-git-7ae555c1148f190f91d00499c2541fe7c2d4f555.tar.gz
Merge branch 'mysql/5.5' into 5.5
80% reverted
Diffstat (limited to 'sql')
-rw-r--r--sql/item.cc5
-rw-r--r--sql/net_serv.cc6
-rw-r--r--sql/sql_select.cc1
3 files changed, 5 insertions, 7 deletions
diff --git a/sql/item.cc b/sql/item.cc
index abcf48fc270..3448b236640 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -5902,10 +5902,6 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table, bool fixed_length)
field= new Field_double((uchar*) 0, max_length, null_ptr, 0, Field::NONE,
name, decimals, 0, unsigned_flag);
break;
- case MYSQL_TYPE_NULL:
- field= new Field_null((uchar*) 0, max_length, Field::NONE,
- name, &my_charset_bin);
- break;
case MYSQL_TYPE_INT24:
field= new Field_medium((uchar*) 0, max_length, null_ptr, 0, Field::NONE,
name, 0, unsigned_flag);
@@ -5939,6 +5935,7 @@ Field *Item::tmp_table_field_from_field_type(TABLE *table, bool fixed_length)
DBUG_ASSERT(0);
/* If something goes awfully wrong, it's better to get a string than die */
case MYSQL_TYPE_STRING:
+ case MYSQL_TYPE_NULL:
if (fixed_length && !too_big_for_varchar())
{
field= new Field_string(max_length, maybe_null, name,
diff --git a/sql/net_serv.cc b/sql/net_serv.cc
index 4b78492c857..a280fcf4cf4 100644
--- a/sql/net_serv.cc
+++ b/sql/net_serv.cc
@@ -1,5 +1,5 @@
-/* Copyright (c) 2000, 2013, Oracle and/or its affiliates.
- Copyright (c) 2012, Monty Program Ab
+/* Copyright (c) 2000, 2016, Oracle and/or its affiliates.
+ Copyright (c) 2012, 2016, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -885,7 +885,7 @@ my_real_read(NET *net, size_t *complen)
my_progname,vio_errno(net->vio));
}
#ifndef MYSQL_SERVER
- if (vio_errno(net->vio) == SOCKET_EINTR)
+ if ((long)length < 0 && vio_errno(net->vio) == SOCKET_EINTR)
{
DBUG_PRINT("warning",("Interrupted read. Retrying..."));
continue;
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 121805dd0e2..8c994964d59 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -14833,6 +14833,7 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
case Item::VARBIN_ITEM:
case Item::CACHE_ITEM:
case Item::EXPR_CACHE_ITEM:
+ case Item::PARAM_ITEM:
if (make_copy_field)
{
DBUG_ASSERT(((Item_result_field*)item)->result_field);