mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Fixed bug with BINARY NULL
Docs/manual.texi: ChangeLog mysql-test/r/binary.result: Test of binary NULL mysql-test/t/binary.test: Test of binary NULL
This commit is contained in:
@@ -46929,6 +46929,8 @@ not yet 100% confident in this code.
|
|||||||
@appendixsubsec Changes in release 3.23.53
|
@appendixsubsec Changes in release 3.23.53
|
||||||
@itemize @bullet
|
@itemize @bullet
|
||||||
@item
|
@item
|
||||||
|
Fixed core dump bug when using the @code{BINARY} cast on a @code{NULL} value.
|
||||||
|
@item
|
||||||
Fixed bug in @code{ALTER TABLE} and @code{RENAME TABLE} when running with
|
Fixed bug in @code{ALTER TABLE} and @code{RENAME TABLE} when running with
|
||||||
@code{-O lower_case_table_names=1} (typically on windows) when giving the
|
@code{-O lower_case_table_names=1} (typically on windows) when giving the
|
||||||
table name in uppercase.
|
table name in uppercase.
|
||||||
|
@@ -31,3 +31,7 @@ hello hello
|
|||||||
a b
|
a b
|
||||||
a b
|
a b
|
||||||
hello hello
|
hello hello
|
||||||
|
b
|
||||||
|
b
|
||||||
|
NULL
|
||||||
|
b
|
||||||
|
@@ -31,3 +31,13 @@ select * from t1 where a="hello ";
|
|||||||
select * from t1 where b="hello ";
|
select * from t1 where b="hello ";
|
||||||
select * from t1 where b="hello";
|
select * from t1 where b="hello";
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Test of binary and NULL
|
||||||
|
#
|
||||||
|
create table t1 (b char(8));
|
||||||
|
insert into t1 values(NULL);
|
||||||
|
select b from t1 where binary b like '';
|
||||||
|
select b from t1 group by binary b like '';
|
||||||
|
select b from t1 having binary b like '';
|
||||||
|
drop table t1;
|
||||||
|
@@ -394,7 +394,12 @@ class Item_func_binary :public Item_str_func
|
|||||||
public:
|
public:
|
||||||
Item_func_binary(Item *a) :Item_str_func(a) {}
|
Item_func_binary(Item *a) :Item_str_func(a) {}
|
||||||
const char *func_name() const { return "binary"; }
|
const char *func_name() const { return "binary"; }
|
||||||
String *val_str(String *a) { return (args[0]->val_str(a)); }
|
String *val_str(String *a)
|
||||||
|
{
|
||||||
|
String *tmp=args[0]->val_str(a);
|
||||||
|
null_value=args[0]->null_value;
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
void fix_length_and_dec() { binary=1; max_length=args[0]->max_length; }
|
void fix_length_and_dec() { binary=1; max_length=args[0]->max_length; }
|
||||||
void print(String *str) { print_op(str); }
|
void print(String *str) { print_op(str); }
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user