Last modified: 2004-09-07 13:46:30 UTC
On a PostgreSQL-backed wiki, rendering <math> segments fails when trying to record the equation into the math table: Warning: pg_query() [function.pg-query]: Query failed: ERROR: null value in column "math_html" violates not-null constraint in / var/www/html/gres/includes/DatabasePostgreSQL.php on line 96 A database error has occurred Query: INSERT INTO math (math_inputhash,math_outputhash,math_html_conservativeness,math_html,math_mathml) VALUES ('?0?????\\??: ??','(?m??hsF~e}2?''?H','2',NULL,NULL) Function: Error: 1 ERROR: null value in column "math_html" violates not-null constraint Backtrace: DatabasePostgreSQL.php line 370 calls wfDebugDieBacktrace() Database.php line 297 calls DatabasePostgreSQL::reportQueryError() DatabasePostgreSQL.php line 317 calls DatabasePostgreSQL::query() Math.php line 138 calls DatabasePostgreSQL::replace() Math.php line 212 calls MathRenderer::render() Parser.php line 271 calls renderMath() Parser.php line 132 calls Parser::strip() OutputPage.php line 240 calls Parser::parse() Article.php line 830 calls OutputPage::addWikiText() index.php line 119 calls Article::view()
fixed in current schema, alter table math alter column math_mathml drop not null; alter table math alter column math_html drop not null; those 'not nulls' suck anyway, if field can be null, why shouldn't it?