1

I have a SlashDB installation on top of MySQL 5.7. I use it to serve custom REST API calls to allow other people to access the data in the DB. Most of these happen through the 'SQL Pass-thru' feature.

When executing straight SQL queries, changes to the DB are committed immediately. However, this is not true when I execute stored functions (through select [function name]). The function would execute perfectly, but any changes to the data is not committed until I issue commit;. The main problem is that this causes stranded locks on tables and other MySQL objects.

Anybody has any idea what's happening here?

1 Answers1

1

Currently the only walk around is by manually adding ?autocommit=true to the connection string in /etc/slashdb/databases.cfg.

For example

myChinook:
  alternate_key: {}
  autoconnect: true
  autoload: true
  autoload_user: {dbpass: chinook, dbuser: chinook}
  connection: 127.0.0.1:3308/Chinook?autocommit=true
  creator: admin
  db_encoding: utf-8
  db_id: myChinook
  db_schema: null
  db_type: mysql
  desc: ''
  excluded_columns: {}
  execute: []
  foreign_keys: {}
  owners: [admin]
  read: []
  write: []

After making manually changes in files you need to restart SlashDB service

sudo service slashdb stop
sudo service slashdb start

Or to call stored procedures instead of select on stored function.

mdob
  • 2,224
  • 3
  • 22
  • 25