Project

General

Profile

Actions

Bug #22104

closed

Cannot parse TRUNCATE TABLE in Install Tool

Added by Pascal Naujoks almost 15 years ago. Updated almost 15 years ago.

Status:
Closed
Priority:
Should have
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2010-02-10
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

compare-tool.png (43.7 KB) compare-tool.png Administrator Admin, 2010-02-10 19:07
13504_core.diff (4.63 KB) 13504_core.diff Administrator Admin, 2010-02-10 21:16
13504_dbal.diff (5.57 KB) 13504_dbal.diff Administrator Admin, 2010-02-10 21:16
13504_core_followup.diff (1.11 KB) 13504_core_followup.diff Administrator Admin, 2010-02-11 19:44
13504_dbal_followup.diff (3.43 KB) 13504_dbal_followup.diff Administrator Admin, 2010-02-11 19:44
Actions #1

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

Actions #2

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...

Actions #3

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?

Actions #4

Updated by Xavier Perseguers almost 15 years ago

Committed to Core trunk (rev. 6895) and DBAL trunk (rev. 29911).

Actions #5

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?

Actions #6

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.

Actions #7

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.

Actions #8

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!

Actions #9

Updated by Xavier Perseguers almost 15 years ago

Renamed public API TRUNCATETABLE* to TRUNCATE* according to Core ML's discussion.

Actions

Also available in: Atom PDF