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

Cassandra: TException or Internal (unspecified) error in handle on using symbols > 127 with latin1/ascii

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Won't Fix
    • 10.0.1
    • 10.0.11
    • None

    Description

      create columnfamily cf1 ( pk int primary key, c ascii );

      CREATE TABLE t1 ( pk INT PRIMARY KEY, c VARCHAR(8) ) 
      ENGINE=Cassandra DEFAULT CHARSET latin1 KEYSPACE='bug' COLUMN_FAMILY='cf1';
      INSERT INTO t1 VALUES ( 1, CHAR(127) );
      affected rows: 1
      INSERT INTO t1 SELECT 2, CHAR(127);
      affected rows: 1
      info: Records: 1  Duplicates: 0  Warnings: 0
      INSERT INTO t1 VALUES ( 3, CHAR(128) );
      ERROR HY000: Internal error: 'Default TException. [(Invalid byte for ascii: -128) [bug][cf1][c] failed validation]'
      INSERT INTO t1 SELECT 4, CHAR(128);
      ERROR HY000: Got error 122 "Internal (unspecified) error in handler" from storage engine
       

      For comparison, MyISAM:

      CREATE TABLE t2 ( pk INT PRIMARY KEY, c VARCHAR(8) ) 
      ENGINE=MyISAM DEFAULT CHARSET latin1;
      affected rows: 0
      INSERT INTO t2 VALUES ( 1, CHAR(128) );
      affected rows: 1
      INSERT INTO t2 SELECT 2, CHAR(128);
      affected rows: 1
      info: Records: 1  Duplicates: 0  Warnings: 0

      branch: 10.0-base-cassandra
      revision-id: sanja@askmonty.org-20130109061048-xoy4dasoapb746c2
      revno: 3460

      Test case:

      --source include/have_cassandra.inc
       
      SET GLOBAL cassandra_default_thrift_host = '127.0.0.1';
       
      --remove_files_wildcard $MYSQLTEST_VARDIR cassandra_test_cleanup.cql
      --write_file $MYSQLTEST_VARDIR/cassandra_test_cleanup.cql
      drop keyspace bug;
      EOF
      --error 0,1,2
      --system cqlsh -3 -f $MYSQLTEST_VARDIR/cassandra_test_cleanup.cql
       
      --remove_files_wildcard $MYSQLTEST_VARDIR cassandra_test_init.cql
      --write_file $MYSQLTEST_VARDIR/cassandra_test_init.cql
       
      CREATE KEYSPACE bug
        WITH strategy_class = 'org.apache.cassandra.locator.SimpleStrategy'
        AND strategy_options:replication_factor='1';
       
      USE bug;
      create columnfamily cf1 ( pk int primary key, c ascii );
      EOF
       
      --system cqlsh -3 -f $MYSQLTEST_VARDIR/cassandra_test_init.cql
       
      DROP TABLE IF EXISTS t1, t2;
      CREATE TABLE t1 ( pk INT PRIMARY KEY, c VARCHAR(8) ) 
        ENGINE=Cassandra DEFAULT CHARSET latin1 KEYSPACE='bug' COLUMN_FAMILY='cf1';
       
      --disable_abort_on_error
       
      INSERT INTO t1 VALUES ( 1, CHAR(127) );
      INSERT INTO t1 SELECT 2, CHAR(127);
      INSERT INTO t1 VALUES ( 3, CHAR(128) );
      INSERT INTO t1 SELECT 4, CHAR(128);
       
      --enable_abort_on_error
       

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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