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

Remove SYSTEM_ADMIN_VARIABLES privilege #167

Open
HugoFara opened this issue Dec 26, 2023 · 1 comment
Open

Remove SYSTEM_ADMIN_VARIABLES privilege #167

HugoFara opened this issue Dec 26, 2023 · 1 comment
Labels
database Database-related issues enhancement Develop an existing feature

Comments

@HugoFara
Copy link
Owner

Originally on discussion on #147 by @ProgramComputer:

LWT does modify server variables, check for "set globals" such as "max_heap_table_size" and "tmp_table_size". These are not being modified at runtime and only after session restart do these changes appear. Not a concern if SQL interactions are handled safely. This line sudo mysql -e "GRANT SYSTEM_VARIABLES_ADMIN ON *.* TO $user@$host" prevents the need to restart the session after a text is parsed. If vulnerability is still a risk, the line can be removed. It resolved my error below when I installed demo db.

Screenshot 2023-12-25 205423

As far as I now, editing MAX_HEAP_SIZE was a quick and dirty way to import longer chunks of data, such as very long texts, backups and new terms. However it may not be the best approach, as it needs a privilege elevation, and may pose security issues at some point.

As temporary tables are already in use, coupling with batch insert can be a workaround. I do not think of using bulk insert due to the previous issues of this method in the past (#20).

@HugoFara HugoFara added enhancement Develop an existing feature database Database-related issues labels Dec 26, 2023
@HugoFara HugoFara changed the title Remove necesity from SYSTEM_ADMIN_VARIABLES Remove SYSTEM_ADMIN_VARIABLES privilege Dec 26, 2023
HugoFara added a commit that referenced this issue Jan 5, 2024
Removes SQL system variables changes on text update (#167).
checkTextWithExpressions is ready for production.
HugoFara added a commit that referenced this issue Jan 5, 2024
HugoFara added a commit that referenced this issue Jan 5, 2024
Progresses on #167: SYSTEM_ADMIN_VARIABLE no longer required for texts reparsing.
Closes #182: MeCab won't for TTS if not necessary.
@HugoFara
Copy link
Owner Author

HugoFara commented Apr 1, 2024

Update: since 12a90a3, it is no longer necessary for text reparsing. It is still necessary for backup/restore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
database Database-related issues enhancement Develop an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant