Commit a1f80c1e authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-maria

into  mysql.com:/home/my/mysql-maria

parents d0398f72 a8d94b4a
...@@ -883,7 +883,7 @@ sub command_line_setup () { ...@@ -883,7 +883,7 @@ sub command_line_setup () {
# -------------------------------------------------------------------------- # --------------------------------------------------------------------------
if ($opt_extern) if ($opt_extern)
{ {
mtr_report("Disable instance manager when running with extern mysqld"); # mtr_report("Disable instance manager when running with extern mysqld");
$opt_skip_im= 1; $opt_skip_im= 1;
} }
elsif ( $mysql_version_id < 50000 ) elsif ( $mysql_version_id < 50000 )
...@@ -2037,7 +2037,10 @@ sub environment_setup () { ...@@ -2037,7 +2037,10 @@ sub environment_setup () {
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables; $ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
} }
$ENV{'MYSQL_FIX_PRIVILEGE_TABLES'}= $file_mysql_fix_privilege_tables; if ( !$opt_extern )
{
$ENV{'MYSQL_FIX_PRIVILEGE_TABLES'}= $file_mysql_fix_privilege_tables;
}
# ---------------------------------------------------- # ----------------------------------------------------
# Setup env so childs can execute my_print_defaults # Setup env so childs can execute my_print_defaults
......
...@@ -435,6 +435,28 @@ bbb. ...@@ -435,6 +435,28 @@ bbb.
bbb. bbb.
aa. aa.
drop table t1; drop table t1;
create table t1 ( a text not null, key a (a(20))) row_format=dynamic;
insert into t1 values ('aaa '),('aaa'),('aa');
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
repair table t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
select concat(a,'.') from t1 where a='aaa';
concat(a,'.')
aaa .
aaa.
select concat(a,'.') from t1 where binary a='aaa';
concat(a,'.')
aaa.
update t1 set a='bbb' where a='aaa';
select concat(a,'.') from t1;
concat(a,'.')
bbb.
bbb.
aa.
drop table t1;
create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10))); create table t1(a text not null, b text not null, c text not null, index (a(10),b(10),c(10)));
insert into t1 values('807780', '477', '165'); insert into t1 values('807780', '477', '165');
insert into t1 values('807780', '477', '162'); insert into t1 values('807780', '477', '162');
...@@ -1045,7 +1067,7 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -1045,7 +1067,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref c c 11 const # Using where; Using index 1 SIMPLE t1 ref c c 11 const # Using where; Using index
explain select count(*) from t1 where t='a '; explain select count(*) from t1 where t='a ';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range t t 13 NULL # Using where 1 SIMPLE t1 ref t t 13 const # Using where
explain select count(*) from t1 where v like 'a%'; explain select count(*) from t1 where v like 'a%';
id select_type table type possible_keys key key_len ref rows Extra id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range v v 13 NULL # Using where; Using index 1 SIMPLE t1 range v v 13 NULL # Using where; Using index
......
...@@ -431,10 +431,9 @@ update t1 set a='bbb' where a='aaa'; ...@@ -431,10 +431,9 @@ update t1 set a='bbb' where a='aaa';
select concat(a,'.') from t1; select concat(a,'.') from t1;
drop table t1; drop table t1;
# test again but with dynamic format #
echo "Monty please enable the portion below, it gives error message"; # Test again but with dynamic format
if (0) #
{
create table t1 ( a text not null, key a (a(20))) row_format=dynamic; create table t1 ( a text not null, key a (a(20))) row_format=dynamic;
insert into t1 values ('aaa '),('aaa'),('aa'); insert into t1 values ('aaa '),('aaa'),('aa');
check table t1; check table t1;
...@@ -444,7 +443,6 @@ select concat(a,'.') from t1 where binary a='aaa'; ...@@ -444,7 +443,6 @@ select concat(a,'.') from t1 where binary a='aaa';
update t1 set a='bbb' where a='aaa'; update t1 set a='bbb' where a='aaa';
select concat(a,'.') from t1; select concat(a,'.') from t1;
drop table t1; drop table t1;
}
# #
# More space testing # More space testing
......
...@@ -2523,10 +2523,10 @@ int handler::ha_repair(THD* thd, HA_CHECK_OPT* check_opt) ...@@ -2523,10 +2523,10 @@ int handler::ha_repair(THD* thd, HA_CHECK_OPT* check_opt)
int ha_enable_transaction(THD *thd, bool on) int ha_enable_transaction(THD *thd, bool on)
{ {
int error=0; int error=0;
DBUG_ENTER("ha_enable_transaction"); DBUG_ENTER("ha_enable_transaction");
thd->transaction.on= on; DBUG_PRINT("info", ("on: %d", (int) on));
if (on)
if ((thd->transaction.on= on))
{ {
/* /*
Now all storage engines should have transaction handling enabled. Now all storage engines should have transaction handling enabled.
......
...@@ -407,6 +407,7 @@ THD::THD() ...@@ -407,6 +407,7 @@ THD::THD()
cleanup_done= abort_on_warning= no_warnings_for_error= 0; cleanup_done= abort_on_warning= no_warnings_for_error= 0;
peer_port= 0; // For SHOW PROCESSLIST peer_port= 0; // For SHOW PROCESSLIST
transaction.m_pending_rows_event= 0; transaction.m_pending_rows_event= 0;
transaction.on= 1;
#ifdef SIGNAL_WITH_VIO_CLOSE #ifdef SIGNAL_WITH_VIO_CLOSE
active_vio = 0; active_vio = 0;
#endif #endif
......
...@@ -2004,6 +2004,7 @@ int ha_maria::external_lock(THD *thd, int lock_type) ...@@ -2004,6 +2004,7 @@ int ha_maria::external_lock(THD *thd, int lock_type)
tons of archived logs to roll-forward, we could then not disable tons of archived logs to roll-forward, we could then not disable
REDOs/UNDOs in this case. REDOs/UNDOs in this case.
*/ */
DBUG_PRINT("info", ("Disabling logging for table"));
_ma_tmp_disable_logging_for_table(file->s); _ma_tmp_disable_logging_for_table(file->s);
} }
if (!trn) /* no transaction yet - open it now */ if (!trn) /* no transaction yet - open it now */
......
...@@ -3357,7 +3357,6 @@ int _ma_read_block_record(MARIA_HA *info, uchar *record, ...@@ -3357,7 +3357,6 @@ int _ma_read_block_record(MARIA_HA *info, uchar *record,
DBUG_ENTER("_ma_read_block_record"); DBUG_ENTER("_ma_read_block_record");
DBUG_PRINT("enter", ("rowid: %lu", (long) record_pos)); DBUG_PRINT("enter", ("rowid: %lu", (long) record_pos));
info->cur_row.lastpos= record_pos;
offset= ma_recordpos_to_dir_entry(record_pos); offset= ma_recordpos_to_dir_entry(record_pos);
DBUG_ASSERT(info->s->pagecache->block_size == block_size); DBUG_ASSERT(info->s->pagecache->block_size == block_size);
......
...@@ -33,20 +33,12 @@ int maria_rrnd(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos) ...@@ -33,20 +33,12 @@ int maria_rrnd(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos)
DBUG_ENTER("maria_rrnd"); DBUG_ENTER("maria_rrnd");
DBUG_ASSERT(filepos != HA_OFFSET_ERROR); DBUG_ASSERT(filepos != HA_OFFSET_ERROR);
#ifdef NOT_USED
if (filepos == HA_OFFSET_ERROR)
{
if (info->cur_row.lastpos == HA_OFFSET_ERROR) /* First read ? */
filepos= info->s->pack.header_length; /* Read first record */
else
filepos= info->cur_row.nextpos;
}
#endif
/* Init all but update-flag */ /* Init all but update-flag */
info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
if (info->opt_flag & WRITE_CACHE_USED && flush_io_cache(&info->rec_cache)) if (info->opt_flag & WRITE_CACHE_USED && flush_io_cache(&info->rec_cache))
DBUG_RETURN(my_errno); DBUG_RETURN(my_errno);
info->cur_row.lastpos= filepos; /* Remember for update */
DBUG_RETURN((*info->s->read_record)(info, buf, filepos)); DBUG_RETURN((*info->s->read_record)(info, buf, filepos));
} }
...@@ -517,8 +517,13 @@ struct st_maria_info ...@@ -517,8 +517,13 @@ struct st_maria_info
}while(0) }while(0)
#define maria_is_crashed(x) ((x)->s->state.changed & STATE_CRASHED) #define maria_is_crashed(x) ((x)->s->state.changed & STATE_CRASHED)
#define maria_is_crashed_on_repair(x) ((x)->s->state.changed & STATE_CRASHED_ON_REPAIR) #define maria_is_crashed_on_repair(x) ((x)->s->state.changed & STATE_CRASHED_ON_REPAIR)
#ifdef EXTRA_DEBUG
#define maria_print_error(SHARE, ERRNO) \ #define maria_print_error(SHARE, ERRNO) \
_ma_report_error((ERRNO), (SHARE)->index_file_name) _ma_report_error((ERRNO), (SHARE)->index_file_name)
#else
#define maria_print_error(SHARE, ERRNO) while (0)
#endif
/* Functions to store length of space packed keys, VARCHAR or BLOB keys */ /* Functions to store length of space packed keys, VARCHAR or BLOB keys */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment