"unknown column" "missing table" "duplicate column" error / sql problems / SQLDriverLogFile < answer on 1st post of 1st page

– EDIT BY Aokromes –

If you get “unknown column” “missing table” “Duplicate column” errors:

use mysql --default-character-set=utf8 to avoid import failures because timeout/mysql gone away/etc

  1. Clone desired branch.

  2. Import sql/create/create_mysql.sql

  3. start core

  4. leave core to update databases.

Our Wiki: http://collab.kpsn.org/display/tc/TrinityCore+Home

Disable SFMT?

It is disabled.

Check if you have accurate data in the quest_poi and quest_poi_points table. (TDB data is the only accurate data).

If that doesn’t cut it, attach a debugger to it and post a dump in the tracker.

Okay I ‘‘designed’’ my quest_poi_points table to same which it is in the TrinityCore wiki.

Now I get error:

[CODE]Loading Quest POI

SQL: SELECT questId, id, x, y FROM quest_poi_points ORDER BY questId DESC, idx

ERROR: [1054] Unknown column ‘idx’ in ‘order clause’

Unhandled MySQL errno 1054. Unexpected behaviour possible[/CODE]
and then comes classic ‘‘Worldserver has stopped to respond’’.

That error is pretty self-explanatory, don’t you think?

You’re missing an essential column. You should use TDB.

Yeah, this one is easy to fix, but shall I post the dump to tracker or what?

No need to post crash dumps to fix undefined behaviour caused by wrong database structure /emoticons/default_wink.png.

— Canned message start

It appears the issue in the original post was solved, so this thread shall be closed. Should you encounter any other difficulties, please open a new thread.

— Canned message end —

run "tc/sql/update/10828_characters_character_queststatus.sql "

tips [FONT=Impact]"[Err] 1054 - Unknown column ‘rewarded’ in ‘where clause’[/FONT]

[Err] INSERT INTO character_queststatus_rewarded SELECT guid, quest FROM character_queststatus WHERE rewarded = 1;[/FONT]

[Err] 1054 - Unknown column ‘rewarded’ in ‘where clause’[/FONT]

[Err] DELETE FROM character_queststatus WHERE rewarded = 1;[/FONT]

[Err] 1091 - Can’t DROP ‘rewarded’; check that column/key exists[/FONT]

[Err] ALTER TABLE character_queststatus DROP COLUMN rewarded;[/FONT]

[Msg] Finished - Unsuccessfully[/FONT]"

Impact on the entire database it?

i see data in tc/sql/characters_database.sql, no data in tc/ sql/characters_database.sql

I’ve encountered the same issue, I skipped it and it seemed to have no impact on my server.

I finally got a recent version of the core to compile and install on a mac, but now I need to apply SQL updates to my databases. Can someone remind me how to tell which sql updates I need to apply from the git source?

Thanks for the help!

If you bothered looking you would have found this on the wiki.


Thanks for the link. I swear I’d already read that whole page, but I guess I missed that section.

How do I tell what version of the “characters” database I am on? My world database updated fine from 10818 to 10925, but when I run the script “10828_characters_character_queststatus.sql”, I get the following error: “ERROR 1054 (42S22) at line 8: Unknown column ‘rewarded’ in ‘where clause’”

If you created a new character and auth DB, you need NO UPDATES at all.

gotcha, that makes sense. When I wipe everything and install fresh, everything starts up great and I can create a new account and login.

The problem however, is that I still have my old character and auth DB, which I would like to preserve. Unfortunately, I wasn’t very diligent about keeping track of my versions, and now TC does not start.

Is there an easy way to figure out which version my characters and auth DB are on, so I can apply the necessary patches to get things working again?


check your old server.log files to see what the last revision you ran was?, or, look in auth DB for the uptime table, it should have the last revision you ran in it.

nevermind, I’ve figured it out. Thanks for the tip Paradox!

I was able to figure out my versions and apply the correct updates to the characters datababase.