Be ISAM for Fabrik yet ?

Status
Not open for further replies.

Ajyama

Member
When Fabrik3.2 was installed, Fabrik3.2 have created a InnoDB, Should I take back the ISAM for Fabrik data ? I'm not sure that it had made with Fabrik or mysql. At this time I had taken the system with the Fab3.2 + J!3.2 + mysql5.4.
 
Fabrik does not set the MySQL engine type. It should create whatever the default is set to in MySQL at the time of the create...

PHP:
/**
    * Make the create sql statement for the table
    *
    * [USER=20939]param[/USER]  bool    $addIfNotExists  add 'if not exists' to query
    * [USER=20939]param[/USER]  string  $table          table to get sql for(leave out to use models table)
    *
    * @return  string    sql to drop & or create table
    */
 
    public function getCreateTableSQL($addIfNotExists = false, $table = null)
    {
        $addIfNotExists = $addIfNotExists ? 'IF NOT EXISTS ' : '';
 
        if (is_null($table))
        {
            $table = $this->getGenericTableName();
        }
 
        $fields = $this->getDBFields($table);
        $primaryKey = "";
        $sql = "";
        $table = FabrikString::safeColName($table);
 
        if (is_array($fields))
        {
            $sql .= "CREATE TABLE $addIfNotExists" . $table . " (\n";
 
            foreach ($fields as $field)
            {
                $field->Field = FabrikString::safeColName($field->Field);
 
                if ($field->Key == 'PRI' && $field->Extra == 'auto_increment')
                {
                    $primaryKey = "PRIMARY KEY ($field->Field)";
                }
 
                $sql .= "$field->Field ";
                $sql .= ' ' . $field->Type . ' ';
 
                if ($field->Null == '')
                {
                    $sql .= " NOT NULL ";
                }
 
                if ($field->Default != '' && $field->Key != 'PRI')
                {
                    if ($field->Default == 'CURRENT_TIMESTAMP')
                    {
                        $sql .= "DEFAULT $field->Default";
                    }
                    else
                    {
                        $sql .= "DEFAULT '$field->Default'";
                    }
                }
 
                $sql .= $field->Extra . ",\n";
            }
 
            if ($primaryKey == '')
            {
                $sql = rtrim($sql, ",\n");
            }
 
            $sql .= $primaryKey . ");";
        }
 
        return $sql;
    }
 
Thanks for answering accurate point.
I read in somewhere that Mysql5.5 creates InnoDB as default. Otherwise I have a Mysql update from 5.3 to 5.4. So I'm not sure that Mysql5.3 would have created ISAM as default in the past, and either recent Mysql5.4 created InnoDB.
Anyway let go back to thing of InnoDB or ISAM, Fabrik has not recommended InnoDB, If it was recently changed to OK , I want to know it.
 
oops I have given a wrong sentence, updated from 5.3 to 5.5. So he created InnoDB.
Hmm , I am going to take back to ISAM.
was helpful, genyed.
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top