[ircd-ratbox] ratbox-services and database hooks, where to begin.

Jeremy Chadwick ratbox at jdc.parodius.com
Wed Dec 16 06:41:17 UTC 2009

On Tue, Dec 15, 2009 at 08:41:05PM -0500, Ryan wrote:
> Apologies for not mentioning this previously, but I do have one
> feature request if at all possible.  My reason for choosing sqlite
> originally as my database backend is that it allows a 390 character
> topic length while the mysql option limited it to 255 characters. (The
> max for a varchar field if I'm not mistaken)  The request then is to
> see a larger topic length supported by the rserv mysql backend.

Topic lengths vs. MySQL column or table schema is the least of your
worries when it comes to what you're engineering.  :-)

MySQL 5.0.3 and prior limit VARCHAR length to 255 characters, while
MySQL 5.0.4 and later limit it to maximum row size (64k, but this is
shared across all columns) as well as charset used.  You're better off
using a BLOB for this purpose.  Why BLOB and not TEXT?  Because there's
no guarantee the text you're inserting into the column will be in the
charset you've configured MySQL to use (either for the column or for the
table or db itself).  Remember: people do set topics to things other
than ASCII characters (ex. Japanese JIS strings).


Happy coding!

| Jeremy Chadwick                                   jdc at parodius.com |
| Parodius Networking                       http://www.parodius.com/ |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |

More information about the ircd-ratbox mailing list