Skip to content

Commit

Permalink
Add db_stored_procedure where target not like 'com.cubrid.plcsql.buil…
Browse files Browse the repository at this point in the history
…tin%', and reflects changes in CUBRID#669
  • Loading branch information
ssihil committed Dec 20, 2023
1 parent 5eed6a5 commit c397fe0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 31 deletions.
2 changes: 1 addition & 1 deletion CTP/ha_repl/src/com/navercorp/cubridqa/ha_repl/Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ private boolean __isDatabaseDirty() throws Exception {

StringBuffer s = new StringBuffer();
s.append("select 'TABLE'||':db_class' check_table, t.* from db_class t where is_system_class='NO' and upper(class_name)<>'QA_SYSTEM_TB_FLAG';");
s.append("select 'TABLE'||':db_stored_procedure', t.* from db_stored_procedure t; ");
s.append("select 'TABLE'||':db_stored_procedure', t.* from db_stored_procedure t where target not like 'com.cubrid.plcsql.builtin%'; ");
s.append("select 'TABLE'||':db_trig', t.* from db_trig t; ");
s.append("select 'TABLE'||':db_partition', t.* from db_partition t; ");
s.append("select 'TABLE'||':db_meth_file', t.* from db_meth_file t; ");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void clear() {
plcsqlNestLevel = 0;
}

boolean isStatementComplete() {
boolean isStatementEnd() {
return (state == State.STATEMENT_END);
}

Expand All @@ -52,9 +52,8 @@ boolean isInPlcsqlText() {
void scan(String line) {

assert (line != null);
assert (state
!= State.STATEMENT_END); // the state must be cleared to State.GENERAL before this
// call
// the state must be cleared to State.GENERAL before this call
assert (state != State.STATEMENT_END);
assert ((plcsqlBeginEndBalance == 0 && plcsqlNestLevel == 0)
|| (substate == Substate.PLCSQL_TEXT || substate == Substate.SEEN_END));

Expand Down Expand Up @@ -129,12 +128,7 @@ void scan(String line) {
break;

case '"':
/*if (prm_get_bool_value (PRM_ID_ANSI_QUOTES) == false) { TODO: can we see the parameter?
state = State.MYSQL_QUOTE;
} else*/ {
state = State.DOUBLE_QUOTE_IDENTIFIER;
}

state = State.DOUBLE_QUOTE_IDENTIFIER;
stmtComplete = false;
break;

Expand Down Expand Up @@ -189,10 +183,7 @@ void scan(String line) {
break;

case SINGLE_QUOTE:
/*if (prm_get_bool_value (PRM_ID_NO_BACKSLASH_ESCAPES) == false &&
c == '\\') { TODO: can we see the parameter?
i++;
} else */ if (c == '\'') {
if (c == '\'') {
if (charAtStr(line, i + 1) == '\'') {
// escape by ''
i++;
Expand All @@ -202,20 +193,6 @@ void scan(String line) {
}
break;

case MYSQL_QUOTE:
/*if (prm_get_bool_value (PRM_ID_NO_BACKSLASH_ESCAPES) == false &&
c == '\\') { TODO: can we see the parameter?
i++;
} else */ if (c == '"') {
if (charAtStr(line, i + 1) == '"') {
// escape by ""
i++;
} else {
state = State.GENERAL;
}
}
break;

case DOUBLE_QUOTE_IDENTIFIER:
if (c == '"') {
state = State.GENERAL;
Expand Down Expand Up @@ -417,7 +394,7 @@ private enum State {
CPP_COMMENT,
SQL_COMMENT,
SINGLE_QUOTE,
MYSQL_QUOTE,
//MYSQL_QUOTE,
DOUBLE_QUOTE_IDENTIFIER,
BACKTICK_IDENTIFIER,
BRACKET_IDENTIFIER,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,6 @@ public void convert() throws IOException {
isMultipleLine = false;
shouldBeDeleted = false;
isDML = false;
lineScanner.clear();
}
} else {
if (isMultipleLine) {
Expand All @@ -392,6 +391,9 @@ public void convert() throws IOException {
isMultipleLine = true;
}
}
if (lineScanner.isStatementEnd()) {
lineScanner.clear();
}
}
out.flush();
out.close();
Expand Down

0 comments on commit c397fe0

Please sign in to comment.