Skip to content

Commit 5761495

Browse files
committed
Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6
2 parents bd75683 + 512c7ef commit 5761495

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

mysql-test/suite/ndb/t/ndb_restore_conv_null.test

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,20 +68,20 @@ create table not_nullable_no_nulls (
6868
col4 date)engine=ndb;
6969

7070
--echo # cannot restore nullable->non-nullable without --lossy-conversions
71-
--error 134
72-
--exec $NDB_RESTORE --no-defaults -b $the_backup_id -n 1 -r --include-tables=test.nullable_no_nulls $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT
71+
--error 1
72+
--exec $NDB_RESTORE --no-defaults --core-file=0 -b $the_backup_id -n 1 -r --include-tables=test.nullable_no_nulls $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT 2>&1
7373

7474
--echo # can restore nullable->non-nullable if non-nullable col has no NULL values
7575
--exec $NDB_RESTORE --no-defaults -b $the_backup_id -n 1 -r --include-tables=test.nullable_no_nulls --lossy-conversions $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT
7676
--exec $NDB_RESTORE --no-defaults -b $the_backup_id -n 2 -r --include-tables=test.nullable_no_nulls --lossy-conversions $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT
7777

7878
--echo # cannot restore nullable->non-nullable if non-nullable col has NULL values
79-
--error 139
80-
--exec $NDB_RESTORE --no-defaults -b $the_backup_id -n 1 -r --include-tables=test.nullable_with_nulls --lossy-conversions $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT
79+
--error 1
80+
--exec $NDB_RESTORE --no-defaults --core-file=0 -b $the_backup_id -n 1 -r --include-tables=test.nullable_with_nulls --lossy-conversions $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT 2>&1
8181

8282
--echo # cannot restore not-null->non-nullable without --promote-attributes
83-
--error 134
84-
--exec $NDB_RESTORE --no-defaults -b $the_backup_id -n 1 -r $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT
83+
--error 1
84+
--exec $NDB_RESTORE --no-defaults --core-file=0 -b $the_backup_id -n 1 -r $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT 2>&1
8585

8686
--echo # can restore not-null->nullable
8787
--exec $NDB_RESTORE --no-defaults -b $the_backup_id -n 1 -r --include-tables=test.not_nullable_no_nulls --promote-attributes $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT
@@ -134,8 +134,8 @@ create table nullable (
134134
col4 date not null)engine=ndb;
135135

136136
--echo # cannot restore nullable->non-nullable if backup log sets NULL values
137-
--error 139
138-
--exec $NDB_RESTORE --no-defaults -b $the_backup_id -n 1 -r --include-tables=test.nullable --lossy-conversions $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT
137+
--error 1
138+
--exec $NDB_RESTORE --no-defaults --core-file=0 -b $the_backup_id -n 1 -r --include-tables=test.nullable --lossy-conversions $NDB_BACKUPS-$the_backup_id >> $NDB_TOOLS_OUTPUT 2>&1
139139

140140
select * from nullable;
141141

storage/ndb/tools/restore/consumer_restore.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3765,15 +3765,15 @@ void BackupRestore::tuple_a(restore_callback_t *cb)
37653765
{
37663766
if (errorHandler(cb))
37673767
continue;
3768-
err << "Cannot get operation: " << cb->connection->getNdbError() << endl;
3768+
err << "Cannot get operation: " << m_ndb->getNdbError(cb->error_code) << endl;
37693769
exitHandler();
37703770
} // if
37713771

37723772
if (op->writeTuple() == -1)
37733773
{
37743774
if (errorHandler(cb))
37753775
continue;
3776-
err << "Error defining op: " << cb->connection->getNdbError() << endl;
3776+
err << "Error defining op: " << m_ndb->getNdbError(cb->error_code) << endl;
37773777
exitHandler();
37783778
} // if
37793779

@@ -3908,7 +3908,7 @@ void BackupRestore::tuple_a(restore_callback_t *cb)
39083908
{
39093909
if (errorHandler(cb))
39103910
continue;
3911-
err << "Error defining op: " << cb->connection->getNdbError() << endl;
3911+
err << "Error defining op: " << m_ndb->getNdbError(cb->error_code) << endl;
39123912
exitHandler();
39133913
}
39143914

@@ -4497,7 +4497,7 @@ BackupRestore::logEntry_a(restore_callback_t *cb)
44974497
{
44984498
if (errorHandler(cb)) // temp error, retry
44994499
goto retry;
4500-
err << "Cannot start transaction: " << trans->getNdbError() << endl;
4500+
err << "Cannot start transaction: " << m_ndb->getNdbError(cb->error_code) << endl;
45014501
exitHandler();
45024502
} // if
45034503

@@ -4519,7 +4519,7 @@ BackupRestore::logEntry_a(restore_callback_t *cb)
45194519
{
45204520
if (errorHandler(cb)) // temp error, retry
45214521
goto retry;
4522-
err << "Cannot get operation: " << trans->getNdbError() << endl;
4522+
err << "Cannot get operation: " << m_ndb->getNdbError(cb->error_code) << endl;
45234523
exitHandler();
45244524
} // if
45254525

0 commit comments

Comments
 (0)