From: Date: October 16 2006 5:02pm Subject: bk commit into 5.1 tree (stewart:1.2307) BUG#20839 List-Archive: http://lists.mysql.com/commits/13747 X-Bug: 20839 Message-Id: <20061016150221.993C31419B42@localhost.localdomain> Below is the list of changes that have just been committed into a local 5.1 repository of stewart. When stewart 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@stripped, 2006-10-17 01:02:12+10:00, stewart@willster.(none) +2 -0 BUG#20839 Illegal error code: 155 returned downgrading from 5.1.12-> 5.1.11 post-review fixes. Magnus suggested use of DYNAMIC_STRING instead of futzing with c strings. also making usage of TABLEs clearer in store_schema_partitions_record. client/mysqldump.c@stripped, 2006-10-17 01:02:06+10:00, stewart@willster.(none) +78 -86 Use DYNAMIC_STRING in code for dumping tablespaces sql/sql_show.cc@stripped, 2006-10-17 01:02:07+10:00, stewart@willster.(none) +4 -4 Make use of schema_table versus the table we're showing info about in store_schema_partitions_record clearer # 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: stewart # Host: willster.(none) # Root: /home/stewart/Documents/MySQL/5.1/bug20839 --- 1.254/client/mysqldump.c 2006-10-17 01:02:21 +10:00 +++ 1.255/client/mysqldump.c 2006-10-17 01:02:21 +10:00 @@ -2759,86 +2759,66 @@ static int dump_tablespaces_for_tables(char *db, char **table_names, int tables) { - char *where; + DYNAMIC_STRING where; int r; int i; - - size_t sz= 200+tables*(NAME_LEN*2+3); - where= my_malloc(sz, MYF(MY_WME)); - - if (!where) - return 1; - char name_buff[NAME_LEN*2+3]; + mysql_real_escape_string(mysql, name_buff, db, strlen(db)); - snprintf(where,sz-1, - " AND TABLESPACE_NAME IN (" - "SELECT DISTINCT TABLESPACE_NAME FROM" - " INFORMATION_SCHEMA.PARTITIONS" - " WHERE" - " TABLE_SCHEMA='%s'" - " AND TABLE_NAME IN (", name_buff); + init_dynamic_string(&where, " AND TABLESPACE_NAME IN (" + "SELECT DISTINCT TABLESPACE_NAME FROM" + " INFORMATION_SCHEMA.PARTITIONS" + " WHERE" + " TABLE_SCHEMA='", 256, 1024); + dynstr_append(&where, name_buff); + dynstr_append(&where, "' AND TABLE_NAME IN ("); for (i=0 ; itablespace_name), cs); else { - DBUG_PRINT("info",("FOO")); - char *ts= show_table->file->get_tablespace_name(thd); + char *ts= showing_table->file->get_tablespace_name(thd); if(ts) table->field[24]->store(ts, strlen(ts), cs); else