mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-30 04:26:45 +03:00 
			
		
		
		
	Old code in create_tmp_table(), that created an extra one-byte field (recinfo) before every NULL-able grouping field (Field) in the tmp table, did not actually work. Because the matching code in end_update(), that was supposed to update this byte, was using a wrong offset, updating the first byte of the Field, not a byte before it. Normally this wasn't an issue, because the Field value (written later in end_update) was overwriting this byte anyway. But in this bug the Field was Field_null, with zero length, so end_update() was overwriting the first byte of the following field. And the following field was not-nullable constant, which was stored only once in create_tmp_table and never updated later. Fixed by removing the code that didn't do any useful work anyway.
		
			
				
	
	
		
			8 lines
		
	
	
		
			288 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			8 lines
		
	
	
		
			288 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| #
 | |
| # MDEV-5461 Assertion `length <= column->length' fails in write_block_record with functions in select list, GROUP BY, ORDER BY
 | |
| #
 | |
| create table t1 (a int);
 | |
| insert into t1 values (1),(2);
 | |
| select max('foo') from t1 group by values(a), extractvalue('bar','qux') order by "v";
 | |
| drop table t1;
 |