Loading libmysql/Makefile.am +5 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ link_sources: set -x; \ ss=`echo $(mystringsobjects) | sed "s;\.lo;.c;g"`; \ ds=`echo $(dbugobjects) | sed "s;\.lo;.c;g"`; \ qs=`echo $(sqlobjects) | sed "s;\.lo;.c;g"`; \ ms=`echo $(mysysobjects) | sed "s;\.lo;.c;g"`; \ for f in $$ss; do \ rm -f $(srcdir)/$$f; \ Loading @@ -44,6 +45,10 @@ link_sources: rm -f $(srcdir)/$$f; \ @LN_CP_F@ $(srcdir)/../strings/$$f $(srcdir)/$$f; \ done; \ for f in $$qs; do \ rm -f $(srcdir)/$$f; \ @LN_CP_F@ $(srcdir)/../sql/$$f $(srcdir)/$$f; \ done; \ for f in $$ds; do \ rm -f $(srcdir)/$$f; \ @LN_CP_F@ $(srcdir)/../dbug/$$f $(srcdir)/$$f; \ Loading libmysql/Makefile.shared +7 −2 Original line number Diff line number Diff line Loading @@ -31,9 +31,12 @@ noinst_PROGRAMS = conf_to_src CHARSET_OBJS=@CHARSET_OBJS@ LTCHARSET_OBJS= ${CHARSET_OBJS:.o=.lo} target_sources = libmysql.c net.c violite.c password.c \ target_sources = libmysql.c net.c password.c \ get_password.c errmsg.c #quick easy dirty hack to make it work after Tonu's changes #In my opinion, violite.c really belongs into mysys - Sasha sqlobjects = violite.lo mystringsobjects = strmov.lo strxmov.lo strnmov.lo strmake.lo strend.lo \ strnlen.lo strfill.lo is_prefix.lo \ int2str.lo str2int.lo strinstr.lo strcont.lo \ Loading @@ -59,7 +62,8 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \ # Not needed in the minimum library mysysobjects2 = getopt.lo getopt1.lo getvar.lo my_lib.lo mysysobjects = $(mysysobjects1) $(mysysobjects2) target_libadd = $(mysysobjects) $(mystringsobjects) $(dbugobjects) target_libadd = $(mysysobjects) $(mystringsobjects) $(dbugobjects)\ $(sqlobjects) target_ldflags = -version-info @SHARED_LIB_VERSION@ CLEANFILES = $(target_libadd) $(SHLIBOBJS) \ $(target) Loading @@ -75,6 +79,7 @@ clean-local: rm -f `echo $(mystringsobjects) | sed "s;\.lo;.c;g"` \ `echo $(dbugobjects) | sed "s;\.lo;.c;g"` \ `echo $(mysysobjects) | sed "s;\.lo;.c;g"` \ `echo $(sqlobjects) | sed "s;\.lo;.c;g"` \ $(mystringsextra) $(mysysheaders) ctype_extra_sources.c \ ../linked_client_sources Loading mysql-test/r/count_distinct2.result +8 −0 Original line number Diff line number Diff line Loading @@ -74,3 +74,11 @@ count(distinct n2) n1 1 NULL 1 1 3 2 count(distinct n) 5000 Variable_name Value Created_tmp_disk_tables 1 count(distinct s) 5000 Variable_name Value Created_tmp_disk_tables 1 mysql-test/t/count_distinct2-master.opt 0 → 100644 +1 −0 Original line number Diff line number Diff line -O max_heap_table_size=16384 mysql-test/t/count_distinct2.test +29 −0 Original line number Diff line number Diff line Loading @@ -43,3 +43,32 @@ select count(distinct n1), count(distinct n2) from t1; select count(distinct n2), n1 from t1 group by n1; drop table t1; # test the converstion from tree to MyISAM create table t1 (n int); let $1=5000; while ($1) { eval insert into t1 values($1); dec $1; } flush status; select count(distinct n) from t1; show status like 'Created_tmp_disk_tables'; drop table t1; #test conversion from heap to MyISAM create table t1 (s text); let $1=5000; while ($1) { eval insert into t1 values('$1'); dec $1; } flush status; select count(distinct s) from t1; show status like 'Created_tmp_disk_tables'; drop table t1; Loading
libmysql/Makefile.am +5 −0 Original line number Diff line number Diff line Loading @@ -35,6 +35,7 @@ link_sources: set -x; \ ss=`echo $(mystringsobjects) | sed "s;\.lo;.c;g"`; \ ds=`echo $(dbugobjects) | sed "s;\.lo;.c;g"`; \ qs=`echo $(sqlobjects) | sed "s;\.lo;.c;g"`; \ ms=`echo $(mysysobjects) | sed "s;\.lo;.c;g"`; \ for f in $$ss; do \ rm -f $(srcdir)/$$f; \ Loading @@ -44,6 +45,10 @@ link_sources: rm -f $(srcdir)/$$f; \ @LN_CP_F@ $(srcdir)/../strings/$$f $(srcdir)/$$f; \ done; \ for f in $$qs; do \ rm -f $(srcdir)/$$f; \ @LN_CP_F@ $(srcdir)/../sql/$$f $(srcdir)/$$f; \ done; \ for f in $$ds; do \ rm -f $(srcdir)/$$f; \ @LN_CP_F@ $(srcdir)/../dbug/$$f $(srcdir)/$$f; \ Loading
libmysql/Makefile.shared +7 −2 Original line number Diff line number Diff line Loading @@ -31,9 +31,12 @@ noinst_PROGRAMS = conf_to_src CHARSET_OBJS=@CHARSET_OBJS@ LTCHARSET_OBJS= ${CHARSET_OBJS:.o=.lo} target_sources = libmysql.c net.c violite.c password.c \ target_sources = libmysql.c net.c password.c \ get_password.c errmsg.c #quick easy dirty hack to make it work after Tonu's changes #In my opinion, violite.c really belongs into mysys - Sasha sqlobjects = violite.lo mystringsobjects = strmov.lo strxmov.lo strnmov.lo strmake.lo strend.lo \ strnlen.lo strfill.lo is_prefix.lo \ int2str.lo str2int.lo strinstr.lo strcont.lo \ Loading @@ -59,7 +62,8 @@ mysysobjects1 = my_init.lo my_static.lo my_malloc.lo my_realloc.lo \ # Not needed in the minimum library mysysobjects2 = getopt.lo getopt1.lo getvar.lo my_lib.lo mysysobjects = $(mysysobjects1) $(mysysobjects2) target_libadd = $(mysysobjects) $(mystringsobjects) $(dbugobjects) target_libadd = $(mysysobjects) $(mystringsobjects) $(dbugobjects)\ $(sqlobjects) target_ldflags = -version-info @SHARED_LIB_VERSION@ CLEANFILES = $(target_libadd) $(SHLIBOBJS) \ $(target) Loading @@ -75,6 +79,7 @@ clean-local: rm -f `echo $(mystringsobjects) | sed "s;\.lo;.c;g"` \ `echo $(dbugobjects) | sed "s;\.lo;.c;g"` \ `echo $(mysysobjects) | sed "s;\.lo;.c;g"` \ `echo $(sqlobjects) | sed "s;\.lo;.c;g"` \ $(mystringsextra) $(mysysheaders) ctype_extra_sources.c \ ../linked_client_sources Loading
mysql-test/r/count_distinct2.result +8 −0 Original line number Diff line number Diff line Loading @@ -74,3 +74,11 @@ count(distinct n2) n1 1 NULL 1 1 3 2 count(distinct n) 5000 Variable_name Value Created_tmp_disk_tables 1 count(distinct s) 5000 Variable_name Value Created_tmp_disk_tables 1
mysql-test/t/count_distinct2-master.opt 0 → 100644 +1 −0 Original line number Diff line number Diff line -O max_heap_table_size=16384
mysql-test/t/count_distinct2.test +29 −0 Original line number Diff line number Diff line Loading @@ -43,3 +43,32 @@ select count(distinct n1), count(distinct n2) from t1; select count(distinct n2), n1 from t1 group by n1; drop table t1; # test the converstion from tree to MyISAM create table t1 (n int); let $1=5000; while ($1) { eval insert into t1 values($1); dec $1; } flush status; select count(distinct n) from t1; show status like 'Created_tmp_disk_tables'; drop table t1; #test conversion from heap to MyISAM create table t1 (s text); let $1=5000; while ($1) { eval insert into t1 values('$1'); dec $1; } flush status; select count(distinct s) from t1; show status like 'Created_tmp_disk_tables'; drop table t1;