Astreya2
arves100

[[ delete ]]

20 posts in this topic

Hello i update mysql connector to MariaDB Connector v3.3

what is The advantages or the benefit of this sorry I do not understand precisely because I do not speak English fluently

4 hours ago, arves100 said:

UPDATE: Check out the "update" part to fix "Save item" problem.

 

 

Share this post


Link to post
Share on other sites
21 minutes ago, arves100 said:

Nothing really change a lot, only that it have 100% MariaDB support, the MySQL Connector gave to me a bug when using MariaDB

plz add example what the new style 

what the change when add mariaDb 

"REPLACE INTO item%s (id, owner_id, windows, pos, count, vnum, socket0, socket1, socket2, "
			"attrtype0, attrvalue0, "
			"attrtype1, attrvalue1, "
			"attrtype2, attrvalue2, "
			"attrtype3, attrvalue3, "
			"attrtype4, attrvalue4, "
			"attrtype5, attrvalue5, "
			"attrtype6, attrvalue6 "
			") "

Share this post


Link to post
Share on other sites

to install mariaDb on freebsd you need deinstall mysql

on this example i use mysql57

you should use this command to delete the mysql57

cd /usr/ports/databases/mysql57-server/ && make deinstall clean
cd /usr/ports/databases/mysql57-client/ && make deinstall clean

 

now to install maraiadb 

you can use this command with the replace version

i use maraiadb 10,0

cd /usr/ports/databases/mariadb100-server && make install clean

enable ssl

after install use this :

echo 'mysql_enable="YES"' >> /etc/rc.conf

configuration 

MariaDB respects FreeBSD layout of file systems (and doesn’t check /etc and /etc/mysql for my.cnf. You will find the following default config files:

ls -l /usr/local/share/mysql/my*.cnf

/usr/local/share/mysql/my-huge.cnf
/usr/local/share/mysql/my-innodb-heavy-4G.cnf
/usr/local/share/mysql/my-large.cnf
/usr/local/share/mysql/my-medium.cnf
/usr/local/share/mysql/my-small.cnf

i use medium conf

cp /usr/local/share/mysql/my-medium.cnf /usr/local/etc/my.cnf

service mysql-server start

and done !

 

Share this post


Link to post
Share on other sites

Instead of changing window to windows, you can simply change it to `window`. (this little change is present on mysql8.0 as well)

Including <mariadb>'s includes isn't 100% required (at must, it's suggested to do so) since the <mysql>'s ones are also added when installing mariadb.

Instead of directly adding the mariadb define in CFLAGS, you can perform a check like mysql --version | grep -c MariaDB.

By default, when linking mariadb, several other dynamic .so are included in the game. (it may be annoying)

  • Like 1

Share this post


Link to post
Share on other sites
8 hours ago, martysama0134 said:

Instead of changing window to windows, you can simply change it to `window`. (this little change is present on mysql8.0 as well)

Including <mariadb>'s includes isn't 100% required (at must, it's suggested to do so) since the <mysql>'s ones are also added when installing mariadb.

Instead of directly adding the mariadb define in CFLAGS, you can perform a check like mysql --version | grep -c MariaDB.

By default, when linking mariadb, several other dynamic .so are included in the game. (it may be annoying)

hello marty i have this problem when open use sh start.sh

i include the python code in my cpp code

Shared object "libpython2.7.so.1" not found, required by "game"

and when add this lib in lib32 in my game server i have problem in comparability 

Share this post


Link to post
Share on other sites
18 hours ago, arves100 said:

UPDATE: Cache.cpp

hello arves

we need edit mysql_query function in lua 

and make his compatibly  with mariadb10.2

Quote

mysql_query = function(query) 
    local rt = io.open('CONFIG','r'):read('*all') 
    local pre= string.gsub(rt,'.+PLAYER_SQL:%s(%S+)%s(%S+)%s(%S+)%s(%S+).+','-h%1 -u%2 -p%3 -D%4') 
    math.randomseed(os.time()) 
    local fi,t,out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2^10),{},{} 
    os.execute('mysql '..pre..' --e='..string.format('%q',query)..' > '..fi)   
    for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'\t')) end; os.remove(fi); 
    for i = 2, table.getn(t) do table.foreach(t,function(a,b) 
        out[i-1]        = out[i-1] or {} 
        out[i-1][a]        = b 
        out[t[1][a]]    = out[t[1][a]] or {} 
        out[t[1][a]][i-1]    = b 
    end) end 
    return out 
end

 

Quote

mysql_query = function(query)
    math.randomseed(os.time())
    local fi,t,out = 'mysql_data_'..math.random(10^9)+math.random(2^4,2^10),{},{}
    os.execute('mysql --login-path=local -e'..string.format('%q',query)..' > '..fi)
    for av in io.open(fi,'r'):lines() do table.insert(t,split(av,'\t')) end; os.remove(fi);
    for i = 2, table.getn(t) do
        table.foreach(t,function(a,b)
        out[i-1]               = out[i-1] or {}
        out[i-1][a]            = tonumber(b) or b or 'NULL'
        out[t[1][a]]           = out[t[1][a]] or {}
        out[t[1][a]][i-1]      = tonumber(b) or b or 'NULL'
        end)
    end
    out.__lines = t[1]
    return out
end

 

Share this post


Link to post
Share on other sites
On 2/8/2018 at 12:33 AM, arves100 said:

This query is ok

i have this error when game link 

Spoiler

/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o): In function `mysql_change_user':
mariadb_lib.c:(.text+0xbd7): undefined reference to `__strdup'
mariadb_lib.c:(.text+0xbe5): undefined reference to `__strdup'
mariadb_lib.c:(.text+0xc5d): undefined reference to `__strdup'
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o): In function `my_set_error':
mariadb_lib.c:(.text+0x10bd): undefined reference to `__vsnprintf_chk'
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o): In function `mysql_real_connect':
mariadb_lib.c:(.text+0x1f1c): undefined reference to `__strdup'
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o): In function `mysql_optionsv':
mariadb_lib.c:(.text+0x2951): undefined reference to `__strdup'
mariadb_lib.c:(.text+0x2a13): undefined reference to `__strdup'
mariadb_lib.c:(.text+0x2a60): undefined reference to `__strdup'
mariadb_lib.c:(.text+0x2ab0): undefined reference to `__strdup'
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o):mariadb_lib.c:(.text+0x2b61): more undefined references to `__strdup' follow
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o): In function `ma_net_safe_read':
mariadb_lib.c:(.text+0x3f55): undefined reference to `__errno_location'
mariadb_lib.c:(.text+0x400f): undefined reference to `__strcpy_chk'
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o): In function `mthd_my_read_one_row':
mariadb_lib.c:(.text+0x41f2): undefined reference to `__strcpy_chk'
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o): In function `mysql_select_db':
mariadb_lib.c:(.text+0x46a2): undefined reference to `__strdup'
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o): In function `mthd_my_real_connect':
mariadb_lib.c:(.text+0x4a01): undefined reference to `__snprintf_chk'
mariadb_lib.c:(.text+0x4bd0): undefined reference to `__sprintf_chk'
mariadb_lib.c:(.text+0x4ccb): undefined reference to `__strdup'
mariadb_lib.c:(.text+0x4cea): undefined reference to `__strdup'
mariadb_lib.c:(.text+0x4d04): undefined reference to `__strdup'
mariadb_lib.c:(.text+0x4d1e): undefined reference to `__strdup'
mariadb_lib.c:(.text+0x4d40): undefined reference to `__strdup'
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o):mariadb_lib.c:(.text+0x4d94): more undefined references to `__strdup' follow
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o): In function `mthd_my_real_connect':
mariadb_lib.c:(.text+0x5112): undefined reference to `__errno_location'
mariadb_lib.c:(.text+0x5225): undefined reference to `__strdup'
mariadb_lib.c:(.text+0x530d): undefined reference to `__sprintf_chk'
mariadb_lib.c:(.text+0x54e0): undefined reference to `__errno_location'
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o): In function `mysql_list_dbs':
mariadb_lib.c:(.text+0x55aa): undefined reference to `__snprintf_chk'
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o): In function `mysql_list_tables':
mariadb_lib.c:(.text+0x565a): undefined reference to `__snprintf_chk'
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o): In function `mysql_set_character_set':
mariadb_lib.c:(.text+0x57db): undefined reference to `__snprintf_chk'
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o): In function `mysql_list_fields':
mariadb_lib.c:(.text+0x628e): undefined reference to `__snprintf_chk'
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_lib.c.o): In function `mthd_my_read_query_result':
mariadb_lib.c:(.text+0x75ea): undefined reference to `__memcpy_chk'
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
../../../Extern/lib/mariadb/libmariadbclient.a(ma_pvio.c.o): In function `ma_pvio_read':
ma_pvio.c:(.text+0x5f7): undefined reference to `__errno_location'
../../../Extern/lib/mariadb/libmariadbclient.a(ma_pvio.c.o): In function `ma_pvio_write':
ma_pvio.c:(.text+0x8ba): undefined reference to `__errno_location'
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
../../../Extern/lib/mariadb/libmariadbclient.a(ma_password.c.o): In function `ma_make_scrambled_password':
ma_password.c:(.text+0x312): undefined reference to `__sprintf_chk'
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_stmt.c.o): In function `stmt_set_error':
mariadb_stmt.c:(.text+0x7b3): undefined reference to `__vsnprintf_chk'
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
../../../Extern/lib/mariadb/libmariadbclient.a(ma_loaddata.c.o): In function `mysql_local_infile_read':
ma_loaddata.c:(.text+0xf9): undefined reference to `__errno_location'
ma_loaddata.c:(.text+0x13c): undefined reference to `__snprintf_chk'
../../../Extern/lib/mariadb/libmariadbclient.a(ma_loaddata.c.o): In function `mysql_local_infile_init':
ma_loaddata.c:(.text+0x1d8): undefined reference to `__errno_location'
ma_loaddata.c:(.text+0x215): undefined reference to `__snprintf_chk'
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
../../../Extern/lib/mariadb/libmariadbclient.a(ma_stmt_codec.c.o): In function `my_atoll':
ma_stmt_codec.c:(.text+0x6c): undefined reference to `__memcpy_chk'
ma_stmt_codec.c:(.text+0x76): undefined reference to `__errno_location'
ma_stmt_codec.c:(.text+0xcc): undefined reference to `__ctype_b_loc'
../../../Extern/lib/mariadb/libmariadbclient.a(ma_stmt_codec.c.o): In function `my_atod':
ma_stmt_codec.c:(.text+0x45d): undefined reference to `__memcpy_chk'
../../../Extern/lib/mariadb/libmariadbclient.a(ma_stmt_codec.c.o): In function `.L187':
ma_stmt_codec.c:(.text+0xcc0): undefined reference to `__sprintf_chk'
ma_stmt_codec.c:(.text+0xd0f): undefined reference to `__sprintf_chk'
ma_stmt_codec.c:(.text+0xd98): undefined reference to `__strcat_chk'
ma_stmt_codec.c:(.text+0xde6): undefined reference to `__sprintf_chk'
ma_stmt_codec.c:(.text+0xe7a): undefined reference to `__sprintf_chk'
ma_stmt_codec.c:(.text+0xec9): undefined reference to `__sprintf_chk'
../../../Extern/lib/mariadb/libmariadbclient.a(ma_stmt_codec.c.o): In function `.L266':
ma_stmt_codec.c:(.text+0x123c): undefined reference to `__memset_chk'
../../../Extern/lib/mariadb/libmariadbclient.a(ma_stmt_codec.c.o): In function `.L315':
ma_stmt_codec.c:(.text+0x1724): undefined reference to `__memset_chk'
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
../../../Extern/lib/mariadb/libmariadbclient.a(ma_client_plugin.c.o): In function `mysql_load_plugin_v':
ma_client_plugin.c:(.text+0x552): undefined reference to `__snprintf_chk'
../../../Extern/lib/mariadb/libmariadbclient.a(ma_client_plugin.c.o): In function `mysql_client_plugin_init':
ma_client_plugin.c:(.text+0x851): undefined reference to `__strdup'
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
../../../Extern/lib/mariadb/libmariadbclient.a(openssl.c.o): In function `ma_tls_set_error':
openssl.c:(.text+0x106): undefined reference to `__snprintf_chk'
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
../../../Extern/lib/mariadb/libmariadbclient.a(mariadb_async.c.o): In function `my_connect_async':
mariadb_async.c:(.text+0xa6b): undefined reference to `__errno_location'
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
../../../Extern/lib/mariadb/libmariadbclient.a(pvio_socket.c.o): In function `pvio_socket_wait_io_or_timeout':
pvio_socket.c:(.text+0x3e9): undefined reference to `__errno_location'
pvio_socket.c:(.text+0x412): undefined reference to `__errno_location'
../../../Extern/lib/mariadb/libmariadbclient.a(pvio_socket.c.o): In function `pvio_socket_blocking':
pvio_socket.c:(.text+0x4e1): undefined reference to `__errno_location'
../../../Extern/lib/mariadb/libmariadbclient.a(pvio_socket.c.o): In function `pvio_socket_connect_sync_or_async':
pvio_socket.c:(.text+0x611): undefined reference to `__errno_location'
../../../Extern/lib/mariadb/libmariadbclient.a(pvio_socket.c.o):pvio_socket.c:(.text+0x769): more undefined references to `__errno_location' follow
../../../Extern/lib/mariadb/libmariadbclient.a(pvio_socket.c.o): In function `pvio_socket_connect':
pvio_socket.c:(.text+0xbfe): undefined reference to `__strcpy_chk'
pvio_socket.c:(.text+0xc24): undefined reference to `__errno_location'
pvio_socket.c:(.text+0xce8): undefined reference to `__errno_location'
pvio_socket.c:(.text+0xdaf): undefined reference to `__snprintf_chk'
pvio_socket.c:(.text+0x1005): undefined reference to `__errno_location'
pvio_socket.c:(.text+0x119a): undefined reference to `__errno_location'
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
../../../Extern/lib/mariadb/libmariadbclient.a(my_auth.c.o): In function `client_mpvio_write_packet':
my_auth.c:(.text+0x300): undefined reference to `__errno_location'
my_auth.c:(.text+0x674): undefined reference to `__errno_location'
my_auth.c:(.text+0x7f2): undefined reference to `__strdup'
my_auth.c:(.text+0x8eb): undefined reference to `__errno_location'
../../../Extern/lib/mariadb/libmariadbclient.a(my_auth.c.o): In function `run_plugin_auth':
my_auth.c:(.text+0xda6): undefined reference to `__errno_location'
my_auth.c:(.text+0xe6b): undefined reference to `__errno_location'
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
../../../Extern/lib/mariadb/libmariadbclient.a(ma_charset.c.o): In function `map_charset_name.constprop.6':
ma_charset.c:(.text+0x82f): undefined reference to `__snprintf_chk'
../../../Extern/lib/mariadb/libmariadbclient.a(ma_charset.c.o): In function `mariadb_convert_string':
ma_charset.c:(.text+0xd31): undefined reference to `iconv_open'
ma_charset.c:(.text+0xd5c): undefined reference to `iconv'
ma_charset.c:(.text+0xd74): undefined reference to `iconv_close'
ma_charset.c:(.text+0xd82): undefined reference to `__errno_location'
ma_charset.c:(.text+0xd99): undefined reference to `__errno_location'
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
../../../Extern/lib/mariadb/libmariadbclient.a(ma_hash.c.o): In function `calc_hashnr_caseup':
ma_hash.c:(.text+0x6b): undefined reference to `__ctype_toupper_loc'
/usr/bin/ld: Dwarf Error: found dwarf version '4', this reader only handles version 2 information.
../../../Extern/lib/mariadb/libmariadbclient.a(ma_default.c.o): In function `add_cfg_dir':
ma_default.c:(.text+0x34): undefined reference to `__strdup'
../../../Extern/lib/mariadb/libmariadbclient.a(ma_default.c.o): In function `_mariadb_read_options_from_file':
ma_default.c:(.text+0x135): undefined reference to `__ctype_b_loc'
ma_default.c:(.text+0x201): undefined reference to `__rawmemchr'
ma_default.c:(.text+0x46c): undefined reference to `__rawmemchr'
../../../Extern/lib/mariadb/libmariadbclient.a(ma_default.c.o): In function `_mariadb_read_options':
ma_default.c:(.text+0x669): undefined reference to `__snprintf_chk'
ma_default.c:(.text+0x6db): undefined reference to `__snprintf_chk'
gmake: *** [../game_r41239] Error 1

 

this is make file 

Spoiler

CC = g++

GAME_VERSION = $(shell cat ../../__REVISION__)

INCDIR =
LIBDIR =
BINDIR = ..
OBJDIR = .obj
$(shell if [ ! -d $(OBJDIR) ]; then mkdir $(OBJDIR); fi)

## LIST OF CONSTANTS BEGIN
ENABLE_GOOGLE_TEST = 0
ENABLE_HSHIELD_SYSTEM = 0
ENABLE_XTRAP_SYSTEM = 0
ENABLE_LUA_5_2_VERSION = 0
ENABLE_GCC_AUTODEPEND = 1
ENABLE_NEWSTUFF_EX = 0
ENABLE_MRIADB = 1
## LIST OF CONSTANTS END

# Depend Path File
ifneq ($(ENABLE_GCC_AUTODEPEND), 1)
DEPFILE = Depend
endif

# Standard Libraries
LIBS = -lm -lmd

# Project Flags
CFLAGS = -m32 -g -Wall -O2 -pipe -fexceptions -fno-strict-aliasing -pthread -D_THREAD_SAFE -DNDEBUG -D__MARIADB__
# CFLAGS = -m32 -g3 -Wall -O0 -pipe -fexceptions -fno-rtti -fno-strict-aliasing -Wno-unused-local-typedefs -Wno-long-long -pthread -D_THREAD_SAFE -DNDEBUG

# FreeBSD stack protector
CFLAGS += -fstack-protector-all

# Version defines
CFLAGS += -D__USER__=\"$(USER)\" -D__HOSTNAME__=\"$(HOSTNAME)\" -D__PWD__=\"$(PWD)\" -D__GAME_VERSION__=\"$(GAME_VERSION)\"

# Boost
INCDIR += -I../../../Extern/include/boost

# DevIL
INCDIR += -I../../../Extern/include/IL
LIBS += ../../../Extern/lib/libIL.a\
        ../../../Extern/lib/libjasper.a\
        ../../../Extern/lib/libpng.a\
        ../../../Extern/lib/libtiff.a\
        ../../../Extern/lib/libjbig.a\
        ../../../Extern/lib/libmng.a\
        /usr/lib/liblzma.a\
        ../../../Extern/lib/liblcms.a\
        ../../../Extern/lib/libjpeg.a
ifeq ($(ENABLE_MRIADB_HAIES), 1)
INCDIR += -I../../../Extern/include/mariadb
LIBS += ../../../Extern/lib/mariadb/libmariadbclient.a /usr/lib/libz.a -lcrypto
else
# MySQL
INCDIR += -I/usr/local/include/mysql
LIBS += /usr/local/lib/mysql/libmysqlclient.a /usr/lib/libz.a
endif
# CryptoPP
LIBS += ../../../Extern/lib/libcryptopp.a

# GTest
ifeq ($(ENABLE_GOOGLE_TEST), 1)
LIBS += /usr/local/lib/libgtest.a
CFLAGS += -DENABLE_GOOGLE_TEST
endif

# HackShield
ifeq ($(ENABLE_HSHIELD_SYSTEM), 1)
INCDIR += -I../../libhackshield/include
CFLAGS += -DENABLE_HSHIELD_SYSTEM
endif

# XTrap
ifeq ($(ENABLE_XTRAP_SYSTEM), 1)
INCDIR += -I../../libxtrap/include
CFLAGS += -DENABLE_XTRAP_SYSTEM
endif

# OpenSSL
INCDIR += -I/usr/include
LIBS += -lssl
# LIBS += /usr/lib/libssl.a /usr/lib/libssh_p.a

# Lua
CFLAGS += -DENABLE_LUA_5_2_VERSION=ENABLE_LUA_5_2_VERSION
ifeq ($(ENABLE_LUA_5_2_VERSION), 1)
INCDIR += -I../../liblua/.lua52/install/include
LIBDIR += -L../../liblua/.lua52/install/lib
LIBS += ../../liblua/.lua52/install/lib/liblua.a
# LIBS += ../../liblua/.lua52/src/liblua.a
else
INCDIR += -I../../liblua/.lua50/include
LIBDIR += -L../../liblua/.lua50/lib
LIBS += ../../liblua/.lua50/lib/liblua.a ../../liblua/.lua50/lib/liblualib.a
endif

# Project Libraries
INCDIR += -I../../../Extern/include
INCDIR += -I/usr/local/include
LIBDIR += -L/usr/local/lib
#LIBDIR += /usr/lib32/libpython2.7.so

INCDIR += -I../../libserverkey
LIBDIR += -L../../libthecore/lib -L../../libpoly -L../../libsql -L../../libgame/lib -L../../libserverkey
LIBS += -lthecore -lpoly -lsql -lgame -lserverkey

# PROJECT_SRC_FILES BEGIN
MAINCPP = main.cpp
TESTCPP = test.cpp

CFILE    = minilzo.c

CPPFILE = BattleArena.cpp FSM.cpp MarkConvert.cpp MarkImage.cpp MarkManager.cpp OXEvent.cpp TrafficProfiler.cpp ani.cpp attr_transfer.cpp\
          arena.cpp\
          banword.cpp battle.cpp blend_item.cpp block_country.cpp buffer_manager.cpp building.cpp castle.cpp\
          char.cpp char_affect.cpp char_battle.cpp char_change_empire.cpp char_horse.cpp char_item.cpp char_manager.cpp\
          char_quickslot.cpp char_resist.cpp char_skill.cpp char_state.cpp PetSystem.cpp cmd.cpp cmd_emotion.cpp cmd_general.cpp\
          cmd_gm.cpp cmd_oxevent.cpp config.cpp constants.cpp crc32.cpp cube.cpp db.cpp desc.cpp\
          desc_client.cpp desc_manager.cpp desc_p2p.cpp dev_log.cpp dungeon.cpp empire_text_convert.cpp entity.cpp\
          entity_view.cpp event.cpp event_queue.cpp exchange.cpp file_loader.cpp fishing.cpp gm.cpp guild.cpp\
          guild_manager.cpp guild_war.cpp horse_rider.cpp horsename_manager.cpp input.cpp input_auth.cpp input_db.cpp\
          input_login.cpp input_main.cpp input_p2p.cpp input_teen.cpp input_udp.cpp ip_ban.cpp\
          item.cpp item_addon.cpp item_attribute.cpp item_manager.cpp item_manager_idrange.cpp locale.cpp\
          locale_service.cpp log.cpp login_data.cpp lzo_manager.cpp marriage.cpp matrix_card.cpp\
          messenger_manager.cpp mining.cpp mob_manager.cpp monarch.cpp motion.cpp over9refine.cpp p2p.cpp packet_info.cpp\
          party.cpp passpod.cpp pcbang.cpp polymorph.cpp priv_manager.cpp pvp.cpp\
          questevent.cpp questlua.cpp questlua_affect.cpp questlua_arena.cpp questlua_ba.cpp questlua_building.cpp\
          questlua_danceevent.cpp questlua_dungeon.cpp questlua_forked.cpp questlua_game.cpp questlua_global.cpp\
          questlua_guild.cpp questlua_horse.cpp questlua_pet.cpp questlua_item.cpp questlua_marriage.cpp questlua_mgmt.cpp\
          questlua_monarch.cpp questlua_npc.cpp questlua_oxevent.cpp questlua_party.cpp questlua_pc.cpp\
          questlua_quest.cpp questlua_target.cpp questmanager.cpp questnpc.cpp questpc.cpp\
          questlua_arena_party_haies.cpp\
          refine.cpp regen.cpp safebox.cpp sectree.cpp sectree_manager.cpp sequence.cpp shop.cpp\
          skill.cpp start_position.cpp target.cpp text_file_loader.cpp trigger.cpp utils.cpp vector.cpp war_map.cpp\
          wedding.cpp xmas_event.cpp version.cpp panama.cpp threeway_war.cpp map_location.cpp auth_brazil.cpp\
          BlueDragon.cpp BlueDragon_Binder.cpp DragonLair.cpp questlua_dragonlair.cpp\
          HackShield.cpp HackShield_Impl.cpp char_hackshield.cpp skill_power.cpp affect.cpp\
          SpeedServer.cpp questlua_speedserver.cpp XTrapManager.cpp\
          auction_manager.cpp FileMonitor_FreeBSD.cpp ClientPackageCryptInfo.cpp cipher.cpp\
          buff_on_attributes.cpp dragon_soul_table.cpp DragonSoul.cpp\
          group_text_parse_tree.cpp char_dragonsoul.cpp questlua_dragonsoul.cpp\
          shop_manager.cpp shopEx.cpp item_manager_read_tables.cpp\
          New_PetSystem.cpp questlua_petnew.cpp\
          shutdown_manager.cpp char_cards.cpp offline_shop.cpp\
          offlineshop_manager.cpp offlineshop_config.cpp vid.cpp

ifeq ($(ENABLE_NEWSTUFF_EX), 1)
CPPFILE += questlua_new.cpp\
            questlua_new_constant.cpp\
            questlua_new_desc.cpp\
            questlua_new_item.cpp\
            questlua_new_npc.cpp\
            questlua_new_pc.cpp\
            questlua_new_quest.cpp\
            questlua_new_test.cpp
CFLAGS += -DENABLE_NEWSTUFF_EX=ENABLE_NEWSTUFF_EX
endif
# PROJECT_SRC_FILES END

# PROJECT_OBJ_FILES BEGIN
COBJS    = $(CFILE:%.c=$(OBJDIR)/%.o)
CPPOBJS    = $(CPPFILE:%.cpp=$(OBJDIR)/%.o)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
CDEPS    = $(COBJS:%.o=%.d)
CPPDEPS    = $(CPPOBJS:%.o=%.d)
endif

MAINOBJ = $(MAINCPP:%.cpp=$(OBJDIR)/%.o)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
MAINDEPS = $(MAINOBJ:%.o=%.d)
endif

TESTOBJ = $(TESTCPP:%.cpp=$(OBJDIR)/%.o)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
TESTDEPS = $(TESTOBJ:%.o=%.d)
endif
# PROJECT_OBJ_FILES END

# Target Paths
MAIN_TARGET = $(BINDIR)/game_r$(GAME_VERSION)
TEST_TARGET = $(BINDIR)/game_r$(GAME_VERSION)_test

# previously -> default: $(MAIN_TARGET) $(TEST_TARGET)
default: $(MAIN_TARGET)
test: $(TEST_TARGET)

$(OBJDIR)/%.o: %.c
    @echo compiling $<
    @$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @$(CC) -MM -MG -MP $(CFLAGS) $(INCDIR) -c $< -o $(OBJDIR)/$*.d
    @sed -i '' -e's/$*.o:/$(OBJDIR)\/$*.o:/g' $(OBJDIR)/$*.d
endif

