diff --git a/tbl_create.php b/tbl_create.php
index 169960bb1..388598ebd 100755
--- a/tbl_create.php
+++ b/tbl_create.php
@@ -40,6 +40,7 @@
*/
require_once './libraries/common.inc.php';
require_once './libraries/Table.class.php';
+require_once './libraries/mysql_charsets.lib.php';
$GLOBALS['js_include'][] = 'functions.js';
$action = 'tbl_create.php';
@@ -249,7 +250,69 @@ if (isset($_REQUEST['do_save_data'])) {
$message = PMA_Message::success(__('Table %1$s has been created.'));
$message->addParam(PMA_backquote($db) . '.' . PMA_backquote($table));
- PMA_ajaxResponse($message, $message->isSuccess());
+ if($GLOBALS['is_ajax_request'] == true) {
+
+ //construct the html for the newly created table's row to be appended
+
+ $tbl_url_params = array();
+ $tbl_url_params['db'] = $db;
+ $tbl_url_params['table'] = $table;
+ $is_show_stats = $cfg['ShowStats'];
+
+ $new_table_string = '
' . "\n";
+ $new_table_string .= ' | ' . "\n";
+
+ $new_table_string .= '';
+ $new_table_string .= ''. $table . '';
+
+ if (PMA_Tracker::isActive()) {
+ $truename = str_replace(' ', ' ', htmlspecialchars($table));
+ if (PMA_Tracker::isTracked($db, $truename)) {
+ $new_table_string .= ' ';
+ } elseif (PMA_Tracker::getVersion($db, $truename) > 0) {
+ $new_table_string .= ' ';
+ }
+ unset($truename);
+ }
+ $new_table_string .= ' | ' . "\n";
+
+ $new_table_string .= ' | ' . "\n";
+
+ $new_table_string .= ' ';
+ $new_table_string .= ' ';
+ $new_table_string .= ' | ' . "\n";
+
+ $new_table_string .= ' | ' . "\n";
+
+ $new_table_string .= ' ';
+ $new_table_string .= ' ';
+ $new_table_string .= ' | ' . "\n";
+
+ $new_table_string .= ' | ' . "\n";
+
+ $new_table_string .= ' ';
+ $new_table_string .= ' ';
+ $new_table_string .= ' | ' . "\n";
+
+ $new_table_string .= '0 | ' . "\n"; //In a newly created table, number of rows has to be zero.
+
+ $new_table_string .= '' . $_REQUEST['tbl_type'] . ' | ' . "\n";
+
+ $new_table_string .= ' '. $_REQUEST['tbl_collation'] .' | ' . "\n";
+
+ if($is_show_stats) {
+ $new_table_string .= ' Size | ' . "\n" ;
+ $new_table_string .= '- | ' . "\n" ;
+ }
+
+ $new_table_string .= '
' . "\n";
+
+ $extra_data['new_table_string'] = $new_table_string;
+
+ PMA_ajaxResponse($message, $message->isSuccess(), $extra_data);
+ }
$display_query = $sql_query;
$sql_query = '';