Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CBRD-21886] No query results if DECODE, CASE, or IF is used in a nested left outer join query #2315

Merged
merged 2 commits into from
May 19, 2020

Conversation

shparkcubrid
Copy link
Contributor

@shparkcubrid shparkcubrid commented May 14, 2020

http://jira.cubrid.org/browse/CBRD-21886

fix to change term class to TC_during_join when predicate is on 'ON' clause and TC_OTHER

@shparkcubrid shparkcubrid self-assigned this May 14, 2020
@shparkcubrid shparkcubrid added this to the damson milestone May 14, 2020
@beyondykk9
Copy link
Contributor

beyondykk9 commented May 15, 2020

suggestion:
In query_graph.h, the following macro is defined:
#define QO_OUTER_JOIN_TERM(term) \
((QO_TERM_CLASS(term) == QO_TC_JOIN || \
QO_TERM_CLASS(term) == QO_TC_DUMMY_JOIN) && \
(QO_TERM_JOIN_TYPE(term) == JOIN_LEFT || \
QO_TERM_JOIN_TYPE(term) == JOIN_RIGHT || \
QO_TERM_JOIN_TYPE(term) == JOIN_OUTER))

What about applying the above macro or the below macro by defining newly?
#define QO_OUTER_JOIN(term) \
((QO_TERM_JOIN_TYPE(term) == JOIN_LEFT || \
QO_TERM_JOIN_TYPE(term) == JOIN_RIGHT || \
QO_TERM_JOIN_TYPE(term) == JOIN_OUTER))

@shparkcubrid
Copy link
Contributor Author

I fixed to be shorter by adding QO_NODE_IS_OUTER_JOIN()

@codecov-io
Copy link

codecov-io commented May 18, 2020

Codecov Report

Merging #2315 into develop will decrease coverage by 1.53%.
The diff coverage is 60.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop    #2315      +/-   ##
===========================================
- Coverage    48.84%   47.31%   -1.54%     
===========================================
  Files          491      491              
  Lines       385681   384892     -789     
===========================================
- Hits        188392   182094    -6298     
- Misses      197289   202798    +5509     
Impacted Files Coverage Δ
src/optimizer/query_graph.c 70.47% <60.00%> (-3.84%) ⬇️
src/object/object_printer.hpp 0.00% <0.00%> (-100.00%) ⬇️
src/object/object_print_util.cpp 0.00% <0.00%> (-100.00%) ⬇️
src/object/object_printer.cpp 0.00% <0.00%> (-41.89%) ⬇️
src/object/class_description.cpp 0.00% <0.00%> (-41.10%) ⬇️
src/parser/xasl_regu_alloc.hpp 11.11% <0.00%> (-22.23%) ⬇️
src/parser/parser_support.c 34.14% <0.00%> (-14.81%) ⬇️
src/parser/xasl_generation.c 49.25% <0.00%> (-14.43%) ⬇️
src/parser/xasl_regu_alloc.cpp 81.78% <0.00%> (-12.56%) ⬇️
src/base/string_buffer.hpp 55.55% <0.00%> (-11.12%) ⬇️
... and 108 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cc1cc24...2cca016. Read the comment docs.

