bug #1163595, NULL detection for TIMESTAMP
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
/* $Id$ */
|
||||
// vim: expandtab sw=4 ts=4 sts=4:
|
||||
// Check parameters
|
||||
error_reporting(E_ALL);
|
||||
|
||||
require_once('./libraries/common.lib.php');
|
||||
PMA_checkParameters(array('db','table','action','num_fields'));
|
||||
|
||||
@@ -342,6 +342,14 @@ for ($i = 0 ; $i < $num_fields; $i++) {
|
||||
$attribute = $submit_attribute;
|
||||
}
|
||||
|
||||
// here, we have a TIMESTAMP that SHOW FULL FIELDS reports as having the
|
||||
// NULL attribute, but SHOW CREATE TABLE says the contrary. Believe
|
||||
// the latter.
|
||||
if ($analyzed_sql[0]['create_table_fields'][$row['Field']]['type'] == 'TIMESTAMP' && $analyzed_sql[0]['create_table_fields'][$row['Field']]['timestamp_not_null'] == TRUE) {
|
||||
$row['Null'] = '';
|
||||
}
|
||||
|
||||
|
||||
// MySQL 4.1.2+ TIMESTAMP options
|
||||
// (if on_update_current_timestamp is set, then it's TRUE)
|
||||
if (isset($row['Field']) && isset($analyzed_sql[0]['create_table_fields'][$row['Field']]['on_update_current_timestamp'])) {
|
||||
|
Reference in New Issue
Block a user