[MDEV-9018] Out of memory Issue with Index Merge Created: 2015-10-27  Updated: 2016-04-22  Resolved: 2016-04-22

Status: Closed
Project: MariaDB Server
Component/s: OTHER
Affects Version/s: 10.0
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Jong Tak Kim Assignee: Jan Lindström (Inactive)
Resolution: Not a Bug Votes: 0
Labels: None
Environment:

MariaDB 10.0.12



 Description   

I wrote a InnoDB wrapper class and implemented virtual int info(uint) function in sql/handler.h.

int innodb_wra::info(uint flag)
{
	error = innodb_handler->info(flag);
 
	DBUG_RETURN(error);
}

But Index Merge Optimization was not executed. So, I added a few line below.

int innodb_wra::info(uint flag)
{
	error = innodb_handler->info(flag);
	
	// if (stats.records < 2)   <---- tried but index merge method was not executed
		// stats.records= 2;
		
	stats = innodb_handler->stats;   // so I copied all stats
	
	
	DBUG_RETURN(error);
}

so I was able to see index merge optimizer plan in EXPLAIN output.

But I got this error, after virtual handler *clone(const char *name, MEM_ROOT *mem_root) funtion is called.

Out of memory; check if mysqld or some other process uses all available memory; if not, you may have to use 'ulimit' to allow mysqld to use more memory or you can add more swap space

I set ullimit and MariaDB system variables. But the result was the same.

I guess my_malloc() failed in handler *handler::clone(const char *name, MEM_ROOT *mem_root) function.



 Comments   
Comment by Elena Stepanova [ 2015-10-27 ]

jplindst, could you please take a look – does it belong to you? If not, please feel free to re-assign to whoever you think is best.

Comment by Jan Lindström (Inactive) [ 2015-11-05 ]

Hi, to fully understand you problem I would need your code and instructions to repeat. But to my understanding this is not really MariaDB issue.

Comment by Jong Tak Kim [ 2015-11-09 ]

Hi, added my code and test case to repeat. Thank you very much for your help.

Comment by Jan Lindström (Inactive) [ 2016-04-22 ]

There is something wrong on your code how it handles the memory allocation, I do not know enough about it to be able to help you. Anyway, this is not a MariaDB issue.

Generated at Thu Feb 08 07:31:31 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.