Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-14959

Control over memory allocated for SP/PS

    XMLWordPrintable

    Details

      Description

      SP/PS (Stored Procedures / Prepared Statements) allocates memory till the PS cache of SP will be destroyed. There is no way to see how many memory allocated and if it grows with each execution (first 2 execution can lead to new memory allocation but not more)

      Task minimum:
      Status variables which count the memory used/allocated for SP/PS by thread and/or for the server.

      Other ideas:

      • Automatic stop allocation in debugging version after second execution and call exception on attempt.
      • Information schema by threads and SP/PS with information about allocated and used memory

      Information can be collected in MEM_ROOTs of SP/PS. Storing info about status of mem_root before execution then checking after new allocated memory can be found.

      MEM_ROOT can be changed to have debug mode which make it read only which can be switched on after second execution.

        Attachments

          Activity

            People

            Assignee:
            sanja Oleksandr Byelkin
            Reporter:
            sanja Oleksandr Byelkin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated: