<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>20929</bug_id>
          
          <creation_ts>2009-08-01 20:18:17 +0400</creation_ts>
          <short_desc>substr broken</short_desc>
          <delta_ts>2012-03-16 14:00:43 +0400</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>sqlite3</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc>http://www.sqlite.org/cvstrac/tktview?tn=3877,39</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="viy">viy</reporter>
          <assigned_to name="nbr">nbr</assigned_to>
          <cc>nbr</cc>
    
    <cc>sem</cc>
    
    <cc>shrek</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>95541</commentid>
    <comment_count>0</comment_count>
    <who name="viy">viy</who>
    <bug_when>2009-08-01 20:18:17 +0400</bug_when>
    <thetext>перестали работать встроенные функции работы со строками.
sqlite&gt; select substr(&apos;teststring&apos;,0,1);
 
sqlite&gt; 

должно быть substr(&apos;teststring&apos;,0,1) == &apos;t&apos;
a оно &apos;&apos;.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95542</commentid>
    <comment_count>1</comment_count>
    <who name="viy">viy</who>
    <bug_when>2009-08-01 20:19:50 +0400</bug_when>
    <thetext>3.6.16-alt1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95543</commentid>
    <comment_count>2</comment_count>
    <who name="viy">viy</who>
    <bug_when>2009-08-01 20:20:38 +0400</bug_when>
    <thetext>как понимаю, Валерий взялся сопровождать, перевешиваю.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95545</commentid>
    <comment_count>3</comment_count>
    <who name="Valery Inozemtsev">shrek</who>
    <bug_when>2009-08-01 20:31:52 +0400</bug_when>
    <thetext>как воспроизвести?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95546</commentid>
    <comment_count>4</comment_count>
    <who name="viy">viy</who>
    <bug_when>2009-08-01 20:46:15 +0400</bug_when>
    <thetext>с консоли:
[repocop@repocop ~]$ sqlite3 
SQLite version 3.6.16
Enter &quot;.help&quot; for instructions
Enter SQL statements terminated with a &quot;;&quot;
sqlite&gt; select substr(&apos;test&apos;,0,1);

sqlite&gt; [repocop@repocop ~]$ 
[repocop@repocop ~]$</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95547</commentid>
    <comment_count>5</comment_count>
    <who name="Valery Inozemtsev">shrek</who>
    <bug_when>2009-08-01 20:57:07 +0400</bug_when>
    <thetext>ты ничего не попутал?
sqlite&gt; select substr(&apos;test&apos;,1,1);
t
sqlite&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95548</commentid>
    <comment_count>6</comment_count>
    <who name="viy">viy</who>
    <bug_when>2009-08-01 21:05:23 +0400</bug_when>
    <thetext>нет, все верно.
песочница repocop.altlinux.org,
сегодня с утра dist-upgrade -ился,
и вот такое вылезло :(
присылай ключик, выдам ssh доступ.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95549</commentid>
    <comment_count>7</comment_count>
    <who name="Valery Inozemtsev">shrek</who>
    <bug_when>2009-08-01 21:11:24 +0400</bug_when>
    <thetext>sqlite&gt; select substr(&apos;test&apos;,1,2);
te

нулевого символа там быть не может</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95550</commentid>
    <comment_count>8</comment_count>
    <who name="Valery Inozemtsev">shrek</who>
    <bug_when>2009-08-01 21:14:29 +0400</bug_when>
    <thetext>sqlite&gt; select substr(&apos;test&apos;,0,3);
te</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95551</commentid>
    <comment_count>9</comment_count>
    <who name="Sir Raorn">raorn</who>
    <bug_when>2009-08-01 21:18:53 +0400</bug_when>
    <thetext>http://www.sqlite.org/lang_corefunc.html

substr(X,Y,Z), substr(X,Y)

Return a substring of input string X that begins with the Y-th character and which is Z characters long. If Z is omitted then all character through the end of the string are returned.
!!!!
&gt; The left-most character of X is number 1.
!!!!
If Y is negative the the first character of the substring is found by counting from the right rather than the left. If X is string then characters indices refer to actual UTF-8 characters. If X is a BLOB then the indices refer to bytes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>95552</commentid>
    <comment_count>10</comment_count>
    <who name="viy">viy</who>
    <bug_when>2009-08-01 21:22:18 +0400</bug_when>
    <thetext>О. спасибо!
значит, работает.
Сорри за беспокойство.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>