[Maria-discuss] (no subject)
Good morning, Is there a way to have MariaDB run in-memory? I mean, without changing the table engines. I have my production code which needs to be persisted to disk, but for my unit tests, it would be great to have an in-memory DB. I'm in the Java world and I've tried HSQLDB but its SQL implementation is way too different than that of MariaDB. Any ideas? Cheers, Zala -- NoT DeaD which can eternal live, Stranger eons death may die. (HP Lovecraft)
Hi! On 21.11.14 06:30, Pierre GOUPIL wrote:
Good morning,
Is there a way to have MariaDB run in-memory? I mean, without changing the table engines.
I have my production code which needs to be persisted to disk, but for my unit tests, it would be great to have an in-memory DB.
I'm in the Java world and I've tried HSQLDB but its SQL implementation is way too different than that of MariaDB.
Any ideas? /dev/shm on Linux (there is something similar for other OSes)
Cheers,
Zala
-- NoT DeaD which can eternal live, Stranger eons death may die.
(HP Lovecraft)
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
That looks sweet, indeed. But my (quick) search doesn't give me a clue on
how to set this up on-demand: I want a DB which persists on disk for the
app and another one that stays in memory for the tests.
Any pointers, please?
Cheers!
On Fri, Nov 21, 2014 at 9:15 AM, Oleksandr Byelkin
Hi!
On 21.11.14 06:30, Pierre GOUPIL wrote:
Good morning,
Is there a way to have MariaDB run in-memory? I mean, without changing the table engines.
I have my production code which needs to be persisted to disk, but for my unit tests, it would be great to have an in-memory DB.
I'm in the Java world and I've tried HSQLDB but its SQL implementation is way too different than that of MariaDB.
Any ideas?
/dev/shm on Linux (there is something similar for other OSes)
Cheers,
Zala
-- NoT DeaD which can eternal live, Stranger eons death may die.
(HP Lovecraft)
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
-- NoT DeaD which can eternal live, Stranger eons death may die. (HP Lovecraft)
What purpose you made it.. Why not use master-slave replication it, you can test in slave server for test, Or dont use auto commit so you can rollback it, but alter table, drop auto commit Dikirim dari Yahoo Mail pada Android
create a user with select permission only don't work?
2014-11-21 13:13 GMT-02:00 Irwanto
What purpose you made it.. Why not use master-slave replication it, you can test in slave server for test, Or dont use auto commit so you can rollback it, but alter table, drop auto *commit*
Dikirim dari Yahoo Mail pada Android https://id.overview.mail.yahoo.com/mobile/?.src=Android Dari:"Pierre GOUPIL"
Tanggal:Jum, 21 Nov 2014 pada 15:30 Judul:Re: [Maria-discuss] (no subject) That looks sweet, indeed. But my (quick) search doesn't give me a clue on how to set this up on-demand: I want a DB which persists on disk for the app and another one that stays in memory for the tests.
Any pointers, please?
Cheers!
On Fri, Nov 21, 2014 at 9:15 AM, Oleksandr Byelkin
wrote:
Hi!
On 21.11.14 06:30, Pierre GOUPIL wrote:
Good morning,
Is there a way to have MariaDB run in-memory? I mean, without changing the table engines.
I have my production code which needs to be persisted to disk, but for my unit tests, it would be great to have an in-memory DB.
I'm in the Java world and I've tried HSQLDB but its SQL implementation is way too different than that of MariaDB.
Any ideas?
/dev/shm on Linux (there is something similar for other OSes)
Cheers,
Zala
-- NoT DeaD which can eternal live, Stranger eons death may die.
(HP Lovecraft)
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
-- NoT DeaD which can eternal live, Stranger eons death may die.
(HP Lovecraft)
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
-- Roberto Spadim SPAEmpresarial Eng. Automação e Controle
Hi, Pierre! On Nov 21, Pierre GOUPIL wrote:
That looks sweet, indeed. But my (quick) search doesn't give me a clue on how to set this up on-demand: I want a DB which persists on disk for the app and another one that stays in memory for the tests.
Any pointers, please?
If you want to start two different mysqld processes, search for --datadir command line option. If you want to have that within one mysqld process (one database on disk, another on /dev/shm) use symlinks or DATA DIRECTORY/INDEX DIRECTORY table options. Regards, Sergei
Thanks Sergei, I think I'll look for that. I'll tell you all how it goes.
Cheers!
Le 21 nov. 2014 18:35, "Sergei Golubchik"
Hi, Pierre!
On Nov 21, Pierre GOUPIL wrote:
That looks sweet, indeed. But my (quick) search doesn't give me a clue on how to set this up on-demand: I want a DB which persists on disk for the app and another one that stays in memory for the tests.
Any pointers, please?
If you want to start two different mysqld processes, search for --datadir command line option.
If you want to have that within one mysqld process (one database on disk, another on /dev/shm) use symlinks or DATA DIRECTORY/INDEX DIRECTORY table options.
Regards, Sergei
Put your MariaDB 'datadir' on a ramdisk.
http://en.wikipedia.org/wiki/RAM_drive
A
On 21 November 2014 05:30, Pierre GOUPIL
Good morning,
Is there a way to have MariaDB run in-memory? I mean, without changing the table engines.
I have my production code which needs to be persisted to disk, but for my unit tests, it would be great to have an in-memory DB.
I'm in the Java world and I've tried HSQLDB but its SQL implementation is way too different than that of MariaDB.
Any ideas?
Cheers,
Zala
-- NoT DeaD which can eternal live, Stranger eons death may die.
(HP Lovecraft)
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
Thanks. But sorry if I'm not clear but the two MariaDB instances are on the same machine. Hence the need to be able to choose in which mode I launch the RDBMS. On Fri, Nov 21, 2014 at 10:12 AM, Andrew Braithwaite < andrew.braithwaite@graze.com> wrote:
Put your MariaDB 'datadir' on a ramdisk.
http://en.wikipedia.org/wiki/RAM_drive
A
On 21 November 2014 05:30, Pierre GOUPIL
wrote: Good morning,
Is there a way to have MariaDB run in-memory? I mean, without changing the table engines.
I have my production code which needs to be persisted to disk, but for my unit tests, it would be great to have an in-memory DB.
I'm in the Java world and I've tried HSQLDB but its SQL implementation is way too different than that of MariaDB.
Any ideas?
Cheers,
Zala
-- NoT DeaD which can eternal live, Stranger eons death may die.
(HP Lovecraft)
_______________________________________________ Mailing list: https://launchpad.net/~maria-discuss Post to : maria-discuss@lists.launchpad.net Unsubscribe : https://launchpad.net/~maria-discuss More help : https://help.launchpad.net/ListHelp
-- NoT DeaD which can eternal live, Stranger eons death may die. (HP Lovecraft)
Not tested, but should work:
1) use only 1 binary and only 1 instance
2) make a startup script. when starting in test mode, it will copy your datadir to a ram disk, and will create/overwrite a symlink to the ramdisk. when in normal mode, the script will copy from ram to disk and the symlink will create a symlink to the datadir on disk
3) mariadb datadir will point to the symlink
Hope this helps
Federico
--------------------------------------------
Ven 21/11/14, Pierre GOUPIL
participants (7)
-
Andrew Braithwaite
-
Federico Razzoli
-
Irwanto
-
Oleksandr Byelkin
-
Pierre GOUPIL
-
Roberto Spadim
-
Sergei Golubchik