List:Internals« Previous MessageNext Message »
From:Marko Mäkelä Date:March 14 2005 6:19pm
Subject:bk commit into 5.0 tree (marko:1.1817)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of marko. When marko does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet
  1.1817 05/03/14 20:19:21 marko@stripped +1 -0
  dict0crea.c:
    dict_create_or_check_foreign_constraint_tables():
    Add a stored procedure that copies the most significant bit of
    SYS_TABLES.MIX_LEN to SYS_TABLES.N_COLS.
    Initially, the ROW_FORMAT=COMPACT indicator was stored in the MSB
    of MIX_LEN, but that field was left uninitialized by MySQL/InnoDB 3.23.49
    and earlier.  So, the bit had to be relocated to SYS_TABLES.N_COLS.
    This change will not be pushed, but it can be used by those who have
    created a large InnoDB database using an older pre-release snapshot of
    MySQL/InnoDB 5.0.3 and wish to avoid reconstructing the database.
    The bit was relocated in ChangeSet 1.1795; see
    http://lists.mysql.com/internals/22900 for the bk commit message.
    This patch has not been tested extensively.
    It can be applied on pre-1.1795 or post-1.1795 MySQL/InnoDB 5.0.3-bk.
    After this patch, pre-1.1795 MySQL/InnoDB 5.0.3-bk will crash
    when trying to load InnoDB tables (doing pretty much anything else than
    SHOW TABLES).  post-1.1795 MySQL/InnoDB should work fine.
    After a copy of MySQL/InnoDB 5.0.3-bk including this patch has been
    run once, this patch can be removed.  Again, this patch will not be
    pushed, and it should not be included in any official release of
    MySQL/InnoDB.

  innobase/dict/dict0crea.c
    1.33 05/03/14 20:11:03 marko@stripped +33 -0
    dict_create_or_check_foreign_constraint_tables():
    Add a stored procedure that copies the most significant bit of
    SYS_TABLES.MIX_LEN to SYS_TABLES.N_COLS.
    Initially, the ROW_FORMAT=COMPACT indicator was stored in the MSB
    of MIX_LEN, but that field was left uninitialized by MySQL/InnoDB 3.23.49
    and earlier.  So, the bit had to be relocated to SYS_TABLES.N_COLS.
    This change will not be pushed, but it can be used by those who have
    created a large InnoDB database using an older pre-release snapshot of
    MySQL/InnoDB 5.0.3 and wish to avoid reconstructing the database.
    The bit was relocated in ChangeSet 1.1795; see
    http://lists.mysql.com/internals/22900 for the bk commit message.
    This patch has not been tested extensively.
    It can be applied on pre-1.1795 or post-1.1795 MySQL/InnoDB 5.0.3-bk.
    After this patch, pre-1.1795 MySQL/InnoDB 5.0.3-bk will crash
    when trying to load InnoDB tables (doing pretty much anything else than
    SHOW TABLES).  post-1.1795 MySQL/InnoDB should work fine.
    After a copy of MySQL/InnoDB 5.0.3-bk including this patch has been
    run once, this patch can be removed.  Again, this patch will not be
    pushed, and it should not be included in any official release of
    MySQL/InnoDB.

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	marko
# Host:	hundin.mysql.fi
# Root:	/home/marko/mysql-5.0

--- 1.32/innobase/dict/dict0crea.c	Thu Mar 10 16:42:35 2005
+++ 1.33/innobase/dict/dict0crea.c	Mon Mar 14 20:11:03 2005
@@ -1161,6 +1161,39 @@
 	trx_t*		trx;
 	const char*	str;	
 
+/* 5.0.3 data dictionary adjustment begins */
+	trx = trx_allocate_for_mysql();
+	trx->op_info = "copying row_format=compact bits";
+	/* Since the InnoDB SQL parser does not know about & or <<,
+	we will have to use integer literals.  Furthermore, we cannot
+	write 0x80000000UL, because the InnoDB lexical analyzer uses atoi()
+	and not strtoul().  Last but not least, the atoi() in GNU libc will
+	round 2147483648 down to 2147483647, so we have to compose the
+	number from smaller ones. */
+	graph = pars_sql(
+			"PROCEDURE MOVE_COMPACT_FORMAT_BITS () IS\n"
+			"BEGIN\n"
+			"UPDATE SYS_TABLES SET N_COLS=N_COLS+2048*1048576\n"
+			"WHERE N_COLS<2048*1048576 AND MIX_LEN=2048*1048576;\n"
+			"COMMIT WORK;\n"
+			"END;\n");
+
+	ut_a(graph);
+
+	graph->trx = trx;
+	trx->graph = NULL;
+
+	graph->fork_type = QUE_FORK_MYSQL_INTERFACE;
+
+	thr = que_fork_start_command(graph);
+	ut_a(thr);
+
+	que_run_threads(thr);
+
+	ut_a(trx->error_state == DB_SUCCESS);
+	que_graph_free(graph);
+	trx_free_for_mysql(trx);
+/* 5.0.3 data dictionary adjustment ends */
 	mutex_enter(&(dict_sys->mutex));
 
 	table1 = dict_table_get_low("SYS_FOREIGN");
Thread
bk commit into 5.0 tree (marko:1.1817)Marko Mäkelä14 Mar