mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
MDEV-5783 Assertion `0' failed in make_sortkey(SORTPARAM*, uchar*, uchar*) on ORDER BY HEX( UNCOMPRESSED_LENGTH( pk ) )
This commit is contained in:
parent
2eb920b262
commit
63d0918807
3 changed files with 42 additions and 1 deletions
|
@ -127,3 +127,23 @@ NULL 825307441
|
|||
EXPLAIN EXTENDED SELECT * FROM (SELECT UNCOMPRESSED_LENGTH(c1) FROM t1) AS s;
|
||||
DROP TABLE t1;
|
||||
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;
|
||||
--enable_result_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:
|
||||
Item_func_uncompressed_length(Item *a):Item_int_func(a){}
|
||||
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();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue