Open FrancescoBorzi opened 3 years ago
It has always been with lower-case c
since I installed AC
It has always been with lower-case
c
since I installed AC
the core code has it uppercase and it didn't work for me in lowercase, because the core would complain
Yea I understand, so it is very weird
I just tested this on Debian 10.
There's missing execute on the dump-parser. So first:
chmod +x deps/drassil/mysql-tools/bin/dump-parser
After that it runs and creates the file:
./data/sql/base/db_auth/ip2nationCountries.sql
So I suggest updating the execute bit, but the name seems to be fine for me.
There's also something with excessive forward slashes - when running the script you can see ...db_auth//account_a...
and similar, where a single slash should be enough. I haven't found where all these are coming from - seems like the $TPATH variable, but this stuff is referencing and sourcing all over the place... And now my coffee break has already been longer than intended, so no more time for this right now :grin:
My system says:
GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu)
, just as a reference.
Edit: I found a way to fix the 2 issues I found. I created a PR for those.
I don't think this solved the initial issue, but I was unable to confirm that issue at all...
Perhaps something useful can be found to help debug if running the script using bash -x ./bin/acore-db-export 2>&1
?
@FrancescoBorzi - could you try running it again in the latest version with -x
? I'm really curious as to what is doing the conversion from capital to small letters.
@Zoidwaffle done, unfortunately the case bug is still present for me:
tested on latest master (https://github.com/azerothcore/azerothcore-wotlk/commit/fe2fad17c7ec93ef1692beb05b32aa3dbd90e6b0) right after having merged both your and my improvements
@FrancescoBorzi OK, so testing the latest version:
$ ./bin/acore-db-export
<...>
/home/azerothcore/azerothcore_source/deps/drassil/mysql-tools/shared-def: line 22: syntax error in conditional expression: unexpected token `)'
/home/azerothcore/azerothcore_source/deps/drassil/mysql-tools/shared-def: line 22: syntax error near `"Linux")'
/home/azerothcore/azerothcore_source/deps/drassil/mysql-tools/shared-def: line 22: `if [[ $(uname -s) == "Linux") ]] || [[ $(uname -s) == "Darwin" ]]; then
Notice the extra ")" that shouldn't be there.
It works just fine here once fixing the issue above - and the file ./data/sql/base/db_auth/ip2nationCountries.sql
is created and the capital C remains.
Could you please check ./deps/drassil/mysql-tools/mysql-dump
line 93, where it says:
eval "$MYSQLDUMP$OPTS $DUMPOPTS '$MYSQL_DB' '$T' | $DUMPPARSER > $FILE"
and then append a
echo "$MYSQLDUMP$OPTS $DUMPOPTS '$MYSQL_DB' '$T' | $DUMPPARSER > $FILE"
to see exactly what command is generated?
On my system here it's like:
mysqldump -u <user> -p<pass> -h localhost --skip-comments --skip-set-charset --routines --extended-insert --order-by-primary --single-transaction --quick 'acore_auth' 'ip2nationCountries' | /home/azerothcore/azerothcore_source/deps/drassil/mysql-tools/bin/dump-parser > /home/azerothcore/azerothcore_source/data/sql/base/db_auth/ip2nationCountries.sql
so clearly the capital C has survived here - and I wonder if the same happens for you or not.
Could you please check ./deps/drassil/mysql-tools/mysql-dump line 93, where it says
@Zoidwaffle that part is commented out
is this still valid? Do we have any db tables that use uppercase naming?
After using the db-export with:
The table
ip2nationCountries
has been saved asip2nationcountries
(not the lowercasec
)