MMBase

utf8/mysql/search constraints.

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Cannot Reproduce
  • Affects Version/s: 1.6.0
  • Fix Version/s: Irrelevant
  • Component/s: Database Layer
  • Description:
    Hide
    original bugid: #4850
    The following jsp:
    <mm:cloud logon="admin" pwd="admin2k">
    <mm:listnodes type="news" constraints="subtitle LIKE 'Caf??©%'">
      <mm:field name="subtitle" />
    </mm:listnodes>
    <mm:createnode type="news">
      <mm:setfield name="subtitle"><mm:write value="Caf??©" /></mm:setfield>
    </mm:createnode>
    </mm:cloud>
     
    gives in query log:
    89 Query SELECT * FROM mm_news WHERE subtitle LIKE 'Caf�%'
    INSERT INTO mm_news ( otype,owner,date,number,body,title,subtitle,intro ) VALUES ( 66,'admin',-1,215,'','','Caf??©','' )

    in other words, are not consistent.
    I think the problem is in getList of MMObjectBuilder:
     ResultSet rs = stmt.executeQuery(query);

    Principally this could be solved by a hook in MMJdbc2NodeInterface like this:

    In MMObjectBuilder there is the function getQuery which calls QueryConvertor.altaVista2SQL(where,mmb.getDatabase());
    So, e.g. in QueryConverte this hook of MMJdbc2NodeInterface could be called (implementing identity on default).
    Show
    original bugid: #4850 The following jsp: <mm:cloud logon="admin" pwd="admin2k"> <mm:listnodes type="news" constraints="subtitle LIKE 'Caf??©%'">   <mm:field name="subtitle" /> </mm:listnodes> <mm:createnode type="news">   <mm:setfield name="subtitle"><mm:write value="Caf??©" /></mm:setfield> </mm:createnode> </mm:cloud>   gives in query log: 89 Query SELECT * FROM mm_news WHERE subtitle LIKE 'Caf�%' INSERT INTO mm_news ( otype,owner,date,number,body,title,subtitle,intro ) VALUES ( 66,'admin',-1,215,'','','Caf??©','' ) in other words, are not consistent. I think the problem is in getList of MMObjectBuilder:  ResultSet rs = stmt.executeQuery(query); Principally this could be solved by a hook in MMJdbc2NodeInterface like this: In MMObjectBuilder there is the function getQuery which calls QueryConvertor.altaVista2SQL(where,mmb.getDatabase()); So, e.g. in QueryConverte this hook of MMJdbc2NodeInterface could be called (implementing identity on default).

Activity

Hide
Michiel Meeuwissen added a comment - 2003-01-02 16:53
utf8/mysql/search constraints.
The following jsp:
<mm:cloud logon="admin" pwd="admin2k">
<mm:listnodes type="news" constraints="subtitle LIKE 'Caf??©%'">
  <mm:field name="subtitle" />
</mm:listnodes>
<mm:createnode type="news">
  <mm:setfield name="subtitle"><mm:write value="Caf??©" /></mm:setfield>
</mm:createnode>
</mm:cloud>
 
gives in query log:
89 Query SELECT * FROM mm_news WHERE subtitle LIKE 'Caf�%'
INSERT INTO mm_news ( otype,owner,date,number,body,title,subtitle,intro ) VALUES ( 66,'admin',-1,215,'','','Caf??©','' )

in other words, are not consistent.
Show
Michiel Meeuwissen added a comment - 2003-01-02 16:53 utf8/mysql/search constraints. The following jsp: <mm:cloud logon="admin" pwd="admin2k"> <mm:listnodes type="news" constraints="subtitle LIKE 'Caf??©%'">   <mm:field name="subtitle" /> </mm:listnodes> <mm:createnode type="news">   <mm:setfield name="subtitle"><mm:write value="Caf??©" /></mm:setfield> </mm:createnode> </mm:cloud>   gives in query log: 89 Query SELECT * FROM mm_news WHERE subtitle LIKE 'Caf�%' INSERT INTO mm_news ( otype,owner,date,number,body,title,subtitle,intro ) VALUES ( 66,'admin',-1,215,'','','Caf??©','' ) in other words, are not consistent.
Hide
Michiel Meeuwissen added a comment - 2003-01-02 19:21
utf8/mysql/search constraints.
The following jsp:
<mm:cloud logon="admin" pwd="admin2k">
<mm:listnodes type="news" constraints="subtitle LIKE 'Caf??©%'">
  <mm:field name="subtitle" />
</mm:listnodes>
<mm:createnode type="news">
  <mm:setfield name="subtitle"><mm:write value="Caf??©" /></mm:setfield>
</mm:createnode>
</mm:cloud>
 
gives in query log:
89 Query SELECT * FROM mm_news WHERE subtitle LIKE 'Caf�%'
INSERT INTO mm_news ( otype,owner,date,number,body,title,subtitle,intro ) VALUES ( 66,'admin',-1,215,'','','Caf??©','' )

in other words, are not consistent.
I think the problem is in getList of MMObjectBuilder:
 ResultSet rs = stmt.executeQuery(query);

Principally this could be solved by a hook in MMJdbc2NodeInterface like this:

In MMObjectBuilder there is the function getQuery which calls QueryConvertor.altaVista2SQL(where,mmb.getDatabase());
So, e.g. in QueryConverte this hook of MMJdbc2NodeInterface could be called (implementing identity on default).
Show
Michiel Meeuwissen added a comment - 2003-01-02 19:21 utf8/mysql/search constraints. The following jsp: <mm:cloud logon="admin" pwd="admin2k"> <mm:listnodes type="news" constraints="subtitle LIKE 'Caf??©%'">   <mm:field name="subtitle" /> </mm:listnodes> <mm:createnode type="news">   <mm:setfield name="subtitle"><mm:write value="Caf??©" /></mm:setfield> </mm:createnode> </mm:cloud>   gives in query log: 89 Query SELECT * FROM mm_news WHERE subtitle LIKE 'Caf�%' INSERT INTO mm_news ( otype,owner,date,number,body,title,subtitle,intro ) VALUES ( 66,'admin',-1,215,'','','Caf??©','' ) in other words, are not consistent. I think the problem is in getList of MMObjectBuilder:  ResultSet rs = stmt.executeQuery(query); Principally this could be solved by a hook in MMJdbc2NodeInterface like this: In MMObjectBuilder there is the function getQuery which calls QueryConvertor.altaVista2SQL(where,mmb.getDatabase()); So, e.g. in QueryConverte this hook of MMJdbc2NodeInterface could be called (implementing identity on default).
Hide
Michiel Meeuwissen added a comment - 2006-12-19 16:37
This alsp makes that with database msql-latin1 strange charachters in an images don't work, because itcannot find it back in icaches table.
Show
Michiel Meeuwissen added a comment - 2006-12-19 16:37 This alsp makes that with database msql-latin1 strange charachters in an images don't work, because itcannot find it back in icaches table.
Hide
Michiel Meeuwissen added a comment - 2008-07-21 23:21
This long standing issue was still not fixed.
therefore it is probably not so important.

Rescheduling for 1.9.1
Show
Michiel Meeuwissen added a comment - 2008-07-21 23:21 This long standing issue was still not fixed. therefore it is probably not so important. Rescheduling for 1.9.1
Hide
Michiel Meeuwissen added a comment - 2008-11-08 12:45
If you have a unicode (nowadays supported by mysl) db, this is not an issue any more.
Show
Michiel Meeuwissen added a comment - 2008-11-08 12:45 If you have a unicode (nowadays supported by mysl) db, this is not an issue any more.

People

Dates

  • Created:
    2003-02-21 12:33
    Updated:
    2008-11-08 12:45
    Resolved:
    2008-11-08 12:45