~ubuntu-branches/ubuntu/gutsy/mysql-dfsg-5.0/gutsy

« back to all changes in this revision

Viewing changes to mysql-test/r/sp-error.result

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2007-04-03 09:43:01 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20070403094301-fnjhfr59hu72pvtg
Tags: 5.0.38-0ubuntu1
* Package the Enterprise version again (.37 was a community version), since
  Debian and we have always done so. This brings in a few more bug fixes and
  makes functional derivations less likely.
* debian/README.Maintainer: Add pointer to upstream download URL, since it
  is very hard to find the Enterprise versions.
* Disable 33_scripts__mysql_create_system_tables__no_test.dpatch, since that
  script was removed upstream.
* debian/patches/41_scripts__mysql_install_db.sh__no_test.dpatch: Adapted to
  changed formatting in new upstream version.
* Remove debian/patches/86_PATH_MAX.dpatch, fixed upstream.
* Add debian/patches/90_org_tables_definition.dpatch: Fix local variable
  declaration in libmysqld/sql_parse.cc to fix compilation with
  EMBEDDED_LIBRARY.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1128
1128
create function bug11555_1() returns int return (select max(i) from t1);
1129
1129
create function bug11555_2() returns int return bug11555_1();
1130
1130
create view v1 as select bug11555_1();
1131
 
ERROR 42S02: Table 'test.t1' doesn't exist
 
1131
drop view v1;
1132
1132
create view v2 as select bug11555_2();
1133
 
ERROR 42S02: Table 'test.t1' doesn't exist
 
1133
drop view v2;
1134
1134
create table t1 (i int);
1135
1135
create view v1 as select bug11555_1();
1136
1136
create view v2 as select bug11555_2();
1143
1143
select * from v3;
1144
1144
ERROR HY000: View 'test.v3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
1145
1145
create view v4 as select * from v1;
1146
 
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
1147
 
drop view v1, v2, v3;
 
1146
drop view v1, v2, v3, v4;
1148
1147
drop function bug11555_1;
1149
1148
drop function bug11555_2;
1150
1149
create table t1 (i int);
1153
1152
create view v1 as select * from t1;
1154
1153
drop table t2;
1155
1154
insert into v1 values (1);
1156
 
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
 
1155
ERROR HY000: Table 't2' was not locked with LOCK TABLES
1157
1156
drop trigger t1_ai;
1158
1157
create function bug11555_1() returns int return (select max(i) from t2);
1159
1158
create trigger t1_ai after insert on t1 for each row set @a:=bug11555_1();
1160
1159
insert into v1 values (2);
1161
 
ERROR HY000: View 'test.v1' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
 
1160
ERROR HY000: Table 't2' was not locked with LOCK TABLES
1162
1161
drop function bug11555_1;
1163
1162
drop table t1;
1164
1163
drop view v1;
1269
1268
ERROR 42S22: Unknown column 'y.value' in 'field list'
1270
1269
drop procedure bug24491;
1271
1270
drop tables t1;
 
1271
DROP FUNCTION IF EXISTS bug18914_f1;
 
1272
DROP FUNCTION IF EXISTS bug18914_f2;
 
1273
DROP PROCEDURE IF EXISTS bug18914_p1;
 
1274
DROP PROCEDURE IF EXISTS bug18914_p2;
 
1275
DROP TABLE IF EXISTS t1, t2;
 
1276
CREATE TABLE t1 (i INT);
 
1277
CREATE PROCEDURE bug18914_p1() CREATE TABLE t2 (i INT);
 
1278
CREATE PROCEDURE bug18914_p2() DROP TABLE IF EXISTS no_such_table;
 
1279
CREATE FUNCTION bug18914_f1() RETURNS INT
 
1280
BEGIN
 
1281
CALL bug18914_p1();
 
1282
RETURN 1;
 
1283
END |
 
1284
CREATE FUNCTION bug18914_f2() RETURNS INT
 
1285
BEGIN
 
1286
CALL bug18914_p2();
 
1287
RETURN 1;
 
1288
END |
 
1289
CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
 
1290
CALL bug18914_p1();
 
1291
INSERT INTO t1 VALUES (1);
 
1292
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
 
