| Server IP : 88.99.149.37 / Your IP : 216.73.216.141 Web Server : nginx/1.31.2 System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64 User : muralimurth ( 1015) PHP Version : 8.4.23 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/local/mysql/mysql-test/main/ |
Upload File : |
#
# test of unsigned int
#
--disable_warnings
drop table if exists t1;
--enable_warnings
SET SQL_WARNINGS=1;
create table t1 (this int unsigned);
insert into t1 values (1);
insert ignore into t1 values (-1);
insert ignore into t1 values ('5000000000');
select * from t1;
drop table t1;
# End of 4.1 tests
create table t1 (a bigint unsigned, b mediumint unsigned);
insert t1 values (1,2),(0xffffffffffffffff,0xffffff);
select coalesce(a,b), coalesce(b,a) from t1;
create table t2 as select a from t1 union select b from t1;
show create table t2;
select * from t2;
drop table t1, t2;
--echo #
--echo # Start of 10.0 tests
--echo #
--echo #
--echo # MDEV-6950 Bad results with joins comparing DATE and INT/ENUM/VARCHAR columns
--echo #
CREATE TABLE t1 (a DATE PRIMARY KEY);
INSERT INTO t1 VALUES ('1999-01-01');
CREATE TABLE t2 (a INT UNSIGNED);
INSERT INTO t2 VALUES (19990101);
INSERT INTO t2 VALUES (990101);
SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a;
SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a;
ALTER TABLE t2 ADD PRIMARY KEY(a);
SELECT t1.* FROM t1,t2 WHERE t1.a=t2.a;
SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a;
--echo # t2 should NOT be eliminated
EXPLAIN SELECT t1.* FROM t1 LEFT JOIN t2 ON t1.a=t2.a;
DROP TABLE t1,t2;
--echo #
--echo # End of 10.0 tests
--echo #
--echo #
--echo # MDEV-32203 Raise notes when an index cannot be used on data type mismatch
--echo #
SET note_verbosity=unusable_keys;
CREATE TABLE t1 (indexed_col INT UNSIGNED, KEY(indexed_col));
DELIMITER $$;
FOR i IN 1..31
DO
INSERT INTO t1 VALUES (MAKEDATE(2023, i));
END FOR;
$$
DELIMITER ;$$
--source unusable_keys_literals.inc
--source unusable_keys_joins.inc
DROP TABLE t1;
SET note_verbosity=DEFAULT;
SET note_verbosity=unusable_keys;
CREATE TABLE t1 (indexed_col BIGINT UNSIGNED, KEY(indexed_col));
DELIMITER $$;
FOR i IN 1..31
DO
INSERT INTO t1 VALUES (MAKEDATE(2023, i));
END FOR;
$$
DELIMITER ;$$
--source unusable_keys_literals.inc
--source unusable_keys_joins.inc
DROP TABLE t1;
SET note_verbosity=DEFAULT;