Clipper.install has no {}'s around table

andrewlevine - June 19, 2006 - 15:36
Project:Clipper
Version:HEAD
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

And therefore adds no prefix to the table on install. The rest of the module has the brackets so this probably causes problems with queries using tables that don't exist when db_prefix is on?

This should take 1 second to fix, don't think you need a patch ;)

<?php
/* $Id: clipper.install,v 1.1 2006/04/04 19:24:19 ber Exp $ */

function clipper_install() {
  switch (
$GLOBALS['db_type']) {
    case
'mysql':
    case
'mysqli':
     
db_query("CREATE TABLE relations (
                  rid int(10) NOT NULL auto_increment,
                  left_id int(10) NOT NULL default '0',
                  relationship text NOT NULL,
                  right_id int(10) NOT NULL default '0',
                  weight tinyint(3) NOT NULL default '0',
                  KEY rid (rid)
                ) ENGINE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;"
);
      break;
    case
'pgsql':
      break;
  }
}

function
clipper_update_1() {
  return
_system_update_utf8(array('relations'));
}
?>

#1

Bèr Kessels - June 19, 2006 - 18:14
Status:active» fixed

fixed in HEAD

#2

Anonymous - July 3, 2006 - 18:15
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.