Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-18211

stray "\0"s in mysql client output on macosx querying Linux server

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 5.5(EOL)
    • 10.4(EOL)
    • None

    Description

      When querying a join on a table that contains a varchar(255) column,
      from a remote mariadb server of the above version, with either of the
      above clients, stray "\0" characters sequences sometimes appear at
      the end of the varchar(255) column values, which breaks the number
      of columns in the mysql output .
      When I run the same query on the server, these characters do not appear
      in the output , so it appears to be a MacOSX client issue.
      Has anyone seen this before / any ideas how to workaround ?
      I thought I should report this since it makes mysql output useless for parsing
      (the constant number of columns on each line is broken) .

      Example:
      On MacOSX host:

      \$ mysql -D D -h $h -u $u -P $P <<'EOF'
      SELECT
        c_t
      , e_t
      , u_t
      , r_id
      , ur_id
      , u_id
      , U.n as n
      , e_id
      , E.n as e
      , E.t as t
      , E.r as r
      , E.d as d
      FROM
        a
        INNER JOIN  E ON ( a.e_id = E.e_id)
        INNER JOIN U ON ( a.u_id = U.u_id )
      WHERE ( (c_t >= ''2019/01/11 10:00:00'')
          AND  (u_id IN ( "3da396d5397e3991","1e9bffc880e1621","c76829bc7a3524e5","ed13b5be0fa917ca" )))
      ORDER BY e_t ASC
      LIMIT 60;
      EOF
      ;
      ...
      \# A normal output line:
      2019-01-11 16:03:55	2019-01-11 16:03:37	2019-01-11 16:03:39	3713	3713	c76829bc7a3524e5	T1	9 \
      HH_BC		42   0   255
      \# A bad output line:
      2019-01-11 16:04:08	2019-01-11 16:03:43	2019-01-11 16:03:53	4745	4745	c76829bc7a3524e5	T1    7 \
      HH_DC	\0	43   0   255
      ... \#_____^- this is bad
      

      Attachments

        Activity

          People

            cvicentiu Vicențiu Ciorbaru
            JVD66 Jason Vas Dias
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.