diff options
-rw-r--r-- | BUILD/FINISH.sh | 6 | ||||
-rw-r--r-- | BitKeeper/etc/logging_ok | 1 | ||||
-rw-r--r-- | client/mysql.cc | 9 | ||||
-rw-r--r-- | include/my_global.h | 12 | ||||
-rw-r--r-- | mysql-test/r/create.result | 8 | ||||
-rw-r--r-- | mysql-test/r/ctype_latin2.result | bin | 6569 -> 6411 bytes | |||
-rw-r--r-- | mysql-test/r/innodb.result | 6 | ||||
-rw-r--r-- | mysql-test/r/temp_table.result | 9 | ||||
-rw-r--r-- | mysql-test/r/type_float.result | 2 | ||||
-rw-r--r-- | mysql-test/t/ctype_latin2.test | 11 | ||||
-rw-r--r-- | mysql-test/t/innodb.test | 9 | ||||
-rw-r--r-- | mysql-test/t/temp_table-master.opt | 1 | ||||
-rw-r--r-- | mysql-test/t/temp_table.test | 9 | ||||
-rw-r--r-- | ndb/src/kernel/blocks/dbdict/Dbdict.cpp | 2 | ||||
-rw-r--r-- | sql/ha_heap.cc | 6 | ||||
-rw-r--r-- | sql/item.cc | 2 | ||||
-rw-r--r-- | sql/share/charsets/Index.xml | 3 | ||||
-rw-r--r-- | sql/share/charsets/cp1250.xml | 25 | ||||
-rw-r--r-- | sql/share/charsets/latin2.xml | 32 | ||||
-rw-r--r-- | sql/sql_base.cc | 1 | ||||
-rw-r--r-- | sql/sql_select.cc | 6 |
21 files changed, 109 insertions, 51 deletions
diff --git a/BUILD/FINISH.sh b/BUILD/FINISH.sh index 094eb8275d6..143db3e0692 100644 --- a/BUILD/FINISH.sh +++ b/BUILD/FINISH.sh @@ -2,12 +2,6 @@ cflags="$c_warnings $extra_flags" cxxflags="$cxx_warnings $base_cxxflags $extra_flags" extra_configs="$extra_configs $local_infile_configs" configure="./configure $base_configs $extra_configs" -for arg -do - # Escape special characters so they don't confuse eval - configure="$configure "`echo "$arg" | \ - sed -e 's,\([^a-zA-Z0-9_.=-]\),\\\\\1,g'` -done commands="\ $make -k clean || true diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 5049352c8d4..1323f7a72f1 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -13,6 +13,7 @@ administrador@light.hegel.local ahlentz@co3064164-a.rochd1.qld.optusnet.com.au akishkin@work.mysql.com antony@ltantony.dsl-verizon.net +antony@ltantony.mysql.com antony@ltantony.rdg.cyberkinetica.com antony@ltantony.rdg.cyberkinetica.homeunix.net arjen@bitbike.com diff --git a/client/mysql.cc b/client/mysql.cc index f27db0de8d8..6a76a1fbd1b 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -698,9 +698,15 @@ static void usage(int version) const char* readline= "readline"; #endif +#ifdef HAVE_READLINE printf("%s Ver %s Distrib %s, for %s (%s) using %s %s\n", my_progname, VER, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE, readline, rl_library_version); +#else + printf("%s Ver %s Distrib %s, for %s (%s)", my_progname, VER, + MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE); +#endif + if (version) return; printf("\ @@ -944,7 +950,8 @@ static int read_lines(bool execute_commands) } else { - char *prompt= (char*) (glob_buffer.is_empty() ? construct_prompt() : + char *prompt= (char*) (ml_comment ? " /*> " : + glob_buffer.is_empty() ? construct_prompt() : !in_string ? " -> " : in_string == '\'' ? " '> " : (in_string == '`' ? diff --git a/include/my_global.h b/include/my_global.h index bf6f3b52c4b..017cdea140a 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -214,18 +214,6 @@ C_MODE_START int __cxa_pure_virtual() {\ #define BAD_MEMCPY #endif -/* In Linux-alpha we have atomic.h if we are using gcc */ -#if defined(TARGET_OS_LINUX) && defined(__GNUC__) && defined(__alpha__) && (__GNUC__ > 2 || ( __GNUC__ == 2 && __GNUC_MINOR__ >= 95)) && !defined(HAVE_ATOMIC_ADD) -#define HAVE_ATOMIC_ADD -#define HAVE_ATOMIC_SUB -#endif - -/* In Linux-ia64 including atomic.h will give us an error */ -#if (defined(TARGET_OS_LINUX) && defined(__GNUC__) && (defined(__ia64__)||defined(__powerpc64__))) || !defined(THREAD) -#undef HAVE_ATOMIC_ADD -#undef HAVE_ATOMIC_SUB -#endif - #if defined(_lint) && !defined(lint) #define lint #endif diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index 92c825f547d..123fdbd90bd 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -413,7 +413,7 @@ explain t2; Field Type Null Key Default Extra a int(11) YES NULL b bigint(11) 0 -c bigint(10) 0 +c bigint(11) 0 d date YES NULL e char(1) f datetime YES NULL @@ -432,11 +432,11 @@ Table Create Table t2 CREATE TABLE `t2` ( `ifnull(a,a)` tinyint(4) default NULL, `ifnull(b,b)` smallint(6) default NULL, - `ifnull(c,c)` mediumint(9) default NULL, + `ifnull(c,c)` mediumint(8) default NULL, `ifnull(d,d)` int(11) default NULL, `ifnull(e,e)` bigint(20) default NULL, - `ifnull(f,f)` float(3,2) default NULL, - `ifnull(g,g)` double(4,3) default NULL, + `ifnull(f,f)` float(24,2) default NULL, + `ifnull(g,g)` double(53,3) default NULL, `ifnull(h,h)` decimal(5,4) default NULL, `ifnull(i,i)` year(4) default NULL, `ifnull(j,j)` date default NULL, diff --git a/mysql-test/r/ctype_latin2.result b/mysql-test/r/ctype_latin2.result Binary files differindex 2876accaf72..c2c021b0760 100644 --- a/mysql-test/r/ctype_latin2.result +++ b/mysql-test/r/ctype_latin2.result diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 6117b0a9a00..a8af3f5f658 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1637,3 +1637,9 @@ ERROR 42S21: Duplicate column name 'c1' alter table t1 add key (c1,c1,c2); ERROR 42S21: Duplicate column name 'c1' drop table t1; +create table t1(a int(1) , b int(1)) engine=innodb; +insert into t1 values ('1111', '3333'); +select distinct concat(a, b) from t1; +concat(a, b) +11113333 +drop table t1; diff --git a/mysql-test/r/temp_table.result b/mysql-test/r/temp_table.result index 10c0a2e3652..f08fe6ddd0f 100644 --- a/mysql-test/r/temp_table.result +++ b/mysql-test/r/temp_table.result @@ -97,3 +97,12 @@ Variable_name Value Created_tmp_disk_tables 0 Created_tmp_tables 1 drop table t1; +create table t1 (a int, b int, index(a), index(b)); +create table t2 (c int auto_increment, d varchar(255), primary key (c)); +insert into t1 values (3,1),(3,2); +insert into t2 values (NULL, 'foo'), (NULL, 'bar'); +select d, c from t1 left join t2 on b = c where a = 3 order by d; +d c +bar 2 +foo 1 +drop table t1, t2; diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result index 0906df8f621..319a957498b 100644 --- a/mysql-test/r/type_float.result +++ b/mysql-test/r/type_float.result @@ -92,7 +92,7 @@ show create table t2; Table Create Table t2 CREATE TABLE `t2` ( `col1` double default NULL, - `col2` double(22,5) default NULL, + `col2` double(53,5) default NULL, `col3` double default NULL, `col4` double default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 diff --git a/mysql-test/t/ctype_latin2.test b/mysql-test/t/ctype_latin2.test index 445223f534c..cc232adeaec 100644 --- a/mysql-test/t/ctype_latin2.test +++ b/mysql-test/t/ctype_latin2.test @@ -7,10 +7,6 @@ drop table if exists t1; SET NAMES latin2; CREATE TABLE t1 (a char(1) character set latin2); -INSERT INTO t1 VALUES (0x00),(0x01),(0x02),(0x03),(0x04),(0x05),(0x06),(0x07); -INSERT INTO t1 VALUES (0x08),(0x09),(0x0A),(0x0B),(0x0C),(0x0D),(0x0E),(0x0F); -INSERT INTO t1 VALUES (0x10),(0x11),(0x12),(0x13),(0x14),(0x15),(0x16),(0x17); -INSERT INTO t1 VALUES (0x18),(0x19),(0x1A),(0x1B),(0x1C),(0x1D),(0x1E),(0x1F); INSERT INTO t1 VALUES (0x20),(0x21),(0x22),(0x23),(0x24),(0x25),(0x26),(0x27); INSERT INTO t1 VALUES (0x28),(0x29),(0x2A),(0x2B),(0x2C),(0x2D),(0x2E),(0x2F); INSERT INTO t1 VALUES (0x30),(0x31),(0x32),(0x33),(0x34),(0x35),(0x36),(0x37); @@ -45,3 +41,10 @@ INSERT INTO t1 VALUES (0xF8),(0xF9),(0xFA),(0xFB),(0xFC),(0xFD),(0xFE),(0xFF); # SELECT hex(a) ha, hex(lower(a)) hl, hex(upper(a)) hu, a, lower(a) l, upper(a) u from t1 order by ha; + + +# +# Bug#6505 wrong sorting order +# +SELECT group_concat(a collate latin2_croatian_ci order by binary a) from t1 group by a collate latin2_croatian_ci; +drop table t1; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 7501889127a..4e18cfb224b 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1168,3 +1168,12 @@ alter table t1 add key (c1,c2,c1); --error 1060 alter table t1 add key (c1,c1,c2); drop table t1; + +# +# Bug #4082: integer truncation +# + +create table t1(a int(1) , b int(1)) engine=innodb; +insert into t1 values ('1111', '3333'); +select distinct concat(a, b) from t1; +drop table t1; diff --git a/mysql-test/t/temp_table-master.opt b/mysql-test/t/temp_table-master.opt new file mode 100644 index 00000000000..026d3d4640c --- /dev/null +++ b/mysql-test/t/temp_table-master.opt @@ -0,0 +1 @@ +--tmpdir=$MYSQL_TEST_DIR/var//tmp diff --git a/mysql-test/t/temp_table.test b/mysql-test/t/temp_table.test index 74276c7668c..3e60917783a 100644 --- a/mysql-test/t/temp_table.test +++ b/mysql-test/t/temp_table.test @@ -89,3 +89,12 @@ flush status; select * from t1 group by d; show status like "created_tmp%tables"; drop table t1; + +# Bug #8497: tmpdir with extra slashes would cause failures +# +create table t1 (a int, b int, index(a), index(b)); +create table t2 (c int auto_increment, d varchar(255), primary key (c)); +insert into t1 values (3,1),(3,2); +insert into t2 values (NULL, 'foo'), (NULL, 'bar'); +select d, c from t1 left join t2 on b = c where a = 3 order by d; +drop table t1, t2; diff --git a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp index 184db794057..0c4d20ca248 100644 --- a/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +++ b/ndb/src/kernel/blocks/dbdict/Dbdict.cpp @@ -4043,12 +4043,14 @@ calcLHbits(Uint32 * lhPageBits, Uint32 * lhDistrBits, tmp <<= 1; distrBits++; }//while +#ifdef ndb_classical_lhdistrbits if (tmp != totalFragments) { tmp >>= 1; if ((fid >= (totalFragments - tmp)) && (fid < (tmp - 1))) { distrBits--; }//if }//if +#endif * lhPageBits = pageBits; * lhDistrBits = distrBits; diff --git a/sql/ha_heap.cc b/sql/ha_heap.cc index 4dc48c7422b..033fe86720e 100644 --- a/sql/ha_heap.cc +++ b/sql/ha_heap.cc @@ -408,7 +408,8 @@ THR_LOCK_DATA **ha_heap::store_lock(THD *thd, int ha_heap::delete_table(const char *name) { char buff[FN_REFLEN]; - int error= heap_delete_table(fn_format(buff,name,"","",4+2)); + int error= heap_delete_table(fn_format(buff,name,"","", + MY_REPLACE_EXT|MY_UNPACK_FILENAME)); return error == ENOENT ? 0 : error; } @@ -527,7 +528,8 @@ int ha_heap::create(const char *name, TABLE *table_arg, create_info->auto_increment_value - 1 : 0); hp_create_info.max_table_size=current_thd->variables.max_heap_table_size; max_rows = (ha_rows) (hp_create_info.max_table_size / mem_per_row); - error= heap_create(fn_format(buff,name,"","",4+2), + error= heap_create(fn_format(buff,name,"","", + MY_REPLACE_EXT|MY_UNPACK_FILENAME), table_arg->keys,keydef, table_arg->reclength, (ulong) ((table_arg->max_rows < max_rows && table_arg->max_rows) ? diff --git a/sql/item.cc b/sql/item.cc index 211e165cc6b..6c1506e10e8 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -554,7 +554,7 @@ void Item_field::set_field(Field *field_par) { field=result_field=field_par; // for easy coding with fields maybe_null=field->maybe_null(); - max_length=field_par->field_length; + max_length=field_par->max_length(); decimals= field->decimals(); table_name=field_par->table_name; field_name=field_par->field_name; diff --git a/sql/share/charsets/Index.xml b/sql/share/charsets/Index.xml index 74763b195a8..a41ea80564a 100644 --- a/sql/share/charsets/Index.xml +++ b/sql/share/charsets/Index.xml @@ -367,6 +367,9 @@ To make maintaining easier please: <order>Slovenian</order> <order>Sorbian</order> </collation> + <collation name="cp1250_croatian_ci" id="44"> + <order>Croatian</order> + </collation> <collation name="cp1250_czech_cs" id="34" order="Czech"> <flag>compiled</flag> </collation> diff --git a/sql/share/charsets/cp1250.xml b/sql/share/charsets/cp1250.xml index 8e7102b6737..1e62e64ad5a 100644 --- a/sql/share/charsets/cp1250.xml +++ b/sql/share/charsets/cp1250.xml @@ -57,7 +57,7 @@ 70 71 72 73 74 75 76 77 78 79 7A 7B 7C 7D 7E 7F 80 81 82 83 84 85 86 87 88 89 9A 8B 9C 9D 9E 9F 90 91 92 93 94 95 96 97 98 99 9A 9B 9C 9D 9E 9F - A0 A1 A2 B3 A4 B9 A6 DF A8 A9 BA AB AC AD AE BF + A0 A1 A2 B3 A4 B9 A6 A7 A8 A9 BA AB AC AD AE BF B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BE BD BE BF E0 E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 F1 F2 F3 F4 F5 F6 D7 F8 F9 FA FB FC FD FE DF @@ -82,7 +82,7 @@ A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF B0 B1 B2 A3 B4 B5 B6 B7 B8 A5 AA BB BC BD BC AF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF - D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE A7 + D0 D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF C0 C1 C2 C3 C4 C5 C6 C7 C8 C9 CA CB CC CD CE CF D0 D1 D2 D3 D4 D5 D6 F7 D8 D9 DA DB DC DD DE FF </map> @@ -132,6 +132,27 @@ </map> </collation> +<collation name="cp1250_croatian_ci"> +<map> +00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F +10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F +20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F +30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F +40 41 43 44 48 4B 4D 4E 4F 50 52 53 54 56 57 59 +5B 5C 5D 5F 62 64 66 67 68 69 6B 90 91 92 93 94 +95 41 43 44 48 4B 4D 4E 4F 50 52 53 54 56 57 59 +5B 5C 5D 5F 62 64 66 67 68 69 6B 96 97 98 99 9A +9B 9C 9E 9F A0 A1 A2 A3 A4 A5 60 A6 5F 62 6C 6B +A7 A8 A9 AA AB AC AD AE AF B0 60 B1 5F 62 6C 6B +B2 B3 B4 54 B5 41 B6 B7 B8 B9 5F BA BB BC BD 6B +BE BF C0 54 C1 C2 C3 C4 C5 41 5F C6 54 C7 54 6B +5D 41 41 41 41 54 47 44 46 4B 4B 4B 4B 50 50 48 +4A 57 57 59 59 59 59 C8 5D 64 64 64 64 69 62 5F +5D 41 41 41 41 54 47 44 46 4B 4B 4B 4B 50 50 48 +4A 57 57 59 59 59 59 C9 5D 64 64 64 64 69 62 FF +</map> +</collation> + <collation name="cp1250_czech_ci"/> <collation name="cp1250_bin" flag="binary"/> diff --git a/sql/share/charsets/latin2.xml b/sql/share/charsets/latin2.xml index 3ae239cb8fd..7f00148a1df 100644 --- a/sql/share/charsets/latin2.xml +++ b/sql/share/charsets/latin2.xml @@ -135,22 +135,22 @@ <collation name="latin2_croatian_ci"> <map> - 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F - 10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F - 20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F - 30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F - 40 41 42 43 46 48 49 4A 4B 4C 4D 4E 4F 50 51 52 - 53 54 55 56 58 59 5A 5B 5C 5D 5E 5B 5C 5D 5E 5F - 60 41 42 43 46 48 49 4A 4B 4C 4D 4E 4F 50 51 52 - 53 54 55 56 58 59 5A 5B 5C 5D 5E 7B 7C 7D 7E 7F - 80 81 82 83 84 85 86 87 88 89 57 8B 8C 8D 5F 8F - 90 91 92 93 94 95 96 97 98 99 57 9B 9C 9D 5F 9F - A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 AA AB AC AD AE AF - B0 B1 B2 B3 B4 B5 B6 B7 B8 B9 BA BB BC BD BE BF - 41 41 41 41 5C 5B 45 43 44 45 45 45 49 49 49 49 - 47 4E 4F 4F 4F 4F 5D D7 D8 55 55 55 59 59 DE DF - 41 41 41 41 5C 5B 45 43 44 45 45 45 49 49 49 49 - 47 4E 4F 4F 4F 4F 5D F7 D8 55 55 55 59 59 DE FF +00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F +10 11 12 13 14 15 16 17 18 19 1A 1B 1C 1D 1E 1F +20 21 22 23 24 25 26 27 28 29 2A 2B 2C 2D 2E 2F +30 31 32 33 34 35 36 37 38 39 3A 3B 3C 3D 3E 3F +40 41 43 44 48 4B 4D 4E 4F 50 52 53 54 56 57 59 +5B 5C 5D 5F 62 64 66 67 68 69 6B C6 C7 C8 C9 CA +CB 41 43 44 48 4B 4D 4E 4F 50 52 53 54 56 57 59 +5B 5C 5D 5F 62 64 66 67 68 69 6B CC CD CE CF D0 +D1 D2 D3 D4 D5 D6 D7 D8 D9 DA DB DC DD DE DF E0 +E1 E2 E3 E4 E5 E6 E7 E8 E9 EA EB EC ED EE EF F0 +F1 41 F2 54 F3 54 5F F4 F5 61 5F 62 6B F6 8E 6B +F7 41 F8 54 F9 54 5F FA FB 61 5F 62 6B FC 8E 6B +5D 41 41 41 41 54 47 44 46 4B 4B 4B 4B 50 50 48 +4A 57 57 59 59 59 59 FD 5D 64 64 64 64 69 62 5F +5D 41 41 41 41 54 47 44 46 4B 4B 4B 4B 50 50 48 +4A 57 57 59 59 59 59 FE 5D 64 64 64 64 69 62 FF </map> </collation> diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 8d694c48849..c580842ce06 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1267,6 +1267,7 @@ bool wait_for_tables(THD *thd) { /* Now we can open all tables without any interference */ thd->proc_info="Reopen tables"; + thd->version= refresh_version; result=reopen_tables(thd,0,0); } pthread_mutex_unlock(&LOCK_open); diff --git a/sql/sql_select.cc b/sql/sql_select.cc index aeb52a39982..1ff3328b8a8 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -5028,12 +5028,14 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields, temp_pool_slot = bitmap_set_next(&temp_pool); if (temp_pool_slot != MY_BIT_NONE) // we got a slot - sprintf(path, "%s%s_%lx_%i", mysql_tmpdir, tmp_file_prefix, + sprintf(path, "%s_%lx_%i", tmp_file_prefix, current_pid, temp_pool_slot); else // if we run out of slots or we are not using tempool - sprintf(path,"%s%s%lx_%lx_%x",mysql_tmpdir,tmp_file_prefix,current_pid, + sprintf(path,"%s%lx_%lx_%x", tmp_file_prefix,current_pid, thd->thread_id, thd->tmp_table++); + fn_format(path, path, mysql_tmpdir, "", MY_REPLACE_EXT|MY_UNPACK_FILENAME); + if (lower_case_table_names) my_casedn_str(files_charset_info, path); |