Bug #22104
closedCannot parse TRUNCATE TABLE in Install Tool
0%
Description
When using Typo3 (4.3.1) with a MS-SQL DB the Database Analyser can not update the tables in the "COMPARE" section and results in an error message like this:
ERROR: Query could not be parsed: "SQL engine parse ERROR: "" is not a keyword: near "TRUNCATE TABLE be_groups "". Query: "TRUNCATE TABLE be_groups;"
I used patch http://bugs.typo3.org/view.php?id=13433 and http://bugs.typo3.org/view.php?id=4640 but this did not solve my problem.
(issue imported from #M13504)
Files
Updated by Pascal Naujoks almost 15 years ago
The SQL statement "TRUNCATE TABLE be_groups;" works fine when i directly use it against the db.
Used System Versions:
OS: Windows Server 2003 R2 SP 2
MSSQL: 9.00.3080.00 SP2 Express Edition
PHP: 5.2.12
Updated by Xavier Perseguers almost 15 years ago
Started by recreating the screenshot by reducing color depth from 32 bit to 8 bit and cropped useless info. Screenshot has now a size of 44 KB instead of 1.6 MB...
Updated by Xavier Perseguers almost 15 years ago
Hi,
This is true, parser is not able to parse TRUNCATE statements. However you have to understand that when using DBAL it's "normal" to have lots of queries that compare tool thinks should be executed. But you have to use common sense and understand that those proposals do not make sense for most of them. DBAL is not able to filter out those useless queries and will probably never be.
Your database seems to be just OK, you should not worry about this and go on configuring your website. BTW, you want to execute TRUNCATE TABLE be_users. Does it make sense? I guess no, why would you like to delete all records of this table?
Updated by Xavier Perseguers almost 15 years ago
Committed to Core trunk (rev. 6895) and DBAL trunk (rev. 29911).
Updated by Pascal Naujoks almost 15 years ago
Thanks for the fast response.
The main problem is, when i try to set up a new page in the backend i got an error telling me that i have no permission to create a page, sysfolder or whatever. But i'am logged in as admin user and it didn't make sense to me. So I thougt the necessary updates in the install tool could be the solution.
Sorry for the big screenshot but i also thougt i give you all the information i got. Maybe the truncates aren't the problem but the other queries that should be performed are?
Updated by Xavier Perseguers almost 15 years ago
Please send your screenshot to my email address. I did not see anything special but maybe I overlooked something.
Updated by Xavier Perseguers almost 15 years ago
Just to make it clear here... I first cleared my MSSQL 2000 DB => no more tables, reused the install tool to create all tables, created 2 admin users, then applied patches, executed the TRUNCATE TABLE statements (all of them) and made sure TRUNCATE did what it had to do.
I recreated an admin account, logged into BE and created a page. All works fine.
Updated by Pascal Naujoks almost 15 years ago
The solution to delete all tables and re-import them with the Database Analyzer also worked for me. Thanks!
Updated by Xavier Perseguers almost 15 years ago
Renamed public API TRUNCATETABLE* to TRUNCATE* according to Core ML's discussion.