bit data type was not full supported by MySQL cluster ?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

bit data type was not full supported by MySQL cluster ?

陈良
------------------
  Hi,everybody
 
I create a tale in MySQL cluster 7.4.4,and one column is bit data type.
 
when I use sub-query in a  SQL  statement with the ‘where’ condition on the bit data type,the query result is not the excepted.
 
 
 
My table script is:
 
 
 
CREATE TABLE `rt_urls` (
 
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
 
  `serverid` varchar(50) NOT NULL COMMENT 'server ID',
 
  `s_check_urls_id` int(11) NOT NULL COMMENT ‘setting置ID',
 
  `url` varchar(255) NOT NULL COMMENT 'access  Url',
 
  `enabled` bit(1) NOT NULL DEFAULT b'0' ,
 
  `msg` varchar(2000) DEFAULT NULL,
 
  `createtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
 
  PRIMARY KEY (`id`)
 
) /*!50100 TABLESPACE ts_1 STORAGE DISK */ ENGINE=ndbcluster AUTO_INCREMENT=8533 DEFAULT CHARSET=utf8
 
 
 
 
 
And the query statement and result is below:
 
 
 
In firt statement,I use the sub query,the result is empty  
 
mysql>  select * from (select id,enabled from rt_urls) as t where enabled=1;
 
Empty set (0.00 sec)
 
 
 
In the second statement,I don’t use subquery.
 
mysql> select id,enabled from rt_urls where enabled=1;
 
+----+---------+
 
| id | enabled |
 
+----+---------+
 
|  1 |        |
 
|  2 |        |
 
|  4 |        |
 
+----+---------+
 
3 rows in set (0.00 sec)
 
 
 
When I change the data type of column ‘enable’ to Int,the problem will gone.
 
So what happened in MySQL cluster,does it a bug?
 
  ------------------
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: bit data type was not full supported by MySQL cluster ?

Mauritz Sundell
Hi 陈良

Your issue looks like a bug.

Please report a bug at http://bugs.mysql.com/report.php, and you will
know when it is fixed.
Use the Category: MySQL Cluster: Cluster (NDB) storage engine

Regards,
Mauritz Sundell

On 2015-11-06 08:24, 陈良 wrote:

> ------------------
>    Hi,everybody
>  
> I create a tale in MySQL cluster 7.4.4,and one column is bit data type.
>  
> when I use sub-query in a  SQL  statement with the ‘where’ condition on the bit data type,the query result is not the excepted.
>  
>  
>  
> My table script is:
>  
>  
>  
> CREATE TABLE `rt_urls` (
>  
>    `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'primary key',
>  
>    `serverid` varchar(50) NOT NULL COMMENT 'server ID',
>  
>    `s_check_urls_id` int(11) NOT NULL COMMENT ‘setting置ID',
>  
>    `url` varchar(255) NOT NULL COMMENT 'access  Url',
>  
>    `enabled` bit(1) NOT NULL DEFAULT b'0' ,
>  
>    `msg` varchar(2000) DEFAULT NULL,
>  
>    `createtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
>  
>    PRIMARY KEY (`id`)
>  
> ) /*!50100 TABLESPACE ts_1 STORAGE DISK */ ENGINE=ndbcluster AUTO_INCREMENT=8533 DEFAULT CHARSET=utf8
>  
>  
>  
>  
>  
> And the query statement and result is below:
>  
>  
>  
> In firt statement,I use the sub query,the result is empty
>  
> mysql>  select * from (select id,enabled from rt_urls) as t where enabled=1;
>  
> Empty set (0.00 sec)
>  
>  
>  
> In the second statement,I don’t use subquery.
>  
> mysql> select id,enabled from rt_urls where enabled=1;
>  
> +----+---------+
>  
> | id | enabled |
>  
> +----+---------+
>  
> |  1 |        |
>  
> |  2 |        |
>  
> |  4 |        |
>  
> +----+---------+
>  
> 3 rows in set (0.00 sec)
>  
>  
>  
> When I change the data type of column ‘enable’ to Int,the problem will gone.
>  
> So what happened in MySQL cluster,does it a bug?
>    
>    ------------------


--
MySQL Cluster Mailing List
For list archives: http://lists.mysql.com/cluster
To unsubscribe:    http://lists.mysql.com/cluster

Loading...