Author Topic: FYI: A few SQL syntax errors on TP startup.  (Read 2656 times)

0 Members and 1 Guest are viewing this topic.

RHSimard

  • Member
  • **
  • Posts: 4
    • View Profile
FYI: A few SQL syntax errors on TP startup.
« on: 2012-11-12 23:52:41 »
Re: TP 7.0-sp2

I've been using TP with MySQL for quite some time, with few problems.

I notice in the log file that TP issues some commands to the MySQL server on startup that are failing.  As far as I can tell, they aren't causing any problems, but you might want to know about them anyway.  The MySQL database was created using the scripts from the Cerious site (thank you!). This may or may not apply to the latest version of TP.

In the first two errors, TP seems to be looking for several nonexistent fields in the databaseinfo table. The existing table using MySQL's vertical format:

*************************** 1. row ***************************
  Field: thumbnail_width
   Type: int(11)
   Null: NO
    Key:
Default: NULL
  Extra:
*************************** 2. row ***************************
  Field: thumbnail_height
   Type: int(11)
   Null: NO
    Key:
Default: NULL
  Extra:
*************************** 3. row ***************************
  Field: thumbnail_type
   Type: int(11)
   Null: NO
    Key:
Default: NULL
  Extra:
*************************** 4. row ***************************
  Field: compress
   Type: int(11)
   Null: NO
    Key:
Default: NULL
  Extra:
*************************** 5. row ***************************
  Field: alias
   Type: char(80)
   Null: YES
    Key:
Default: NULL
  Extra:
*************************** 6. row ***************************
  Field: like_style
   Type: int(11)
   Null: NO
    Key:
Default: 1
  Extra:

(The default Thumbs.td4 database is the same except it doesn't have the like_style column.)

ODBC reports that it is looking for column fsthumbs, and later,

"reg_name", "reg_code_7.0", "reg_users" from "DatabaseInfo"

The next error occurs when it tries to change the name of a column in the gallery table, but uses a different syntax from MySQL.

Issued command:
ALTER TABLE "Gallery" ALTER COLUMN "name" VARCHAR(255);

MySQL syntax:
ALTER TABLE Gallery CHANGE name name VARCHAR(255);

>>> (Should I just alter the table myself to match this?)

Log file up to the last error:

----Build #2251
.\Subs.c(1281): @53225.640(0.000): Start logging
.\Thumbs.c(6709): @53225.640(0.000): Startup: Show Startup Dialog
.\Thumbs.c(6719): @53225.656(0.016): Startup: DontSendErrorsToMicrosoft
.\Thumbs.c(6721): @53225.656(0.000): Startup: Initialize ZIP access
.\Thumbs.c(6723): @53225.656(0.000): Startup: OleInitialize
.\Thumbs.c(6727): @53225.656(0.000): Startup: TPVModuleInit
.\Thumbs.c(6730): @53225.656(0.000): Startup: TPMovieInit
.\TPMovieCtl.cpp(104): @53225.671(0.015): Startup: Movie Control Registered
.\TPMovieCtl.cpp(106): @53225.687(0.016): Startup: Sound Renderer Registered
.\Thumbs.c(6734): @53225.687(0.000): Startup: LzhRuntimeInit
.\Thumbs.c(6736): @53225.687(0.000): Startup: InitFpxCs
.\Init.c(90): @53225.687(0.000): Startup: InitApplication

...

.\Init.c(783): @53225.859(0.000): Startup: CheckODBCInstallation
.\Init.c(786): @53225.859(0.000): Startup: CheckODBCTracing
.\Init.c(788): @53225.875(0.016): Startup: CheckAccessInstallation
.\Init.c(801): @53225.875(0.000): Startup: OpenDatabase: (no cmd line) or DSN=Thumbs2 Pvt;;QuotedID=Yes
.\Nail.c(1498): @53225.875(0.000): Startup: Opening database: DSN=Thumbs2 Pvt;;QuotedID=Yes (DSN=Thumbs2 Pvt;;QuotedID=Yes)
.\Tpdbsql.c(307): @53225.906(0.031): DB Error: <8033:0> [1054-42S22] [MySQL][ODBC 5.1 Driver][mysqld-5.1.59-community]Unknown column 'fsthumbs' in 'field list'
   Select "fsthumbs" from "DatabaseInfo"


.\Tpdbsql.c(326): @53225.906(0.000): DB Error: <8033:0> [0-HY010] [Microsoft][ODBC Driver Manager] Function sequence error
   Select "reg_name", "reg_code_7.0", "reg_users" from "DatabaseInfo"


d:\thumbs7\tpdbsql\dbsql_i.h(438): @53225.921(0.015): DB Error: <8033:0> [1064-42000] [MySQL][ODBC 5.1 Driver][mysqld-5.1.59-community]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VARCHAR(255)' at line 1
   ALTER TABLE "Gallery" ALTER COLUMN "name" VARCHAR(255);