1293
SELECT bug18914_f1();
 
1294
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
 
1295
SELECT bug18914_f2();
 
1296
ERROR HY000: Explicit or implicit commit is not allowed in stored function or trigger.
 
1297
SELECT * FROM t2;
 
1298
ERROR 42S02: Table 'test.t2' doesn't exist
 
1299
DROP FUNCTION bug18914_f1;
 
1300
DROP FUNCTION bug18914_f2;
 
1301
DROP PROCEDURE bug18914_p1;
 
1302
DROP PROCEDURE bug18914_p2;
 
1303
DROP TABLE t1;
 
1304
drop table if exists bogus_table_20713;
 
1305
drop function if exists func_20713_a;
 
1306
drop function if exists func_20713_b;
 
1307
create table bogus_table_20713( id int(10) not null primary key);
 
1308
insert into bogus_table_20713 values (1), (2), (3);
 
1309
create function func_20713_a() returns int(11)
 
1310
begin
 
1311
declare id int;
 
1312
declare continue handler for sqlexception set id=null;
 
1313
set @in_func := 1;
 
1314
set id = (select id from bogus_table_20713 where id = 3);
 
1315
set @in_func := 2;
 
1316
return id;
 
1317
end//
 
1318
create function func_20713_b() returns int(11)
 
1319
begin
 
1320
declare id int;
 
1321
declare continue handler for sqlstate value '42S02' set id=null;
 
1322
set @in_func := 1;
 
1323
set id = (select id from bogus_table_20713 where id = 3);
 
1324
set @in_func := 2;
 
1325
return id;
 
1326
end//
 
1327
set @in_func := 0;
 
1328
select func_20713_a();
 
1329
func_20713_a()
 
1330
NULL
 
1331
select @in_func;
 
1332
@in_func
 
1333
2
 
1334
set @in_func := 0;
 
1335
select func_20713_b();
 
1336
func_20713_b()
 
1337
NULL
 
1338
select @in_func;
 
1339
@in_func
 
1340
2
 
1341
drop table bogus_table_20713;
 
1342
set @in_func := 0;
 
1343
select func_20713_a();
 
1344
func_20713_a()
 
1345
NULL
 
1346
select @in_func;
 
1347
@in_func
 
1348
2
 
1349
set @in_func := 0;
 
1350
select func_20713_b();
 
1351
func_20713_b()
 
1352
NULL
 
1353
select @in_func;
 
1354
@in_func
 
1355
2
 
1356
drop function if exists func_20713_a;
 
1357
drop function if exists func_20713_b;
 
1358
drop table if exists table_25345_a;
 
1359
drop table if exists table_25345_b;
 
1360
drop procedure if exists proc_25345;
 
1361
drop function if exists func_25345;
 
1362
drop function if exists func_25345_b;
 
1363
create table table_25345_a (a int);
 
1364
create table table_25345_b (b int);
 
1365
create procedure proc_25345()
 
1366
begin
 
1367
declare c1 cursor for select a from table_25345_a;
 
1368
declare c2 cursor for select b from table_25345_b;
 
1369
select 1 as result;
 
1370
end ||
 
1371
create function func_25345() returns int(11)
 
1372
begin
 
1373
call proc_25345();
 
1374
return 1;
 
1375
end ||
 
1376
create function func_25345_b() returns int(11)
 
1377
begin
 
1378
declare c1 cursor for select a from table_25345_a;
 
1379
declare c2 cursor for select b from table_25345_b;
 
1380
return 1;
 
1381
end ||
 
1382
call proc_25345();
 
1383
result
 
1384
1
 
1385
select func_25345();
 
1386
ERROR 0A000: Not allowed to return a result set from a function
 
1387
select func_25345_b();
 
1388
func_25345_b()
 
1389
1
 
1390
drop table table_25345_a;
 
1391
call proc_25345();
 
1392
result
 
1393
1
 
1394
select func_25345();
 
1395
ERROR 0A000: Not allowed to return a result set from a function
 
1396
select func_25345_b();
 
1397
func_25345_b()
 
1398
1
 
1399
drop table table_25345_b;
 
1400
drop procedure proc_25345;
 
1401
drop function func_25345;
 
1402
drop function func_25345_b;