I'm testing 5.1 server to migrate from 4.5, and I've found something.
This is my RXML test snippet:
----x8-------x8-------x8-------x8-------x8-----
<emit source="sql" host="ng_db"
query="SELECT NULL as n">
<pre>
Entityref: &_.n;
insert: <insert variable="n" />
<?pike
write("Type: %t, value: %O",_.n,_.n);
?>
----x8-------x8-------x8-------x8-------x8-----
Seeing in modules/database/sqltag.pike, it was changed that
handling of SQL-null since version 5.0.
First, I tried above code on 4.5 server:
> ----Result Output of 4.5 ----
> Entityref:
> insert:
> Type: string, value: ""
>
> ----Result Output----
Same code on 5.1, compat level 4.5:
> ----Result Output of 5.1, compat level 4.5 ----
> Entityref:
> insert:
>
> RXML run error: No such variable (n).
> | <insert variable="n">
> | <emit host="ng_db" query="SELECT NULL as n" source="sql">
>
> Type: int, value: 0
> ----Result Output----
It's not comaptible with 4.5 behavior.
After Setting site's compat level to 5.0, I restarted server,
got this output.
> ----Result Output of 5.1, compat level 5.0 ----
> Entityref:
> insert:
> Type: object, value: Sql.NULL
>
> ----Result Output----
Seeing these result, as far as emit sql is concerned, it would be better
setting compat level higher than 4.5. But this may cause other
problems...
Can't it be avoidable RXML error on roxen 5.1 when compat level smaller
than 5.0? I guess it should be work as roxen 4.5 does.
--
ITANI Eiichiro