$(OBJDIR)/%.o: %.cpp
    @echo compiling $<
    @$(CC) $(CFLAGS) $(INCDIR) -c $< -o $@
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @$(CC) -MM -MG -MP $(CFLAGS) $(INCDIR) -c $< -o $(OBJDIR)/$*.d
    @sed -i '' -e's/$*.o:/$(OBJDIR)\/$*.o:/g' $(OBJDIR)/$*.d
endif

limit_time:
    @echo update limit time
    @python update_limit_time.py

$(MAIN_TARGET): $(CPPOBJS) $(COBJS) $(MAINOBJ)
    @echo linking $(MAIN_TARGET)
    @$(CC) $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(MAINOBJ) $(LIBS) -o $(MAIN_TARGET)

$(TEST_TARGET): $(TESTCPP) $(CPPOBJS) $(COBJS) $(TESTOBJ)
    @echo linking $(TEST_TARGET)
    @$(CC) $(CFLAGS) $(LIBDIR) $(COBJS) $(CPPOBJS) $(TESTOBJ) $(LIBS) -o $(TEST_TARGET)

dump:
    @$(CC) -dM -E - < /dev/null > .nope.nope

symlink:
    @ln -fs game_r$(GAME_VERSION) $(BINDIR)/game_symlink

strip:
    @cp $(BINDIR)/game_r$(GAME_VERSION) $(BINDIR)/game_r
    @strip $(BINDIR)/game_r

clean:
    @rm -f $(COBJS) $(CPPOBJS) $(MAINOBJ) $(TESTOBJ)
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @rm -f $(CDEPS) $(CPPDEPS) $(MAINDEPS) $(TESTDEPS)
endif
    @rm -f $(BINDIR)/game_r* $(BINDIR)/conv

cc-ver:
    @$(CC) -v

tag:
    ctags *.cpp *.h *.c

dep:
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
    @echo "Note: gcc autodepend is autodetected, so target dep skipped"
else
    makedepend -f $(DEPFILE) $(INCDIR) -I/usr/include/c++/3.3 -I/usr/include/c++/4.2 -p$(OBJDIR)/ $(CPPFILE) $(CFILE) $(MAINCPP) $(TESTCPP) 2> /dev/null > $(DEPFILE)
endif

# AUTO_DEPEND_CHECK BEGIN
ifeq ($(ENABLE_GCC_AUTODEPEND), 1)
sinclude $(CDEPS)
sinclude $(CPPDEPS)
sinclude $(MAINDEPS)
sinclude $(TESTDEPS)
else
sinclude $(DEPFILE)
endif
# AUTO_DEPEND_CHECK END
 

 

Share this post


Link to post
Share on other sites

Hello,

I recently updated to mariadb 103.
Your tutorial worked like a charm.
My Files are updated and compiled.

But now i have the following problem:

  • Can`t connect to mysql server through socket
  • cannot start server while no common sql connected


The Channel and db syserr`s are clean. There is also no error in the mysql *hostname*.err.
The only thing i could find is the following Problem at the Ch1 Syslog:

  • CREATING DIRECT_SQL
  • AsyncSQL: locale latin1 failed retrying in 5 seconds

Have i done something wrong ? Could you please help me ?

Share this post


Link to post
Share on other sites

Why would you need to change anything? MariaDB is fully compatible with MySQL. Just uninstall MySQL and install MariaDB instead and that's it. There's nothing to change in the files.

  • Like 2

Share this post


Link to post
Share on other sites
On 8/10/2018 at 7:39 AM, Shogun said:

Why would you need to change anything? MariaDB is fully compatible with MySQL. Just uninstall MySQL and install MariaDB instead and that's it. There's nothing to change in the files.

There are several improvements along with the upgrade to the new mariadb connector which comes with some performance fixes.

Althought, we know that the actual mysql version which was used in the development of Metin2 was  MySQL 4.1.3 and it is out of this orbit since 10 years ago.

As far as i have tested, mariadb102 is fully compatible with the game itself but 103 isn't, you need a special connector to use it at its full capacities.

 

//EDIT: and forgot to mention, you also need to change the structure of the SQL querys too.

 

Best regards,

Dr3Ame3r

 

  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.