@shparkcubrid shparkcubrid merged commit 8a10569 into CUBRID:develop May 19, 2020
@shparkcubrid shparkcubrid deleted the CBRD-21886 branch May 19, 2020 02:26
shparkcubrid added a commit to shparkcubrid/cubrid that referenced this pull request Jul 13, 2020
…ted left outer join query (CUBRID#2315)

http://jira.cubrid.org/browse/CBRD-21886

fix to change term class to TC_during_join when predicate is on 'ON' clause and TC_OTHER
shparkcubrid added a commit that referenced this pull request Jul 13, 2020
…ted left outer join query (#2315) (#2375)

http://jira.cubrid.org/browse/CBRD-21886

fix to change term class to TC_during_join when predicate is on 'ON' clause and TC_OTHER
beyondykk9 added a commit that referenced this pull request Jul 15, 2020
)

* [CBRD-23638] Remove getpeername () calls, replace it with ip_addr in … (#2250)

* [CBRD-23638] Remove getpeername () calls, replace it with ip_addr in cci handle

* [CBRD-23638] Fix indentation

* [CBRD-23668] Change pop-up guide text for JRE when installing windows engine (#2311)

* [CBRD-21886] No query results if DECODE, CASE, or IF is used in a nested left outer join query (#2315)

http://jira.cubrid.org/browse/CBRD-21886

fix to change term class to TC_during_join when predicate is on 'ON' clause and TC_OTHER

* [CBRD-23647] Add system parameter for debugging Java SP and Server-side JDBC (#2294)

* add system parameter; debugging port for java stored procedure

* add copyright holder in disclaimer

* [APIS-825] Supports ResultSet.getBlob() or ResultSet.getClob() method to read BIT VARYING type or VARCHAR type. (#2303)

http://jira.cubrid.org/browse/APIS-825

* [CBRD-23648] Separate server-side routine in JDBC (#2278)

http://jira.cubrid.org/browse/CBRD-23648

This change refactored UConnection and split routines into client-side (UClientSideConnection) and server-side (UServerSideConnection) instead of being controlled by a single boolean variable (boolean isServerSideJDBC).

re-organized UConnection's main methods for sending requests to CAS to make it clear to understand
- added UClientSideConnection and UServerSideConnection inherited from UConnection.
- added server-side JDBC Connection, CUBRIDConnectionDefault inherited from CUBRIDConnection.
- renamed several variables and methods that violate the naming convention.

* [CBRD-23243] Modify the way to calculate available disk space in sector unit

http://jira.cubrid.org/browse/CBRD-23243

It handles the way to calculate available disk space in sector unit. The way is the same as #2218 , which is about the same issue.

* [CBRD-21022] executeBatch returns Cannot communicate with the broker or received invalid packet & CAS down with core dump (#2323)

http://jira.cubrid.org/browse/CBRD-21022

fix to enable XASL cache for insert statements containing clobs and blobs and do not reuse XASL at XASL generator step

* [APIS-782] revised: added omitted codes (#2337)

* [CBRD-20577] Use of alias with function inside ‘Order By’ Clause (#2312)

* [CBRD-20577] Use of alias with function inside ‘Order By’ Clause

* [CBRD-20577] except for show columns statement

* [CBRD-20577] indent

* [CBRD-20577] re-indent

* processing in case that xasl clone is disable

* [CBRD-23677] The heartbeat fails to start when 'cubrid service start' command is executed successfully even though the settings are normal. (#2341)

http://jira.cubrid.org/browse/CBRD-23677

* [CBRD-23609] Remove modifications other than syslog () in #2195 (#2342)

http://jira.cubrid.org/browse/CBRD-23609

* [CBRD-23671] Implement Statement Handler Cache in Server-side JDBC (#2335)

http://jira.cubrid.org/browse/CBRD-23671

* [CBRD-23650] When a query specifying an OVER function in an aggregate function using rownum has a plan, the result is null. (#2343)

http://jira.cubrid.org/browse/CBRD-23650

fix it to remove substituting the instnum variable
add the 'XASL_INSTNUM_FLAG_SCAN_STOP_AT_ANALYTIC' flag.
instnum is not evaluated in the processing stage of the executor when flag is set.

* [CBRD-23687] Add compiled OpenSSL lib for Windows (#2348)

* [CBRD-23687] Add server certificate/private key for SSL (#2350)

* [CBRD-23680] temporary temp volume file is not cleared when server restarted with temp_volume_path option (#2345)

* [CBRD-23680] temporary temp volume file is not cleared when server restarted with temp_volume_path option
Uses 'temp_volume_path' when deleting temporary volume files

* correct indentation

Co-authored-by: JoohoK <joohok@cubrid.com>

* [CBRD-23642] Change the way to handle the wrong backup time when executing restoredb (#2251)

http://jira.cubrid.org/browse/CBRD-23642

* [CBRD-23686] If the number of index columns is large, the optimizer cannot select a more appropriate index. (#2347)

http://jira.cubrid.org/browse/CBRD-23686

heuristic factor of index scan formula is eliminated.

* [CBRD-23637] Implementation of secure CUBRID jdbc driver (#2346)

* [CBRD-23637] Implementation of secure CUBRID jdbc driver

* [CBRD-23637] remove e.printStackTrace()

* [CBRD-23689] If both outer join and inner join are present, the optimizer cannot find the optimal join order. (#2351)

http://jira.cubrid.org/browse/CBRD-23689

 add 'QO_TERM_OR_PRED' flag to the term. in the case of 'QO_TERM_OR_PRED', if there are outer join among all the nodes included, modify term classification to become after-join-term.

* [CBRD-23642] Relieve error severity with a wrong backup time

http://jira.cubrid.org/browse/CBRD-23642

* [CBRD-22637] Excessive domain cache degrades search performance using index scan (#2352)

http://jira.cubrid.org/browse/CBRD-22637

When called from qexec_execute_mainblock() ==> scan_next_scan(), btid_int must be modified to be reused. modify to reuse btid_int by adding the reuse_btid_int variable.

* [CBRD-23684] Creating victim selection algorithm for result cache

* [CBRD-23684] Creating victim selection algorithm for result cache

* [CBRD-23684] indent

* [CBRD-23684] revert system_param

* [CBRD-23669] Provide FULL SQL_Text, if tranlist executed with -f option (#2318) (#2358)

* [CBRD-23639] Provide FULL SQL_Text, if tranlist executed with -f option

* [CBRD-23639] Remove unused definition

* [CBRD-23639] fix indentation

* [CBRD-23671] Fix regression caused by not completing Resultset in ServerSidePreparedStatement (#2355)

http://jira.cubrid.org/browse/CBRD-23671

* [23684] clean up including qfile victim

* [CBRD-23696] Core dump occurs when correlated subquery is used as in-line view.

http://jira.cubrid.org/browse/CBRD-23696

Term classification of 'QO_TC_DUMMY_JOIN' is excluded from pseudo-term of derived table dependency.

* [CBRD-23637] Add error code for ssl handshake exception (#2360)

* [CBRD-23684] indent

* [CBRD-23679] Adding a configuration parameter and control for strict type translation (#2340)

* [CBRD-23679] Adding a configuration parameter and control for strict type translation

* [CBRD-23679] revised: default value to false

* [CBRD-23679] revised: check truncated case

* [CBRD-23679] add modification for BIT type

* [CBRD-23679] indent

* [CBRD-23679] param name change and default value to true

* [CBRD-23684] victime selection refine, excluding lru cache

* [CBRD-23684] fix: related to free query entry

* [CBRD-23706] Remove odbc/oledb from CUBRID/cubrid (#2364)

* [CBRD-23684] revised: remove qfile cache related

* [CBRD-23684] revised: invalidate cache

* [CBRD-23684] query cache default off

* [CBRD-23684] merge with develop

* [CBRD-23684] revised: jdbc result-cache

* [CBRD-23697] occurred error "Cannot coerce value of domain character to domain integer" when executing update. (#2361)

1. fix to coerce the value to the type of the assigned column in set clause at semantic check.
1. add type of regu_var to xasl dump output.

* [CBRD-23684] clear qfile list at rollback

* [CBRD-23679] Adding a configuration parameter and control for strict type translation (#2379)

* [CBRD-23679] Adding a configuration parameter and control for strict type translation

* [CBRD-23679] revised: default value to false

* [CBRD-23679] revised: check truncated case

* [CBRD-23679] add modification for BIT type

* [CBRD-23679] indent

* [CBRD-23679] param name change and default value to true

* [CBRD-23679] revised: alter table varchar same precision

* [CBRD-23679] rename system parameter

* [CBRD-23679] indent

* [CBRD-23679] macro define correction

* [CBRD-23679] allow overflow except for string type

* [CBRD-23684] qcache default on

Co-authored-by: Kisoo Han <kisoo-han@cubrid.com>
Co-authored-by: airnet73 <61675061+airnet73@users.noreply.github.com>
Co-authored-by: shparkcubrid <49504233+shparkcubrid@users.noreply.github.com>
Co-authored-by: Hyung-Gyu Ryoo <hgryoo@cubrid.com>
Co-authored-by: joonmin83 <hornetmj@cubrid.com>
Co-authored-by: bigs <wrlawodms@gmail.com>
Co-authored-by: JoohoK <54789363+JoohoK@users.noreply.github.com>
Co-authored-by: JoohoK <joohok@cubrid.com>
beyondykk9 added a commit that referenced this pull request Aug 24, 2020
* [CBRD-23638] Remove getpeername () calls, replace it with ip_addr in … (#2250)

* [CBRD-23638] Remove getpeername () calls, replace it with ip_addr in cci handle

* [CBRD-23638] Fix indentation

* [CBRD-23668] Change pop-up guide text for JRE when installing windows engine (#2311)

* [CBRD-21886] No query results if DECODE, CASE, or IF is used in a nested left outer join query (#2315)

http://jira.cubrid.org/browse/CBRD-21886

fix to change term class to TC_during_join when predicate is on 'ON' clause and TC_OTHER

* [CBRD-23647] Add system parameter for debugging Java SP and Server-side JDBC (#2294)

* add system parameter; debugging port for java stored procedure

* add copyright holder in disclaimer

* [APIS-825] Supports ResultSet.getBlob() or ResultSet.getClob() method to read BIT VARYING type or VARCHAR type. (#2303)

http://jira.cubrid.org/browse/APIS-825

* [CBRD-23648] Separate server-side routine in JDBC (#2278)

http://jira.cubrid.org/browse/CBRD-23648

This change refactored UConnection and split routines into client-side (UClientSideConnection) and server-side (UServerSideConnection) instead of being controlled by a single boolean variable (boolean isServerSideJDBC).

re-organized UConnection's main methods for sending requests to CAS to make it clear to understand
- added UClientSideConnection and UServerSideConnection inherited from UConnection.
- added server-side JDBC Connection, CUBRIDConnectionDefault inherited from CUBRIDConnection.
- renamed several variables and methods that violate the naming convention.

* [CBRD-23243] Modify the way to calculate available disk space in sector unit

http://jira.cubrid.org/browse/CBRD-23243

It handles the way to calculate available disk space in sector unit. The way is the same as #2218 , which is about the same issue.

* [CBRD-21022] executeBatch returns Cannot communicate with the broker or received invalid packet & CAS down with core dump (#2323)

http://jira.cubrid.org/browse/CBRD-21022

fix to enable XASL cache for insert statements containing clobs and blobs and do not reuse XASL at XASL generator step

* [APIS-782] revised: added omitted codes (#2337)

* [CBRD-20577] Use of alias with function inside ‘Order By’ Clause (#2312)

* [CBRD-20577] Use of alias with function inside ‘Order By’ Clause

* [CBRD-20577] except for show columns statement

* [CBRD-20577] indent

* [CBRD-20577] re-indent

* [CBRD-23677] The heartbeat fails to start when 'cubrid service start' command is executed successfully even though the settings are normal. (#2341)

http://jira.cubrid.org/browse/CBRD-23677

* [CBRD-23609] Remove modifications other than syslog () in #2195 (#2342)

http://jira.cubrid.org/browse/CBRD-23609

* [CBRD-23671] Implement Statement Handler Cache in Server-side JDBC (#2335)

http://jira.cubrid.org/browse/CBRD-23671

* [CBRD-23650] When a query specifying an OVER function in an aggregate function using rownum has a plan, the result is null. (#2343)

http://jira.cubrid.org/browse/CBRD-23650

fix it to remove substituting the instnum variable
add the 'XASL_INSTNUM_FLAG_SCAN_STOP_AT_ANALYTIC' flag.
instnum is not evaluated in the processing stage of the executor when flag is set.

* [CBRD-23687] Add compiled OpenSSL lib for Windows (#2348)

* [CBRD-23687] Add server certificate/private key for SSL (#2350)

* [CBRD-23680] temporary temp volume file is not cleared when server restarted with temp_volume_path option (#2345)

* [CBRD-23680] temporary temp volume file is not cleared when server restarted with temp_volume_path option
Uses 'temp_volume_path' when deleting temporary volume files

* correct indentation

Co-authored-by: JoohoK <joohok@cubrid.com>

* [CBRD-23642] Change the way to handle the wrong backup time when executing restoredb (#2251)

http://jira.cubrid.org/browse/CBRD-23642

* [CBRD-23686] If the number of index columns is large, the optimizer cannot select a more appropriate index. (#2347)

http://jira.cubrid.org/browse/CBRD-23686

heuristic factor of index scan formula is eliminated.

* [CBRD-23637] Implementation of secure CUBRID jdbc driver (#2346)

* [CBRD-23637] Implementation of secure CUBRID jdbc driver

* [CBRD-23637] remove e.printStackTrace()

* [CBRD-23689] If both outer join and inner join are present, the optimizer cannot find the optimal join order. (#2351)

http://jira.cubrid.org/browse/CBRD-23689

 add 'QO_TERM_OR_PRED' flag to the term. in the case of 'QO_TERM_OR_PRED', if there are outer join among all the nodes included, modify term classification to become after-join-term.

* [CBRD-23642] Relieve error severity with a wrong backup time

http://jira.cubrid.org/browse/CBRD-23642

* [CBRD-22637] Excessive domain cache degrades search performance using index scan (#2352)

http://jira.cubrid.org/browse/CBRD-22637

When called from qexec_execute_mainblock() ==> scan_next_scan(), btid_int must be modified to be reused. modify to reuse btid_int by adding the reuse_btid_int variable.

* [CBRD-23669] Provide FULL SQL_Text, if tranlist executed with -f option (#2318) (#2358)

* [CBRD-23639] Provide FULL SQL_Text, if tranlist executed with -f option

* [CBRD-23639] Remove unused definition

* [CBRD-23639] fix indentation

* [CBRD-23671] Fix regression caused by not completing Resultset in ServerSidePreparedStatement (#2355)

http://jira.cubrid.org/browse/CBRD-23671

* [CBRD-23696] Core dump occurs when correlated subquery is used as in-line view.

http://jira.cubrid.org/browse/CBRD-23696

Term classification of 'QO_TC_DUMMY_JOIN' is excluded from pseudo-term of derived table dependency.

* [CBRD-23637] Add error code for ssl handshake exception (#2360)

* [CBRD-23679] Adding a configuration parameter and control for strict type translation (#2340)

* [CBRD-23679] Adding a configuration parameter and control for strict type translation

* [CBRD-23679] revised: default value to false

* [CBRD-23679] revised: check truncated case

* [CBRD-23679] add modification for BIT type

* [CBRD-23679] indent

* [CBRD-23679] param name change and default value to true

* [CBRD-23706] Remove odbc/oledb from CUBRID/cubrid (#2364)

* [CBRD-23697] occurred error "Cannot coerce value of domain character to domain integer" when executing update. (#2361)

1. fix to coerce the value to the type of the assigned column in set clause at semantic check.
1. add type of regu_var to xasl dump output.

* [CBRD-23679] Adding a configuration parameter and control for strict type translation (#2379)

* [CBRD-23679] Adding a configuration parameter and control for strict type translation

* [CBRD-23679] revised: default value to false

* [CBRD-23679] revised: check truncated case

* [CBRD-23679] add modification for BIT type

* [CBRD-23679] indent

* [CBRD-23679] param name change and default value to true

* [CBRD-23679] revised: alter table varchar same precision

* [CBRD-23679] rename system parameter

* [CBRD-23679] indent

* [CBRD-23679] macro define correction

* [CBRD-23679] allow overflow except for string type

* [CBRD-23710] revert jdbc to check test cases

* [CBRD-23710] query cache off for test

* [CBRD-23709] error message is displayed incorrectly in 'MERGE' clause (#2381)

http://jira.cubrid.org/browse/CBRD-23709

fix to display 'Multiple rows in source table match the same row in destination table.' error when there are no existing errors

* temp file cache revised

* qcache mode on

* [CBRD-21828] Process '.5' style number in loaddb_object as well as '0.5 (#2366)

* tempfile cache revised for test

* [CBRD-23649] make dummy table instead of db_root (#2365)

Co-authored-by: Joohok <joohok@github.com>

* [CBRD-23710] cache to flush for update object

* [CBRD-23710] add invalidation for relative update

* [CBRD-23710] qcache invalidate for del-upd query

* [CBRD-23710] exclude cache from refers other table

* [CBRD-23712] support --skip-vacuum option at csql command on SA mode (#2386)

For skipping vacuum at csql command on SA mode
 * add an option (--skip-vacuum) into csql command and it is used only with SA option.
 * the option can be used with --sysadm.
 * extend two client type (SKIP_VACUUM_CSQL. SKIP_VACUUM_ADMIN_CSQL) for this task.
 * add an argument (bool skip-vacuum) into boot_restart_server().
 * If client type is SKIP_VACUUM_CSQL or SKIP_VACUUM_ADMIN_CSQL, the argument let be true.
* modify that error will occurs if using with -S and --write-on-standby together

* change an limit value of max_client from 2000 to 4000 (#2390)

* [CBRD-23710] excludes table referenced column

* [CBRD-23679] Adding a configuration parameter and control for strict type translation (#2392)

* [CBRD-23679] consideration on cast function

* [CBRD-23679] revised: consideration on cast

* [CBRD-23679] bit to bit truncated

* [CBRD-23679] modify corece for show condition

* [CBRD-23679] modified bit string coerce

* [CBRD-23679] revised: bit string coerce

* [CBRD-23679] check incorrect trailing bit

* [CBRD-23679] alter table: allow nchar to char

* indent

* [CBRD-23679] rename tp_value_cast_ex to tp_value_cat_force

* change an limit value of db's max_clients and broker's max_num_appl_server (#2394)

* [CBRD-23679] Adding a configuration parameter and control for strict type translation (#2397)

* [CBRD-23679] revise: xasl_generation for update-list

* [CBRD-23679] check null for update-list, aptr->outptr_list

* [CBRD-23708] change table option's default value to reuse_oid (#2385)

* This is task that the default value is set by reuse_oid option, when create table without oid table option.
The following is a list of changes.
    - Add DONT_REUSE_OID keyword to lexer and grammar
    - Modify semantic check routine
    - Add "create_table_reuseoid" to system parameter
    - Modify to use system parameter ("create_table_reuseoid") for creating table without oid table option
    - Modify "unloadb" & "show create table" to display "DONT_REUSE_OID"
    - Modify tables of demodb_schema using "DONT_REUSE_OID"
    - Replace a collation of demodb from en_US.iso88591 to en_US.utf8 at make_cubrid_demo.sh

* [CBRD-23687] Apply SSL Broker/CAS to damson (#2387)

* [CBRD-23687] Apply SSL Broker/CAS to damson

* [CBRD-23687] Add cas_ssl.c

* [CBRD-23687] Put Error handling

* [CBRD-23687] Fix indent

* [CBRD-23687] Change cas_network.c (remove unnecessary function call)

* [CBRD-23687] Change order of extern definitions

* [CBRD-23687] Async READ for SSL

* [CBRD-23687] Change for ASYNC write with timeout

* [CBRD-23687] Make return value 0 of SSL_read() as error

* [CBRD-23688] Implementation of secure CUBRID CCI driver (#2362)

* [CBRD-23688] Create cci_ssl.c, cci_ssl.h using openSSL for data encryption

* [CBRD-23688] Add ssl, ctx, useSSL variables to T_CON_HANDLE

* [CBRD-23688] Add useSSL Property to T_URL_PROPERTY

* [CBRD-23688] Add magic string(CUBRS) for ssl

* [CBRD-23688] Create ssl read/write macro function for openSSL

* [CBRD-23688] Change net_send_msg_header(), net_recv_msg_header(), net_send_stream() net_recv_stream() to use both non ssl(pure socket) and ssl

* [CBRD-23688] Add ssl connection and ssl free

* [CBRD-23688] Add ssl connection to Health Check Thread

* [CBRD-23688] Add ssl error code

* [CBRD-23688] fix indent

* [CBRD-23688] fix indent

* [CBRD-23688]add error code(ssl handshake exception)

* [CBRD-23688] add T_SSL_HANDLE structure and data send/recv macro function, createSSL function

* [CBRD-23688] add mutex lock to createSSL()

* [CBRD-23688] change to return the correct error to cci_datasource_create()

* [CBRD-23688] delete deprecated code since OpenSSL 1.1.0

* [CBRD-23688] change to close ssl before close socket

* [CBRD-23688] change useSSL check condition

* [CBRD-23688] modify SEND_DATA/RECV_DATA macro function

* [CBRD-23688] modify ssl warraper func and divide cleanup_ssl() into cleanup_ssl(), cleanup_ssl_ctx()

* [CBRD-23688] change createSSL() to ssl_session_init() and modify error handling

* [CBRD-23688] modify data recevie condition

* [CBRD-23688] add copyright text
Copyright (c) 2016 CUBRID Corporation.

* [APIS-833] Add isolation level of CUBRID Engine version 9 or earlier for backward compatibility (#2395)

* [CBRD-23637] fix to terminate the connection immediately when an ssl handshake exception occurs (#2393)

* [CBRD-23697] Fix regression caused by different domain of db_value (#2403)

http://jira.cubrid.org/browse/CBRD-23697

In the case of the same type as the allocated column, incorrect precision is entered without coerce the type. fix to coerce value to the type of the assigned column even if it is the same type.

* modify system parameter (create_table_reuseoid) to can be changed at client during session. (#2405)

* [CBRD-23708] change table option's default value to reuse_oid (#2408)

* modified to get default value of reuse_oid from system parameter, if don't use table option related reuse_oid.

* [CBRD-23722] Prevent endless busy waiting for query execution in abnormal network circumstanec (#2407)

* [CBRD-23722] Prevent endless busy waiting for query execution in abnormal network circumstance

* [CBRD-23722] Add status_request_info packet information

* [CBRD-23722] change function name and parameter name

* [CBRD-23722] change ntohl() to htonl()

* [CBRD-23730] ignore user and password option at tranlist and killtran utility (#2409)

* ignore user and password option and connect to server by disable password at tranlist utility.
* ignore password option if don't use -i or --kill option at killtran utility.

* [CBRD-23685] coredump while insert something into column of type 'char (1073741823)' (#2412)

* [CBRD-23685] coredump while insert something into column of type 'char (1073741823)'

* improve readability: add a comment

* [CBRD-23714] change an limit value of max_client (#2413)

* modied to occur error if max_clients over than 4000.

* [CBRD-23733] Add Microsoft_VCXXX_MFC_xXX.msm for MFC DLL (#2417)

Co-authored-by: Kisoo Han <kisoo-han@cubrid.com>
Co-authored-by: airnet73 <61675061+airnet73@users.noreply.github.com>
Co-authored-by: shparkcubrid <49504233+shparkcubrid@users.noreply.github.com>
Co-authored-by: Hyung-Gyu Ryoo <hgryoo@cubrid.com>
Co-authored-by: joonmin83 <hornetmj@cubrid.com>
Co-authored-by: bigs <wrlawodms@gmail.com>
Co-authored-by: JoohoK <54789363+JoohoK@users.noreply.github.com>
Co-authored-by: JoohoK <joohok@cubrid.com>
Co-authored-by: Joohok <joohok@github.com>
Co-authored-by: Mike MyungHwan Oh <mhoh@cubrid.com>
Co-authored-by: SE park <shpark@cubrid.com>
beyondykk9 added a commit that referenced this pull request Sep 9, 2020
* [CBRD-23638] Remove getpeername () calls, replace it with ip_addr in … (#2250)

* [CBRD-23638] Remove getpeername () calls, replace it with ip_addr in cci handle

* [CBRD-23638] Fix indentation

* [CBRD-23668] Change pop-up guide text for JRE when installing windows engine (#2311)

* [CBRD-21886] No query results if DECODE, CASE, or IF is used in a nested left outer join query (#2315)

http://jira.cubrid.org/browse/CBRD-21886

fix to change term class to TC_during_join when predicate is on 'ON' clause and TC_OTHER

* [CBRD-23647] Add system parameter for debugging Java SP and Server-side JDBC (#2294)

* add system parameter; debugging port for java stored procedure

* add copyright holder in disclaimer

* [APIS-825] Supports ResultSet.getBlob() or ResultSet.getClob() method to read BIT VARYING type or VARCHAR type. (#2303)

http://jira.cubrid.org/browse/APIS-825

* [CBRD-23648] Separate server-side routine in JDBC (#2278)

http://jira.cubrid.org/browse/CBRD-23648

This change refactored UConnection and split routines into client-side (UClientSideConnection) and server-side (UServerSideConnection) instead of being controlled by a single boolean variable (boolean isServerSideJDBC).

re-organized UConnection's main methods for sending requests to CAS to make it clear to understand
- added UClientSideConnection and UServerSideConnection inherited from UConnection.
- added server-side JDBC Connection, CUBRIDConnectionDefault inherited from CUBRIDConnection.
- renamed several variables and methods that violate the naming convention.

* [CBRD-23243] Modify the way to calculate available disk space in sector unit

http://jira.cubrid.org/browse/CBRD-23243

It handles the way to calculate available disk space in sector unit. The way is the same as #2218 , which is about the same issue.

* [CBRD-21022] executeBatch returns Cannot communicate with the broker or received invalid packet & CAS down with core dump (#2323)

http://jira.cubrid.org/browse/CBRD-21022

fix to enable XASL cache for insert statements containing clobs and blobs and do not reuse XASL at XASL generator step

* [APIS-782] revised: added omitted codes (#2337)

* [CBRD-20577] Use of alias with function inside ‘Order By’ Clause (#2312)

* [CBRD-20577] Use of alias with function inside ‘Order By’ Clause

* [CBRD-20577] except for show columns statement

* [CBRD-20577] indent

* [CBRD-20577] re-indent

* [CBRD-23677] The heartbeat fails to start when 'cubrid service start' command is executed successfully even though the settings are normal. (#2341)

http://jira.cubrid.org/browse/CBRD-23677

* [CBRD-23609] Remove modifications other than syslog () in #2195 (#2342)

http://jira.cubrid.org/browse/CBRD-23609

* [CBRD-23671] Implement Statement Handler Cache in Server-side JDBC (#2335)

http://jira.cubrid.org/browse/CBRD-23671

* [CBRD-23650] When a query specifying an OVER function in an aggregate function using rownum has a plan, the result is null. (#2343)

http://jira.cubrid.org/browse/CBRD-23650

fix it to remove substituting the instnum variable
add the 'XASL_INSTNUM_FLAG_SCAN_STOP_AT_ANALYTIC' flag.
instnum is not evaluated in the processing stage of the executor when flag is set.

* [CBRD-23687] Add compiled OpenSSL lib for Windows (#2348)

* [CBRD-23687] Add server certificate/private key for SSL (#2350)

* [CBRD-23680] temporary temp volume file is not cleared when server restarted with temp_volume_path option (#2345)

* [CBRD-23680] temporary temp volume file is not cleared when server restarted with temp_volume_path option
Uses 'temp_volume_path' when deleting temporary volume files

* correct indentation

Co-authored-by: JoohoK <joohok@cubrid.com>

* [CBRD-23642] Change the way to handle the wrong backup time when executing restoredb (#2251)

http://jira.cubrid.org/browse/CBRD-23642

* [CBRD-23686] If the number of index columns is large, the optimizer cannot select a more appropriate index. (#2347)

http://jira.cubrid.org/browse/CBRD-23686

heuristic factor of index scan formula is eliminated.

* [CBRD-23637] Implementation of secure CUBRID jdbc driver (#2346)

* [CBRD-23637] Implementation of secure CUBRID jdbc driver

* [CBRD-23637] remove e.printStackTrace()

* [CBRD-23689] If both outer join and inner join are present, the optimizer cannot find the optimal join order. (#2351)

http://jira.cubrid.org/browse/CBRD-23689

 add 'QO_TERM_OR_PRED' flag to the term. in the case of 'QO_TERM_OR_PRED', if there are outer join among all the nodes included, modify term classification to become after-join-term.

* [CBRD-23642] Relieve error severity with a wrong backup time

http://jira.cubrid.org/browse/CBRD-23642

* [CBRD-22637] Excessive domain cache degrades search performance using index scan (#2352)

http://jira.cubrid.org/browse/CBRD-22637

When called from qexec_execute_mainblock() ==> scan_next_scan(), btid_int must be modified to be reused. modify to reuse btid_int by adding the reuse_btid_int variable.

* [CBRD-23669] Provide FULL SQL_Text, if tranlist executed with -f option (#2318) (#2358)

* [CBRD-23639] Provide FULL SQL_Text, if tranlist executed with -f option

* [CBRD-23639] Remove unused definition

* [CBRD-23639] fix indentation

* [CBRD-23671] Fix regression caused by not completing Resultset in ServerSidePreparedStatement (#2355)

http://jira.cubrid.org/browse/CBRD-23671

* [CBRD-23696] Core dump occurs when correlated subquery is used as in-line view.

http://jira.cubrid.org/browse/CBRD-23696

Term classification of 'QO_TC_DUMMY_JOIN' is excluded from pseudo-term of derived table dependency.

* [CBRD-23637] Add error code for ssl handshake exception (#2360)

* [CBRD-23679] Adding a configuration parameter and control for strict type translation (#2340)

* [CBRD-23679] Adding a configuration parameter and control for strict type translation

* [CBRD-23679] revised: default value to false

* [CBRD-23679] revised: check truncated case

* [CBRD-23679] add modification for BIT type

* [CBRD-23679] indent

* [CBRD-23679] param name change and default value to true

* [CBRD-23706] Remove odbc/oledb from CUBRID/cubrid (#2364)

* [CBRD-23697] occurred error "Cannot coerce value of domain character to domain integer" when executing update. (#2361)

1. fix to coerce the value to the type of the assigned column in set clause at semantic check.
1. add type of regu_var to xasl dump output.

* [CBRD-23679] Adding a configuration parameter and control for strict type translation (#2379)

* [CBRD-23679] Adding a configuration parameter and control for strict type translation

* [CBRD-23679] revised: default value to false

* [CBRD-23679] revised: check truncated case

* [CBRD-23679] add modification for BIT type

* [CBRD-23679] indent

* [CBRD-23679] param name change and default value to true

* [CBRD-23679] revised: alter table varchar same precision

* [CBRD-23679] rename system parameter

* [CBRD-23679] indent

* [CBRD-23679] macro define correction

* [CBRD-23679] allow overflow except for string type

* [CBRD-23709] error message is displayed incorrectly in 'MERGE' clause (#2381)

http://jira.cubrid.org/browse/CBRD-23709

fix to display 'Multiple rows in source table match the same row in destination table.' error when there are no existing errors

* [CBRD-21828] Process '.5' style number in loaddb_object as well as '0.5 (#2366)

* [CBRD-23649] make dummy table instead of db_root (#2365)

Co-authored-by: Joohok <joohok@github.com>

* [CBRD-23712] support --skip-vacuum option at csql command on SA mode (#2386)

For skipping vacuum at csql command on SA mode
 * add an option (--skip-vacuum) into csql command and it is used only with SA option.
 * the option can be used with --sysadm.
 * extend two client type (SKIP_VACUUM_CSQL. SKIP_VACUUM_ADMIN_CSQL) for this task.
 * add an argument (bool skip-vacuum) into boot_restart_server().
 * If client type is SKIP_VACUUM_CSQL or SKIP_VACUUM_ADMIN_CSQL, the argument let be true.
* modify that error will occurs if using with -S and --write-on-standby together

* change an limit value of max_client from 2000 to 4000 (#2390)

* [CBRD-23679] Adding a configuration parameter and control for strict type translation (#2392)

* [CBRD-23679] consideration on cast function

* [CBRD-23679] revised: consideration on cast

* [CBRD-23679] bit to bit truncated

* [CBRD-23679] modify corece for show condition

* [CBRD-23679] modified bit string coerce

* [CBRD-23679] revised: bit string coerce

* [CBRD-23679] check incorrect trailing bit

* [CBRD-23679] alter table: allow nchar to char

* indent

* [CBRD-23679] rename tp_value_cast_ex to tp_value_cat_force

* change an limit value of db's max_clients and broker's max_num_appl_server (#2394)

* [CBRD-23679] Adding a configuration parameter and control for strict type translation (#2397)

* [CBRD-23679] revise: xasl_generation for update-list

* [CBRD-23679] check null for update-list, aptr->outptr_list

* [CBRD-23708] change table option's default value to reuse_oid (#2385)

* This is task that the default value is set by reuse_oid option, when create table without oid table option.
The following is a list of changes.
    - Add DONT_REUSE_OID keyword to lexer and grammar
    - Modify semantic check routine
    - Add "create_table_reuseoid" to system parameter
    - Modify to use system parameter ("create_table_reuseoid") for creating table without oid table option
    - Modify "unloadb" & "show create table" to display "DONT_REUSE_OID"
    - Modify tables of demodb_schema using "DONT_REUSE_OID"
    - Replace a collation of demodb from en_US.iso88591 to en_US.utf8 at make_cubrid_demo.sh

* [CBRD-23687] Apply SSL Broker/CAS to damson (#2387)

* [CBRD-23687] Apply SSL Broker/CAS to damson

* [CBRD-23687] Add cas_ssl.c

* [CBRD-23687] Put Error handling

* [CBRD-23687] Fix indent

* [CBRD-23687] Change cas_network.c (remove unnecessary function call)

* [CBRD-23687] Change order of extern definitions

* [CBRD-23687] Async READ for SSL

* [CBRD-23687] Change for ASYNC write with timeout

* [CBRD-23687] Make return value 0 of SSL_read() as error

* [CBRD-23688] Implementation of secure CUBRID CCI driver (#2362)

* [CBRD-23688] Create cci_ssl.c, cci_ssl.h using openSSL for data encryption

* [CBRD-23688] Add ssl, ctx, useSSL variables to T_CON_HANDLE

* [CBRD-23688] Add useSSL Property to T_URL_PROPERTY

* [CBRD-23688] Add magic string(CUBRS) for ssl

* [CBRD-23688] Create ssl read/write macro function for openSSL

* [CBRD-23688] Change net_send_msg_header(), net_recv_msg_header(), net_send_stream() net_recv_stream() to use both non ssl(pure socket) and ssl

* [CBRD-23688] Add ssl connection and ssl free

* [CBRD-23688] Add ssl connection to Health Check Thread

* [CBRD-23688] Add ssl error code

* [CBRD-23688] fix indent

* [CBRD-23688] fix indent

* [CBRD-23688]add error code(ssl handshake exception)

* [CBRD-23688] add T_SSL_HANDLE structure and data send/recv macro function, createSSL function

* [CBRD-23688] add mutex lock to createSSL()

* [CBRD-23688] change to return the correct error to cci_datasource_create()

* [CBRD-23688] delete deprecated code since OpenSSL 1.1.0

* [CBRD-23688] change to close ssl before close socket

* [CBRD-23688] change useSSL check condition

* [CBRD-23688] modify SEND_DATA/RECV_DATA macro function

* [CBRD-23688] modify ssl warraper func and divide cleanup_ssl() into cleanup_ssl(), cleanup_ssl_ctx()

* [CBRD-23688] change createSSL() to ssl_session_init() and modify error handling

* [CBRD-23688] modify data recevie condition

* [CBRD-23688] add copyright text
Copyright (c) 2016 CUBRID Corporation.

* [APIS-833] Add isolation level of CUBRID Engine version 9 or earlier for backward compatibility (#2395)

* [CBRD-23637] fix to terminate the connection immediately when an ssl handshake exception occurs (#2393)

* [CBRD-23697] Fix regression caused by different domain of db_value (#2403)

http://jira.cubrid.org/browse/CBRD-23697

In the case of the same type as the allocated column, incorrect precision is entered without coerce the type. fix to coerce value to the type of the assigned column even if it is the same type.

* modify system parameter (create_table_reuseoid) to can be changed at client during session. (#2405)

* [CBRD-23708] change table option's default value to reuse_oid (#2408)

* modified to get default value of reuse_oid from system parameter, if don't use table option related reuse_oid.

* [CBRD-23722] Prevent endless busy waiting for query execution in abnormal network circumstanec (#2407)

* [CBRD-23722] Prevent endless busy waiting for query execution in abnormal network circumstance

* [CBRD-23722] Add status_request_info packet information

* [CBRD-23722] change function name and parameter name

* [CBRD-23722] change ntohl() to htonl()

* [CBRD-23730] ignore user and password option at tranlist and killtran utility (#2409)

* ignore user and password option and connect to server by disable password at tranlist utility.
* ignore password option if don't use -i or --kill option at killtran utility.

* [CBRD-23685] coredump while insert something into column of type 'char (1073741823)' (#2412)

* [CBRD-23685] coredump while insert something into column of type 'char (1073741823)'

* improve readability: add a comment

* [CBRD-23714] change an limit value of max_client (#2413)

* modied to occur error if max_clients over than 4000.

* [CBRD-23733] Add Microsoft_VCXXX_MFC_xXX.msm for MFC DLL (#2417)

* [CBRD-23729] Enhance compactdb utility (#2415)

* (1) To execute compactdb with specified classes on SA mode, I modified codes for using -i option and class arguments on compactdb.
    If use -i or class arguments, modified compactdb will be skipped phase3 (reclaim catalog, deleted files, file_tracker) on SA mode.
    example)
        cubrid compactdb -S -v -i compact.txt demodb
        cubrid compactdb -S -v demodb athlete event record

(2) To execute compactdb on C/S mode at standby server, I added option such as --standby which is hidden option.
    example)
        cubrid compactdb -C -v -i compact.txt --standby demodb@standby
        cubrid compactdb -C --standby -v demodb@standby athlete event record

* [CBRD-23679] Adding a configuration parameter and control for strict type translation (#2419)

* [CBRD-23679] Adding a configuration parameter and control for strict type translation

* indent

* [CBRD-23734] Core dumped in cubbase::restrack_assert at src/base/resource_tracker.hpp:456

http://jira.cubrid.org/browse/CBRD-23734

add pr_clear_value() to prevent potential memory leak (#2423)

* [CBRD-23734] Core dumped in cubbase::restrack_assert at src/base/resource_tracker.hpp:456 (#2428)

http://jira.cubrid.org/browse/CBRD-23734

add to clear g_regu_list at free_agg_hash_context to prevent memery leak.

* Revert "[CBRD-23734] Core dumped in cubbase::restrack_assert at src/base/resource_tracker.hpp:456" (#2426)

http://jira.cubrid.org/browse/CBRD-23734

Reverts #2423

The vfetch_to variable can be referenced in other reguvars, so it must be cleared at the end of execution of the XASL block.

* [CBRD-23702] Modernize Heap Layers (#2384)

Modernize Heap Layers

* [CBRD-23703] Improve compression with faster library (#2391)

* Improve compression with faster library

* [CBRD-23649] The dual table is excluded from the results of unloaddb utility because it is a system catalog. (#2433)

http://jira.cubrid.org/browse/CBRD-23649

fix a bug reported from the regression test.

* [CBRD-23737] Leaves a log to trace the cause when a failover is occurred due to a server hang. (#2432)

http://jira.cubrid.org/browse/CBRD-23737

* [CBRD-23704] Replace gcrypt usage with openssl (#2406)

http://jira.cubrid.org/browse/CBRD-23704

Replaced CRC32 with a new open-source implementation.
Rewritten functions using openss libraryl:
 - sha functions in crypt_opfunc 
 - md5 functions
 - random in crypt_opfunc
 - aes/des
Removed:
 - gcrypt library
 - libgpg-error library
 - old md5 files (replaced by openssl)

* [CBRD-23677] fixes bug reported in the regression test. (#2425)

http://jira.cubrid.org/browse/CBRD-23677

* [CBRD-23701] The 'cubrid hb start' command operates incorrectly if a database with ha_mode=off is registered in ha_node_list. (#2431)

http://jira.cubrid.org/browse/CBRD-23701

* [CBRD-21560] Syntax errors can occur when a view containing TRUNC() or ROUND() function is fetched (#2435)

http://jira.cubrid.org/browse/CBRD-21560
This change removes the returning error block when "default" is specified in format argument for TRUNC() and ROUND()

* [CBRD-23606] An error occurs when the binding value is larger than 256 chars in merge query (#2411)

* [CBRD-23606] An error occurs when the binding value is larger than the column length in merge query

* indent

* fix 'merge into query flag'

* revert set flag at qexec_end_one_iteration

* fix: add func. do_select_for_ins_upd

* [CBRD-23703] fix build error on Windows (#2436)

http://jira.cubrid.org/browse/CBRD-23703

Fix slip of #2391

* [CBRD-23606] An error occurs when the binding value is larger than 256 chars in merge query (#2438)

* [CBRD-23665] Support Hash List Scan (#2389)

http://jira.cubrid.org/browse/CBRD-23665

Support Hash List Scan

* [CBRD-23723] Include table name in loaddb error message for not null error (#2420)

* [CBRD-23723] Introduce new message to report table name in addition to column name at loaddb not null error

* [CBRD-23723] Changes for loaddb SA mode

* [CBRD-23723] Rewrite in style that does not add new error code.

* [CBRD-23723] table1.col1 style error message for loaddb CS mode

* [CBRD-23723] Revert cubrid.msg files

* [CBRD-22803] show statement for page buffer status (#2437)

http://jira.cubrid.org/browse/CBRD-22803

* [CBRD-23704] Exclude null-terminator from returned len (#2439)

http://jira.cubrid.org/browse/CBRD-23704

Fix slip of #2406

Co-authored-by: Kisoo Han <kisoo-han@cubrid.com>
Co-authored-by: airnet73 <61675061+airnet73@users.noreply.github.com>
Co-authored-by: shparkcubrid <49504233+shparkcubrid@users.noreply.github.com>
Co-authored-by: Hyung-Gyu Ryoo <hgryoo@cubrid.com>
Co-authored-by: joonmin83 <hornetmj@cubrid.com>
Co-authored-by: bigs <wrlawodms@gmail.com>
Co-authored-by: JoohoK <54789363+JoohoK@users.noreply.github.com>
Co-authored-by: JoohoK <joohok@cubrid.com>
Co-authored-by: Joohok <joohok@github.com>
Co-authored-by: Mike MyungHwan Oh <mhoh@cubrid.com>
Co-authored-by: SE park <shpark@cubrid.com>
Co-authored-by: alexandru <alexandru.stan@arnia.ro>
Co-authored-by: radudoros <radudoros@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants