fix weak read bug for query contain for update
This commit is contained in:
@ -1314,10 +1314,11 @@ int ObTableLocation::get_is_weak_read(const ObDMLStmt &dml_stmt,
|
|||||||
{
|
{
|
||||||
int ret = OB_SUCCESS;
|
int ret = OB_SUCCESS;
|
||||||
is_weak_read = false;
|
is_weak_read = false;
|
||||||
if (OB_ISNULL(session) || OB_ISNULL(sql_ctx)) {
|
if (OB_ISNULL(session) || OB_ISNULL(sql_ctx) || OB_ISNULL(dml_stmt.get_query_ctx())) {
|
||||||
ret = OB_ERR_UNEXPECTED;
|
ret = OB_ERR_UNEXPECTED;
|
||||||
LOG_ERROR("unexpected null", K(ret), K(session), K(sql_ctx));
|
LOG_ERROR("unexpected null", K(ret), K(session), K(sql_ctx));
|
||||||
} else if (dml_stmt.get_query_ctx()->has_dml_write_stmt_) {
|
} else if (dml_stmt.get_query_ctx()->has_dml_write_stmt_ ||
|
||||||
|
dml_stmt.get_query_ctx()->is_contain_select_for_update_) {
|
||||||
is_weak_read = false;
|
is_weak_read = false;
|
||||||
} else {
|
} else {
|
||||||
ObConsistencyLevel consistency_level = INVALID_CONSISTENCY;
|
ObConsistencyLevel consistency_level = INVALID_CONSISTENCY;
|
||||||
|
|||||||
Reference in New Issue
Block a user