Merge lp:~vkolesnikov/pbxt/pbxt-bug-483714 into lp:pbxt

Proposed by Vladimir Kolesnikov
Status: Merged
Merged at revision: not available
Proposed branch: lp:~vkolesnikov/pbxt/pbxt-bug-483714
Merge into: lp:pbxt
Diff against target: 238 lines (+58/-19)
11 files modified
ChangeLog (+10/-0)
src/discover_xt.cc (+2/-2)
src/table_xt.cc (+12/-4)
test/mysql-test/r/binlog_stm_ctype_ucs.result (+2/-3)
test/mysql-test/r/ctype_cp932_binlog_stm.result (+6/-6)
test/mysql-test/r/ctype_recoding.result (+1/-1)
test/mysql-test/r/partition.result (+1/-1)
test/mysql-test/r/pbxt_bugs.result (+9/-0)
test/mysql-test/r/pbxt_ref_int.result (+1/-1)
test/mysql-test/t/pbxt_bugs.test (+12/-0)
test/mysql-test/t/pbxt_ref_int.test (+2/-1)
To merge this branch: bzr merge lp:~vkolesnikov/pbxt/pbxt-bug-483714
Reviewer Review Type Date Requested Status
Vladimir Kolesnikov (community) Needs Resubmitting
Paul McCullagh Needs Fixing
Review via email: mp+16186@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Paul McCullagh (paul-mccullagh) wrote :

Hi Vlad,

We need to log the errors that are being ignored here.

xt_log_and_clear_warning() logs the errors as a warning.

review: Needs Fixing
lp:~vkolesnikov/pbxt/pbxt-bug-483714 updated
748. By Vladimir Kolesnikov

update to the bugfix

Revision history for this message
Vladimir Kolesnikov (vkolesnikov) wrote :

> Hi Vlad,
>
> We need to log the errors that are being ignored here.
>
> xt_log_and_clear_warning() logs the errors as a warning.

done

Revision history for this message
Vladimir Kolesnikov (vkolesnikov) :
review: Needs Resubmitting

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2009-12-10 12:16:56 +0000
+++ ChangeLog 2009-12-16 10:37:11 +0000
@@ -1,6 +1,7 @@
1PBXT Release Notes1PBXT Release Notes
2==================2==================
33
4<<<<<<< TREE
4------- 1.0.10 RC4 - Not released yet5------- 1.0.10 RC4 - Not released yet
56
6RN293: Added system variable pbxt_flush_log_at_trx_commit. The value of this variable determines whether the transaction log is written and/or flushed when a transaction is ended. A value of 0 means don't write or flush the transaction log, 1 means write and flush and 2 means write, but do not flush. No matter what the setting is choosen, the transaction log is written and flushed at least once per second.7RN293: Added system variable pbxt_flush_log_at_trx_commit. The value of this variable determines whether the transaction log is written and/or flushed when a transaction is ended. A value of 0 means don't write or flush the transaction log, 1 means write and flush and 2 means write, but do not flush. No matter what the setting is choosen, the transaction log is written and flushed at least once per second.
@@ -12,6 +13,15 @@
12------- 1.0.09f RC3 - 2009-11-3013------- 1.0.09f RC3 - 2009-11-30
1314
14RN291: Fixed bug #489088: On shutdown MySQL reports: [Warning] Plugin 'PBXT' will be forced to shutdown.15RN291: Fixed bug #489088: On shutdown MySQL reports: [Warning] Plugin 'PBXT' will be forced to shutdown.
16=======
17------- 1.0.09g RC3 - not yet released
18
19RN291: Fixed bug #483714: a broken table can prevent other tables from opening
20
21RN290: Fixed bug #489088: On shutdown MySQL reports: [Warning] Plugin 'PBXT' will be forced to shutdown
22
23------- 1.0.09f RC3 - 2009-11-25
24>>>>>>> MERGE-SOURCE
1525
16RN290: Fixed bug #345524: pbxt does not compile on 64 bit windows. Currently atomic operations are not supported on this platform.26RN290: Fixed bug #345524: pbxt does not compile on 64 bit windows. Currently atomic operations are not supported on this platform.
1727
1828
=== modified file 'src/discover_xt.cc'
--- src/discover_xt.cc 2009-11-24 08:50:16 +0000
+++ src/discover_xt.cc 2009-12-16 10:37:11 +0000
@@ -355,10 +355,10 @@
355 {355 {
356 if (!(b_flags & HA_NOSAME))356 if (!(b_flags & HA_NOSAME))
357 return -1;357 return -1;
358 if ((a_flags ^ b_flags) & (HA_NULL_PART_KEY | HA_END_SPACE_KEY))358 if ((a_flags ^ b_flags) & HA_NULL_PART_KEY)
359 {359 {
360 /* Sort NOT NULL keys before other keys */360 /* Sort NOT NULL keys before other keys */
361 return (a_flags & (HA_NULL_PART_KEY | HA_END_SPACE_KEY)) ? 1 : -1;361 return (a_flags & HA_NULL_PART_KEY) ? 1 : -1;
362 }362 }
363 if (a->name == primary_key_name)363 if (a->name == primary_key_name)
364 return -1;364 return -1;
365365
=== modified file 'src/table_xt.cc'
--- src/table_xt.cc 2009-11-25 15:45:25 +0000
+++ src/table_xt.cc 2009-12-16 10:37:11 +0000
@@ -505,7 +505,12 @@
505 xt_strcpy(PATH_MAX, pbuf, te_ptr->te_tab_path->tp_path);505 xt_strcpy(PATH_MAX, pbuf, te_ptr->te_tab_path->tp_path);
506 xt_add_dir_char(PATH_MAX, pbuf);506 xt_add_dir_char(PATH_MAX, pbuf);
507 xt_strcat(PATH_MAX, pbuf, te_ptr->te_tab_name);507 xt_strcat(PATH_MAX, pbuf, te_ptr->te_tab_name);
508 xt_heap_release(self, xt_use_table_no_lock(self, db, (XTPathStrPtr)pbuf, FALSE, FALSE, NULL, NULL));508 try_(a) {
509 xt_heap_release(self, xt_use_table_no_lock(self, db, (XTPathStrPtr)pbuf, FALSE, FALSE, NULL, NULL));
510 } catch_(a) {
511 /* ignore errors */
512 xt_log_and_clear_warning(self);
513 } cont_(a);
509 }514 }
510515
511 popr_(); // Discard xt_tab_exit_db(db)516 popr_(); // Discard xt_tab_exit_db(db)
@@ -1148,9 +1153,12 @@
1148 * will work if we have cyclic foreign key references.1153 * will work if we have cyclic foreign key references.
1149 */ 1154 */
1150 if (tab->tab_dic.dic_table) {1155 if (tab->tab_dic.dic_table) {
1151 pushr_(xt_del_from_db_tables_ht, tab);1156 try_(a) {
1152 tab->tab_dic.dic_table->attachReferences(self, db);1157 tab->tab_dic.dic_table->attachReferences(self, db);
1153 popr_();1158 } catch_(a) {
1159 /* ignore problems of referenced tables */
1160 xt_log_and_clear_warning(self);
1161 } cont_(a);
1154 }1162 }
11551163
1156 *r_tab = tab;1164 *r_tab = tab;
11571165
=== modified file 'test/mysql-test/r/binlog_stm_ctype_ucs.result'
--- test/mysql-test/r/binlog_stm_ctype_ucs.result 2009-11-10 18:20:34 +0000
+++ test/mysql-test/r/binlog_stm_ctype_ucs.result 2009-12-16 10:37:11 +0000
@@ -5,16 +5,15 @@
5insert into t2 values (@v);5insert into t2 values (@v);
6show binlog events from 106;6show binlog events from 106;
7Log_name Pos Event_type Server_id End_log_pos Info7Log_name Pos Event_type Server_id End_log_pos Info
8master-bin.000001 106 Query 1 174 use `test`; BEGIN8master-bin.000001 106 Query 1 174 BEGIN
9master-bin.000001 174 Table_map 1 217 table_id: # (test.t2)9master-bin.000001 174 Table_map 1 217 table_id: # (test.t2)
10master-bin.000001 217 Write_rows 1 307 table_id: # flags: STMT_END_F10master-bin.000001 217 Write_rows 1 307 table_id: # flags: STMT_END_F
11master-bin.000001 307 Query 1 376 use `test`; COMMIT11master-bin.000001 307 Query 1 376 COMMIT
12flush logs;12flush logs;
13/*!40019 SET @@session.max_insert_delayed_threads=0*/;13/*!40019 SET @@session.max_insert_delayed_threads=0*/;
14/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;14/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
15DELIMITER /*!*/;15DELIMITER /*!*/;
16ROLLBACK/*!*/;16ROLLBACK/*!*/;
17use test/*!*/;
18SET TIMESTAMP=10000/*!*/;17SET TIMESTAMP=10000/*!*/;
19SET @@session.pseudo_thread_id=999999999/*!*/;18SET @@session.pseudo_thread_id=999999999/*!*/;
20SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;19SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
2120
=== modified file 'test/mysql-test/r/ctype_cp932_binlog_stm.result'
--- test/mysql-test/r/ctype_cp932_binlog_stm.result 2008-11-05 15:56:49 +0000
+++ test/mysql-test/r/ctype_cp932_binlog_stm.result 2009-12-16 10:37:11 +0000
@@ -9,10 +9,10 @@
9SHOW BINLOG EVENTS FROM 106;9SHOW BINLOG EVENTS FROM 106;
10Log_name Pos Event_type Server_id End_log_pos Info10Log_name Pos Event_type Server_id End_log_pos Info
11master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(f1 blob)11master-bin.000001 # Query 1 # use `test`; CREATE TABLE t1(f1 blob)
12master-bin.000001 # Query 1 # use `test`; BEGIN12master-bin.000001 # Query 1 # BEGIN
13master-bin.000001 # Table_map 1 # table_id: # (test.t1)13master-bin.000001 # Table_map 1 # table_id: # (test.t1)
14master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F14master-bin.000001 # Write_rows 1 # table_id: # flags: STMT_END_F
15master-bin.000001 # Query 1 # use `test`; COMMIT15master-bin.000001 # Query 1 # COMMIT
16SELECT HEX(f1) FROM t1;16SELECT HEX(f1) FROM t1;
17HEX(f1)17HEX(f1)
188300188300
@@ -35,10 +35,10 @@
35SHOW BINLOG EVENTS FROM 106|35SHOW BINLOG EVENTS FROM 106|
36Log_name Pos Event_type Server_id End_log_pos Info36Log_name Pos Event_type Server_id End_log_pos Info
37master-bin.000001 106 Query 1 196 use `test`; CREATE TABLE t1(f1 blob)37master-bin.000001 106 Query 1 196 use `test`; CREATE TABLE t1(f1 blob)
38master-bin.000001 196 Query 1 267 use `test`; BEGIN38master-bin.000001 196 Query 1 267 BEGIN
39master-bin.000001 267 Table_map 1 309 table_id: 16 (test.t1)39master-bin.000001 267 Table_map 1 309 table_id: 16 (test.t1)
40master-bin.000001 309 Write_rows 1 343 table_id: 16 flags: STMT_END_F40master-bin.000001 309 Write_rows 1 343 table_id: 16 flags: STMT_END_F
41master-bin.000001 343 Query 1 415 use `test`; COMMIT41master-bin.000001 343 Query 1 415 COMMIT
42master-bin.000001 415 Query 1 494 use `test`; DROP table t142master-bin.000001 415 Query 1 494 use `test`; DROP table t1
43master-bin.000001 494 Query 1 660 use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,43master-bin.000001 494 Query 1 660 use `test`; CREATE TABLE t4 (s1 CHAR(50) CHARACTER SET latin1,
44s2 CHAR(50) CHARACTER SET cp932,44s2 CHAR(50) CHARACTER SET cp932,
@@ -49,9 +49,9 @@
49BEGIN49BEGIN
50INSERT INTO t4 VALUES (ins1, ins2, ind);50INSERT INTO t4 VALUES (ins1, ins2, ind);
51END51END
52master-bin.000001 909 Query 1 977 use `test`; BEGIN52master-bin.000001 909 Query 1 977 BEGIN
53master-bin.000001 977 Table_map 1 1026 table_id: 18 (test.t4)53master-bin.000001 977 Table_map 1 1026 table_id: 18 (test.t4)
54master-bin.000001 1026 Write_rows 1 1080 table_id: 18 flags: STMT_END_F54master-bin.000001 1026 Write_rows 1 1080 table_id: 18 flags: STMT_END_F
55master-bin.000001 1080 Query 1 1149 use `test`; COMMIT55master-bin.000001 1080 Query 1 1149 COMMIT
56master-bin.000001 1149 Query 1 1238 use `test`; DROP PROCEDURE bug1829356master-bin.000001 1149 Query 1 1238 use `test`; DROP PROCEDURE bug18293
57master-bin.000001 1238 Query 1 1317 use `test`; DROP TABLE t457master-bin.000001 1238 Query 1 1317 use `test`; DROP TABLE t4
5858
=== modified file 'test/mysql-test/r/ctype_recoding.result'
--- test/mysql-test/r/ctype_recoding.result 2008-03-11 16:31:13 +0000
+++ test/mysql-test/r/ctype_recoding.result 2009-12-16 10:37:11 +0000
@@ -165,7 +165,7 @@
165ERROR HY000: Invalid utf8 character string: 'ÐÌÏÈÏ'165ERROR HY000: Invalid utf8 character string: 'ÐÌÏÈÏ'
166SET NAMES utf8;166SET NAMES utf8;
167CREATE TABLE `goodÐÌÏÈÏ` (a int);167CREATE TABLE `goodÐÌÏÈÏ` (a int);
168ERROR HY000: Invalid utf8 character string: 'ÐÌÏÈÏ` (a int)'168ERROR HY000: Invalid utf8 character string: 'ÐÌÏÈÏ'
169set names latin1;169set names latin1;
170create table t1 (a char(10) character set koi8r, b text character set koi8r);170create table t1 (a char(10) character set koi8r, b text character set koi8r);
171insert into t1 values ('test','test');171insert into t1 values ('test','test');
172172
=== modified file 'test/mysql-test/r/partition.result'
--- test/mysql-test/r/partition.result 2009-06-02 19:05:33 +0000
+++ test/mysql-test/r/partition.result 2009-12-16 10:37:11 +0000
@@ -751,7 +751,7 @@
751subpartition by hash(a)751subpartition by hash(a)
752(partition p0 values less than (0),752(partition p0 values less than (0),
753partition p1 values less than (1) (subpartition sp0));753partition p1 values less than (1) (subpartition sp0));
754ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near '))' at line 5754ERROR 42000: Wrong number of subpartitions defined, mismatch with previous setting near 'subpartition sp0))' at line 5
755create table t1 (a int)755create table t1 (a int)
756partition by hash (a)756partition by hash (a)
757(partition p0 (subpartition sp0));757(partition p0 (subpartition sp0));
758758
=== modified file 'test/mysql-test/r/pbxt_bugs.result'
--- test/mysql-test/r/pbxt_bugs.result 2009-07-22 08:31:39 +0000
+++ test/mysql-test/r/pbxt_bugs.result 2009-12-16 10:37:11 +0000
@@ -1316,3 +1316,12 @@
1316insert into t2 values (1,3);1316insert into t2 values (1,3);
1317ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (Constraint: `fk1`)1317ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (Constraint: `fk1`)
1318drop table t2, t1;1318drop table t2, t1;
1319create table t2 (id int primary key, constraint foreign key fk1 (id) references t1(id)) engine=pbxt;
1320select * from t2;
1321id
1322insert into t2 values (1);
1323ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (Referenced table `t1` not found)
1324create table t1 (id int primary key) engine=pbxt;
1325insert into t1 values (1);
1326insert into t2 values (1);
1327drop table t2, t1;
13191328
=== modified file 'test/mysql-test/r/pbxt_ref_int.result'
--- test/mysql-test/r/pbxt_ref_int.result 2009-06-30 11:05:34 +0000
+++ test/mysql-test/r/pbxt_ref_int.result 2009-12-16 10:37:11 +0000
@@ -365,7 +365,7 @@
365drop table if exists t2, t1;365drop table if exists t2, t1;
366set foreign_key_checks = 1;366set foreign_key_checks = 1;
367CREATE TABLE t2 (s1 INT DEFAULT NULL, FOREIGN KEY (s1) REFERENCES t1 (s1));367CREATE TABLE t2 (s1 INT DEFAULT NULL, FOREIGN KEY (s1) REFERENCES t1 (s1));
368ERROR HY000: Can't create table 'test.t2' (errno: 151)368drop table if exists t2;
369set foreign_key_checks = 0;369set foreign_key_checks = 0;
370CREATE TABLE t2 (s1 INT DEFAULT NULL, FOREIGN KEY (s1) REFERENCES t1 (s1));370CREATE TABLE t2 (s1 INT DEFAULT NULL, FOREIGN KEY (s1) REFERENCES t1 (s1));
371set foreign_key_checks = 1;371set foreign_key_checks = 1;
372372
=== modified file 'test/mysql-test/t/pbxt_bugs.test'
--- test/mysql-test/t/pbxt_bugs.test 2009-07-22 08:31:39 +0000
+++ test/mysql-test/t/pbxt_bugs.test 2009-12-16 10:37:11 +0000
@@ -1023,6 +1023,18 @@
10231023
1024drop table t2, t1;1024drop table t2, t1;
10251025
1026# bug 483714: a broken table can prevent other tables from opening
1027
1028create table t2 (id int primary key, constraint foreign key fk1 (id) references t1(id)) engine=pbxt;
1029select * from t2;
1030--error 1452
1031insert into t2 values (1);
1032create table t1 (id int primary key) engine=pbxt;
1033insert into t1 values (1);
1034insert into t2 values (1);
1035
1036drop table t2, t1;
1037
1026--disable_query_log1038--disable_query_log
10271039
1028DROP TABLE t5;1040DROP TABLE t5;
10291041
=== modified file 'test/mysql-test/t/pbxt_ref_int.test'
--- test/mysql-test/t/pbxt_ref_int.test 2009-04-02 20:28:52 +0000
+++ test/mysql-test/t/pbxt_ref_int.test 2009-12-16 10:37:11 +0000
@@ -325,9 +325,10 @@
325drop table if exists t2, t1;325drop table if exists t2, t1;
326--enable_warnings326--enable_warnings
327327
328# PBXT doesn't depend on foreign_key_checks setting
328set foreign_key_checks = 1;329set foreign_key_checks = 1;
329--error 1005
330CREATE TABLE t2 (s1 INT DEFAULT NULL, FOREIGN KEY (s1) REFERENCES t1 (s1));330CREATE TABLE t2 (s1 INT DEFAULT NULL, FOREIGN KEY (s1) REFERENCES t1 (s1));
331drop table if exists t2;
331332
332set foreign_key_checks = 0;333set foreign_key_checks = 0;
333CREATE TABLE t2 (s1 INT DEFAULT NULL, FOREIGN KEY (s1) REFERENCES t1 (s1));334CREATE TABLE t2 (s1 INT DEFAULT NULL, FOREIGN KEY (s1) REFERENCES t1 (s1));

Subscribers

People subscribed via source and target branches