[MYSQLX] information_schema.tables

Read log files for errors! If this fails, come here for help

Moderator: Forum Moderator

Post Reply
DesasterUK
WC3Mods Donor
WC3Mods Donor
Posts: 223
Joined: Thu Mar 09, 2006 6:05 pm
Location: Germany
Contact:

[MYSQLX] information_schema.tables

Post by DesasterUK » Tue Aug 07, 2007 10:49 am

I'm allways getting an error, the the war3ft couldn't query a database called information_schema.

I took a look in my phpmyadmin and realized there is no db called like this.
Now i took a look to the war3ft plugin.

In db/mysqlx.inl i found:

Code: Select all

	// Check to see if the table even exists!
	new szDB[128];
	get_pcvar_string( CVAR_wc3_sql_dbname	, szDB			, 127	);
	formatex ( szQuery, 255, "SELECT count(*) FROM information_schema.tables WHERE table_schema = '%s' AND table_name = 'war3users';", szDB );
	query = SQL_PrepareQuery( g_DBConn, szQuery );
As i can understand it checks if the plugin correctly converts all the data from the old db-structure to the new one, cause just before this query it converts to the new db-structure, right?
But what is the information_schema database for?
Its not a standard created db of mysql and its not created by war3ft (and i think its not meant to be created by war3ft).

--- Please enter the following information for support ---
War3ft Version: 3.0RC8
Amxmodx Version: 1.76d
Metamod Version: 1.19p28
amxx list:
amxx modules:
meta list:
Image

User avatar
Geesu
<b>King of the world!</b>
Posts: 3159
Joined: Tue Jul 05, 2005 9:24 pm
Contact:

Post by Geesu » Tue Aug 07, 2007 11:13 am

What is the exact error message
No Support via PM

DesasterUK
WC3Mods Donor
WC3Mods Donor
Posts: 223
Joined: Thu Mar 09, 2006 6:05 pm
Location: Germany
Contact:

Post by DesasterUK » Tue Aug 07, 2007 12:21 pm

Here is my error message

Code: Select all

[WAR3FT] MySQL X database connection successful
L 08/09/2007 - 13:00:39: [war3ft.amxx] [MYSQLX] Error in querying database, location: 12
L 08/09/2007 - 13:00:39: [MYSQLX] Error in querying database, location: 12
L 08/09/2007 - 13:00:39: [war3ft.amxx] [MYSQLX] Message: Table 'information_schema.tables' doesn't exist (1146)
L 08/09/2007 - 13:00:39: [MYSQLX] Message: Table 'information_schema.tables' doesn't exist (1146)
L 08/09/2007 - 13:00:39: [war3ft.amxx] [MYSQLX] Query statement: SELECT count(*) FROM information_schema.tables WHERE table_schema = 'wc3test' AND table_name = 'war3users';
L 08/09/2007 - 13:00:39: [MYSQLX] Query statement: SELECT count(*) FROM information_schema.tables WHERE table_schema = 'wc3test' AND table_name = 'war3users';
I haven't found something in the code of war3ft where it creates this database.
So why should it try to get some data out of it?
Last edited by DesasterUK on Thu Aug 09, 2007 10:52 am, edited 1 time in total.
Image

DesasterUK
WC3Mods Donor
WC3Mods Donor
Posts: 223
Joined: Thu Mar 09, 2006 6:05 pm
Location: Germany
Contact:

Post by DesasterUK » Thu Aug 09, 2007 5:22 am

Correct me if i'm wrong.
The information_schema thing is a new feature in the newest MYSQL-versions.
I found the information_schema first in the manual of mysql5.0.

Ppl using mysql4.x or older don't have this feature.
That seems to be the problem.

Your method to convert the data in RC7B1 works great on mysql4.x
Image

DesasterUK
WC3Mods Donor
WC3Mods Donor
Posts: 223
Joined: Thu Mar 09, 2006 6:05 pm
Location: Germany
Contact:

Post by DesasterUK » Thu Aug 09, 2007 11:05 am

Now i see what the information_schema is for, i think.

Everytime you create/drop a db/table the mysql saves some information data to it.
So u can simply check what kind of dbs and tables are manage by mysql.
But it's a Mysql5.x feature (i know i allready said this above)

Now the problem:
Mysql4.x users don't have a information_schema.
In the code i pasted in my first post you will try to see if an old war3ft database exist.
So it tries querying an non-existend database and crashes the whole convert-procedure.
Image

Post Reply