mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-5.0
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.1 sql/field.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.h: Auto merged
This commit is contained in:
@ -657,3 +657,22 @@ a b
|
||||
1.1 1.100
|
||||
2.1 2.100
|
||||
DROP TABLE t1;
|
||||
create table t1 (utext varchar(20) character set ucs2);
|
||||
insert into t1 values ("lily");
|
||||
insert into t1 values ("river");
|
||||
prepare stmt from 'select utext from t1 where utext like ?';
|
||||
set @param1='%%';
|
||||
execute stmt using @param1;
|
||||
utext
|
||||
lily
|
||||
river
|
||||
execute stmt using @param1;
|
||||
utext
|
||||
lily
|
||||
river
|
||||
select utext from t1 where utext like '%%';
|
||||
utext
|
||||
lily
|
||||
river
|
||||
drop table t1;
|
||||
deallocate prepare stmt;
|
||||
|
@ -759,25 +759,6 @@ execute stmt using @a, @b;
|
||||
?=?
|
||||
1
|
||||
deallocate prepare stmt;
|
||||
create table t1 (utext varchar(20) character set ucs2);
|
||||
insert into t1 values ("lily");
|
||||
insert into t1 values ("river");
|
||||
prepare stmt from 'select utext from t1 where utext like ?';
|
||||
set @param1='%%';
|
||||
execute stmt using @param1;
|
||||
utext
|
||||
lily
|
||||
river
|
||||
execute stmt using @param1;
|
||||
utext
|
||||
lily
|
||||
river
|
||||
select utext from t1 where utext like '%%';
|
||||
utext
|
||||
lily
|
||||
river
|
||||
drop table t1;
|
||||
deallocate prepare stmt;
|
||||
create table t1 (a int);
|
||||
prepare stmt from "select ??";
|
||||
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '?' at line 1
|
||||
|
@ -3062,4 +3062,21 @@ l
|
||||
drop procedure bug6063|
|
||||
drop procedure bug7088_1|
|
||||
drop procedure bug7088_2|
|
||||
drop procedure if exists bug9565_sub|
|
||||
drop procedure if exists bug9565|
|
||||
create procedure bug9565_sub()
|
||||
begin
|
||||
select * from t1;
|
||||
end|
|
||||
create procedure bug9565()
|
||||
begin
|
||||
insert into t1 values ("one", 1);
|
||||
call bug9565_sub();
|
||||
end|
|
||||
call bug9565()|
|
||||
id data
|
||||
one 1
|
||||
delete from t1|
|
||||
drop procedure bug9565_sub|
|
||||
drop procedure bug9565|
|
||||
drop table t1,t2;
|
||||
|
@ -1235,3 +1235,13 @@ create table t1(a varchar(65537));
|
||||
ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
|
||||
create table t1(a varbinary(65537));
|
||||
ERROR 42000: Column length too big for column 'a' (max = 65535); use BLOB or TEXT instead
|
||||
set @@sql_mode='traditional';
|
||||
create table t1(a int, b date not null);
|
||||
alter table t1 modify a bigint unsigned not null;
|
||||
show create table t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bigint(20) unsigned NOT NULL,
|
||||
`b` date NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
drop table t1;
|
||||
|
@ -1977,3 +1977,17 @@ A
|
||||
B
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 ( bug_table_seq INTEGER NOT NULL);
|
||||
CREATE OR REPLACE VIEW v1 AS SELECT * from t1;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
Warnings:
|
||||
Note 1305 PROCEDURE p1 does not exist
|
||||
CREATE PROCEDURE p1 ( )
|
||||
BEGIN
|
||||
DO (SELECT @next := IFNULL(max(bug_table_seq),0) + 1 FROM v1);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
END //
|
||||
CALL p1();
|
||||
DROP PROCEDURE p1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
@ -427,3 +427,17 @@ INSERT INTO t1 VALUES ("1.1", 0), ("2.1", 0);
|
||||
update t1 set b=a;
|
||||
SELECT * FROM t1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Bug#9442 Set parameter make query fail if column character set is UCS2
|
||||
#
|
||||
create table t1 (utext varchar(20) character set ucs2);
|
||||
insert into t1 values ("lily");
|
||||
insert into t1 values ("river");
|
||||
prepare stmt from 'select utext from t1 where utext like ?';
|
||||
set @param1='%%';
|
||||
execute stmt using @param1;
|
||||
execute stmt using @param1;
|
||||
select utext from t1 where utext like '%%';
|
||||
drop table t1;
|
||||
deallocate prepare stmt;
|
||||
|
@ -789,19 +789,6 @@ set @b='CHRISTINE';
|
||||
execute stmt using @a, @b;
|
||||
deallocate prepare stmt;
|
||||
#
|
||||
# Bug#9442 Set parameter make query fail if column character set is UCS2
|
||||
#
|
||||
create table t1 (utext varchar(20) character set ucs2);
|
||||
insert into t1 values ("lily");
|
||||
insert into t1 values ("river");
|
||||
prepare stmt from 'select utext from t1 where utext like ?';
|
||||
set @param1='%%';
|
||||
execute stmt using @param1;
|
||||
execute stmt using @param1;
|
||||
select utext from t1 where utext like '%%';
|
||||
drop table t1;
|
||||
deallocate prepare stmt;
|
||||
#
|
||||
# Bug#11299 "prepared statement makes wrong SQL syntax in binlog which stops
|
||||
# replication": check that errouneous queries with placeholders are not
|
||||
# allowed
|
||||
|
@ -3832,6 +3832,28 @@ drop procedure bug6063|
|
||||
drop procedure bug7088_1|
|
||||
drop procedure bug7088_2|
|
||||
|
||||
#
|
||||
# BUG#9565: "Wrong locking in stored procedure if a sub-sequent procedure
|
||||
# is called".
|
||||
#
|
||||
--disable_warnings
|
||||
drop procedure if exists bug9565_sub|
|
||||
drop procedure if exists bug9565|
|
||||
--enable_warnings
|
||||
create procedure bug9565_sub()
|
||||
begin
|
||||
select * from t1;
|
||||
end|
|
||||
create procedure bug9565()
|
||||
begin
|
||||
insert into t1 values ("one", 1);
|
||||
call bug9565_sub();
|
||||
end|
|
||||
call bug9565()|
|
||||
delete from t1|
|
||||
drop procedure bug9565_sub|
|
||||
drop procedure bug9565|
|
||||
|
||||
|
||||
#
|
||||
# BUG#NNNN: New bug synopsis
|
||||
|
@ -1093,3 +1093,13 @@ set @@sql_mode='traditional';
|
||||
create table t1(a varchar(65537));
|
||||
--error 1074
|
||||
create table t1(a varbinary(65537));
|
||||
|
||||
#
|
||||
# Bug #9881: problem with altering table
|
||||
#
|
||||
|
||||
set @@sql_mode='traditional';
|
||||
create table t1(a int, b date not null);
|
||||
alter table t1 modify a bigint unsigned not null;
|
||||
show create table t1;
|
||||
drop table t1;
|
||||
|
@ -1804,7 +1804,6 @@ drop table t1;
|
||||
#
|
||||
# Test for bug #11771: wrong query_id in SELECT * FROM <view>
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (f1 char) ENGINE = innodb;
|
||||
INSERT INTO t1 VALUES ('A');
|
||||
CREATE VIEW v1 AS SELECT * FROM t1;
|
||||
@ -1815,3 +1814,21 @@ SELECT * FROM t1;
|
||||
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# opening table in correct locking mode (BUG#9597)
|
||||
#
|
||||
CREATE TABLE t1 ( bug_table_seq INTEGER NOT NULL);
|
||||
CREATE OR REPLACE VIEW v1 AS SELECT * from t1;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
delimiter //;
|
||||
CREATE PROCEDURE p1 ( )
|
||||
BEGIN
|
||||
DO (SELECT @next := IFNULL(max(bug_table_seq),0) + 1 FROM v1);
|
||||
INSERT INTO t1 VALUES (1);
|
||||
END //
|
||||
delimiter ;//
|
||||
CALL p1();
|
||||
DROP PROCEDURE p1;
|
||||
DROP VIEW v1;
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user