~percona-dev/percona-server/release-5.1.52-12-build

« back to all changes in this revision

Viewing changes to innodb_relax_table_creation.patch

  • Committer: kinoyasu
  • Date: 2010-04-30 10:17:55 UTC
  • Revision ID: kinoyasu@gauntlet3-20100430101755-h27x25t4uax76lv4
merge, reorder and port patches based on mysql 5.1.46 innodb 1.0.7

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
diff -ruN a/storage/innodb_plugin/dict/dict0dict.c b/storage/innodb_plugin/dict/dict0dict.c
 
2
--- a/storage/innodb_plugin/dict/dict0dict.c    2010-04-30 10:49:58.000000000 +0900
 
3
+++ b/storage/innodb_plugin/dict/dict0dict.c    2010-04-30 15:44:22.000000000 +0900
 
4
@@ -1441,7 +1441,11 @@
 
5
                        goto add_field_size;
 
6
                }
 
7
 
 
8
+               if (srv_relax_table_creation) {
 
9
+                       field_max_size = dict_col_get_min_size(col);
 
10
+               } else {
 
11
                field_max_size = dict_col_get_max_size(col);
 
12
+               }
 
13
                field_ext_max_size = field_max_size < 256 ? 1 : 2;
 
14
 
 
15
                if (field->prefix_len) {
 
16
diff -ruN a/storage/innodb_plugin/handler/ha_innodb.cc b/storage/innodb_plugin/handler/ha_innodb.cc
 
17
--- a/storage/innodb_plugin/handler/ha_innodb.cc        2010-04-30 15:01:51.000000000 +0900
 
18
+++ b/storage/innodb_plugin/handler/ha_innodb.cc        2010-04-30 15:44:22.000000000 +0900
 
19
@@ -11201,6 +11201,11 @@
 
20
   "Limit the allocated memory for dictionary cache. (0: unlimited)",
 
21
   NULL, NULL, 0, 0, LONG_MAX, 0);
 
22
 
 
23
+static MYSQL_SYSVAR_ULONG(relax_table_creation, srv_relax_table_creation,
 
24
+  PLUGIN_VAR_RQCMDARG,
 
25
+  "Relax limitation of column size at table creation as builtin InnoDB.",
 
26
+  NULL, NULL, 0, 0, 1, 0);
 
27
+
 
28
 static struct st_mysql_sys_var* innobase_system_variables[]= {
 
29
   MYSQL_SYSVAR(additional_mem_pool_size),
 
30
   MYSQL_SYSVAR(autoextend_increment),
 
31
@@ -11279,6 +11284,7 @@
 
32
   MYSQL_SYSVAR(read_ahead_threshold),
 
33
   MYSQL_SYSVAR(io_capacity),
 
34
   MYSQL_SYSVAR(use_purge_thread),
 
35
+  MYSQL_SYSVAR(relax_table_creation),
 
36
   NULL
 
37
 };
 
38
 
 
39
diff -ruN a/storage/innodb_plugin/handler/innodb_patch_info.h b/storage/innodb_plugin/handler/innodb_patch_info.h
 
40
--- a/storage/innodb_plugin/handler/innodb_patch_info.h 2010-04-30 15:01:51.000000000 +0900
 
41
+++ b/storage/innodb_plugin/handler/innodb_patch_info.h 2010-04-30 15:44:22.000000000 +0900
 
42
@@ -41,5 +41,6 @@
 
43
 {"innodb_admin_command_base","XtraDB specific command interface through i_s","","http://www.percona.com/docs/wiki/percona-xtradb"},
 
44
 {"innodb_show_lock_name","Show mutex/lock name instead of crated file/line","","http://www.percona.com/docs/wiki/percona-xtradb"},
 
45
 {"innodb_extend_slow","Extended statistics in slow.log","It is InnoDB-part only. It needs to patch also to mysqld.","http://www.percona.com/docs/wiki/percona-xtradb"},
 
46
+{"innodb_relax_table_creation","Relax limitation of column size at table creation as builtin InnoDB.","","http://www.percona.com/docs/wiki/percona-xtradb"},
 
47
 {NULL, NULL, NULL, NULL}
 
48
 };
 
49
diff -ruN a/storage/innodb_plugin/include/srv0srv.h b/storage/innodb_plugin/include/srv0srv.h
 
50
--- a/storage/innodb_plugin/include/srv0srv.h   2010-04-30 15:01:51.000000000 +0900
 
51
+++ b/storage/innodb_plugin/include/srv0srv.h   2010-04-30 15:44:22.000000000 +0900
 
52
@@ -228,6 +228,7 @@
 
53
 extern ulint   srv_adaptive_checkpoint;
 
54
 
 
55
 extern ulint   srv_expand_import;
 
56
+extern ulint   srv_relax_table_creation;
 
57
 
 
58
 extern ulint   srv_extra_rsegments;
 
59
 extern ulint   srv_dict_size_limit;
 
60
diff -ruN a/storage/innodb_plugin/srv/srv0srv.c b/storage/innodb_plugin/srv/srv0srv.c
 
61
--- a/storage/innodb_plugin/srv/srv0srv.c       2010-04-30 15:01:51.000000000 +0900
 
62
+++ b/storage/innodb_plugin/srv/srv0srv.c       2010-04-30 15:44:22.000000000 +0900
 
63
@@ -397,6 +397,7 @@
 
64
 UNIV_INTERN ulint      srv_adaptive_checkpoint = 0; /* 0: none  1: reflex  2: estimate */
 
65
 
 
66
 UNIV_INTERN ulint      srv_expand_import = 0; /* 0:disable 1:enable */
 
67
+UNIV_INTERN ulint      srv_relax_table_creation = 0; /* 0:disable 1:enable */
 
68
 
 
69
 UNIV_INTERN ulint      srv_extra_rsegments = 0; /* extra rseg for users */
 
70
 UNIV_INTERN ulint      srv_dict_size_limit = 0;