Below is the list of changes that have just been committed into a local
5.1 repository of monty. When monty 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-11-21 23:12:45+02:00, monty@stripped +27 -0
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into mysql.com:/home/my/mysql-5.1
MERGE: 1.2336.1.1
client/mysql.cc@stripped, 2006-11-21 22:42:10+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.234.2.2
client/mysql_upgrade.c@stripped, 2006-11-21 23:12:41+02:00, monty@stripped +0 -0
Manual merge
MERGE: 1.8.1.1
client/mysqlbinlog.cc@stripped, 2006-11-21 22:42:10+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.134.1.1
client/mysqltest.c@stripped, 2006-11-21 23:12:41+02:00, monty@stripped +8 -12
Manual merge
MERGE: 1.228.1.2
mysql-test/lib/mtr_report.pl@stripped, 2006-11-21 22:42:11+02:00, monty@stripped +1 -2
Auto merged
MERGE: 1.33.1.1
mysql-test/mysql-test-run-shell.sh@stripped, 2006-11-21 22:42:10+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.331.1.1
mysql-test/mysql-test-run.pl@stripped, 2006-11-21 23:12:41+02:00, monty@stripped +13 -28
Manual merge
MERGE: 1.183.5.2
mysql-test/r/connect.result@stripped, 2006-11-21 22:42:11+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.23.1.1
mysql-test/r/drop.result@stripped, 2006-11-21 22:42:11+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.31.1.1
mysql-test/r/information_schema.result@stripped, 2006-11-21 22:42:11+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.135.1.1
mysql-test/r/rpl_ndb_dd_advance.result@stripped, 2006-11-21 22:42:11+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.7.1.1
mysql-test/r/show_check.result@stripped, 2006-11-21 22:42:11+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.103.1.1
mysql-test/t/information_schema.test@stripped, 2006-11-21 22:42:11+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.86.1.1
mysql-test/t/mysqldump.test@stripped, 2006-11-21 22:42:11+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.122.2.1
mysql-test/t/rpl_ndb_dd_advance.test@stripped, 2006-11-21 22:42:11+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.7.1.1
mysql-test/t/system_mysql_db_fix.test@stripped, 2006-11-21 22:42:11+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.25.1.1
sql/field.cc@stripped, 2006-11-21 22:42:11+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.345.2.1
sql/field.h@stripped, 2006-11-21 22:42:12+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.190.1.1
sql/item_sum.cc@stripped, 2006-11-21 22:42:12+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.192.1.2
sql/mysql_priv.h@stripped, 2006-11-21 22:42:12+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.448.2.7
sql/mysqld.cc@stripped, 2006-11-21 22:42:12+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.583.8.1
sql/sql_class.cc@stripped, 2006-11-21 22:42:12+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.294.1.1
sql/sql_select.cc@stripped, 2006-11-21 22:42:13+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.452.6.3
sql/table.cc@stripped, 2006-11-21 22:42:13+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.246.2.3
storage/federated/ha_federated.cc@stripped, 2006-11-21 22:42:13+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.84.1.1
storage/innobase/handler/ha_innodb.cc@stripped, 2006-11-21 23:12:42+02:00, monty@stripped +0 -2
Manual merge
MERGE: 1.307.1.1
storage/myisam/ha_myisam.cc@stripped, 2006-11-21 22:42:13+02:00, monty@stripped +0 -0
Auto merged
MERGE: 1.199.1.1
# 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: monty
# Host: nosik.monty.fi
# Root: /home/my/mysql-5.1/RESYNC
--- 1.243/client/mysql.cc 2006-11-21 23:12:52 +02:00
+++ 1.244/client/mysql.cc 2006-11-21 23:12:52 +02:00
@@ -44,7 +44,7 @@
#include <locale.h>
#endif
-const char *VER= "14.12";
+const char *VER= "14.13";
/* Don't try to make a nice table if the data is too big */
#define MAX_COLUMN_LENGTH 1024
@@ -140,6 +140,7 @@
default_charset_used= 0, opt_secure_auth= 0,
default_pager_set= 0, opt_sigint_ignore= 0,
show_warnings= 0, executing_query= 0, interrupted_query= 0;
+static my_bool column_types_flag;
static ulong opt_max_allowed_packet, opt_net_buffer_length;
static uint verbose=0,opt_silent=0,opt_mysql_port=0, opt_local_infile=0;
static my_string opt_mysql_unix_port=0;
@@ -545,7 +546,7 @@
my_free(current_prompt,MYF(MY_ALLOW_ZERO_PTR));
mysql_server_end();
free_defaults(defaults_argv);
- my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
+ my_end(info_flag ? MY_CHECK_ERROR : 0);
exit(status.exit_status);
}
@@ -600,12 +601,13 @@
{"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are.", (gptr*) &charsets_dir,
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"default-character-set", OPT_DEFAULT_CHARSET,
- "Set the default character set.", (gptr*) &default_charset,
- (gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"column-type-info", OPT_COLUMN_TYPES, "Display column type information.",
+ (gptr*) &column_types_flag, (gptr*) &column_types_flag,
+ 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"compress", 'C', "Use compression in server/client protocol.",
(gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
+
#ifdef DBUG_OFF
{"debug", '#', "This is a non-debug version. Catch this and exit",
0,0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
@@ -613,8 +615,13 @@
{"debug", '#', "Output debug log", (gptr*) &default_dbug_option,
(gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
+ {"debug-info", 'T', "Print some debug info at exit.", (gptr*) &info_flag,
+ (gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"database", 'D', "Database to use.", (gptr*) ¤t_db,
(gptr*) ¤t_db, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"default-character-set", OPT_DEFAULT_CHARSET,
+ "Set the default character set.", (gptr*) &default_charset,
+ (gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"delimiter", OPT_DELIMITER, "Delimiter to be used.", (gptr*) &delimiter_str,
(gptr*) &delimiter_str, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"execute", 'e', "Execute command and quit. (Disables --force and history file)", 0,
@@ -711,8 +718,6 @@
#include "sslopt-longopts.h"
{"table", 't', "Output in table format.", (gptr*) &output_tables,
(gptr*) &output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
- {"debug-info", 'T', "Print some debug info at exit.", (gptr*) &info_flag,
- (gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"tee", OPT_TEE,
"Append everything into outfile. See interactive help (\\h) also. Does not work in batch mode. Disable with --disable-tee. This option is disabled by default.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -2085,7 +2090,7 @@
time_buff[0]=0;
if (result)
{
- if (!mysql_num_rows(result) && ! quick && !info_flag)
+ if (!mysql_num_rows(result) && ! quick && !column_types_flag)
{
strmov(buff, "Empty set");
}
@@ -2324,7 +2329,7 @@
bool *num_flag;
num_flag=(bool*) my_alloca(sizeof(bool)*mysql_num_fields(result));
- if (info_flag)
+ if (column_types_flag)
{
print_field_types(result);
if (!mysql_num_rows(result))
--- 1.334/mysql-test/mysql-test-run-shell.sh 2006-11-21 23:12:52 +02:00
+++ 1.335/mysql-test/mysql-test-run-shell.sh 2006-11-21 23:12:52 +02:00
@@ -900,15 +900,15 @@
# Save path and name of mysqldump
MYSQL_DUMP_DIR="$MYSQL_DUMP"
export MYSQL_DUMP_DIR
-MYSQL_CHECK="$MYSQL_CHECK --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLCHECK_OPT"
-MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
+MYSQL_CHECK="$MYSQL_CHECK --no-defaults --debug-info -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLCHECK_OPT"
+MYSQL_DUMP="$MYSQL_DUMP --no-defaults --debug-info -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
MYSQL_SLAP="$MYSQL_SLAP -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLSLAP_OPT"
MYSQL_DUMP_SLAVE="$MYSQL_DUMP_DIR --no-defaults -uroot --socket=$SLAVE_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
-MYSQL_SHOW="$MYSQL_SHOW -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLSHOW_OPT"
-MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_OPT"
-MYSQL_IMPORT="$MYSQL_IMPORT -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
+MYSQL_SHOW="$MYSQL_SHOW --no-defaults --debug-info -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLSHOW_OPT"
+MYSQL_BINLOG="$MYSQL_BINLOG --debug-info --no-defaults --local-load=$MYSQL_TMP_DIR --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_OPT"
+MYSQL_IMPORT="$MYSQL_IMPORT --debug-info -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose"
-MYSQL="$MYSQL --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
+MYSQL="$MYSQL --no-defaults --debug-info --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
export MYSQL MYSQL_CHECK MYSQL_DUMP MYSQL_DUMP_SLAVE MYSQL_SHOW MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES MYSQL_IMPORT
export CLIENT_BINDIR MYSQL_CLIENT_TEST CHARSETSDIR MYSQL_MY_PRINT_DEFAULTS
export MYSQL_SLAP
@@ -1281,8 +1281,8 @@
rm_ndbcluster_tables()
{
- $RM -f $1/cluster/apply_status*
- $RM -f $1/cluster/schema*
+ $RM -f $1/mysql/apply_status*
+ $RM -f $1/mysql/schema*
}
stop_ndbcluster()
--- 1.352/sql/field.cc 2006-11-21 23:12:52 +02:00
+++ 1.353/sql/field.cc 2006-11-21 23:12:52 +02:00
@@ -1237,12 +1237,6 @@
}
-uint Field::offset()
-{
- return (uint) (ptr - (char*) table->record[0]);
-}
-
-
void Field::hash(ulong *nr, ulong *nr2)
{
if (is_null())
--- 1.191/sql/field.h 2006-11-21 23:12:52 +02:00
+++ 1.192/sql/field.h 2006-11-21 23:12:52 +02:00
@@ -342,7 +342,10 @@
virtual int pack_cmp(const char *b, uint key_length_arg,
my_bool insert_or_update)
{ return cmp(ptr,b); }
- uint offset(); // Should be inline ...
+ uint offset(byte *record)
+ {
+ return (uint) (ptr - (char*) record);
+ }
void copy_from_tmp(int offset);
uint fill_cache_field(struct st_cache_field *copy);
virtual bool get_date(TIME *ltime,uint fuzzydate);
--- 1.200/storage/myisam/ha_myisam.cc 2006-11-21 23:12:52 +02:00
+++ 1.201/storage/myisam/ha_myisam.cc 2006-11-21 23:12:52 +02:00
@@ -609,7 +609,7 @@
{
param.testflag&= ~T_RETRY_WITHOUT_QUICK;
sql_print_information("Retrying repair of: '%s' without quick",
- table->s->path);
+ table->s->path.str);
continue;
}
param.testflag&= ~T_QUICK;
@@ -617,7 +617,7 @@
{
param.testflag= (param.testflag & ~T_REP_BY_SORT) | T_REP;
sql_print_information("Retrying repair of: '%s' with keycache",
- table->s->path);
+ table->s->path.str);
continue;
}
break;
@@ -629,7 +629,7 @@
sql_print_information("Found %s of %s rows when repairing '%s'",
llstr(file->state->records, llbuff),
llstr(start_records, llbuff2),
- table->s->path);
+ table->s->path.str);
}
return error;
}
@@ -1157,7 +1157,7 @@
// Don't use quick if deleted rows
if (!file->state->del && (myisam_recover_options & HA_RECOVER_QUICK))
check_opt.flags|=T_QUICK;
- sql_print_warning("Checking table: '%s'",table->s->path);
+ sql_print_warning("Checking table: '%s'",table->s->path.str);
old_query= thd->query;
old_query_length= thd->query_length;
@@ -1168,7 +1168,7 @@
if ((marked_crashed= mi_is_crashed(file)) || check(thd, &check_opt))
{
- sql_print_warning("Recovering table: '%s'",table->s->path);
+ sql_print_warning("Recovering table: '%s'",table->s->path.str);
check_opt.flags=
((myisam_recover_options & HA_RECOVER_BACKUP ? T_BACKUP_DATA : 0) |
(marked_crashed ? 0 : T_QUICK) |
@@ -1460,6 +1460,7 @@
bool found_real_auto_increment=0;
enum ha_base_keytype type;
char buff[FN_REFLEN];
+ byte *record;
KEY *pos;
MI_KEYDEF *keydef;
MI_COLUMNDEF *recinfo,*recinfo_pos;
@@ -1564,6 +1565,7 @@
found_real_auto_increment= share->next_number_key_offset == 0;
}
+ record= table_arg->record[0];
recpos=0; recinfo_pos=recinfo;
while (recpos < (uint) share->reclength)
{
@@ -1573,7 +1575,7 @@
for (field=table_arg->field ; *field ; field++)
{
- if ((fieldpos=(*field)->offset()) >= recpos &&
+ if ((fieldpos=(*field)->offset(record)) >= recpos &&
fieldpos <= minpos)
{
/* skip null fields */
--- 1.198/sql/item_sum.cc 2006-11-21 23:12:52 +02:00
+++ 1.199/sql/item_sum.cc 2006-11-21 23:12:52 +02:00
@@ -2929,13 +2929,14 @@
*/
Field *field= (*field_item)->get_tmp_table_field();
/*
- If field_item is a const item then either get_tp_table_field returns 0
+ If field_item is a const item then either get_tmp_table_field returns 0
or it is an item over a const table.
*/
if (field && !(*field_item)->const_item())
{
int res;
- uint offset= field->offset() - table->s->null_bytes;
+ uint offset= (field->offset(field->table->record[0]) -
+ table->s->null_bytes);
if ((res= field->cmp((char *) key1 + offset, (char *) key2 + offset)))
return res;
}
@@ -2973,7 +2974,8 @@
if (field && !item->const_item())
{
int res;
- uint offset= field->offset() - table->s->null_bytes;
+ uint offset= (field->offset(field->table->record[0]) -
+ table->s->null_bytes);
if ((res= field->cmp((char *) key1 + offset, (char *) key2 + offset)))
return (*order_item)->asc ? res : -res;
}
@@ -3041,7 +3043,8 @@
because it contains both order and arg list fields.
*/
Field *field= (*arg)->get_tmp_table_field();
- uint offset= field->offset() - table->s->null_bytes;
+ uint offset= (field->offset(field->table->record[0]) -
+ table->s->null_bytes);
DBUG_ASSERT(offset < table->s->reclength);
res= field->val_str(&tmp, (char *) key + offset);
}
--- 1.457/sql/mysql_priv.h 2006-11-21 23:12:52 +02:00
+++ 1.458/sql/mysql_priv.h 2006-11-21 23:12:52 +02:00
@@ -1434,7 +1434,8 @@
#endif
void mysql_print_status();
/* key.cc */
-int find_ref_key(KEY *key, uint key_count, Field *field, uint *key_length);
+int find_ref_key(KEY *key, uint key_count, byte *record, Field *field,
+ uint *key_length);
void key_copy(byte *to_key, byte *from_record, KEY *key_info, uint key_length);
void key_restore(byte *to_record, byte *from_key, KEY *key_info,
uint key_length);
--- 1.136/client/mysqlbinlog.cc 2006-11-21 23:12:52 +02:00
+++ 1.137/client/mysqlbinlog.cc 2006-11-21 23:12:52 +02:00
@@ -66,7 +66,7 @@
static bool opt_hexdump= 0;
static bool opt_base64_output= 0;
static const char* database= 0;
-static my_bool force_opt= 0, short_form= 0, remote_opt= 0;
+static my_bool force_opt= 0, short_form= 0, remote_opt= 0, info_flag;
static ulonglong offset = 0;
static const char* host = 0;
static int port= 0;
@@ -716,6 +716,8 @@
{"debug", '#', "Output debug log.", (gptr*) &default_dbug_option,
(gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
+ {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (gptr*) &info_flag,
+ (gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"disable-log-bin", 'D', "Disable binary log. This is useful, if you "
"enabled --to-last-log and are sending the output to the same MySQL server. "
"This way you could avoid an endless loop. You would also like to use it "
@@ -844,7 +846,7 @@
va_end(args);
cleanup();
/* We cannot free DBUG, it is used in global destructors after exit(). */
- my_end(MY_DONT_FREE_DBUG);
+ my_end((info_flag ? MY_CHECK_ERROR : 0) | MY_DONT_FREE_DBUG);
exit(1);
}
@@ -852,7 +854,7 @@
static void print_version()
{
- printf("%s Ver 3.1 for %s at %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE);
+ printf("%s Ver 3.2 for %s at %s\n", my_progname, SYSTEM_TYPE, MACHINE_TYPE);
NETWARE_SET_SCREEN_MODE(1);
}
@@ -1545,7 +1547,7 @@
free_defaults(defaults_argv);
my_free_open_file_info();
/* We cannot free DBUG, it is used in global destructors after exit(). */
- my_end(MY_DONT_FREE_DBUG);
+ my_end((info_flag ? MY_CHECK_ERROR : 0) | MY_DONT_FREE_DBUG);
exit(exit_value);
DBUG_RETURN(exit_value); // Keep compilers happy
}
--- 1.590/sql/mysqld.cc 2006-11-21 23:12:52 +02:00
+++ 1.591/sql/mysqld.cc 2006-11-21 23:12:52 +02:00
@@ -3208,7 +3208,7 @@
using_update_log=1;
}
- if (plugin_init(0))
+ if (plugin_init(opt_bootstrap))
{
sql_print_error("Failed to init plugins.");
return 1;
--- 1.298/sql/sql_class.cc 2006-11-21 23:12:52 +02:00
+++ 1.299/sql/sql_class.cc 2006-11-21 23:12:52 +02:00
@@ -2518,7 +2518,9 @@
for (uint *ptr= beg ; ptr != end ; ++ptr)
{
Field_blob* const blob= (Field_blob*) table->field[*ptr];
- length+= blob->get_length((const char *) (data + blob->offset())) + 2;
+ length+= blob->get_length((const char*) (data +
+ blob->offset(table->record[0]))) +
+ HA_KEY_BLOB_LENGTH;
}
return length;
--- 1.465/sql/sql_select.cc 2006-11-21 23:12:52 +02:00
+++ 1.466/sql/sql_select.cc 2006-11-21 23:12:52 +02:00
@@ -9491,7 +9491,7 @@
bool maybe_null=(*cur_group->item)->maybe_null;
key_part_info->null_bit=0;
key_part_info->field= field;
- key_part_info->offset= field->offset();
+ key_part_info->offset= field->offset(table->record[0]);
key_part_info->length= (uint16) field->key_length();
key_part_info->type= (uint8) field->key_type();
key_part_info->key_type =
@@ -9588,7 +9588,7 @@
{
key_part_info->null_bit=0;
key_part_info->field= *reg_field;
- key_part_info->offset= (*reg_field)->offset();
+ key_part_info->offset= (*reg_field)->offset(table->record[0]);
key_part_info->length= (uint16) (*reg_field)->pack_length();
key_part_info->type= (uint8) (*reg_field)->key_type();
key_part_info->key_type =
@@ -12560,8 +12560,9 @@
DBUG_RETURN(0);
}
Field **first_field=entry->field+entry->s->fields - field_count;
- offset= field_count ?
- entry->field[entry->s->fields - field_count]->offset() : 0;
+ offset= (field_count ?
+ entry->field[entry->s->fields - field_count]->
+ offset(entry->record[0]) : 0);
reclength=entry->s->reclength-offset;
free_io_cache(entry); // Safety
--- 1.254/sql/table.cc 2006-11-21 23:12:52 +02:00
+++ 1.255/sql/table.cc 2006-11-21 23:12:52 +02:00
@@ -30,7 +30,7 @@
uchar *head, File file);
static void fix_type_pointers(const char ***array, TYPELIB *point_to_type,
uint types, char **names);
-static uint find_field(Field **fields, uint start, uint length);
+static uint find_field(Field **fields, byte *record, uint start, uint length);
/* Get column name from column hash */
@@ -1069,6 +1069,7 @@
Field *field;
if (new_field_pack_flag <= 1)
key_part->fieldnr= (uint16) find_field(share->field,
+ share->default_values,
(uint) key_part->offset,
(uint) key_part->length);
if (!key_part->fieldnr)
@@ -1232,24 +1233,19 @@
if (share->found_next_number_field)
{
- /*
- We must have a table object for find_ref_key to calculate field offset
- */
- TABLE tmp_table;
- tmp_table.record[0]= share->default_values;
-
reg_field= *share->found_next_number_field;
- reg_field->table= &tmp_table;
if ((int) (share->next_number_index= (uint)
- find_ref_key(share->key_info, share->keys, reg_field,
+ find_ref_key(share->key_info, share->keys,
+ share->default_values, reg_field,
&share->next_number_key_offset)) < 0)
{
+ /* Wrong field definition */
+ DBUG_ASSERT(0);
reg_field->unireg_check= Field::NONE; /* purecov: inspected */
share->found_next_number_field= 0;
}
else
reg_field->flags |= AUTO_INCREMENT_FLAG;
- reg_field->table= 0;
}
if (share->blob_fields)
@@ -1969,7 +1965,7 @@
# field number +1
*/
-static uint find_field(Field **fields, uint start, uint length)
+static uint find_field(Field **fields, byte *record, uint start, uint length)
{
Field **field;
uint i, pos;
@@ -1977,7 +1973,7 @@
pos= 0;
for (field= fields, i=1 ; *field ; i++,field++)
{
- if ((*field)->offset() == start)
+ if ((*field)->offset(record) == start)
{
if ((*field)->key_length() == length)
return (i);
--- 1.137/mysql-test/r/information_schema.result 2006-11-21 23:12:52 +02:00
+++ 1.138/mysql-test/r/information_schema.result 2006-11-21 23:12:52 +02:00
@@ -14,7 +14,6 @@
select schema_name from information_schema.schemata;
schema_name
information_schema
-cluster
mysql
test
show databases like 't%';
@@ -23,7 +22,6 @@
show databases;
Database
information_schema
-cluster
mysql
test
show databases where `database` = 't%';
@@ -35,7 +33,7 @@
create table mysqltest.t4(a int);
create table t5 (id int auto_increment primary key);
insert into t5 values (10);
-create view v1 (c) as select table_name from information_schema.TABLES where table_schema!='cluster';
+create view v1 (c) as select table_name from information_schema.TABLES where table_name<>'binlog_index' AND table_name<>'apply_status';
select * from v1;
c
CHARACTER_SETS
@@ -352,7 +350,6 @@
select * from v0;
c
information_schema
-cluster
mysql
test
explain select * from v0;
@@ -852,7 +849,7 @@
delete from mysql.user where user='mysqltest_4';
delete from mysql.db where user='mysqltest_4';
flush privileges;
-SELECT table_schema, count(*) FROM information_schema.TABLES where TABLE_SCHEMA!='cluster' GROUP BY TABLE_SCHEMA;
+SELECT table_schema, count(*) FROM information_schema.TABLES where table_name<>'binlog_index' AND table_name<>'apply_status' GROUP BY TABLE_SCHEMA;
table_schema count(*)
information_schema 27
mysql 21
--- 1.87/mysql-test/t/information_schema.test 2006-11-21 23:12:52 +02:00
+++ 1.88/mysql-test/t/information_schema.test 2006-11-21 23:12:52 +02:00
@@ -37,7 +37,7 @@
create table mysqltest.t4(a int);
create table t5 (id int auto_increment primary key);
insert into t5 values (10);
-create view v1 (c) as select table_name from information_schema.TABLES where table_schema!='cluster';
+create view v1 (c) as select table_name from information_schema.TABLES where table_name<>'binlog_index' AND table_name<>'apply_status';
select * from v1;
select c,table_name from v1
@@ -528,7 +528,7 @@
# Bug #9404 information_schema: Weird error messages
# with SELECT SUM() ... GROUP BY queries
#
-SELECT table_schema, count(*) FROM information_schema.TABLES where TABLE_SCHEMA!='cluster' GROUP BY TABLE_SCHEMA;
+SELECT table_schema, count(*) FROM information_schema.TABLES where table_name<>'binlog_index' AND table_name<>'apply_status' GROUP BY TABLE_SCHEMA;
#
--- 1.12/client/mysql_upgrade.c 2006-11-21 23:12:52 +02:00
+++ 1.13/client/mysql_upgrade.c 2006-11-21 23:12:52 +02:00
@@ -629,7 +629,7 @@
if (upgrade_defaults_created)
my_delete(upgrade_defaults_path, MYF(0));
- my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : 0);
+ my_end(info_flag ? MY_CHECK_ERROR : 0);
return ret;
}
--- 1.8/mysql-test/r/rpl_ndb_dd_advance.result 2006-11-21 23:12:52 +02:00
+++ 1.9/mysql-test/r/rpl_ndb_dd_advance.result 2006-11-21 23:12:52 +02:00
@@ -355,13 +355,13 @@
SELECT COUNT(*) FROM history;
COUNT(*)
2000
-CREATE TEMPORARY TABLE IF NOT EXISTS cluster.backup_info (id INT, backup_id INT) ENGINE = HEAP;
-DELETE FROM cluster.backup_info;
-LOAD DATA INFILE '../tmp.dat' INTO TABLE cluster.backup_info FIELDS TERMINATED BY ',';
-SELECT @the_backup_id:=backup_id FROM cluster.backup_info;
+CREATE TEMPORARY TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP;
+DELETE FROM mysql.backup_info;
+LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ',';
+SELECT @the_backup_id:=backup_id FROM mysql.backup_info;
@the_backup_id:=backup_id
<the_backup_id>
-DROP TABLE IF EXISTS cluster.backup_info;
+DROP TABLE IF EXISTS mysql.backup_info;
************ Restore the slave ************************
CREATE DATABASE tpcb;
***** Check a few slave restore values ***************
--- 1.8/mysql-test/t/rpl_ndb_dd_advance.test 2006-11-21 23:12:52 +02:00
+++ 1.9/mysql-test/t/rpl_ndb_dd_advance.test 2006-11-21 23:12:52 +02:00
@@ -436,19 +436,19 @@
--exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="localhost:$NDBCLUSTER_PORT" -d sys --delimiter=',' SYSTAB_0 | grep 520093696 > $MYSQLTEST_VARDIR/tmp.dat
-CREATE TEMPORARY TABLE IF NOT EXISTS cluster.backup_info (id INT, backup_id INT) ENGINE = HEAP;
+CREATE TEMPORARY TABLE IF NOT EXISTS mysql.backup_info (id INT, backup_id INT) ENGINE = HEAP;
-DELETE FROM cluster.backup_info;
+DELETE FROM mysql.backup_info;
-LOAD DATA INFILE '../tmp.dat' INTO TABLE cluster.backup_info FIELDS TERMINATED BY ',';
+LOAD DATA INFILE '../tmp.dat' INTO TABLE mysql.backup_info FIELDS TERMINATED BY ',';
--exec rm $MYSQLTEST_VARDIR/tmp.dat || true
--replace_column 1 <the_backup_id>
-SELECT @the_backup_id:=backup_id FROM cluster.backup_info;
+SELECT @the_backup_id:=backup_id FROM mysql.backup_info;
let the_backup_id=`select @the_backup_id`;
-DROP TABLE IF EXISTS cluster.backup_info;
+DROP TABLE IF EXISTS mysql.backup_info;
#RESET MASTER;
--echo ************ Restore the slave ************************
--- 1.39/mysql-test/lib/mtr_report.pl 2006-11-21 23:12:52 +02:00
+++ 1.40/mysql-test/lib/mtr_report.pl 2006-11-21 23:12:52 +02:00
@@ -38,7 +38,7 @@
my $reject_file= "r/$tname.reject";
my $result_file= "r/$tname.result";
- my $log_file= "r/$tname.log";
+ my $log_file= "$::opt_vardir/log/$tname.log";
my $eval_file= "r/$tname.eval";
if ( $::opt_suite ne "main" )
@@ -243,6 +243,7 @@
foreach my $pattern ( "^Warning:", "^Error:", "^==.* at 0x",
"InnoDB: Warning", "missing DBUG_RETURN",
"mysqld: Warning",
+ "allocated at line",
"Attempting backtrace", "Assertion .* failed" )
{
foreach my $errlog ( sort glob("$::opt_vardir/log/*.err") )
--- 1.232/mysql-test/mysql-test-run.pl 2006-11-21 23:12:52 +02:00
+++ 1.233/mysql-test/mysql-test-run.pl 2006-11-21 23:12:52 +02:00
@@ -1507,7 +1507,7 @@
sub generate_cmdline_mysqldump ($) {
my($mysqld) = @_;
return
- "$exe_mysqldump --no-defaults -uroot " .
+ "$exe_mysqldump --no-defaults --debug-info -uroot " .
"--port=$mysqld->{'port'} " .
"--socket=$mysqld->{'path_sock'} --password=";
}
@@ -1708,7 +1708,7 @@
# Setup env so childs can execute mysqlcheck
# ----------------------------------------------------
my $cmdline_mysqlcheck=
- "$exe_mysqlcheck --no-defaults -uroot " .
+ "$exe_mysqlcheck --no-defaults --debug-info -uroot " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password=";
@@ -1759,7 +1759,7 @@
# Setup env so childs can execute mysqlimport
# ----------------------------------------------------
my $cmdline_mysqlimport=
- "$exe_mysqlimport -uroot " .
+ "$exe_mysqlimport --debug-info -uroot " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password=";
@@ -1775,7 +1775,7 @@
# Setup env so childs can execute mysqlshow
# ----------------------------------------------------
my $cmdline_mysqlshow=
- "$exe_mysqlshow -uroot " .
+ "$exe_mysqlshow --debug-info -uroot " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} --password=";
@@ -1791,7 +1791,7 @@
# ----------------------------------------------------
my $cmdline_mysqlbinlog=
"$exe_mysqlbinlog" .
- " --no-defaults --local-load=$opt_tmpdir";
+ " --no-defaults --debug-info --local-load=$opt_tmpdir";
if ( $mysql_version_id >= 50000 )
{
$cmdline_mysqlbinlog .=" --character-sets-dir=$path_charsetsdir";
@@ -1808,7 +1808,7 @@
# Setup env so childs can execute mysql
# ----------------------------------------------------
my $cmdline_mysql=
- "$exe_mysql --no-defaults --host=localhost --user=root --password= " .
+ "$exe_mysql --no-defaults --debug-info --host=localhost --user=root --password= " .
"--port=$master->[0]->{'port'} " .
"--socket=$master->[0]->{'path_sock'} ".
"--character-sets-dir=$path_charsetsdir";
@@ -2425,8 +2425,8 @@
sub rm_ndbcluster_tables ($) {
my $dir= shift;
- foreach my $bin ( glob("$dir/cluster/apply_status*"),
- glob("$dir/cluster/schema*") )
+ foreach my $bin ( glob("$dir/mysql/apply_status*"),
+ glob("$dir/mysql/schema*") )
{
unlink($bin);
}
@@ -3139,6 +3139,9 @@
my $res= run_mysqltest($tinfo);
mtr_report_test_name($tinfo);
+
+ do_after_run_mysqltest($tinfo);
+
if ( $res == 0 )
{
mtr_report_test_passed($tinfo);
@@ -3172,8 +3175,6 @@
"mysqltest returned unexpected code $res, it has probably crashed";
report_failure_and_restart($tinfo);
}
-
- do_after_run_mysqltest($tinfo);
}
# ----------------------------------------------------------------------
@@ -4088,6 +4089,7 @@
if ( $clusters->[0]->{'pid'} and ! $master->[1]->{'pid'} )
{
+ {
# Test needs cluster, start an extra mysqld connected to cluster
if ( $mysql_version_id >= 50100 )
@@ -4096,12 +4098,12 @@
# tables ok FIXME This is a workaround so that only one mysqld
# create the tables
if ( ! sleep_until_file_created(
- "$master->[0]->{'path_myddir'}/cluster/apply_status.ndb",
+ "$master->[0]->{'path_myddir'}/mysql/apply_status.ndb",
$master->[0]->{'start_timeout'},
$master->[0]->{'pid'}))
{
- $tinfo->{'comment'}= "Failed to create 'cluster/apply_status' table";
+ $tinfo->{'comment'}= "Failed to create 'mysql/apply_status' table";
return 1;
}
}
@@ -4300,6 +4302,7 @@
mtr_add_arg($args, "--skip-safemalloc");
mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
+ mtr_add_arg($args, "--logdir=%s/log", $opt_vardir);
if ($tinfo->{'component_id'} eq 'im')
{
--- 1.106/mysql-test/r/show_check.result 2006-11-21 23:12:52 +02:00
+++ 1.107/mysql-test/r/show_check.result 2006-11-21 23:12:52 +02:00
@@ -53,7 +53,6 @@
show databases;
Database
information_schema
-cluster
mysql
test
show databases like "test%";
--- 1.310/storage/innobase/handler/ha_innodb.cc 2006-11-21 23:12:52 +02:00
+++ 1.311/storage/innobase/handler/ha_innodb.cc 2006-11-21 23:12:52 +02:00
@@ -6630,7 +6630,7 @@
mutex->count_spin_rounds,
mutex->count_os_wait,
mutex->count_os_yield,
- (ulong) mutex->lspent_time/1000);
+ (ulong) (mutex->lspent_time/1000));
if (stat_print(thd, innobase_hton_name,
hton_name_len, buf1, buf1len,
@@ -6660,7 +6660,7 @@
rw_lock_count, rw_lock_count_spin_loop,
rw_lock_count_spin_rounds,
rw_lock_count_os_wait, rw_lock_count_os_yield,
- (ulong) rw_lock_wait_time/1000);
+ (ulong) (rw_lock_wait_time/1000));
if (stat_print(thd, innobase_hton_name, hton_name_len,
STRING_WITH_LEN("rw_lock_mutexes"), buf2, buf2len)) {
--- 1.246/client/mysqltest.c 2006-11-21 23:12:52 +02:00
+++ 1.247/client/mysqltest.c 2006-11-21 23:12:52 +02:00
@@ -80,12 +80,13 @@
OPT_SSL_CA, OPT_SSL_CAPATH, OPT_SSL_CIPHER, OPT_PS_PROTOCOL,
OPT_SP_PROTOCOL, OPT_CURSOR_PROTOCOL, OPT_VIEW_PROTOCOL,
OPT_SSL_VERIFY_SERVER_CERT, OPT_MAX_CONNECT_RETRIES,
- OPT_MARK_PROGRESS, OPT_CHARSETS_DIR
+ OPT_MARK_PROGRESS, OPT_CHARSETS_DIR, OPT_LOG_DIR, OPT_DEBUG_INFO};
};
static int record= 0, opt_sleep= -1;
static char *db= 0, *pass= 0;
const char *user= 0, *host= 0, *unix_sock= 0, *opt_basedir= "./";
+const char *opt_logdir= "";
const char *opt_include= 0, *opt_charsets_dir;
static int port= 0;
static int opt_max_connect_retries;
@@ -97,6 +98,7 @@
static my_bool view_protocol= 0, view_protocol_enabled= 0;
static my_bool cursor_protocol= 0, cursor_protocol_enabled= 0;
static my_bool parsing_disabled= 0;
+static my_bool info_flag;
static my_bool display_result_vertically= FALSE, display_metadata= FALSE;
static my_bool disable_query_log= 0, disable_result_log= 0;
static my_bool disable_warnings= 0, disable_ps_warnings= 0;
@@ -752,7 +754,7 @@
/* Clean up and exit */
free_used_memory();
- my_end(MY_CHECK_ERROR);
+ my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : MY_CHECK_ERROR);
if (!silent)
printf("not ok\n");
@@ -792,7 +794,7 @@
/* Clean up and exit */
free_used_memory();
- my_end(MY_CHECK_ERROR);
+ my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : MY_CHECK_ERROR);
if (!silent)
printf("skipped\n");
@@ -3800,12 +3802,16 @@
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
+ {"debug-info", OPT_DEBUG_INFO, "Print some debug info at exit.", (gptr*) &info_flag,
+ (gptr*) &info_flag, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"include", 'i', "Include SQL before each test case.", (gptr*) &opt_include,
(gptr*) &opt_include, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ {"logdir", OPT_LOG_DIR, "Directory for log files", (gptr*) &opt_logdir,
+ (gptr*) &opt_logdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"mark-progress", OPT_MARK_PROGRESS,
- "Write linenumber and elapsed time to <testname>.progress ",
+ "Write linenumber and elapsed time to <testname>.progress",
(gptr*) &opt_mark_progress, (gptr*) &opt_mark_progress, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"max-connect-retries", OPT_MAX_CONNECT_RETRIES,
@@ -4086,7 +4092,8 @@
void dump_result_to_log_file(char *buf, int size)
{
char log_file[FN_REFLEN];
- str_to_file(fn_format(log_file, result_file_name, "", ".log",
+ str_to_file(fn_format(log_file, result_file_name, opt_logdir, ".log",
+ *opt_logdir ? MY_REPLACE_DIR | MY_REPLACE_EXT:
MY_REPLACE_EXT),
buf, size);
}
@@ -4094,8 +4101,9 @@
void dump_progress(void)
{
char log_file[FN_REFLEN];
- str_to_file(fn_format(log_file, result_file_name, "", ".progress",
- MY_REPLACE_EXT),
+ str_to_file(fn_format(log_file, result_file_name, opt_logdir, ".progress",
+ *opt_logdir ? MY_REPLACE_DIR | MY_REPLACE_EXT:
+ MY_REPLACE_EXT),
ds_progress.str, ds_progress.length);
}
@@ -5910,7 +5918,7 @@
timer_output();
free_used_memory();
- my_end(MY_CHECK_ERROR);
+ my_end(info_flag ? MY_CHECK_ERROR | MY_GIVE_INFO : MY_CHECK_ERROR);
/* Yes, if we got this far the test has suceeded! Sakila smiles */
if (!silent)
--- 1.85/storage/federated/ha_federated.cc 2006-11-21 23:12:52 +02:00
+++ 1.86/storage/federated/ha_federated.cc 2006-11-21 23:12:52 +02:00
@@ -1856,6 +1856,7 @@
String where_string(where_buffer,
sizeof(where_buffer),
&my_charset_bin);
+ byte *record= table->record[0];
DBUG_ENTER("ha_federated::update_row");
/*
set string lengths to 0 to avoid misc chars in string
@@ -1914,7 +1915,7 @@
bool needs_quote= (*field)->str_needs_quotes();
where_string.append(STRING_WITH_LEN(" = "));
(*field)->val_str(&field_value,
- (char*) (old_data + (*field)->offset()));
+ (char*) (old_data + (*field)->offset(record)));
if (needs_quote)
where_string.append('\'');
field_value.print(&where_string);
--- 1.24/mysql-test/r/connect.result 2006-11-21 23:12:52 +02:00
+++ 1.25/mysql-test/r/connect.result 2006-11-21 23:12:52 +02:00
@@ -1,6 +1,7 @@
drop table if exists t1,t2;
show tables;
Tables_in_mysql
+binlog_index
columns_priv
db
event
@@ -32,6 +33,7 @@
grant ALL on *.* to test@stripped identified by "gambling";
show tables;
Tables_in_mysql
+binlog_index
columns_priv
db
event
@@ -71,6 +73,7 @@
set password=old_password('gambling3');
show tables;
Tables_in_mysql
+binlog_index
columns_priv
db
event
--- 1.124/mysql-test/t/mysqldump.test 2006-11-21 23:12:52 +02:00
+++ 1.125/mysql-test/t/mysqldump.test 2006-11-21 23:12:52 +02:00
@@ -1394,6 +1394,9 @@
drop user myDB_User;
drop database mysqldump_myDB;
use test;
+connection default;
+disconnect root;
+disconnect user1;
--echo #
--echo # BUG#13926: --order-by-primary fails if PKEY contains quote character
--- 1.32/mysql-test/r/drop.result 2006-11-21 23:12:52 +02:00
+++ 1.33/mysql-test/r/drop.result 2006-11-21 23:12:52 +02:00
@@ -47,7 +47,6 @@
show databases;
Database
information_schema
-cluster
mysql
mysqltest
test
@@ -59,7 +58,6 @@
show databases;
Database
information_schema
-cluster
mysql
test
drop database mysqltest;
--- 1.26/mysql-test/t/system_mysql_db_fix.test 2006-11-21 23:12:52 +02:00
+++ 1.27/mysql-test/t/system_mysql_db_fix.test 2006-11-21 23:12:52 +02:00
@@ -96,7 +96,7 @@
DROP TABLE db, host, user, func, plugin, tables_priv, columns_priv,
procs_priv, help_category, help_keyword, help_relation, help_topic, proc,
time_zone, time_zone_leap_second, time_zone_name, time_zone_transition,
-time_zone_transition_type, general_log, slow_log, event;
+time_zone_transition_type, general_log, slow_log, event, binlog_index;
-- enable_query_log
| Thread |
|---|
| • bk commit into 5.1 tree (monty:1.2371) | monty | 21 Nov |