[MDEV-13177] MariaDB 10.2.6 eats virtual memory Created: 2017-06-26  Updated: 2020-12-08  Resolved: 2017-10-20

Status: Closed
Project: MariaDB Server
Component/s: Data Definition - Procedure
Affects Version/s: 10.2.6
Fix Version/s: 10.2.7

Type: Bug Priority: Critical
Reporter: Andreas Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: function, memory
Environment:

WIndows, 32 und 64 Bit


Attachments: Microsoft Word Abgleich_Maria_DB_Variables.xlsx     PNG File Select_Join_Without_error.PNG     PNG File error.png     PNG File error_after_innodb_changes.PNG     PNG File innodb_changes.PNG    
Issue Links:
Relates
relates to MDEV-11520 Extending an InnoDB data file unneces... Closed
relates to MDEV-12097 Innodb allocates almost 3GB instead i... Closed
relates to MDEV-12992 MariaDB 10.2.6 leaks memory while exe... Closed

 Description   

Ich habe mehrere MariaDB Instanzen. Auf der 10.1.11 läuft folgende Funktion durch, auf der Version 10.2.6 nicht. Fehlermeldung: SQL Fehler (5) nicht genügend Speicher.

Ich rufe eine Prozedur auf, in der folgendes SELECT enthalten ist - eingebettet in einem INPUT Statement, welches ich hier weglasse. Das SELECT alleine läuft bereits nicht durch:

SELECT 
      tbl_tmp_import_deals_etl1.counterparty_id,
      tbl_tmp_import_deals_etl1.deal_id_kits AS `deal_id`,
      GET_SUB_PORTFOLIO_DEAL_GERMANY(tbl_tmp_import_deals_etl1.deal_id_scpm) AS `sub_portfolio`
  FROM
      tbl_tmp_import_deals_etl1;

Die aufgerufene Funktion ist wie folgt spezifiziert:

DROP FUNCTION IF EXISTS test_database.GET_SUB_PORTFOLIO_DEAL_GERMANY;
CREATE FUNCTION test_database.`GET_SUB_PORTFOLIO_DEAL_GERMANY`(v_deal_id BIGINT(20)) RETURNS varchar(50) CHARSET utf8 COLLATE utf8_unicode_ci
    READS SQL DATA
    DETERMINISTIC
BEGIN
 
DECLARE r_rueck VARCHAR(50);
 
SELECT IFNULL(value,'no subportfolio') FROM tbl_tmp_import_deal_type_detail
       WHERE deal_id_scpm = v_deal_id AND upper(description) = 'GESELLSCHAFT'
  INTO r_rueck;	
 
	RETURN r_rueck;
END;



 Comments   
Comment by Vladislav Vaintroub [ 2017-06-26 ]

andi1306, I'd recommend to switch to innodb_buffer_pool_instances=1 for 32bit, due to some weird rounding behavior described in MDEV-12097 , buffer pool can grow almost to twice its original size, which for 32bit process mysqld maybe zu viel.

Comment by Elena Stepanova [ 2017-06-26 ]

andi1306, could you please try to re-configure as wlad suggests above and see if the problem goes away? I don't think you planned for the buffer pool size to take 2.9G.

Comment by Andreas [ 2017-06-27 ]

Good morning!
I've changed the innodb_buffer_pool_instances as requested. However, that fixed not the problem I've attached some screenshots.
Remarkable: If I run a joint select the db gives back the results after 1.3 sec. but that is not object oriented and I have to redesign several procedures.

Any idea?
Thanks in advance
Andreas

Comment by Alice Sherepa [ 2017-09-06 ]

Hi Andreas,
I reproduced the problem on 10.2.6, both Ubuntu and Windows, can not reproduce on versions >=10.2.7
It looks like it was fixed after fixing MDEV-12992
Is it possible for you to move to higher versions and see if it works for you?

Comment by Elena Stepanova [ 2017-09-19 ]

andi1306, have you had a chance to upgrade and see if the problem has gone away?

Comment by Elena Stepanova [ 2017-10-20 ]

For now we'll consider it fixed in the scope of MDEV-12992.

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