Hi,

ok will do.

But what if a zero did happen to get  through? would you put this down to
just bad down to bad code and testing?

PS any news on my Zend/Dom commit for exceptions branch? i did submit
another pull request? I have it working with eclipse now so Ill try again if
now good?

Thanks
Daniel

On 4 October 2010 16:59, Ralph Schindler <[email protected]> wrote:

> There is some more discussion here:
>
> http://framework.zend.com/issues/browse/ZF-7666
>
> I'd follow up on that thread.
>
> The problem is  that LIMIT is not an SQL standard, and there is no standard
> approach.
>
> http://troels.arvin.dk/db/rdbms/#select-limit
>
> As such, our API in ZF1 needs to remain as consistent for possible for the
> main API.
>
> What I fail to see is why this cannot be implemented in userland?
>
> Instead of:
>
>  $select->from()-> .... ->limit($limit);
>
> You dont just use:
>
>  $select->from()-> ....;
>  if (is_int($limit) && $limit > 0) {
>    $select->limit(0);
>  }
>
> Doesn't that (semantically) make more sense?
>
> -ralph
>
>
>
> On 10/4/10 9:43 AM, Daniel Latter wrote:
>
>> not yet, will do later.
>>
>> Daniel
>>
>> On 4 October 2010 15:42, Hector Virgen<[email protected]>  wrote:
>>
>>  I agree; iterating over a "limit 0" result set should result in no more
>>> than 0 iterations. Have you filed a bug report?
>>>
>>> --
>>> Hector Virgen
>>> Sent from my Droid X
>>> On Oct 4, 2010 2:17 AM, "Daniel Latter"<[email protected]>  wrote:
>>>
>>>> what i meant was if you do happen to pass a zero to the limit method,
>>>>
>>> then
>>>
>>>> say loop over the (possibly millions of rows it will return) returned
>>>>
>>> rows,
>>>
>>>> couldn't this potentially bring down a server?
>>>>
>>>> Daniel.
>>>>
>>>> 2010/10/3 Valeriy Yatsko<[email protected]>
>>>>
>>>>  Good day
>>>>>
>>>>>  Yes, but it doesnt seem right to assume someones app will have the
>>>>>>
>>>>> same
>>>
>>>>  amount or rows that is equesl to the max integer the os can hold?
>>>>>>
>>>>>
>>>>> You really have table larger than 2 000 000 000 entries on 32-bit
>>>>>
>>>> servers?
>>>
>>>> :)
>>>>>
>>>>> Let's see... int = 4 bytes on 32 bit systems:
>>>>> 2 000 000 000 x 4 = 8 000 000 000 = ~ 8 gb minimum per table :)
>>>>>
>>>>> Let's add here at least varchar(255):
>>>>> 2 000 000 000 x (4 + 255) = 518 000 000 000 = ~ 518 gb per table :)
>>>>>
>>>>> Try to search some data through this table. :)
>>>>>
>>>>> There are some architecture solutions for this, like splitting tables
>>>>>
>>>> into
>>>
>>>> smaller (or shards).
>>>>>
>>>>> --
>>>>> Валерий Яцко
>>>>> ______________________________________________________________________
>>>>> [email protected] | http://www.artlebedev.ru
>>>>>
>>>>>
>>>
>>

Reply via email to