wieszak wrote:Ok. Here it is first 'public' version of patch for mysql support:
http://para.zonk.pl/mysql-0.1.patch
Server is sqlite3 by default, to use mysql you need to put in minetest.conf values for mysql_server, mysql_user, mysql_password and mysql_database. Database need to be created, tables are created by server, user need to get select, update, insert, delete and create priviliges. Each worlds data is located in table <world_name>_blocks, so better do not use fancy characters in name - it is not checked yet ;)
In few (or more...) days i will announce 24/7 server running on mysql with this patch for multiplayer testing.
TODO:
- maybe move config data to world config not server so user could choose storage at world creation...
- maybe move worlds metadata and players to mysql also
- change serialization for mysql - it would be helpful for next:
- write some external online tools to admin world ;)
+ if (mysql_select_db(m_database,"minetest")) {
patching file src/CMakeLists.txt
patching file src/client.cpp
patching file src/clientserver.h
patching file src/database-mysql.cpp
patch: **** malformed patch at line 571: diff -ruN celeron55-minetest-9cadaf8/src/database.cpp celeron55-minetest-9cadaf8-mysql/src/database.cpp
fgr wrote:any hint how to change the backend db in config? just still patched it and the database is still sqlite... no readme nor anything else, could you provide some more infos to it?
also i get the followin error:Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
- Code: Select all
patch: **** malformed patch at line 571: diff -ruN celeron55-minetest-9cadaf8/src/database.cpp celeron55-minetest-9cadaf8-mysql/src/database.cpp
any clue?
thanks
Server creating detached inventory "creative"
creative inventory size: 111
21:46:19: INFO[ServerThread]: ServerMap: SQLite3 database structure was createdServerMap: SQLite3 database opened
fgr wrote:why isnt this considered anymore? is there any possibility to get short attention to it? thanks a lot!!!!!!
xyz wrote:fgr wrote:why isnt this considered anymore? is there any possibility to get short attention to it? thanks a lot!!!!!!
It's merged already. MySQL backend isn't present though.
fgr wrote:xyz wrote:fgr wrote:why isnt this considered anymore? is there any possibility to get short attention to it? thanks a lot!!!!!!
It's merged already. MySQL backend isn't present though.
So it's not fully integrated because of different opinions about mysql. The game will probably have lack of speed when lot of mods loaded. This wont get better with leveldb.
function db_init()
--Initialize database
end
function db_beginSave()
--Is called before multiple transactions take place
end
function db_endSave()
--Is called after multiple transactions have taken place
end
function db_saveBlock(x, y, z, blobdata)
--Save MapBlock
end
function db_loadBlock(x, y, z)
--Load MapBlock (return string)
-- "" means the MapBlock could not be loaded (e.g. Not existant, Error occurred)
end
function db_listAllLoadableBlocks()
--Return list of positions of all existing MapBlocks
end
function db_destroy()
--Close database
end
Users browsing this forum: No registered users and 0 guests