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

value.nick_values column isn't long enough #2291

Open
RhinosF1 opened this issue May 29, 2022 · 2 comments · May be fixed by #2293
Open

value.nick_values column isn't long enough #2291

RhinosF1 opened this issue May 29, 2022 · 2 comments · May be fixed by #2293
Labels
Bug Things to squish; generally used for issues

Comments

@RhinosF1
Copy link
Contributor

Description

https://github.com/sopel-irc/sopel/blob/master/sopel/db.py#L66 states it should be 255 charecters. That doesn't even fit seen which is from core as that needs at least 512. This should be made higher.

Reproduction steps

  1. Run bot with mysql/MariaDB
  2. Say something long3.
  3. See error4.

Expected behavior

Column is big enough

Logs

None yet, I can post if really needed

Environment

  • Sopel .version: somewhere between 7 & 8
  • Sopel installed via: source
  • Python version: 3.9.2
  • Operating system: Bullseye
  • IRCd /version: Libera
  • Relevant plugins: core, seen

Notes

TEXT might be good, moaned on IRC. Will probably make TEXT.

@RhinosF1 RhinosF1 added the Bug Things to squish; generally used for issues label May 29, 2022
@RhinosF1 RhinosF1 changed the title nick_values column isn't long enough value.nick_values column isn't long enough May 29, 2022
@RhinosF1
Copy link
Contributor Author

MariaDB [sopelbeta]> ALTER TABLE nick_values MODIFY value TEXT;
Stage: 1 of 2 'copy to tmp table' 16.8% of stage doStage: 2 of 2 'Enabling keys' 0% of stage done Query OK, 5947 rows affected (0.496 sec)
Records: 5947 Duplicates: 0 Warnings: 0

@RustyBower
Copy link
Contributor

RustyBower commented Jul 13, 2022

This should be handled via #2317

dgw added a commit to dgw/sopel-waifu that referenced this issue Feb 24, 2024
I decided that the complexity of caching suggestions to `bot.db` isn't
worth it. Savings on SSD wear are likely to be negligible as this
feature doesn't see heavy use, and it's actually *more* likely to lose
data that's only cached in `bot.memory` if the bot crashes or otherwise
fails to shut down gracefully. Plus, plugin values in the database will
be truncated to a fairly short length on certain DB backends (see issue
tracking this upstream, sopel-irc/sopel#2291).

Tested live adding a few waifus, viewed the file (making sure newlines
were handled correctly), and then used `.clearwaifus` to delete it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Things to squish; generally used for issues
Projects
None yet
2 participants