summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-10-04 21:43:56 +0200
committerunknown <serg@serg.mylan>2005-10-04 21:43:56 +0200
commit2b972093e78f942f199b20552fb9e949fbfc3265 (patch)
tree216fbc8823c2cd43914ee24d01bc1f0f38dc6113
parent60ebe17bd1859f5c541e92b620074e14f36928eb (diff)
parent14f24b5ed63394dce856bff08ea6e1b2bc0752c6 (diff)
downloadmariadb-git-2b972093e78f942f199b20552fb9e949fbfc3265.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into serg.mylan:/usr/home/serg/Abk/mysql-5.0 sql/ha_innodb.cc: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/handler.h: Auto merged
-rw-r--r--mysql-test/r/innodb.result6
-rw-r--r--ndb/src/mgmsrv/Services.cpp2
-rw-r--r--sql/sql_table.cc14
-rw-r--r--sql/table.cc1
-rw-r--r--sql/table.h2
5 files changed, 15 insertions, 10 deletions
diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result
index f634d0fc98b..a66259ff5f4 100644
--- a/mysql-test/r/innodb.result
+++ b/mysql-test/r/innodb.result
@@ -2625,11 +2625,11 @@ test.t1 1531596814
insert into t1 values(3);
checksum table t1;
Table Checksum
-test.t1 2605035534
+test.t1 1531596814
commit;
checksum table t1;
Table Checksum
-test.t1 127268899
+test.t1 2050879373
commit;
drop table t1;
create table t1(a int not null) engine=innodb DEFAULT CHARSET=latin1;
@@ -2642,7 +2642,7 @@ set autocommit=1;
insert into t1 values(3);
checksum table t1;
Table Checksum
-test.t1 127268899
+test.t1 2050879373
drop table t1;
create table t1 (col1 integer primary key, col2 integer) engine=innodb;
insert t1 values (1,100);
diff --git a/ndb/src/mgmsrv/Services.cpp b/ndb/src/mgmsrv/Services.cpp
index 8c087c2a3ca..9f7e34f93ef 100644
--- a/ndb/src/mgmsrv/Services.cpp
+++ b/ndb/src/mgmsrv/Services.cpp
@@ -940,7 +940,7 @@ printNodeStatus(OutputStream *output,
output->println("node.%d.dynamic_id: %d", nodeId, dynamicId);
output->println("node.%d.node_group: %d", nodeId, nodeGroup);
output->println("node.%d.connect_count: %d", nodeId, connectCount);
- output->println("node.%d.address: %s", nodeId, address);
+ output->println("node.%d.address: %s", nodeId, address ? address : "");
}
}
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 4438400806f..827918d8813 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -4110,6 +4110,7 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables, HA_CHECK_OPT *check_opt)
{
/* calculating table's checksum */
ha_checksum crc= 0;
+ uchar null_mask=256 - (1 << t->s->last_null_bit_pos);
/* InnoDB must be told explicitly to retrieve all columns, because
this function does not set field->query_id in the columns to the
@@ -4130,9 +4131,12 @@ bool mysql_checksum_table(THD *thd, TABLE_LIST *tables, HA_CHECK_OPT *check_opt)
continue;
break;
}
- if (t->record[0] != (byte*) t->field[0]->ptr)
- row_crc= my_checksum(row_crc, t->record[0],
- ((byte*) t->field[0]->ptr) - t->record[0]);
+ if (t->s->null_bytes)
+ {
+ /* fix undefined null bits */
+ t->record[0][t->s->null_bytes-1] |= null_mask;
+ row_crc= my_checksum(row_crc, t->record[0], t->s->null_bytes);
+ }
for (uint i= 0; i < t->s->fields; i++ )
{
@@ -4176,9 +4180,9 @@ static bool check_engine(THD *thd, const char *table_name,
enum db_type *new_engine)
{
enum db_type req_engine= *new_engine;
- bool no_substitution=
+ bool no_substitution=
test(thd->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION);
- if ((*new_engine=
+ if ((*new_engine=
ha_checktype(thd, req_engine, no_substitution, 1)) == DB_TYPE_UNKNOWN)
return TRUE;
diff --git a/sql/table.cc b/sql/table.cc
index 190813ecfb6..0b3423d0750 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -874,6 +874,7 @@ int openfrm(THD *thd, const char *name, const char *alias, uint db_stat,
/* the correct null_bytes can now be set, since bitfields have been taken into account */
share->null_bytes= null_pos - (uchar*) outparam->null_flags + (null_bit_pos + 7) / 8;
+ share->last_null_bit_pos= null_bit_pos;
/* The table struct is now initialized; Open the table */
error=2;
diff --git a/sql/table.h b/sql/table.h
index b01d774bf10..44fe69e9397 100644
--- a/sql/table.h
+++ b/sql/table.h
@@ -141,7 +141,7 @@ typedef struct st_table_share
enum tmp_table_type tmp_table;
uint blob_ptr_size; /* 4 or 8 */
- uint null_bytes;
+ uint null_bytes, last_null_bit_pos;
uint key_length; /* Length of table_cache_key */
uint fields; /* Number of fields */
uint rec_buff_length; /* Size of table->record[] buffer */