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

Add UserVarEvent #44

Closed
wants to merge 46 commits into from
Closed

Add UserVarEvent #44

wants to merge 46 commits into from

Conversation

heehehe
Copy link
Member

@heehehe heehehe commented Aug 7, 2023

Resolve #25

Overview

This PR addresses the implementation of the UserVarEvent class to handle MySQL/MariaDB binlog events related to user variables. Additionally, I've added a new test class TestStatementConnectionSetting to verify the functionality with statement-based logging.

Description

UserVarEvent Class Implementation: Developed based on MariaDB and MySQL's official documentation, this class provides robust handling for different user variable event types like STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT(not in use), and DECIMAL_RESULT.

Statement-based Logging Test (TestStatementConnectionSetting): A new test class was added to cater specifically to the testing requirements of UserVarEvent under statement-based logging.

Key Features and Implementation Details

Type-specific Value Parsing

  • Various functions handle the value parsing for each user variable type.(STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT, DECIMAL_RESULT)
  • DECIMAL Type : Created a novel bit-parsing function for this type.
  • INT Type: Employed flags to distinguish between signed and unsigned integers.
    • Tested extreme cases, including:
    • Unsigned max(18446744073709551615)
    • Signed max( 9223372036854775807)
    • Signed min(-9223372036854775808)
    • Near zero(-1) ;

Method: _set_value_from_temp_buffer

  • This function sets the appropriate value from the temporary buffer based on the event's type code. A dictionary mapping enables the correlation of each event type to its specific parsing method.

Reference

@heehehe heehehe added the 3조 3조 만세 label Aug 11, 2023
@heehehe heehehe changed the title add UserVarEvent Add UserVarEvent Aug 11, 2023
@mjs1995
Copy link
Member

mjs1995 commented Aug 31, 2023

@dongwook-chan 리뷰 부탁드리겠습니다!!

@mjs1995 mjs1995 marked this pull request as ready for review August 31, 2023 12:59
@mjs1995 mjs1995 requested a review from dongwook-chan August 31, 2023 13:05
Copy link

@dongwook-chan dongwook-chan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

매번 어려운 과제 하시느라 고생이 많으십니다! 3조가 모든 조 통틀어서 특히 팀웤이 매우 좋으시고 그 결과로 인해 커밋이 늘어나는 점은 매우 긍정적이라고 볼 수 있습니다. 단, 그 개수가 너무 많으면 히스토리 관리의 순기능이 퇴색되는 단점도 있습니다. 따라서 협업하실 때는 커밋 마음껏 만들어주시고 PR 리뷰 받는 시점에는 몇 개의 의미있는 커밋으로 squash 부탁드리겠습니다. 최종적으로 몇 개의 커밋을 남겨야하는지 고민되신다면 연락주세요 :) 함께 고민해보면 좋을 것 같습니다!!

@heehehe
Copy link
Member Author

heehehe commented Sep 2, 2023

julien-duponchelle#466 반영 완료 🎉

@heehehe heehehe closed this Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3조 3조 만세
Projects
None yet
Development

Successfully merging this pull request may close these issues.

event 구현 - USER_VAR_EVENT
6 participants