mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-27 23:29:57 +09:00
Issue 1023 - Bug when paging query with outer join and distinct.
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10299 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
fef0e92afd
commit
ad88ec5f8c
4 changed files with 38 additions and 1 deletions
|
|
@ -229,4 +229,15 @@
|
|||
order by `comments`.`list_order` asc limit 0, 5';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
|
||||
|
||||
function test_distinct_outer_join(){
|
||||
$xml_file = _TEST_PATH_ . "db/xml_query/mysql/data/distinct_outer_join.xml";
|
||||
$argsString = '$args->site_srl = 0;';
|
||||
$expected = 'select distinct `modules`.`module_srl` as `module_site_srl`
|
||||
from `xe_sites` as `sites`
|
||||
left join `xe_modules` as `modules` on `modules`.`module_srl` = `sites`.`index_module_srl`
|
||||
where `sites`.`site_srl` = 0';
|
||||
$this->_test($xml_file, $argsString, $expected);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
<query id="getSiteInfo" action="select">
|
||||
<tables>
|
||||
<table name="sites" alias="sites" />
|
||||
<table name="modules" alias="modules" type="left join">
|
||||
<conditions>
|
||||
<condition operation="equal" column="modules.module_srl" default="sites.index_module_srl" notnull="notnull" pipe="and" />
|
||||
</conditions>
|
||||
</table>
|
||||
</tables>
|
||||
<columns>
|
||||
<column name="DISTINCT modules.module_srl" alias="module_site_srl" />
|
||||
</columns>
|
||||
<conditions>
|
||||
<condition operation="equal" column="sites.site_srl" var="site_srl" notnull="notnull" />
|
||||
</conditions>
|
||||
</query>
|
||||
Loading…
Add table
Add a link
Reference in a new issue