<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 03:02:36 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[SERVER-3276] mongoimport is trimming leading whitespace (including tabs) from every input record</title>
                <link>https://jira.mongodb.org/browse/SERVER-3276</link>
                <project id="10000" key="SERVER">Core Server</project>
                    <description>&lt;p&gt;I have been able to confirm that this is likely a bug, however, as we all know one programmers bug is another&apos;s feature.  That said.... Here are the particulars: &lt;/p&gt;

&lt;p&gt;FILE: tools/import.cpp &lt;/p&gt;

&lt;p&gt;This piece of code... while reading the input file, (skip the JSON part), it trims all of the leading whitespace. However, if this is a TSV then the tab will be gobbled up.  I don&apos;t think this was the intended behavior. &lt;/p&gt;

&lt;p&gt;292             if (_jsonArray) { &lt;br/&gt;
293                 while (buf&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; != &apos;{&apos; &amp;amp;&amp;amp; buf&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; != &apos;\0&apos;) &lt;/p&gt;
{ 
294                     len++; 
295                     buf++; 
296                 }
&lt;p&gt; &lt;br/&gt;
297                 if (buf&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; == &apos;\0&apos;) &lt;br/&gt;
298                     break; &lt;br/&gt;
299             } &lt;br/&gt;
300             else { &lt;br/&gt;
301                 while (isspace( buf&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; )) &lt;/p&gt;
{ 
302                     len++; 
303                     buf++; 
304                 }
&lt;p&gt; &lt;br/&gt;
305                 if (buf&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; == &apos;\0&apos;) &lt;br/&gt;
306                     continue; &lt;br/&gt;
307                 len += strlen( buf ); &lt;br/&gt;
308             } &lt;br/&gt;
309 &lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://creativyst.com/Doc/Articles/CSV/CSV01.htm&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://creativyst.com/Doc/Articles/CSV/CSV01.htm&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;I do not every reading a formal spec for CSV but this link is pretty good. In general, however, it&apos;s a bug in the design to trim the leading part of the record in this location in the code. The parser should be located as tightly and closely as possible... for the obvious reasons. &lt;/p&gt;


&lt;p&gt;/r &lt;/p&gt;</description>
                <environment>n/a</environment>
        <key id="18369">SERVER-3276</key>
            <summary>mongoimport is trimming leading whitespace (including tabs) from every input record</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.mongodb.org/images/icons/priorities/minor.svg">Minor - P4</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="spencer@mongodb.com">Spencer Brody</assignee>
                                    <reporter username="rbucker">richard bucker</reporter>
                        <labels>
                            <label>mongoimport</label>
                    </labels>
                <created>Thu, 16 Jun 2011 19:26:28 +0000</created>
                <updated>Tue, 12 Jul 2016 00:18:26 +0000</updated>
                            <resolved>Mon, 27 Jun 2011 18:31:50 +0000</resolved>
                                    <version>1.9.0</version>
                                    <fixVersion>1.9.1</fixVersion>
                                    <component>Tools</component>
                                        <votes>0</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="39384" author="auto" created="Mon, 27 Jun 2011 18:26:46 +0000"  >&lt;p&gt;Author:&lt;/p&gt;
{u&apos;login&apos;: u&apos;stbrody&apos;, u&apos;name&apos;: u&apos;Spencer T Brody&apos;, u&apos;email&apos;: u&apos;spencer@10gen.com&apos;}
&lt;p&gt;Message: Fix &lt;a href=&quot;https://jira.mongodb.org/browse/SERVER-3276&quot; title=&quot;mongoimport is trimming leading whitespace (including tabs) from every input record&quot; class=&quot;issue-link&quot; data-issue-key=&quot;SERVER-3276&quot;&gt;&lt;del&gt;SERVER-3276&lt;/del&gt;&lt;/a&gt; - mongoimport stripping leading tabs when importing TSV files&lt;br/&gt;
Branch: master&lt;br/&gt;
&lt;a href=&quot;https://github.com/mongodb/mongo/commit/685203a89cc8f25d01bc197a2224c1ccaa6519f6&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo/commit/685203a89cc8f25d01bc197a2224c1ccaa6519f6&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="37914" author="rbucker" created="Thu, 16 Jun 2011 19:54:02 +0000"  >&lt;p&gt;Here is my corrected code with some inline comments.&lt;/p&gt;

&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;it is OK to delete leading whitespace from a JSON document&lt;/li&gt;
	&lt;li&gt;it is ok to delete whitespace adjacent to the separator&lt;/li&gt;
	&lt;li&gt;the above does not say anything about the leading spaces&lt;/li&gt;
	&lt;li&gt;since a horizontal tab \t is considered a whitespace, this needs to be omitted from the scan in a TSV&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;            // handle leading whitespace&lt;br/&gt;
            if (_jsonArray) {&lt;br/&gt;
                // it&apos;s json - ok to delete the leading WS&lt;br/&gt;
                while (buf&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; != &apos;{&apos; &amp;amp;&amp;amp; buf&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; != &apos;\0&apos;) &lt;/p&gt;
{
                    len++;
                    buf++;
                }
&lt;p&gt;                if (buf&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; == &apos;\0&apos;)&lt;br/&gt;
                    break;&lt;br/&gt;
            }&lt;br/&gt;
            else {&lt;br/&gt;
                // it&apos;s everything else, not OK to delete leading WS (certainly not tabs in a TSV)&lt;br/&gt;
                // only supposed to delete the WS adjacent to the sep.&lt;br/&gt;
                if (_type == TSV) {&lt;br/&gt;
                    while (buf&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; != &apos;\t&apos; &amp;amp;&amp;amp; isspace( buf&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; )) &lt;/p&gt;
{
                        len++;
                        buf++;
                    }&lt;br/&gt;
                }&lt;br/&gt;
                else {&lt;br/&gt;
                    while (isspace( buf&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; )) {                        len++;                        buf++;                    }
&lt;p&gt;                }&lt;br/&gt;
                if (buf&lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt; == &apos;\0&apos;)&lt;br/&gt;
                    continue;&lt;br/&gt;
                len += strlen( buf );&lt;br/&gt;
            }&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="14839">TOOLS-61</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                <customfield id="customfield_10050" key="com.atlassian.jira.toolkit:comments">
                        <customfieldname># Replies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10011" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Backwards Compatibility</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10038"><![CDATA[Fully Compatible]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10055" key="com.atlassian.jira.ext.charting:firstresponsedate">
                        <customfieldname>Date of 1st Reply</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 27 Jun 2011 18:26:46 +0000</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10052" key="com.atlassian.jira.toolkit:dayslastcommented">
                        <customfieldname>Days since reply</customfieldname>
                        <customfieldvalues>
                                        12 years, 34 weeks, 2 days ago
    
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_18254" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Dependencies</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue><![CDATA[]]></customfieldvalue>


                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_10057" key="com.atlassian.jira.toolkit:lastusercommented">
                        <customfieldname>Last comment by Customer</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>true</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10056" key="com.atlassian.jira.toolkit:lastupdaterorcommenter">
                        <customfieldname>Last commenter</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>ramon.fernandez@mongodb.com</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_11151" key="com.atlassian.jira.toolkit:LastCommentDate">
                        <customfieldname>Last public comment date</customfieldname>
                        <customfieldvalues>
                            12 years, 34 weeks, 2 days ago
                        </customfieldvalues>
                    </customfield>
                                                                                                                        <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Old_Backport</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10000"><![CDATA[No]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10032" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Operating System</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10026"><![CDATA[ALL]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_10051" key="com.atlassian.jira.toolkit:participants">
                        <customfieldname>Participants</customfieldname>
                        <customfieldvalues>
                                        <customfieldvalue>auto</customfieldvalue>
            <customfieldvalue>rbucker</customfieldvalue>
            <customfieldvalue>spencer@mongodb.com</customfieldvalue>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        <customfield id="customfield_14254" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Product Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hroxnj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrirl3:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>23122</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_23361" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Requested By</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            <customfield id="customfield_10053" key="com.atlassian.jira.ext.charting:timeinstatus">
                        <customfieldname>Time In Status</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_22870" key="com.onresolve.jira.groovy.groovyrunner:scripted-field">
                        <customfieldname>Triagers</customfieldname>
                        <customfieldvalues>
                                

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_14350" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>serverRank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hs56fz:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                    </customfields>
    </item>
</channel>
</rss>