~ubuntu-branches/ubuntu/lucid/phpmyadmin/lucid

« back to all changes in this revision

Viewing changes to tbl_alter.php

  • Committer: Bazaar Package Importer
  • Author(s): Thijs Kinkhorst
  • Date: 2009-12-08 18:35:56 UTC
  • mfrom: (1.2.6 upstream) (36.1.7 lucid)
  • Revision ID: james.westby@ubuntu.com-20091208183556-vr6gh28bmfe1rcps
Tags: 4:3.2.4-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
 * linked from table_structure, uses libraries/tbl_properties.inc.php to display
7
7
 * form and handles this form data
8
8
 *
9
 
 * @version $Id: tbl_alter.php 11994 2008-11-24 11:22:44Z nijel $
 
9
 * @version $Id: tbl_alter.php 13116 2009-11-13 11:14:10Z lem9 $
10
10
 * @package phpMyAdmin
11
11
 */
12
12
 
176
176
    $num_fields  = count($fields_meta);
177
177
    $action      = 'tbl_alter.php';
178
178
 
179
 
    // Get more complete field information
180
 
    // For now, this is done just for MySQL 4.1.2+ new TIMESTAMP options
181
 
    // but later, if the analyser returns more information, it
182
 
    // could be executed for any MySQL version and replace
183
 
    // the info given by SHOW FULL FIELDS FROM.
 
179
    // Get more complete field information.
 
180
    // For now, this is done to obtain MySQL 4.1.2+ new TIMESTAMP options
 
181
    // and to know when there is an empty DEFAULT value.
 
182
    // Later, if the analyser returns more information, it
 
183
    // could be executed to replace the info given by SHOW FULL FIELDS FROM.
184
184
    /**
185
185
     * @todo put this code into a require()
186
186
     * or maybe make it part of PMA_DBI_get_fields();
187
187
     */
188
188
 
189
 
    if (PMA_MYSQL_INT_VERSION < 50025) {
190
 
        // We also need this to correctly learn if a TIMESTAMP is NOT NULL, since
191
 
        // SHOW FULL FIELDS says NULL and SHOW CREATE TABLE says NOT NULL (tested
192
 
        // in MySQL 4.0.25).
 
189
    // We also need this to correctly learn if a TIMESTAMP is NOT NULL, since
 
190
    // SHOW FULL FIELDS says NULL and SHOW CREATE TABLE says NOT NULL (tested
 
191
    // in MySQL 4.0.25).
193
192
 
194
 
        $show_create_table = PMA_DBI_fetch_value(
195
 
            'SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table),
196
 
            0, 1);
197
 
        $analyzed_sql = PMA_SQP_analyze(PMA_SQP_parse($show_create_table));
198
 
    }
 
193
    $show_create_table = PMA_DBI_fetch_value('SHOW CREATE TABLE ' . PMA_backquote($db) . '.' . PMA_backquote($table), 0, 1);
 
194
    $analyzed_sql = PMA_SQP_analyze(PMA_SQP_parse($show_create_table));
 
195
    unset($show_create_table);
199
196
 
200
197
    /**
201
198
     * Form for changing properties.