Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.

Changing qa_posts>content from VARCHAR to TEXT to write more text - consequences?

+2 votes
asked Dec 10, 2013 in Q2A Core by q2apro
edited Dec 10, 2013 by q2apro

I am in a situation where the 8000 characters allowed are not sufficient for posting content. I tried to increase the 8000 to 20000 but get the mysql error notice:

1118 - Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs

When I change VARCHAR to TEXT, what are the consequences? Will q2a get any problems with that?


EDIT: I changed 'content' from VARCHAR to MEDIUMTEXT now and it seems to work.

With MediumText you get: max. ~16MB – 16,777,215 character – around 4,194,303 utf-chars

If you need to do the same, after the DB changes, you need to edit file qa-db-maxima.php:

@define('QA_DB_MAX_CONTENT_LENGTH', 500000); // before 8000 (varchar)


Q2A version: 1.6.2
commented Jun 11, 2014 by q2apro
edited Jun 11, 2014 by q2apro
This question is still open, can somebody tell me if it will slow down q2a? Will changing qa_posts field "content" from "varchar(8000)" to "Mediumtext" slow down q2a?

Okay, found it myself: http://stackoverflow.com/a/24156661/1066234

1 Answer

+1 vote
answered Dec 10, 2013 by QA-Themes
I guess you should create a clone of your site on localhost to be sure, but recalling the code on db read and write functions I think you will have no problem.

but of course you will have to edit 'qa-db-install.php' file each time you want to update your Q2A to be sure that it wont overright previous change and trim content.
commented Dec 10, 2013 by q2apro
Thanks for the hint with the update problem!