mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 19:06:14 +01:00 
			
		
		
		
	 0a5e4a0191
			
		
	
	
	0a5e4a0191
	
	
	
		
			
			Updated tests: cases with bugs or which cannot be run with the cursor-protocol were excluded with "--disable_cursor_protocol"/"--enable_cursor_protocol" Fix for v.10.5
		
			
				
	
	
		
			66 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			66 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| -- source include/have_des.inc
 | |
| 
 | |
| # This test can't be in func_encrypt.test, because it requires
 | |
| # --des-key-file to not be set.
 | |
| 
 | |
| #
 | |
| # Bug #11643: des_encrypt() causes server to die
 | |
| #
 | |
| select des_encrypt('hello');
 | |
| 
 | |
| # End of 4.1 tests
 | |
| 
 | |
| --echo #
 | |
| --echo # Bug #11643: des_encrypt() causes server to die
 | |
| --echo #
 | |
| 
 | |
| CREATE TABLE t1 (des VARBINARY(200) NOT NULL DEFAULT '') ENGINE=MyISAM;
 | |
| 
 | |
| INSERT INTO t1 VALUES ('1234'), ('12345'), ('123456'), ('1234567');
 | |
| 
 | |
| UPDATE t1 SET des=DES_ENCRYPT('1234');
 | |
| 
 | |
| SELECT LENGTH(des) FROM t1;
 | |
| SELECT DES_DECRYPT(des) FROM t1;
 | |
| 
 | |
| SELECT 
 | |
|  LENGTH(DES_ENCRYPT('1234')), 
 | |
|  LENGTH(DES_ENCRYPT('12345')), 
 | |
|  LENGTH(DES_ENCRYPT('123456')), 
 | |
|  LENGTH(DES_ENCRYPT('1234567'));
 | |
| SELECT 
 | |
|  DES_DECRYPT(DES_ENCRYPT('1234')), 
 | |
|  DES_DECRYPT(DES_ENCRYPT('12345')), 
 | |
|  DES_DECRYPT(DES_ENCRYPT('123456')), 
 | |
|  DES_DECRYPT(DES_ENCRYPT('1234567'));
 | |
| 
 | |
| DROP TABLE t1;
 | |
| 
 | |
| --Echo End of 5.0 tests
 | |
| 
 | |
| --echo #
 | |
| --echo # MDEV-23330 Server crash or ASAN negative-size-param in
 | |
| --echo # my_strnncollsp_binary / SORT_FIELD_ATTR::compare_packed_varstrings
 | |
| --echo #
 | |
| 
 | |
| CREATE TABLE t1 (a CHAR(240), b BIT(48));
 | |
| INSERT INTO t1 VALUES ('a',b'0001'),('b',b'0010'),('c',b'0011'),('d',b'0100'),('e',b'0001'),('f',b'0101'),('g',b'0110'),('h',b'0111'),('i',b'1000'),('j',b'1001');
 | |
| SELECT DES_DECRYPT(a, 'x'), HEX(BINARY b) FROM t1 GROUP BY 1, 2 WITH ROLLUP;
 | |
| DROP TABLE t1;
 | |
| 
 | |
| #
 | |
| # don't change the charset of a literal Item_string
 | |
| #
 | |
| 
 | |
| CREATE TABLE t1 (a INT);
 | |
| INSERT t1 VALUES (1),(2);
 | |
| # There is a problem with cursor-protocol and DES_DECRYPT(),
 | |
| # but DES_DECRYPT has been deprecated from MariaDB 10.10.0,
 | |
| # and will be removed in a future release. That's why this
 | |
| # case is excluded without bug
 | |
| --disable_cursor_protocol
 | |
| SELECT CHAR_LENGTH(a), DES_DECRYPT(a) FROM (SELECT _utf8 0xC2A2 AS a FROM t1) AS t2;
 | |
| --enable_cursor_protocol
 | |
| DROP TABLE t1;
 | |
| 
 | |
| --Echo End of 10.5 tests
 |