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
a9761016
Commit
a9761016
authored
Nov 24, 2002
by
monty@mashka.mysql.fi
Browse files
Options
Browse Files
Download
Plain Diff
merge with 3.23 to get bugfixes for <=> NULL and --bind-address
parents
dfb60ca0
4575594e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
60 additions
and
8 deletions
+60
-8
Build-tools/Do-compile
Build-tools/Do-compile
+6
-0
bdb/dist/aclocal/mutex.m4
bdb/dist/aclocal/mutex.m4
+2
-0
mysql-test/r/null_key.result
mysql-test/r/null_key.result
+17
-0
mysql-test/t/func_time.test
mysql-test/t/func_time.test
+1
-0
mysql-test/t/null_key.test
mysql-test/t/null_key.test
+21
-0
sql/mysqld.cc
sql/mysqld.cc
+1
-2
sql/opt_range.cc
sql/opt_range.cc
+12
-6
No files found.
Build-tools/Do-compile
View file @
a9761016
...
@@ -72,6 +72,12 @@ if (@config_env > 0)
...
@@ -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
"
:
"");
...
...
bdb/dist/aclocal/mutex.m4
View file @
a9761016
...
@@ -403,5 +403,7 @@ UTS/cc-assembly) ADDITIONAL_OBJS="$ADDITIONAL_OBJS uts4.cc${o}"
...
@@ -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
mysql-test/r/null_key.result
View file @
a9761016
...
@@ -228,3 +228,20 @@ alter table t1 add key id (id);
...
@@ -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
mysql-test/t/func_time.test
View file @
a9761016
...
@@ -166,6 +166,7 @@ select to_days("0000-00-00"),to_days(d),to_days(dt),to_days(t),to_days(c) from t
...
@@ -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
#
#
...
...
mysql-test/t/null_key.test
View file @
a9761016
...
@@ -135,3 +135,24 @@ select * from t1, t2 where t1.id = t2.id;
...
@@ -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
;
sql/mysqld.cc
View file @
a9761016
...
@@ -4228,7 +4228,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -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)),
...
@@ -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
)
...
...
sql/opt_range.cc
View file @
a9761016
...
@@ -936,8 +936,11 @@ get_mm_leaf(PARAM *param, Field *field, KEY_PART *key_part,
...
@@ -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,
...
@@ -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,
...
@@ -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,
...
@@ -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,
...
@@ -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
);
...
...
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