mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge with 3.23 to get bugfixes for <=> NULL and --bind-address
This commit is contained in:
@ -72,6 +72,12 @@ if (@config_env > 0)
|
|||||||
$opt_config_env= join(" ", @config_env);
|
$opt_config_env= join(" ", @config_env);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (@config_env > 0)
|
||||||
|
{
|
||||||
|
chomp(@config_env);
|
||||||
|
$opt_config_env= join(" ", @config_env);
|
||||||
|
}
|
||||||
|
|
||||||
chomp($host=`hostname`);
|
chomp($host=`hostname`);
|
||||||
$full_host_name=$host;
|
$full_host_name=$host;
|
||||||
$connect_option= ($opt_tcpip ? "--host=$host" : "");
|
$connect_option= ($opt_tcpip ? "--host=$host" : "");
|
||||||
|
2
bdb/dist/aclocal/mutex.m4
vendored
2
bdb/dist/aclocal/mutex.m4
vendored
@ -403,5 +403,7 @@ UTS/cc-assembly) ADDITIONAL_OBJS="$ADDITIONAL_OBJS uts4.cc${o}"
|
|||||||
AC_DEFINE(HAVE_MUTEX_UTS_CC_ASSEMBLY);;
|
AC_DEFINE(HAVE_MUTEX_UTS_CC_ASSEMBLY);;
|
||||||
x86/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
|
x86/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
|
||||||
AC_DEFINE(HAVE_MUTEX_X86_GCC_ASSEMBLY);;
|
AC_DEFINE(HAVE_MUTEX_X86_GCC_ASSEMBLY);;
|
||||||
|
x86_64/gcc-assembly) ADDITIONAL_OBJS="mut_tas${o} $ADDITIONAL_OBJS"
|
||||||
|
AC_DEFINE(HAVE_MUTEX_X86_64_GCC_ASSEMBLY);;
|
||||||
esac
|
esac
|
||||||
])dnl
|
])dnl
|
||||||
|
@ -228,3 +228,20 @@ alter table t1 add key id (id);
|
|||||||
select * from t1, t2 where t1.id = t2.id;
|
select * from t1, t2 where t1.id = t2.id;
|
||||||
id id
|
id id
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
id id2
|
||||||
|
NULL 0
|
||||||
|
1 1
|
||||||
|
id id2
|
||||||
|
NULL 0
|
||||||
|
id id2
|
||||||
|
NULL 0
|
||||||
|
1 1
|
||||||
|
id id2
|
||||||
|
NULL 0
|
||||||
|
1 1
|
||||||
|
id id2
|
||||||
|
1 1
|
||||||
|
id id2
|
||||||
|
1 1
|
||||||
|
id id2
|
||||||
|
1 1
|
||||||
|
@ -166,6 +166,7 @@ select to_days("0000-00-00"),to_days(d),to_days(dt),to_days(t),to_days(c) from t
|
|||||||
select extract(MONTH FROM "0000-00-00"),extract(MONTH FROM d),extract(MONTH FROM dt),extract(MONTH FROM t),extract(MONTH FROM c) from t1;
|
select extract(MONTH FROM "0000-00-00"),extract(MONTH FROM d),extract(MONTH FROM dt),extract(MONTH FROM t),extract(MONTH FROM c) from t1;
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test problem with TIMESTAMP and BETWEEN
|
# Test problem with TIMESTAMP and BETWEEN
|
||||||
#
|
#
|
||||||
|
@ -135,3 +135,24 @@ select * from t1, t2 where t1.id = t2.id;
|
|||||||
alter table t1 add key id (id);
|
alter table t1 add key id (id);
|
||||||
select * from t1, t2 where t1.id = t2.id;
|
select * from t1, t2 where t1.id = t2.id;
|
||||||
drop table t1,t2;
|
drop table t1,t2;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check bug when doing <=> NULL on an indexed null field
|
||||||
|
#
|
||||||
|
|
||||||
|
create table t1 (
|
||||||
|
id integer,
|
||||||
|
id2 integer not null,
|
||||||
|
index (id),
|
||||||
|
index (id2)
|
||||||
|
);
|
||||||
|
insert into t1 values(null,null),(1,1);
|
||||||
|
select * from t1;
|
||||||
|
select * from t1 where id <=> null;
|
||||||
|
select * from t1 where id <=> null or id > 0;
|
||||||
|
select * from t1 where id is null or id > 0;
|
||||||
|
select * from t1 where id2 <=> null or id2 > 0;
|
||||||
|
select * from t1 where id2 is null or id2 > 0;
|
||||||
|
delete from t1 where id <=> NULL;
|
||||||
|
select * from t1;
|
||||||
|
drop table t1;
|
||||||
|
@ -4228,7 +4228,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
struct hostent *ent;
|
struct hostent *ent;
|
||||||
if (!argument || !argument[0])
|
if (argument || argument[0])
|
||||||
ent=gethostbyname(argument);
|
ent=gethostbyname(argument);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -4417,7 +4417,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initiates DEBUG - but no debugging here ! */
|
/* Initiates DEBUG - but no debugging here ! */
|
||||||
|
|
||||||
static void get_options(int argc,char **argv)
|
static void get_options(int argc,char **argv)
|
||||||
|
@ -936,8 +936,11 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
|
|||||||
if (!(res= value->val_str(&tmp)))
|
if (!(res= value->val_str(&tmp)))
|
||||||
DBUG_RETURN(&null_element);
|
DBUG_RETURN(&null_element);
|
||||||
|
|
||||||
// Check if this was a function. This should have be optimized away
|
/*
|
||||||
// in the sql_select.cc
|
TODO:
|
||||||
|
Check if this was a function. This should have be optimized away
|
||||||
|
in the sql_select.cc
|
||||||
|
*/
|
||||||
if (res != &tmp)
|
if (res != &tmp)
|
||||||
{
|
{
|
||||||
tmp.copy(*res); // Get own copy
|
tmp.copy(*res); // Get own copy
|
||||||
@ -1017,8 +1020,10 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
|
|||||||
type != Item_func::EQUAL_FUNC)
|
type != Item_func::EQUAL_FUNC)
|
||||||
DBUG_RETURN(0); // Can't optimize this
|
DBUG_RETURN(0); // Can't optimize this
|
||||||
|
|
||||||
/* We can't always use indexes when comparing a string index to a number */
|
/*
|
||||||
/* cmp_type() is checked to allow compare of dates to numbers */
|
We can't always use indexes when comparing a string index to a number
|
||||||
|
cmp_type() is checked to allow compare of dates to numbers
|
||||||
|
*/
|
||||||
if (field->result_type() == STRING_RESULT &&
|
if (field->result_type() == STRING_RESULT &&
|
||||||
value->result_type() != STRING_RESULT &&
|
value->result_type() != STRING_RESULT &&
|
||||||
field->cmp_type() != value->result_type())
|
field->cmp_type() != value->result_type())
|
||||||
@ -1026,6 +1031,7 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
|
|||||||
|
|
||||||
if (value->save_in_field(field))
|
if (value->save_in_field(field))
|
||||||
{
|
{
|
||||||
|
/* This happens when we try to insert a NULL field in a not null column */
|
||||||
// TODO; Check if we can we remove the following block.
|
// TODO; Check if we can we remove the following block.
|
||||||
if (type == Item_func::EQUAL_FUNC)
|
if (type == Item_func::EQUAL_FUNC)
|
||||||
{
|
{
|
||||||
@ -1037,7 +1043,7 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
|
|||||||
*str = 1;
|
*str = 1;
|
||||||
DBUG_RETURN(new SEL_ARG(field,str,str));
|
DBUG_RETURN(new SEL_ARG(field,str,str));
|
||||||
}
|
}
|
||||||
DBUG_RETURN(&null_element); // NULL is never true
|
DBUG_RETURN(&null_element); // cmp with NULL is never true
|
||||||
}
|
}
|
||||||
// Get local copy of key
|
// Get local copy of key
|
||||||
char *str= (char*) alloc_root(param->mem_root,
|
char *str= (char*) alloc_root(param->mem_root,
|
||||||
@ -1045,7 +1051,7 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
|
|||||||
if (!str)
|
if (!str)
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
if (maybe_null)
|
if (maybe_null)
|
||||||
*str=0; // Not NULL
|
*str= (char) field->is_real_null(); // Set to 1 if null
|
||||||
field->get_key_image(str+maybe_null,key_part->part_length);
|
field->get_key_image(str+maybe_null,key_part->part_length);
|
||||||
if (!(tree=new SEL_ARG(field,str,str)))
|
if (!(tree=new SEL_ARG(field,str,str)))
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
|
Reference in New Issue
Block a user