mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-5783 Assertion `0' failed in make_sortkey(SORTPARAM*, uchar*, uchar*) on ORDER BY HEX( UNCOMPRESSED_LENGTH( pk ) )
This commit is contained in:
@ -127,3 +127,23 @@ NULL 825307441
|
|||||||
EXPLAIN EXTENDED SELECT * FROM (SELECT UNCOMPRESSED_LENGTH(c1) FROM t1) AS s;
|
EXPLAIN EXTENDED SELECT * FROM (SELECT UNCOMPRESSED_LENGTH(c1) FROM t1) AS s;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
End of 5.0 tests
|
End of 5.0 tests
|
||||||
|
#
|
||||||
|
# Start of 5.3 tests
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# MDEV-5783 Assertion `0' failed in make_sortkey(SORTPARAM*, uchar*, uchar*) on ORDER BY HEX(UNCOMPRESSED_LENGTH(pk))
|
||||||
|
#
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY);
|
||||||
|
INSERT INTO t1 VALUES (1),(2);
|
||||||
|
SELECT UNCOMPRESSED_LENGTH(pk) FROM t1;
|
||||||
|
UNCOMPRESSED_LENGTH(pk)
|
||||||
|
NULL
|
||||||
|
NULL
|
||||||
|
Warnings:
|
||||||
|
Error 1259 ZLIB: Input data corrupted
|
||||||
|
Error 1259 ZLIB: Input data corrupted
|
||||||
|
SELECT * FROM t1 ORDER BY HEX(UNCOMPRESSED_LENGTH(pk));
|
||||||
|
DROP TABLE t1;
|
||||||
|
#
|
||||||
|
# End of 5.3 tests
|
||||||
|
#
|
||||||
|
@ -115,3 +115,24 @@ DROP TABLE t1;
|
|||||||
set @@global.max_allowed_packet=default;
|
set @@global.max_allowed_packet=default;
|
||||||
--enable_result_log
|
--enable_result_log
|
||||||
--enable_query_log
|
--enable_query_log
|
||||||
|
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Start of 5.3 tests
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-5783 Assertion `0' failed in make_sortkey(SORTPARAM*, uchar*, uchar*) on ORDER BY HEX(UNCOMPRESSED_LENGTH(pk))
|
||||||
|
--echo #
|
||||||
|
CREATE TABLE t1 (pk INT PRIMARY KEY);
|
||||||
|
INSERT INTO t1 VALUES (1),(2);
|
||||||
|
SELECT UNCOMPRESSED_LENGTH(pk) FROM t1;
|
||||||
|
# ORDER is not strict, so disable results
|
||||||
|
--disable_result_log
|
||||||
|
SELECT * FROM t1 ORDER BY HEX(UNCOMPRESSED_LENGTH(pk));
|
||||||
|
--enable_result_log
|
||||||
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # End of 5.3 tests
|
||||||
|
--echo #
|
||||||
|
@ -822,7 +822,7 @@ class Item_func_uncompressed_length : public Item_int_func
|
|||||||
public:
|
public:
|
||||||
Item_func_uncompressed_length(Item *a):Item_int_func(a){}
|
Item_func_uncompressed_length(Item *a):Item_int_func(a){}
|
||||||
const char *func_name() const{return "uncompressed_length";}
|
const char *func_name() const{return "uncompressed_length";}
|
||||||
void fix_length_and_dec() { max_length=10; }
|
void fix_length_and_dec() { max_length=10; maybe_null= true; }
|
||||||
longlong val_int();
|
longlong val_int();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user