Project

General

Profile

Actions

Feature #30977

closed

Wrong ext_tables.sql in an extension breaks Extension Manager and Installtool Database Analyzer logic

Added by Markus Bucher about 13 years ago. Updated over 4 years ago.

Status:
Rejected
Priority:
Could have
Assignee:
-
Category:
Extension Manager
Target version:
-
Start date:
2011-10-16
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
hard
Sprint Focus:
Needs Decision

Description

If an extension introduces a not valid SQL-Structure in ext_tables.sql the parsed sql-statement that contains the neccessary tables and fields gets mashed up.

Say you have an ext_tables.sql like this:

CREATE TABLE `test` (,
id int(11) unsigned NOT NULL auto_increment,

which lacks the closing ")" em tries to execute the following sql-query:

CREATE TABLE test (
id int(11) unsigned NOT NULL auto_increment,
CREATE TABLE cf_cache_hash (,
identifier varchar(250) NOT NULL default '',
expires int(11) unsigned NOT NULL default '0',
content mediumblob,
PRIMARY KEY (id),
KEY cache_id (identifier,expires)
) ENGINE=InnoDB;

Furthermore Install Tool Database Analyser offers deleting next extensions sql:

Removing tables (rename with prefix)

ALTER TABLE cf_cache_hash RENAME zzz_deleted_cf_cache_hash;
Records in table: 20

I recommend using a regex that checks for the validity of given sqls.

Actions

Also available in: Atom PDF